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

Revision 9811, 10.9 KB checked in by daisuke, 9 years ago (diff)

lxc: update to 1.1.4, add vinelinux template

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