]> git.pld-linux.org Git - packages/lxc.git/blame_incremental - lxc.spec
- drop .la file (.pc exists)
[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%{__libtoolize}
169%{__aclocal} -I config
170%{__autoconf}
171%{__autoheader}
172%{__automake}
173%configure \
174 bashcompdir=%{bash_compdir} \
175 db2xman=docbook2X2man \
176 --disable-rpath \
177 --enable-bash \
178 --enable-doc \
179 --enable-examples \
180 %{__enable_disable apparmor} \
181 %{__enable_disable cgmanager} \
182 %{__enable_disable lua} %{?with_lua:--with-lua-pc=lua51} \
183 %{__enable_disable python} \
184 %{__enable_disable seccomp} \
185 %{__enable_disable selinux} \
186 --with-config-path=%{configpath} \
187 --with-init-script=sysvinit,systemd \
188 --with-runtime-path=/var/run \
189 --with-distro=pld
190
191%{__make}
192%{__make} -C doc
193
194%install
195rm -rf $RPM_BUILD_ROOT
196install -d $RPM_BUILD_ROOT{%{configpath},%{configpath}snap,/var/{cache,log}/lxc} \
197 -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
198
199%{__make} install \
200 SYSTEMD_UNIT_DIR=%{systemdunitdir} \
201 pcdatadir=%{_pkgconfigdir} \
202 DESTDIR=$RPM_BUILD_ROOT
203
204%{__make} -C doc install \
205 DESTDIR=$RPM_BUILD_ROOT
206
207%{__rm} $RPM_BUILD_ROOT%{_libdir}/liblxc.la
208
209%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
210
211# apparmor profiles are not packaged, remove to avoid packagers confusion
212%{__rm} -r $RPM_BUILD_ROOT/etc/apparmor.d
213
214# yum plugin, no idea where to package this
215%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/lxc-patch.py
216
217install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/lxc_macvlan
218install -p %{SOURCE3} $RPM_BUILD_ROOT%{_libdir}/%{name}/lxc_macvlan
219
220%if %{with python}
221%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
222%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
223%endif
224%if %{with lua}
225%{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua5.1,' $RPM_BUILD_ROOT%{_bindir}/lxc-top
226%endif
227
228%clean
229rm -rf $RPM_BUILD_ROOT
230
231%post
232/sbin/chkconfig --add lxc
233/sbin/chkconfig --add lxc-net
234%systemd_post lxc.service lxc-net.service
235
236%preun
237if [ "$1" = "0" ]; then
238 %service lxc stop
239 /sbin/chkconfig --del lxc
240 %service lxc-net stop
241 /sbin/chkconfig --del lxc-net
242fi
243%systemd_preun lxc.service lxc-net.service
244
245%postun
246%systemd_reload
247
248%post libs -p /sbin/ldconfig
249%postun libs -p /sbin/ldconfig
250
251%files
252%defattr(644,root,root,755)
253%doc AUTHORS CONTRIBUTING MAINTAINERS README doc/FAQ.txt doc/examples/*.conf
254%attr(755,root,root) %{_bindir}/lxc-attach
255%attr(755,root,root) %{_bindir}/lxc-autostart
256%attr(755,root,root) %{_bindir}/lxc-cgroup
257%attr(755,root,root) %{_bindir}/lxc-checkconfig
258%attr(755,root,root) %{_bindir}/lxc-checkpoint
259%attr(755,root,root) %{_bindir}/lxc-copy
260%attr(755,root,root) %{_bindir}/lxc-config
261%attr(755,root,root) %{_bindir}/lxc-console
262%attr(755,root,root) %{_bindir}/lxc-create
263%attr(755,root,root) %{_bindir}/lxc-destroy
264%attr(755,root,root) %{_bindir}/lxc-execute
265%attr(755,root,root) %{_bindir}/lxc-freeze
266%attr(755,root,root) %{_bindir}/lxc-info
267%attr(755,root,root) %{_bindir}/lxc-monitor
268%attr(755,root,root) %{_bindir}/lxc-snapshot
269%attr(755,root,root) %{_bindir}/lxc-start
270%attr(755,root,root) %{_bindir}/lxc-stop
271%attr(755,root,root) %{_bindir}/lxc-unfreeze
272%attr(755,root,root) %{_bindir}/lxc-unshare
273%attr(755,root,root) %{_bindir}/lxc-usernsexec
274%attr(755,root,root) %{_bindir}/lxc-wait
275%attr(755,root,root) %{_sbindir}/init.lxc
276%attr(754,root,root) /etc/rc.d/init.d/lxc
277%attr(754,root,root) /etc/rc.d/init.d/lxc-net
278
279%{systemdunitdir}/lxc.service
280%{systemdunitdir}/lxc@.service
281%{systemdunitdir}/lxc-net.service
282%dir %{_libdir}/%{name}
283%dir %{_libdir}/%{name}/rootfs
284%{_libdir}/%{name}/rootfs/README
285%attr(755,root,root) %{_libdir}/%{name}/lxc-apparmor-load
286%attr(755,root,root) %{_libdir}/%{name}/lxc-containers
287%attr(755,root,root) %{_libdir}/%{name}/lxc-monitord
288%attr(755,root,root) %{_libdir}/%{name}/lxc-net
289%attr(755,root,root) %{_libdir}/%{name}/lxc-user-nic
290%attr(755,root,root) %{_libdir}/%{name}/lxc_macvlan
291%dir %{_sysconfdir}/lxc
292%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lxc_macvlan
293%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lxc
294%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf
295%dir %{_datadir}/%{name}
296%{_datadir}/%{name}/lxc.functions
297%dir %{_datadir}/%{name}/config
298%{_datadir}/%{name}/config/archlinux.*.conf
299%{_datadir}/%{name}/config/centos.*.conf
300%{_datadir}/%{name}/config/common.conf
301%dir %{_datadir}/%{name}/config/common.conf.d
302%{_datadir}/%{name}/config/common.conf.d/README
303%{_datadir}/%{name}/config/common.seccomp
304%{_datadir}/%{name}/config/alpine.*.conf
305%{_datadir}/%{name}/config/debian.*.conf
306%{_datadir}/%{name}/config/fedora.*.conf
307%{_datadir}/%{name}/config/gentoo.*.conf
308%{_datadir}/%{name}/config/nesting.conf
309%{_datadir}/%{name}/config/opensuse.*.conf
310%{_datadir}/%{name}/config/openwrt.*.conf
311%{_datadir}/%{name}/config/oracle.*.conf
312%{_datadir}/%{name}/config/plamo.*.conf
313%{_datadir}/%{name}/config/slackware.*.conf
314%{_datadir}/%{name}/config/sparclinux.*.conf
315%{_datadir}/%{name}/config/ubuntu-cloud.*.conf
316%{_datadir}/%{name}/config/ubuntu.*.conf
317%{_datadir}/%{name}/config/userns.conf
318%dir %{_libdir}/%{name}/hooks
319%dir %{_datadir}/%{name}/hooks
320%dir %{_datadir}/%{name}/selinux
321%{_datadir}/%{name}/selinux/*
322%dir %{_datadir}/%{name}/templates
323%attr(755,root,root) %{_datadir}/%{name}/hooks/clonehostname
324%attr(755,root,root) %{_datadir}/%{name}/hooks/mount*
325%attr(755,root,root) %{_datadir}/%{name}/hooks/squid-deb-proxy-client
326%attr(755,root,root) %{_datadir}/%{name}/hooks/ubuntu-cloud-prep
327%attr(755,root,root) %{_datadir}/%{name}/templates/lxc-*
328%attr(755,root,root) %{_libdir}/%{name}/hooks/unmount-namespace
329%{_mandir}/man1/lxc-attach.1*
330%{_mandir}/man1/lxc-autostart.1*
331%{_mandir}/man1/lxc-cgroup.1*
332%{_mandir}/man1/lxc-checkconfig.1*
333%{_mandir}/man1/lxc-checkpoint.1*
334%{_mandir}/man1/lxc-copy.1*
335%{_mandir}/man1/lxc-config.1*
336%{_mandir}/man1/lxc-console.1*
337%{_mandir}/man1/lxc-create.1*
338%{_mandir}/man1/lxc-destroy.1*
339%{_mandir}/man1/lxc-execute.1*
340%{_mandir}/man1/lxc-freeze.1*
341%{_mandir}/man1/lxc-info.1*
342%{_mandir}/man1/lxc-monitor.1*
343%{_mandir}/man1/lxc-snapshot.1*
344%{_mandir}/man1/lxc-start.1*
345%{_mandir}/man1/lxc-stop.1*
346%{_mandir}/man1/lxc-unfreeze.1*
347%{_mandir}/man1/lxc-unshare.1*
348%{_mandir}/man1/lxc-user-nic.1*
349%{_mandir}/man1/lxc-usernsexec.1*
350%{_mandir}/man1/lxc-wait.1*
351%{_mandir}/man5/lxc-usernet.5*
352%{_mandir}/man5/lxc.conf.5*
353%{_mandir}/man5/lxc.container.conf.5*
354%{_mandir}/man5/lxc.system.conf.5*
355%{_mandir}/man7/lxc.7*
356%lang(ja) %{_mandir}/ja/man1/lxc*.1*
357%lang(ja) %{_mandir}/ja/man5/lxc-usernet.5*
358%lang(ja) %{_mandir}/ja/man5/lxc.conf.5*
359%lang(ja) %{_mandir}/ja/man5/lxc.container.conf.5*
360%lang(ja) %{_mandir}/ja/man5/lxc.system.conf.5*
361%lang(ja) %{_mandir}/ja/man7/lxc.7*
362%exclude %{_mandir}/ja/man1/lxc-device.1*
363%exclude %{_mandir}/ja/man1/lxc-ls.1*
364%exclude %{_mandir}/ja/man1/lxc-top.1*
365%lang(ko) %{_mandir}/ko/man1/lxc*.1*
366%lang(ko) %{_mandir}/ko/man5/lxc-usernet.5*
367%lang(ko) %{_mandir}/ko/man5/lxc.conf.5*
368%lang(ko) %{_mandir}/ko/man5/lxc.container.conf.5*
369%lang(ko) %{_mandir}/ko/man5/lxc.system.conf.5*
370%lang(ko) %{_mandir}/ko/man7/lxc.7*
371%exclude %{_mandir}/ko/man1/lxc-device.1*
372%exclude %{_mandir}/ko/man1/lxc-ls.1*
373%exclude %{_mandir}/ko/man1/lxc-top.1*
374
375%if %{without python}
376# legacy version
377%attr(755,root,root) %{_bindir}/lxc-ls
378%{_mandir}/man1/lxc-ls.1*
379%lang(ja) %{_mandir}/ja/man1/lxc-ls.1*
380%lang(ko) %{_mandir}/ko/man1/lxc-ls.1*
381%endif
382
383%dir %{configpath}
384%dir %{configpath}snap
385%dir %attr(750,root,root) /var/log/lxc
386%dir %attr(750,root,root) /var/cache/lxc
387
388%files libs
389%defattr(644,root,root,755)
390%attr(755,root,root) %{_libdir}/liblxc.so.*.*.*
391%attr(755,root,root) %ghost %{_libdir}/liblxc.so.1
392
393%files devel
394%defattr(644,root,root,755)
395%attr(755,root,root) %{_libdir}/liblxc.so
396%{_includedir}/lxc
397%{_pkgconfigdir}/lxc.pc
398
399%if %{with lua}
400%files -n lua-lxc
401%defattr(644,root,root,755)
402%attr(755,root,root) %{_bindir}/lxc-top
403%dir %{_libdir}/lua/lxc
404%attr(755,root,root) %{_libdir}/lua/lxc/core.so
405%{_datadir}/lua/lxc.lua
406%{_mandir}/man1/lxc-top.1*
407%lang(ja) %{_mandir}/ja/man1/lxc-top.1*
408%lang(ko) %{_mandir}/ko/man1/lxc-top.1*
409%endif
410
411%if %{with python}
412%files -n python3-lxc
413%defattr(644,root,root,755)
414%attr(755,root,root) %{_bindir}/lxc-device
415%attr(755,root,root) %{_bindir}/lxc-ls
416%{py3_sitedir}/lxc
417%attr(755,root,root) %{py3_sitedir}/_lxc.cpython-*.so
418%{py3_sitedir}/_lxc-0.1-py*.egg-info
419%{_mandir}/man1/lxc-device.1*
420%{_mandir}/man1/lxc-ls.1*
421%lang(ja) %{_mandir}/ja/man1/lxc-device.1*
422%lang(ja) %{_mandir}/ja/man1/lxc-ls.1*
423%lang(ko) %{_mandir}/ko/man1/lxc-device.1*
424%lang(ko) %{_mandir}/ko/man1/lxc-ls.1*
425%endif
426
427%files -n bash-completion-%{name}
428%defattr(644,root,root,755)
429%{bash_compdir}/lxc
This page took 0.056439 seconds and 4 git commands to generate.