commit ddbdc1dc3280e871a989112cc039d91d9f2384cc Author: Lokesh Mandvekar <l...@redhat.com> Date: Fri May 2 14:07:45 2014 -0400
selinux enablement + foreground mode patches docker-0.9-el6-lxc.patch | 13 -- docker-io.spec | 120 ++++++++++++-------- docker.service | 14 +++ ...s-for-rhel.patch => remove-btrfs-for-rhel.patch | 42 ++++---- remove-vendored-tar.patch | 108 ++++++++++++++++++ sources | 3 +- upstream-patched-archive-tar.patch | 117 ------------------- 7 files changed, 217 insertions(+), 200 deletions(-) --- diff --git a/docker-io.spec b/docker-io.spec index 8a22afc..489410d 100644 --- a/docker-io.spec +++ b/docker-io.spec @@ -9,25 +9,26 @@ %global debug_package %{nil} %global gopath %{_datadir}/gocode -%global commit dc9c28f51d669d6b09e81c2381f800f1a33bb659 +%global commit 79993599658b4e8ed6764ffc07b6fc747e98cc1f %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: docker-io Version: 0.10.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Automates deployment of containerized applications License: ASL 2.0 -Patch0: ignore-btrfs-for-rhel.patch -Patch1: upstream-patched-archive-tar.patch - -Patch90: docker-0.9-el6-lxc.patch +Patch0: remove-vendored-tar.patch +Patch1: remove-btrfs-for-rhel.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/v%{version}.tar.gz +#Current upstream https://github.com/lsm5/docker/tree/2014-05-01-2 +Source0: https://github.com/lsm5/docker/archive/%{commit}/docker-%{shortcommit}.tar.gz # though final name for sysconf/sysvinit files is simply 'docker', # having .sysvinit and .sysconfig makes things clear +Source1: docker.service +Source2: docker-man.tar.gz BuildRequires: gcc BuildRequires: glibc-static # ensure build uses golang 1.2-7 and above @@ -35,11 +36,11 @@ BuildRequires: glibc-static BuildRequires: golang >= 1.2-7 BuildRequires: golang(github.com/gorilla/mux) BuildRequires: golang(github.com/kr/pty) -BuildRequires: golang(github.com/godbus/dbus) -BuildRequires: golang(github.com/coreos/go-systemd) >= 0-0.4 BuildRequires: golang(code.google.com/p/go.net/websocket) BuildRequires: golang(code.google.com/p/gosqlite/sqlite3) BuildRequires: golang(github.com/syndtr/gocapability/capability) +BuildRequires: golang(github.com/godbus/dbus) +BuildRequires: golang(github.com/coreos/go-systemd/activation) BuildRequires: device-mapper-devel # btrfs not available for rhel yet %if 0%{?fedora} @@ -60,20 +61,10 @@ Requires: xz # this won't be needed for rhel7+ %if 0%{?rhel} >= 6 && 0%{?rhel} < 7 Requires: bridge-utils -Requires: lxc - -# https://bugzilla.redhat.com/show_bug.cgi?id=1034919 -# No longer needed in Fedora because of libcontainer -Requires: libcgroup %endif Provides: lxc-docker = %{version} -# permitted by https://fedorahosted.org/fpc/ticket/341#comment:7 -# In F22, the whole package should be renamed to be just "docker" and -# this changed to "Provides: docker-io". -Provides: docker - %description Docker is an open-source engine that automates the deployment of any application as a lightweight, portable, self-sufficient container that will @@ -85,13 +76,13 @@ 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-%{version} +%setup -q -n docker-%{commit} rm -rf vendor +%patch0 -p1 -b remove-vendored-tar %if 0%{?rhel} -%patch0 -p1 -b ignore-btrfs-for-rhel -%patch90 -p1 -b docker-0.9-el6-lxc +%patch1 -p1 -b remove-btrfs-for-rhel %endif -%patch1 -p1 -b upstream-patched-archive-tar +tar zxf %{SOURCE2} %build mkdir _build @@ -102,6 +93,7 @@ pushd _build popd export DOCKER_GITCOMMIT="%{shortcommit}/%{version}" +export DOCKER_BUILDTAGS='selinux' export GOPATH=$(pwd)/_build:%{gopath} hack/make.sh dynbinary @@ -111,13 +103,13 @@ cp contrib/syntax/vim/README.md README-vim-syntax.md %install # install binary install -d %{buildroot}%{_bindir} -install -p -m 755 bundles/%{version}/dynbinary/docker-%{version} %{buildroot}%{_bindir}/docker +install -p -m 755 bundles/%{version}-dev/dynbinary/docker-%{version}-dev %{buildroot}%{_bindir}/docker # install dockerinit install -d %{buildroot}%{_libexecdir}/docker -install -p -m 755 bundles/%{version}/dynbinary/dockerinit-%{version} %{buildroot}%{_libexecdir}/docker/dockerinit -# install manpage +install -p -m 755 bundles/%{version}-dev/dynbinary/dockerinit-%{version}-dev %{buildroot}%{_libexecdir}/docker/dockerinit +# install manpages install -d %{buildroot}%{_mandir}/man1 -install -p -m 644 contrib/man/man1/docker*.1 %{buildroot}%{_mandir}/man1 +install -p -m 644 man1/* %{buildroot}%{_mandir}/man1 # install bash completion install -d %{buildroot}%{_sysconfdir}/bash_completion.d install -p -m 644 contrib/completion/bash/docker %{buildroot}%{_sysconfdir}/bash_completion.d/docker.bash @@ -137,7 +129,8 @@ install -d -m 700 %{buildroot}%{_sharedstatedir}/docker # install systemd/init scripts %if %{with systemd} install -d %{buildroot}%{_unitdir} -install -p -m 644 contrib/init/systemd/docker.service %{buildroot}%{_unitdir} +install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir} +install -p -m 644 contrib/init/systemd/socket-activation/docker.socket %{buildroot}%{_unitdir} %else install -d %{buildroot}%{_sysconfdir}/sysconfig/ install -p -m 644 contrib/init/sysvinit-redhat/docker.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/docker @@ -178,12 +171,13 @@ fi %defattr(-,root,root,-) %doc AUTHORS CHANGELOG.md CONTRIBUTING.md FIXME LICENSE MAINTAINERS NOTICE README.md %doc LICENSE-vim-syntax README-vim-syntax.md -%{_mandir}/man1/docker*.1.gz +%{_mandir}/man1/* %{_bindir}/docker %dir %{_libexecdir}/docker %{_libexecdir}/docker/dockerinit %if %{with systemd} %{_unitdir}/docker.service +%{_unitdir}/docker.socket %else %config(noreplace) %{_sysconfdir}/sysconfig/docker %{_initddir}/docker @@ -202,33 +196,63 @@ fi %{_datadir}/vim/vimfiles/syntax/dockerfile.vim %changelog -* Wed Apr 23 2014 Matthew Miller <mattdm@fedoraproject,org> - 0.10.0-3 -- "Provides: docker" as per FPC exception +* Thu May 01 2014 Lokesh Mandvekar <l...@redhat.com> - 0.10.0-4 +- enable selinux in unitfile + +* Thu May 01 2014 Lokesh Mandvekar <l...@redhat.com> - 0.10.0-3 +- branch https://github.com/lsm5/docker/commits/2014-05-01-2 + +* Thu May 01 2014 Lokesh Mandvekar <l...@redhat.com> - 0.10.0-2 +- branch https://github.com/lsm5/docker/tree/2014-05-01 -* Mon Apr 14 2014 Lokesh Mandvekar <l...@redhat.com> - 0.10.0-2 -- regenerate btrfs removal patch -- update commit value +* Fri Apr 25 2014 Lokesh Mandvekar <l...@redhat.com> - 0.10.0-1 +- rebased on 0.10.0 +- branch used: https://github.com/lsm5/docker/tree/2014-04-25 +- manpages packaged separately (pandoc not available on RHEL-7) -* Mon Apr 14 2014 Lokesh Mandvekar <l...@redhat.com> - 0.10.0-1 -- include manpages from contrib +* Tue Apr 08 2014 Lokesh Mandvekar <l...@redhat.com> - 0.9.1-4.collider +- manpages merged, some more patches from alex -* Wed Apr 09 2014 Bobby Powers <bobbypow...@gmail.com> - 0.10.0-1 -- Upstream version bump +* Thu Apr 03 2014 Lokesh Mandvekar <l...@redhat.com> - 0.9.1-3.collider +- fix --volumes-from mount failure, include docker-images/info/tag manpages -* Thu Mar 27 2014 Lokesh Mandvekar <l...@redhat.com> - 0.9.1-1 -- BZ 1080799 - upstream version bump +* Tue Apr 01 2014 Lokesh Mandvekar <l...@redhat.com> - 0.9.1-2.collider +- solve deadlock issue -* Thu Mar 13 2014 Adam Miller <maxamill...@fedoraproject.org> - 0.9.0-3 -- Add lxc requirement for EPEL6 and patch init script to use lxc driver -- Remove tar dep, no longer needed -- Require libcgroup only for EPEL6 +* Mon Mar 31 2014 Lokesh Mandvekar <l...@redhat.com> - 0.9.1-1.collider +- branch 2014-03-28, include additional docker manpages from whenry -* Tue Mar 11 2014 Lokesh Mandvekar <l...@redhat.com> - 0.9.0-2 -- lxc removed (optional) - http://blog.docker.io/2014/03/docker-0-9-introducing-execution-drivers-and-libcontainer/ +* Thu Mar 27 2014 Lokesh Mandvekar <l...@redhat.com> - 0.9.0-7.collider +- env file support (vbatts) + +* Mon Mar 17 2014 Lokesh Mandvekar <l...@redhat.com> - 0.9.0-6.collider +- dwalsh's selinux patch rewritten +- point to my docker repo as source0 (contains all patches already) +- don't require tar and libcgroup + +* Fri Mar 14 2014 Lokesh Mandvekar <l...@redhat.com> - 0.9.0-5.collider +- add kraman's container-pid.patch + +* Fri Mar 14 2014 Lokesh Mandvekar <l...@redhat.com> - 0.9.0-4.collider +- require docker.socket in unitfile + +* Thu Mar 13 2014 Lokesh Mandvekar <l...@redhat.com> - 0.9.0-3.collider +- use systemd socket activation + +* Wed Mar 12 2014 Lokesh Mandvekar <l...@redhat.com> - 0.9.0-2.collider +- add collider tag to release field * Tue Mar 11 2014 Lokesh Mandvekar <l...@redhat.com> - 0.9.0-1 -- BZ 1074880 - upstream version bump to v0.9.0 +- upstream version bump to 0.9.0 + +* Mon Mar 10 2014 Lokesh Mandvekar <l...@redhat.com> - 0.8.1-3 +- add alexl's patches upto af9bb2e3d37fcddd5e041d6ae45055f649e2fbd4 +- add guelfey/go.dbus to BR + +* Sun Mar 09 2014 Lokesh Mandvekar <l...@redhat.com> - 0.8.1-2 +- use upstream commit 3ace9512bdf5c935a716ee1851d3e636e7962fac +- add dwalsh's patches for selinux, emacs-gitignore, listen_pid and +remount /var/lib/docker as --private * Wed Feb 19 2014 Lokesh Mandvekar <l...@redhat.com> - 0.8.1-1 - Bug 1066841 - upstream version bump to v0.8.1 diff --git a/docker.service b/docker.service new file mode 100644 index 0000000..02bb32e --- /dev/null +++ b/docker.service @@ -0,0 +1,14 @@ +[Unit] +Description=Docker Application Container Engine +Documentation=http://docs.docker.io +After=network.target +Requires=docker.socket + +[Service] +ExecStart=/usr/bin/docker -d --selinux-enabled -H fd:// +Restart=on-failure +LimitNOFILE=1048576 +LimitNPROC=1048576 + +[Install] +WantedBy=multi-user.target diff --git a/ignore-btrfs-for-rhel.patch b/remove-btrfs-for-rhel.patch similarity index 74% rename from ignore-btrfs-for-rhel.patch rename to remove-btrfs-for-rhel.patch index 5a14235..76c948b 100644 --- a/ignore-btrfs-for-rhel.patch +++ b/remove-btrfs-for-rhel.patch @@ -1,6 +1,15 @@ -diff -uNr docker-0.10.0/runtime/graphdriver/btrfs/btrfs.go docker-0.10.0-1/runtime/graphdriver/btrfs/btrfs.go ---- docker-0.10.0/runtime/graphdriver/btrfs/btrfs.go 2014-04-08 17:49:33.000000000 -0400 -+++ docker-0.10.0-1/runtime/graphdriver/btrfs/btrfs.go 1969-12-31 19:00:00.000000000 -0500 +diff -uNr docker-a6e878a916ba2b281a82fe780fc129727b103555/daemon/daemon_btrfs.go docker-1/daemon/daemon_btrfs.go +--- docker-a6e878a916ba2b281a82fe780fc129727b103555/daemon/daemon_btrfs.go 2014-04-25 13:44:42.000000000 -0400 ++++ docker-1/daemon/daemon_btrfs.go 2014-04-25 15:58:46.895027946 -0400 +@@ -3,5 +3,4 @@ + package daemon + + import ( +- _ "github.com/dotcloud/docker/daemon/graphdriver/btrfs" + ) +diff -uNr docker-a6e878a916ba2b281a82fe780fc129727b103555/daemon/graphdriver/btrfs/btrfs.go docker-1/daemon/graphdriver/btrfs/btrfs.go +--- docker-a6e878a916ba2b281a82fe780fc129727b103555/daemon/graphdriver/btrfs/btrfs.go 2014-04-25 13:44:42.000000000 -0400 ++++ docker-1/daemon/graphdriver/btrfs/btrfs.go 1969-12-31 19:00:00.000000000 -0500 @@ -1,213 +0,0 @@ -// +build linux,amd64 - @@ -15,7 +24,7 @@ diff -uNr docker-0.10.0/runtime/graphdriver/btrfs/btrfs.go docker-0.10.0-1/runti - -import ( - "fmt" -- "github.com/dotcloud/docker/runtime/graphdriver" +- "github.com/dotcloud/docker/daemon/graphdriver" - "os" - "path" - "syscall" @@ -84,7 +93,7 @@ diff -uNr docker-0.10.0/runtime/graphdriver/btrfs/btrfs.go docker-0.10.0-1/runti - return uintptr(C.dirfd(dir)) -} - --func subvolCreate(path, name string, mountLabel string) error { +-func subvolCreate(path, name string) error { - dir, err := openDir(path) - if err != nil { - return err @@ -159,17 +168,17 @@ diff -uNr docker-0.10.0/runtime/graphdriver/btrfs/btrfs.go docker-0.10.0-1/runti - return path.Join(d.subvolumesDir(), id) -} - --func (d *Driver) Create(id string, parent string, mountLabel string) error { +-func (d *Driver) Create(id string, parent string) error { - subvolumes := path.Join(d.home, "subvolumes") - if err := os.MkdirAll(subvolumes, 0700); err != nil { - return err - } - if parent == "" { -- if err := subvolCreate(subvolumes, id, mountLabel); err != nil { +- if err := subvolCreate(subvolumes, id); err != nil { - return err - } - } else { -- parentDir, err := d.Get(parent) +- parentDir, err := d.Get(parent, "") - if err != nil { - return err - } @@ -191,7 +200,7 @@ diff -uNr docker-0.10.0/runtime/graphdriver/btrfs/btrfs.go docker-0.10.0-1/runti - return os.RemoveAll(dir) -} - --func (d *Driver) Get(id string) (string, error) { +-func (d *Driver) Get(id, mountLabel string) (string, error) { - dir := d.subvolumesDirId(id) - st, err := os.Stat(dir) - if err != nil { @@ -215,19 +224,10 @@ diff -uNr docker-0.10.0/runtime/graphdriver/btrfs/btrfs.go docker-0.10.0-1/runti - _, err := os.Stat(dir) - return err == nil -} -diff -uNr docker-0.10.0/runtime/graphdriver/btrfs/dummy_unsupported.go docker-0.10.0-1/runtime/graphdriver/btrfs/dummy_unsupported.go ---- docker-0.10.0/runtime/graphdriver/btrfs/dummy_unsupported.go 2014-04-08 17:49:33.000000000 -0400 -+++ docker-0.10.0-1/runtime/graphdriver/btrfs/dummy_unsupported.go 1969-12-31 19:00:00.000000000 -0500 +diff -uNr docker-a6e878a916ba2b281a82fe780fc129727b103555/daemon/graphdriver/btrfs/dummy_unsupported.go docker-1/daemon/graphdriver/btrfs/dummy_unsupported.go +--- docker-a6e878a916ba2b281a82fe780fc129727b103555/daemon/graphdriver/btrfs/dummy_unsupported.go 2014-04-25 13:44:42.000000000 -0400 ++++ docker-1/daemon/graphdriver/btrfs/dummy_unsupported.go 1969-12-31 19:00:00.000000000 -0500 @@ -1,3 +0,0 @@ -// +build !linux !amd64 - -package btrfs -diff -uNr docker-0.10.0/runtime/runtime_btrfs.go docker-0.10.0-1/runtime/runtime_btrfs.go ---- docker-0.10.0/runtime/runtime_btrfs.go 2014-04-08 17:49:33.000000000 -0400 -+++ docker-0.10.0-1/runtime/runtime_btrfs.go 2014-04-14 11:47:23.665041947 -0400 -@@ -3,5 +3,4 @@ - package runtime - - import ( -- _ "github.com/dotcloud/docker/runtime/graphdriver/btrfs" - ) diff --git a/remove-vendored-tar.patch b/remove-vendored-tar.patch new file mode 100644 index 0000000..47489a9 --- /dev/null +++ b/remove-vendored-tar.patch @@ -0,0 +1,108 @@ +diff -uNr docker-a6e878a916ba2b281a82fe780fc129727b103555/archive/archive.go docker-1/archive/archive.go +--- docker-a6e878a916ba2b281a82fe780fc129727b103555/archive/archive.go 2014-04-25 13:44:42.000000000 -0400 ++++ docker-1/archive/archive.go 2014-04-25 15:13:23.771456211 -0400 +@@ -8,7 +8,7 @@ + "fmt" + "github.com/dotcloud/docker/pkg/system" + "github.com/dotcloud/docker/utils" +- "github.com/dotcloud/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + "io" + "io/ioutil" + "os" +diff -uNr docker-a6e878a916ba2b281a82fe780fc129727b103555/archive/archive_test.go docker-1/archive/archive_test.go +--- docker-a6e878a916ba2b281a82fe780fc129727b103555/archive/archive_test.go 2014-04-25 13:44:42.000000000 -0400 ++++ docker-1/archive/archive_test.go 2014-04-25 15:13:15.716419097 -0400 +@@ -3,7 +3,7 @@ + import ( + "bytes" + "fmt" +- "github.com/dotcloud/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + "io" + "io/ioutil" + "os" +diff -uNr docker-a6e878a916ba2b281a82fe780fc129727b103555/archive/changes.go docker-1/archive/changes.go +--- docker-a6e878a916ba2b281a82fe780fc129727b103555/archive/changes.go 2014-04-25 13:44:42.000000000 -0400 ++++ docker-1/archive/changes.go 2014-04-25 15:13:04.199365871 -0400 +@@ -5,7 +5,7 @@ + "fmt" + "github.com/dotcloud/docker/pkg/system" + "github.com/dotcloud/docker/utils" +- "github.com/dotcloud/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + "io" + "os" + "path/filepath" +diff -uNr docker-a6e878a916ba2b281a82fe780fc129727b103555/archive/diff.go docker-1/archive/diff.go +--- docker-a6e878a916ba2b281a82fe780fc129727b103555/archive/diff.go 2014-04-25 13:44:42.000000000 -0400 ++++ docker-1/archive/diff.go 2014-04-25 15:12:55.005323418 -0400 +@@ -2,7 +2,7 @@ + + import ( + "fmt" +- "github.com/dotcloud/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + "io" + "io/ioutil" + "os" +diff -uNr docker-a6e878a916ba2b281a82fe780fc129727b103555/archive/wrap.go docker-1/archive/wrap.go +--- docker-a6e878a916ba2b281a82fe780fc129727b103555/archive/wrap.go 2014-04-25 13:44:42.000000000 -0400 ++++ docker-1/archive/wrap.go 2014-04-25 15:13:40.052531288 -0400 +@@ -2,7 +2,7 @@ + + import ( + "bytes" +- "github.com/dotcloud/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + "io/ioutil" + ) + +diff -uNr docker-a6e878a916ba2b281a82fe780fc129727b103555/graph/tags_unit_test.go docker-1/graph/tags_unit_test.go +--- docker-a6e878a916ba2b281a82fe780fc129727b103555/graph/tags_unit_test.go 2014-04-25 13:44:42.000000000 -0400 ++++ docker-1/graph/tags_unit_test.go 2014-04-25 15:13:58.029614389 -0400 +@@ -6,7 +6,7 @@ + _ "github.com/dotcloud/docker/daemon/graphdriver/vfs" // import the vfs driver so it is used in the tests + "github.com/dotcloud/docker/image" + "github.com/dotcloud/docker/utils" +- "github.com/dotcloud/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + "io" + "os" + "path" +diff -uNr docker-a6e878a916ba2b281a82fe780fc129727b103555/integration/api_test.go docker-1/integration/api_test.go +--- docker-a6e878a916ba2b281a82fe780fc129727b103555/integration/api_test.go 2014-04-25 13:44:42.000000000 -0400 ++++ docker-1/integration/api_test.go 2014-04-25 15:14:20.072716196 -0400 +@@ -21,7 +21,7 @@ + "github.com/dotcloud/docker/image" + "github.com/dotcloud/docker/runconfig" + "github.com/dotcloud/docker/utils" +- "github.com/dotcloud/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + ) + + func TestGetEvents(t *testing.T) { +diff -uNr docker-a6e878a916ba2b281a82fe780fc129727b103555/integration/utils_test.go docker-1/integration/utils_test.go +--- docker-a6e878a916ba2b281a82fe780fc129727b103555/integration/utils_test.go 2014-04-25 13:44:42.000000000 -0400 ++++ docker-1/integration/utils_test.go 2014-04-25 15:14:10.081669969 -0400 +@@ -3,7 +3,7 @@ + import ( + "bytes" + "fmt" +- "github.com/dotcloud/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + "io" + "io/ioutil" + "net/http" +diff -uNr docker-a6e878a916ba2b281a82fe780fc129727b103555/utils/tarsum.go docker-1/utils/tarsum.go +--- docker-a6e878a916ba2b281a82fe780fc129727b103555/utils/tarsum.go 2014-04-25 13:44:42.000000000 -0400 ++++ docker-1/utils/tarsum.go 2014-04-25 15:14:27.355749682 -0400 +@@ -5,7 +5,7 @@ + "compress/gzip" + "crypto/sha256" + "encoding/hex" +- "github.com/dotcloud/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ++ "archive/tar" + "hash" + "io" + "sort" diff --git a/sources b/sources index 8f84b86..51be286 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -1a9b569b1627a51b0ce6e85eaad459c4 v0.10.0.tar.gz +417615b900dbf7698ddcab503ed3424b docker-7999359.tar.gz +bbd76651bfb3a723203e0e26ba8cb62c docker-man.tar.gz _______________________________________________ golang mailing list golang@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/golang