Skip to content

Commit

Permalink
skopeo: drop support for ostree
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
giuseppe committed Nov 1, 2019
1 parent 153520e commit 140b47e
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 39 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ RUN dnf -y update && dnf install -y make git golang golang-github-cpuguy83-md2ma
device-mapper-devel \
# gpgme bindings deps
libassuan-devel gpgme-devel \
ostree-devel \
gnupg \
# OpenShift deps
which tar wget hostname util-linux bsdtar socat ethtool device-mapper iptables tree findutils nmap-ncat e2fsprogs xfsprogs lsof docker iproute \
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ RUN apt-get update && apt-get install -y \
libdevmapper-dev \
libgpgme11-dev \
go-md2man \
libglib2.0-dev \
libostree-dev
libglib2.0-dev

ENV GOPATH=/
WORKDIR /src/github.com/containers/skopeo
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export GOPROXY=https://proxy.golang.org

ifeq ($(shell uname),Darwin)
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.
# 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,
Expand Down Expand Up @@ -60,12 +60,11 @@ MANPAGES ?= $(MANPAGES_MD:%.md=%)

BTRFS_BUILD_TAG = $(shell hack/btrfs_tag.sh) $(shell hack/btrfs_installed_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) $(OSTREE_BUILD_TAG) $(DARWIN_BUILD_TAG)
LOCAL_BUILD_TAGS = $(BTRFS_BUILD_TAG) $(LIBDM_BUILD_TAG) $(DARWIN_BUILD_TAG)
BUILDTAGS += $(LOCAL_BUILD_TAGS)

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

# make all DEBUG=1
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ Skopeo works with API V2 registries such as Docker registries, the Atomic regist
* oci:path:tag
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
-
`skopeo` is able to _inspect_ a repository on a Docker registry and fetch images layers.
Expand Down Expand Up @@ -177,10 +174,10 @@ Building without a container requires a bit more manual work and setup in your e
Install the necessary dependencies:
```sh
# 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):
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:
brew install gpgme
Expand All @@ -205,7 +202,7 @@ Building in a container is simpler, but more restrictive:
$ 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
$ make binary-static DISABLE_CGO=1
Expand Down
7 changes: 0 additions & 7 deletions cmd/skopeo/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ func (opts *imageOptions) newSystemContext() (*types.SystemContext, error) {
// imageDestOptions is a superset of imageOptions specialized for iamge destinations.
type imageDestOptions struct {
*imageOptions
osTreeTmpDir string // A directory to use for OSTree temporary files
dirForceCompression bool // Compress layers when saving to the dir: transport
ociAcceptUncompressedLayers bool // Whether to accept uncompressed layers in the oci: transport
compressionFormat string // Format to use for the compression
Expand All @@ -168,11 +167,6 @@ func imageDestFlags(global *globalOptions, shared *sharedImageOptions, flagPrefi
opts := imageDestOptions{imageOptions: genericOptions}

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{
Name: flagPrefix + "compress",
Usage: "Compress tarball image layers when saving to directory using the 'dir' transport. (default is same compression type as source)",
Expand Down Expand Up @@ -204,7 +198,6 @@ func (opts *imageDestOptions) newSystemContext() (*types.SystemContext, error) {
return nil, err
}

ctx.OSTreeTmpDirPath = opts.osTreeTmpDir
ctx.DirForceCompress = opts.dirForceCompression
ctx.OCIAcceptUncompressedLayers = opts.ociAcceptUncompressedLayers
if opts.compressionFormat != "" {
Expand Down
2 changes: 0 additions & 2 deletions cmd/skopeo/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ func TestImageDestOptionsNewSystemContext(t *testing.T) {
}, []string{
"--authfile", "/srv/authfile",
"--dest-cert-dir", "/srv/cert-dir",
"--dest-ostree-tmp-dir", "/srv/ostree-tmp-dir",
"--dest-shared-blob-dir", "/srv/shared-blob-dir",
"--dest-compress=true",
"--dest-daemon-host", "daemon-host.example.com",
Expand All @@ -170,7 +169,6 @@ func TestImageDestOptionsNewSystemContext(t *testing.T) {
DockerCertPath: "/srv/cert-dir",
DockerInsecureSkipTLSVerify: types.OptionalBoolTrue,
DockerAuthConfig: &types.DockerAuthConfig{Username: "creds-user", Password: "creds-password"},
OSTreeTmpDirPath: "/srv/ostree-tmp-dir",
DockerDaemonCertPath: "/srv/cert-dir",
DockerDaemonHost: "daemon-host.example.com",
DockerDaemonInsecureSkipTLSVerify: true,
Expand Down
1 change: 0 additions & 1 deletion completions/bash/skopeo
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ _skopeo_copy() {
--src-tls-verify
--dest-creds --dcreds
--dest-cert-dir
--dest-ostree-tmp-dir
--dest-tls-verify
--src-daemon-host
--dest-daemon-host
Expand Down
2 changes: 0 additions & 2 deletions docs/skopeo-copy.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-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)

**--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`).
Expand Down
3 changes: 0 additions & 3 deletions docs/skopeo.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ Most commands refer to container images, using a _transport_`:`_details_ format.
**oci:**_path_**:**_tag_
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

**--debug** enable debug output
Expand Down
11 changes: 0 additions & 11 deletions hack/ostree_tag.sh

This file was deleted.

0 comments on commit 140b47e

Please sign in to comment.