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