mirror of
https://github.com/containers/skopeo.git
synced 2025-06-03 12:09:46 +00:00
skopeo: drop support for ostree
drop support for the ostree backend. The only known user for the backend is the atomic CLI tool that is not maintained anymore upstream. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1766404 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
153520e20e
commit
140b47e8e9
@ -6,7 +6,6 @@ RUN dnf -y update && dnf install -y make git golang golang-github-cpuguy83-md2ma
|
|||||||
device-mapper-devel \
|
device-mapper-devel \
|
||||||
# gpgme bindings deps
|
# gpgme bindings deps
|
||||||
libassuan-devel gpgme-devel \
|
libassuan-devel gpgme-devel \
|
||||||
ostree-devel \
|
|
||||||
gnupg \
|
gnupg \
|
||||||
# OpenShift deps
|
# OpenShift deps
|
||||||
which tar wget hostname util-linux bsdtar socat ethtool device-mapper iptables tree findutils nmap-ncat e2fsprogs xfsprogs lsof docker iproute \
|
which tar wget hostname util-linux bsdtar socat ethtool device-mapper iptables tree findutils nmap-ncat e2fsprogs xfsprogs lsof docker iproute \
|
||||||
|
@ -7,8 +7,7 @@ RUN apt-get update && apt-get install -y \
|
|||||||
libdevmapper-dev \
|
libdevmapper-dev \
|
||||||
libgpgme11-dev \
|
libgpgme11-dev \
|
||||||
go-md2man \
|
go-md2man \
|
||||||
libglib2.0-dev \
|
libglib2.0-dev
|
||||||
libostree-dev
|
|
||||||
|
|
||||||
ENV GOPATH=/
|
ENV GOPATH=/
|
||||||
WORKDIR /src/github.com/containers/skopeo
|
WORKDIR /src/github.com/containers/skopeo
|
||||||
|
7
Makefile
7
Makefile
@ -4,7 +4,7 @@ export GOPROXY=https://proxy.golang.org
|
|||||||
|
|
||||||
ifeq ($(shell uname),Darwin)
|
ifeq ($(shell uname),Darwin)
|
||||||
PREFIX ?= ${DESTDIR}/usr/local
|
PREFIX ?= ${DESTDIR}/usr/local
|
||||||
DARWIN_BUILD_TAG=containers_image_ostree_stub
|
DARWIN_BUILD_TAG=
|
||||||
# On macOS, (brew install gpgme) installs it within /usr/local, but /usr/local/include is not in the default search path.
|
# On macOS, (brew install gpgme) installs it within /usr/local, but /usr/local/include is not in the default search path.
|
||||||
# Rather than hard-code this directory, use gpgme-config. Sadly that must be done at the top-level user
|
# Rather than hard-code this directory, use gpgme-config. Sadly that must be done at the top-level user
|
||||||
# instead of locally in the gpgme subpackage, because cgo supports only pkg-config, not general shell scripts,
|
# instead of locally in the gpgme subpackage, because cgo supports only pkg-config, not general shell scripts,
|
||||||
@ -60,12 +60,11 @@ MANPAGES ?= $(MANPAGES_MD:%.md=%)
|
|||||||
|
|
||||||
BTRFS_BUILD_TAG = $(shell hack/btrfs_tag.sh) $(shell hack/btrfs_installed_tag.sh)
|
BTRFS_BUILD_TAG = $(shell hack/btrfs_tag.sh) $(shell hack/btrfs_installed_tag.sh)
|
||||||
LIBDM_BUILD_TAG = $(shell hack/libdm_tag.sh)
|
LIBDM_BUILD_TAG = $(shell hack/libdm_tag.sh)
|
||||||
OSTREE_BUILD_TAG = $(shell hack/ostree_tag.sh)
|
LOCAL_BUILD_TAGS = $(BTRFS_BUILD_TAG) $(LIBDM_BUILD_TAG) $(DARWIN_BUILD_TAG)
|
||||||
LOCAL_BUILD_TAGS = $(BTRFS_BUILD_TAG) $(LIBDM_BUILD_TAG) $(OSTREE_BUILD_TAG) $(DARWIN_BUILD_TAG)
|
|
||||||
BUILDTAGS += $(LOCAL_BUILD_TAGS)
|
BUILDTAGS += $(LOCAL_BUILD_TAGS)
|
||||||
|
|
||||||
ifeq ($(DISABLE_CGO), 1)
|
ifeq ($(DISABLE_CGO), 1)
|
||||||
override BUILDTAGS = containers_image_ostree_stub exclude_graphdriver_devicemapper exclude_graphdriver_btrfs containers_image_openpgp
|
override BUILDTAGS = exclude_graphdriver_devicemapper exclude_graphdriver_btrfs containers_image_openpgp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# make all DEBUG=1
|
# make all DEBUG=1
|
||||||
|
@ -37,9 +37,6 @@ Skopeo works with API V2 registries such as Docker registries, the Atomic regist
|
|||||||
* oci:path:tag
|
* oci:path:tag
|
||||||
An image tag in a directory compliant with "Open Container Image Layout Specification" at path.
|
An image tag in a directory compliant with "Open Container Image Layout Specification" at path.
|
||||||
|
|
||||||
* ostree:image[@/absolute/repo/path]
|
|
||||||
An image in local OSTree repository. /absolute/repo/path defaults to /ostree/repo.
|
|
||||||
|
|
||||||
Inspecting a repository
|
Inspecting a repository
|
||||||
-
|
-
|
||||||
`skopeo` is able to _inspect_ a repository on a Docker registry and fetch images layers.
|
`skopeo` is able to _inspect_ a repository on a Docker registry and fetch images layers.
|
||||||
@ -177,10 +174,10 @@ Building without a container requires a bit more manual work and setup in your e
|
|||||||
Install the necessary dependencies:
|
Install the necessary dependencies:
|
||||||
```sh
|
```sh
|
||||||
# Fedora:
|
# Fedora:
|
||||||
sudo dnf install gpgme-devel libassuan-devel btrfs-progs-devel device-mapper-devel ostree-devel
|
sudo dnf install gpgme-devel libassuan-devel btrfs-progs-devel device-mapper-devel
|
||||||
|
|
||||||
# Ubuntu (`libbtrfs-dev` requires Ubuntu 18.10 and above):
|
# Ubuntu (`libbtrfs-dev` requires Ubuntu 18.10 and above):
|
||||||
sudo apt install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev libostree-dev
|
sudo apt install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev
|
||||||
|
|
||||||
# macOS:
|
# macOS:
|
||||||
brew install gpgme
|
brew install gpgme
|
||||||
@ -205,7 +202,7 @@ Building in a container is simpler, but more restrictive:
|
|||||||
$ make binary # Or (make all) to also build documentation, see below.
|
$ make binary # Or (make all) to also build documentation, see below.
|
||||||
```
|
```
|
||||||
|
|
||||||
To build a pure-Go static binary (disables ostree, devicemapper, btrfs, and gpgme):
|
To build a pure-Go static binary (disables devicemapper, btrfs, and gpgme):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ make binary-static DISABLE_CGO=1
|
$ make binary-static DISABLE_CGO=1
|
||||||
|
@ -155,7 +155,6 @@ func (opts *imageOptions) newSystemContext() (*types.SystemContext, error) {
|
|||||||
// imageDestOptions is a superset of imageOptions specialized for iamge destinations.
|
// imageDestOptions is a superset of imageOptions specialized for iamge destinations.
|
||||||
type imageDestOptions struct {
|
type imageDestOptions struct {
|
||||||
*imageOptions
|
*imageOptions
|
||||||
osTreeTmpDir string // A directory to use for OSTree temporary files
|
|
||||||
dirForceCompression bool // Compress layers when saving to the dir: transport
|
dirForceCompression bool // Compress layers when saving to the dir: transport
|
||||||
ociAcceptUncompressedLayers bool // Whether to accept uncompressed layers in the oci: transport
|
ociAcceptUncompressedLayers bool // Whether to accept uncompressed layers in the oci: transport
|
||||||
compressionFormat string // Format to use for the compression
|
compressionFormat string // Format to use for the compression
|
||||||
@ -168,11 +167,6 @@ func imageDestFlags(global *globalOptions, shared *sharedImageOptions, flagPrefi
|
|||||||
opts := imageDestOptions{imageOptions: genericOptions}
|
opts := imageDestOptions{imageOptions: genericOptions}
|
||||||
|
|
||||||
return append(genericFlags, []cli.Flag{
|
return append(genericFlags, []cli.Flag{
|
||||||
cli.StringFlag{
|
|
||||||
Name: flagPrefix + "ostree-tmp-dir",
|
|
||||||
Usage: "`DIRECTORY` to use for OSTree temporary files",
|
|
||||||
Destination: &opts.osTreeTmpDir,
|
|
||||||
},
|
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: flagPrefix + "compress",
|
Name: flagPrefix + "compress",
|
||||||
Usage: "Compress tarball image layers when saving to directory using the 'dir' transport. (default is same compression type as source)",
|
Usage: "Compress tarball image layers when saving to directory using the 'dir' transport. (default is same compression type as source)",
|
||||||
@ -204,7 +198,6 @@ func (opts *imageDestOptions) newSystemContext() (*types.SystemContext, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.OSTreeTmpDirPath = opts.osTreeTmpDir
|
|
||||||
ctx.DirForceCompress = opts.dirForceCompression
|
ctx.DirForceCompress = opts.dirForceCompression
|
||||||
ctx.OCIAcceptUncompressedLayers = opts.ociAcceptUncompressedLayers
|
ctx.OCIAcceptUncompressedLayers = opts.ociAcceptUncompressedLayers
|
||||||
if opts.compressionFormat != "" {
|
if opts.compressionFormat != "" {
|
||||||
|
@ -152,7 +152,6 @@ func TestImageDestOptionsNewSystemContext(t *testing.T) {
|
|||||||
}, []string{
|
}, []string{
|
||||||
"--authfile", "/srv/authfile",
|
"--authfile", "/srv/authfile",
|
||||||
"--dest-cert-dir", "/srv/cert-dir",
|
"--dest-cert-dir", "/srv/cert-dir",
|
||||||
"--dest-ostree-tmp-dir", "/srv/ostree-tmp-dir",
|
|
||||||
"--dest-shared-blob-dir", "/srv/shared-blob-dir",
|
"--dest-shared-blob-dir", "/srv/shared-blob-dir",
|
||||||
"--dest-compress=true",
|
"--dest-compress=true",
|
||||||
"--dest-daemon-host", "daemon-host.example.com",
|
"--dest-daemon-host", "daemon-host.example.com",
|
||||||
@ -170,7 +169,6 @@ func TestImageDestOptionsNewSystemContext(t *testing.T) {
|
|||||||
DockerCertPath: "/srv/cert-dir",
|
DockerCertPath: "/srv/cert-dir",
|
||||||
DockerInsecureSkipTLSVerify: types.OptionalBoolTrue,
|
DockerInsecureSkipTLSVerify: types.OptionalBoolTrue,
|
||||||
DockerAuthConfig: &types.DockerAuthConfig{Username: "creds-user", Password: "creds-password"},
|
DockerAuthConfig: &types.DockerAuthConfig{Username: "creds-user", Password: "creds-password"},
|
||||||
OSTreeTmpDirPath: "/srv/ostree-tmp-dir",
|
|
||||||
DockerDaemonCertPath: "/srv/cert-dir",
|
DockerDaemonCertPath: "/srv/cert-dir",
|
||||||
DockerDaemonHost: "daemon-host.example.com",
|
DockerDaemonHost: "daemon-host.example.com",
|
||||||
DockerDaemonInsecureSkipTLSVerify: true,
|
DockerDaemonInsecureSkipTLSVerify: true,
|
||||||
|
@ -44,7 +44,6 @@ _skopeo_copy() {
|
|||||||
--src-tls-verify
|
--src-tls-verify
|
||||||
--dest-creds --dcreds
|
--dest-creds --dcreds
|
||||||
--dest-cert-dir
|
--dest-cert-dir
|
||||||
--dest-ostree-tmp-dir
|
|
||||||
--dest-tls-verify
|
--dest-tls-verify
|
||||||
--src-daemon-host
|
--src-daemon-host
|
||||||
--dest-daemon-host
|
--dest-daemon-host
|
||||||
|
@ -54,8 +54,6 @@ If the authorization state is not found there, $HOME/.docker/config.json is chec
|
|||||||
|
|
||||||
**--dest-no-creds** _bool-value_ Access the registry anonymously.
|
**--dest-no-creds** _bool-value_ Access the registry anonymously.
|
||||||
|
|
||||||
**--dest-ostree-tmp-dir** _path_ Directory to use for OSTree temporary files.
|
|
||||||
|
|
||||||
**--dest-tls-verify** _bool-value_ Require HTTPS and verify certificates when talking to container destination registry or daemon (defaults to true)
|
**--dest-tls-verify** _bool-value_ Require HTTPS and verify certificates when talking to container destination registry or daemon (defaults to true)
|
||||||
|
|
||||||
**--src-daemon-host** _host_ Copy from docker daemon at _host_. If _host_ starts with `tcp://`, HTTPS is enabled by default. To use plain HTTP, use the form `http://` (default is `unix:///var/run/docker.sock`).
|
**--src-daemon-host** _host_ Copy from docker daemon at _host_. If _host_ starts with `tcp://`, HTTPS is enabled by default. To use plain HTTP, use the form `http://` (default is `unix:///var/run/docker.sock`).
|
||||||
|
@ -44,9 +44,6 @@ Most commands refer to container images, using a _transport_`:`_details_ format.
|
|||||||
**oci:**_path_**:**_tag_
|
**oci:**_path_**:**_tag_
|
||||||
An image _tag_ in a directory compliant with "Open Container Image Layout Specification" at _path_.
|
An image _tag_ in a directory compliant with "Open Container Image Layout Specification" at _path_.
|
||||||
|
|
||||||
**ostree:**_image_[**@**_/absolute/repo/path_]
|
|
||||||
An image in local OSTree repository. _/absolute/repo/path_ defaults to _/ostree/repo_.
|
|
||||||
|
|
||||||
## OPTIONS
|
## OPTIONS
|
||||||
|
|
||||||
**--debug** enable debug output
|
**--debug** enable debug output
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if test $(${GO:-go} env GOOS) != "linux" ; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if pkg-config ostree-1 &> /dev/null ; then
|
|
||||||
# ostree: used by containers/storage
|
|
||||||
# containers_image_ostree: used by containers/image
|
|
||||||
echo "ostree containers_image_ostree"
|
|
||||||
fi
|
|
Loading…
Reference in New Issue
Block a user