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'

RevLine 
[12019]1%bcond_with lua
2%global with_python3 0
[9811]3%global with_systemd 0
4
5%global luaver 5.1
6%global lualibdir %{_libdir}/lua/%{luaver}
7%global luapkgdir %{_datadir}/lua/%{luaver}
8
[10393]9%define _unpackaged_files_terminate_build 1
10
[3720]11Name:           lxc
[12019]12Version:        3.0.3
[12062]13Release:        2%{?_dist_release}
[3720]14Summary:        Linux Resource Containers
15Summary(ja):    Linux リソースコンテナ
16Group:          Applications/System
[9811]17License:        LGPLv2+ and GPLv2
18URL:            http://linuxcontainers.org
[10393]19Vendor:         Project Vine
20Distribution:   Vine Linux
[6027]21
[9811]22Source0:        http://linuxcontainers.org/downloads/%{name}-%{version}.tar.gz
23Source10:       lxc-vinelinux
[9815]24Source11:       vinelinux.common.conf
25Source12:       vinelinux.userns.conf
[3720]26
[12019]27Patch0:         0001-fix-initscript.patch
28Patch100:       0002-fix-launching-dnsmasq.patch
[9811]29
[3720]30BuildRequires:  docbook-utils
[9811]31Buildrequires:  docbook2X
[11166]32Buildrequires:  cgmanager-devel
[9811]33Buildrequires:  doxygen
[10401]34BuildRequires:  glibc-static
[3720]35BuildRequires:  kernel-headers
[10401]36BuildRequires:  libcap-static
[3720]37BuildRequires:  libtool
[12019]38%if %{with lua}
[9811]39BuildRequires:  lua-devel
[12019]40%endif
[9811]41BuildRequires:  perl-XML-SAX
42%if 0%{?with_python3}
43BuildRequires:  python3-devel >= 3.2
[12019]44BuildRequires:  python3-rpm-macros
[9811]45%endif # with_python3
46%if 0%{?with_systemd}
47BuildRequires:  systemd
48%endif # with_systemd
49# for lxc-top
[12019]50%if %{with lua}
[9811]51Requires:       lua-%{name}%{?_isa} = %{version}-%{release}
52Requires:       lua-alt-getopt
[12019]53%endif
54Requires:       libcgroup
55Obsoletes:      lxc-extra < 3.0.0
56Obsoletes:      lxc-lua < 3.0.0
57Obsoletes:      python3-lxc < 3.0.0
[3720]58
[9811]59%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
[3720]60
61%description
62Linux Resource Containers provide process and resource isolation without the
63overhead of full virtualization.
64
[9811]65
[3720]66%package        libs
67Summary:        Runtime library files for %{name}
[9811]68Summary(ja):    %{name}のランタイムライブラリ
[3720]69Group:          System Environment/Libraries
[9811]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
[10416]79Obsoletes: compat32-lxc-init-static.32bit < 2.0.1-3
[3720]80
[10401]81%description libs
[3720]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
[9811]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
[9815]107Requires:       python3-%{name} = %{version}-%{release}
[9811]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
[12019]117%if %{with lua}
[9811]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
[12019]129%endif
130
[9811]131%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}core\\.so\\.0
132
133
[3720]134%package        templates
135Summary:        Templates for %{name}
[9811]136Summary(ja):    %{name} のテンプレート
[3720]137Group:          System Environment/Libraries
[9811]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.
[3720]147
[9811]148
[3720]149%description    templates
150Linux Resource Containers provide process and resource isolation without the
151overhead of full virtualization.
152
[9811]153The %{name}-templates package contains templates for creating containers.
[3720]154
[9811]155
[3720]156%package        devel
157Summary:        Development files for %{name}
[9811]158Summary(ja):    %{name}の開発ファイル
[3720]159Group:          Development/Libraries
[9811]160Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
[3720]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
[9811]170
[3720]171%package        doc
172Summary:        Documentation for %{name}
173Summary(ja):    %{name} のドキュメント
174Group:          Documentation
[9811]175BuildArch:      noarch
[3720]176
177%description    doc
178This package contains documentation for %{name}.
179
[9811]180
[3720]181%prep
[7134]182%setup -q -n %{name}-%{version}
[9811]183%patch0 -p1
[11166]184#%patch1 -p1
[10416]185%patch100 -p1
[3720]186
[9811]187
[3720]188%build
[10393]189./autogen.sh
[9811]190%configure --with-distro=centos \
191           --enable-doc \
192           --enable-api-docs \
193           --disable-silent-rules \
194           --docdir=%{_pkgdocdir} \
[11166]195           --disable-werror \
[9811]196           --disable-rpath \
197           --disable-apparmor \
198           --disable-selinux \
[11166]199           --enable-cgmanager \
[10393]200           --enable-capabilities \
201           --enable-examples \
[9811]202           --enable-bash \
[12019]203%if %{with lua}
[9811]204           --enable-lua \
[12019]205%endif
[9811]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}
[3720]216
217
218%install
[9811]219%{make_install}
220make DESTDIR=%{buildroot} install
221mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
[12019]222%if %{with lua}
[9811]223chmod -x %{buildroot}%{luapkgdir}/lxc.lua
[12019]224%endif
[3720]225
[9811]226mkdir -p %{buildroot}%{_pkgdocdir}
227cp -a AUTHORS COPYING README %{buildroot}%{_pkgdocdir}
228mkdir -p %{buildroot}%{_pkgdocdir}/api
229cp -a doc/api/html/* %{buildroot}%{_pkgdocdir}/api/
[3720]230
[9811]231# cache dir
232mkdir -p %{buildroot}%{_localstatedir}/cache/%{name}
[3720]233
[9811]234rm -rf %{buildroot}%{_datadir}/lxc/selinux
[3720]235
[9811]236# install vinelinux template
237install -m775 %{SOURCE10} %{buildroot}%{_datadir}/lxc/templates/
[9815]238install -m775 %{SOURCE11} %{buildroot}%{_datadir}/lxc/config/
239install -m775 %{SOURCE12} %{buildroot}%{_datadir}/lxc/config/
[9811]240
[12019]241rm -f %{buildroot}%{_libdir}/liblxc.{a,la}
[9811]242
[11166]243
[9811]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
[3720]279%files
[12019]280%license COPYING
281%doc README*
[3720]282%{_bindir}/%{name}-*
[9811]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}
[3720]302
[9811]303
[3720]304%files libs
[9811]305%dir %{_datadir}/%{name}
306%dir %{_datadir}/%{name}/templates
307%dir %{_datadir}/%{name}/config
308%{_datadir}/%{name}/hooks
309%{_datadir}/%{name}/%{name}-patch.py*
[3720]310%{_libdir}/liblxc.so.*
[9811]311%{_libdir}/%{name}
312%{_libexecdir}/%{name}
313%{_sbindir}/init.%{name}
[10401]314%{_sbindir}/init.%{name}.static
[9811]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}
[3720]339
[9811]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
[12019]356%if %{with lua}
[9811]357%files -n lua-%{name}
358%{lualibdir}/%{name}
359%{luapkgdir}/%{name}.lua
[12019]360%endif
[9811]361
362
[3720]363%files templates
[9811]364%{_datadir}/%{name}/templates/lxc-*
365%{_datadir}/%{name}/config/*
[3720]366
[9811]367
[3720]368%files devel
[7134]369%{_libdir}/pkgconfig/%{name}.pc
[9811]370%{_includedir}/lxc
[3720]371%{_libdir}/liblxc.so
372
[9811]373
[3720]374%files doc
[9811]375%dir %{_pkgdocdir}
376# README, AUTHORS and COPYING intentionally duplicated because -doc
377# can be installed on its own.
378%{_pkgdocdir}/*
[3720]379
[9811]380
[3720]381%changelog
[12062]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
[12019]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
[11166]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
[10416]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
[10401]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
[10393]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
[9815]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
[9811]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
[7134]428* Wed Nov 21 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.0-2
429- update to 0.8.0 release
430
[6231]431* Fri May 25 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.0-1.20120525
432- update to git master
433
[6027]434* Wed Apr 25 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.0-0.rc1
435- new upstream release
436
[5495]437* Thu Jan 26 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.5-1.20120105
438- update to git current (20120105)
439
[4061]440* Mon Jun 06 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.4.2-1
441- update to 0.7.4.2
442
[3720]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.