]> git.pld-linux.org Git - packages/docker.git/blobdiff - docker.spec
point to docker-ce.spec
[packages/docker.git] / docker.spec
index 7800e34f7d8b266802e0b3a2e0b3b5339cc60ffd..4dbf07376ffbe5bedffbe36b52eefb36ea55507b 100644 (file)
 #
+# abandoned, since 17.x, use docker-ce.spec
+# https://blog.docker.com/2017/04/introducing-the-moby-project/
+#
 # Conditional build:
 %bcond_with    tests           # build without tests
+%bcond_with    vim                     # build vim syntax package (bundled in vim 7.4.979-2)
+%bcond_with    doc                     # build manual pages
+
+# NOTES
+# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
 
-Summary:       Docker: the Linux container engine
+# v1.0.0-rc2-133-g9df8b30
+%define        runc_commit 9df8b30
+# v0.2.3-85-gaa8187d
+%define        containerd_commit aa8187d
+# v0.8.0-dev.2-464-g0f53435
+%define        libnetwork_commit 0f53435
+#define        subver -rc7
+Summary:       Docker: the open-source application container engine
 Name:          docker
-Version:       1.1.2
-Release:       0.1
+Version:       1.13.1
+Release:       2
 License:       Apache v2.0
 Group:         Applications/System
-Source0:       https://github.com/dotcloud/docker/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 2e02d5288ecd6cbd9a6c3e4fd3b81ffc
-Source5:       %{name}.service
-Source6:       %{name}.init
-URL:           http://github.com/dotcloud/docker
-BuildRequires: btrfs-progs-devel
-BuildRequires: device-mapper-devel
-BuildRequires: golang >= 1.2.1
-BuildRequires: rpmbuild(macros) >= 1.228
+# https://github.com/docker/docker/releases
+Source0:       https://github.com/docker/docker/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 032c39b2390a0f387cdb49bab8c4c712
+Source1:       https://github.com/docker/runc/archive/%{runc_commit}/runc-%{runc_commit}.tar.gz
+# Source1-md5: 43ee79eaf575db8a212058c30997e45d
+Source2:       https://github.com/docker/containerd/archive/%{containerd_commit}/containerd-%{containerd_commit}.tar.gz
+# Source2-md5: 01c58df940b94910996ecb8096fd8b71
+Source3:       https://github.com/docker/libnetwork/archive/%{libnetwork_commit}/libnetwork-%{libnetwork_commit}.tar.gz
+# Source3-md5: 7cfbfe76355aae3577c77a6a4b2c92db
+Source4:       https://github.com/krallin/tini/archive/v0.13.0/tini-0.13.0.tar.gz
+# Source4-md5: c29541112a242c53c82bb6b1213f288f
+Source5:       %{name}d.sh
+Source7:       %{name}.init
+Source8:       %{name}.sysconfig
+Patch0:                systemd.patch
+URL:           http://www.docker.com/
+BuildRequires: btrfs-progs-devel >= 3.16.1
+BuildRequires: cmake
+BuildRequires: device-mapper-devel >= 2.02.89
+BuildRequires: golang >= 1.6
+BuildRequires: libseccomp-devel >= 2.2.1
+BuildRequires: rpmbuild(macros) >= 1.644
 BuildRequires: sqlite3-devel >= 3.7.9
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
+Requires:      ca-certificates
 Requires:      iproute2 >= 3.5
 Requires:      iptables
-Requires:      lxc >= 0.8
 Requires:      rc-scripts >= 0.4.0.10
+Requires:      systemd-units >= 38
 Requires:      tar >= 1:1.26
 Requires:      uname(release) >= 3.8
 Requires:      xz
+Suggests:      docker-credential-helpers
 Suggests:      git-core >= 1.7
 Suggests:      libcgroup
 Suggests:      xz >= 1:4.9
+Provides:      docker(engine) = %{version}
 Provides:      group(docker)
 Obsoletes:     lxc-docker < 1.1.1
-Patch0:                lxc-%{name}-nosha.patch
 # only runs on x64 hosts for now:
-# https://github.com/dotcloud/docker/issues/136
-# https://github.com/dotcloud/docker/issues/611
+# https://github.com/docker/docker/issues/136
+# https://github.com/docker/docker/issues/611
 ExclusiveArch: %{x8664}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                bash_compdir    %{_datadir}/bash-completion/completions
+%define                zsh_compdir     %{_datadir}/zsh/site-functions
 %define                _vimdatadir             %{_datadir}/vim
+%define                _libexecdir             %{_prefix}/lib
 
 # binary stripped or something
 %define                _enable_debug_packages 0
 
 %description
-Docker complements LXC with a high-level API which operates at the
-process level. It runs unix processes with strong guarantees of
-isolation and repeatability across servers.
+Docker is an open source project to pack, ship and run any application
+as a lightweight container
 
