]> git.pld-linux.org Git - packages/docker.git/blame - docker.spec
point to docker-ce.spec
[packages/docker.git] / docker.spec
CommitLineData
a73bca1d 1#
ca9b0f1b
ER
2# abandoned, since 17.x, use docker-ce.spec
3# https://blog.docker.com/2017/04/introducing-the-moby-project/
4#
a73bca1d
ER
5# Conditional build:
6%bcond_with tests # build without tests
de893b83 7%bcond_with vim # build vim syntax package (bundled in vim 7.4.979-2)
b317146a 8%bcond_with doc # build manual pages
b2c07037 9
be6486fd
ER
10# NOTES
11# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
12
440e6b79
ER
13# v1.0.0-rc2-133-g9df8b30
14%define runc_commit 9df8b30
15# v0.2.3-85-gaa8187d
16%define containerd_commit aa8187d
a75f03e6
ER
17# v0.8.0-dev.2-464-g0f53435
18%define libnetwork_commit 0f53435
08ac500c 19#define subver -rc7
f4565fa4 20Summary: Docker: the open-source application container engine
47009a45 21Name: docker
440e6b79 22Version: 1.13.1
8672584e 23Release: 2
b877f7b7
ER
24License: Apache v2.0
25Group: Applications/System
2e523ef0 26# https://github.com/docker/docker/releases
08ac500c 27Source0: https://github.com/docker/docker/archive/v%{version}/%{name}-%{version}.tar.gz
440e6b79 28# Source0-md5: 032c39b2390a0f387cdb49bab8c4c712
7c769496 29Source1: https://github.com/docker/runc/archive/%{runc_commit}/runc-%{runc_commit}.tar.gz
440e6b79 30# Source1-md5: 43ee79eaf575db8a212058c30997e45d
36f21c65 31Source2: https://github.com/docker/containerd/archive/%{containerd_commit}/containerd-%{containerd_commit}.tar.gz
440e6b79 32# Source2-md5: 01c58df940b94910996ecb8096fd8b71
a75f03e6
ER
33Source3: https://github.com/docker/libnetwork/archive/%{libnetwork_commit}/libnetwork-%{libnetwork_commit}.tar.gz
34# Source3-md5: 7cfbfe76355aae3577c77a6a4b2c92db
b96d9f58
ER
35Source4: https://github.com/krallin/tini/archive/v0.13.0/tini-0.13.0.tar.gz
36# Source4-md5: c29541112a242c53c82bb6b1213f288f
37Source5: %{name}d.sh
5fcaa458
JK
38Source7: %{name}.init
39Source8: %{name}.sysconfig
b6f967da 40Patch0: systemd.patch
35e5a999 41URL: http://www.docker.com/
be6486fd 42BuildRequires: btrfs-progs-devel >= 3.16.1
6dee0436 43BuildRequires: cmake
be6486fd 44BuildRequires: device-mapper-devel >= 2.02.89
d9a3d699 45BuildRequires: golang >= 1.6
be6486fd 46BuildRequires: libseccomp-devel >= 2.2.1
0be68701 47BuildRequires: rpmbuild(macros) >= 1.644
678a84bd 48BuildRequires: sqlite3-devel >= 3.7.9
d88043a2
ER
49Requires(post,preun): /sbin/chkconfig
50Requires(postun): /usr/sbin/groupdel
51Requires(pre): /usr/bin/getgid
52Requires(pre): /usr/sbin/groupadd
27e7cc0f 53Requires: ca-certificates
2e42e913 54Requires: iproute2 >= 3.5
b5920dfc 55Requires: iptables
345101bd 56Requires: rc-scripts >= 0.4.0.10
0be68701 57Requires: systemd-units >= 38
2e42e913 58Requires: tar >= 1:1.26
2015cb19 59Requires: uname(release) >= 3.8
db150373 60Requires: xz
65777843 61Suggests: docker-credential-helpers
2e42e913 62Suggests: git-core >= 1.7
46a6d8ab 63Suggests: libcgroup
2e42e913 64Suggests: xz >= 1:4.9
8672584e 65Provides: docker(engine) = %{version}
d88043a2 66Provides: group(docker)
47009a45 67Obsoletes: lxc-docker < 1.1.1
d2670441 68# only runs on x64 hosts for now:
f4565fa4
ER
69# https://github.com/docker/docker/issues/136
70# https://github.com/docker/docker/issues/611
345101bd 71ExclusiveArch: %{x8664}
b877f7b7
ER
72BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73
8c352669 74%define bash_compdir %{_datadir}/bash-completion/completions
a6da47b4 75%define zsh_compdir %{_datadir}/zsh/site-functions
f891ae41 76%define _vimdatadir %{_datadir}/vim
a990be6d 77%define _libexecdir %{_prefix}/lib
8c352669 78
434d66d3
ER
79# binary stripped or something
80%define _enable_debug_packages 0
81
b877f7b7 82%description
f4565fa4
ER
83Docker is an open source project to pack, ship and run any application
84as a lightweight container
85
86Docker containers are both hardware-agnostic and platform-agnostic.
87This means that they can run anywhere, from your laptop to the largest
88EC2 compute instance and everything in between - and they don't
89require that you use a particular language, framework or packaging
90system. That makes them great building blocks for deploying and
91scaling web apps, databases and backend services without depending on
92a particular stack or provider.
93
94Docker is an open-source implementation of the deployment engine which
95powers dotCloud, a popular Platform-as-a-Service. It benefits directly
96from the experience accumulated over several years of large-scale
97operation and support of hundreds of thousands of applications and
98databases.
b877f7b7 99
f891ae41 100%package -n bash-completion-%{name}
8c352669
ER
101Summary: bash-completion for Docker
102Summary(pl.UTF-8): bashowe uzupełnianie nazw dla Dockera
103Group: Applications/Shells
104Requires: %{name}
105Requires: bash-completion >= 2.0
47009a45 106Obsoletes: bash-completion-lxc-docker < 1.1.1
8c352669
ER
107%if "%{_rpmversion}" >= "5"
108BuildArch: noarch
109%endif
110
47009a45 111%description -n bash-completion-%{name}
8c352669
ER
112This package provides bash-completion for Docker.
113
47009a45 114%description -n bash-completion-%{name} -l pl.UTF-8
8c352669
ER
115Pakiet ten dostarcza bashowe uzupełnianie nazw dla Dockera.
116
a6da47b4
JK
117%package -n zsh-completion-%{name}
118Summary: zsh completion for Docker
119Summary(pl.UTF-8): Uzupełnianie parametrów w zsh dla poleceń Dockera
120Group: Applications/Shells
121Requires: %{name}
122%if "%{_rpmversion}" >= "5"
123BuildArch: noarch
124%endif
125
126%description -n zsh-completion-%{name}
127This package provides zsh completion for Docker.
128
129%description -n zsh-completion-%{name} -l pl.UTF-8
130Pakiet ten dostarcza uzupełnianie w zsh dla poleceń Dockera.
131
f891ae41
ER
132%package -n vim-syntax-%{name}
133Summary: Vim syntax: Docker
134Group: Applications/Editors/Vim
135Requires: %{name} = %{version}-%{release}
136Requires: vim-rt >= 4:7.2.170
47009a45 137Obsoletes: vim-syntax-lxc-docker < 1.1.1
f891ae41
ER
138%if "%{_rpmversion}" >= "5"
139BuildArch: noarch
140%endif
141
142%description -n vim-syntax-%{name}
143This plugin provides syntax highlighting in Dockerfile.
144
b877f7b7 145%prep
b96d9f58 146%setup -q %{?subver:-n %{name}-%{version}%{subver}} -a1 -a2 -a3 -a4
36f21c65
ER
147mv runc-%{runc_commit}* runc
148mv containerd-%{containerd_commit}* containerd
a75f03e6 149mv libnetwork-%{libnetwork_commit}* libnetwork
b96d9f58 150mv tini-* tini
b6f967da 151%patch0 -p1
36f21c65 152
f4565fa4
ER
153install -d vendor/src/github.com/docker
154ln -s $(pwd) vendor/src/github.com/docker/docker
36f21c65 155ln -s $(pwd)/containerd containerd/vendor/src/github.com/docker/containerd
a75f03e6 156ln -s $(pwd)/libnetwork vendor/src/github.com/docker/libnetwork
b877f7b7 157
692548c0 158%build
440e6b79 159v=$(awk -F= '/^RUNC_COMMIT/ {print $2}' hack/dockerfile/binaries-commits)
36f21c65 160echo "$v" | grep "^%{runc_commit}"
440e6b79 161v=$(awk -F= '/^CONTAINERD_COMMIT/ {print $2}' hack/dockerfile/binaries-commits)
36f21c65 162echo "$v" | grep "^%{containerd_commit}"
440e6b79 163v=$(awk -F= '/^LIBNETWORK_COMMIT/ {print $2}' hack/dockerfile/binaries-commits)
a75f03e6 164echo "$v" | grep "^%{libnetwork_commit}"
36f21c65
ER
165
166export GOPATH=$(pwd)/vendor:$(pwd)/containerd/vendor
e4252f76 167export DOCKER_GITCOMMIT="pld/%{version}"
36f21c65
ER
168# build docker-runc
169%{__make} -C runc
170
171# build docker-containerd
172%{__make} -C containerd
173
a75f03e6 174# build docker-proxy
07732609 175go build -ldflags="-linkmode=external" \
a75f03e6
ER
176 -o docker-proxy \
177 github.com/docker/libnetwork/cmd/proxy
178
b96d9f58
ER
179# build docker-init
180cd tini
7397034b 181cmake .
b96d9f58
ER
182%{__make}
183cd ..
184
90544b12 185bash -x hack/make.sh dynbinary
b317146a
ER
186%if %{with doc}
187man/md2man-all.sh
188%endif
a73bca1d 189
b877f7b7
ER
190%install
191rm -rf $RPM_BUILD_ROOT
36f21c65 192install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man1,/etc/{rc.d/init.d,sysconfig},%{systemdunitdir}} \
a990be6d 193 $RPM_BUILD_ROOT%{_libexecdir} \
7b3be108 194 $RPM_BUILD_ROOT/var/lib/docker/{containers,execdriver,graph,image,init,network,swarm,tmp,trust,vfs,volumes}
e4252f76 195
4467217c 196install -p bundles/%{version}%{?subver}/dynbinary-client/docker-%{version}%{?subver} $RPM_BUILD_ROOT%{_bindir}/docker
4467217c 197install -p bundles/%{version}%{?subver}/dynbinary-daemon/dockerd-%{version}%{?subver} $RPM_BUILD_ROOT%{_sbindir}/dockerd
36f21c65
ER
198
199# install docker-runc
200install -p runc/runc $RPM_BUILD_ROOT%{_sbindir}/docker-runc
201
202# install docker-containerd
203install -p containerd/bin/containerd $RPM_BUILD_ROOT%{_sbindir}/docker-containerd
204install -p containerd/bin/containerd-shim $RPM_BUILD_ROOT%{_sbindir}/docker-containerd-shim
6a5abe01 205install -p containerd/bin/ctr $RPM_BUILD_ROOT%{_sbindir}/docker-containerd-ctr
36f21c65 206
a75f03e6
ER
207# install docker-proxy
208install -p docker-proxy $RPM_BUILD_ROOT%{_sbindir}/docker-proxy
209
b96d9f58
ER
210# install docker-init
211install -p tini/tini $RPM_BUILD_ROOT%{_sbindir}/docker-init
212
b6f967da
ER
213cp -p contrib/init/systemd/docker.service $RPM_BUILD_ROOT%{systemdunitdir}
214cp -p contrib/init/systemd/docker.socket $RPM_BUILD_ROOT%{systemdunitdir}
5fcaa458 215install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/docker
b96d9f58 216install -p %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/dockerd
5fcaa458 217cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/docker
b877f7b7 218
e4252f76
ER
219# install udev rules
220install -d $RPM_BUILD_ROOT/lib/udev/rules.d
221cp -p contrib/udev/80-docker.rules $RPM_BUILD_ROOT/lib/udev/rules.d
222
a6da47b4 223# bash and zsh completion
8c352669 224install -d $RPM_BUILD_ROOT%{bash_compdir}
47009a45 225cp -p contrib/completion/bash/docker $RPM_BUILD_ROOT%{bash_compdir}/docker
a6da47b4
JK
226install -d $RPM_BUILD_ROOT%{zsh_compdir}
227cp -p contrib/completion/zsh/_docker $RPM_BUILD_ROOT%{zsh_compdir}
8c352669 228
f891ae41 229# vim syntax
c590f8e8 230%if %{with vim}
f891ae41 231install -d $RPM_BUILD_ROOT%{_vimdatadir}
7db50491 232cp -a contrib/syntax/vim/* $RPM_BUILD_ROOT%{_vimdatadir}
f891ae41 233%{__rm} $RPM_BUILD_ROOT%{_vimdatadir}/{LICENSE,README.md}
c590f8e8 234%endif
f891ae41 235
d88043a2
ER
236%pre
237%groupadd -g 296 docker
238
345101bd
ER
239%post
240/sbin/chkconfig --add %{name}
241%service -n %{name} restart
2e523ef0 242%systemd_post %{name}.service
345101bd
ER
243
244%preun
245if [ "$1" = "0" ]; then
246 %service -q %{name} stop
247 /sbin/chkconfig --del %{name}
248fi
2e523ef0 249%systemd_preun %{name}.service
345101bd 250
d88043a2
ER
251%postun
252if [ "$1" = "0" ]; then
253 %groupremove docker
254fi
2e523ef0 255%systemd_reload
d88043a2 256
b877f7b7
ER
257%clean
258rm -rf $RPM_BUILD_ROOT
259
260%files
261%defattr(644,root,root,755)
f4565fa4 262%doc README.md CHANGELOG.md CONTRIBUTING.md LICENSE AUTHORS NOTICE MAINTAINERS
62b620a7 263%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/docker
47009a45 264%attr(754,root,root) /etc/rc.d/init.d/docker
9c77b76c 265%attr(755,root,root) %{_bindir}/docker
36f21c65 266%attr(755,root,root) %{_sbindir}/docker-containerd
6a5abe01 267%attr(755,root,root) %{_sbindir}/docker-containerd-ctr
36f21c65 268%attr(755,root,root) %{_sbindir}/docker-containerd-shim
b96d9f58 269%attr(755,root,root) %{_sbindir}/docker-init
4467217c
ER
270%attr(755,root,root) %{_sbindir}/docker-proxy
271%attr(755,root,root) %{_sbindir}/docker-runc
272%attr(755,root,root) %{_sbindir}/dockerd
29baba5b 273%attr(755,root,root) %{_libexecdir}/dockerd
62b620a7 274%{systemdunitdir}/docker.service
5fcaa458 275%{systemdunitdir}/docker.socket
e4252f76 276/lib/udev/rules.d/80-docker.rules
36f21c65 277
af991618
ER
278%dir %attr(700,root,root) /var/lib/docker
279%dir %attr(700,root,root) /var/lib/docker/containers
b73b275e 280%dir %attr(700,root,root) /var/lib/docker/execdriver
af991618 281%dir %attr(700,root,root) /var/lib/docker/graph
841676f2 282%dir %attr(700,root,root) /var/lib/docker/image
b73b275e 283%dir %attr(700,root,root) /var/lib/docker/init
841676f2 284%dir %attr(700,root,root) /var/lib/docker/network
7b3be108 285%dir %attr(700,root,root) /var/lib/docker/swarm
b73b275e
ER
286%dir %attr(700,root,root) /var/lib/docker/tmp
287%dir %attr(700,root,root) /var/lib/docker/trust
288%dir %attr(700,root,root) /var/lib/docker/vfs
af991618 289%dir %attr(700,root,root) /var/lib/docker/volumes
8c352669 290
f891ae41 291%files -n bash-completion-%{name}
8c352669 292%defattr(644,root,root,755)
8c352669 293%{bash_compdir}/docker
f891ae41 294
a6da47b4
JK
295%files -n zsh-completion-%{name}
296%defattr(644,root,root,755)
297%{zsh_compdir}/_docker
298
c590f8e8 299%if %{with vim}
f891ae41
ER
300%files -n vim-syntax-%{name}
301%defattr(644,root,root,755)
7db50491 302%doc contrib/syntax/vim/{README.md,LICENSE}
f891ae41
ER
303%{_vimdatadir}/doc/dockerfile.txt
304%{_vimdatadir}/ftdetect/dockerfile.vim
305%{_vimdatadir}/syntax/dockerfile.vim
c590f8e8 306%endif
This page took 0.075188 seconds and 4 git commands to generate.