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