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