]> git.pld-linux.org Git - packages/lxc.git/blame - lxc.spec
- fix building on x32
[packages/lxc.git] / lxc.spec
CommitLineData
8ba1db82 1# TODO
8ba1db82
ER
2# - package apparmor stuff
3
67c70229
JB
4# Conditional build:
5%bcond_without seccomp # SecComp syscall filter
ccd4948a 6%bcond_without apparmor # apparmor
67c70229
JB
7%bcond_without lua # Lua binding
8%bcond_without python # Python binding
120ac263 9%bcond_with selinux # SELinux
8ba1db82 10%bcond_with cgmanager # Enable cgmanager (BR: libcgmanager, libnih >= 1.0.2, libnih-dbus >= 1.0.0, dbus-1 >= 1.2.16)
21c5c666 11
247c2ba9 12Summary: Linux Containers userspace tools
67c70229 13Summary(pl.UTF-8): Narzędzia do kontenerów linuksowych (LXC)
0886a606 14Name: lxc
84ac23c3 15Version: 1.0.7
de64e6ac 16Release: 4
c34ce688 17License: LGPL v2.1+
67c70229 18Group: Applications/System
6a2933ce 19Source0: https://www.linuxcontainers.org/downloads/%{name}-%{version}.tar.gz
84ac23c3 20# Source0-md5: b48f468a9bef0e4e140dd723f0a65ad0
adc39309 21Source1: %{name}-pld.in.sh
82a3991b 22Source2: %{name}.init
46f2854c
MK
23Source3: %{name}_macvlan.init
24Source4: %{name}_macvlan.sysconfig
de64e6ac
JR
25Patch0: %{name}-pld.patch
26Patch1: x32.patch
6a2933ce 27URL: https://www.linuxcontainers.org/
67c70229
JB
28BuildRequires: autoconf >= 2.50
29BuildRequires: automake
e5afa52e 30BuildRequires: docbook-dtd30-sgml
31BuildRequires: docbook-utils
21c5c666 32BuildRequires: docbook2X
7e4c14a6 33BuildRequires: gnutls-devel
ccd4948a 34%{?with_apparmor:BuildRequires: libapparmor-devel}
4e32c712 35BuildRequires: libcap-devel
67c70229 36%{?with_seccomp:BuildRequires: libseccomp-devel}
82a3991b 37BuildRequires: libxslt-progs
67c70229
JB
38%{?with_lua:BuildRequires: lua51-devel >= 5.1}
39BuildRequires: pkgconfig
40%{?with_python:BuildRequires: python3-devel >= 3.2}
82a3991b 41BuildRequires: rpm-pythonprov
67c70229 42BuildRequires: rpmbuild(macros) >= 1.612
c34ce688 43BuildRequires: sed >= 4.0
7e514b06 44Requires: rc-scripts >= 0.4.6
adc39309 45Requires: which
72d9317d
MK
46Requires: iproute2
47Requires(post,preun): /sbin/chkconfig
48Requires(post): /sbin/ldconfig
7f0b7e89 49Suggests: gnupg
16cf226e
ER
50Suggests: gnupg-plugin-keys_curl
51Suggests: gnupg-plugin-keys_hkp
21c5c666 52Suggests: net-tools
b93f2cb9 53Suggests: python3-lxc
b335abc0 54Suggests: rsync
0886a606
AM
55BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
e5afa52e 57%define configpath /var/lib/lxc
58
0886a606
AM
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
67c70229
JB
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
0886a606 79%package devel
67c70229
JB
80Summary: Header files for lxc library
81Summary(pl.UTF-8): Pliki nagłówkowe biblioteki lxc
0886a606 82Group: Development/Libraries
67c70229 83Requires: %{name} = %{version}-%{release}
0886a606
AM
84
85%description devel
67c70229
JB
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
91c8fae7 110Requires: python3-modules
67c70229
JB
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.
0886a606 117
4e82464d
ER
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
0886a606 131%prep
9db966c1 132%setup -q
de64e6ac 133%patch0 -p1
67c70229 134%patch1 -p1
0886a606 135
8a96554a
ER
136cp -p %{SOURCE1} templates/lxc-pld.in
137
0886a606 138%build
67c70229
JB
139%{__aclocal} -I config
140%{__autoconf}
141%{__autoheader}
142%{__automake}
e5afa52e 143%configure \
67c70229
JB
144 db2xman=docbook2X2man \
145 --disable-rpath \
8ba1db82 146 --enable-bash \
67c70229 147 --enable-doc \
120ac263 148 --enable-examples \
ccd4948a 149 %{__enable_disable apparmor} \
247c2ba9 150 %{__enable_disable lua} %{?with_lua:--with-lua-pc=lua51} \
ccd4948a
ER
151 %{__enable_disable python} \
152 %{__enable_disable seccomp} \
120ac263 153 %{__enable_disable selinux} \
67c70229 154 --with-config-path=%{configpath} \
8ba1db82 155 --with-init-script=sysvinit,systemd \
9db966c1 156 --with-runtime-path=/var/run \
67c70229 157 --with-distro=pld
0886a606
AM
158
159%{__make}
e5afa52e 160%{__make} -C doc
0886a606
AM
161
162%install
163rm -rf $RPM_BUILD_ROOT
4d6732e1 164install -d $RPM_BUILD_ROOT{%{configpath},%{configpath}snap,/var/{cache,log}/lxc} \
46f2854c 165 -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
4d6732e1 166
0886a606 167%{__make} install \
7e4c14a6
ER
168 SYSTEMD_UNIT_DIR=%{systemdunitdir} \
169 pcdatadir=%{_pkgconfigdir} \
170 DESTDIR=$RPM_BUILD_ROOT
33aee790 171
e5afa52e 172%{__make} -C doc install \
0886a606 173 DESTDIR=$RPM_BUILD_ROOT
33aee790 174
21c5c666 175%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
0886a606 176
6a2933ce
ER
177# apparmor profiles are not packaged, remove to avoid packagers confusion
178%{__rm} -r $RPM_BUILD_ROOT/etc/apparmor.d
179
ce58f702
ER
180# yum plugin, no idea where to package this
181%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/lxc-patch.py
182
4d6732e1 183install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/lxc
46f2854c
MK
184install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/lxc_macvlan
185install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/lxc_macvlan
4d6732e1 186
67c70229
JB
187%if %{with python}
188%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
189%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
190%endif
c34ce688 191%if %{with lua}
ef5bd4a4 192%{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua5.1,' $RPM_BUILD_ROOT%{_bindir}/lxc-top
c34ce688 193%endif
67c70229 194
0886a606
AM
195%clean
196rm -rf $RPM_BUILD_ROOT
197
72d9317d
MK
198%post
199/sbin/ldconfig
46f2854c
MK
200/sbin/chkconfig --add lxc
201/sbin/chkconfig --add lxc_macvlan
202
46f2854c
MK
203%preun
204if [ "$1" = "0" ]; then
205 %service lxc stop
206 /sbin/chkconfig --del lxc
207 %service lxc_macvlan stop
208 /sbin/chkconfig --del lxc_macvlan
209fi
210
67c70229 211%postun -p /sbin/ldconfig
0886a606 212
46f2854c 213
0886a606
AM
214%files
215%defattr(644,root,root,755)
58add690 216%doc AUTHORS CONTRIBUTING MAINTAINERS README doc/FAQ.txt doc/examples/*.conf
c34ce688 217%attr(755,root,root) %{_bindir}/lxc-attach
7e4c14a6 218%attr(755,root,root) %{_bindir}/lxc-autostart
c34ce688
JB
219%attr(755,root,root) %{_bindir}/lxc-cgroup
220%attr(755,root,root) %{_bindir}/lxc-checkconfig
c34ce688 221%attr(755,root,root) %{_bindir}/lxc-clone
247c2ba9 222%attr(755,root,root) %{_bindir}/lxc-config
c34ce688
JB
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
c34ce688 229%attr(755,root,root) %{_bindir}/lxc-monitor
247c2ba9 230%attr(755,root,root) %{_bindir}/lxc-snapshot
c34ce688
JB
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
120ac263 235%attr(755,root,root) %{_bindir}/lxc-usernsexec
c34ce688 236%attr(755,root,root) %{_bindir}/lxc-wait
ce58f702 237%attr(755,root,root) %{_sbindir}/init.lxc
e5afa52e 238%attr(755,root,root) %{_libdir}/liblxc.so.*.*.*
247c2ba9 239%attr(755,root,root) %ghost %{_libdir}/liblxc.so.1
7e4c14a6 240%attr(754,root,root) /etc/rc.d/init.d/lxc
46f2854c
MK
241%attr(754,root,root) /etc/rc.d/init.d/lxc_macvlan
242
7e4c14a6 243%{systemdunitdir}/lxc.service
8ba1db82
ER
244%dir %{_libdir}/%{name}
245%dir %{_libdir}/%{name}/rootfs
246%{_libdir}/%{name}/rootfs/README
247%attr(755,root,root) %{_libdir}/%{name}/lxc-devsetup
8ba1db82
ER
248%attr(755,root,root) %{_libdir}/%{name}/lxc-monitord
249%attr(755,root,root) %{_libdir}/%{name}/lxc-user-nic
58add690 250%attr(755,root,root) %{_libdir}/%{name}/lxc-autostart-helper
dc9a5b3b 251%dir %{_sysconfdir}/lxc
46f2854c 252%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lxc_macvlan
67c70229 253%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf
120ac263 254%dir %{_datadir}/%{name}
f5933d47 255%{_datadir}/%{name}/lxc.functions
120ac263 256%dir %{_datadir}/%{name}/config
8ba1db82 257%{_datadir}/%{name}/config/centos.*.conf
b93f2cb9 258%{_datadir}/%{name}/config/common.seccomp
8ba1db82
ER
259%{_datadir}/%{name}/config/debian.*.conf
260%{_datadir}/%{name}/config/fedora.*.conf
3f7b319e 261%{_datadir}/%{name}/config/gentoo.*.conf
8ba1db82
ER
262%{_datadir}/%{name}/config/oracle.*.conf
263%{_datadir}/%{name}/config/plamo.*.conf
264%{_datadir}/%{name}/config/ubuntu-cloud.*.conf
265%{_datadir}/%{name}/config/ubuntu.*.conf
f5933d47
ER
266%dir %{_datadir}/%{name}/hooks
267%dir %{_datadir}/%{name}/templates
247c2ba9 268%attr(755,root,root) %{_datadir}/%{name}/hooks/clonehostname
7e4c14a6
ER
269%attr(755,root,root) %{_datadir}/%{name}/hooks/mount*
270%attr(755,root,root) %{_datadir}/%{name}/hooks/squid-deb-proxy-client
247c2ba9 271%attr(755,root,root) %{_datadir}/%{name}/hooks/ubuntu-cloud-prep
f5933d47 272%attr(755,root,root) %{_datadir}/%{name}/templates/lxc-*
c34ce688 273%{_mandir}/man1/lxc-attach.1*
7e4c14a6 274%{_mandir}/man1/lxc-autostart.1*
c34ce688
JB
275%{_mandir}/man1/lxc-cgroup.1*
276%{_mandir}/man1/lxc-checkconfig.1*
c34ce688 277%{_mandir}/man1/lxc-clone.1*
8ba1db82 278%{_mandir}/man1/lxc-config.1*
c34ce688
JB
279%{_mandir}/man1/lxc-console.1*
280%{_mandir}/man1/lxc-create.1*
281%{_mandir}/man1/lxc-destroy.1*
282%{_mandir}/man1/lxc-execute.1*
283%{_mandir}/man1/lxc-freeze.1*
284%{_mandir}/man1/lxc-info.1*
c34ce688 285%{_mandir}/man1/lxc-monitor.1*
247c2ba9 286%{_mandir}/man1/lxc-snapshot.1*
c34ce688
JB
287%{_mandir}/man1/lxc-start.1*
288%{_mandir}/man1/lxc-stop.1*
289%{_mandir}/man1/lxc-unfreeze.1*
290%{_mandir}/man1/lxc-unshare.1*
120ac263 291%{_mandir}/man1/lxc-user-nic.1*
8ba1db82 292%{_mandir}/man1/lxc-usernsexec.1*
c34ce688 293%{_mandir}/man1/lxc-wait.1*
120ac263 294%{_mandir}/man5/lxc-usernet.5*
67c70229 295%{_mandir}/man5/lxc.conf.5*
8ba1db82
ER
296%{_mandir}/man5/lxc.container.conf.5*
297%{_mandir}/man5/lxc.system.conf.5*
67c70229 298%{_mandir}/man7/lxc.7*
247c2ba9 299%lang(ja) %{_mandir}/ja/man1/lxc*.1*
7e4c14a6 300%lang(ja) %{_mandir}/ja/man5/lxc-usernet.5*
247c2ba9 301%lang(ja) %{_mandir}/ja/man5/lxc.conf.5*
8ba1db82
ER
302%lang(ja) %{_mandir}/ja/man5/lxc.container.conf.5*
303%lang(ja) %{_mandir}/ja/man5/lxc.system.conf.5*
247c2ba9
ER
304%lang(ja) %{_mandir}/ja/man7/lxc.7*
305%exclude %{_mandir}/ja/man1/lxc-device.1*
306%exclude %{_mandir}/ja/man1/lxc-ls.1*
307%exclude %{_mandir}/ja/man1/lxc-start-ephemeral.1*
308%exclude %{_mandir}/ja/man1/lxc-top.1*
309
b93f2cb9 310
c34ce688
JB
311%if %{without python}
312# legacy version
313%attr(755,root,root) %{_bindir}/lxc-ls
314%{_mandir}/man1/lxc-ls.1*
315%endif
0886a606 316
ff8ce371 317%dir %{configpath}
39773dac 318%dir %{configpath}snap
f10dfb13
ER
319%dir %attr(750,root,root) /var/log/lxc
320%dir %attr(750,root,root) /var/cache/lxc
ff8ce371 321
0886a606
AM
322%files devel
323%defattr(644,root,root,755)
0886a606 324%attr(755,root,root) %{_libdir}/liblxc.so
67c70229 325%{_includedir}/lxc
e5afa52e 326%{_pkgconfigdir}/lxc.pc
67c70229
JB
327
328%if %{with lua}
329%files -n lua-lxc
330%defattr(644,root,root,755)
c34ce688 331%attr(755,root,root) %{_bindir}/lxc-top
247c2ba9
ER
332%dir %{_libdir}/lua/lxc
333%attr(755,root,root) %{_libdir}/lua/lxc/core.so
334%{_datadir}/lua/lxc.lua
c34ce688 335%{_mandir}/man1/lxc-top.1*
247c2ba9 336%lang(ja) %{_mandir}/ja/man1/lxc-top.1*
67c70229
JB
337%endif
338
339%if %{with python}
340%files -n python3-lxc
341%defattr(644,root,root,755)
c34ce688
JB
342%attr(755,root,root) %{_bindir}/lxc-device
343%attr(755,root,root) %{_bindir}/lxc-ls
344%attr(755,root,root) %{_bindir}/lxc-start-ephemeral
67c70229
JB
345%{py3_sitedir}/lxc
346%attr(755,root,root) %{py3_sitedir}/_lxc.cpython-*.so
347%{py3_sitedir}/_lxc-0.1-py*.egg-info
c34ce688
JB
348%{_mandir}/man1/lxc-device.1*
349%{_mandir}/man1/lxc-ls.1*
350%{_mandir}/man1/lxc-start-ephemeral.1*
247c2ba9
ER
351%lang(ja) %{_mandir}/ja/man1/lxc-device.1*
352%lang(ja) %{_mandir}/ja/man1/lxc-ls.1*
353%lang(ja) %{_mandir}/ja/man1/lxc-start-ephemeral.1*
67c70229 354%endif
4e82464d
ER
355
356%files -n bash-completion-%{name}
357%defattr(644,root,root,755)
358/etc/bash_completion.d/lxc
This page took 0.158985 seconds and 4 git commands to generate.