]> git.pld-linux.org Git - packages/lxc.git/blame - lxc.spec
up to 3.0.3
[packages/lxc.git] / lxc.spec
CommitLineData
8ba1db82 1# TODO
8ba1db82 2# - package apparmor stuff
19fd2939 3# - update (cut down, include /usr/share/lxc/config/common.conf) default pld container config
8ba1db82 4
67c70229 5# Conditional build:
5dbfe331
JB
6%bcond_without seccomp # SecComp syscall filter
7%bcond_without apparmor # apparmor support
5dbfe331 8%bcond_with selinux # SELinux support
f2738357 9%bcond_with cgmanager # cgmanager support
21c5c666 10
247c2ba9 11Summary: Linux Containers userspace tools
67c70229 12Summary(pl.UTF-8): Narzędzia do kontenerów linuksowych (LXC)
0886a606 13Name: lxc
9b98602c 14Version: 3.0.3
a3d3eb65 15Release: 1
c34ce688 16License: LGPL v2.1+
67c70229 17Group: Applications/System
5dbfe331 18Source0: https://linuxcontainers.org/downloads/lxc/%{name}-%{version}.tar.gz
9b98602c 19# Source0-md5: 0aa1a982f7dfa4c7b8ce87b7047b0b6e
adc39309 20Source1: %{name}-pld.in.sh
1dd4bfdd
LG
21# lxc-net based on bridge, macvlan is an alternative/supported lxc network
22Source2: %{name}_macvlan.sysconfig
23Source3: %{name}_macvlan
a71266b2 24Patch1: %{name}-net.patch
216742cb 25Patch2: x32.patch
6a2933ce 26URL: https://www.linuxcontainers.org/
67c70229
JB
27BuildRequires: autoconf >= 2.50
28BuildRequires: automake
f2738357
JB
29%{?with_cgmanager:BuildRequires: cgmanager-devel}
30%{?with_cgmanager:BuildRequires: dbus-devel >= 1.2.16}
990c3135 31BuildRequires: docbook-dtd45-xml
e1610aa3 32BuildRequires: docbook2X >= 0.8
56ecc5fa 33BuildRequires: doxygen
7e4c14a6 34BuildRequires: gnutls-devel
ccd4948a 35%{?with_apparmor:BuildRequires: libapparmor-devel}
4e32c712 36BuildRequires: libcap-devel
f2738357 37%{?with_cgmanager:BuildRequires: libnih-devel >= 1.0.2}
67c70229 38%{?with_seccomp:BuildRequires: libseccomp-devel}
82a3991b 39BuildRequires: libxslt-progs
67c70229 40BuildRequires: pkgconfig
5e7929a2 41BuildRequires: rpmbuild(macros) >= 1.671
c34ce688 42BuildRequires: sed >= 4.0
557d1e73
ER
43Requires(post): /sbin/ldconfig
44Requires(post,preun): /sbin/chkconfig
19fd2939 45Requires: %{name}-libs = %{version}-%{release}
75133c9e
ER
46# lxc_macvlan script
47Requires: gawk
48# used in lxc-net script to set bridge nat
72d9317d 49Requires: iproute2
75133c9e 50Requires: iptables
557d1e73 51Requires: rc-scripts >= 0.4.6
5e7929a2 52Requires: systemd-units >= 38
75133c9e 53Requires: which
19fd2939 54# used in lxc-net script, but not all cases, may break working setups
e1610aa3 55Suggests: dnsmasq
7f0b7e89 56Suggests: gnupg
16cf226e
ER
57Suggests: gnupg-plugin-keys_curl
58Suggests: gnupg-plugin-keys_hkp
21c5c666 59Suggests: net-tools
b335abc0 60Suggests: rsync
0886a606
AM
61BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
e5afa52e 63%define configpath /var/lib/lxc
64
0886a606
AM
65%description
66Tools to create and manage containers. It contains a full featured
67container with the isolation / virtualization of the pids, the ipc,
68the utsname, the mount points, /proc, /sys, the network and it takes
69into account the control groups. It is very light, flexible, and
70provides a set of tools around the container like the monitoring with
71asynchronous events notification, or the freeze of the container. This
72package is useful to create Virtual Private Server, or to run isolated
73applications like bash or sshd.
74
67c70229
JB
75%description -l pl.UTF-8
76Narzędzia do tworzenia i zarządzania kontenerami. System ten obejmuje
1dd4bfdd 77w pełni funkcjonalne kontenery z izolacją/wirtualizacją pidów, ipc,
67c70229
JB
78utsname, punktów montowania, /proc, /sys, sieci oraz uwzględniające
79grupy kontrolne. Jest bardzo lekki, elastyczny i udostępnia narzędzia
80do czynności związanych z kontenerami, takich jak monitorowanie z
81asynchronicznym powiadamianiem o zdarzeniach czy zamrażanie. Ten
82pakiet jest przydatny do tworzenia wirtualnych serwerów prywatnych
83oraz uruchamiania izolowanych aplikacji, takich jak bash czy sshd.
84
19fd2939
ER
85%package libs
86Summary: liblxc library
56ecc5fa 87Summary(pl.UTF-8): Biblioteka liblxc
19fd2939 88Group: Libraries
56ecc5fa 89Conflicts: lxc < 2.0.4-2
19fd2939
ER
90
91%description libs
92liblxc library.
93
56ecc5fa
JB
94%description libs -l pl.UTF-8
95Biblioteka liblxc.
96
0886a606 97%package devel
67c70229
JB
98Summary: Header files for lxc library
99Summary(pl.UTF-8): Pliki nagłówkowe biblioteki lxc
0886a606 100Group: Development/Libraries
19fd2939 101Requires: %{name}-libs = %{version}-%{release}
0886a606
AM
102
103%description devel
67c70229
JB
104Header files for lxc library.
105
106%description devel -l pl.UTF-8
107Pliki nagłówkowe biblioteki lxc.
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
56ecc5fa 113Requires: %{name} = %{version}-%{release}
4e82464d 114Requires: bash-completion
5fb2cd31
ER
115%if "%{_rpmversion}" >= "5"
116BuildArch: noarch
117%endif
4e82464d
ER
118
119%description -n bash-completion-%{name}
120bash-completion for LXC.
121
122%description -n bash-completion-%{name} -l pl.UTF-8
123bashowe uzupełnianie nazw dla LXC.
124
0886a606 125%prep
9db966c1 126%setup -q
67c70229 127%patch1 -p1
216742cb 128%patch2 -p1
0886a606 129
8a96554a
ER
130cp -p %{SOURCE1} templates/lxc-pld.in
131
0886a606 132%build
28bd4b4b 133%{__libtoolize}
67c70229
JB
134%{__aclocal} -I config
135%{__autoconf}
136%{__autoheader}
137%{__automake}
e5afa52e 138%configure \
28bd4b4b 139 bashcompdir=%{bash_compdir} \
67c70229
JB
140 db2xman=docbook2X2man \
141 --disable-rpath \
8ba1db82 142 --enable-bash \
67c70229 143 --enable-doc \
120ac263 144 --enable-examples \
ccd4948a 145 %{__enable_disable apparmor} \
f2738357 146 %{__enable_disable cgmanager} \
ccd4948a 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
56ecc5fa 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
8caba3bf
JB
170%{__rm} $RPM_BUILD_ROOT%{_libdir}/liblxc.la
171
21c5c666 172%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
0886a606 173
6a2933ce
ER
174# apparmor profiles are not packaged, remove to avoid packagers confusion
175%{__rm} -r $RPM_BUILD_ROOT/etc/apparmor.d
176
ce58f702
ER
177# yum plugin, no idea where to package this
178%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/lxc-patch.py
179
1dd4bfdd 180install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/lxc_macvlan
d87fbc13 181install -p %{SOURCE3} $RPM_BUILD_ROOT%{_libexecdir}/%{name}/lxc_macvlan
1dd4bfdd 182
0886a606
AM
183%clean
184rm -rf $RPM_BUILD_ROOT
185
75133c9e 186%post
46f2854c 187/sbin/chkconfig --add lxc
5e7929a2 188/sbin/chkconfig --add lxc-net
5e7929a2 189%systemd_post lxc.service lxc-net.service
46f2854c 190
46f2854c
MK
191%preun
192if [ "$1" = "0" ]; then
193 %service lxc stop
194 /sbin/chkconfig --del lxc
5e7929a2
JK
195 %service lxc-net stop
196 /sbin/chkconfig --del lxc-net
46f2854c 197fi
5e7929a2 198%systemd_preun lxc.service lxc-net.service
46f2854c 199
5e7929a2 200%postun
5e7929a2 201%systemd_reload
46f2854c 202
19fd2939
ER
203%post libs -p /sbin/ldconfig
204%postun libs -p /sbin/ldconfig
205
0886a606
AM
206%files
207%defattr(644,root,root,755)
58add690 208%doc AUTHORS CONTRIBUTING MAINTAINERS README doc/FAQ.txt doc/examples/*.conf
c34ce688 209%attr(755,root,root) %{_bindir}/lxc-attach
7e4c14a6 210%attr(755,root,root) %{_bindir}/lxc-autostart
c34ce688
JB
211%attr(755,root,root) %{_bindir}/lxc-cgroup
212%attr(755,root,root) %{_bindir}/lxc-checkconfig
72fb3a26 213%attr(755,root,root) %{_bindir}/lxc-checkpoint
a71266b2 214%attr(755,root,root) %{_bindir}/lxc-copy
247c2ba9 215%attr(755,root,root) %{_bindir}/lxc-config
c34ce688
JB
216%attr(755,root,root) %{_bindir}/lxc-console
217%attr(755,root,root) %{_bindir}/lxc-create
218%attr(755,root,root) %{_bindir}/lxc-destroy
a3d3eb65 219%attr(755,root,root) %{_bindir}/lxc-device
c34ce688
JB
220%attr(755,root,root) %{_bindir}/lxc-execute
221%attr(755,root,root) %{_bindir}/lxc-freeze
222%attr(755,root,root) %{_bindir}/lxc-info
a3d3eb65 223%attr(755,root,root) %{_bindir}/lxc-ls
c34ce688 224%attr(755,root,root) %{_bindir}/lxc-monitor
247c2ba9 225%attr(755,root,root) %{_bindir}/lxc-snapshot
c34ce688
JB
226%attr(755,root,root) %{_bindir}/lxc-start
227%attr(755,root,root) %{_bindir}/lxc-stop
a3d3eb65 228%attr(755,root,root) %{_bindir}/lxc-top
c34ce688
JB
229%attr(755,root,root) %{_bindir}/lxc-unfreeze
230%attr(755,root,root) %{_bindir}/lxc-unshare
d87fbc13 231%attr(755,root,root) %{_bindir}/lxc-update-config
120ac263 232%attr(755,root,root) %{_bindir}/lxc-usernsexec
c34ce688 233%attr(755,root,root) %{_bindir}/lxc-wait
ce58f702 234%attr(755,root,root) %{_sbindir}/init.lxc
a3d3eb65 235%attr(755,root,root) %{_sbindir}/init.lxc.static
7e4c14a6 236%attr(754,root,root) /etc/rc.d/init.d/lxc
72fb3a26 237%attr(754,root,root) /etc/rc.d/init.d/lxc-net
46f2854c 238
7e4c14a6 239%{systemdunitdir}/lxc.service
56ecc5fa 240%{systemdunitdir}/lxc@.service
72fb3a26 241%{systemdunitdir}/lxc-net.service
8ba1db82
ER
242%dir %{_libdir}/%{name}
243%dir %{_libdir}/%{name}/rootfs
244%{_libdir}/%{name}/rootfs/README
4259c400 245%dir %{_libexecdir}/%{name}
d87fbc13
GP
246%attr(755,root,root) %{_libexecdir}/%{name}/lxc-apparmor-load
247%attr(755,root,root) %{_libexecdir}/%{name}/lxc-containers
248%attr(755,root,root) %{_libexecdir}/%{name}/lxc-monitord
249%attr(755,root,root) %{_libexecdir}/%{name}/lxc-net
250%attr(755,root,root) %{_libexecdir}/%{name}/lxc-user-nic
251%attr(755,root,root) %{_libexecdir}/%{name}/lxc_macvlan
4259c400
JR
252%dir %{_libexecdir}/%{name}/hooks
253%attr(755,root,root) %{_libexecdir}/%{name}/hooks/unmount-namespace
dc9a5b3b 254%dir %{_sysconfdir}/lxc
46f2854c 255%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lxc_macvlan
72fb3a26 256%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lxc
67c70229 257%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf
120ac263 258%dir %{_datadir}/%{name}
f5933d47 259%{_datadir}/%{name}/lxc.functions
120ac263 260%dir %{_datadir}/%{name}/config
72fb3a26
JK
261%{_datadir}/%{name}/config/common.conf
262%dir %{_datadir}/%{name}/config/common.conf.d
263%{_datadir}/%{name}/config/common.conf.d/README
b93f2cb9 264%{_datadir}/%{name}/config/common.seccomp
e1610aa3 265%{_datadir}/%{name}/config/nesting.conf
a3d3eb65 266%{_datadir}/%{name}/config/oci.common.conf
72fb3a26 267%{_datadir}/%{name}/config/userns.conf
f5933d47 268%dir %{_datadir}/%{name}/hooks
72fb3a26
JK
269%dir %{_datadir}/%{name}/selinux
270%{_datadir}/%{name}/selinux/*
f5933d47 271%dir %{_datadir}/%{name}/templates
247c2ba9 272%attr(755,root,root) %{_datadir}/%{name}/hooks/clonehostname
a3d3eb65
AM
273%attr(755,root,root) %{_datadir}/%{name}/hooks/dhclient
274%attr(755,root,root) %{_datadir}/%{name}/hooks/dhclient-script
7e4c14a6 275%attr(755,root,root) %{_datadir}/%{name}/hooks/mount*
a3d3eb65 276%attr(755,root,root) %{_datadir}/%{name}/hooks/nvidia
7e4c14a6 277%attr(755,root,root) %{_datadir}/%{name}/hooks/squid-deb-proxy-client
247c2ba9 278%attr(755,root,root) %{_datadir}/%{name}/hooks/ubuntu-cloud-prep
f5933d47 279%attr(755,root,root) %{_datadir}/%{name}/templates/lxc-*
c34ce688 280%{_mandir}/man1/lxc-attach.1*
7e4c14a6 281%{_mandir}/man1/lxc-autostart.1*
c34ce688
JB
282%{_mandir}/man1/lxc-cgroup.1*
283%{_mandir}/man1/lxc-checkconfig.1*
72fb3a26 284%{_mandir}/man1/lxc-checkpoint.1*
a71266b2 285%{_mandir}/man1/lxc-copy.1*
8ba1db82 286%{_mandir}/man1/lxc-config.1*
c34ce688
JB
287%{_mandir}/man1/lxc-console.1*
288%{_mandir}/man1/lxc-create.1*
289%{_mandir}/man1/lxc-destroy.1*
a3d3eb65 290%{_mandir}/man1/lxc-device.1*
c34ce688
JB
291%{_mandir}/man1/lxc-execute.1*
292%{_mandir}/man1/lxc-freeze.1*
293%{_mandir}/man1/lxc-info.1*
a3d3eb65 294%{_mandir}/man1/lxc-ls.1*
c34ce688 295%{_mandir}/man1/lxc-monitor.1*
247c2ba9 296%{_mandir}/man1/lxc-snapshot.1*
c34ce688
JB
297%{_mandir}/man1/lxc-start.1*
298%{_mandir}/man1/lxc-stop.1*
a3d3eb65 299%{_mandir}/man1/lxc-top.1*
c34ce688
JB
300%{_mandir}/man1/lxc-unfreeze.1*
301%{_mandir}/man1/lxc-unshare.1*
d87fbc13 302%{_mandir}/man1/lxc-update-config.1*
120ac263 303%{_mandir}/man1/lxc-user-nic.1*
8ba1db82 304%{_mandir}/man1/lxc-usernsexec.1*
c34ce688 305%{_mandir}/man1/lxc-wait.1*
120ac263 306%{_mandir}/man5/lxc-usernet.5*
67c70229 307%{_mandir}/man5/lxc.conf.5*
8ba1db82
ER
308%{_mandir}/man5/lxc.container.conf.5*
309%{_mandir}/man5/lxc.system.conf.5*
67c70229 310%{_mandir}/man7/lxc.7*
247c2ba9 311%lang(ja) %{_mandir}/ja/man1/lxc*.1*
7e4c14a6 312%lang(ja) %{_mandir}/ja/man5/lxc-usernet.5*
247c2ba9 313%lang(ja) %{_mandir}/ja/man5/lxc.conf.5*
8ba1db82
ER
314%lang(ja) %{_mandir}/ja/man5/lxc.container.conf.5*
315%lang(ja) %{_mandir}/ja/man5/lxc.system.conf.5*
247c2ba9 316%lang(ja) %{_mandir}/ja/man7/lxc.7*
56ecc5fa
JB
317%lang(ko) %{_mandir}/ko/man1/lxc*.1*
318%lang(ko) %{_mandir}/ko/man5/lxc-usernet.5*
319%lang(ko) %{_mandir}/ko/man5/lxc.conf.5*
320%lang(ko) %{_mandir}/ko/man5/lxc.container.conf.5*
321%lang(ko) %{_mandir}/ko/man5/lxc.system.conf.5*
322%lang(ko) %{_mandir}/ko/man7/lxc.7*
0886a606 323
ff8ce371 324%dir %{configpath}
39773dac 325%dir %{configpath}snap
f10dfb13
ER
326%dir %attr(750,root,root) /var/log/lxc
327%dir %attr(750,root,root) /var/cache/lxc
ff8ce371 328
19fd2939
ER
329%files libs
330%defattr(644,root,root,755)
331%attr(755,root,root) %{_libdir}/liblxc.so.*.*.*
332%attr(755,root,root) %ghost %{_libdir}/liblxc.so.1
333
0886a606
AM
334%files devel
335%defattr(644,root,root,755)
0886a606 336%attr(755,root,root) %{_libdir}/liblxc.so
9b98602c 337%attr(755,root,root) %{_libdir}/liblxc.a
67c70229 338%{_includedir}/lxc
e5afa52e 339%{_pkgconfigdir}/lxc.pc
67c70229 340
4e82464d
ER
341%files -n bash-completion-%{name}
342%defattr(644,root,root,755)
09d764a3 343%{bash_compdir}/lxc
This page took 0.15354 seconds and 4 git commands to generate.