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

Revision 12062, 12.7 KB checked in by tomop, 5 years ago (diff)

Merge branch 'tomop'

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