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