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