SHA256
1
0
forked from pool/docker

Accepting request 558082 from home:cyphar:containers:docker_bsc1021227

- Add a patch to dynamically probe whether libdevmapper supports
  dm_task_deferred_remove. This is necessary because we build the containers
  module on a SLE12 base, but later SLE versions have libdevmapper support.
  This should not affect openSUSE, as all openSUSE versions have a new enough
  libdevmapper. Backport of https://github.com/moby/moby/pull/35518.
  bsc#1021227 bsc#1029320 bsc#1058173
  + bsc1021227-0001-pkg-devmapper-dynamically-load-dm_task_deferred_remo.patch

OBS-URL: https://build.opensuse.org/request/show/558082
OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=227
This commit is contained in:
2017-12-18 12:28:20 +00:00
committed by Git OBS Bridge
parent a953cf90b5
commit 6e5904b7ca
3 changed files with 266 additions and 3 deletions

View File

@@ -66,6 +66,8 @@ Patch403: bsc1064781-0001-Allow-to-override-build-date.patch
Patch404: bsc1066801-0001-oci-add-proc-scsi-to-masked-paths.patch
# SUSE-BACKPORT: Backport of https://github.com/moby/moby/pull/35424. boo#1066210 CVE-2017-14992
Patch405: bsc1066210-0001-vendor-update-to-github.com-vbatts-tar-split-v0.10.2.patch
# SUSE-BACKPORT: Backport of https://github.com/moby/moby/pull/35518. bsc#1021227 bsc#1029320 bsc#1058173
Patch406: bsc1021227-0001-pkg-devmapper-dynamically-load-dm_task_deferred_remo.patch
BuildRequires: audit
BuildRequires: bash-completion
BuildRequires: ca-certificates
@@ -194,6 +196,8 @@ Test package for docker. It contains the source code and the tests.
%patch404 -p1 -d components/engine
# boo#1066210 CVE-2017-14992
%patch405 -p1 -d components/engine
# bsc#1021227 bsc#1029320 bsc#1058173
%patch406 -p1 -d components/engine
cp %{SOURCE7} .
cp %{SOURCE9} .
@@ -203,10 +207,11 @@ BUILDTAGS="exclude_graphdriver_aufs apparmor selinux pkcs11"
%if 0%{?with_libseccomp}
BUILDTAGS="seccomp $BUILDTAGS"
%endif
# For SLE12 libdevmapper.h is not recent enough to define
# dm_task_deferred_remove().
%if 0%{?sle_version} == 120000
BUILDTAGS="libdm_no_deferred_remove $BUILDTAGS"
# Provided by patch406, to allow us to build with older distros but still
# have deferred removal support at runtime. We only use this when building
# on SLE12.
BUILDTAGS="libdm_dlsym_deferred_remove $BUILDTAGS"
%endif
(cat <<EOF
@@ -289,6 +294,9 @@ PKG_LIST=$(go list -e \
| grep -v 'github.com/docker/docker/builder/dockerfile/parser$' \
| grep -v 'github.com/docker/docker/builder/remotecontext' \
| grep -v 'github.com/docker/docker/cmd/dockerd$' \
%ifarch s390x
| grep -v 'github.com/docker/docker/container' \
%endif
| grep -v 'github.com/docker/docker/daemon$' \
| grep -v 'github.com/docker/docker/daemon/graphdriver' \
| grep -Pv 'github.com/docker/docker/daemon/logger(?!/gelf)' \