-Docker is a great building block for automating distributed systems:
-large-scale web deployments, database clusters, continuous deployment
-systems, private PaaS, service-oriented architectures, etc.
+Docker containers are both hardware-agnostic and platform-agnostic.
+This means that they can run anywhere, from your laptop to the largest
+EC2 compute instance and everything in between - and they don't
+require that you use a particular language, framework or packaging
+system. That makes them great building blocks for deploying and
+scaling web apps, databases and backend services without depending on
+a particular stack or provider.
+
+Docker is an open-source implementation of the deployment engine which
+powers dotCloud, a popular Platform-as-a-Service. It benefits directly
+from the experience accumulated over several years of large-scale
+operation and support of hundreds of thousands of applications and
+databases.
 
 %package -n bash-completion-%{name}
 Summary:       bash-completion for Docker
@@ -73,6 +114,21 @@ This package provides bash-completion for Docker.
 %description -n bash-completion-%{name} -l pl.UTF-8
 Pakiet ten dostarcza bashowe uzupełnianie nazw dla Dockera.
 
+%package -n zsh-completion-%{name}
+Summary:       zsh completion for Docker
+Summary(pl.UTF-8):     Uzupełnianie parametrów w zsh dla poleceń Dockera
+Group:         Applications/Shells
+Requires:      %{name}
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description -n zsh-completion-%{name}
+This package provides zsh completion for Docker.
+
+%description -n zsh-completion-%{name} -l pl.UTF-8
+Pakiet ten dostarcza uzupełnianie w zsh dla poleceń Dockera.
+
 %package -n vim-syntax-%{name}
 Summary:       Vim syntax: Docker
 Group:         Applications/Editors/Vim
@@ -87,41 +143,95 @@ BuildArch: noarch
 This plugin provides syntax highlighting in Dockerfile.
 
 %prep
-%setup -q
+%setup -q %{?subver:-n %{name}-%{version}%{subver}} -a1 -a2 -a3 -a4
+mv runc-%{runc_commit}* runc
+mv containerd-%{containerd_commit}* containerd
+mv libnetwork-%{libnetwork_commit}* libnetwork
+mv tini-* tini
 %patch0 -p1
 
-install -d vendor/src/github.com/dotcloud
-ln -s $(pwd) vendor/src/github.com/dotcloud/docker
+install -d vendor/src/github.com/docker
+ln -s $(pwd) vendor/src/github.com/docker/docker
+ln -s $(pwd)/containerd containerd/vendor/src/github.com/docker/containerd
+ln -s $(pwd)/libnetwork vendor/src/github.com/docker/libnetwork
 
 %build
-export GOPATH=$(pwd)/vendor
-install -d build
-cd build
-VERSION=%{version}
-GITCOMMIT=pld-%{version}-%{release} # use RPM_PACKAGE_RELEASE for this
-# Use these flags when compiling the tests and final binary
-# without '-d', as that fails now
-LDFLAGS="-X github.com/dotcloud/docker/dockerversion.GITCOMMIT $GITCOMMIT -X github.com/dotcloud/docker/dockerversion.VERSION $VERSION -w"
-go build -v -ldflags "$LDFLAGS" -a github.com/dotcloud/docker/docker
-go build -v -ldflags "$LDFLAGS" -a ../dockerinit/dockerinit.go
+v=$(awk -F= '/^RUNC_COMMIT/ {print $2}' hack/dockerfile/binaries-commits)
+echo "$v" | grep "^%{runc_commit}"
+v=$(awk -F= '/^CONTAINERD_COMMIT/ {print $2}' hack/dockerfile/binaries-commits)
+echo "$v" | grep "^%{containerd_commit}"
+v=$(awk -F= '/^LIBNETWORK_COMMIT/ {print $2}' hack/dockerfile/binaries-commits)
+echo "$v" | grep "^%{libnetwork_commit}"
+
+export GOPATH=$(pwd)/vendor:$(pwd)/containerd/vendor
+export DOCKER_GITCOMMIT="pld/%{version}"
+# build docker-runc
+%{__make} -C runc
+
+# build docker-containerd
+%{__make} -C containerd
+
+# build docker-proxy
+go build -ldflags="-linkmode=external" \
+       -o docker-proxy \
+       github.com/docker/libnetwork/cmd/proxy
+
+# build docker-init
+cd tini
+cmake .
+%{__make}
+cd ..
+
+bash -x hack/make.sh dynbinary
+%if %{with doc}
+man/md2man-all.sh
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,/etc/rc.d/init.d,%{systemdunitdir},/var/lib/docker/{containers,graph,volumes}}
-install -p build/docker $RPM_BUILD_ROOT%{_bindir}/docker
-install -p build/dockerinit $RPM_BUILD_ROOT%{_bindir}/dockerinit
-install -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}
-install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/docker
-#cp -p packaging/debian/lxc-docker.1 $RPM_BUILD_ROOT%{_mandir}/man1
-
-# bash completion
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man1,/etc/{rc.d/init.d,sysconfig},%{systemdunitdir}} \
+       $RPM_BUILD_ROOT%{_libexecdir} \
+       $RPM_BUILD_ROOT/var/lib/docker/{containers,execdriver,graph,image,init,network,swarm,tmp,trust,vfs,volumes}
+
+install -p bundles/%{version}%{?subver}/dynbinary-client/docker-%{version}%{?subver} $RPM_BUILD_ROOT%{_bindir}/docker
+install -p bundles/%{version}%{?subver}/dynbinary-daemon/dockerd-%{version}%{?subver} $RPM_BUILD_ROOT%{_sbindir}/dockerd
+
+# install docker-runc
+install -p runc/runc $RPM_BUILD_ROOT%{_sbindir}/docker-runc
+
+# install docker-containerd
+install -p containerd/bin/containerd $RPM_BUILD_ROOT%{_sbindir}/docker-containerd
+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
+
+# install docker-proxy
+install -p docker-proxy $RPM_BUILD_ROOT%{_sbindir}/docker-proxy
+
+# install docker-init
+install -p tini/tini $RPM_BUILD_ROOT%{_sbindir}/docker-init
+
+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 %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/dockerd
+cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/docker
+
+# install udev rules
+install -d $RPM_BUILD_ROOT/lib/udev/rules.d
+cp -p contrib/udev/80-docker.rules $RPM_BUILD_ROOT/lib/udev/rules.d
+
+# bash and zsh completion
 install -d $RPM_BUILD_ROOT%{bash_compdir}
 cp -p contrib/completion/bash/docker $RPM_BUILD_ROOT%{bash_compdir}/docker
