[docker-io] added sysvinit files, removed xinetd file
by Lokesh Mandvekar
commit e3ff9ac68dec47ccb928318eebf3976c6c97172b
Author: Lokesh Mandvekar <lsm5(a)redhat.com>
Date: Sat Nov 23 12:04:08 2013 -0600
added sysvinit files, removed xinetd file
Signed-off-by: Lokesh Mandvekar <lsm5(a)redhat.com>
.gitignore | 1 +
docker-io.spec | 41 ++++++++++++------
docker.sysconfig | 1 +
docker.sysvinit | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
docker.xinetd | 11 -----
sources | 2 +-
6 files changed, 151 insertions(+), 26 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2ae1e40..e646e94 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
/docker-1fe08e0.tar.gz
/docker-268e386.tar.gz
/docker-9af7730.tar.gz
+/docker-ea7811c.tar.gz
diff --git a/docker-io.spec b/docker-io.spec
index d04df3e..7425278 100644
--- a/docker-io.spec
+++ b/docker-io.spec
@@ -6,12 +6,12 @@
%global debug_package %{nil}
%global gopath %{_datadir}/gocode
-%global commit 9af77302f476c3cef11bd4a1efe6b46f98abe781
+%global commit ea7811c83d913db91948cd4f696cf34b139da855
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: docker-io
Version: 0.7
-Release: 0.17.rc6%{?dist}
+Release: 0.19.rc7%{?dist}
Summary: Automates deployment of containerized applications
License: ASL 2.0
@@ -21,11 +21,12 @@ Patch2: docker-bridge_flag.patch
URL: http://www.docker.io
# only x86_64 for now: https://github.com/dotcloud/docker/issues/136
ExclusiveArch: x86_64
-Source0: https://github.com/dotcloud/docker/archive/%{commit}/docker-%{shortcommit...
+Source0: https://github.com/crosbymichael/docker/archive/%{commit}/docker-%{shortc...
Source1: docker.service
-# though final name for xinetd file is simply 'docker',
-# having .xinetd makes things clear
-Source2: docker.xinetd
+# though final name for sysconf/sysvinit files is simply 'docker',
+# having .sysvinit and .sysconfig makes things clear
+Source2: docker.sysconfig
+Source3: docker.sysvinit
BuildRequires: gcc
BuildRequires: glibc-static
BuildRequires: golang(github.com/gorilla/mux)
@@ -38,7 +39,8 @@ BuildRequires: python-sphinxcontrib-httpdomain
BuildRequires: pkgconfig(systemd)
Requires: systemd-units
%else
-Requires: xinetd
+Requires(post): chkconfig
+Requires(preun): chkconfig
%endif
Requires: lxc
Requires: tar
@@ -101,8 +103,10 @@ install -p -m 644 contrib/completion/zsh/_docker %{buildroot}%{_datadir}/zsh/sit
install -d %{buildroot}%{_unitdir}
install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
%else
-install -d %{buildroot}%{_sysconfdir}/xinetd.d
-install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/xinetd.d/docker
+install -d %{buildroot}%{_sysconfdir}/sysconfig/
+install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/docker
+install -d %{buildroot}%{_initddir}
+install -p -m 755 %{SOURCE3} %{buildroot}%{_initddir}/docker
%endif
%pre
@@ -112,20 +116,22 @@ exit 0
%post
%if %{with systemd}
%systemd_post %{SOURCE1}
+%else
+# install but don't activate
+/sbin/chkconfig --add docker
%endif
%preun
%if %{with systemd}
%systemd_preun %{SOURCE1}
-%else
-if [ $1 -eq 0 ]; then
- /sbin/service xinetd condrestart > /dev/null 2>&1
-fi
%endif
%postun
%if %{with systemd}
%systemd_postun_with_restart %{SOURCE1}
+%else
+%{_initrddir}/docker stop >/dev/null 2>&1
+/sbin/chkconfig --del docker
%endif
%files
@@ -138,7 +144,8 @@ fi
%if %{with systemd}
%{_unitdir}/docker.service
%else
-%config(noreplace) %{_sysconfdir}/xinetd.d/docker
+%config(noreplace) %{_sysconfdir}/sysconfig/docker
+%{_initddir}/docker
%endif
%dir %{_sysconfdir}/bash_completion.d
%{_sysconfdir}/bash_completion.d/docker.bash
@@ -146,6 +153,12 @@ fi
%dir %{_sharedstatedir}/docker
%changelog
+* Fri Nov 22 2013 Adam Miller <maxamillion(a)fedoraproject.org> - 0.7-0.19.rc7
+- Remove xinetd entry, added sysvinit
+
+* Fri Nov 22 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-0.18.rc7
+- rc version bump
+
* Wed Nov 20 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-0.17.rc6
- removed ExecStartPost lines from docker.service (BZ #1026045)
- dockerinit listed in files
diff --git a/docker.sysconfig b/docker.sysconfig
new file mode 100644
index 0000000..dbb3944
--- /dev/null
+++ b/docker.sysconfig
@@ -0,0 +1 @@
+other_args="-b none"
diff --git a/docker.sysvinit b/docker.sysvinit
new file mode 100644
index 0000000..d3c29a8
--- /dev/null
+++ b/docker.sysvinit
@@ -0,0 +1,121 @@
+#!/bin/sh
+#
+# /etc/rc.d/init.d/docker
+#
+# Daemon for docker.io
+#
+# chkconfig: 2345 95 95
+# description: Daemon for docker.io
+
+### BEGIN INIT INFO
+# Provides: docker
+# Required-Start: $network
+# Required-Stop:
+# Should-Start:
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: start and stop docker
+# Description: Daemon for docker.io
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+exec="/usr/bin/docker"
+prog="docker"
+pidfile="/var/run/$prog.pid"
+lockfile="/var/lock/subsys/$prog"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+prestart() {
+
+ preexec="/sbin/sysctl"
+ [ -x $preexec ] || exit 6
+ $preexec -w net.ipv4.ip_forward=1 > /dev/null 2>&1
+ $preexec -w net.ipv6.conf.all.forwarding=1 > /dev/null 2>&1
+
+}
+
+start() {
+ [ -x $exec ] || exit 5
+
+ if ! [ -f $pidfile ]; then
+ prestart
+ printf "Starting $prog:\t"
+ $exec -d $other_args 1>/dev/null 2>&1 &
+ pid=$!
+ touch $lockfile
+ success
+ echo
+ else
+ failure
+ echo
+ printf "$pidfile still exists...\n"
+ exit 7
+ fi
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+
+exit $?
diff --git a/sources b/sources
index 673ead0..0e4ebfa 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-8cbafc6b3bc89d2d86819a75cb1869ae docker-9af7730.tar.gz
+852051f88f023aa84db32e98751f834a docker-ea7811c.tar.gz
10 years, 6 months
[docker-io/f20: 2/3] Merge branch 'master' into f20
by Lokesh Mandvekar
commit 5299cc4bc4af89e771f45f2ea27a5f49bfd11a85
Merge: 96922ee ef21741
Author: Lokesh Mandvekar <lsm5(a)redhat.com>
Date: Thu Nov 21 17:29:39 2013 -0600
Merge branch 'master' into f20
.gitignore | 2 ++
docker-bridge_flag.patch | 16 ++++++++++++++++
docker-io.spec | 46 ++++++++++++++++++++++++++++++++++++++--------
docker.service | 2 --
sources | 2 +-
5 files changed, 57 insertions(+), 11 deletions(-)
---
10 years, 6 months
[docker-io/f19] 0.7-0.17.rc6
by Lokesh Mandvekar
Summary of changes:
ef21741... 0.7-0.17.rc6 (*)
(*) This commit already existed in another branch; no separate mail sent
10 years, 6 months