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