2 # - package apparmor stuff
5 %bcond_without seccomp # SecComp syscall filter
6 %bcond_without apparmor # apparmor
7 %bcond_without lua # Lua binding
8 %bcond_without python # Python binding
9 %bcond_with selinux # SELinux
10 %bcond_with cgmanager # Enable cgmanager (BR: libcgmanager, libnih >= 1.0.2, libnih-dbus >= 1.0.0, dbus-1 >= 1.2.16)
12 Summary: Linux Containers userspace tools
13 Summary(pl.UTF-8): Narzędzia do kontenerów linuksowych (LXC)
18 Group: Applications/System
19 Source0: https://www.linuxcontainers.org/downloads/%{name}-%{version}.tar.gz
20 # Source0-md5: 9d9af9e9e69a831cd50b58d91c786013
21 Source1: %{name}-pld.in.sh
23 Patch1: %{name}-pld.patch
24 URL: https://www.linuxcontainers.org/
25 BuildRequires: autoconf >= 2.50
26 BuildRequires: automake
27 BuildRequires: docbook-dtd30-sgml
28 BuildRequires: docbook-utils
29 BuildRequires: docbook2X
30 BuildRequires: gnutls-devel
31 %{?with_apparmor:BuildRequires: libapparmor-devel}
32 BuildRequires: libcap-devel
33 %{?with_seccomp:BuildRequires: libseccomp-devel}
34 BuildRequires: libxslt-progs
35 %{?with_lua:BuildRequires: lua51-devel >= 5.1}
36 BuildRequires: pkgconfig
37 %{?with_python:BuildRequires: python3-devel >= 3.2}
38 BuildRequires: rpm-pythonprov
39 BuildRequires: rpmbuild(macros) >= 1.612
40 BuildRequires: sed >= 4.0
41 Requires: rc-scripts >= 0.4.6
44 Suggests: gnupg-plugin-keys_curl
45 Suggests: gnupg-plugin-keys_hkp
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 %define configpath /var/lib/lxc
54 Tools to create and manage containers. It contains a full featured
55 container with the isolation / virtualization of the pids, the ipc,
56 the utsname, the mount points, /proc, /sys, the network and it takes
57 into account the control groups. It is very light, flexible, and
58 provides a set of tools around the container like the monitoring with
59 asynchronous events notification, or the freeze of the container. This
60 package is useful to create Virtual Private Server, or to run isolated
61 applications like bash or sshd.
63 %description -l pl.UTF-8
64 Narzędzia do tworzenia i zarządzania kontenerami. System ten obejmuje
65 w pełni funkcjonalne kontenery z ilozacją/wirtualizacją pidów, ipc,
66 utsname, punktów montowania, /proc, /sys, sieci oraz uwzględniające
67 grupy kontrolne. Jest bardzo lekki, elastyczny i udostępnia narzędzia
68 do czynności związanych z kontenerami, takich jak monitorowanie z
69 asynchronicznym powiadamianiem o zdarzeniach czy zamrażanie. Ten
70 pakiet jest przydatny do tworzenia wirtualnych serwerów prywatnych
71 oraz uruchamiania izolowanych aplikacji, takich jak bash czy sshd.
74 Summary: Header files for lxc library
75 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki lxc
76 Group: Development/Libraries
77 Requires: %{name} = %{version}-%{release}
80 Header files for lxc library.
82 %description devel -l pl.UTF-8
83 Pliki nagłówkowe biblioteki lxc.
86 Summary: Lua binding for LXC
87 Summary(pl.UTF-8): Wiązanie Lua do LXC
89 Requires: %{name} = %{version}-%{release}
90 Requires: lua51-libs >= 5.1
92 %description -n lua-lxc
95 %description -n lua-lxc -l pl.UTF-8
98 %package -n python3-lxc
99 Summary: Python (3.x) binding for LXC
100 Summary(pl.UTF-8): Wiązanie Pythona (3.x) do LXC
102 Requires: %{name} = %{version}-%{release}
103 Requires: python3-libs >= 3.2
104 Requires: python3-modules
106 %description -n python3-lxc
107 Python (3.x) binding for LXC.
109 %description -n python3-lxc -l pl.UTF-8
110 Wiązanie Pythona (3.x) do LXC.
112 %package -n bash-completion-%{name}
113 Summary: bash-completion for LXC
114 Summary(pl.UTF-8): bashowe uzupełnianie nazw dla LXC
115 Group: Applications/Shells
117 Requires: bash-completion
119 %description -n bash-completion-%{name}
120 bash-completion for LXC.
122 %description -n bash-completion-%{name} -l pl.UTF-8
123 bashowe uzupełnianie nazw dla LXC.
129 cp -p %{SOURCE1} templates/lxc-pld.in
132 %{__aclocal} -I config
137 db2xman=docbook2X2man \
142 %{__enable_disable apparmor} \
143 %{__enable_disable lua} %{?with_lua:--with-lua-pc=lua51} \
144 %{__enable_disable python} \
145 %{__enable_disable seccomp} \
146 %{__enable_disable selinux} \
147 --with-config-path=%{configpath} \
148 --with-init-script=sysvinit,systemd \
149 --with-runtime-path=/var/run \
156 rm -rf $RPM_BUILD_ROOT
157 install -d $RPM_BUILD_ROOT{%{configpath},%{configpath}snap,/var/{cache,log}/lxc} \
158 -d $RPM_BUILD_ROOT/etc/rc.d/init.d
162 SYSTEMD_UNIT_DIR=%{systemdunitdir} \
163 pcdatadir=%{_pkgconfigdir} \
164 DESTDIR=$RPM_BUILD_ROOT
166 %{__make} -C doc install \
167 DESTDIR=$RPM_BUILD_ROOT
169 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
171 # apparmor profiles are not packaged, remove to avoid packagers confusion
172 %{__rm} -r $RPM_BUILD_ROOT/etc/apparmor.d
174 # yum plugin, no idea where to package this
175 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/lxc-patch.py
177 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/lxc
180 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
181 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
184 %{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua51,' $RPM_BUILD_ROOT%{_bindir}/lxc-top
188 rm -rf $RPM_BUILD_ROOT
190 %post -p /sbin/ldconfig
191 %postun -p /sbin/ldconfig
194 %defattr(644,root,root,755)
195 %doc AUTHORS CONTRIBUTING MAINTAINERS README doc/FAQ.txt doc/examples/*.conf
196 %attr(755,root,root) %{_bindir}/lxc-attach
197 %attr(755,root,root) %{_bindir}/lxc-autostart
198 %attr(755,root,root) %{_bindir}/lxc-cgroup
199 %attr(755,root,root) %{_bindir}/lxc-checkconfig
200 %attr(755,root,root) %{_bindir}/lxc-clone
201 %attr(755,root,root) %{_bindir}/lxc-config
202 %attr(755,root,root) %{_bindir}/lxc-console
203 %attr(755,root,root) %{_bindir}/lxc-create
204 %attr(755,root,root) %{_bindir}/lxc-destroy
205 %attr(755,root,root) %{_bindir}/lxc-execute
206 %attr(755,root,root) %{_bindir}/lxc-freeze
207 %attr(755,root,root) %{_bindir}/lxc-info
208 %attr(755,root,root) %{_bindir}/lxc-monitor
209 %attr(755,root,root) %{_bindir}/lxc-snapshot
210 %attr(755,root,root) %{_bindir}/lxc-start
211 %attr(755,root,root) %{_bindir}/lxc-stop
212 %attr(755,root,root) %{_bindir}/lxc-unfreeze
213 %attr(755,root,root) %{_bindir}/lxc-unshare
214 %attr(755,root,root) %{_bindir}/lxc-usernsexec
215 %attr(755,root,root) %{_bindir}/lxc-wait
216 %attr(755,root,root) %{_sbindir}/init.lxc
217 %attr(755,root,root) %{_libdir}/liblxc.so.*.*.*
218 %attr(755,root,root) %ghost %{_libdir}/liblxc.so.1
219 %attr(754,root,root) /etc/rc.d/init.d/lxc
220 %{systemdunitdir}/lxc.service
221 %dir %{_libdir}/%{name}
222 %dir %{_libdir}/%{name}/rootfs
223 %{_libdir}/%{name}/rootfs/README
224 %attr(755,root,root) %{_libdir}/%{name}/lxc-devsetup
225 %attr(755,root,root) %{_libdir}/%{name}/lxc-monitord
226 %attr(755,root,root) %{_libdir}/%{name}/lxc-user-nic
227 %attr(755,root,root) %{_libdir}/%{name}/lxc-autostart-helper
228 %dir %{_sysconfdir}/lxc
229 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf
230 %dir %{_datadir}/%{name}
231 %{_datadir}/%{name}/lxc.functions
232 %dir %{_datadir}/%{name}/config
233 %{_datadir}/%{name}/config/centos.*.conf
234 %{_datadir}/%{name}/config/common.seccomp
235 %{_datadir}/%{name}/config/debian.*.conf
236 %{_datadir}/%{name}/config/fedora.*.conf
237 %{_datadir}/%{name}/config/gentoo.*.conf
238 %{_datadir}/%{name}/config/oracle.*.conf
239 %{_datadir}/%{name}/config/plamo.*.conf
240 %{_datadir}/%{name}/config/ubuntu-cloud.*.conf
241 %{_datadir}/%{name}/config/ubuntu.*.conf
242 %dir %{_datadir}/%{name}/hooks
243 %dir %{_datadir}/%{name}/templates
244 %attr(755,root,root) %{_datadir}/%{name}/hooks/clonehostname
245 %attr(755,root,root) %{_datadir}/%{name}/hooks/mount*
246 %attr(755,root,root) %{_datadir}/%{name}/hooks/squid-deb-proxy-client
247 %attr(755,root,root) %{_datadir}/%{name}/hooks/ubuntu-cloud-prep
248 %attr(755,root,root) %{_datadir}/%{name}/templates/lxc-*
249 %{_mandir}/man1/lxc-attach.1*
250 %{_mandir}/man1/lxc-autostart.1*
251 %{_mandir}/man1/lxc-cgroup.1*
252 %{_mandir}/man1/lxc-checkconfig.1*
253 %{_mandir}/man1/lxc-clone.1*
254 %{_mandir}/man1/lxc-config.1*
255 %{_mandir}/man1/lxc-console.1*
256 %{_mandir}/man1/lxc-create.1*
257 %{_mandir}/man1/lxc-destroy.1*
258 %{_mandir}/man1/lxc-execute.1*
259 %{_mandir}/man1/lxc-freeze.1*
260 %{_mandir}/man1/lxc-info.1*
261 %{_mandir}/man1/lxc-monitor.1*
262 %{_mandir}/man1/lxc-snapshot.1*
263 %{_mandir}/man1/lxc-start.1*
264 %{_mandir}/man1/lxc-stop.1*
265 %{_mandir}/man1/lxc-unfreeze.1*
266 %{_mandir}/man1/lxc-unshare.1*
267 %{_mandir}/man1/lxc-user-nic.1*
268 %{_mandir}/man1/lxc-usernsexec.1*
269 %{_mandir}/man1/lxc-wait.1*
270 %{_mandir}/man5/lxc-usernet.5*
271 %{_mandir}/man5/lxc.conf.5*
272 %{_mandir}/man5/lxc.container.conf.5*
273 %{_mandir}/man5/lxc.system.conf.5*
274 %{_mandir}/man7/lxc.7*
275 %lang(ja) %{_mandir}/ja/man1/lxc*.1*
276 %lang(ja) %{_mandir}/ja/man5/lxc-usernet.5*
277 %lang(ja) %{_mandir}/ja/man5/lxc.conf.5*
278 %lang(ja) %{_mandir}/ja/man5/lxc.container.conf.5*
279 %lang(ja) %{_mandir}/ja/man5/lxc.system.conf.5*
280 %lang(ja) %{_mandir}/ja/man7/lxc.7*
281 %exclude %{_mandir}/ja/man1/lxc-device.1*
282 %exclude %{_mandir}/ja/man1/lxc-ls.1*
283 %exclude %{_mandir}/ja/man1/lxc-start-ephemeral.1*
284 %exclude %{_mandir}/ja/man1/lxc-top.1*
287 %if %{without python}
289 %attr(755,root,root) %{_bindir}/lxc-ls
290 %{_mandir}/man1/lxc-ls.1*
294 %dir %{configpath}snap
295 %dir %attr(750,root,root) /var/log/lxc
296 %dir %attr(750,root,root) /var/cache/lxc
299 %defattr(644,root,root,755)
300 %attr(755,root,root) %{_libdir}/liblxc.so
302 %{_pkgconfigdir}/lxc.pc
306 %defattr(644,root,root,755)
307 %attr(755,root,root) %{_bindir}/lxc-top
308 %dir %{_libdir}/lua/lxc
309 %attr(755,root,root) %{_libdir}/lua/lxc/core.so
310 %{_datadir}/lua/lxc.lua
311 %{_mandir}/man1/lxc-top.1*
312 %lang(ja) %{_mandir}/ja/man1/lxc-top.1*
316 %files -n python3-lxc
317 %defattr(644,root,root,755)
318 %attr(755,root,root) %{_bindir}/lxc-device
319 %attr(755,root,root) %{_bindir}/lxc-ls
320 %attr(755,root,root) %{_bindir}/lxc-start-ephemeral
322 %attr(755,root,root) %{py3_sitedir}/_lxc.cpython-*.so
323 %{py3_sitedir}/_lxc-0.1-py*.egg-info
324 %{_mandir}/man1/lxc-device.1*
325 %{_mandir}/man1/lxc-ls.1*
326 %{_mandir}/man1/lxc-start-ephemeral.1*
327 %lang(ja) %{_mandir}/ja/man1/lxc-device.1*
328 %lang(ja) %{_mandir}/ja/man1/lxc-ls.1*
329 %lang(ja) %{_mandir}/ja/man1/lxc-start-ephemeral.1*
332 %files -n bash-completion-%{name}
333 %defattr(644,root,root,755)
334 /etc/bash_completion.d/lxc