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