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

Revision 10393, 11.5 KB checked in by tomop, 8 years ago (diff)

lxc-2.0.1-1

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