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 %{?with_lua:BuildRequires: lua51-devel >= 5.1}
35 BuildRequires: pkgconfig
36 %{?with_python:BuildRequires: python3-devel >= 3.2}
37 BuildRequires: rpmbuild(macros) >= 1.612
38 BuildRequires: sed >= 4.0
39 Requires: rc-scripts >= 0.4.6
42 Suggests: gnupg-plugin-keys_curl
43 Suggests: gnupg-plugin-keys_hkp
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 %define configpath /var/lib/lxc
52 Tools to create and manage containers. It contains a full featured
53 container with the isolation / virtualization of the pids, the ipc,
54 the utsname, the mount points, /proc, /sys, the network and it takes
55 into account the control groups. It is very light, flexible, and
56 provides a set of tools around the container like the monitoring with
57 asynchronous events notification, or the freeze of the container. This
58 package is useful to create Virtual Private Server, or to run isolated
59 applications like bash or sshd.
61 %description -l pl.UTF-8
62 Narzędzia do tworzenia i zarządzania kontenerami. System ten obejmuje
63 w pełni funkcjonalne kontenery z ilozacją/wirtualizacją pidów, ipc,
64 utsname, punktów montowania, /proc, /sys, sieci oraz uwzględniające
65 grupy kontrolne. Jest bardzo lekki, elastyczny i udostępnia narzędzia
66 do czynności związanych z kontenerami, takich jak monitorowanie z
67 asynchronicznym powiadamianiem o zdarzeniach czy zamrażanie. Ten
68 pakiet jest przydatny do tworzenia wirtualnych serwerów prywatnych
69 oraz uruchamiania izolowanych aplikacji, takich jak bash czy sshd.
72 Summary: Header files for lxc library
73 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki lxc
74 Group: Development/Libraries
75 Requires: %{name} = %{version}-%{release}
78 Header files for lxc library.
80 %description devel -l pl.UTF-8
81 Pliki nagłówkowe biblioteki lxc.
84 Summary: Lua binding for LXC
85 Summary(pl.UTF-8): Wiązanie Lua do LXC
87 Requires: %{name} = %{version}-%{release}
88 Requires: lua51-libs >= 5.1
90 %description -n lua-lxc
93 %description -n lua-lxc -l pl.UTF-8
96 %package -n python3-lxc
97 Summary: Python (3.x) binding for LXC
98 Summary(pl.UTF-8): Wiązanie Pythona (3.x) do LXC
100 Requires: %{name} = %{version}-%{release}
101 Requires: python3-libs >= 3.2
102 Requires: python3-modules
104 %description -n python3-lxc
105 Python (3.x) binding for LXC.
107 %description -n python3-lxc -l pl.UTF-8
108 Wiązanie Pythona (3.x) do LXC.
110 %package -n bash-completion-%{name}
111 Summary: bash-completion for LXC
112 Summary(pl.UTF-8): bashowe uzupełnianie nazw dla LXC
113 Group: Applications/Shells
115 Requires: bash-completion
117 %description -n bash-completion-%{name}
118 bash-completion for LXC.
120 %description -n bash-completion-%{name} -l pl.UTF-8
121 bashowe uzupełnianie nazw dla LXC.
127 cp -p %{SOURCE1} templates/lxc-pld.in
130 %{__aclocal} -I config
135 db2xman=docbook2X2man \
140 %{__enable_disable apparmor} \
141 %{__enable_disable lua} %{?with_lua:--with-lua-pc=lua51} \
142 %{__enable_disable python} \
143 %{__enable_disable seccomp} \
144 %{__enable_disable selinux} \
145 --with-config-path=%{configpath} \
146 --with-init-script=sysvinit,systemd \
147 --with-runtime-path=/var/run \
154 rm -rf $RPM_BUILD_ROOT
155 install -d $RPM_BUILD_ROOT{%{configpath},%{configpath}snap,/var/{cache,log}/lxc} \
156 -d $RPM_BUILD_ROOT/etc/rc.d/init.d
160 SYSTEMD_UNIT_DIR=%{systemdunitdir} \
161 pcdatadir=%{_pkgconfigdir} \
162 DESTDIR=$RPM_BUILD_ROOT
164 %{__make} -C doc install \
165 DESTDIR=$RPM_BUILD_ROOT
167 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
169 # apparmor profiles are not packaged, remove to avoid packagers confusion
170 %{__rm} -r $RPM_BUILD_ROOT/etc/apparmor.d
172 # yum plugin, no idea where to package this
173 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/lxc-patch.py
175 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/lxc
178 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
179 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
182 %{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua51,' $RPM_BUILD_ROOT%{_bindir}/lxc-top
186 rm -rf $RPM_BUILD_ROOT
188 %post -p /sbin/ldconfig
189 %postun -p /sbin/ldconfig
192 %defattr(644,root,root,755)
193 %doc AUTHORS CONTRIBUTING MAINTAINERS README doc/FAQ.txt doc/examples/*.conf
194 %attr(755,root,root) %{_bindir}/lxc-attach
195 %attr(755,root,root) %{_bindir}/lxc-autostart
196 %attr(755,root,root) %{_bindir}/lxc-cgroup
197 %attr(755,root,root) %{_bindir}/lxc-checkconfig
198 %attr(755,root,root) %{_bindir}/lxc-clone
199 %attr(755,root,root) %{_bindir}/lxc-config
200 %attr(755,root,root) %{_bindir}/lxc-console
201 %attr(755,root,root) %{_bindir}/lxc-create
202 %attr(755,root,root) %{_bindir}/lxc-destroy
203 %attr(755,root,root) %{_bindir}/lxc-execute
204 %attr(755,root,root) %{_bindir}/lxc-freeze
205 %attr(755,root,root) %{_bindir}/lxc-info
206 %attr(755,root,root) %{_bindir}/lxc-monitor
207 %attr(755,root,root) %{_bindir}/lxc-snapshot
208 %attr(755,root,root) %{_bindir}/lxc-start
209 %attr(755,root,root) %{_bindir}/lxc-stop
210 %attr(755,root,root) %{_bindir}/lxc-unfreeze
211 %attr(755,root,root) %{_bindir}/lxc-unshare
212 %attr(755,root,root) %{_bindir}/lxc-usernsexec
213 %attr(755,root,root) %{_bindir}/lxc-wait
214 %attr(755,root,root) %{_sbindir}/init.lxc
215 %attr(755,root,root) %{_libdir}/liblxc.so.*.*.*
216 %attr(755,root,root) %ghost %{_libdir}/liblxc.so.1
217 %attr(754,root,root) /etc/rc.d/init.d/lxc
218 %{systemdunitdir}/lxc.service
219 %dir %{_libdir}/%{name}
220 %dir %{_libdir}/%{name}/rootfs
221 %{_libdir}/%{name}/rootfs/README
222 %attr(755,root,root) %{_libdir}/%{name}/lxc-devsetup
223 %attr(755,root,root) %{_libdir}/%{name}/lxc-monitord
224 %attr(755,root,root) %{_libdir}/%{name}/lxc-user-nic
225 %attr(755,root,root) %{_libdir}/%{name}/lxc-autostart-helper
226 %dir %{_sysconfdir}/lxc
227 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf
228 %dir %{_datadir}/%{name}
229 %{_datadir}/%{name}/lxc.functions
230 %dir %{_datadir}/%{name}/config
231 %{_datadir}/%{name}/config/centos.*.conf
232 %{_datadir}/%{name}/config/common.seccomp
233 %{_datadir}/%{name}/config/debian.*.conf
234 %{_datadir}/%{name}/config/fedora.*.conf
235 %{_datadir}/%{name}/config/gentoo.*.conf
236 %{_datadir}/%{name}/config/oracle.*.conf
237 %{_datadir}/%{name}/config/plamo.*.conf
238 %{_datadir}/%{name}/config/ubuntu-cloud.*.conf
239 %{_datadir}/%{name}/config/ubuntu.*.conf
240 %dir %{_datadir}/%{name}/hooks
241 %dir %{_datadir}/%{name}/templates
242 %attr(755,root,root) %{_datadir}/%{name}/hooks/clonehostname
243 %attr(755,root,root) %{_datadir}/%{name}/hooks/mount*
244 %attr(755,root,root) %{_datadir}/%{name}/hooks/squid-deb-proxy-client
245 %attr(755,root,root) %{_datadir}/%{name}/hooks/ubuntu-cloud-prep
246 %attr(755,root,root) %{_datadir}/%{name}/templates/lxc-*
247 %{_mandir}/man1/lxc-attach.1*
248 %{_mandir}/man1/lxc-autostart.1*
249 %{_mandir}/man1/lxc-cgroup.1*
250 %{_mandir}/man1/lxc-checkconfig.1*
251 %{_mandir}/man1/lxc-clone.1*
252 %{_mandir}/man1/lxc-config.1*
253 %{_mandir}/man1/lxc-console.1*
254 %{_mandir}/man1/lxc-create.1*
255 %{_mandir}/man1/lxc-destroy.1*
256 %{_mandir}/man1/lxc-execute.1*
257 %{_mandir}/man1/lxc-freeze.1*
258 %{_mandir}/man1/lxc-info.1*
259 %{_mandir}/man1/lxc-monitor.1*
260 %{_mandir}/man1/lxc-snapshot.1*
261 %{_mandir}/man1/lxc-start.1*
262 %{_mandir}/man1/lxc-stop.1*
263 %{_mandir}/man1/lxc-unfreeze.1*
264 %{_mandir}/man1/lxc-unshare.1*
265 %{_mandir}/man1/lxc-user-nic.1*
266 %{_mandir}/man1/lxc-usernsexec.1*
267 %{_mandir}/man1/lxc-wait.1*
268 %{_mandir}/man5/lxc-usernet.5*
269 %{_mandir}/man5/lxc.conf.5*
270 %{_mandir}/man5/lxc.container.conf.5*
271 %{_mandir}/man5/lxc.system.conf.5*
272 %{_mandir}/man7/lxc.7*
273 %lang(ja) %{_mandir}/ja/man1/lxc*.1*
274 %lang(ja) %{_mandir}/ja/man5/lxc-usernet.5*
275 %lang(ja) %{_mandir}/ja/man5/lxc.conf.5*
276 %lang(ja) %{_mandir}/ja/man5/lxc.container.conf.5*
277 %lang(ja) %{_mandir}/ja/man5/lxc.system.conf.5*
278 %lang(ja) %{_mandir}/ja/man7/lxc.7*
279 %exclude %{_mandir}/ja/man1/lxc-device.1*
280 %exclude %{_mandir}/ja/man1/lxc-ls.1*
281 %exclude %{_mandir}/ja/man1/lxc-start-ephemeral.1*
282 %exclude %{_mandir}/ja/man1/lxc-top.1*
285 %if %{without python}
287 %attr(755,root,root) %{_bindir}/lxc-ls
288 %{_mandir}/man1/lxc-ls.1*
292 %dir %{configpath}snap
293 %dir %attr(750,root,root) /var/log/lxc
294 %dir %attr(750,root,root) /var/cache/lxc
297 %defattr(644,root,root,755)
298 %attr(755,root,root) %{_libdir}/liblxc.so
300 %{_pkgconfigdir}/lxc.pc
304 %defattr(644,root,root,755)
305 %attr(755,root,root) %{_bindir}/lxc-top
306 %dir %{_libdir}/lua/lxc
307 %attr(755,root,root) %{_libdir}/lua/lxc/core.so
308 %{_datadir}/lua/lxc.lua
309 %{_mandir}/man1/lxc-top.1*
310 %lang(ja) %{_mandir}/ja/man1/lxc-top.1*
314 %files -n python3-lxc
315 %defattr(644,root,root,755)
316 %attr(755,root,root) %{_bindir}/lxc-device
317 %attr(755,root,root) %{_bindir}/lxc-ls
318 %attr(755,root,root) %{_bindir}/lxc-start-ephemeral
320 %attr(755,root,root) %{py3_sitedir}/_lxc.cpython-*.so
321 %{py3_sitedir}/_lxc-0.1-py*.egg-info
322 %{_mandir}/man1/lxc-device.1*
323 %{_mandir}/man1/lxc-ls.1*
324 %{_mandir}/man1/lxc-start-ephemeral.1*
325 %lang(ja) %{_mandir}/ja/man1/lxc-device.1*
326 %lang(ja) %{_mandir}/ja/man1/lxc-ls.1*
327 %lang(ja) %{_mandir}/ja/man1/lxc-start-ephemeral.1*
330 %files -n bash-completion-%{name}
331 %defattr(644,root,root,755)
332 /etc/bash_completion.d/lxc