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