]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without seccomp # SecComp syscall filter | |
4 | %bcond_without apparmor # apparmor | |
5 | %bcond_without lua # Lua binding | |
6 | %bcond_without python # Python binding | |
7 | %bcond_with selinux # SELinux | |
8 | ||
9 | %define subver beta2 | |
10 | %define rel 0.1 | |
11 | Summary: Linux Containers userspace tools | |
12 | Summary(pl.UTF-8): Narzędzia do kontenerów linuksowych (LXC) | |
13 | Name: lxc | |
14 | Version: 1.0.0 | |
15 | Release: 0.%{subver}.%{rel} | |
16 | License: LGPL v2.1+ | |
17 | Group: Applications/System | |
18 | Source0: https://github.com/lxc/lxc/archive/%{name}-%{version}.%{subver}.tar.gz | |
19 | # Source0-md5: cdb6b00594ae3423c0745e4e24d807c7 | |
20 | Source1: %{name}-pld.in.sh | |
21 | Patch1: %{name}-pld.patch | |
22 | Patch4: checkconfig-vserver-config.patch | |
23 | URL: http://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: net-tools | |
41 | Suggests: rsync | |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
43 | ||
44 | %define configpath /var/lib/lxc | |
45 | ||
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 | ||
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 | ||
66 | %package devel | |
67 | Summary: Header files for lxc library | |
68 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki lxc | |
69 | Group: Development/Libraries | |
70 | Requires: %{name} = %{version}-%{release} | |
71 | ||
72 | %description devel | |
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 | |
97 | Requires: python3-modules | |
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. | |
104 | ||
105 | %prep | |
106 | %setup -q -n %{name}-%{name}-%{version}%{?subver:.%{subver}} | |
107 | %patch1 -p1 | |
108 | %patch4 -p1 | |
109 | ||
110 | cp -p %{SOURCE1} templates/lxc-pld.in | |
111 | ||
112 | %build | |
113 | %{__aclocal} -I config | |
114 | %{__autoconf} | |
115 | %{__autoheader} | |
116 | %{__automake} | |
117 | %configure \ | |
118 | db2xman=docbook2X2man \ | |
119 | --disable-rpath \ | |
120 | --enable-doc \ | |
121 | --enable-examples \ | |
122 | %{__enable_disable apparmor} \ | |
123 | %{__enable_disable lua} %{?with_lua:--with-lua-pc=lua51} \ | |
124 | %{__enable_disable python} \ | |
125 | %{__enable_disable seccomp} \ | |
126 | %{__enable_disable selinux} \ | |
127 | --with-config-path=%{configpath} \ | |
128 | --with-init-script=sysv,systemd \ | |
129 | --with-distro=pld | |
130 | ||
131 | %{__make} | |
132 | %{__make} -C doc | |
133 | ||
134 | %install | |
135 | rm -rf $RPM_BUILD_ROOT | |
136 | install -d $RPM_BUILD_ROOT{%{configpath},/var/{cache,log}/lxc} | |
137 | %{__make} install \ | |
138 | SYSTEMD_UNIT_DIR=%{systemdunitdir} \ | |
139 | pcdatadir=%{_pkgconfigdir} \ | |
140 | DESTDIR=$RPM_BUILD_ROOT | |
141 | ||
142 | %{__make} -C doc install \ | |
143 | DESTDIR=$RPM_BUILD_ROOT | |
144 | ||
145 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir} | |
146 | ||
147 | %if %{with python} | |
148 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc | |
149 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc | |
150 | %endif | |
151 | %if %{with lua} | |
152 | %{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua51,' $RPM_BUILD_ROOT%{_bindir}/lxc-top | |
153 | %endif | |
154 | ||
155 | %clean | |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
158 | %post -p /sbin/ldconfig | |
159 | %postun -p /sbin/ldconfig | |
160 | ||
161 | %files | |
162 | %defattr(644,root,root,755) | |
163 | %doc AUTHORS CONTRIBUTING MAINTAINERS README TODO doc/FAQ.txt doc/examples/*.conf | |
164 | %attr(755,root,root) %{_bindir}/lxc-attach | |
165 | %attr(755,root,root) %{_bindir}/lxc-autostart | |
166 | %attr(755,root,root) %{_bindir}/lxc-cgroup | |
167 | %attr(755,root,root) %{_bindir}/lxc-checkconfig | |
168 | %attr(755,root,root) %{_bindir}/lxc-checkpoint | |
169 | %attr(755,root,root) %{_bindir}/lxc-clone | |
170 | %attr(755,root,root) %{_bindir}/lxc-config | |
171 | %attr(755,root,root) %{_bindir}/lxc-console | |
172 | %attr(755,root,root) %{_bindir}/lxc-create | |
173 | %attr(755,root,root) %{_bindir}/lxc-destroy | |
174 | %attr(755,root,root) %{_bindir}/lxc-execute | |
175 | %attr(755,root,root) %{_bindir}/lxc-freeze | |
176 | %attr(755,root,root) %{_bindir}/lxc-info | |
177 | %attr(755,root,root) %{_bindir}/lxc-kill | |
178 | %attr(755,root,root) %{_bindir}/lxc-monitor | |
179 | %attr(755,root,root) %{_bindir}/lxc-monitord | |
180 | %attr(755,root,root) %{_bindir}/lxc-netstat | |
181 | %attr(755,root,root) %{_bindir}/lxc-ps | |
182 | %attr(755,root,root) %{_bindir}/lxc-restart | |
183 | %attr(755,root,root) %{_bindir}/lxc-snapshot | |
184 | %attr(755,root,root) %{_bindir}/lxc-start | |
185 | %attr(755,root,root) %{_bindir}/lxc-stop | |
186 | %attr(755,root,root) %{_bindir}/lxc-unfreeze | |
187 | %attr(755,root,root) %{_bindir}/lxc-unshare | |
188 | %attr(755,root,root) %{_bindir}/lxc-user-nic | |
189 | %attr(755,root,root) %{_bindir}/lxc-usernsexec | |
190 | %attr(755,root,root) %{_bindir}/lxc-version | |
191 | %attr(755,root,root) %{_bindir}/lxc-wait | |
192 | %attr(755,root,root) %{_libdir}/liblxc.so.*.*.* | |
193 | %attr(755,root,root) %ghost %{_libdir}/liblxc.so.1 | |
194 | %attr(754,root,root) /etc/rc.d/init.d/lxc | |
195 | %{systemdunitdir}/lxc.service | |
196 | %dir %{_libdir}/lxc | |
197 | %dir %{_libdir}/lxc/rootfs | |
198 | %{_libdir}/lxc/rootfs/README | |
199 | %attr(755,root,root) %{_libdir}/lxc/lxc-devsetup | |
200 | %attr(755,root,root) %{_libdir}/lxc/lxc-init | |
201 | %dir %{_sysconfdir}/lxc | |
202 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf | |
203 | %dir %{_datadir}/%{name} | |
204 | %{_datadir}/%{name}/lxc.functions | |
205 | %dir %{_datadir}/%{name}/config | |
206 | %{_datadir}/%{name}/config/debian*.conf | |
207 | %{_datadir}/%{name}/config/oracle*.conf | |
208 | %{_datadir}/%{name}/config/plamo*.conf | |
209 | %{_datadir}/%{name}/config/ubuntu*.conf | |
210 | %dir %{_datadir}/%{name}/hooks | |
211 | %dir %{_datadir}/%{name}/templates | |
212 | %attr(755,root,root) %{_datadir}/%{name}/hooks/clonehostname | |
213 | %attr(755,root,root) %{_datadir}/%{name}/hooks/mount* | |
214 | %attr(755,root,root) %{_datadir}/%{name}/hooks/squid-deb-proxy-client | |
215 | %attr(755,root,root) %{_datadir}/%{name}/hooks/ubuntu-cloud-prep | |
216 | %attr(755,root,root) %{_datadir}/%{name}/templates/lxc-* | |
217 | %{_mandir}/man1/lxc-attach.1* | |
218 | %{_mandir}/man1/lxc-autostart.1* | |
219 | %{_mandir}/man1/lxc-cgroup.1* | |
220 | %{_mandir}/man1/lxc-checkconfig.1* | |
221 | %{_mandir}/man1/lxc-checkpoint.1* | |
222 | %{_mandir}/man1/lxc-clone.1* | |
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* | |
229 | %{_mandir}/man1/lxc-kill.1* | |
230 | %{_mandir}/man1/lxc-monitor.1* | |
231 | %{_mandir}/man1/lxc-netstat.1* | |
232 | %{_mandir}/man1/lxc-ps.1* | |
233 | %{_mandir}/man1/lxc-restart.1* | |
234 | %{_mandir}/man1/lxc-snapshot.1* | |
235 | %{_mandir}/man1/lxc-start.1* | |
236 | %{_mandir}/man1/lxc-stop.1* | |
237 | %{_mandir}/man1/lxc-unfreeze.1* | |
238 | %{_mandir}/man1/lxc-unshare.1* | |
239 | %{_mandir}/man1/lxc-user-nic.1* | |
240 | %{_mandir}/man1/lxc-version.1* | |
241 | %{_mandir}/man1/lxc-wait.1* | |
242 | %{_mandir}/man5/lxc-usernet.5* | |
243 | %{_mandir}/man5/lxc.conf.5* | |
244 | %{_mandir}/man7/lxc.7* | |
245 | %lang(ja) %{_mandir}/ja/man1/lxc*.1* | |
246 | %lang(ja) %{_mandir}/ja/man5/lxc-usernet.5* | |
247 | %lang(ja) %{_mandir}/ja/man5/lxc.conf.5* | |
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 | ||
254 | %if %{without python} | |
255 | # legacy version | |
256 | %attr(755,root,root) %{_bindir}/lxc-ls | |
257 | %{_mandir}/man1/lxc-ls.1* | |
258 | %endif | |
259 | ||
260 | %dir %{configpath} | |
261 | %dir %attr(750,root,root) /var/log/lxc | |
262 | %dir %attr(750,root,root) /var/cache/lxc | |
263 | ||
264 | %files devel | |
265 | %defattr(644,root,root,755) | |
266 | %attr(755,root,root) %{_libdir}/liblxc.so | |
267 | %{_includedir}/lxc | |
268 | %{_pkgconfigdir}/lxc.pc | |
269 | ||
270 | %if %{with lua} | |
271 | %files -n lua-lxc | |
272 | %defattr(644,root,root,755) | |
273 | %attr(755,root,root) %{_bindir}/lxc-top | |
274 | %dir %{_libdir}/lua/lxc | |
275 | %attr(755,root,root) %{_libdir}/lua/lxc/core.so | |
276 | %{_datadir}/lua/lxc.lua | |
277 | %{_mandir}/man1/lxc-top.1* | |
278 | %lang(ja) %{_mandir}/ja/man1/lxc-top.1* | |
279 | %endif | |
280 | ||
281 | %if %{with python} | |
282 | %files -n python3-lxc | |
283 | %defattr(644,root,root,755) | |
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 | |
287 | %{py3_sitedir}/lxc | |
288 | %attr(755,root,root) %{py3_sitedir}/_lxc.cpython-*.so | |
289 | %{py3_sitedir}/_lxc-0.1-py*.egg-info | |
290 | %{_mandir}/man1/lxc-device.1* | |
291 | %{_mandir}/man1/lxc-ls.1* | |
292 | %{_mandir}/man1/lxc-start-ephemeral.1* | |
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* | |
296 | %endif |