]> git.pld-linux.org Git - packages/lxc.git/blame_incremental - lxc.spec
updated to 2.0.6
[packages/lxc.git] / lxc.spec
... / ...
CommitLineData
1# TODO
2# - package apparmor stuff
3# - update (cut down, include /usr/share/lxc/config/common.conf) default pld container config
4# NOTE:
5# - does not work properly (dead symlink /proc/self) with PLD kernel 4.1.13
6# but seems to work on 4.3.3, vserver issue ?
7#
8
9# Conditional build:
10%bcond_without seccomp # SecComp syscall filter
11%bcond_without apparmor # apparmor support
12%bcond_without lua # Lua binding
13%bcond_without python # Python binding
14%bcond_with selinux # SELinux support
15%bcond_with cgmanager # cgmanager support
16
17Summary: Linux Containers userspace tools
18Summary(pl.UTF-8): Narzędzia do kontenerów linuksowych (LXC)
19Name: lxc
20Version: 2.0.6
21Release: 1
22License: LGPL v2.1+
23Group: Applications/System
24Source0: https://linuxcontainers.org/downloads/lxc/%{name}-%{version}.tar.gz
25# Source0-md5: 5fd4b7af8026e8ae20b3065ee18fe974
26Source1: %{name}-pld.in.sh
27# lxc-net based on bridge, macvlan is an alternative/supported lxc network
28Source2: %{name}_macvlan.sysconfig
29Source3: %{name}_macvlan
30Patch0: %{name}-pld.patch
31Patch1: %{name}-net.patch
32URL: https://www.linuxcontainers.org/
33BuildRequires: autoconf >= 2.50
34BuildRequires: automake
35%{?with_cgmanager:BuildRequires: cgmanager-devel}
36%{?with_cgmanager:BuildRequires: dbus-devel >= 1.2.16}
37BuildRequires: docbook-dtd45-xml
38BuildRequires: docbook2X >= 0.8
39BuildRequires: doxygen
40BuildRequires: gnutls-devel
41%{?with_apparmor:BuildRequires: libapparmor-devel}
42BuildRequires: libcap-devel
43%{?with_cgmanager:BuildRequires: libnih-devel >= 1.0.2}
44%{?with_seccomp:BuildRequires: libseccomp-devel}
45BuildRequires: libxslt-progs
46%{?with_lua:BuildRequires: lua51-devel >= 5.1}
47BuildRequires: pkgconfig
48%{?with_python:BuildRequires: python3-devel >= 1:3.2}
49%{?with_python:BuildRequires: python3-modules >= 1:3.2}
50BuildRequires: rpm-pythonprov
51BuildRequires: rpmbuild(macros) >= 1.671
52BuildRequires: sed >= 4.0
53Requires(post): /sbin/ldconfig
54Requires(post,preun): /sbin/chkconfig
55Requires: %{name}-libs = %{version}-%{release}
56# lxc_macvlan script
57Requires: gawk
58# used in lxc-net script to set bridge nat
59Requires: iproute2
60Requires: iptables
61Requires: rc-scripts >= 0.4.6
62Requires: systemd-units >= 38
63Requires: which
64# used in lxc-net script, but not all cases, may break working setups
65Suggests: dnsmasq
66Suggests: gnupg
67Suggests: gnupg-plugin-keys_curl
68Suggests: gnupg-plugin-keys_hkp
69Suggests: net-tools
70Suggests: python3-lxc
71Suggests: rsync
72BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73
74%define configpath /var/lib/lxc
75
76%description
77Tools to create and manage containers. It contains a full featured
78container with the isolation / virtualization of the pids, the ipc,
79the utsname, the mount points, /proc, /sys, the network and it takes
80into account the control groups. It is very light, flexible, and
81provides a set of tools around the container like the monitoring with
82asynchronous events notification, or the freeze of the container. This
83package is useful to create Virtual Private Server, or to run isolated
84applications like bash or sshd.
85
86%description -l pl.UTF-8
87Narzędzia do tworzenia i zarządzania kontenerami. System ten obejmuje
88w pełni funkcjonalne kontenery z izolacją/wirtualizacją pidów, ipc,
89utsname, punktów montowania, /proc, /sys, sieci oraz uwzględniające
90grupy kontrolne. Jest bardzo lekki, elastyczny i udostępnia narzędzia
91do czynności związanych z kontenerami, takich jak monitorowanie z
92asynchronicznym powiadamianiem o zdarzeniach czy zamrażanie. Ten
93pakiet jest przydatny do tworzenia wirtualnych serwerów prywatnych
94oraz uruchamiania izolowanych aplikacji, takich jak bash czy sshd.
95
96%package libs
97Summary: liblxc library
98Summary(pl.UTF-8): Biblioteka liblxc
99Group: Libraries
100Conflicts: lxc < 2.0.4-2
101
102%description libs
103liblxc library.
104
105%description libs -l pl.UTF-8
106Biblioteka liblxc.
107
108%package devel
109Summary: Header files for lxc library
110Summary(pl.UTF-8): Pliki nagłówkowe biblioteki lxc
111Group: Development/Libraries
112Requires: %{name}-libs = %{version}-%{release}
113
114%description devel
115Header files for lxc library.
116
117%description devel -l pl.UTF-8
118Pliki nagłówkowe biblioteki lxc.
119
120%package -n lua-lxc
121Summary: Lua binding for LXC
122Summary(pl.UTF-8): Wiązanie Lua do LXC
123Group: Libraries
124Requires: %{name} = %{version}-%{release}
125Requires: lua51-libs >= 5.1
126
127%description -n lua-lxc
128Lua binding for LXC.
129
130%description -n lua-lxc -l pl.UTF-8
131Wiązanie Lua do LXC.
132
133%package -n python3-lxc
134Summary: Python (3.x) binding for LXC
135Summary(pl.UTF-8): Wiązanie Pythona (3.x) do LXC
136Group: Libraries
137Requires: %{name} = %{version}-%{release}
138Requires: python3-libs >= 1:3.2
139Requires: python3-modules >= 1:3.2
140
141%description -n python3-lxc
142Python (3.x) binding for LXC.
143
144%description -n python3-lxc -l pl.UTF-8
145Wiązanie Pythona (3.x) do LXC.
146
147%package -n bash-completion-%{name}
148Summary: bash-completion for LXC
149Summary(pl.UTF-8): bashowe uzupełnianie nazw dla LXC
150Group: Applications/Shells
151Requires: %{name} = %{version}-%{release}
152Requires: bash-completion
153
154%description -n bash-completion-%{name}
155bash-completion for LXC.
156
157%description -n bash-completion-%{name} -l pl.UTF-8
158bashowe uzupełnianie nazw dla LXC.
159
160%prep
161%setup -q
162%patch0 -p0
163%patch1 -p1
164
165cp -p %{SOURCE1} templates/lxc-pld.in
166
167%build
168%{__aclocal} -I config
169%{__autoconf}
170%{__autoheader}
171%{__automake}
172%configure \
173 db2xman=docbook2X2man \
174 --disable-rpath \
175 --enable-bash \
176 --enable-doc \
177 --enable-examples \
178 %{__enable_disable apparmor} \
179 %{__enable_disable cgmanager} \
180 %{__enable_disable lua} %{?with_lua:--with-lua-pc=lua51} \
181 %{__enable_disable python} \
182 %{__enable_disable seccomp} \
183 %{__enable_disable selinux} \
184 --with-config-path=%{configpath} \
185 --with-init-script=sysvinit,systemd \
186 --with-runtime-path=/var/run \
187 --with-distro=pld
188
189%{__make}
190%{__make} -C doc
191
192%install
193rm -rf $RPM_BUILD_ROOT
194install -d $RPM_BUILD_ROOT{%{configpath},%{configpath}snap,/var/{cache,log}/lxc} \
195 -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
196
197%{__make} install \
198 SYSTEMD_UNIT_DIR=%{systemdunitdir} \
199 pcdatadir=%{_pkgconfigdir} \
200 DESTDIR=$RPM_BUILD_ROOT
201
202%{__make} -C doc install \
203 DESTDIR=$RPM_BUILD_ROOT
204
205%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
206
207# apparmor profiles are not packaged, remove to avoid packagers confusion
208%{__rm} -r $RPM_BUILD_ROOT/etc/apparmor.d
209
210# yum plugin, no idea where to package this
211%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/lxc-patch.py
212
213install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/lxc_macvlan
214install -p %{SOURCE3} $RPM_BUILD_ROOT%{_libdir}/%{name}/lxc_macvlan
215
216%if %{with python}
217%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
218%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
219%endif
220%if %{with lua}
221%{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua5.1,' $RPM_BUILD_ROOT%{_bindir}/lxc-top
222%endif
223
224%clean
225rm -rf $RPM_BUILD_ROOT
226
227%post
228/sbin/chkconfig --add lxc
229/sbin/chkconfig --add lxc-net
230%systemd_post lxc.service lxc-net.service
231
232%preun
233if [ "$1" = "0" ]; then
234 %service lxc stop
235 /sbin/chkconfig --del lxc
236 %service lxc-net stop
237 /sbin/chkconfig --del lxc-net
238fi
239%systemd_preun lxc.service lxc-net.service
240
241%postun
242%systemd_reload
243
244%post libs -p /sbin/ldconfig
245%postun libs -p /sbin/ldconfig
246
247%files
248%defattr(644,root,root,755)
249%doc AUTHORS CONTRIBUTING MAINTAINERS README doc/FAQ.txt doc/examples/*.conf
250%attr(755,root,root) %{_bindir}/lxc-attach
251%attr(755,root,root) %{_bindir}/lxc-autostart
252%attr(755,root,root) %{_bindir}/lxc-cgroup
253%attr(755,root,root) %{_bindir}/lxc-checkconfig
254%attr(755,root,root) %{_bindir}/lxc-checkpoint
255%attr(755,root,root) %{_bindir}/lxc-copy
256%attr(755,root,root) %{_bindir}/lxc-config
257%attr(755,root,root) %{_bindir}/lxc-console
258%attr(755,root,root) %{_bindir}/lxc-create
259%attr(755,root,root) %{_bindir}/lxc-destroy
260%attr(755,root,root) %{_bindir}/lxc-execute
261%attr(755,root,root) %{_bindir}/lxc-freeze
262%attr(755,root,root) %{_bindir}/lxc-info
263%attr(755,root,root) %{_bindir}/lxc-monitor
264%attr(755,root,root) %{_bindir}/lxc-snapshot
265%attr(755,root,root) %{_bindir}/lxc-start
266%attr(755,root,root) %{_bindir}/lxc-stop
267%attr(755,root,root) %{_bindir}/lxc-unfreeze
268%attr(755,root,root) %{_bindir}/lxc-unshare
269%attr(755,root,root) %{_bindir}/lxc-usernsexec
270%attr(755,root,root) %{_bindir}/lxc-wait
271%attr(755,root,root) %{_sbindir}/init.lxc
272%attr(754,root,root) /etc/rc.d/init.d/lxc
273%attr(754,root,root) /etc/rc.d/init.d/lxc-net
274
275%{systemdunitdir}/lxc.service
276%{systemdunitdir}/lxc@.service
277%{systemdunitdir}/lxc-net.service
278%dir %{_libdir}/%{name}
279%dir %{_libdir}/%{name}/rootfs
280%{_libdir}/%{name}/rootfs/README
281%attr(755,root,root) %{_libdir}/%{name}/lxc-apparmor-load
282%attr(755,root,root) %{_libdir}/%{name}/lxc-containers
283%attr(755,root,root) %{_libdir}/%{name}/lxc-monitord
284%attr(755,root,root) %{_libdir}/%{name}/lxc-net
285%attr(755,root,root) %{_libdir}/%{name}/lxc-user-nic
286%attr(755,root,root) %{_libdir}/%{name}/lxc_macvlan
287%dir %{_sysconfdir}/lxc
288%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lxc_macvlan
289%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lxc
290%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf
291%dir %{_datadir}/%{name}
292%{_datadir}/%{name}/lxc.functions
293%dir %{_datadir}/%{name}/config
294%{_datadir}/%{name}/config/archlinux.*.conf
295%{_datadir}/%{name}/config/centos.*.conf
296%{_datadir}/%{name}/config/common.conf
297%dir %{_datadir}/%{name}/config/common.conf.d
298%{_datadir}/%{name}/config/common.conf.d/README
299%{_datadir}/%{name}/config/common.seccomp
300%{_datadir}/%{name}/config/alpine.*.conf
301%{_datadir}/%{name}/config/debian.*.conf
302%{_datadir}/%{name}/config/fedora.*.conf
303%{_datadir}/%{name}/config/gentoo.*.conf
304%{_datadir}/%{name}/config/nesting.conf
305%{_datadir}/%{name}/config/opensuse.*.conf
306%{_datadir}/%{name}/config/openwrt.*.conf
307%{_datadir}/%{name}/config/oracle.*.conf
308%{_datadir}/%{name}/config/plamo.*.conf
309%{_datadir}/%{name}/config/slackware.*.conf
310%{_datadir}/%{name}/config/sparclinux.*.conf
311%{_datadir}/%{name}/config/ubuntu-cloud.*.conf
312%{_datadir}/%{name}/config/ubuntu.*.conf
313%{_datadir}/%{name}/config/userns.conf
314%dir %{_libdir}/%{name}/hooks
315%dir %{_datadir}/%{name}/hooks
316%dir %{_datadir}/%{name}/selinux
317%{_datadir}/%{name}/selinux/*
318%dir %{_datadir}/%{name}/templates
319%attr(755,root,root) %{_datadir}/%{name}/hooks/clonehostname
320%attr(755,root,root) %{_datadir}/%{name}/hooks/mount*
321%attr(755,root,root) %{_datadir}/%{name}/hooks/squid-deb-proxy-client
322%attr(755,root,root) %{_datadir}/%{name}/hooks/ubuntu-cloud-prep
323%attr(755,root,root) %{_datadir}/%{name}/templates/lxc-*
324%attr(755,root,root) %{_libdir}/%{name}/hooks/unmount-namespace
325%{_mandir}/man1/lxc-attach.1*
326%{_mandir}/man1/lxc-autostart.1*
327%{_mandir}/man1/lxc-cgroup.1*
328%{_mandir}/man1/lxc-checkconfig.1*
329%{_mandir}/man1/lxc-checkpoint.1*
330%{_mandir}/man1/lxc-copy.1*
331%{_mandir}/man1/lxc-config.1*
332%{_mandir}/man1/lxc-console.1*
333%{_mandir}/man1/lxc-create.1*
334%{_mandir}/man1/lxc-destroy.1*
335%{_mandir}/man1/lxc-execute.1*
336%{_mandir}/man1/lxc-freeze.1*
337%{_mandir}/man1/lxc-info.1*
338%{_mandir}/man1/lxc-monitor.1*
339%{_mandir}/man1/lxc-snapshot.1*
340%{_mandir}/man1/lxc-start.1*
341%{_mandir}/man1/lxc-stop.1*
342%{_mandir}/man1/lxc-unfreeze.1*
343%{_mandir}/man1/lxc-unshare.1*
344%{_mandir}/man1/lxc-user-nic.1*
345%{_mandir}/man1/lxc-usernsexec.1*
346%{_mandir}/man1/lxc-wait.1*
347%{_mandir}/man5/lxc-usernet.5*
348%{_mandir}/man5/lxc.conf.5*
349%{_mandir}/man5/lxc.container.conf.5*
350%{_mandir}/man5/lxc.system.conf.5*
351%{_mandir}/man7/lxc.7*
352%lang(ja) %{_mandir}/ja/man1/lxc*.1*
353%lang(ja) %{_mandir}/ja/man5/lxc-usernet.5*
354%lang(ja) %{_mandir}/ja/man5/lxc.conf.5*
355%lang(ja) %{_mandir}/ja/man5/lxc.container.conf.5*
356%lang(ja) %{_mandir}/ja/man5/lxc.system.conf.5*
357%lang(ja) %{_mandir}/ja/man7/lxc.7*
358%exclude %{_mandir}/ja/man1/lxc-device.1*
359%exclude %{_mandir}/ja/man1/lxc-ls.1*
360%exclude %{_mandir}/ja/man1/lxc-top.1*
361%lang(ko) %{_mandir}/ko/man1/lxc*.1*
362%lang(ko) %{_mandir}/ko/man5/lxc-usernet.5*
363%lang(ko) %{_mandir}/ko/man5/lxc.conf.5*
364%lang(ko) %{_mandir}/ko/man5/lxc.container.conf.5*
365%lang(ko) %{_mandir}/ko/man5/lxc.system.conf.5*
366%lang(ko) %{_mandir}/ko/man7/lxc.7*
367%exclude %{_mandir}/ko/man1/lxc-device.1*
368%exclude %{_mandir}/ko/man1/lxc-ls.1*
369%exclude %{_mandir}/ko/man1/lxc-top.1*
370
371%if %{without python}
372# legacy version
373%attr(755,root,root) %{_bindir}/lxc-ls
374%{_mandir}/man1/lxc-ls.1*
375%lang(ja) %{_mandir}/ja/man1/lxc-ls.1*
376%lang(ko) %{_mandir}/ko/man1/lxc-ls.1*
377%endif
378
379%dir %{configpath}
380%dir %{configpath}snap
381%dir %attr(750,root,root) /var/log/lxc
382%dir %attr(750,root,root) /var/cache/lxc
383
384%files libs
385%defattr(644,root,root,755)
386%attr(755,root,root) %{_libdir}/liblxc.so.*.*.*
387%attr(755,root,root) %ghost %{_libdir}/liblxc.so.1
388
389%files devel
390%defattr(644,root,root,755)
391%attr(755,root,root) %{_libdir}/liblxc.so
392%{_includedir}/lxc
393%{_pkgconfigdir}/lxc.pc
394%{_libdir}/liblxc.la
395
396%if %{with lua}
397%files -n lua-lxc
398%defattr(644,root,root,755)
399%attr(755,root,root) %{_bindir}/lxc-top
400%dir %{_libdir}/lua/lxc
401%attr(755,root,root) %{_libdir}/lua/lxc/core.so
402%{_datadir}/lua/lxc.lua
403%{_mandir}/man1/lxc-top.1*
404%lang(ja) %{_mandir}/ja/man1/lxc-top.1*
405%lang(ko) %{_mandir}/ko/man1/lxc-top.1*
406%endif
407
408%if %{with python}
409%files -n python3-lxc
410%defattr(644,root,root,755)
411%attr(755,root,root) %{_bindir}/lxc-device
412%attr(755,root,root) %{_bindir}/lxc-ls
413%{py3_sitedir}/lxc
414%attr(755,root,root) %{py3_sitedir}/_lxc.cpython-*.so
415%{py3_sitedir}/_lxc-0.1-py*.egg-info
416%{_mandir}/man1/lxc-device.1*
417%{_mandir}/man1/lxc-ls.1*
418%lang(ja) %{_mandir}/ja/man1/lxc-device.1*
419%lang(ja) %{_mandir}/ja/man1/lxc-ls.1*
420%lang(ko) %{_mandir}/ko/man1/lxc-device.1*
421%lang(ko) %{_mandir}/ko/man1/lxc-ls.1*
422%endif
423
424%files -n bash-completion-%{name}
425%defattr(644,root,root,755)
426%{bash_compdir}/lxc
This page took 0.052353 seconds and 4 git commands to generate.