]>
Commit | Line | Data |
---|---|---|
67c70229 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without seccomp # SecComp syscall filter | |
ccd4948a | 4 | %bcond_without apparmor # apparmor |
67c70229 JB |
5 | %bcond_without lua # Lua binding |
6 | %bcond_without python # Python binding | |
120ac263 | 7 | %bcond_with selinux # SELinux |
21c5c666 | 8 | |
120ac263 | 9 | %define subver beta1 |
247c2ba9 ER |
10 | %define rel 0.1 |
11 | Summary: Linux Containers userspace tools | |
67c70229 | 12 | Summary(pl.UTF-8): Narzędzia do kontenerów linuksowych (LXC) |
0886a606 | 13 | Name: lxc |
247c2ba9 ER |
14 | Version: 1.0.0 |
15 | Release: 0.%{subver}.%{rel} | |
c34ce688 | 16 | License: LGPL v2.1+ |
67c70229 | 17 | Group: Applications/System |
247c2ba9 | 18 | Source0: https://github.com/lxc/lxc/archive/%{name}-%{version}.%{subver}.tar.gz |
120ac263 | 19 | # Source0-md5: 82ddad563fe31b80595543d838788551 |
adc39309 | 20 | Source1: %{name}-pld.in.sh |
67c70229 | 21 | Patch1: %{name}-pld.patch |
bf6a07ce | 22 | Patch4: checkconfig-vserver-config.patch |
247c2ba9 | 23 | URL: http://linuxcontainers.org/ |
67c70229 JB |
24 | BuildRequires: autoconf >= 2.50 |
25 | BuildRequires: automake | |
e5afa52e | 26 | BuildRequires: docbook-dtd30-sgml |
27 | BuildRequires: docbook-utils | |
21c5c666 | 28 | BuildRequires: docbook2X |
ccd4948a | 29 | %{?with_apparmor:BuildRequires: libapparmor-devel} |
4e32c712 | 30 | BuildRequires: libcap-devel |
67c70229 JB |
31 | %{?with_seccomp:BuildRequires: libseccomp-devel} |
32 | %{?with_lua:BuildRequires: lua51-devel >= 5.1} | |
33 | BuildRequires: pkgconfig | |
34 | %{?with_python:BuildRequires: python3-devel >= 3.2} | |
35 | BuildRequires: rpmbuild(macros) >= 1.612 | |
c34ce688 | 36 | BuildRequires: sed >= 4.0 |
7e514b06 | 37 | Requires: rc-scripts >= 0.4.6 |
adc39309 | 38 | Requires: which |
21c5c666 | 39 | Suggests: net-tools |
b335abc0 | 40 | Suggests: rsync |
0886a606 AM |
41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
42 | ||
e5afa52e | 43 | %define configpath /var/lib/lxc |
44 | ||
0886a606 AM |
45 | %description |
46 | Tools to create and manage containers. It contains a full featured | |
47 | container with the isolation / virtualization of the pids, the ipc, | |
48 | the utsname, the mount points, /proc, /sys, the network and it takes | |
49 | into account the control groups. It is very light, flexible, and | |
50 | provides a set of tools around the container like the monitoring with | |
51 | asynchronous events notification, or the freeze of the container. This | |
52 | package is useful to create Virtual Private Server, or to run isolated | |
53 | applications like bash or sshd. | |
54 | ||
67c70229 JB |
55 | %description -l pl.UTF-8 |
56 | Narzędzia do tworzenia i zarządzania kontenerami. System ten obejmuje | |
57 | w pełni funkcjonalne kontenery z ilozacją/wirtualizacją pidów, ipc, | |
58 | utsname, punktów montowania, /proc, /sys, sieci oraz uwzględniające | |
59 | grupy kontrolne. Jest bardzo lekki, elastyczny i udostępnia narzędzia | |
60 | do czynności związanych z kontenerami, takich jak monitorowanie z | |
61 | asynchronicznym powiadamianiem o zdarzeniach czy zamrażanie. Ten | |
62 | pakiet jest przydatny do tworzenia wirtualnych serwerów prywatnych | |
63 | oraz uruchamiania izolowanych aplikacji, takich jak bash czy sshd. | |
64 | ||
0886a606 | 65 | %package devel |
67c70229 JB |
66 | Summary: Header files for lxc library |
67 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki lxc | |
0886a606 | 68 | Group: Development/Libraries |
67c70229 | 69 | Requires: %{name} = %{version}-%{release} |
0886a606 AM |
70 | |
71 | %description devel | |
67c70229 JB |
72 | Header files for lxc library. |
73 | ||
74 | %description devel -l pl.UTF-8 | |
75 | Pliki nagłówkowe biblioteki lxc. | |
76 | ||
77 | %package -n lua-lxc | |
78 | Summary: Lua binding for LXC | |
79 | Summary(pl.UTF-8): Wiązanie Lua do LXC | |
80 | Group: Libraries | |
81 | Requires: %{name} = %{version}-%{release} | |
82 | Requires: lua51-libs >= 5.1 | |
83 | ||
84 | %description -n lua-lxc | |
85 | Lua binding for LXC. | |
86 | ||
87 | %description -n lua-lxc -l pl.UTF-8 | |
88 | Wiązanie Lua do LXC. | |
89 | ||
90 | %package -n python3-lxc | |
91 | Summary: Python (3.x) binding for LXC | |
92 | Summary(pl.UTF-8): Wiązanie Pythona (3.x) do LXC | |
93 | Group: Libraries | |
94 | Requires: %{name} = %{version}-%{release} | |
95 | Requires: python3-libs >= 3.2 | |
91c8fae7 | 96 | Requires: python3-modules |
67c70229 JB |
97 | |
98 | %description -n python3-lxc | |
99 | Python (3.x) binding for LXC. | |
100 | ||
101 | %description -n python3-lxc -l pl.UTF-8 | |
102 | Wiązanie Pythona (3.x) do LXC. | |
0886a606 | 103 | |
0886a606 | 104 | %prep |
247c2ba9 | 105 | %setup -q -n %{name}-%{name}-%{version}%{?subver:.%{subver}} |
67c70229 | 106 | %patch1 -p1 |
bf6a07ce | 107 | %patch4 -p1 |
0886a606 | 108 | |
8a96554a ER |
109 | cp -p %{SOURCE1} templates/lxc-pld.in |
110 | ||
0886a606 | 111 | %build |
67c70229 JB |
112 | %{__aclocal} -I config |
113 | %{__autoconf} | |
114 | %{__autoheader} | |
115 | %{__automake} | |
e5afa52e | 116 | %configure \ |
67c70229 JB |
117 | db2xman=docbook2X2man \ |
118 | --disable-rpath \ | |
119 | --enable-doc \ | |
120ac263 | 120 | --enable-examples \ |
ccd4948a | 121 | %{__enable_disable apparmor} \ |
247c2ba9 | 122 | %{__enable_disable lua} %{?with_lua:--with-lua-pc=lua51} \ |
ccd4948a ER |
123 | %{__enable_disable python} \ |
124 | %{__enable_disable seccomp} \ | |
120ac263 | 125 | %{__enable_disable selinux} \ |
67c70229 | 126 | --with-config-path=%{configpath} \ |
120ac263 | 127 | --with-init-script=sysv,systemd \ |
67c70229 | 128 | --with-distro=pld |
0886a606 AM |
129 | |
130 | %{__make} | |
e5afa52e | 131 | %{__make} -C doc |
0886a606 AM |
132 | |
133 | %install | |
134 | rm -rf $RPM_BUILD_ROOT | |
f10dfb13 | 135 | install -d $RPM_BUILD_ROOT{%{configpath},/var/{cache,log}/lxc} |
0886a606 | 136 | %{__make} install \ |
e5afa52e | 137 | DESTDIR=$RPM_BUILD_ROOT \ |
138 | pcdatadir=%{_pkgconfigdir} | |
33aee790 | 139 | |
e5afa52e | 140 | %{__make} -C doc install \ |
0886a606 | 141 | DESTDIR=$RPM_BUILD_ROOT |
33aee790 | 142 | |
21c5c666 | 143 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir} |
0886a606 | 144 | |
67c70229 JB |
145 | %if %{with python} |
146 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc | |
147 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc | |
148 | %endif | |
c34ce688 JB |
149 | %if %{with lua} |
150 | %{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua51,' $RPM_BUILD_ROOT%{_bindir}/lxc-top | |
151 | %endif | |
67c70229 | 152 | |
0886a606 AM |
153 | %clean |
154 | rm -rf $RPM_BUILD_ROOT | |
155 | ||
67c70229 JB |
156 | %post -p /sbin/ldconfig |
157 | %postun -p /sbin/ldconfig | |
0886a606 AM |
158 | |
159 | %files | |
160 | %defattr(644,root,root,755) | |
247c2ba9 | 161 | %doc AUTHORS CONTRIBUTING MAINTAINERS README TODO doc/FAQ.txt doc/examples/*.conf |
c34ce688 JB |
162 | %attr(755,root,root) %{_bindir}/lxc-attach |
163 | %attr(755,root,root) %{_bindir}/lxc-cgroup | |
164 | %attr(755,root,root) %{_bindir}/lxc-checkconfig | |
165 | %attr(755,root,root) %{_bindir}/lxc-checkpoint | |
166 | %attr(755,root,root) %{_bindir}/lxc-clone | |
247c2ba9 | 167 | %attr(755,root,root) %{_bindir}/lxc-config |
c34ce688 JB |
168 | %attr(755,root,root) %{_bindir}/lxc-console |
169 | %attr(755,root,root) %{_bindir}/lxc-create | |
170 | %attr(755,root,root) %{_bindir}/lxc-destroy | |
171 | %attr(755,root,root) %{_bindir}/lxc-execute | |
172 | %attr(755,root,root) %{_bindir}/lxc-freeze | |
173 | %attr(755,root,root) %{_bindir}/lxc-info | |
174 | %attr(755,root,root) %{_bindir}/lxc-kill | |
175 | %attr(755,root,root) %{_bindir}/lxc-monitor | |
247c2ba9 | 176 | %attr(755,root,root) %{_bindir}/lxc-monitord |
c34ce688 JB |
177 | %attr(755,root,root) %{_bindir}/lxc-netstat |
178 | %attr(755,root,root) %{_bindir}/lxc-ps | |
179 | %attr(755,root,root) %{_bindir}/lxc-restart | |
247c2ba9 | 180 | %attr(755,root,root) %{_bindir}/lxc-snapshot |
c34ce688 JB |
181 | %attr(755,root,root) %{_bindir}/lxc-start |
182 | %attr(755,root,root) %{_bindir}/lxc-stop | |
183 | %attr(755,root,root) %{_bindir}/lxc-unfreeze | |
184 | %attr(755,root,root) %{_bindir}/lxc-unshare | |
247c2ba9 | 185 | %attr(755,root,root) %{_bindir}/lxc-user-nic |
120ac263 | 186 | %attr(755,root,root) %{_bindir}/lxc-usernsexec |
c34ce688 JB |
187 | %attr(755,root,root) %{_bindir}/lxc-version |
188 | %attr(755,root,root) %{_bindir}/lxc-wait | |
e5afa52e | 189 | %attr(755,root,root) %{_libdir}/liblxc.so.*.*.* |
247c2ba9 | 190 | %attr(755,root,root) %ghost %{_libdir}/liblxc.so.1 |
70f9d22b | 191 | %dir %{_libdir}/lxc |
70f9d22b | 192 | %dir %{_libdir}/lxc/rootfs |
67c70229 | 193 | %{_libdir}/lxc/rootfs/README |
70f9d22b | 194 | %attr(755,root,root) %{_libdir}/lxc/lxc-init |
dc9a5b3b | 195 | %dir %{_sysconfdir}/lxc |
67c70229 | 196 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf |
120ac263 | 197 | %dir %{_datadir}/%{name} |
f5933d47 | 198 | %{_datadir}/%{name}/lxc.functions |
120ac263 ER |
199 | %dir %{_datadir}/%{name}/config |
200 | %{_datadir}/%{name}/config/ubuntu*.conf | |
f5933d47 ER |
201 | %dir %{_datadir}/%{name}/hooks |
202 | %dir %{_datadir}/%{name}/templates | |
203 | %attr(755,root,root) %{_datadir}/%{name}/hooks/mount* | |
247c2ba9 ER |
204 | %attr(755,root,root) %{_datadir}/%{name}/hooks/clonehostname |
205 | %attr(755,root,root) %{_datadir}/%{name}/hooks/ubuntu-cloud-prep | |
f5933d47 | 206 | %attr(755,root,root) %{_datadir}/%{name}/templates/lxc-* |
c34ce688 JB |
207 | %{_mandir}/man1/lxc-attach.1* |
208 | %{_mandir}/man1/lxc-cgroup.1* | |
209 | %{_mandir}/man1/lxc-checkconfig.1* | |
210 | %{_mandir}/man1/lxc-checkpoint.1* | |
211 | %{_mandir}/man1/lxc-clone.1* | |
212 | %{_mandir}/man1/lxc-console.1* | |
213 | %{_mandir}/man1/lxc-create.1* | |
214 | %{_mandir}/man1/lxc-destroy.1* | |
215 | %{_mandir}/man1/lxc-execute.1* | |
216 | %{_mandir}/man1/lxc-freeze.1* | |
217 | %{_mandir}/man1/lxc-info.1* | |
218 | %{_mandir}/man1/lxc-kill.1* | |
219 | %{_mandir}/man1/lxc-monitor.1* | |
220 | %{_mandir}/man1/lxc-netstat.1* | |
221 | %{_mandir}/man1/lxc-ps.1* | |
222 | %{_mandir}/man1/lxc-restart.1* | |
247c2ba9 | 223 | %{_mandir}/man1/lxc-snapshot.1* |
c34ce688 JB |
224 | %{_mandir}/man1/lxc-start.1* |
225 | %{_mandir}/man1/lxc-stop.1* | |
226 | %{_mandir}/man1/lxc-unfreeze.1* | |
227 | %{_mandir}/man1/lxc-unshare.1* | |
120ac263 | 228 | %{_mandir}/man1/lxc-user-nic.1* |
c34ce688 JB |
229 | %{_mandir}/man1/lxc-version.1* |
230 | %{_mandir}/man1/lxc-wait.1* | |
120ac263 | 231 | %{_mandir}/man5/lxc-usernet.5* |
67c70229 JB |
232 | %{_mandir}/man5/lxc.conf.5* |
233 | %{_mandir}/man7/lxc.7* | |
247c2ba9 ER |
234 | %lang(ja) %{_mandir}/ja/man1/lxc*.1* |
235 | %lang(ja) %{_mandir}/ja/man5/lxc.conf.5* | |
236 | %lang(ja) %{_mandir}/ja/man7/lxc.7* | |
237 | %exclude %{_mandir}/ja/man1/lxc-device.1* | |
238 | %exclude %{_mandir}/ja/man1/lxc-ls.1* | |
239 | %exclude %{_mandir}/ja/man1/lxc-start-ephemeral.1* | |
240 | %exclude %{_mandir}/ja/man1/lxc-top.1* | |
241 | ||
c34ce688 JB |
242 | %if %{without python} |
243 | # legacy version | |
244 | %attr(755,root,root) %{_bindir}/lxc-ls | |
245 | %{_mandir}/man1/lxc-ls.1* | |
246 | %endif | |
0886a606 | 247 | |
ff8ce371 | 248 | %dir %{configpath} |
f10dfb13 ER |
249 | %dir %attr(750,root,root) /var/log/lxc |
250 | %dir %attr(750,root,root) /var/cache/lxc | |
ff8ce371 | 251 | |
0886a606 AM |
252 | %files devel |
253 | %defattr(644,root,root,755) | |
0886a606 | 254 | %attr(755,root,root) %{_libdir}/liblxc.so |
67c70229 | 255 | %{_includedir}/lxc |
e5afa52e | 256 | %{_pkgconfigdir}/lxc.pc |
67c70229 JB |
257 | |
258 | %if %{with lua} | |
259 | %files -n lua-lxc | |
260 | %defattr(644,root,root,755) | |
c34ce688 | 261 | %attr(755,root,root) %{_bindir}/lxc-top |
247c2ba9 ER |
262 | %dir %{_libdir}/lua/lxc |
263 | %attr(755,root,root) %{_libdir}/lua/lxc/core.so | |
264 | %{_datadir}/lua/lxc.lua | |
c34ce688 | 265 | %{_mandir}/man1/lxc-top.1* |
247c2ba9 | 266 | %lang(ja) %{_mandir}/ja/man1/lxc-top.1* |
67c70229 JB |
267 | %endif |
268 | ||
269 | %if %{with python} | |
270 | %files -n python3-lxc | |
271 | %defattr(644,root,root,755) | |
c34ce688 JB |
272 | %attr(755,root,root) %{_bindir}/lxc-device |
273 | %attr(755,root,root) %{_bindir}/lxc-ls | |
274 | %attr(755,root,root) %{_bindir}/lxc-start-ephemeral | |
67c70229 JB |
275 | %{py3_sitedir}/lxc |
276 | %attr(755,root,root) %{py3_sitedir}/_lxc.cpython-*.so | |
277 | %{py3_sitedir}/_lxc-0.1-py*.egg-info | |
c34ce688 JB |
278 | %{_mandir}/man1/lxc-device.1* |
279 | %{_mandir}/man1/lxc-ls.1* | |
280 | %{_mandir}/man1/lxc-start-ephemeral.1* | |
247c2ba9 ER |
281 | %lang(ja) %{_mandir}/ja/man1/lxc-device.1* |
282 | %lang(ja) %{_mandir}/ja/man1/lxc-ls.1* | |
283 | %lang(ja) %{_mandir}/ja/man1/lxc-start-ephemeral.1* | |
67c70229 | 284 | %endif |