Merge pull request #4376 from giuseppe/drop-ostree

build: drop support for ostree
This commit is contained in:
OpenShift Merge Robot 2019-10-30 15:49:26 +01:00 committed by GitHub
commit a35d002b72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 6 additions and 88 deletions

View file

@ -2,7 +2,6 @@
run:
build-tags:
- apparmor
- ostree
- seccomp
- selinux
concurrency: 6

View file

@ -19,7 +19,6 @@ RUN apt-get update && apt-get install -y \
libfuse-dev \
libnet-dev \
libnl-3-dev \
libostree-dev \
libprotobuf-dev \
libprotobuf-c-dev \
libseccomp2 \

View file

@ -22,7 +22,6 @@ RUN yum -y install btrfs-progs-devel \
containers-common \
runc \
make \
ostree-devel \
lsof \
which\
golang-github-cpuguy83-go-md2man \

View file

@ -22,7 +22,6 @@ RUN dnf -y install btrfs-progs-devel \
containers-common \
runc \
make \
ostree-devel \
lsof \
which\
golang-github-cpuguy83-go-md2man \

View file

@ -27,7 +27,6 @@ BUILDTAGS ?= \
$(shell hack/apparmor_tag.sh) \
$(shell hack/btrfs_installed_tag.sh) \
$(shell hack/btrfs_tag.sh) \
$(shell hack/ostree_tag.sh) \
$(shell hack/selinux_tag.sh) \
$(shell hack/systemd_tag.sh) \
exclude_graphdriver_devicemapper \
@ -46,7 +45,7 @@ $(warning \
Install libsystemd for journald support)
endif
BUILDTAGS_CROSS ?= containers_image_openpgp containers_image_ostree_stub exclude_graphdriver_btrfs exclude_graphdriver_devicemapper exclude_graphdriver_overlay
BUILDTAGS_CROSS ?= containers_image_openpgp exclude_graphdriver_btrfs exclude_graphdriver_devicemapper exclude_graphdriver_overlay
ifneq (,$(findstring varlink,$(BUILDTAGS)))
PODMAN_VARLINK_DEPENDENCIES = cmd/podman/varlink/iopodman.go
endif
@ -156,7 +155,7 @@ gofmt: ## Verify the source code gofmt
git diff --exit-code
test/checkseccomp/checkseccomp: .gopathok $(wildcard test/checkseccomp/*.go)
$(GO_BUILD) -ldflags '$(LDFLAGS)' -tags "$(BUILDTAGS) containers_image_ostree_stub" -o $@ $(PROJECT)/test/checkseccomp
$(GO_BUILD) -ldflags '$(LDFLAGS)' -tags "$(BUILDTAGS)" -o $@ $(PROJECT)/test/checkseccomp
test/goecho/goecho: .gopathok $(wildcard test/goecho/*.go)
$(GO_BUILD) -ldflags '$(LDFLAGS)' -o $@ $(PROJECT)/test/goecho
@ -493,14 +492,6 @@ endef
$(call go-get,github.com/cpuguy83/go-md2man); \
fi
.install.ostree: .gopathok
if ! pkg-config ostree-1 2> /dev/null ; then \
git clone https://github.com/ostreedev/ostree $(FIRST_GOPATH)/src/github.com/ostreedev/ostree ; \
cd $(FIRST_GOPATH)src/github.com/ostreedev/ostree ; \
./autogen.sh --prefix=/usr/local; \
make all install; \
fi
varlink_generate: .gopathok cmd/podman/varlink/iopodman.go ## Generate varlink
varlink_api_generate: .gopathok API.md
@ -528,7 +519,7 @@ build-all-new-commits:
git rebase $(GIT_BASE_BRANCH) -x make
build-no-cgo:
env BUILDTAGS="containers_image_openpgp containers_image_ostree_stub exclude_graphdriver_btrfs exclude_graphdriver_devicemapper exclude_disk_quota" CGO_ENABLED=0 $(MAKE)
env BUILDTAGS="containers_image_openpgp exclude_graphdriver_btrfs exclude_graphdriver_devicemapper exclude_disk_quota" CGO_ENABLED=0 $(MAKE)
vendor:
export GO111MODULE=on \

View file

@ -28,7 +28,6 @@ declare -a PKGS=(device-mapper-devel \
libseccomp-devel \
libselinux-devel \
make \
ostree-devel \
golang-github-cpuguy83-go-md2man \
rpm-build \
btrfs-progs-devel \

View file

@ -89,7 +89,7 @@ if [ "${CONTAINER_RUNTIME}" == "none" ]; then
fi
export TAGS="seccomp $($GOSRC/hack/btrfs_tag.sh) $($GOSRC/hack/libdm_tag.sh) $($GOSRC/hack/btrfs_installed_tag.sh) $($GOSRC/hack/ostree_tag.sh) $($GOSRC/hack/selinux_tag.sh)"
export TAGS="seccomp $($GOSRC/hack/btrfs_tag.sh) $($GOSRC/hack/libdm_tag.sh) $($GOSRC/hack/btrfs_installed_tag.sh) $($GOSRC/hack/selinux_tag.sh)"
# Validate
if [ $validate -eq 1 ]; then

View file

@ -69,8 +69,6 @@ ooe.sh sudo dnf install -y \
make \
msitools \
nmap-ncat \
ostree \
ostree-devel \
pandoc \
podman \
procps-ng \

View file

@ -83,7 +83,6 @@ $BIGTO $SUDOAPTGET install \
libnet1 \
libnet1-dev \
libnl-3-dev \
libostree-dev \
libvarlink \
libprotobuf-c-dev \
libprotobuf-dev \

View file

@ -19,7 +19,6 @@ RUN dnf -y install \
lsof \
make \
nmap-ncat \
ostree-devel \
procps-ng \
python \
python3-dateutil \

View file

@ -36,7 +36,6 @@ RUN dnf -y install --exclude container-selinux \
libseccomp-devel \
libselinux-devel \
make \
ostree-devel \
pkgconfig \
runc \
fuse-overlayfs \

View file

@ -63,7 +63,6 @@ BuildRequires: libassuan-devel
BuildRequires: libgpg-error-devel
BuildRequires: libseccomp-devel
BuildRequires: libselinux-devel
BuildRequires: ostree-devel
BuildRequires: pkgconfig
BuildRequires: make
BuildRequires: systemd-devel
@ -139,7 +138,6 @@ Provides: bundled(golang(github.com/opencontainers/runtime-spec)) = v1.0.0
Provides: bundled(golang(github.com/opencontainers/runtime-tools)) = 625e2322645b151a7cbb93a8b42920933e72167f
Provides: bundled(golang(github.com/opencontainers/selinux)) = b6fa367ed7f534f9ba25391cc2d467085dbb445a
Provides: bundled(golang(github.com/openshift/imagebuilder)) = master
Provides: bundled(golang(github.com/ostreedev/ostree-go)) = master
Provides: bundled(golang(github.com/pkg/errors)) = v0.8.0
Provides: bundled(golang(github.com/pmezard/go-difflib)) = 792786c7400a136282c1664665ae0a8db921c6c2
Provides: bundled(golang(github.com/pquerna/ffjson)) = d49c2bc1aa135aad0c6f4fc2056623ec78f5d5ac
@ -383,7 +381,7 @@ mkdir -p src/%{provider}.%{provider_tld}/{containers,opencontainers}
ln -s $(dirs +1 -l) src/%{import_path_conmon}
popd
export BUILDTAGS="selinux seccomp $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh) containers_image_ostree_stub"
export BUILDTAGS="selinux seccomp $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh)"
BUILDTAGS=$BUILDTAGS make
popd

View file

@ -42,9 +42,6 @@ Image stored in local container/storage
**oci-archive:**_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
**--all-tags**, **a**

View file

@ -12,7 +12,7 @@ podman\-push - Push an image from local storage to elsewhere
Pushes an image from local storage to a specified destination.
Push is mainly used to push images to registries, however **podman push**
can be used to save images to tarballs and directories using the following
transports: **dir:**, **docker-archive:**, **docker-daemon:**, **oci-archive:**, and **ostree:**.
transports: **dir:**, **docker-archive:**, **docker-daemon:** and **oci-archive:**.
## imageID
Image stored in local container/storage
@ -41,9 +41,6 @@ Image stored in local container/storage
**oci-archive:**_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
**--authfile**=*path*

View file

@ -1,6 +0,0 @@
#!/bin/bash
if ! pkg-config glib-2.0 gobject-2.0 ostree-1 libselinux 2> /dev/null ; then
echo containers_image_ostree_stub
else
echo containers_image_ostree
fi

View file

@ -114,7 +114,6 @@ sudo yum install -y \
libseccomp-devel \
libselinux-devel \
make \
ostree-devel \
pkgconfig \
runc \
containers-common
@ -136,7 +135,6 @@ sudo apt-get install \
libglib2.0-dev \
libgpgme-dev \
libgpg-error-dev \
libostree-dev \
libprotobuf-dev \
libprotobuf-c0-dev \
libseccomp-dev \
@ -178,34 +176,6 @@ echo 'kernel.unprivileged_userns_clone=1' > /etc/sysctl.d/userns.conf
If any dependencies cannot be installed or are not sufficiently current, they have to be built from source.
This will mainly affect Debian, Ubuntu, and related distributions, or RHEL where no subscription is active (e.g. Cloud VMs).
#### ostree
A copy of the development libraries for `ostree` is necessary, either in the form of the `libostree-dev` package
from the [flatpak](https://launchpad.net/~alexlarsson/+archive/ubuntu/flatpak) PPA,
or built [from source](https://github.com/ostreedev/ostree/blob/master/docs/contributing-tutorial.md)
(see also [here](https://ostree.readthedocs.io/en/latest/#building)). As of Ubuntu 18.04, `libostree-dev` is available in the main repositories,
and the PPA is no longer required.
To build, use the following (running `make` can take a while):
```bash
git clone https://github.com/ostreedev/ostree ~/ostree
cd ~/ostree
git submodule update --init
# for Fedora, CentOS, RHEL
sudo yum install -y automake bison e2fsprogs-devel fuse-devel gpgme-devel libseccomp-devel libtool systemd-devel xz-devel zlib-devel
# for Debian, Ubuntu etc.
sudo apt-get install -y automake bison e2fsprogs e2fslibs-dev fuse libfuse-dev libgpgme-dev liblzma-dev libseccomp-dev libsystemd-dev libtool zlib1g
# for all distributions
./autogen.sh --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc
# remove --nonet option due to https:/github.com/ostreedev/ostree/issues/1374
sed -i '/.*--nonet.*/d' ./Makefile-man.am
make
sudo make install
```
#### golang
Be careful to double-check that the version of golang is new enough (i.e. `go version`), version 1.10.x or higher is required.
@ -324,8 +294,6 @@ make BUILDTAGS='seccomp apparmor'
| exclude_graphdriver_btrfs | exclude btrfs | libbtrfs |
| exclude_graphdriver_devicemapper | exclude device-mapper | libdm |
| libdm_no_deferred_remove | exclude deferred removal in libdm | libdm |
| ostree | ostree support (requires selinux) | ostree-1, libselinux |
| containers_image_ostree_stub | exclude ostree | |
| seccomp | syscall filtering | libseccomp |
| selinux | selinux process and mount labeling | |
| systemd | journald logging | libsystemd |

View file

@ -203,23 +203,6 @@ var _ = Describe("Podman push", func() {
Expect(session.ExitCode()).To(Equal(0))
})
It("podman push to local ostree", func() {
if !IsCommandAvailable("ostree") {
Skip("ostree is not installed")
}
ostreePath := filepath.Join(podmanTest.TempDir, "ostree/repo")
os.MkdirAll(ostreePath, os.ModePerm)
setup := SystemExec("ostree", []string{strings.Join([]string{"--repo=", ostreePath}, ""), "init"})
Expect(setup.ExitCode()).To(Equal(0))
session := podmanTest.PodmanNoCache([]string{"push", ALPINE, strings.Join([]string{"ostree:alp@", ostreePath}, "")})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
})
It("podman push to docker-archive no reference", func() {
tarfn := filepath.Join(podmanTest.TempDir, "alp.tar")
session := podmanTest.PodmanNoCache([]string{"push", ALPINE,