@@ -18,7 +18,7 @@ Packager: Docker <support@docker.com>
1818Requires: docker-ce-cli
1919Requires: container-selinux >= 2:2.74
2020Requires: libseccomp >= 2.3
21- Requires: systemd-units
21+ Requires: systemd
2222Requires: iptables
2323Requires: libcgroup
2424Requires: containerd.io >= 1.2.2-3
@@ -60,7 +60,7 @@ Obsoletes: docker-engine-selinux
6060Obsoletes: 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
6464lightweight container.
6565
6666Docker 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+
7778export DOCKER_GITCOMMIT = %{_gitcommit }
7879mkdir -p /go/src/github.com/docker
7980ln -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
132119if ! getent group docker > /dev/null; then
133120 groupadd --system docker
134121fi
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