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