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

Revision 11166, 12.2 KB checked in by tomop, 7 years ago (diff)

lxc-2.0.8-2

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