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