+install -d $RPM_BUILD_ROOT%{zsh_compdir}
+cp -p contrib/completion/zsh/_docker $RPM_BUILD_ROOT%{zsh_compdir}
 
 # vim syntax
+%if %{with vim}
 install -d $RPM_BUILD_ROOT%{_vimdatadir}
 cp -a contrib/syntax/vim/* $RPM_BUILD_ROOT%{_vimdatadir}
 %{__rm} $RPM_BUILD_ROOT%{_vimdatadir}/{LICENSE,README.md}
+%endif
 
 %pre
 %groupadd -g 296 docker
@@ -129,41 +239,68 @@ cp -a contrib/syntax/vim/* $RPM_BUILD_ROOT%{_vimdatadir}
 %post
 /sbin/chkconfig --add %{name}
 %service -n %{name} restart
+%systemd_post %{name}.service
 
 %preun
 if [ "$1" = "0" ]; then
        %service -q %{name} stop
        /sbin/chkconfig --del %{name}
 fi
+%systemd_preun %{name}.service
 
 %postun
 if [ "$1" = "0" ]; then
        %groupremove docker
 fi
+%systemd_reload
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc README.md CHANGELOG.md CONTRIBUTING.md FIXME LICENSE AUTHORS NOTICE MAINTAINERS
-%{systemdunitdir}/docker.service
+%doc README.md CHANGELOG.md CONTRIBUTING.md LICENSE AUTHORS NOTICE MAINTAINERS
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/docker
 %attr(754,root,root) /etc/rc.d/init.d/docker
 %attr(755,root,root) %{_bindir}/docker
-%attr(755,root,root) %{_bindir}/dockerinit
-#%{_mandir}/man1/lxc-docker.1*
+%attr(755,root,root) %{_sbindir}/docker-containerd
+%attr(755,root,root) %{_sbindir}/docker-containerd-ctr
+%attr(755,root,root) %{_sbindir}/docker-containerd-shim
+%attr(755,root,root) %{_sbindir}/docker-init
+%attr(755,root,root) %{_sbindir}/docker-proxy
+%attr(755,root,root) %{_sbindir}/docker-runc
+%attr(755,root,root) %{_sbindir}/dockerd
+%attr(755,root,root) %{_libexecdir}/dockerd
+%{systemdunitdir}/docker.service
+%{systemdunitdir}/docker.socket
+/lib/udev/rules.d/80-docker.rules
+
 %dir %attr(700,root,root) /var/lib/docker
 %dir %attr(700,root,root) /var/lib/docker/containers
+%dir %attr(700,root,root) /var/lib/docker/execdriver
 %dir %attr(700,root,root) /var/lib/docker/graph
+%dir %attr(700,root,root) /var/lib/docker/image
+%dir %attr(700,root,root) /var/lib/docker/init
+%dir %attr(700,root,root) /var/lib/docker/network
+%dir %attr(700,root,root) /var/lib/docker/swarm
+%dir %attr(700,root,root) /var/lib/docker/tmp
+%dir %attr(700,root,root) /var/lib/docker/trust
+%dir %attr(700,root,root) /var/lib/docker/vfs
 %dir %attr(700,root,root) /var/lib/docker/volumes
 
 %files -n bash-completion-%{name}
 %defattr(644,root,root,755)
 %{bash_compdir}/docker
 
+%files -n zsh-completion-%{name}
+%defattr(644,root,root,755)
+%{zsh_compdir}/_docker
+
+%if %{with vim}
 %files -n vim-syntax-%{name}
 %defattr(644,root,root,755)
 %doc contrib/syntax/vim/{README.md,LICENSE}
 %{_vimdatadir}/doc/dockerfile.txt
 %{_vimdatadir}/ftdetect/dockerfile.vim
 %{_vimdatadir}/syntax/dockerfile.vim
+%endif
This page took 0.03325 seconds and 4 git commands to generate.