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