# modifying the dockerinit binary breaks the SHA1 sum check by docker %global __os_install_post %{_rpmconfigdir}/brp-compress #debuginfo not supported with Go %global debug_package %{nil} %global gopath %{_datadir}/gocode %global commit 02d20af7db1e154290eb5128525dd6831bd4c014 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: docker Version: 0.11.1 Release: 19%{?dist} Summary: Automates deployment of containerized applications License: ASL 2.0 Patch0: remove-vendored-tar.patch URL: http://www.docker.io # only x86_64 for now: https://github.com/dotcloud/docker/issues/136 ExclusiveArch: x86_64 #use branch: https://github.com/lsm5/docker/commits/2014-06-06-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 Source3: docker.sysconfig BuildRequires: gcc BuildRequires: glibc-static # ensure build uses golang 1.2-7 and above # http://code.google.com/p/go/source/detail?r=a15f344a9efa35ef168c8feaa92a15a1cdc93db5 BuildRequires: golang >= 1.2-7 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: 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 BuildRequires: btrfs-progs-devel BuildRequires: pkgconfig(systemd) Requires: systemd-units # need xz to work with ubuntu images # https://bugzilla.redhat.com/show_bug.cgi?id=1045220 Requires: xz Provides: lxc-docker = %{version} 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 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 remove-vendored-tar tar zxf %{SOURCE2} %build mkdir _build pushd _build mkdir -p src/github.com/dotcloud ln -s $(dirs +1 -l) src/github.com/dotcloud/docker popd export DOCKER_GITCOMMIT="%{shortcommit}/%{version}" export DOCKER_BUILDTAGS='selinux' export GOPATH=$(pwd)/_build:%{gopath} hack/make.sh dynbinary cp contrib/syntax/vim/LICENSE LICENSE-vim-syntax cp contrib/syntax/vim/README.md README-vim-syntax.md %install # install binary install -d %{buildroot}%{_bindir} 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}-dev/dynbinary/dockerinit-%{version}-dev %{buildroot}%{_libexecdir}/docker/dockerinit # install manpages install -d %{buildroot}%{_mandir}/man1 install -p -m 644 man1/* %{buildroot}%{_mandir}/man1 install -d %{buildroot}%{_mandir}/man5 install -p -m 644 man5/* %{buildroot}%{_mandir}/man5 # 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 # install zsh completion install -d %{buildroot}%{_datadir}/zsh/site-functions install -p -m 644 contrib/completion/zsh/_docker %{buildroot}%{_datadir}/zsh/site-functions # install vim syntax highlighting install -d %{buildroot}%{_datadir}/vim/vimfiles/{doc,ftdetect,syntax} install -p -m 644 contrib/syntax/vim/doc/dockerfile.txt %{buildroot}%{_datadir}/vim/vimfiles/doc install -p -m 644 contrib/syntax/vim/ftdetect/dockerfile.vim %{buildroot}%{_datadir}/vim/vimfiles/ftdetect install -p -m 644 contrib/syntax/vim/syntax/dockerfile.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax # install udev rules install -d %{buildroot}%{_sysconfdir}/udev/rules.d install -p -m 755 contrib/udev/80-docker.rules %{buildroot}%{_sysconfdir}/udev/rules.d # install storage dir install -d -m 700 %{buildroot}%{_sharedstatedir}/docker # install systemd/init scripts install -d %{buildroot}%{_unitdir} install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir} install -p -m 644 contrib/init/systemd/socket-activation/docker.socket %{buildroot}%{_unitdir} # for additional args install -d %{buildroot}%{_sysconfdir}/sysconfig/ install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/docker # install secrets dir install -d -p -m 750 %{buildroot}/%{_datadir}/rhel/secrets ln -s %{_sysconfdir}/pki/entitlement %{buildroot}%{_datadir}/rhel/secrets/etc-pki-entitlement ln -s %{_sysconfdir}/yum.repos.d/redhat.repo %{buildroot}%{_datadir}/rhel/secrets/rhel7.repo %pre getent group docker > /dev/null || %{_sbindir}/groupadd -r docker exit 0 %post %systemd_post docker %preun %systemd_preun docker %postun %systemd_postun_with_restart docker %files %defattr(-,root,root,-) %doc AUTHORS CHANGELOG.md CONTRIBUTING.md FIXME MAINTAINERS NOTICE %doc LICENSE* README*.md %{_mandir}/man1/* %{_mandir}/man5/* %{_bindir}/docker %dir %{_datadir}/rhel %dir %{_datadir}/rhel/secrets %{_datadir}/rhel/secrets/etc-pki-entitlement %{_datadir}/rhel/secrets/rhel7.repo %dir %{_libexecdir}/docker %{_libexecdir}/docker/dockerinit %{_unitdir}/docker.service %{_unitdir}/docker.socket %{_sysconfdir}/sysconfig/docker %dir %{_sysconfdir}/bash_completion.d %{_sysconfdir}/bash_completion.d/docker.bash %{_datadir}/zsh/site-functions/_docker %dir %{_sharedstatedir}/docker %dir %{_sysconfdir}/udev/rules.d %{_sysconfdir}/udev/rules.d/80-docker.rules %dir %{_datadir}/vim/vimfiles/doc %{_datadir}/vim/vimfiles/doc/dockerfile.txt %dir %{_datadir}/vim/vimfiles/ftdetect %{_datadir}/vim/vimfiles/ftdetect/dockerfile.vim %dir %{_datadir}/vim/vimfiles/syntax %{_datadir}/vim/vimfiles/syntax/dockerfile.vim %changelog * Fri Jun 06 2014 Lokesh Mandvekar - 0.11.1-19 - build with golang-github-kr-pty-0-0.19.git98c7b80.el7 * Fri Jun 06 2014 Lokesh Mandvekar - 0.11.1-18 - update manpages - use branch: https://github.com/lsm5/docker/commits/2014-06-06-2 * Thu Jun 05 2014 Lokesh Mandvekar - 0.11.1-17 - use branch: https://github.com/lsm5/docker/commits/2014-06-05-final2 * Thu Jun 05 2014 Lokesh Mandvekar - 0.11.1-16 - latest repo: https://github.com/lsm5/docker/commits/2014-06-05-5 - update secrets symlinks * Mon Jun 02 2014 Lokesh Mandvekar - 0.11.1-15 - correct the rhel7.repo symlink * Mon Jun 02 2014 Lokesh Mandvekar - 0.11.1-14 - only symlink the repo itself, not the dir * Sun Jun 01 2014 Lokesh Mandvekar - 0.11.1-13 - use the repo dir itself and not repo for second symlink * Sat May 31 2014 Lokesh Mandvekar - 0.11.1-12 - create symlinks at install time and not in scriptlets - own symlinks in /etc/docker/secrets * Sat May 31 2014 Lokesh Mandvekar - 0.11.1-11 - add symlinks for sharing host entitlements * Thu May 29 2014 Lokesh Mandvekar - 0.11.1-10 - /etc/docker/secrets has permissions 750 * Thu May 29 2014 Lokesh Mandvekar - 0.11.1-9 - create and own /etc/docker/secrets * Thu May 29 2014 Lokesh Mandvekar - 0.11.1-8 - don't use docker.sysconfig meant for sysvinit (just to avoid confusion) * Thu May 29 2014 Lokesh Mandvekar - 0.11.1-7 - install /etc/sysconfig/docker for additional args - use branch 2014-05-29 with modified secrets dir path * Thu May 29 2014 Lokesh Mandvekar - 0.11.1-6 - secret store patch * Thu May 22 2014 Lokesh Mandvekar - 0.11.1-5 - native driver: add required capabilities (dotcloud issue #5928) * Thu May 22 2014 Lokesh Mandvekar - 0.11.1-4 - branch 2014-05-22 - rename rhel-dockerfiles dir to dockerfiles * Wed May 21 2014 Lokesh Mandvekar - 0.11.1-3 - mount /run with correct selinux label * Mon May 19 2014 Lokesh Mandvekar - 0.11.1-2 - add btrfs * Mon May 19 2014 Lokesh Mandvekar - 0.11.1-1 - use latest master - branch: https://github.com/lsm5/docker/commits/2014-05-09-2 * Mon May 19 2014 Lokesh Mandvekar - 0.10.0-13 - add registry search list patch * Wed May 14 2014 Lokesh Mandvekar - 0.10.0-12 - include dockerfiles for postgres, systemd/{httpd,mariadb} * Mon May 12 2014 Lokesh Mandvekar - 0.10.0-11 - add apache, mariadb and mongodb dockerfiles - branch 2014-05-12 * Fri May 09 2014 Lokesh Mandvekar - 0.10.0-10 - add rhel-dockerfile/mongodb * Fri May 09 2014 Lokesh Mandvekar - 0.10.0-9 - use branch: https://github.com/lsm5/docker/commits/2014-05-09 - install rhel-dockerfile for apache - cleanup: get rid of conditionals - libcontainer: create dirs/files as needed for bind mounts * Thu May 08 2014 Lokesh Mandvekar - 0.10.0-8 - fix docker top * Tue May 06 2014 Lokesh Mandvekar - 0.10.0-7 - set container pid for process in native driver * Tue May 06 2014 Lokesh Mandvekar - 0.10.0-6 - ensure upstream PR #5529 is included * Mon May 05 2014 Lokesh Mandvekar - 0.10.0-5 - block push to docker index * Thu May 01 2014 Lokesh Mandvekar - 0.10.0-4 - enable selinux in unitfile * Thu May 01 2014 Lokesh Mandvekar - 0.10.0-3 - branch https://github.com/lsm5/docker/commits/2014-05-01-2 * Thu May 01 2014 Lokesh Mandvekar - 0.10.0-2 - branch https://github.com/lsm5/docker/tree/2014-05-01 * Fri Apr 25 2014 Lokesh Mandvekar - 0.10.0-1 - renamed (docker-io -> docker) - 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) * Tue Apr 08 2014 Lokesh Mandvekar - 0.9.1-4.collider - manpages merged, some more patches from alex * Thu Apr 03 2014 Lokesh Mandvekar - 0.9.1-3.collider - fix --volumes-from mount failure, include docker-images/info/tag manpages * Tue Apr 01 2014 Lokesh Mandvekar - 0.9.1-2.collider - solve deadlock issue * Mon Mar 31 2014 Lokesh Mandvekar - 0.9.1-1.collider - branch 2014-03-28, include additional docker manpages from whenry * Thu Mar 27 2014 Lokesh Mandvekar - 0.9.0-7.collider - env file support (vbatts) * Mon Mar 17 2014 Lokesh Mandvekar - 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 - 0.9.0-5.collider - add kraman's container-pid.patch * Fri Mar 14 2014 Lokesh Mandvekar - 0.9.0-4.collider - require docker.socket in unitfile * Thu Mar 13 2014 Lokesh Mandvekar - 0.9.0-3.collider - use systemd socket activation * Wed Mar 12 2014 Lokesh Mandvekar - 0.9.0-2.collider - add collider tag to release field * Tue Mar 11 2014 Lokesh Mandvekar - 0.9.0-1 - upstream version bump to 0.9.0 * Mon Mar 10 2014 Lokesh Mandvekar - 0.8.1-3 - add alexl's patches upto af9bb2e3d37fcddd5e041d6ae45055f649e2fbd4 - add guelfey/go.dbus to BR * Sun Mar 09 2014 Lokesh Mandvekar - 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 - 0.8.1-1 - Bug 1066841 - upstream version bump to v0.8.1 - use sysvinit files from upstream contrib - BR golang >= 1.2-7 * Thu Feb 13 2014 Adam Miller - 0.8.0-3 - Remove unneeded sysctl settings in initscript https://github.com/dotcloud/docker/pull/4125 * Sat Feb 08 2014 Lokesh Mandvekar - 0.8.0-2 - ignore btrfs for rhel7 and clones for now - include vim syntax highlighting from contrib/syntax/vim * Wed Feb 05 2014 Lokesh Mandvekar - 0.8.0-1 - upstream version bump - don't use btrfs for rhel6 and clones (yet) * Mon Jan 20 2014 Lokesh Mandvekar - 0.7.6-2 - bridge-utils only for rhel < 7 - discard freespace when image is removed * Thu Jan 16 2014 Lokesh Mandvekar - 0.7.6-1 - upstream version bump v0.7.6 - built with golang >= 1.2 * Thu Jan 09 2014 Lokesh Mandvekar - 0.7.5-1 - upstream version bump to 0.7.5 * Thu Jan 09 2014 Lokesh Mandvekar - 0.7.4-1 - upstream version bump to 0.7.4 (BZ #1049793) - udev rules file from upstream contrib - unit file firewalld not used, description changes * Mon Jan 06 2014 Lokesh Mandvekar - 0.7.3-3 - udev rules typo fixed (BZ 1048775) * Sat Jan 04 2014 Lokesh Mandvekar - 0.7.3-2 - missed commit value in release 1, updated now - upstream release monitoring (BZ 1048441) * Sat Jan 04 2014 Lokesh Mandvekar - 0.7.3-1 - upstream release bump to v0.7.3 * Thu Dec 19 2013 Lokesh Mandvekar - 0.7.2-2 - require xz to work with ubuntu images (BZ #1045220) * Wed Dec 18 2013 Lokesh Mandvekar - 0.7.2-1 - upstream release bump to v0.7.2 * Fri Dec 06 2013 Vincent Batts - 0.7.1-1 - upstream release of v0.7.1 * Mon Dec 02 2013 Lokesh Mandvekar - 0.7.0-14 - sysvinit patch corrected (epel only) - 80-docker.rules unified for udisks1 and udisks2 * Mon Dec 02 2013 Lokesh Mandvekar - 0.7.0-13 - removed firewall-cmd --add-masquerade * Sat Nov 30 2013 Lokesh Mandvekar - 0.7.0-12 - systemd for fedora >= 18 - firewalld in unit file changed from Requires to Wants - firewall-cmd --add-masquerade after docker daemon start in unit file (Michal Fojtik ), continue if not present (Michael Young ) - 80-docker.rules included for epel too, ENV variables need to be changed for udisks1 * Fri Nov 29 2013 Marek Goldmann - 0.7.0-11 - Redirect docker log to /var/log/docker (epel only) - Removed the '-b none' parameter from sysconfig, it's unnecessary since we create the bridge now automatically (epel only) - Make sure we have the cgconfig service started before we start docker, RHBZ#1034919 (epel only) * Thu Nov 28 2013 Lokesh Mandvekar - 0.7.0-10 - udev rules added for fedora >= 19 BZ 1034095 - epel testing pending * Thu Nov 28 2013 Lokesh Mandvekar - 0.7.0-9 - requires and started after firewalld * Thu Nov 28 2013 Lokesh Mandvekar - 0.7.0-8 - iptables-fix patch corrected * Thu Nov 28 2013 Lokesh Mandvekar - 0.7.0-7 - use upstream tarball and patch with mgoldman's commit * Thu Nov 28 2013 Lokesh Mandvekar - 0.7.0-6 - using mgoldman's shortcommit value 0ff9bc1 for package (BZ #1033606) - https://github.com/dotcloud/docker/pull/2907 * Wed Nov 27 2013 Adam Miller - 0.7.0-5 - Fix up EL6 preun/postun to not fail on postun scripts * Wed Nov 27 2013 Lokesh Mandvekar - 0.7.0-4 - brctl patch for rhel <= 7 * Wed Nov 27 2013 Vincent Batts - 0.7.0-3 - Patch how the bridge network is set up on RHEL (BZ #1035436) * Wed Nov 27 2013 Vincent Batts - 0.7.0-2 - add libcgroup require (BZ #1034919) * Tue Nov 26 2013 Marek Goldmann - 0.7.0-1 - Upstream release 0.7.0 - Using upstream script to build the binary * Mon Nov 25 2013 Vincent Batts - 0.7-0.20.rc7 - correct the build time defines (bz#1026545). Thanks dan-fedora. * Fri Nov 22 2013 Adam Miller - 0.7-0.19.rc7 - Remove xinetd entry, added sysvinit * Fri Nov 22 2013 Lokesh Mandvekar - 0.7-0.18.rc7 - rc version bump * Wed Nov 20 2013 Lokesh Mandvekar - 0.7-0.17.rc6 - removed ExecStartPost lines from docker.service (BZ #1026045) - dockerinit listed in files * Wed Nov 20 2013 Vincent Batts - 0.7-0.16.rc6 - adding back the none bridge patch * Wed Nov 20 2013 Vincent Batts - 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 - 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 - 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 - 0.7-0.12.dm - dm branch - dockerinit -> docker-init * Tue Oct 22 2013 Lokesh Mandvekar - 0.7-0.11.rc4 - passing version information for docker build BZ #1017186 * Sat Oct 19 2013 Lokesh Mandvekar - 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 - 0.7-0.9.rc3 - lxc-docker version matches package version * Fri Oct 18 2013 Lokesh Mandvekar - 0.7-0.8.rc3 - double quotes removed from buildrequires as per existing golang rules * Fri Oct 11 2013 Lokesh Mandvekar - 0.7-0.7.rc3 - xinetd file renamed to docker.xinetd for clarity * Thu Oct 10 2013 Lokesh Mandvekar - 0.7-0.6.rc3 - patched for el6 to use sphinx-1.0-build * Wed Oct 09 2013 Lokesh Mandvekar - 0.7-0.5.rc3 - rc3 version bump - exclusivearch x86_64 * Wed Oct 09 2013 Lokesh Mandvekar - 0.7-0.4.rc2 - debuginfo not Go-ready yet, skipped * Wed Oct 09 2013 Lokesh Mandvekar - 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 - 0.7-2.rc2 - rc branch includes devmapper - el6 BZ #1015865 fix included * Sun Oct 06 2013 Lokesh Mandvekar - 0.7-1 - version bump, includes devicemapper - epel conditionals included - buildrequires sqlite-devel * Fri Oct 04 2013 Lokesh Mandvekar - 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 - 0.6.3-3.devicemapper - Docker rebuilt with latest kr/pty, first run issue solved * Fri Sep 27 2013 Marek Goldmann - 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 0.6.3-1.devicemapper - version bump - new version solves docker push issues * Tue Sep 24 2013 Lokesh Mandvekar 0.6.2-14.devicemapper - package requires lxc * Tue Sep 24 2013 Lokesh Mandvekar 0.6.2-13.devicemapper - package requires tar * Tue Sep 24 2013 Lokesh Mandvekar 0.6.2-12.devicemapper - /var/lib/docker installed - package also provides lxc-docker * Mon Sep 23 2013 Lokesh Mandvekar 0.6.2-11.devicemapper - better looking url * Mon Sep 23 2013 Lokesh Mandvekar 0.6.2-10.devicemapper - release tag changed to denote devicemapper patch * Mon Sep 23 2013 Lokesh Mandvekar 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 0.6.2-8 - install bash completion - use -v for go build to show progress * Sun Sep 22 2013 Matthew Miller 0.6.2-7 - build and install separate docker-init * Sun Sep 22 2013 Matthew Miller 0.6.2-4 - update to use new source-only golang lib packages * Sat Sep 21 2013 Lokesh Mandvekar 0.6.2-3 - man page generation from docs/. - systemd service file created - dotcloud/tar no longer required * Fri Sep 20 2013 Lokesh Mandvekar 0.6.2-2 - patched with alex larsson's devmapper code * Wed Sep 18 2013 Lokesh Mandvekar 0.6.2-1 - Version bump * Tue Sep 10 2013 Lokesh Mandvekar 0.6.1-2 - buildrequires updated - package renamed to docker-io * Fri Aug 30 2013 Lokesh Mandvekar 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 0.5.3-5 - File permissions settings included * Wed Aug 28 2013 Lokesh Mandvekar 0.5.3-4 - Credits in changelog modified as per reference's request * Tue Aug 27 2013 Lokesh Mandvekar 0.5.3-3 - Dependencies listed as rpm packages instead of tars - Install section added * Mon Aug 26 2013 Lokesh Mandvekar 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 0.5.3-1 - Initial fedora package - Some credit to Elan Ruusamäe (glen@pld-linux.org)