[packages/docker] use upstream systemd files
glen
glen at pld-linux.org
Mon Aug 29 23:17:01 CEST 2016
commit b6f967da7e93659da8f698d451767d0f344e81f1
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Aug 30 00:08:43 2016 +0300
use upstream systemd files
note: https://github.com/docker/docker/pull/24804 does not apply to pld
as docker.service is registered at startup (enabled by default)
docker.service | 19 -------------------
docker.socket | 12 ------------
docker.spec | 14 +++++---------
3 files changed, 5 insertions(+), 40 deletions(-)
---
diff --git a/docker.spec b/docker.spec
index 6875505..9a6eb55 100644
--- a/docker.spec
+++ b/docker.spec
@@ -1,7 +1,4 @@
#
-# TODO
-# - check if need to drop socket activation in pld as well: https://github.com/docker/docker/pull/24804
-#
# Conditional build:
%bcond_with tests # build without tests
%bcond_with vim # build vim syntax package (bundled in vim 7.4.979-2)
@@ -18,7 +15,7 @@
Summary: Docker: the open-source application container engine
Name: docker
Version: 1.12.1
-Release: 0.2
+Release: 1
License: Apache v2.0
Group: Applications/System
# https://github.com/docker/docker/releases
@@ -29,10 +26,9 @@ Source1: https://github.com/opencontainers/runc/archive/%{runc_commit}/runc-%{ru
Source2: https://github.com/docker/containerd/archive/%{containerd_commit}/containerd-%{containerd_commit}.tar.gz
# Source2-md5: f0a0c1101ad259b84fb457c8c7036723
Source4: %{name}.sh
-Source5: %{name}.service
-Source6: %{name}.socket
Source7: %{name}.init
Source8: %{name}.sysconfig
+Patch0: systemd.patch
URL: http://www.docker.com/
BuildRequires: btrfs-progs-devel >= 3.16.1
BuildRequires: device-mapper-devel >= 2.02.89
@@ -134,9 +130,9 @@ This plugin provides syntax highlighting in Dockerfile.
%prep
%setup -q %{?subver:-n %{name}-%{version}%{subver}} -a1 -a2
-
mv runc-%{runc_commit}* runc
mv containerd-%{containerd_commit}* containerd
+%patch0 -p1
install -d vendor/src/github.com/docker
ln -s $(pwd) vendor/src/github.com/docker/docker
@@ -180,8 +176,8 @@ install -p containerd/bin/containerd $RPM_BUILD_ROOT%{_sbindir}/docker-container
install -p containerd/bin/containerd-shim $RPM_BUILD_ROOT%{_sbindir}/docker-containerd-shim
install -p containerd/bin/ctr $RPM_BUILD_ROOT%{_sbindir}/docker-containerd-ctr
-cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}
-cp -p %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}
+cp -p contrib/init/systemd/docker.service $RPM_BUILD_ROOT%{systemdunitdir}
+cp -p contrib/init/systemd/docker.socket $RPM_BUILD_ROOT%{systemdunitdir}
install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/docker
install -p %{SOURCE4} $RPM_BUILD_ROOT%{_libexecdir}/docker
cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/docker
diff --git a/docker.service b/docker.service
deleted file mode 100644
index db6bf1f..0000000
--- a/docker.service
+++ /dev/null
@@ -1,19 +0,0 @@
-[Unit]
-Description=Docker Application Container Engine
-Documentation=https://docs.docker.com
-After=network.target docker.socket
-Requires=docker.socket
-
-[Service]
-Type=notify
-ExecStart=/usr/sbin/dockerd -H fd://
-ExecReload=/bin/kill -s HUP $MAINPID
-LimitNOFILE=infinity
-LimitNPROC=infinity
-LimitCORE=infinity
-TimeoutStartSec=0
-Delegate=yes
-KillMode=process
-
-[Install]
-WantedBy=multi-user.target
diff --git a/docker.socket b/docker.socket
deleted file mode 100644
index 7dd9509..0000000
--- a/docker.socket
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Docker Socket for the API
-PartOf=docker.service
-
-[Socket]
-ListenStream=/var/run/docker.sock
-SocketMode=0660
-SocketUser=root
-SocketGroup=docker
-
-[Install]
-WantedBy=sockets.target
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/docker.git/commitdiff/b6f967da7e93659da8f698d451767d0f344e81f1
More information about the pld-cvs-commit
mailing list