]>
Commit | Line | Data |
---|---|---|
67c70229 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without seccomp # SecComp syscall filter | |
ccd4948a | 4 | %bcond_without apparmor # apparmor |
67c70229 JB |
5 | %bcond_without lua # Lua binding |
6 | %bcond_without python # Python binding | |
21c5c666 | 7 | |
0886a606 | 8 | Summary: Linux Container Tools |
67c70229 | 9 | Summary(pl.UTF-8): Narzędzia do kontenerów linuksowych (LXC) |
0886a606 | 10 | Name: lxc |
dc9a5b3b | 11 | Version: 0.9.0 |
f5933d47 | 12 | Release: 5 |
c34ce688 | 13 | License: LGPL v2.1+ |
67c70229 | 14 | Group: Applications/System |
a859d7b5 AS |
15 | Source0: http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz |
16 | # Source0-md5: 8552a4479090616f4bc04d8473765fc9 | |
8a96554a | 17 | Source1: lxc-pld.in.sh |
33aee790 | 18 | Patch0: %{name}-devpts.patch |
67c70229 | 19 | Patch1: %{name}-pld.patch |
92ccd5f8 | 20 | Patch2: am-1.14.patch |
121019da | 21 | Patch3: checkconfig-module.patch |
bf6a07ce | 22 | Patch4: checkconfig-vserver-config.patch |
dd704a47 | 23 | Patch5: fedora-template.patch |
67c70229 JB |
24 | URL: http://lxc.sourceforge.net/ |
25 | BuildRequires: autoconf >= 2.50 | |
26 | BuildRequires: automake | |
e5afa52e | 27 | BuildRequires: docbook-dtd30-sgml |
28 | BuildRequires: docbook-utils | |
21c5c666 | 29 | BuildRequires: docbook2X |
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 |
21c5c666 | 39 | Suggests: net-tools |
0886a606 AM |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
41 | ||
e5afa52e | 42 | %define configpath /var/lib/lxc |
43 | ||
0886a606 AM |
44 | %description |
45 | Tools to create and manage containers. It contains a full featured | |
46 | container with the isolation / virtualization of the pids, the ipc, | |
47 | the utsname, the mount points, /proc, /sys, the network and it takes | |
48 | into account the control groups. It is very light, flexible, and | |
49 | provides a set of tools around the container like the monitoring with | |
50 | asynchronous events notification, or the freeze of the container. This | |
51 | package is useful to create Virtual Private Server, or to run isolated | |
52 | applications like bash or sshd. | |
53 | ||
67c70229 JB |
54 | %description -l pl.UTF-8 |
55 | Narzędzia do tworzenia i zarządzania kontenerami. System ten obejmuje | |
56 | w pełni funkcjonalne kontenery z ilozacją/wirtualizacją pidów, ipc, | |
57 | utsname, punktów montowania, /proc, /sys, sieci oraz uwzględniające | |
58 | grupy kontrolne. Jest bardzo lekki, elastyczny i udostępnia narzędzia | |
59 | do czynności związanych z kontenerami, takich jak monitorowanie z | |
60 | asynchronicznym powiadamianiem o zdarzeniach czy zamrażanie. Ten | |
61 | pakiet jest przydatny do tworzenia wirtualnych serwerów prywatnych | |
62 | oraz uruchamiania izolowanych aplikacji, takich jak bash czy sshd. | |
63 | ||
0886a606 | 64 | %package devel |
67c70229 JB |
65 | Summary: Header files for lxc library |
66 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki lxc | |
0886a606 | 67 | Group: Development/Libraries |
67c70229 | 68 | Requires: %{name} = %{version}-%{release} |
0886a606 AM |
69 | |
70 | %description devel | |
67c70229 JB |
71 | Header files for lxc library. |
72 | ||
73 | %description devel -l pl.UTF-8 | |
74 | Pliki nagłówkowe biblioteki lxc. | |
75 | ||
76 | %package -n lua-lxc | |
77 | Summary: Lua binding for LXC | |
78 | Summary(pl.UTF-8): Wiązanie Lua do LXC | |
79 | Group: Libraries | |
80 | Requires: %{name} = %{version}-%{release} | |
81 | Requires: lua51-libs >= 5.1 | |
82 | ||
83 | %description -n lua-lxc | |
84 | Lua binding for LXC. | |
85 | ||
86 | %description -n lua-lxc -l pl.UTF-8 | |
87 | Wiązanie Lua do LXC. | |
88 | ||
89 | %package -n python3-lxc | |
90 | Summary: Python (3.x) binding for LXC | |
91 | Summary(pl.UTF-8): Wiązanie Pythona (3.x) do LXC | |
92 | Group: Libraries | |
93 | Requires: %{name} = %{version}-%{release} | |
94 | Requires: python3-libs >= 3.2 | |
95 | ||
96 | %description -n python3-lxc | |
97 | Python (3.x) binding for LXC. | |
98 | ||
99 | %description -n python3-lxc -l pl.UTF-8 | |
100 | Wiązanie Pythona (3.x) do LXC. | |
0886a606 | 101 | |
0886a606 | 102 | %prep |
67c70229 | 103 | %setup -q |
33aee790 | 104 | %patch0 -p1 |
67c70229 | 105 | %patch1 -p1 |
92ccd5f8 | 106 | %patch2 -p1 |
121019da | 107 | %patch3 -p1 |
bf6a07ce | 108 | %patch4 -p1 |
dd704a47 | 109 | %patch5 -p1 |
0886a606 | 110 | |
8a96554a ER |
111 | cp -p %{SOURCE1} templates/lxc-pld.in |
112 | ||
0886a606 | 113 | %build |
67c70229 JB |
114 | %{__aclocal} -I config |
115 | %{__autoconf} | |
116 | %{__autoheader} | |
117 | %{__automake} | |
e5afa52e | 118 | %configure \ |
67c70229 JB |
119 | db2xman=docbook2X2man \ |
120 | --disable-rpath \ | |
121 | --enable-doc \ | |
ccd4948a ER |
122 | %{__enable_disable apparmor} \ |
123 | %{__enable_disable lua} \ | |
124 | %{__enable_disable python} \ | |
125 | %{__enable_disable seccomp} \ | |
67c70229 JB |
126 | --with-config-path=%{configpath} \ |
127 | --with-distro=pld | |
0886a606 AM |
128 | |
129 | %{__make} | |
e5afa52e | 130 | %{__make} -C doc |
0886a606 AM |
131 | |
132 | %install | |
133 | rm -rf $RPM_BUILD_ROOT | |
f10dfb13 | 134 | install -d $RPM_BUILD_ROOT{%{configpath},/var/{cache,log}/lxc} |
0886a606 | 135 | %{__make} install \ |
e5afa52e | 136 | DESTDIR=$RPM_BUILD_ROOT \ |
137 | pcdatadir=%{_pkgconfigdir} | |
33aee790 | 138 | |
e5afa52e | 139 | %{__make} -C doc install \ |
0886a606 | 140 | DESTDIR=$RPM_BUILD_ROOT |
33aee790 | 141 | |
21c5c666 | 142 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir} |
0886a606 | 143 | |
67c70229 JB |
144 | %if %{with python} |
145 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc | |
146 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc | |
147 | %endif | |
c34ce688 JB |
148 | %if %{with lua} |
149 | %{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua51,' $RPM_BUILD_ROOT%{_bindir}/lxc-top | |
150 | %endif | |
67c70229 | 151 | |
0886a606 AM |
152 | %clean |
153 | rm -rf $RPM_BUILD_ROOT | |
154 | ||
67c70229 JB |
155 | %post -p /sbin/ldconfig |
156 | %postun -p /sbin/ldconfig | |
0886a606 AM |
157 | |
158 | %files | |
159 | %defattr(644,root,root,755) | |
dc9a5b3b | 160 | %doc AUTHORS ChangeLog CONTRIBUTING MAINTAINERS README TODO doc/FAQ.txt doc/examples/*.conf |
c34ce688 JB |
161 | %attr(755,root,root) %{_bindir}/lxc-attach |
162 | %attr(755,root,root) %{_bindir}/lxc-cgroup | |
163 | %attr(755,root,root) %{_bindir}/lxc-checkconfig | |
164 | %attr(755,root,root) %{_bindir}/lxc-checkpoint | |
165 | %attr(755,root,root) %{_bindir}/lxc-clone | |
166 | %attr(755,root,root) %{_bindir}/lxc-console | |
167 | %attr(755,root,root) %{_bindir}/lxc-create | |
168 | %attr(755,root,root) %{_bindir}/lxc-destroy | |
169 | %attr(755,root,root) %{_bindir}/lxc-execute | |
170 | %attr(755,root,root) %{_bindir}/lxc-freeze | |
171 | %attr(755,root,root) %{_bindir}/lxc-info | |
172 | %attr(755,root,root) %{_bindir}/lxc-kill | |
173 | %attr(755,root,root) %{_bindir}/lxc-monitor | |
174 | %attr(755,root,root) %{_bindir}/lxc-netstat | |
175 | %attr(755,root,root) %{_bindir}/lxc-ps | |
176 | %attr(755,root,root) %{_bindir}/lxc-restart | |
177 | %attr(755,root,root) %{_bindir}/lxc-shutdown | |
178 | %attr(755,root,root) %{_bindir}/lxc-start | |
179 | %attr(755,root,root) %{_bindir}/lxc-stop | |
180 | %attr(755,root,root) %{_bindir}/lxc-unfreeze | |
181 | %attr(755,root,root) %{_bindir}/lxc-unshare | |
182 | %attr(755,root,root) %{_bindir}/lxc-version | |
183 | %attr(755,root,root) %{_bindir}/lxc-wait | |
e5afa52e | 184 | %attr(755,root,root) %{_libdir}/liblxc.so.*.*.* |
185 | %attr(755,root,root) %ghost %{_libdir}/liblxc.so.0 | |
70f9d22b | 186 | %dir %{_libdir}/lxc |
70f9d22b | 187 | %dir %{_libdir}/lxc/rootfs |
67c70229 | 188 | %{_libdir}/lxc/rootfs/README |
70f9d22b | 189 | %attr(755,root,root) %{_libdir}/lxc/lxc-init |
dc9a5b3b | 190 | %dir %{_sysconfdir}/lxc |
67c70229 | 191 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf |
f5933d47 ER |
192 | %dir %{_datadir}/lxc |
193 | %{_datadir}/%{name}/lxc.functions | |
194 | %dir %{_datadir}/%{name}/hooks | |
195 | %dir %{_datadir}/%{name}/templates | |
196 | %attr(755,root,root) %{_datadir}/%{name}/hooks/mount* | |
197 | %attr(755,root,root) %{_datadir}/%{name}/templates/lxc-* | |
c34ce688 JB |
198 | %{_mandir}/man1/lxc-attach.1* |
199 | %{_mandir}/man1/lxc-cgroup.1* | |
200 | %{_mandir}/man1/lxc-checkconfig.1* | |
201 | %{_mandir}/man1/lxc-checkpoint.1* | |
202 | %{_mandir}/man1/lxc-clone.1* | |
203 | %{_mandir}/man1/lxc-console.1* | |
204 | %{_mandir}/man1/lxc-create.1* | |
205 | %{_mandir}/man1/lxc-destroy.1* | |
206 | %{_mandir}/man1/lxc-execute.1* | |
207 | %{_mandir}/man1/lxc-freeze.1* | |
208 | %{_mandir}/man1/lxc-info.1* | |
209 | %{_mandir}/man1/lxc-kill.1* | |
210 | %{_mandir}/man1/lxc-monitor.1* | |
211 | %{_mandir}/man1/lxc-netstat.1* | |
212 | %{_mandir}/man1/lxc-ps.1* | |
213 | %{_mandir}/man1/lxc-restart.1* | |
214 | %{_mandir}/man1/lxc-shutdown.1* | |
215 | %{_mandir}/man1/lxc-start.1* | |
216 | %{_mandir}/man1/lxc-stop.1* | |
217 | %{_mandir}/man1/lxc-unfreeze.1* | |
218 | %{_mandir}/man1/lxc-unshare.1* | |
219 | %{_mandir}/man1/lxc-version.1* | |
220 | %{_mandir}/man1/lxc-wait.1* | |
67c70229 JB |
221 | %{_mandir}/man5/lxc.conf.5* |
222 | %{_mandir}/man7/lxc.7* | |
c34ce688 JB |
223 | %if %{without python} |
224 | # legacy version | |
225 | %attr(755,root,root) %{_bindir}/lxc-ls | |
226 | %{_mandir}/man1/lxc-ls.1* | |
227 | %endif | |
0886a606 | 228 | |
ff8ce371 | 229 | %dir %{configpath} |
f10dfb13 ER |
230 | %dir %attr(750,root,root) /var/log/lxc |
231 | %dir %attr(750,root,root) /var/cache/lxc | |
ff8ce371 | 232 | |
0886a606 AM |
233 | %files devel |
234 | %defattr(644,root,root,755) | |
0886a606 | 235 | %attr(755,root,root) %{_libdir}/liblxc.so |
67c70229 | 236 | %{_includedir}/lxc |
e5afa52e | 237 | %{_pkgconfigdir}/lxc.pc |
67c70229 JB |
238 | |
239 | %if %{with lua} | |
240 | %files -n lua-lxc | |
241 | %defattr(644,root,root,755) | |
c34ce688 | 242 | %attr(755,root,root) %{_bindir}/lxc-top |
67c70229 JB |
243 | %dir %{_libdir}/lua/5.1/lxc |
244 | %attr(755,root,root) %{_libdir}/lua/5.1/lxc/core.so | |
245 | %{_datadir}/lua/5.1/lxc.lua | |
c34ce688 | 246 | %{_mandir}/man1/lxc-top.1* |
67c70229 JB |
247 | %endif |
248 | ||
249 | %if %{with python} | |
250 | %files -n python3-lxc | |
251 | %defattr(644,root,root,755) | |
c34ce688 JB |
252 | %attr(755,root,root) %{_bindir}/lxc-device |
253 | %attr(755,root,root) %{_bindir}/lxc-ls | |
254 | %attr(755,root,root) %{_bindir}/lxc-start-ephemeral | |
67c70229 JB |
255 | %{py3_sitedir}/lxc |
256 | %attr(755,root,root) %{py3_sitedir}/_lxc.cpython-*.so | |
257 | %{py3_sitedir}/_lxc-0.1-py*.egg-info | |
c34ce688 JB |
258 | %{_mandir}/man1/lxc-device.1* |
259 | %{_mandir}/man1/lxc-ls.1* | |
260 | %{_mandir}/man1/lxc-start-ephemeral.1* | |
67c70229 | 261 | %endif |