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

Revision 10416, 11.9 KB checked in by tomop, 8 years ago (diff)

lxc-2.0.1-3

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