Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 133699c

Browse files
authored
[19.03 backport] Sync RPM Spec with downstream EE packaging (#348)
[19.03 backport] Sync RPM Spec with downstream EE packaging Upstream-commit: 7d50c4bb06e3e035f7277c971b358dd9503d3a52 Component: packaging
2 parents 24510f2 + 47b5cbe commit 133699c

1 file changed

Lines changed: 6 additions & 31 deletions

File tree

components/packaging/rpm/SPECS/docker-ce.spec

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Packager: Docker <support@docker.com>
1818
Requires: docker-ce-cli
1919
Requires: container-selinux >= 2:2.74
2020
Requires: libseccomp >= 2.3
21-
Requires: systemd-units
21+
Requires: systemd
2222
Requires: iptables
2323
Requires: libcgroup
2424
Requires: containerd.io >= 1.2.2-3
@@ -60,7 +60,7 @@ Obsoletes: docker-engine-selinux
6060
Obsoletes: docker-engine
6161

6262
%description
63-
Docker is is a product for you to build, ship and run any application as a
63+
Docker is a product for you to build, ship and run any application as a
6464
lightweight container.
6565

6666
Docker containers are both hardware-agnostic and platform-agnostic. This means
@@ -74,6 +74,7 @@ depending on a particular stack or provider.
7474
%setup -q -c -n src -a 0
7575

7676
%build
77+
7778
export DOCKER_GITCOMMIT=%{_gitcommit}
7879
mkdir -p /go/src/github.com/docker
7980
ln -s /root/rpmbuild/BUILD/src/engine /go/src/github.com/docker/docker
@@ -113,42 +114,16 @@ install -D -m 0644 %{_topdir}/SOURCES/distribution_based_engine.json $RPM_BUILD_
113114
/%{_unitdir}/docker.socket
114115
/var/lib/docker-engine/distribution_based_engine-ce.json
115116

116-
%pre
117-
if [ $1 -gt 0 ] ; then
118-
# package upgrade scenario, before new files are installed
119-
120-
# clear any old state
121-
rm -f %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || :
122-
123-
# check if docker service is running
124-
if systemctl is-active docker > /dev/null 2>&1; then
125-
systemctl stop docker > /dev/null 2>&1 || :
126-
touch %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || :
127-
fi
128-
fi
129-
130117
%post
131-
%systemd_post docker
118+
%systemd_post docker.service
132119
if ! getent group docker > /dev/null; then
133120
groupadd --system docker
134121
fi
135122

136-
137123
%preun
138-
%systemd_preun docker
124+
%systemd_preun docker.service
139125

140126
%postun
141-
%systemd_postun_with_restart docker
142-
143-
%posttrans
144-
if [ $1 -ge 0 ] ; then
145-
# package upgrade scenario, after new files are installed
146-
147-
# check if docker was running before upgrade
148-
if [ -f %{_localstatedir}/lib/rpm-state/docker-is-active ]; then
149-
systemctl start docker > /dev/null 2>&1 || :
150-
rm -f %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || :
151-
fi
152-
fi
127+
%systemd_postun_with_restart docker.service
153128

154129
%changelog

0 commit comments

Comments
 (0)