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

Revision 12334, 12.8 KB checked in by tomop, 4 years ago (diff)

lxc-3.0.4-1

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