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