2014-08-01 11:48:31 +02:00
|
|
|
#
|
2014-07-17 17:31:28 +02:00
|
|
|
# spec file for package docker
|
2014-08-01 11:48:31 +02:00
|
|
|
#
|
2018-01-10 13:24:47 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-07-17 17:31:28 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-10-08 11:38:41 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-07-17 17:31:28 +02:00
|
|
|
#
|
2016-06-21 12:05:57 +02:00
|
|
|
# nodebuginfo
|
2014-07-17 17:31:28 +02:00
|
|
|
|
2014-08-01 11:48:31 +02:00
|
|
|
|
2017-11-24 11:32:23 +01:00
|
|
|
# Where important update information will be stored, such that an administrator
|
|
|
|
# is guaranteed to see the relevant warning.
|
|
|
|
%define update_messages %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release}
|
|
|
|
|
2017-11-24 11:06:46 +01:00
|
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
|
|
%if ! %{defined _fillupdir}
|
|
|
|
%define _fillupdir /var/adm/fillup-templates
|
|
|
|
%endif
|
|
|
|
|
2018-08-20 10:55:46 +02:00
|
|
|
# Handle _multibuild magic.
|
|
|
|
%define flavour @BUILD_FLAVOR@%{nil}
|
|
|
|
|
|
|
|
# We split the Name: into "realname" and "name_suffix".
|
|
|
|
%define realname docker
|
|
|
|
%if "%flavour" == ""
|
|
|
|
%define name_suffix %{nil}
|
|
|
|
%else
|
|
|
|
%define name_suffix -%{flavour}
|
|
|
|
%endif
|
|
|
|
|
2017-10-24 12:02:17 +02:00
|
|
|
# Used when generating the "build" information for Docker version. The value of
|
|
|
|
# git_commit_epoch is unused here (we use SOURCE_DATE_EPOCH, which rpm
|
|
|
|
# helpfully injects into our build environment from the changelog). If you want
|
|
|
|
# to generate a new git_commit_epoch, use this:
|
|
|
|
# $ date --date="$(git show --format=fuller --date=iso $COMMIT_ID | grep -oP '(?<=^CommitDate: ).*')" '+%s'
|
2018-08-24 10:10:15 +02:00
|
|
|
%define git_version e68fc7a215d7
|
|
|
|
%define git_commit_epoch 1534871791
|
2017-12-19 04:42:51 +01:00
|
|
|
|
|
|
|
# These are the git commits required. We verify them against the source to make
|
|
|
|
# sure we didn't miss anything important when doing upgrades.
|
2018-08-24 10:10:15 +02:00
|
|
|
%define required_containerd 468a545b9edcd5932818eb9de8e72413e616e86e
|
2018-08-15 09:09:12 +02:00
|
|
|
%define required_dockerrunc 69663f0bd4b60df09991c08812a60108003fa340
|
2018-11-29 16:15:40 +01:00
|
|
|
%define required_libnetwork 6da50d1978302f04c3e2089e29112ea24812f05b
|
2017-10-24 12:02:17 +02:00
|
|
|
|
2018-08-20 10:55:46 +02:00
|
|
|
Name: %{realname}%{name_suffix}
|
2018-11-29 16:15:40 +01:00
|
|
|
Version: 18.09.0_ce
|
2014-07-17 17:31:28 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: The Linux container runtime
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: System/Management
|
|
|
|
Url: http://www.docker.io
|
2017-10-18 06:27:06 +02:00
|
|
|
# TODO(VR): check those SOURCE files below
|
2018-08-20 10:55:46 +02:00
|
|
|
Source: %{realname}-%{version}.tar.xz
|
2014-07-17 17:31:28 +02:00
|
|
|
Source1: docker.service
|
2018-08-20 10:55:46 +02:00
|
|
|
# bsc#1086185 -- but we only apply this on Kubic.
|
|
|
|
Source2: docker-kubic-service.conf
|
2014-07-17 17:31:28 +02:00
|
|
|
Source3: 80-docker.rules
|
|
|
|
Source4: sysconfig.docker
|
2018-08-21 12:12:51 +02:00
|
|
|
Source5: kubelet.env
|
2014-07-17 17:31:28 +02:00
|
|
|
Source6: docker-rpmlintrc
|
2014-08-16 15:38:01 +02:00
|
|
|
Source7: README_SUSE.md
|
2015-12-23 11:57:20 +01:00
|
|
|
Source8: docker-audit.rules
|
2017-10-18 06:27:06 +02:00
|
|
|
Source9: tests.sh
|
2016-10-11 12:30:52 +02:00
|
|
|
# SUSE-FEATURE: Adds the /run/secrets mountpoint inside all Docker containers
|
|
|
|
# which is not snapshotted when images are committed. Note that if you modify
|
|
|
|
# this patch, please also modify the patch in the suse-secrets-v<version>
|
|
|
|
# branch in http://github.com/suse/docker.mirror.
|
2017-03-08 10:03:15 +01:00
|
|
|
Patch200: secrets-0001-daemon-allow-directory-creation-in-run-secrets.patch
|
|
|
|
Patch201: secrets-0002-SUSE-implement-SUSE-container-secrets.patch
|
2018-11-29 16:15:40 +01:00
|
|
|
# SUSE-BACKPORT: Backport of https://github.com/moby/moby/pull/37831. bsc#1073877
|
2018-08-15 09:09:12 +02:00
|
|
|
Patch400: bsc1073877-0001-apparmor-allow-receiving-of-signals-from-docker-kill.patch
|
2018-06-29 13:09:45 +02:00
|
|
|
# SUSE-BACKPORT: Backport of https://github.com/moby/moby/pull/37353. bsc#1099277
|
2018-08-15 09:09:12 +02:00
|
|
|
Patch401: bsc1073877-0002-apparmor-clobber-docker-default-profile-on-start.patch
|
2018-08-24 10:34:36 +02:00
|
|
|
# SUSE-BACKPORT: Backport of https://github.com/docker/cli/pull/1306. boo#1047218
|
2018-11-29 16:15:40 +01:00
|
|
|
Patch402: bsc1047218-0001-man-obey-SOURCE_DATE_EPOCH-when-generating-man-pages.patch
|
|
|
|
# SUSE-ISSUE: Revert of https://github.com/moby/moby/pull/37907.
|
|
|
|
Patch403: packaging-0001-revert-Remove-docker-prefix-for-containerd-and-runc-.patch
|
2018-08-20 10:55:46 +02:00
|
|
|
# SUSE-FEATURE: Add support to mirror inofficial/private registries
|
|
|
|
# (https://github.com/moby/moby/pull/34319)
|
|
|
|
Patch500: private-registry-0001-Add-private-registry-mirror-support.patch
|
2015-12-23 11:57:20 +01:00
|
|
|
BuildRequires: audit
|
2014-07-17 17:31:28 +02:00
|
|
|
BuildRequires: bash-completion
|
2017-03-05 04:07:44 +01:00
|
|
|
BuildRequires: ca-certificates
|
2014-07-17 17:31:28 +02:00
|
|
|
BuildRequires: device-mapper-devel >= 1.2.68
|
|
|
|
BuildRequires: glibc-devel-static
|
2014-08-01 11:48:31 +02:00
|
|
|
BuildRequires: libapparmor-devel
|
2014-07-17 17:31:28 +02:00
|
|
|
BuildRequires: libbtrfs-devel >= 3.8
|
2018-08-15 09:09:12 +02:00
|
|
|
BuildRequires: libseccomp-devel >= 2.2
|
2017-03-05 04:07:44 +01:00
|
|
|
BuildRequires: libtool
|
2014-07-17 17:31:28 +02:00
|
|
|
BuildRequires: procps
|
|
|
|
BuildRequires: sqlite3-devel
|
|
|
|
BuildRequires: systemd-devel
|
|
|
|
BuildRequires: zsh
|
2014-08-01 11:48:31 +02:00
|
|
|
Requires: apparmor-parser
|
2014-07-17 17:31:28 +02:00
|
|
|
Requires: ca-certificates-mozilla
|
2017-11-09 13:24:37 +01:00
|
|
|
# Required in order for networking to work. fix_bsc_1057743 is a work-around
|
|
|
|
# for some old packaging issues (where rpm would delete a binary that was
|
|
|
|
# installed by docker-libnetwork). See bsc#1057743 for more details.
|
2018-08-20 10:55:46 +02:00
|
|
|
Requires: docker-libnetwork%{name_suffix}-git = %{required_libnetwork}
|
2017-11-09 13:24:37 +01:00
|
|
|
Requires: fix_bsc_1057743
|
2016-08-16 12:57:11 +02:00
|
|
|
# Containerd and runC are required as they are the only currently supported
|
|
|
|
# execdrivers of Docker. NOTE: The version pinning here matches upstream's
|
2017-10-18 06:27:06 +02:00
|
|
|
# vendor.conf to ensure that we don't use a slightly incompatible version of
|
2016-08-16 12:57:11 +02:00
|
|
|
# runC or containerd (which would be bad).
|
2018-08-20 10:55:46 +02:00
|
|
|
Requires: containerd%{name_suffix}-git = %{required_containerd}
|
|
|
|
Requires: docker-runc%{name_suffix}-git = %{required_dockerrunc}
|
2018-03-28 11:48:12 +02:00
|
|
|
# Needed for --init support. We don't use "tini", we use our own implementation
|
|
|
|
# which handles edge-cases better.
|
|
|
|
Requires: catatonit
|
2015-01-22 21:49:38 +01:00
|
|
|
# Provides mkfs.ext4 - used by Docker when devicemapper storage driver is used
|
|
|
|
Requires: e2fsprogs
|
2014-07-17 17:31:28 +02:00
|
|
|
Requires: iproute2 >= 3.5
|
|
|
|
Requires: iptables >= 1.4
|
|
|
|
Requires: procps
|
|
|
|
Requires: tar >= 1.26
|
|
|
|
Requires: xz >= 4.9
|
2016-06-21 12:05:57 +02:00
|
|
|
Requires(post): %fillup_prereq
|
|
|
|
Requires(post): udev
|
2017-03-07 11:40:30 +01:00
|
|
|
Requires(post): shadow
|
2018-01-19 16:22:50 +01:00
|
|
|
# We used to have a migration tool for the upgrade from v1.9.x to v1.10.x.
|
|
|
|
# It is no longer useful, so we obsolete it. bsc#1069758
|
|
|
|
Obsoletes: docker-image-migrator
|
2017-04-11 11:17:58 +02:00
|
|
|
# Not necessary, but must be installed when the underlying system is
|
|
|
|
# configured to use lvm and the user doesn't explicitly provide a
|
|
|
|
# different storage-driver than devicemapper
|
|
|
|
Recommends: lvm2 >= 2.2.89
|
2018-10-08 11:38:41 +02:00
|
|
|
Recommends: git-core >= 1.7
|
2014-08-01 11:48:31 +02:00
|
|
|
Conflicts: lxc < 1.0
|
2017-12-19 04:42:51 +01:00
|
|
|
ExcludeArch: s390 ppc
|
2018-08-15 09:09:12 +02:00
|
|
|
# Make sure we build with go 1.10
|
2016-06-21 12:05:57 +02:00
|
|
|
BuildRequires: go-go-md2man
|
2018-08-15 09:09:12 +02:00
|
|
|
BuildRequires: golang(API) = 1.10
|
2018-08-20 10:55:46 +02:00
|
|
|
# KUBIC-SPECIFIC: This was required when upgrading from the original kubic
|
|
|
|
# packaging, when everything was renamed to -kubic. It also is
|
|
|
|
# used to ensure that nothing complains too much when using
|
|
|
|
# -kubic packages. Hopfully it can be removed one day.
|
|
|
|
%if "%flavour" == "kubic"
|
|
|
|
# Obsolete old packege without the -kubic suffix
|
|
|
|
Obsoletes: %{realname} = 1.12.6
|
|
|
|
Obsoletes: %{realname}_1_12_6
|
|
|
|
# Conflict with non-kubic package, and provide equivalent
|
|
|
|
Conflicts: %{realname}
|
|
|
|
Provides: %{realname} = %{version}
|
2018-08-21 12:12:51 +02:00
|
|
|
# Kubernetes requires cri-runtime, which should be provided only by the -kubic flavour of this package
|
|
|
|
Provides: cri-runtime
|
2018-09-04 10:34:39 +02:00
|
|
|
# No i586 Kubernetes, so docker-kubic must not be built for i586 also
|
|
|
|
ExcludeArch: i586
|
2018-08-20 10:55:46 +02:00
|
|
|
%endif
|
2016-05-18 16:21:48 +02:00
|
|
|
|
2014-07-17 17:31:28 +02:00
|
|
|
%description
|
|
|
|
Docker complements LXC with a high-level API which operates at the process
|
|
|
|
level. It runs unix processes with strong guarantees of isolation and
|
|
|
|
repeatability across servers.
|
|
|
|
|
|
|
|
Docker is a great building block for automating distributed systems: large-scale
|
|
|
|
web deployments, database clusters, continuous deployment systems, private PaaS,
|
|
|
|
service-oriented architectures, etc.
|
|
|
|
|
|
|
|
%package bash-completion
|
|
|
|
Summary: Bash Completion for %{name}
|
|
|
|
Group: System/Management
|
|
|
|
Requires: %{name} = %{version}
|
2018-08-20 10:55:46 +02:00
|
|
|
Supplements: packageand(%{name}:bash-completion)
|
2014-07-17 17:31:28 +02:00
|
|
|
BuildArch: noarch
|
2018-08-20 10:55:46 +02:00
|
|
|
# KUBIC-SPECIFIC: This was required when upgrading from the original kubic
|
|
|
|
# packaging, when everything was renamed to -kubic. It also is
|
|
|
|
# used to ensure that nothing complains too much when using
|
|
|
|
# -kubic packages. Hopfully it can be removed one day.
|
|
|
|
%if "%flavour" == "kubic"
|
|
|
|
# Obsolete old packege without the -kubic suffix
|
|
|
|
Obsoletes: %{realname}-bash-completion = 1.12.6
|
|
|
|
# Conflict with non-kubic package, and provide equivalent
|
|
|
|
Conflicts: %{realname}-bash-completion > 1.12.6
|
|
|
|
Provides: %{realname}-bash-completion = %{version}
|
|
|
|
%endif
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
%description bash-completion
|
|
|
|
Bash command line completion support for %{name}.
|
|
|
|
|
|
|
|
%package zsh-completion
|
|
|
|
Summary: Zsh Completion for %{name}
|
|
|
|
Group: System/Management
|
|
|
|
Requires: %{name} = %{version}
|
2018-08-20 10:55:46 +02:00
|
|
|
Supplements: packageand(%{name}:zsh)
|
2014-07-17 17:31:28 +02:00
|
|
|
BuildArch: noarch
|
2018-08-20 10:55:46 +02:00
|
|
|
# KUBIC-SPECIFIC: This was required when upgrading from the original kubic
|
|
|
|
# packaging, when everything was renamed to -kubic. It also is
|
|
|
|
# used to ensure that nothing complains too much when using
|
|
|
|
# -kubic packages. Hopfully it can be removed one day.
|
|
|
|
%if "%flavour" == "kubic"
|
|
|
|
# Obsolete old packege without the -kubic suffix
|
|
|
|
Obsoletes: %{realname}-zsh-completion = 1.12.6
|
|
|
|
# Conflict with non-kubic package, and provide equivalent
|
|
|
|
Conflicts: %{realname}-zsh-completion > 1.12.6
|
|
|
|
Provides: %{realname}-zsh-completion = %{version}
|
|
|
|
%endif
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
%description zsh-completion
|
|
|
|
Zsh command line completion support for %{name}.
|
|
|
|
|
2015-06-10 10:16:24 +02:00
|
|
|
%package test
|
2016-06-21 12:05:57 +02:00
|
|
|
%global __requires_exclude ^libgo.so.*$
|
2015-06-10 10:16:24 +02:00
|
|
|
Summary: Test package for docker
|
|
|
|
Group: System/Management
|
2015-10-12 22:33:58 +02:00
|
|
|
BuildRequires: fdupes
|
2015-06-10 10:16:24 +02:00
|
|
|
Requires: apparmor-parser
|
|
|
|
Requires: bash-completion
|
2016-06-21 12:05:57 +02:00
|
|
|
Requires: device-mapper-devel >= 1.2.68
|
|
|
|
Requires: glibc-devel-static
|
2015-06-10 10:16:24 +02:00
|
|
|
Requires: libapparmor-devel
|
|
|
|
Requires: libbtrfs-devel >= 3.8
|
|
|
|
Requires: procps
|
|
|
|
Requires: sqlite3-devel
|
2017-10-18 06:27:06 +02:00
|
|
|
Requires: golang(API) = 1.8
|
2018-08-20 10:55:46 +02:00
|
|
|
# KUBIC-SPECIFIC: This was required when upgrading from the original kubic
|
|
|
|
# packaging, when everything was renamed to -kubic. It also is
|
|
|
|
# used to ensure that nothing complains too much when using
|
|
|
|
# -kubic packages. Hopfully it can be removed one day.
|
|
|
|
%if "%flavour" == "kubic"
|
|
|
|
# Obsolete old packege without the -kubic suffix
|
|
|
|
Obsoletes: %{realname}-test = 1.12.6
|
|
|
|
# Conflict with non-kubic package, and provide equivalent
|
|
|
|
Conflicts: %{realname}-test > 1.12.6
|
|
|
|
Provides: %{realname}-test = %{version}
|
|
|
|
%endif
|
2016-01-20 19:58:55 +01:00
|
|
|
|
2015-06-10 10:16:24 +02:00
|
|
|
%description test
|
|
|
|
Test package for docker. It contains the source code and the tests.
|
|
|
|
|
2018-08-21 12:12:51 +02:00
|
|
|
%if "%flavour" == "kubic"
|
|
|
|
%package kubeadm-criconfig
|
|
|
|
Summary: docker container runtime configuration for kubeadm
|
|
|
|
Group: System/Management
|
|
|
|
Requires: kubernetes-kubeadm
|
|
|
|
Requires(post): %fillup_prereq
|
|
|
|
Supplements: docker-kubic
|
|
|
|
Provides: kubernetes-kubeadm-criconfig
|
|
|
|
Conflicts: cri-o-kubeadm-criconfig
|
|
|
|
|
|
|
|
%description kubeadm-criconfig
|
|
|
|
docker container runtime configuration for kubeadm
|
|
|
|
%endif
|
|
|
|
|
2014-07-17 17:31:28 +02:00
|
|
|
%prep
|
2018-08-20 10:55:46 +02:00
|
|
|
%setup -q -n %{realname}-%{version}
|
2016-04-15 12:21:32 +02:00
|
|
|
%if 0%{?is_opensuse}
|
|
|
|
# nothing
|
|
|
|
%else
|
2017-12-19 04:42:51 +01:00
|
|
|
# PATCH-SUSE: Secrets patches.
|
2018-02-13 12:34:28 +01:00
|
|
|
%patch200 -p1
|
|
|
|
%patch201 -p1
|
2016-04-15 12:21:32 +02:00
|
|
|
%endif
|
2018-04-12 16:45:14 +02:00
|
|
|
# bsc#1073877
|
2018-08-15 09:09:12 +02:00
|
|
|
%patch400 -p1
|
2018-06-29 13:09:45 +02:00
|
|
|
# bsc#1099277
|
2018-08-15 09:09:12 +02:00
|
|
|
%patch401 -p1
|
2018-08-24 10:34:36 +02:00
|
|
|
# boo#1047218
|
2018-11-29 16:15:40 +01:00
|
|
|
%patch402 -p1
|
|
|
|
# revert upstream
|
2018-08-24 10:34:36 +02:00
|
|
|
%patch403 -p1
|
2018-08-20 10:55:46 +02:00
|
|
|
%if "%flavour" == "kubic"
|
|
|
|
# PATCH-SUSE: Mirror patch.
|
|
|
|
%patch500 -p1
|
|
|
|
%endif
|
2017-10-18 06:27:06 +02:00
|
|
|
|
2014-08-16 15:38:01 +02:00
|
|
|
cp %{SOURCE7} .
|
2017-10-18 06:27:06 +02:00
|
|
|
cp %{SOURCE9} .
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
%build
|
2018-08-15 09:09:12 +02:00
|
|
|
BUILDTAGS="exclude_graphdriver_aufs apparmor selinux seccomp pkcs11"
|
2017-07-27 18:11:06 +02:00
|
|
|
%if 0%{?sle_version} == 120000
|
2017-12-18 13:28:20 +01:00
|
|
|
# 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"
|
2017-03-05 04:07:44 +01:00
|
|
|
%endif
|
|
|
|
|
2015-06-10 10:16:24 +02:00
|
|
|
(cat <<EOF
|
2014-09-01 16:59:21 +02:00
|
|
|
export AUTO_GOPATH=1
|
2017-03-05 04:07:44 +01:00
|
|
|
export DOCKER_BUILDTAGS="$BUILDTAGS"
|
2017-05-10 16:04:27 +02:00
|
|
|
# Until boo#1038493 is fixed properly we need to do this hack to get the
|
|
|
|
# compiled-into-the-binary GOROOT.
|
|
|
|
export GOROOT="$(GOROOT= go env GOROOT)"
|
2017-08-11 14:09:59 +02:00
|
|
|
# Make sure we always build PIC code. bsc#1048046
|
|
|
|
export BUILDFLAGS="-buildmode=pie"
|
2017-10-24 12:02:17 +02:00
|
|
|
# Specify all of the versioning information. We use SOURCE_DATE_EPOCH if it's
|
|
|
|
# been injected by rpmbuild, otherwise we use the hardcoded git_commit_epoch
|
|
|
|
# generated above. boo#1064781
|
|
|
|
export VERSION="$(cat ./VERSION 2>/dev/null || echo '%{version}')"
|
|
|
|
export DOCKER_GITCOMMIT="%{git_version}"
|
|
|
|
export GITCOMMIT="%{git_version}"
|
|
|
|
export SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-%{git_commit_epoch}}"
|
|
|
|
export BUILDTIME="$(date -u -d "@$SOURCE_DATE_EPOCH" --rfc-3339 ns 2>/dev/null | sed -e 's/ /T/')"
|
2015-06-10 10:16:24 +02:00
|
|
|
EOF
|
|
|
|
) > docker_build_env
|
|
|
|
. ./docker_build_env
|
2016-01-20 19:58:55 +01:00
|
|
|
|
2017-10-18 06:27:06 +02:00
|
|
|
# Preparing GOPATH so that the client is visible to the compiler
|
|
|
|
mkdir -p src/github.com/docker/
|
|
|
|
ln -s $(pwd)/components/cli $(pwd)/src/github.com/docker/cli
|
|
|
|
GOPATH=$GOPATH:$(pwd)
|
2016-01-20 19:58:55 +01:00
|
|
|
|
2017-10-18 06:27:06 +02:00
|
|
|
# DOCKER ENGINE
|
|
|
|
cd components/engine/
|
|
|
|
# ignore the warning that we compile outside a Docker container
|
|
|
|
./hack/make.sh dynbinary
|
2016-08-26 14:49:06 +02:00
|
|
|
# build the tests binary
|
|
|
|
GOPATH=$(pwd)/vendor:$(pwd)/.gopath/ go test \
|
2017-08-11 14:09:59 +02:00
|
|
|
-buildmode=pie \
|
2017-10-18 06:27:06 +02:00
|
|
|
-tags "$DOCKER_BUILDTAGS daemon autogen" \
|
|
|
|
-c github.com/docker/docker/integration-cli -o tests.main
|
|
|
|
cd ../..
|
2016-08-26 14:49:06 +02:00
|
|
|
|
2017-10-18 06:27:06 +02:00
|
|
|
# DOCKER CLIENT
|
|
|
|
cd components/cli
|
|
|
|
./scripts/build/dynbinary
|
2018-04-05 07:48:40 +02:00
|
|
|
|
|
|
|
mkdir -p ./man/man1
|
2018-04-10 11:09:40 +02:00
|
|
|
go build -buildmode=pie -o gen-manpages github.com/docker/cli/man
|
2018-04-05 07:48:40 +02:00
|
|
|
./gen-manpages --root "$(pwd)" --target "$(pwd)/man/man1"
|
2017-10-18 06:27:06 +02:00
|
|
|
./man/md2man-all.sh
|
|
|
|
cd ../..
|
2014-07-17 17:31:28 +02:00
|
|
|
|
2016-08-23 16:44:42 +02:00
|
|
|
%check
|
2018-06-05 13:23:05 +02:00
|
|
|
# We used to run 'go test' here, however we found that this actually didn't
|
|
|
|
# catch any issues that were caught by smoke testing, and %check would
|
|
|
|
# continually cause package builds to fail due to flaky tests. If you ever need
|
|
|
|
# to know how the testing was done, you can always look in the package history.
|
|
|
|
# boo#1095817
|
|
|
|
|
|
|
|
# We verify that all of our -git requires are correct, and match the contents
|
|
|
|
# of the upstream vendoring scripts. This is done on-build to make sure that
|
|
|
|
# someone doing an update didn't miss anything.
|
|
|
|
cd components/engine
|
2018-08-15 09:09:12 +02:00
|
|
|
grep 'RUNC_COMMIT=%{required_dockerrunc}' hack/dockerfile/install/runc.installer
|
|
|
|
grep 'CONTAINERD_COMMIT=%{required_containerd}' hack/dockerfile/install/containerd.installer
|
|
|
|
grep 'LIBNETWORK_COMMIT=%{required_libnetwork}' hack/dockerfile/install/proxy.installer
|
2017-12-19 04:42:51 +01:00
|
|
|
|
2014-07-17 17:31:28 +02:00
|
|
|
%install
|
|
|
|
install -d %{buildroot}%{go_contribdir}
|
|
|
|
install -d %{buildroot}%{_bindir}
|
2017-10-18 06:27:06 +02:00
|
|
|
install -D -m755 components/cli/build/docker %{buildroot}/%{_bindir}/docker
|
|
|
|
install -D -m755 components/engine/bundles/latest/dynbinary-daemon/dockerd %{buildroot}/%{_bindir}/dockerd
|
2017-11-24 11:32:23 +01:00
|
|
|
install -d %{buildroot}/%{_localstatedir}/lib/docker
|
2016-08-23 16:44:42 +02:00
|
|
|
install -Dd -m 0755 \
|
2017-10-18 06:27:06 +02:00
|
|
|
%{buildroot}%{_sysconfdir}/init.d \
|
|
|
|
%{buildroot}%{_sbindir}
|
2014-07-17 17:31:28 +02:00
|
|
|
|
2018-08-20 10:55:46 +02:00
|
|
|
install -D -m0644 components/cli/contrib/completion/bash/docker "%{buildroot}%{_sysconfdir}/bash_completion.d/%{realname}"
|
|
|
|
install -D -m0644 components/cli/contrib/completion/zsh/_docker "%{buildroot}%{_sysconfdir}/zsh_completion.d/%{realname}"
|
2015-06-10 10:16:24 +02:00
|
|
|
# copy all for the test package
|
2016-06-21 12:05:57 +02:00
|
|
|
install -d %{buildroot}%{_prefix}/src/docker/
|
2017-10-18 06:27:06 +02:00
|
|
|
cp -a components/engine/. %{buildroot}%{_prefix}/src/docker/engine
|
|
|
|
cp -a components/cli/. %{buildroot}%{_prefix}/src/docker/cli
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# systemd service
|
|
|
|
#
|
2018-08-20 10:55:46 +02:00
|
|
|
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{realname}.service
|
|
|
|
%if "%flavour" == "kubic"
|
|
|
|
install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{realname}.service.d/90-kubic.conf
|
|
|
|
%endif
|
2016-06-21 12:05:57 +02:00
|
|
|
ln -sf service %{buildroot}%{_sbindir}/rcdocker
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# udev rules that prevents dolphin to show all docker devices and slows down
|
|
|
|
# upstream report https://bugs.kde.org/show_bug.cgi?id=329930
|
|
|
|
#
|
2018-08-20 10:55:46 +02:00
|
|
|
install -D -m 0644 %{SOURCE3} %{buildroot}%{_udevrulesdir}/80-%{realname}.rules
|
2014-07-17 17:31:28 +02:00
|
|
|
|
2015-12-23 11:57:20 +01:00
|
|
|
# audit rules
|
2018-08-20 10:55:46 +02:00
|
|
|
install -D -m 0640 %{SOURCE8} %{buildroot}%{_sysconfdir}/audit/rules.d/%{realname}.rules
|
2015-12-23 11:57:20 +01:00
|
|
|
|
2014-07-17 17:31:28 +02:00
|
|
|
# sysconfig file
|
2017-11-24 11:06:46 +01:00
|
|
|
install -D -m 644 %{SOURCE4} %{buildroot}%{_fillupdir}/sysconfig.docker
|
2014-07-17 17:31:28 +02:00
|
|
|
|
2017-10-18 06:27:06 +02:00
|
|
|
# install manpages (using the ones from the engine)
|
2015-05-27 12:27:27 +02:00
|
|
|
install -d %{buildroot}%{_mandir}/man1
|
2017-10-18 06:27:06 +02:00
|
|
|
install -p -m 644 components/cli/man/man1/*.1 %{buildroot}%{_mandir}/man1
|
2015-05-27 12:27:27 +02:00
|
|
|
install -d %{buildroot}%{_mandir}/man5
|
2017-10-18 06:27:06 +02:00
|
|
|
install -p -m 644 components/cli/man/man5/Dockerfile.5 %{buildroot}%{_mandir}/man5
|
2016-09-14 12:14:05 +02:00
|
|
|
install -d %{buildroot}%{_mandir}/man8
|
2017-10-18 06:27:06 +02:00
|
|
|
install -p -m 644 components/cli/man/man8/*.8 %{buildroot}%{_mandir}/man8
|
2015-05-27 12:27:27 +02:00
|
|
|
|
2018-08-21 12:12:51 +02:00
|
|
|
%if "%flavour" == "kubic"
|
|
|
|
# place kubelet.env in fillupdir (for kubeadm-criconfig)
|
|
|
|
install -D -m 0644 %{SOURCE5} %{buildroot}%{_fillupdir}/sysconfig.kubelet
|
|
|
|
%endif
|
|
|
|
|
2015-07-22 17:00:07 +02:00
|
|
|
%fdupes %{buildroot}
|
|
|
|
|
2014-07-17 17:31:28 +02:00
|
|
|
%pre
|
2016-06-21 12:05:57 +02:00
|
|
|
getent group docker >/dev/null || groupadd -r docker
|
2018-08-20 10:55:46 +02:00
|
|
|
%service_add_pre %{realname}.service
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
%post
|
2018-08-20 10:55:46 +02:00
|
|
|
%service_add_post %{realname}.service
|
2014-07-17 17:31:28 +02:00
|
|
|
%{fillup_only -n docker}
|
|
|
|
|
2018-08-15 09:09:12 +02:00
|
|
|
# NOTE: This is a pretty hacky way of getting around the fact we've removed
|
|
|
|
# containerd.service and now everything is spawned underneath Docker. In
|
|
|
|
# order to force containerd.service to be stopped on the upgrade we need
|
|
|
|
# to trick the systemd macros into thinking that this is an "uninstall".
|
|
|
|
# Hopefully we can remove this soon.
|
|
|
|
(
|
|
|
|
FIRST_ARG=0
|
|
|
|
%service_del_preun containerd.service containerd.socket
|
|
|
|
%service_del_postun containerd.service containerd.socket
|
|
|
|
)
|
|
|
|
|
2018-08-21 12:12:51 +02:00
|
|
|
%if "%flavour" == "kubic"
|
|
|
|
%post kubeadm-criconfig
|
|
|
|
%fillup_only -n kubelet
|
|
|
|
%endif
|
|
|
|
|
2014-07-17 17:31:28 +02:00
|
|
|
%preun
|
2018-08-20 10:55:46 +02:00
|
|
|
%service_del_preun %{realname}.service
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
%postun
|
2018-08-20 10:55:46 +02:00
|
|
|
%service_del_postun %{realname}.service
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2018-06-13 13:40:04 +02:00
|
|
|
%doc components/engine/README.md README_SUSE.md CHANGELOG.md
|
|
|
|
%license components/engine/LICENSE
|
2014-07-17 17:31:28 +02:00
|
|
|
%{_bindir}/docker
|
2016-08-23 16:44:42 +02:00
|
|
|
%{_bindir}/dockerd
|
2014-12-03 22:48:32 +01:00
|
|
|
%{_sbindir}/rcdocker
|
2018-08-20 10:55:46 +02:00
|
|
|
%{_unitdir}/%{realname}.service
|
|
|
|
%if "%flavour" == "kubic"
|
|
|
|
%dir %{_unitdir}/%{realname}.service.d/
|
|
|
|
%{_unitdir}/%{realname}.service.d/90-kubic.conf
|
|
|
|
%endif
|
|
|
|
%config %{_sysconfdir}/audit/rules.d/%{realname}.rules
|
|
|
|
%{_udevrulesdir}/80-%{realname}.rules
|
2017-11-24 11:06:46 +01:00
|
|
|
%{_fillupdir}/sysconfig.docker
|
2017-11-24 11:32:23 +01:00
|
|
|
%dir %{_localstatedir}/lib/docker/
|
2016-06-21 12:05:57 +02:00
|
|
|
%{_mandir}/man1/docker-*.1%{ext_man}
|
|
|
|
%{_mandir}/man1/docker.1%{ext_man}
|
|
|
|
%{_mandir}/man5/Dockerfile.5%{ext_man}
|
2016-09-14 12:14:05 +02:00
|
|
|
%{_mandir}/man8/dockerd.8%{ext_man}
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
%files bash-completion
|
|
|
|
%defattr(-,root,root)
|
2018-08-20 10:55:46 +02:00
|
|
|
%config %{_sysconfdir}/bash_completion.d/%{realname}
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
%files zsh-completion
|
|
|
|
%defattr(-,root,root)
|
2018-08-20 10:55:46 +02:00
|
|
|
%config %{_sysconfdir}/zsh_completion.d/%{realname}
|
2014-07-17 17:31:28 +02:00
|
|
|
|
2015-06-10 10:16:24 +02:00
|
|
|
%files test
|
|
|
|
%defattr(-,root,root)
|
2016-06-21 12:05:57 +02:00
|
|
|
%{_prefix}/src/docker/
|
2015-07-10 13:27:13 +02:00
|
|
|
# exclude binaries
|
2017-10-18 06:27:06 +02:00
|
|
|
%exclude %{_prefix}/src/docker/engine/bundles/
|
|
|
|
%exclude %{_prefix}/src/docker/cli/build/
|
2015-07-10 13:27:13 +02:00
|
|
|
# exclude init configurations other than systemd
|
2017-10-18 06:27:06 +02:00
|
|
|
%exclude %{_prefix}/src/docker/engine/contrib/init/openrc
|
|
|
|
%exclude %{_prefix}/src/docker/engine/contrib/init/sysvinit-debian
|
|
|
|
%exclude %{_prefix}/src/docker/engine/contrib/init/sysvinit-redhat
|
|
|
|
%exclude %{_prefix}/src/docker/engine/contrib/init/upstart
|
2015-06-10 10:16:24 +02:00
|
|
|
|
2018-08-21 12:12:51 +02:00
|
|
|
%if "%flavour" == "kubic"
|
|
|
|
%files kubeadm-criconfig
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_fillupdir}/sysconfig.kubelet
|
|
|
|
%endif
|
|
|
|
|
2014-07-17 17:31:28 +02:00
|
|
|
%changelog
|