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