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: http://linuxcontainers.org/downloads/%{name}-%{version}.tar.gz
20 # Source0-md5: 87a9d168a6e55326303cce3b2cb7f82e
21 Source1: %{name}-pld.in.sh
22 Patch1: %{name}-pld.patch
23 URL: http://linuxcontainers.org/
24 BuildRequires: autoconf >= 2.50
25 BuildRequires: automake
26 BuildRequires: docbook-dtd30-sgml
27 BuildRequires: docbook-utils
28 BuildRequires: docbook2X
29 BuildRequires: gnutls-devel
30 %{?with_apparmor:BuildRequires: libapparmor-devel}
31 BuildRequires: libcap-devel
32 %{?with_seccomp:BuildRequires: libseccomp-devel}
33 %{?with_lua:BuildRequires: lua51-devel >= 5.1}
34 BuildRequires: pkgconfig
35 %{?with_python:BuildRequires: python3-devel >= 3.2}
36 BuildRequires: rpmbuild(macros) >= 1.612
37 BuildRequires: sed >= 4.0
38 Requires: rc-scripts >= 0.4.6
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 %define configpath /var/lib/lxc
48 Tools to create and manage containers. It contains a full featured
49 container with the isolation / virtualization of the pids, the ipc,
50 the utsname, the mount points, /proc, /sys, the network and it takes
51 into account the control groups. It is very light, flexible, and
52 provides a set of tools around the container like the monitoring with
53 asynchronous events notification, or the freeze of the container. This
54 package is useful to create Virtual Private Server, or to run isolated
55 applications like bash or sshd.
57 %description -l pl.UTF-8
58 Narzędzia do tworzenia i zarządzania kontenerami. System ten obejmuje
59 w pełni funkcjonalne kontenery z ilozacją/wirtualizacją pidów, ipc,
60 utsname, punktów montowania, /proc, /sys, sieci oraz uwzględniające
61 grupy kontrolne. Jest bardzo lekki, elastyczny i udostępnia narzędzia
62 do czynności związanych z kontenerami, takich jak monitorowanie z
63 asynchronicznym powiadamianiem o zdarzeniach czy zamrażanie. Ten
64 pakiet jest przydatny do tworzenia wirtualnych serwerów prywatnych
65 oraz uruchamiania izolowanych aplikacji, takich jak bash czy sshd.
68 Summary: Header files for lxc library
69 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki lxc
70 Group: Development/Libraries
71 Requires: %{name} = %{version}-%{release}
74 Header files for lxc library.
76 %description devel -l pl.UTF-8
77 Pliki nagłówkowe biblioteki lxc.
80 Summary: Lua binding for LXC
81 Summary(pl.UTF-8): Wiązanie Lua do LXC
83 Requires: %{name} = %{version}-%{release}
84 Requires: lua51-libs >= 5.1
86 %description -n lua-lxc
89 %description -n lua-lxc -l pl.UTF-8
92 %package -n python3-lxc
93 Summary: Python (3.x) binding for LXC
94 Summary(pl.UTF-8): Wiązanie Pythona (3.x) do LXC
96 Requires: %{name} = %{version}-%{release}
97 Requires: python3-libs >= 3.2
98 Requires: python3-modules
100 %description -n python3-lxc
101 Python (3.x) binding for LXC.
103 %description -n python3-lxc -l pl.UTF-8
104 Wiązanie Pythona (3.x) do LXC.
106 %package -n bash-completion-%{name}
107 Summary: bash-completion for LXC
108 Summary(pl.UTF-8): bashowe uzupełnianie nazw dla LXC
109 Group: Applications/Shells
111 Requires: bash-completion
113 %description -n bash-completion-%{name}
114 bash-completion for LXC.
116 %description -n bash-completion-%{name} -l pl.UTF-8
117 bashowe uzupełnianie nazw dla LXC.
123 cp -p %{SOURCE1} templates/lxc-pld.in
126 %{__aclocal} -I config
131 db2xman=docbook2X2man \
136 %{__enable_disable apparmor} \
137 %{__enable_disable lua} %{?with_lua:--with-lua-pc=lua51} \
138 %{__enable_disable python} \
139 %{__enable_disable seccomp} \
140 %{__enable_disable selinux} \
141 --with-config-path=%{configpath} \
142 --with-init-script=sysvinit,systemd \
143 --with-runtime-path=/var/run \
150 rm -rf $RPM_BUILD_ROOT
151 install -d $RPM_BUILD_ROOT{%{configpath},%{configpath}snap,/var/{cache,log}/lxc}
153 SYSTEMD_UNIT_DIR=%{systemdunitdir} \
154 pcdatadir=%{_pkgconfigdir} \
155 DESTDIR=$RPM_BUILD_ROOT
157 %{__make} -C doc install \
158 DESTDIR=$RPM_BUILD_ROOT
160 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
163 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
164 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
167 %{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua51,' $RPM_BUILD_ROOT%{_bindir}/lxc-top
171 rm -rf $RPM_BUILD_ROOT
173 %post -p /sbin/ldconfig
174 %postun -p /sbin/ldconfig
177 %defattr(644,root,root,755)
178 %doc AUTHORS CONTRIBUTING MAINTAINERS README TODO doc/FAQ.txt doc/examples/*.conf
179 %attr(755,root,root) %{_bindir}/lxc-attach
180 %attr(755,root,root) %{_bindir}/lxc-autostart
181 %attr(755,root,root) %{_bindir}/lxc-cgroup
182 %attr(755,root,root) %{_bindir}/lxc-checkconfig
183 %attr(755,root,root) %{_bindir}/lxc-clone
184 %attr(755,root,root) %{_bindir}/lxc-config
185 %attr(755,root,root) %{_bindir}/lxc-console
186 %attr(755,root,root) %{_bindir}/lxc-create
187 %attr(755,root,root) %{_bindir}/lxc-destroy
188 %attr(755,root,root) %{_bindir}/lxc-execute
189 %attr(755,root,root) %{_bindir}/lxc-freeze
190 %attr(755,root,root) %{_bindir}/lxc-info
191 %attr(755,root,root) %{_bindir}/lxc-monitor
192 %attr(755,root,root) %{_bindir}/lxc-snapshot
193 %attr(755,root,root) %{_bindir}/lxc-start
194 %attr(755,root,root) %{_bindir}/lxc-stop
195 %attr(755,root,root) %{_bindir}/lxc-unfreeze
196 %attr(755,root,root) %{_bindir}/lxc-unshare
197 %attr(755,root,root) %{_bindir}/lxc-usernsexec
198 %attr(755,root,root) %{_bindir}/lxc-wait
199 %attr(755,root,root) %{_libdir}/liblxc.so.*.*.*
200 %attr(755,root,root) %ghost %{_libdir}/liblxc.so.1
201 %attr(754,root,root) /etc/rc.d/init.d/lxc
202 %{systemdunitdir}/lxc.service
203 %dir %{_libdir}/%{name}
204 %dir %{_libdir}/%{name}/rootfs
205 %{_libdir}/%{name}/rootfs/README
206 %attr(755,root,root) %{_libdir}/%{name}/lxc-devsetup
207 %attr(755,root,root) %{_libdir}/%{name}/lxc-init
208 %attr(755,root,root) %{_libdir}/%{name}/lxc-monitord
209 %attr(755,root,root) %{_libdir}/%{name}/lxc-user-nic
210 %dir %{_sysconfdir}/lxc
211 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf
212 %dir %{_datadir}/%{name}
213 %{_datadir}/%{name}/lxc.functions
214 %dir %{_datadir}/%{name}/config
215 %{_datadir}/%{name}/config/centos.*.conf
216 %{_datadir}/%{name}/config/debian.*.conf
217 %{_datadir}/%{name}/config/fedora.*.conf
218 %{_datadir}/%{name}/config/gentoo.*.conf
219 %{_datadir}/%{name}/config/oracle.*.conf
220 %{_datadir}/%{name}/config/plamo.*.conf
221 %{_datadir}/%{name}/config/ubuntu-cloud.*.conf
222 %{_datadir}/%{name}/config/ubuntu.*.conf
223 %dir %{_datadir}/%{name}/hooks
224 %dir %{_datadir}/%{name}/templates
225 %attr(755,root,root) %{_datadir}/%{name}/hooks/clonehostname
226 %attr(755,root,root) %{_datadir}/%{name}/hooks/mount*
227 %attr(755,root,root) %{_datadir}/%{name}/hooks/squid-deb-proxy-client
228 %attr(755,root,root) %{_datadir}/%{name}/hooks/ubuntu-cloud-prep
229 %attr(755,root,root) %{_datadir}/%{name}/templates/lxc-*
230 %{_mandir}/man1/lxc-attach.1*
231 %{_mandir}/man1/lxc-autostart.1*
232 %{_mandir}/man1/lxc-cgroup.1*
233 %{_mandir}/man1/lxc-checkconfig.1*
234 %{_mandir}/man1/lxc-clone.1*
235 %{_mandir}/man1/lxc-config.1*
236 %{_mandir}/man1/lxc-console.1*
237 %{_mandir}/man1/lxc-create.1*
238 %{_mandir}/man1/lxc-destroy.1*
239 %{_mandir}/man1/lxc-execute.1*
240 %{_mandir}/man1/lxc-freeze.1*
241 %{_mandir}/man1/lxc-info.1*
242 %{_mandir}/man1/lxc-monitor.1*
243 %{_mandir}/man1/lxc-snapshot.1*
244 %{_mandir}/man1/lxc-start.1*
245 %{_mandir}/man1/lxc-stop.1*
246 %{_mandir}/man1/lxc-unfreeze.1*
247 %{_mandir}/man1/lxc-unshare.1*
248 %{_mandir}/man1/lxc-user-nic.1*
249 %{_mandir}/man1/lxc-usernsexec.1*
250 %{_mandir}/man1/lxc-wait.1*
251 %{_mandir}/man5/lxc-usernet.5*
252 %{_mandir}/man5/lxc.conf.5*
253 %{_mandir}/man5/lxc.container.conf.5*
254 %{_mandir}/man5/lxc.system.conf.5*
255 %{_mandir}/man7/lxc.7*
256 %lang(ja) %{_mandir}/ja/man1/lxc*.1*
257 %lang(ja) %{_mandir}/ja/man5/lxc-usernet.5*
258 %lang(ja) %{_mandir}/ja/man5/lxc.conf.5*
259 %lang(ja) %{_mandir}/ja/man5/lxc.container.conf.5*
260 %lang(ja) %{_mandir}/ja/man5/lxc.system.conf.5*
261 %lang(ja) %{_mandir}/ja/man7/lxc.7*
262 %exclude %{_mandir}/ja/man1/lxc-device.1*
263 %exclude %{_mandir}/ja/man1/lxc-ls.1*
264 %exclude %{_mandir}/ja/man1/lxc-start-ephemeral.1*
265 %exclude %{_mandir}/ja/man1/lxc-top.1*
267 %if %{without python}
269 %attr(755,root,root) %{_bindir}/lxc-ls
270 %{_mandir}/man1/lxc-ls.1*
274 %dir %{configpath}snap
275 %dir %attr(750,root,root) /var/log/lxc
276 %dir %attr(750,root,root) /var/cache/lxc
279 %defattr(644,root,root,755)
280 %attr(755,root,root) %{_libdir}/liblxc.so
282 %{_pkgconfigdir}/lxc.pc
286 %defattr(644,root,root,755)
287 %attr(755,root,root) %{_bindir}/lxc-top
288 %dir %{_libdir}/lua/lxc
289 %attr(755,root,root) %{_libdir}/lua/lxc/core.so
290 %{_datadir}/lua/lxc.lua
291 %{_mandir}/man1/lxc-top.1*
292 %lang(ja) %{_mandir}/ja/man1/lxc-top.1*
296 %files -n python3-lxc
297 %defattr(644,root,root,755)
298 %attr(755,root,root) %{_bindir}/lxc-device
299 %attr(755,root,root) %{_bindir}/lxc-ls
300 %attr(755,root,root) %{_bindir}/lxc-start-ephemeral
302 %attr(755,root,root) %{py3_sitedir}/_lxc.cpython-*.so
303 %{py3_sitedir}/_lxc-0.1-py*.egg-info
304 %{_mandir}/man1/lxc-device.1*
305 %{_mandir}/man1/lxc-ls.1*
306 %{_mandir}/man1/lxc-start-ephemeral.1*
307 %lang(ja) %{_mandir}/ja/man1/lxc-device.1*
308 %lang(ja) %{_mandir}/ja/man1/lxc-ls.1*
309 %lang(ja) %{_mandir}/ja/man1/lxc-start-ephemeral.1*
312 %files -n bash-completion-%{name}
313 %defattr(644,root,root,755)
314 /etc/bash_completion.d/lxc