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
|
|
|
#
|
2023-04-26 08:31:24 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
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-12-20 12:23:52 +01: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
|
|
|
|
|
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'
|
2023-06-15 22:02:17 +02:00
|
|
|
%define real_version 24.0.2
|
|
|
|
%define git_version 659604f9ee60
|
|
|
|
%define git_commit_epoch 1685049742
|
2021-02-02 23:19:52 +01:00
|
|
|
|
2023-04-26 08:31:24 +02:00
|
|
|
Name: docker
|
2022-12-06 14:40:50 +01:00
|
|
|
Version: %{real_version}_ce
|
2021-03-03 04:05:29 +01:00
|
|
|
# This "nice version" is so that docker --version gives a result that can be
|
|
|
|
# parsed by other people. boo#1182476
|
2022-12-06 14:40:50 +01:00
|
|
|
%define nice_version %{real_version}-ce
|
2014-07-17 17:31:28 +02:00
|
|
|
Release: 0
|
2019-05-03 18:22:55 +02:00
|
|
|
Summary: The Moby-project Linux container runtime
|
2014-07-17 17:31:28 +02:00
|
|
|
License: Apache-2.0
|
|
|
|
Group: System/Management
|
2019-11-18 05:55:57 +01:00
|
|
|
URL: http://www.docker.io
|
2023-04-26 08:31:24 +02:00
|
|
|
Source: %{name}-%{version}_%{git_version}.tar.xz
|
|
|
|
Source1: %{name}-cli-%{version}.tar.xz
|
2021-02-02 23:19:52 +01:00
|
|
|
Source3: docker-rpmlintrc
|
2021-01-30 02:14:10 +01:00
|
|
|
# TODO: Move these source files to somewhere nicer.
|
|
|
|
Source100: docker.service
|
|
|
|
Source101: 80-docker.rules
|
|
|
|
Source102: sysconfig.docker
|
|
|
|
Source103: README_SUSE.md
|
|
|
|
Source104: docker-audit.rules
|
2021-02-02 23:19:52 +01:00
|
|
|
Source105: docker-daemon.json
|
2022-10-13 09:09:51 +02:00
|
|
|
Source106: docker.sysusers
|
2021-01-30 02:14:10 +01:00
|
|
|
# NOTE: All of these patches are maintained in <https://github.com/suse/docker>
|
2023-05-22 08:23:47 +02:00
|
|
|
# in the suse-v<version> branch. Make sure you update the patches in that
|
2021-01-30 02:14:10 +01:00
|
|
|
# branch and then git-format-patch the patch here.
|
2016-10-11 12:30:52 +02:00
|
|
|
# SUSE-FEATURE: Adds the /run/secrets mountpoint inside all Docker containers
|
2021-02-01 03:36:37 +01:00
|
|
|
# which is not snapshotted when images are committed.
|
2021-02-02 23:19:52 +01:00
|
|
|
Patch100: 0001-SECRETS-daemon-allow-directory-creation-in-run-secre.patch
|
|
|
|
Patch101: 0002-SECRETS-SUSE-implement-SUSE-container-secrets.patch
|
2023-05-22 08:23:47 +02:00
|
|
|
# UPSTREAM: Revert of upstream patch to keep SLE-12 build working.
|
|
|
|
Patch200: 0003-BUILD-SLE12-revert-graphdriver-btrfs-use-kernel-UAPI.patch
|
|
|
|
# UPSTREAM: Backport of <https://github.com/moby/moby/pull/41954>.
|
|
|
|
Patch300: 0004-bsc1073877-apparmor-clobber-docker-default-profile-o.patch
|
2023-04-26 08:31:24 +02:00
|
|
|
# UPSTREAM: Backport of <https://github.com/docker/cli/pull/4228>.
|
|
|
|
Patch900: cli-0001-docs-include-required-tools-in-source-tree.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
|
2019-03-11 01:44:36 +01:00
|
|
|
BuildRequires: fdupes
|
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
|
2023-05-22 08:23:47 +02:00
|
|
|
BuildRequires: linux-glibc-devel
|
2014-07-17 17:31:28 +02:00
|
|
|
BuildRequires: procps
|
|
|
|
BuildRequires: sqlite3-devel
|
|
|
|
BuildRequires: zsh
|
2020-12-17 01:50:20 +01:00
|
|
|
BuildRequires: fish
|
2021-02-02 23:19:52 +01:00
|
|
|
BuildRequires: go-go-md2man
|
2020-06-03 13:37:56 +02:00
|
|
|
BuildRequires: pkgconfig(libsystemd)
|
2022-10-13 09:09:51 +02:00
|
|
|
BuildRequires: sysuser-tools
|
2023-04-26 08:31:24 +02:00
|
|
|
BuildRequires: golang(API) = 1.19
|
2023-05-22 08:23:47 +02:00
|
|
|
%if 0%{?sle_version} >= 150000
|
|
|
|
# This conditional only works on rpm>=4.13, which SLE 12 doesn't have. But we
|
|
|
|
# don't need to support Docker+selinux for SLE 12 anyway.
|
2022-09-29 09:47:00 +02:00
|
|
|
Requires: (apparmor-parser or container-selinux)
|
2023-05-22 08:23:47 +02:00
|
|
|
# This recommends is added to make sure that even if you have container-selinux
|
|
|
|
# installed you will still be prompted to install apparmor-parser which Docker
|
|
|
|
# requires to apply AppArmor profiles (for SELinux systems this doesn't matter
|
|
|
|
# but if you switch back to AppArmor on reboot this would result in insecure
|
|
|
|
# containers).
|
|
|
|
Recommends: apparmor-parser
|
|
|
|
%else
|
|
|
|
Requires: apparmor-parser
|
|
|
|
%endif
|
2014-07-17 17:31:28 +02:00
|
|
|
Requires: ca-certificates-mozilla
|
2021-02-02 23:19:52 +01:00
|
|
|
# The docker-proxy binary used to be in a separate package. We obsolete it,
|
|
|
|
# since now docker-proxy is maintained as part of this package.
|
2023-04-26 08:31:24 +02:00
|
|
|
Obsoletes: docker-libnetwork < 0.7.0.2
|
|
|
|
Provides: docker-libnetwork = 0.7.0.2.%{version}
|
2021-02-02 23:19:52 +01:00
|
|
|
# Required to actually run containers. We require the minimum version that is
|
|
|
|
# pinned by Docker, but in order to avoid headaches we allow for updates.
|
2023-05-22 08:23:47 +02:00
|
|
|
Requires: runc >= 1.1.7
|
|
|
|
Requires: containerd >= 1.6.21
|
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
|
2022-10-13 09:09:51 +02:00
|
|
|
%sysusers_requires
|
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
|
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
|
2023-06-15 22:02:17 +02:00
|
|
|
# Required for "docker buildx" support.
|
2023-06-29 14:27:54 +02:00
|
|
|
Recommends: %{name}-buildx
|
|
|
|
Recommends: %{name}-rootless-extras
|
2017-12-19 04:42:51 +01:00
|
|
|
ExcludeArch: s390 ppc
|
2021-02-02 23:19:52 +01: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.
|
|
|
|
|
2023-06-21 03:08:39 +02:00
|
|
|
%package rootless-extras
|
|
|
|
Summary: Rootless support for Docker
|
|
|
|
Group: System/Management
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: slirp4netns >= 0.4
|
|
|
|
Requires: fuse-overlayfs >= 0.7
|
|
|
|
Requires: rootlesskit
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description rootless-extras
|
|
|
|
Rootless support for Docker.
|
|
|
|
Use dockerd-rootless.sh to run the daemon.
|
|
|
|
Use dockerd-rootless-setuptool.sh to setup systemd for dockerd-rootless.sh.
|
|
|
|
|
2014-07-17 17:31:28 +02:00
|
|
|
%package bash-completion
|
|
|
|
Summary: Bash Completion for %{name}
|
2019-02-09 14:55:16 +01:00
|
|
|
Group: System/Shells
|
2014-07-17 17:31:28 +02:00
|
|
|
Requires: %{name} = %{version}
|
2021-09-21 03:11:27 +02:00
|
|
|
Requires: bash-completion
|
2018-08-20 10:55:46 +02:00
|
|
|
Supplements: packageand(%{name}:bash-completion)
|
2014-07-17 17:31:28 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description bash-completion
|
|
|
|
Bash command line completion support for %{name}.
|
|
|
|
|
|
|
|
%package zsh-completion
|
|
|
|
Summary: Zsh Completion for %{name}
|
2019-02-09 14:55:16 +01:00
|
|
|
Group: System/Shells
|
2014-07-17 17:31:28 +02:00
|
|
|
Requires: %{name} = %{version}
|
2021-09-21 03:11:27 +02:00
|
|
|
Requires: zsh
|
2018-08-20 10:55:46 +02:00
|
|
|
Supplements: packageand(%{name}:zsh)
|
2014-07-17 17:31:28 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description zsh-completion
|
|
|
|
Zsh command line completion support for %{name}.
|
|
|
|
|
2020-12-17 01:50:20 +01:00
|
|
|
%package fish-completion
|
|
|
|
Summary: Fish completion for %{name}
|
|
|
|
Group: System/Shells
|
|
|
|
Requires: %{name} = %{version}
|
2021-09-21 03:11:27 +02:00
|
|
|
Requires: fish
|
2020-12-17 01:50:20 +01:00
|
|
|
Supplements: packageand(%{name}:fish)
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description fish-completion
|
|
|
|
Fish command line completion support for %{name}.
|
|
|
|
|
2014-07-17 17:31:28 +02:00
|
|
|
%prep
|
2023-04-26 08:31:24 +02:00
|
|
|
# docker-cli
|
|
|
|
%define cli_builddir %{_builddir}/%{name}-cli-%{version}
|
|
|
|
%setup -q -T -b 1 -n %{name}-cli-%{version}
|
|
|
|
[ "%{cli_builddir}" = "$PWD" ]
|
|
|
|
# offline manpages
|
|
|
|
%patch900 -p1
|
|
|
|
|
|
|
|
# docker
|
|
|
|
%define docker_builddir %{_builddir}/%{name}-%{version}_%{git_version}
|
|
|
|
%setup -q -n %{name}-%{version}_%{git_version}
|
|
|
|
[ "%{docker_builddir}" = "$PWD" ]
|
|
|
|
# README_SUSE.md for documentation.
|
|
|
|
cp %{SOURCE103} .
|
2021-01-30 02:14:10 +01:00
|
|
|
|
2023-04-26 08:31:24 +02:00
|
|
|
%if 0%{?is_opensuse} == 0
|
2017-12-19 04:42:51 +01:00
|
|
|
# PATCH-SUSE: Secrets patches.
|
2021-01-30 02:14:10 +01:00
|
|
|
%patch100 -p1
|
|
|
|
%patch101 -p1
|
2016-04-15 12:21:32 +02:00
|
|
|
%endif
|
2023-05-22 08:23:47 +02:00
|
|
|
%if 0%{?sle_version} == 120000
|
|
|
|
# Patches to build on SLE-12.
|
|
|
|
%patch200 -p1
|
|
|
|
%endif
|
2021-01-30 02:14:10 +01:00
|
|
|
# bsc#1099277
|
2021-02-02 23:19:52 +01:00
|
|
|
%patch300 -p1
|
2019-03-10 22:59:21 +01:00
|
|
|
|
2014-07-17 17:31:28 +02:00
|
|
|
%build
|
2022-10-13 09:09:51 +02:00
|
|
|
%sysusers_generate_pre %{SOURCE106} %{name} %{name}.conf
|
2021-02-02 23:19:52 +01:00
|
|
|
|
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
|
2021-01-30 02:14:10 +01:00
|
|
|
# Allow us to build with older distros but still have deferred removal
|
|
|
|
# support at runtime. We only use this when building on SLE12, because
|
|
|
|
# later openSUSE/SLE versions have a new enough libdevicemapper to not
|
|
|
|
# require the runtime checking.
|
2017-12-18 13:28:20 +01:00
|
|
|
BUILDTAGS="libdm_dlsym_deferred_remove $BUILDTAGS"
|
2017-03-05 04:07:44 +01:00
|
|
|
%endif
|
|
|
|
|
2014-09-01 16:59:21 +02:00
|
|
|
export AUTO_GOPATH=1
|
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
|
2021-03-03 04:05:29 +01:00
|
|
|
export VERSION="%{nice_version}"
|
2017-10-24 12:02:17 +02:00
|
|
|
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/')"
|
2016-01-20 19:58:55 +01:00
|
|
|
|
2019-03-10 22:20:43 +01:00
|
|
|
###################
|
|
|
|
## DOCKER ENGINE ##
|
|
|
|
###################
|
|
|
|
|
2023-04-26 08:31:24 +02:00
|
|
|
pushd "%{docker_builddir}"
|
|
|
|
# use go module for build
|
|
|
|
ln -s {vendor,go}.mod
|
|
|
|
ln -s {vendor,go}.sum
|
2017-10-18 06:27:06 +02:00
|
|
|
./hack/make.sh dynbinary
|
2023-04-26 08:31:24 +02:00
|
|
|
popd
|
2019-03-10 22:20:43 +01:00
|
|
|
|
|
|
|
###################
|
|
|
|
## DOCKER CLIENT ##
|
|
|
|
###################
|
|
|
|
|
2023-04-26 08:31:24 +02:00
|
|
|
pushd "%{cli_builddir}"
|
|
|
|
# use go module for build
|
|
|
|
ln -s {vendor,go}.mod
|
|
|
|
ln -s {vendor,go}.sum
|
|
|
|
make DISABLE_WARN_OUTSIDE_CONTAINER=1 dynbinary manpages
|
2018-12-18 11:34:21 +01:00
|
|
|
popd
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
%install
|
2021-02-02 23:19:52 +01:00
|
|
|
install -Dd -m0755 \
|
2017-10-18 06:27:06 +02:00
|
|
|
%{buildroot}%{_sysconfdir}/init.d \
|
2021-02-02 23:19:52 +01:00
|
|
|
%{buildroot}%{_bindir} \
|
2017-10-18 06:27:06 +02:00
|
|
|
%{buildroot}%{_sbindir}
|
2014-07-17 17:31:28 +02:00
|
|
|
|
2021-02-02 23:19:52 +01:00
|
|
|
# docker daemon
|
2023-04-26 08:31:24 +02:00
|
|
|
install -D -m0755 %{docker_builddir}/bundles/dynbinary-daemon/dockerd %{buildroot}/%{_bindir}/dockerd
|
|
|
|
# docker proxy
|
|
|
|
install -D -m0755 %{docker_builddir}/bundles/dynbinary-daemon/docker-proxy %{buildroot}/%{_bindir}/docker-proxy
|
|
|
|
|
2023-06-15 22:02:17 +02:00
|
|
|
# cli-plugins/
|
|
|
|
install -d %{buildroot}/usr/lib/docker/cli-plugins
|
|
|
|
|
2023-04-26 08:31:24 +02:00
|
|
|
# /var/lib/docker
|
2021-02-02 23:19:52 +01:00
|
|
|
install -d %{buildroot}/%{_localstatedir}/lib/docker
|
|
|
|
# daemon.json config file
|
|
|
|
install -D -m0644 %{SOURCE105} %{buildroot}%{_sysconfdir}/docker/daemon.json
|
|
|
|
|
|
|
|
# docker cli
|
|
|
|
install -D -m0755 %{cli_builddir}/build/docker %{buildroot}/%{_bindir}/docker
|
2023-04-26 08:31:24 +02:00
|
|
|
install -D -m0644 %{cli_builddir}/contrib/completion/bash/docker "%{buildroot}%{_datarootdir}/bash-completion/completions/%{name}"
|
|
|
|
install -D -m0644 %{cli_builddir}/contrib/completion/zsh/_docker "%{buildroot}%{_sysconfdir}/zsh_completion.d/_%{name}"
|
|
|
|
install -D -m0644 %{cli_builddir}/contrib/completion/fish/docker.fish "%{buildroot}/%{_datadir}/fish/vendor_completions.d/%{name}.fish"
|
2019-03-10 22:20:43 +01:00
|
|
|
|
2014-07-17 17:31:28 +02:00
|
|
|
# systemd service
|
2023-04-26 08:31:24 +02:00
|
|
|
install -D -m0644 %{SOURCE100} %{buildroot}%{_unitdir}/%{name}.service
|
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
|
2023-04-26 08:31:24 +02:00
|
|
|
install -D -m0644 %{SOURCE101} %{buildroot}%{_udevrulesdir}/80-%{name}.rules
|
2014-07-17 17:31:28 +02:00
|
|
|
|
2015-12-23 11:57:20 +01:00
|
|
|
# audit rules
|
2023-04-26 08:31:24 +02:00
|
|
|
install -D -m0640 %{SOURCE104} %{buildroot}%{_sysconfdir}/audit/rules.d/%{name}.rules
|
2015-12-23 11:57:20 +01:00
|
|
|
|
2014-07-17 17:31:28 +02:00
|
|
|
# sysconfig file
|
2021-02-02 23:19:52 +01:00
|
|
|
install -D -m0644 %{SOURCE102} %{buildroot}%{_fillupdir}/sysconfig.docker
|
2019-02-07 10:04:01 +01: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
|
2021-02-02 23:19:52 +01:00
|
|
|
install -p -m0644 %{cli_builddir}/man/man1/*.1 %{buildroot}%{_mandir}/man1
|
2015-05-27 12:27:27 +02:00
|
|
|
install -d %{buildroot}%{_mandir}/man5
|
2021-02-02 23:19:52 +01:00
|
|
|
install -p -m0644 %{cli_builddir}/man/man5/Dockerfile.5 %{buildroot}%{_mandir}/man5
|
2016-09-14 12:14:05 +02:00
|
|
|
install -d %{buildroot}%{_mandir}/man8
|
2021-02-02 23:19:52 +01:00
|
|
|
install -p -m0644 %{cli_builddir}/man/man8/*.8 %{buildroot}%{_mandir}/man8
|
2019-03-12 08:51:12 +01:00
|
|
|
|
2022-10-13 09:09:51 +02:00
|
|
|
# sysusers.d
|
|
|
|
install -D -m0644 %{SOURCE106} %{buildroot}%{_sysusersdir}/%{name}.conf
|
|
|
|
|
2023-06-21 03:08:39 +02:00
|
|
|
# rootless extras
|
|
|
|
install -D -p -m 0755 contrib/dockerd-rootless.sh %{buildroot}/%{_bindir}/dockerd-rootless.sh
|
|
|
|
install -D -p -m 0755 contrib/dockerd-rootless-setuptool.sh %{buildroot}/%{_bindir}/dockerd-rootless-setuptool.sh
|
|
|
|
|
2015-07-22 17:00:07 +02:00
|
|
|
%fdupes %{buildroot}
|
|
|
|
|
2022-10-13 09:09:51 +02:00
|
|
|
%pre -f %{name}.pre
|
2019-12-12 01:16:15 +01:00
|
|
|
# /etc/sub[ug]id should exist already (it's part of shadow-utils), but older
|
|
|
|
# distros don't have it. Docker just parses it and doesn't need any special
|
|
|
|
# shadow-utils helpers.
|
|
|
|
touch /etc/subuid /etc/subgid ||:
|
|
|
|
|
2019-07-30 07:44:55 +02:00
|
|
|
# "useradd -r" doesn't add sub[ug]ids so we manually add some. Hopefully there
|
|
|
|
# aren't any conflicts here, because usermod doesn't provide the same "get
|
|
|
|
# unusued range" feature that dockremap does.
|
2019-12-12 01:16:15 +01:00
|
|
|
grep -q '^dockremap:' /etc/subuid || \
|
|
|
|
usermod -v 100000000-200000000 dockremap &>/dev/null || \
|
|
|
|
echo "dockremap:100000000:100000001" >>/etc/subuid ||:
|
|
|
|
grep -q '^dockremap:' /etc/subgid || \
|
|
|
|
usermod -w 100000000-200000000 dockremap &>/dev/null || \
|
|
|
|
echo "dockremap:100000000:100000001" >>/etc/subgid ||:
|
2019-07-30 07:44:55 +02:00
|
|
|
|
2023-04-26 08:31:24 +02:00
|
|
|
%service_add_pre %{name}.service
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
%post
|
2023-04-26 08:31:24 +02:00
|
|
|
%service_add_post %{name}.service
|
2014-07-17 17:31:28 +02:00
|
|
|
%{fillup_only -n docker}
|
|
|
|
|
|
|
|
%preun
|
2023-04-26 08:31:24 +02:00
|
|
|
%service_del_preun %{name}.service
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
%postun
|
2023-04-26 08:31:24 +02:00
|
|
|
%service_del_postun %{name}.service
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2022-01-21 06:32:10 +01:00
|
|
|
%doc README.md README_SUSE.md
|
2021-01-30 02:14:10 +01:00
|
|
|
%license LICENSE
|
2014-07-17 17:31:28 +02:00
|
|
|
%{_bindir}/docker
|
2016-08-23 16:44:42 +02:00
|
|
|
%{_bindir}/dockerd
|
2021-02-02 23:19:52 +01:00
|
|
|
%{_bindir}/docker-proxy
|
2014-12-03 22:48:32 +01:00
|
|
|
%{_sbindir}/rcdocker
|
2019-06-27 09:16:12 +02:00
|
|
|
%dir %{_localstatedir}/lib/docker/
|
|
|
|
|
2023-06-15 22:02:17 +02:00
|
|
|
%dir /usr/lib/docker
|
|
|
|
%dir /usr/lib/docker/cli-plugins
|
|
|
|
|
2023-04-26 08:31:24 +02:00
|
|
|
%{_unitdir}/%{name}.service
|
2022-10-13 09:09:51 +02:00
|
|
|
%{_sysusersdir}/%{name}.conf
|
2019-06-27 09:16:12 +02:00
|
|
|
|
2019-02-26 13:18:18 +01:00
|
|
|
%dir %{_sysconfdir}/docker
|
2019-06-27 09:16:12 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/docker/daemon.json
|
|
|
|
%{_fillupdir}/sysconfig.docker
|
|
|
|
|
2023-04-26 08:31:24 +02:00
|
|
|
%config %{_sysconfdir}/audit/rules.d/%{name}.rules
|
|
|
|
%{_udevrulesdir}/80-%{name}.rules
|
2019-06-27 09:16:12 +02:00
|
|
|
|
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)
|
2023-04-26 08:31:24 +02:00
|
|
|
%{_datarootdir}/bash-completion/completions/%{name}
|
2014-07-17 17:31:28 +02:00
|
|
|
|
|
|
|
%files zsh-completion
|
|
|
|
%defattr(-,root,root)
|
2023-04-26 08:31:24 +02:00
|
|
|
%{_sysconfdir}/zsh_completion.d/_%{name}
|
2014-07-17 17:31:28 +02:00
|
|
|
|
2020-12-17 01:50:20 +01:00
|
|
|
%files fish-completion
|
|
|
|
%defattr(-,root,root)
|
2023-04-26 08:31:24 +02:00
|
|
|
%{_datadir}/fish/vendor_completions.d/%{name}.fish
|
2020-12-17 01:50:20 +01:00
|
|
|
|
2023-06-21 03:08:39 +02:00
|
|
|
%files rootless-extras
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/dockerd-rootless.sh
|
|
|
|
%{_bindir}/dockerd-rootless-setuptool.sh
|
|
|
|
|
2014-07-17 17:31:28 +02:00
|
|
|
%changelog
|