[docker-io: 9/14] Merge pull request #1 from maxamillion/sysvinit
by Lokesh Mandvekar
commit f787bc350f9993659df9c51867e4324f2508139d
Merge: 4819476 7e407b8
Author: Lokesh Mandvekar <lsm5(a)redhat.com>
Date: Sat Nov 23 09:55:26 2013 -0800
Merge pull request #1 from maxamillion/sysvinit
Sysvinit in favor of xinetd
docker-io.spec | 34 ++++++++++-----
docker.sysconfig | 1 +
docker.sysvinit | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
docker.xinetd | 11 -----
4 files changed, 144 insertions(+), 23 deletions(-)
---
10 years, 4 months
[docker-io: 8/14] Merge branch 'master' into sysvinit
by Lokesh Mandvekar
commit 7e407b86523a0017234e8c4134ca145c0e2b5efc
Merge: 1e67a79 4819476
Author: Adam Miller <admiller(a)redhat.com>
Date: Sat Nov 23 01:58:02 2013 -0600
Merge branch 'master' into sysvinit
* master:
rc version bump
Conflicts:
docker-io.spec
docker-io.spec | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --cc docker-io.spec
index b171053,f6f9b33..7425278
--- a/docker-io.spec
+++ b/docker-io.spec
@@@ -11,7 -11,7 +11,7 @@@
Name: docker-io
Version: 0.7
- Release: 0.18.rc6%{?dist}
-Release: 0.18.rc7%{?dist}
++Release: 0.19.rc7%{?dist}
Summary: Automates deployment of containerized applications
License: ASL 2.0
@@@ -21,12 -21,11 +21,12 @@@ Patch2: docker-bridge_flag.patc
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)
@@@ -153,8 -146,9 +153,12 @@@ exit
%dir %{_sharedstatedir}/docker
%changelog
- * Fri Nov 22 2013 Adam Miller <maxamillion(a)fedoraproject.org> - 0.7-0.18.rc6
++* 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
10 years, 4 months
[docker-io: 7/14] remove xinetd in favor of sysvinit
by Lokesh Mandvekar
commit 1e67a79f6fcff2eba054e8903e8b7a5e9f491cf4
Author: Adam Miller <admiller(a)redhat.com>
Date: Sat Nov 23 01:54:00 2013 -0600
remove xinetd in favor of sysvinit
docker-io.spec | 33 +++++++++-----
docker.sysconfig | 1 +
docker.sysvinit | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
docker.xinetd | 11 -----
4 files changed, 143 insertions(+), 23 deletions(-)
---
diff --git a/docker-io.spec b/docker-io.spec
index d04df3e..b171053 100644
--- a/docker-io.spec
+++ b/docker-io.spec
@@ -11,7 +11,7 @@
Name: docker-io
Version: 0.7
-Release: 0.17.rc6%{?dist}
+Release: 0.18.rc6%{?dist}
Summary: Automates deployment of containerized applications
License: ASL 2.0
@@ -23,9 +23,10 @@ URL: http://www.docker.io
ExclusiveArch: x86_64
Source0: https://github.com/dotcloud/docker/archive/%{commit}/docker-%{shortcommit...
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,8 @@ fi
%dir %{_sharedstatedir}/docker
%changelog
+* Fri Nov 22 2013 Adam Miller <maxamillion(a)fedoraproject.org> - 0.7-0.18.rc6
+- Remove xinetd entry, added sysvinit
* 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 $?
10 years, 4 months
[docker-io: 6/14] rc version bump
by Lokesh Mandvekar
commit 4819476c8e3e494b4f5a92f3261ffebd38eb3e3f
Author: Lokesh Mandvekar <lsm5(a)redhat.com>
Date: Fri Nov 22 21:11:31 2013 -0600
rc version bump
Signed-off-by: Lokesh Mandvekar <lsm5(a)redhat.com>
docker-io.spec | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/docker-io.spec b/docker-io.spec
index d04df3e..f6f9b33 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.18.rc7%{?dist}
Summary: Automates deployment of containerized applications
License: ASL 2.0
@@ -21,7 +21,7 @@ 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
@@ -146,6 +146,9 @@ fi
%dir %{_sharedstatedir}/docker
%changelog
+* 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
10 years, 4 months
[docker-io: 5/14] README.md description update
by Lokesh Mandvekar
commit becfb5dc14b26f3270c50ff6ed8402f29b3a9366
Author: Lokesh Mandvekar <lsm5(a)redhat.com>
Date: Thu Nov 21 18:24:14 2013 -0600
README.md description update
Signed-off-by: Lokesh Mandvekar <lsm5(a)redhat.com>
README.md | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/README.md b/README.md
index a44a357..b5b5df2 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,3 @@
This repo contains all sources to rpmbuild docker-io.
-_Unofficially_ serves as upstream repo for OpenShift docker-io users.
+lsm5/docker-io _unofficially_ serves as upstream repo for OpenShift docker-io users (unless anyone objects :))
10 years, 4 months
[docker-io: 4/14] description update in README.md
by Lokesh Mandvekar
commit bb91b2111fddb71be9d8ea7c30a31e5c992a2b3c
Author: Lokesh Mandvekar <lsm5(a)redhat.com>
Date: Thu Nov 21 23:16:47 2013 +0000
description update in README.md
Signed-off-by: Lokesh Mandvekar <lsm5(a)redhat.com>
README.md | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/README.md b/README.md
index ba624e0..a44a357 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,3 @@
-this is the rpmbuild tree for docker-io
+This repo contains all sources to rpmbuild docker-io.
+
+_Unofficially_ serves as upstream repo for OpenShift docker-io users.
10 years, 4 months
[docker-io: 3/14] dockerinit explicitly listed in %files
by Lokesh Mandvekar
commit dbdf4b088349645589d6c1993f5afc9e4344f24e
Author: Lokesh Mandvekar <lsm5(a)redhat.com>
Date: Thu Nov 21 23:14:08 2013 +0000
dockerinit explicitly listed in %files
Signed-off-by: Lokesh Mandvekar <lsm5(a)redhat.com>
docker-io.spec | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/docker-io.spec b/docker-io.spec
index b406374..d04df3e 100644
--- a/docker-io.spec
+++ b/docker-io.spec
@@ -133,7 +133,8 @@ fi
%doc AUTHORS CHANGELOG.md CONTRIBUTING.md FIXME LICENSE MAINTAINERS NOTICE README.md
%{_mandir}/man1/docker.1.gz
%{_bindir}/docker
-%{_libexecdir}/docker
+%dir %{_libexecdir}/docker
+%{_libexecdir}/docker/dockerinit
%if %{with systemd}
%{_unitdir}/docker.service
%else
@@ -147,6 +148,7 @@ fi
%changelog
* 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
* Wed Nov 20 2013 Vincent Batts <vbatts(a)redhat.com> - 0.7-0.16.rc6
- adding back the none bridge patch
10 years, 4 months
[docker-io: 2/14] README.md added
by Lokesh Mandvekar
commit 3ae909cbe92322a68b20899683acba447ae0a8db
Author: Lokesh Mandvekar <lsm5(a)redhat.com>
Date: Thu Nov 21 00:17:10 2013 -0600
README.md added
Signed-off-by: Lokesh Mandvekar <lsm5(a)redhat.com>
README.md | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ba624e0
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+this is the rpmbuild tree for docker-io
10 years, 4 months
[docker-io: 1/14] docker-io 0.7-rc6.17
by Lokesh Mandvekar
commit 582ae2cc2b8176d9a5e39d38573a314901fc76dc
Author: Lokesh Mandvekar <lsm5(a)redhat.com>
Date: Thu Nov 21 00:14:27 2013 -0600
docker-io 0.7-rc6.17
Signed-off-by: Lokesh Mandvekar <lsm5(a)redhat.com>
.gitignore | 1 +
docker-0.7-el6-docs.patch | 13 ++
docker-0.7-remove-dotcloud-tar.patch | 13 ++
docker-bridge_flag.patch | 16 ++
docker-io.spec | 300 ++++++++++++++++++++++++++++++++++
docker.service | 11 ++
docker.xinetd | 11 ++
7 files changed, 365 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..335ec95
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.tar.gz
diff --git a/docker-0.7-el6-docs.patch b/docker-0.7-el6-docs.patch
new file mode 100644
index 0000000..68f92d0
--- /dev/null
+++ b/docker-0.7-el6-docs.patch
@@ -0,0 +1,13 @@
+diff --git a/docs/Makefile b/docs/Makefile
+index a97255f..742d3df 100644
+--- a/docs/Makefile
++++ b/docs/Makefile
+@@ -3,7 +3,7 @@
+
+ # You can set these variables from the command line.
+ SPHINXOPTS =
+-SPHINXBUILD = sphinx-build
++SPHINXBUILD = sphinx-1.0-build
+ PAPER =
+ BUILDDIR = _build
+ PYTHON = python
diff --git a/docker-0.7-remove-dotcloud-tar.patch b/docker-0.7-remove-dotcloud-tar.patch
new file mode 100644
index 0000000..5f0d579
--- /dev/null
+++ b/docker-0.7-remove-dotcloud-tar.patch
@@ -0,0 +1,13 @@
+diff --git a/utils/tarsum.go b/utils/tarsum.go
+index 290be24..9cba516 100644
+--- a/utils/tarsum.go
++++ b/utils/tarsum.go
+@@ -5,7 +5,7 @@ import (
+ "compress/gzip"
+ "crypto/sha256"
+ "encoding/hex"
+- "github.com/dotcloud/tar"
++ "archive/tar"
+ "hash"
+ "io"
+ "sort"
diff --git a/docker-bridge_flag.patch b/docker-bridge_flag.patch
new file mode 100644
index 0000000..21c69ed
--- /dev/null
+++ b/docker-bridge_flag.patch
@@ -0,0 +1,16 @@
+diff --git a/server.go b/server.go
+index 768f73a..f9bd884 100644
+--- a/server.go
++++ b/server.go
+@@ -63,7 +63,10 @@ func jobInitApi(job *engine.Job) string {
+ }()
+ job.Eng.Hack_SetGlobalVar("httpapi.server", srv)
+ job.Eng.Hack_SetGlobalVar("httpapi.runtime", srv.runtime)
+- job.Eng.Hack_SetGlobalVar("httpapi.bridgeIP", srv.runtime.networkManager.bridgeNetwork.IP)
++ // https://github.com/dotcloud/docker/issues/2768
++ if srv.runtime.networkManager.bridgeNetwork != nil {
++ job.Eng.Hack_SetGlobalVar("httpapi.bridgeIP", srv.runtime.networkManager.bridgeNetwork.IP)
++ }
+ if err := job.Eng.Register("create", srv.ContainerCreate); err != nil {
+ return err.Error()
+ }
diff --git a/docker-io.spec b/docker-io.spec
new file mode 100644
index 0000000..b406374
--- /dev/null
+++ b/docker-io.spec
@@ -0,0 +1,300 @@
+%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
+%bcond_without systemd
+%endif
+
+#debuginfo not supported with Go
+%global debug_package %{nil}
+%global gopath %{_datadir}/gocode
+
+%global commit 9af77302f476c3cef11bd4a1efe6b46f98abe781
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
+Name: docker-io
+Version: 0.7
+Release: 0.17.rc6%{?dist}
+Summary: Automates deployment of containerized applications
+License: ASL 2.0
+
+Patch0: docker-0.7-remove-dotcloud-tar.patch
+Patch1: docker-0.7-el6-docs.patch
+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...
+Source1: docker.service
+# though final name for xinetd file is simply 'docker',
+# having .xinetd makes things clear
+Source2: docker.xinetd
+BuildRequires: gcc
+BuildRequires: glibc-static
+BuildRequires: golang(github.com/gorilla/mux)
+BuildRequires: golang(github.com/kr/pty)
+BuildRequires: golang(code.google.com/p/go.net/websocket)
+BuildRequires: golang(code.google.com/p/gosqlite/sqlite3)
+BuildRequires: device-mapper-devel
+BuildRequires: python-sphinxcontrib-httpdomain
+%if %{with systemd}
+BuildRequires: pkgconfig(systemd)
+Requires: systemd-units
+%else
+Requires: xinetd
+%endif
+Requires: lxc
+Requires: tar
+Provides: lxc-docker = %{version}
+
+%description
+Docker is an open-source engine that automates the deployment of any
+application as a lightweight, portable, self-sufficient container that will
+run virtually anywhere.
+
+Docker containers can encapsulate any payload, and will run consistently on
+and between virtually any server. The same container that a developer builds
+and tests on a laptop will run at scale, in production*, on VMs, bare-metal
+servers, OpenStack clusters, public instances, or combinations of the above.
+
+%prep
+%setup -q -n docker-%{commit}
+rm -rf vendor
+%patch0 -p1 -b docker-0.7-remove-dotcloud-tar.patch
+%if 0%{?rhel} >= 6
+%patch1 -p1 -b docker-0.7-el6-docs.patch
+%endif
+%patch2 -p1 -b none-bridge
+
+%build
+mkdir _build
+pushd _build
+
+mkdir -p src/github.com/dotcloud
+ln -s $(dirs +1 -l) src/github.com/dotcloud/docker
+export GOPATH=$(pwd):%{gopath}
+# passing version information build flags BZ #1017186
+export LDFLAGS="-X main.GITCOMMIT '%{shortcommit}/%{release}' -X main.VERSION '%{version}' -w"
+# tamper with their magic
+export LDFLAGS_STATIC="-X github.com/dotcloud/docker/utils.IAMSTATIC true"
+export BUILDFLAGS="-tags netgo"
+go build -v -a -ldflags "$LDFLAGS $LDFLAGS_STATIC" $BUILDFLAGS github.com/dotcloud/docker/docker
+go build -v -a -ldflags \
+ "$LDFLAGS -linkmode external -extldflags '-lpthread -static -Wl,--unresolved-symbols=ignore-in-object-files' $LDFLAGS_STATIC" \
+ $BUILDFLAGS \
+ github.com/dotcloud/docker/dockerinit
+
+popd
+
+make -C docs/ man
+
+%install
+install -d %{buildroot}%{_bindir}
+install -d %{buildroot}%{_libexecdir}/docker
+install -d %{buildroot}%{_mandir}/man1
+install -d %{buildroot}%{_sysconfdir}/bash_completion.d
+install -d %{buildroot}%{_datadir}/zsh/site-functions
+install -d -m 700 %{buildroot}%{_sharedstatedir}/docker
+install -p -m 755 _build/docker %{buildroot}%{_bindir}/docker
+install -p -m 755 _build/dockerinit %{buildroot}%{_libexecdir}/docker
+install -p -m 644 docs/_build/man/docker.1 %{buildroot}%{_mandir}/man1
+install -p -m 644 contrib/completion/bash/docker %{buildroot}%{_sysconfdir}/bash_completion.d/docker.bash
+install -p -m 644 contrib/completion/zsh/_docker %{buildroot}%{_datadir}/zsh/site-functions
+%if %{with systemd}
+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
+%endif
+
+%pre
+getent group docker > /dev/null || %{_sbindir}/groupadd -r docker
+exit 0
+
+%post
+%if %{with systemd}
+%systemd_post %{SOURCE1}
+%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}
+%endif
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS CHANGELOG.md CONTRIBUTING.md FIXME LICENSE MAINTAINERS NOTICE README.md
+%{_mandir}/man1/docker.1.gz
+%{_bindir}/docker
+%{_libexecdir}/docker
+%if %{with systemd}
+%{_unitdir}/docker.service
+%else
+%config(noreplace) %{_sysconfdir}/xinetd.d/docker
+%endif
+%dir %{_sysconfdir}/bash_completion.d
+%{_sysconfdir}/bash_completion.d/docker.bash
+%{_datadir}/zsh/site-functions/_docker
+%dir %{_sharedstatedir}/docker
+
+%changelog
+* Wed Nov 20 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-0.17.rc6
+- removed ExecStartPost lines from docker.service (BZ #1026045)
+
+* Wed Nov 20 2013 Vincent Batts <vbatts(a)redhat.com> - 0.7-0.16.rc6
+- adding back the none bridge patch
+
+* Wed Nov 20 2013 Vincent Batts <vbatts(a)redhat.com> - 0.7-0.15.rc6
+- update docker source to crosbymichael/0.7.0-rc6
+- bridge-patch is not needed on this branch
+
+* Tue Nov 19 2013 Vincent Batts <vbatts(a)redhat.com> - 0.7-0.14.rc5
+- update docker source to crosbymichael/0.7-rc5
+- update docker source to 457375ea370a2da0df301d35b1aaa8f5964dabfe
+- static magic
+- place dockerinit in a libexec
+- add sqlite dependency
+
+* Sat Nov 02 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-0.13.dm
+- docker.service file sets iptables rules to allow container networking, this
+ is a stopgap approach, relevant pull request here:
+ https://github.com/dotcloud/docker/pull/2527
+
+* Sat Oct 26 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-0.12.dm
+- dm branch
+- dockerinit -> docker-init
+
+* Tue Oct 22 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-0.11.rc4
+- passing version information for docker build BZ #1017186
+
+* Sat Oct 19 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-0.10.rc4
+- rc version bump
+- docker-init -> dockerinit
+- zsh completion script installed to /usr/share/zsh/site-functions
+
+* Fri Oct 18 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-0.9.rc3
+- lxc-docker version matches package version
+
+* Fri Oct 18 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-0.8.rc3
+- double quotes removed from buildrequires as per existing golang rules
+
+* Fri Oct 11 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-0.7.rc3
+- xinetd file renamed to docker.xinetd for clarity
+
+* Thu Oct 10 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-0.6.rc3
+- patched for el6 to use sphinx-1.0-build
+
+* Wed Oct 09 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-0.5.rc3
+- rc3 version bump
+- exclusivearch x86_64
+
+* Wed Oct 09 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-0.4.rc2
+- debuginfo not Go-ready yet, skipped
+
+* Wed Oct 09 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-0.3.rc2
+- debuginfo package generated
+- buildrequires listed with versions where needed
+- conditionals changed to reflect systemd or not
+- docker commit value not needed
+- versioned provides lxc-docker
+
+* Mon Oct 07 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-2.rc2
+- rc branch includes devmapper
+- el6 BZ #1015865 fix included
+
+* Sun Oct 06 2013 Lokesh Mandvekar <lsm5(a)redhat.com> - 0.7-1
+- version bump, includes devicemapper
+- epel conditionals included
+- buildrequires sqlite-devel
+
+* Fri Oct 04 2013 Lokesh Mandvekar <lsm5(a)fedoraproject.org> - 0.6.3-4.devicemapper
+- docker-io service enables IPv4 and IPv6 forwarding
+- docker user not needed
+- golang not supported on ppc64, docker-io excluded too
+
+* Thu Oct 03 2013 Lokesh Mandvekar <lsm5(a)fedoraproject.org> - 0.6.3-3.devicemapper
+- Docker rebuilt with latest kr/pty, first run issue solved
+
+* Fri Sep 27 2013 Marek Goldmann <mgoldman(a)redhat.com> - 0.6.3-2.devicemapper
+- Remove setfcap from lxc.cap.drop to make setxattr() calls working in the
+ containers, RHBZ#1012952
+
+* Thu Sep 26 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.6.3-1.devicemapper
+- version bump
+- new version solves docker push issues
+
+* Tue Sep 24 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.6.2-14.devicemapper
+- package requires lxc
+
+* Tue Sep 24 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.6.2-13.devicemapper
+- package requires tar
+
+* Tue Sep 24 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.6.2-12.devicemapper
+- /var/lib/docker installed
+- package also provides lxc-docker
+
+* Mon Sep 23 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.6.2-11.devicemapper
+- better looking url
+
+* Mon Sep 23 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.6.2-10.devicemapper
+- release tag changed to denote devicemapper patch
+
+* Mon Sep 23 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.6.2-9
+- device-mapper-devel is a buildrequires for alex's code
+- docker.service listed as a separate source file
+
+* Sun Sep 22 2013 Matthew Miller <mattdm(a)fedoraproject.org> 0.6.2-8
+- install bash completion
+- use -v for go build to show progress
+
+* Sun Sep 22 2013 Matthew Miller <mattdm(a)fedoraproject.org> 0.6.2-7
+- build and install separate docker-init
+
+* Sun Sep 22 2013 Matthew Miller <mattdm(a)fedoraproject.org> 0.6.2-4
+- update to use new source-only golang lib packages
+
+* Sat Sep 21 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.6.2-3
+- man page generation from docs/.
+- systemd service file created
+- dotcloud/tar no longer required
+
+* Fri Sep 20 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.6.2-2
+- patched with alex larsson's devmapper code
+
+* Wed Sep 18 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.6.2-1
+- Version bump
+
+* Tue Sep 10 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.6.1-2
+- buildrequires updated
+- package renamed to docker-io
+
+* Fri Aug 30 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.6.1-1
+- Version bump
+- Package name change from lxc-docker to docker
+- Makefile patched from 0.5.3
+
+* Wed Aug 28 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.5.3-5
+- File permissions settings included
+
+* Wed Aug 28 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.5.3-4
+- Credits in changelog modified as per reference's request
+
+* Tue Aug 27 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.5.3-3
+- Dependencies listed as rpm packages instead of tars
+- Install section added
+
+* Mon Aug 26 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.5.3-2
+- Github packaging
+- Deps not downloaded at build time courtesy Elan Ruusamäe
+- Manpage and other docs installed
+
+* Fri Aug 23 2013 Lokesh Mandvekar <lsm5(a)redhat.com> 0.5.3-1
+- Initial fedora package
+- Some credit to Elan Ruusamäe (glen(a)pld-linux.org)
diff --git a/docker.service b/docker.service
new file mode 100644
index 0000000..9882939
--- /dev/null
+++ b/docker.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Docker container management daemon
+
+[Service]
+Type=simple
+ExecStartPre=/usr/sbin/sysctl -w net.ipv4.ip_forward=1 net.ipv6.conf.all.forwarding=1
+ExecStart=/usr/bin/docker -d
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/docker.xinetd b/docker.xinetd
new file mode 100644
index 0000000..47a83dc
--- /dev/null
+++ b/docker.xinetd
@@ -0,0 +1,11 @@
+# default: off
+# description: Container management service
+service docker
+{
+ disable = yes
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ server = /usr/bin/docker -d
+ type = UNLISTED
+}
10 years, 4 months