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