]> git.pld-linux.org Git - packages/lxc.git/blame - lxc.spec
up to 1.0.0-beta3, tools dropped in favour or just using lxc-attach
[packages/lxc.git] / lxc.spec
CommitLineData
8ba1db82
ER
1# TODO
2# - bash-completion: /etc/bash_completion.d/lxc
3# - package apparmor stuff
4
67c70229
JB
5# Conditional build:
6%bcond_without seccomp # SecComp syscall filter
ccd4948a 7%bcond_without apparmor # apparmor
67c70229
JB
8%bcond_without lua # Lua binding
9%bcond_without python # Python binding
120ac263 10%bcond_with selinux # SELinux
8ba1db82 11%bcond_with cgmanager # Enable cgmanager (BR: libcgmanager, libnih >= 1.0.2, libnih-dbus >= 1.0.0, dbus-1 >= 1.2.16)
21c5c666 12
8ba1db82 13%define subver beta3
247c2ba9
ER
14%define rel 0.1
15Summary: Linux Containers userspace tools
67c70229 16Summary(pl.UTF-8): Narzędzia do kontenerów linuksowych (LXC)
0886a606 17Name: lxc
247c2ba9
ER
18Version: 1.0.0
19Release: 0.%{subver}.%{rel}
c34ce688 20License: LGPL v2.1+
67c70229 21Group: Applications/System
247c2ba9 22Source0: https://github.com/lxc/lxc/archive/%{name}-%{version}.%{subver}.tar.gz
8ba1db82 23# Source0-md5: b2ea21f87fa79e89990e41557d675d19
adc39309 24Source1: %{name}-pld.in.sh
67c70229 25Patch1: %{name}-pld.patch
bf6a07ce 26Patch4: checkconfig-vserver-config.patch
247c2ba9 27URL: http://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
JB
36%{?with_seccomp:BuildRequires: libseccomp-devel}
37%{?with_lua:BuildRequires: lua51-devel >= 5.1}
38BuildRequires: pkgconfig
39%{?with_python:BuildRequires: python3-devel >= 3.2}
40BuildRequires: rpmbuild(macros) >= 1.612
c34ce688 41BuildRequires: sed >= 4.0
7e514b06 42Requires: rc-scripts >= 0.4.6
adc39309 43Requires: which
21c5c666 44Suggests: net-tools
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
0886a606 109%prep
247c2ba9 110%setup -q -n %{name}-%{name}-%{version}%{?subver:.%{subver}}
67c70229 111%patch1 -p1
bf6a07ce 112%patch4 -p1
0886a606 113
8a96554a
ER
114cp -p %{SOURCE1} templates/lxc-pld.in
115
0886a606 116%build
67c70229
JB
117%{__aclocal} -I config
118%{__autoconf}
119%{__autoheader}
120%{__automake}
e5afa52e 121%configure \
67c70229
JB
122 db2xman=docbook2X2man \
123 --disable-rpath \
8ba1db82 124 --enable-bash \
67c70229 125 --enable-doc \
120ac263 126 --enable-examples \
ccd4948a 127 %{__enable_disable apparmor} \
247c2ba9 128 %{__enable_disable lua} %{?with_lua:--with-lua-pc=lua51} \
ccd4948a
ER
129 %{__enable_disable python} \
130 %{__enable_disable seccomp} \
120ac263 131 %{__enable_disable selinux} \
67c70229 132 --with-config-path=%{configpath} \
8ba1db82 133 --with-init-script=sysvinit,systemd \
67c70229 134 --with-distro=pld
0886a606
AM
135
136%{__make}
e5afa52e 137%{__make} -C doc
0886a606
AM
138
139%install
140rm -rf $RPM_BUILD_ROOT
f10dfb13 141install -d $RPM_BUILD_ROOT{%{configpath},/var/{cache,log}/lxc}
0886a606 142%{__make} install \
7e4c14a6
ER
143 SYSTEMD_UNIT_DIR=%{systemdunitdir} \
144 pcdatadir=%{_pkgconfigdir} \
145 DESTDIR=$RPM_BUILD_ROOT
33aee790 146
e5afa52e 147%{__make} -C doc install \
0886a606 148 DESTDIR=$RPM_BUILD_ROOT
33aee790 149
21c5c666 150%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
0886a606 151
67c70229
JB
152%if %{with python}
153%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
154%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
155%endif
c34ce688
JB
156%if %{with lua}
157%{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua51,' $RPM_BUILD_ROOT%{_bindir}/lxc-top
158%endif
67c70229 159
0886a606
AM
160%clean
161rm -rf $RPM_BUILD_ROOT
162
67c70229
JB
163%post -p /sbin/ldconfig
164%postun -p /sbin/ldconfig
0886a606
AM
165
166%files
167%defattr(644,root,root,755)
247c2ba9 168%doc AUTHORS CONTRIBUTING MAINTAINERS README TODO doc/FAQ.txt doc/examples/*.conf
c34ce688 169%attr(755,root,root) %{_bindir}/lxc-attach
7e4c14a6 170%attr(755,root,root) %{_bindir}/lxc-autostart
c34ce688
JB
171%attr(755,root,root) %{_bindir}/lxc-cgroup
172%attr(755,root,root) %{_bindir}/lxc-checkconfig
c34ce688 173%attr(755,root,root) %{_bindir}/lxc-clone
247c2ba9 174%attr(755,root,root) %{_bindir}/lxc-config
c34ce688
JB
175%attr(755,root,root) %{_bindir}/lxc-console
176%attr(755,root,root) %{_bindir}/lxc-create
177%attr(755,root,root) %{_bindir}/lxc-destroy
178%attr(755,root,root) %{_bindir}/lxc-execute
179%attr(755,root,root) %{_bindir}/lxc-freeze
180%attr(755,root,root) %{_bindir}/lxc-info
c34ce688 181%attr(755,root,root) %{_bindir}/lxc-monitor
247c2ba9 182%attr(755,root,root) %{_bindir}/lxc-snapshot
c34ce688
JB
183%attr(755,root,root) %{_bindir}/lxc-start
184%attr(755,root,root) %{_bindir}/lxc-stop
185%attr(755,root,root) %{_bindir}/lxc-unfreeze
186%attr(755,root,root) %{_bindir}/lxc-unshare
120ac263 187%attr(755,root,root) %{_bindir}/lxc-usernsexec
c34ce688 188%attr(755,root,root) %{_bindir}/lxc-wait
e5afa52e 189%attr(755,root,root) %{_libdir}/liblxc.so.*.*.*
247c2ba9 190%attr(755,root,root) %ghost %{_libdir}/liblxc.so.1
7e4c14a6
ER
191%attr(754,root,root) /etc/rc.d/init.d/lxc
192%{systemdunitdir}/lxc.service
8ba1db82
ER
193%dir %{_libdir}/%{name}
194%dir %{_libdir}/%{name}/rootfs
195%{_libdir}/%{name}/rootfs/README
196%attr(755,root,root) %{_libdir}/%{name}/lxc-devsetup
197%attr(755,root,root) %{_libdir}/%{name}/lxc-init
198%attr(755,root,root) %{_libdir}/%{name}/lxc-monitord
199%attr(755,root,root) %{_libdir}/%{name}/lxc-user-nic
dc9a5b3b 200%dir %{_sysconfdir}/lxc
67c70229 201%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf
120ac263 202%dir %{_datadir}/%{name}
f5933d47 203%{_datadir}/%{name}/lxc.functions
120ac263 204%dir %{_datadir}/%{name}/config
8ba1db82
ER
205%{_datadir}/%{name}/config/centos.*.conf
206%{_datadir}/%{name}/config/debian.*.conf
207%{_datadir}/%{name}/config/fedora.*.conf
208%{_datadir}/%{name}/config/oracle.*.conf
209%{_datadir}/%{name}/config/plamo.*.conf
210%{_datadir}/%{name}/config/ubuntu-cloud.*.conf
211%{_datadir}/%{name}/config/ubuntu.*.conf
f5933d47
ER
212%dir %{_datadir}/%{name}/hooks
213%dir %{_datadir}/%{name}/templates
247c2ba9 214%attr(755,root,root) %{_datadir}/%{name}/hooks/clonehostname
7e4c14a6
ER
215%attr(755,root,root) %{_datadir}/%{name}/hooks/mount*
216%attr(755,root,root) %{_datadir}/%{name}/hooks/squid-deb-proxy-client
247c2ba9 217%attr(755,root,root) %{_datadir}/%{name}/hooks/ubuntu-cloud-prep
f5933d47 218%attr(755,root,root) %{_datadir}/%{name}/templates/lxc-*
c34ce688 219%{_mandir}/man1/lxc-attach.1*
7e4c14a6 220%{_mandir}/man1/lxc-autostart.1*
c34ce688
JB
221%{_mandir}/man1/lxc-cgroup.1*
222%{_mandir}/man1/lxc-checkconfig.1*
c34ce688 223%{_mandir}/man1/lxc-clone.1*
8ba1db82 224%{_mandir}/man1/lxc-config.1*
c34ce688
JB
225%{_mandir}/man1/lxc-console.1*
226%{_mandir}/man1/lxc-create.1*
227%{_mandir}/man1/lxc-destroy.1*
228%{_mandir}/man1/lxc-execute.1*
229%{_mandir}/man1/lxc-freeze.1*
230%{_mandir}/man1/lxc-info.1*
c34ce688 231%{_mandir}/man1/lxc-monitor.1*
247c2ba9 232%{_mandir}/man1/lxc-snapshot.1*
c34ce688
JB
233%{_mandir}/man1/lxc-start.1*
234%{_mandir}/man1/lxc-stop.1*
235%{_mandir}/man1/lxc-unfreeze.1*
236%{_mandir}/man1/lxc-unshare.1*
120ac263 237%{_mandir}/man1/lxc-user-nic.1*
8ba1db82 238%{_mandir}/man1/lxc-usernsexec.1*
c34ce688 239%{_mandir}/man1/lxc-wait.1*
120ac263 240%{_mandir}/man5/lxc-usernet.5*
67c70229 241%{_mandir}/man5/lxc.conf.5*
8ba1db82
ER
242%{_mandir}/man5/lxc.container.conf.5*
243%{_mandir}/man5/lxc.system.conf.5*
67c70229 244%{_mandir}/man7/lxc.7*
247c2ba9 245%lang(ja) %{_mandir}/ja/man1/lxc*.1*
7e4c14a6 246%lang(ja) %{_mandir}/ja/man5/lxc-usernet.5*
247c2ba9 247%lang(ja) %{_mandir}/ja/man5/lxc.conf.5*
8ba1db82
ER
248%lang(ja) %{_mandir}/ja/man5/lxc.container.conf.5*
249%lang(ja) %{_mandir}/ja/man5/lxc.system.conf.5*
247c2ba9
ER
250%lang(ja) %{_mandir}/ja/man7/lxc.7*
251%exclude %{_mandir}/ja/man1/lxc-device.1*
252%exclude %{_mandir}/ja/man1/lxc-ls.1*
253%exclude %{_mandir}/ja/man1/lxc-start-ephemeral.1*
254%exclude %{_mandir}/ja/man1/lxc-top.1*
255
c34ce688
JB
256%if %{without python}
257# legacy version
258%attr(755,root,root) %{_bindir}/lxc-ls
259%{_mandir}/man1/lxc-ls.1*
260%endif
0886a606 261
ff8ce371 262%dir %{configpath}
f10dfb13
ER
263%dir %attr(750,root,root) /var/log/lxc
264%dir %attr(750,root,root) /var/cache/lxc
ff8ce371 265
0886a606
AM
266%files devel
267%defattr(644,root,root,755)
0886a606 268%attr(755,root,root) %{_libdir}/liblxc.so
67c70229 269%{_includedir}/lxc
e5afa52e 270%{_pkgconfigdir}/lxc.pc
67c70229
JB
271
272%if %{with lua}
273%files -n lua-lxc
274%defattr(644,root,root,755)
c34ce688 275%attr(755,root,root) %{_bindir}/lxc-top
247c2ba9
ER
276%dir %{_libdir}/lua/lxc
277%attr(755,root,root) %{_libdir}/lua/lxc/core.so
278%{_datadir}/lua/lxc.lua
c34ce688 279%{_mandir}/man1/lxc-top.1*
247c2ba9 280%lang(ja) %{_mandir}/ja/man1/lxc-top.1*
67c70229
JB
281%endif
282
283%if %{with python}
284%files -n python3-lxc
285%defattr(644,root,root,755)
c34ce688
JB
286%attr(755,root,root) %{_bindir}/lxc-device
287%attr(755,root,root) %{_bindir}/lxc-ls
288%attr(755,root,root) %{_bindir}/lxc-start-ephemeral
67c70229
JB
289%{py3_sitedir}/lxc
290%attr(755,root,root) %{py3_sitedir}/_lxc.cpython-*.so
291%{py3_sitedir}/_lxc-0.1-py*.egg-info
c34ce688
JB
292%{_mandir}/man1/lxc-device.1*
293%{_mandir}/man1/lxc-ls.1*
294%{_mandir}/man1/lxc-start-ephemeral.1*
247c2ba9
ER
295%lang(ja) %{_mandir}/ja/man1/lxc-device.1*
296%lang(ja) %{_mandir}/ja/man1/lxc-ls.1*
297%lang(ja) %{_mandir}/ja/man1/lxc-start-ephemeral.1*
67c70229 298%endif
This page took 0.125951 seconds and 4 git commands to generate.