source: projects/specs/trunk/l/lxc/lxc-vl.spec @ 12461

Revision 12461, 13.1 KB checked in by tomop, 4 years ago (diff)

lxc-4.0.4-1

Line 
1%bcond_with systemd
2%bcond_with lua
3%global with_python3 0
4%if %{with systemd}
5%global with_systemd 0
6%endif
7
8%global luaver 5.1
9%global lualibdir %{_libdir}/lua/%{luaver}
10%global luapkgdir %{_datadir}/lua/%{luaver}
11
12%define _unpackaged_files_terminate_build 1
13
14Name:           lxc
15Version:        4.0.4
16Release:        1%{?_dist_release}%{?with_systemd:.systemd}
17Summary:        Linux Resource Containers
18Summary(ja):    Linux リソースコンテナ
19Group:          virtualization
20License:        LGPLv2+ and GPLv2
21URL:            https://linuxcontainers.org
22Vendor:         Project Vine
23Distribution:   Vine Linux
24
25Source0:        https://linuxcontainers.org/downloads/%{name}-%{version}.tar.gz
26Source10:       lxc-vinelinux
27Source11:       vinelinux.common.conf
28Source12:       vinelinux.userns.conf
29
30Patch0:         0001-fix-initscript.patch
31Patch100:       0002-fix-launching-dnsmasq.patch
32
33BuildRequires:  docbook-utils
34BuildRequires:  docbook2X
35BuildRequires:  doxygen
36BuildRequires:  glibc-static
37BuildRequires:  kernel-headers
38BuildRequires:  libcap-static
39BuildRequires:  libtool
40%if %{with lua}
41BuildRequires:  lua-devel
42%endif
43BuildRequires:  perl-XML-SAX
44%if 0%{?with_python3}
45BuildRequires:  python3-devel >= 3.2
46BuildRequires:  python3-rpm-macros
47%endif # with_python3
48%if 0%{?with_systemd}
49BuildRequires:  systemd
50%endif # with_systemd
51# for lxc-top
52%if %{with lua}
53Requires:       lua-%{name}%{?_isa} = %{version}-%{release}
54Requires:       lua-alt-getopt
55%endif
56%if !0%{?with_systemd}
57Requires:       libcgroup
58%endif
59Obsoletes:      lxc-extra < 3.0.0
60Obsoletes:      lxc-lua < 3.0.0
61Obsoletes:      python3-lxc < 3.0.0
62
63%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
64
65%description
66Linux Resource Containers provide process and resource isolation without the
67overhead of full virtualization.
68
69
70%package        libs
71Summary:        Runtime library files for %{name}
72Summary(ja):    %{name}のランタイムライブラリ
73Group:          virtualization
74%if 0%{?with_systemd}
75Requires(post): systemd
76Requires(preun): systemd
77Requires(postun): systemd
78%else
79Requires(post): chkconfig
80Requires(preun): initscripts, chkconfig
81Requires(postun): initscripts
82%endif # with_systemd
83Obsoletes: compat32-lxc-init-static.32bit < 2.0.1-3
84
85%description libs
86Linux Resource Containers provide process and resource isolation without the
87overhead of full virtualization.
88
89The %{name}-libs package contains libraries for running %{name} applications.
90
91
92%if 0%{?with_python3}
93%package        -n python3-%{name}
94Summary:        Python binding for %{name}
95Summary(ja):    %{name} の Python バインディング
96Group:          programming
97
98%description    -n python3-%{name}
99Linux Resource Containers provide process and resource isolation without the
100overhead of full virtualization.
101
102The python3-%{name} package contains the Python3 binding for %{name}.
103
104%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}_lxc\\..*\\.so
105
106
107%package        extra
108Summary:        Extra tools for %{name}
109Summary(ja):    %{name} の追加ツール
110Group:          virtualization
111Requires:       python3-%{name} = %{version}-%{release}
112
113%description    extra
114Linux Resource Containers provide process and resource isolation without the
115overhead of full virtualization.
116
117This package contains tools needing the Python3 bindings.
118%endif # with_python3
119
120
121%if %{with lua}
122%package        -n lua-%{name}
123Summary:        Lua binding for %{name}
124Summary(ja):    %{name} の Lua バインディング
125Group:          programming
126
127%description    -n lua-%{name}
128Linux Resource Containers provide process and resource isolation without the
129overhead of full virtualization.
130
131The lua-%{name} package contains the Lua binding for %{name}.
132
133%endif
134
135%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}core\\.so\\.0
136
137
138%package        templates
139Summary:        Templates for %{name}
140Summary(ja):    %{name} のテンプレート
141Group:          virtualization
142Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
143# Note: Requirements for the template scripts (busybox, dpkg,
144# debootstrap, vbootstrap, rsync, openssh-server, dhclient, apt, pacman, zypper,
145# ubuntu-cloudimg-query etc...) are not explicitly mentioned here:
146# their presence varies wildly on supported Fedora/EPEL releases and
147# archs, and they are in most cases needed for a single template
148# only. Also, the templates normally fail graciously when such a tool
149# is missing. Moving each template to its own subpackage on the other
150# hand would be overkill.
151
152
153%description    templates
154Linux Resource Containers provide process and resource isolation without the
155overhead of full virtualization.
156
157The %{name}-templates package contains templates for creating containers.
158
159
160%package        devel
161Summary:        Development files for %{name}
162Summary(ja):    %{name}の開発ファイル
163Group:          programming
164Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
165Requires:       pkgconfig
166
167%description    devel
168Linux Resource Containers provide process and resource isolation without the
169overhead of full virtualization.
170
171The %{name}-devel package contains libraries and header files for
172developing applications that use %{name}.
173
174
175%package        doc
176Summary:        Documentation for %{name}
177Summary(ja):    %{name} のドキュメント
178Group:          documentation
179BuildArch:      noarch
180
181%description    doc
182This package contains documentation for %{name}.
183
184
185%prep
186%setup -q -n %{name}-%{version}
187%if !0%{?with_systemd}
188%patch0 -p1
189%endif
190%patch100 -p1
191
192
193%build
194./autogen.sh
195%configure --with-distro=centos \
196           --enable-doc \
197           --enable-api-docs \
198           --disable-silent-rules \
199           --docdir=%{_pkgdocdir} \
200           --disable-werror \
201           --disable-rpath \
202           --disable-static \
203           --disable-apparmor \
204           --disable-selinux \
205           --enable-capabilities \
206           --enable-examples \
207           --enable-bash \
208%if %{with lua}
209           --enable-lua \
210%endif
211%if 0%{?with_python3}
212           --enable-python \
213%endif # with_python3
214%if 0%{?with_systemd}
215           --with-init-script=systemd \
216%else
217           --with-init-script=sysvinit \
218%endif # with_systemd
219           %{nil}
220
221make %{?_smp_mflags}
222
223
224%install
225%{make_install}
226make DESTDIR=%{buildroot} install
227mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
228%if %{with lua}
229chmod -x %{buildroot}%{luapkgdir}/lxc.lua
230%endif
231
232rm -rf rpmdoc
233mkdir -p rpmdoc/api
234cp -a doc/api/html/* rpmdoc/api/
235
236# cache dir
237mkdir -p %{buildroot}%{_localstatedir}/cache/%{name}
238
239rm -rf %{buildroot}%{_datadir}/lxc/selinux
240
241# install vinelinux template
242install -m775 %{SOURCE10} %{buildroot}%{_datadir}/lxc/templates/
243install -m775 %{SOURCE11} %{buildroot}%{_datadir}/lxc/config/
244install -m775 %{SOURCE12} %{buildroot}%{_datadir}/lxc/config/
245
246rm -f %{buildroot}%{_libdir}/liblxc.{a,la}
247
248
249%check
250make check
251
252
253%post libs
254/sbin/ldconfig
255%if 0%{?with_systemd}
256%systemd_post %{name}-net.service
257%systemd_post %{name}.service
258%systemd_post %{name}@.service
259%else
260/sbin/chkconfig --add %{name}
261%endif # with_systemd
262
263
264%preun libs
265%if 0%{?with_systemd}
266%systemd_preun %{name}-net.service
267%systemd_preun %{name}.service
268%systemd_preun %{name}@.service
269%else
270if [ $1 -eq 0 -o -x /bin/systemctl ]; then
271        /sbin/service %{name} stop > /dev/null 2>&1
272        /sbin/chkconfig --del %{name}
273fi
274%endif # with_systemd
275
276
277%postun libs
278/sbin/ldconfig
279%if 0%{?with_systemd}
280%systemd_postun %{name}-net.service
281%systemd_postun %{name}.service
282%systemd_postun %{name}@.service
283
284%else
285if [ $1 -ge 1 ]; then
286        /sbin/service %{name} condrestart > /dev/null 2>&1 || :
287fi
288%endif # with_systemd
289
290
291%files
292%license COPYING LICENSE*
293%doc AUTHORS MAINTAINERS README*
294%doc rpmdoc/api
295%{_bindir}/%{name}-*
296%{_mandir}/man1/%{name}*
297%{_mandir}/*/man1/%{name}*
298# in lxc-libs:
299%exclude %{_bindir}/%{name}-autostart
300%exclude %{_mandir}/man1/%{name}-autostart*
301%exclude %{_mandir}/*/man1/%{name}-autostart*
302%exclude %{_mandir}/man1/%{name}-user-nic*
303%exclude %{_mandir}/*/man1/%{name}-user-nic*
304%{_datadir}/%{name}/%{name}.functions
305%if 0%{?with_python3}
306%exclude %{_bindir}/%{name}-device
307%exclude %{_bindir}/%{name}-ls
308%exclude %{_mandir}/man1/%{name}-device*
309%exclude %{_mandir}/man1/%{name}-ls*
310%exclude %{_mandir}/*/man1/%{name}-device*
311%exclude %{_mandir}/*/man1/%{name}-ls*
312%endif
313%dir %{_sysconfdir}/bash_completion.d/
314%{_sysconfdir}/bash_completion.d/%{name}
315
316
317%files libs
318%dir %{_datadir}/%{name}
319%dir %{_datadir}/%{name}/templates
320%dir %{_datadir}/%{name}/config
321%{_datadir}/%{name}/hooks
322%{_datadir}/%{name}/%{name}-patch.py*
323%{_libdir}/liblxc.so.*
324%{_libdir}/%{name}
325%{_libexecdir}/%{name}
326%{_sbindir}/init.%{name}
327%{_sbindir}/init.%{name}.static
328%{_bindir}/%{name}-autostart
329%{_localstatedir}/lib/%{name}
330%dir %{_sysconfdir}/%{name}
331%config(noreplace) %{_sysconfdir}/%{name}/default.conf
332%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
333%{_mandir}/man1/%{name}-autostart*
334%{_mandir}/*/man1/%{name}-autostart*
335%{_mandir}/man1/%{name}-user-nic*
336%{_mandir}/*/man1/%{name}-user-nic*
337%{_mandir}/man5/%{name}*
338%{_mandir}/man7/%{name}*
339%{_mandir}/*/man5/%{name}*
340%{_mandir}/*/man7/%{name}*
341%if 0%{?with_systemd}
342%{_unitdir}/%{name}.service
343%{_unitdir}/%{name}@.service
344%{_unitdir}/%{name}-net.service
345%else
346%{_sysconfdir}/rc.d/init.d/%{name}
347%{_sysconfdir}/rc.d/init.d/%{name}-net
348%endif # with_systemd
349%dir %{_localstatedir}/cache/%{name}
350
351
352%if 0%{?with_python3}
353%files -n python3-%{name}
354%{python3_sitearch}/*
355
356
357%files extra
358%{_bindir}/%{name}-device
359%{_bindir}/%{name}-ls
360%{_mandir}/man1/%{name}-device*
361%{_mandir}/man1/%{name}-ls*
362%{_mandir}/*/man1/%{name}-device*
363%{_mandir}/*/man1/%{name}-ls*
364%endif # with_python3
365
366
367%if %{with lua}
368%files -n lua-%{name}
369%{lualibdir}/%{name}
370%{luapkgdir}/%{name}.lua
371%endif
372
373
374%files templates
375%{_datadir}/%{name}/templates/lxc-*
376%{_datadir}/%{name}/config/*
377
378
379%files devel
380%{_libdir}/pkgconfig/%{name}.pc
381%{_includedir}/lxc
382%{_libdir}/liblxc.so
383
384
385%files doc
386%doc COPYING LICENSE* AUTHORS MAINTAINERS README*
387%doc rpmdoc/api
388
389
390%changelog
391* Mon Aug 10 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.4-1
392- new upstream release,
393- added systemd support (disabled as default).
394
395* Sat Apr 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.0-1
396- updated to 4.0.0.
397- updated lxc-vinelinux.
398
399* Mon Mar 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.4-1
400- updated to 3.0.4.
401- disabled cgmanager.
402
403* Tue Apr 09 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.3-2
404- updated the Vine Linux template for lxc-3.0.x.
405
406* Fri Jan 11 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.3-1
407- updated to 3.0.3.
408- updated Patch0.
409- updated Patch100.
410- disabled lua.
411- disabled python.
412- added R:libcgroup.
413
414* Wed Aug 30 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.8-2
415- enabled cgmanager.
416
417* Tue Aug 29 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.8-1
418- updated to 2.0.8.
419- updated Patch0.
420- dropped Patch1: added an option to get same effect.
421
422* Wed Jun 29 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.1-3
423- made lxc-net to be able to disable dnsmasq.
424- dropped compat32-lxc-init-static.
425
426* Sun Jun 26 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.1-2
427- enabled init.lxc.static for lxc-execute.
428
429* Thu Jun 23 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.1-1
430- updated to 2.0.1.
431- replaced all patches.
432
433* Tue Nov 17 2015 Daisuke SUZUKI <daisuke@vinelinux.org> 1.1.5-2
434- enable python3 support by default
435
436* Sun Nov 15 2015 Daisuke SUZUKI <daisuke@vinelinux.org> 1.1.5-1
437- update vinelinux template
438  - add vinelinux.{common,userns}.conf
439- add patch1 to disable setproctitle error message,
440  cherry picked from upstream git.
441
442* Sun Nov 15 2015 Daisuke SUZUKI <daisuke@vinelinux.org> 1.1.4-1
443- update to 1.1.4-1
444- add vinelinux template
445
446* Wed Apr 10 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.0-3
447- add patch10 to not fail on failure to link kmsg
448
449* Wed Nov 21 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.0-2
450- update to 0.8.0 release
451
452* Fri May 25 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.0-1.20120525
453- update to git master
454
455* Wed Apr 25 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.0-0.rc1
456- new upstream release
457
458* Thu Jan 26 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.5-1.20120105
459- update to git current (20120105)
460
461* Mon Jun 06 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.4.2-1
462- update to 0.7.4.2
463
464* Thu Apr 28 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.4.1-2
465- include all templates
466
467* Wed Apr 27 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.4.1-1
468- initial build for Vine Linux
469
470* Fri Mar 25 2011 Silas Sewell <silas@sewell.ch> - 0.7.4.1-1
471- Update to 0.7.4.1
472
473* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-2
474- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
475
476* Mon Jul 26 2010 Silas Sewell <silas@sewell.ch> - 0.7.2-1
477- Update to 0.7.2
478- Remove templates
479
480* Tue Jul 06 2010 Silas Sewell <silas@sewell.ch> - 0.7.1-1
481- Update to 0.7.1
482
483* Wed Feb 17 2010 Silas Sewell <silas@sewell.ch> - 0.6.5-1
484- Update to latest release
485- Add /var/lib/lxc directory
486- Patch for sys/stat.h
487
488* Fri Nov 27 2009 Silas Sewell <silas@sewell.ch> - 0.6.4-1
489- Update to latest release
490- Add documentation sub-package
491
492* Mon Jul 27 2009 Silas Sewell <silas@sewell.ch> - 0.6.3-2
493- Apply patch for rawhide kernel
494
495* Sat Jul 25 2009 Silas Sewell <silas@sewell.ch> - 0.6.3-1
496- Initial package
Note: See TracBrowser for help on using the repository browser.