[packages/lxc] - added pld patch - enabled seccomp filter, lua and python bindings

qboosh qboosh at pld-linux.org
Wed Apr 17 21:44:34 CEST 2013


commit 67c70229b1b693a7567ac34c397c1ddea62f8e87
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Apr 17 21:45:02 2013 +0200

    - added pld patch
    - enabled seccomp filter, lua and python bindings

 lxc-pld.patch |  20 ++++++++++
 lxc.spec      | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++-------
 2 files changed, 127 insertions(+), 14 deletions(-)
---
diff --git a/lxc.spec b/lxc.spec
index 9e7a424..89ee268 100644
--- a/lxc.spec
+++ b/lxc.spec
@@ -1,17 +1,34 @@
+# TODO: move lua/python-dependent utils to lya-/python-
+#
+# Conditional build:
+%bcond_without	seccomp	# SecComp syscall filter
+%bcond_without	lua	# Lua binding
+%bcond_without	python	# Python binding
+#
 Summary:	Linux Container Tools
+Summary(pl.UTF-8):	Narzędzia do kontenerów linuksowych (LXC)
 Name:		lxc
 Version:	0.9.0
 Release:	1
 License:	GPL
-Group:		Base
+Group:		Applications/System
 Source0:	http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz
 # Source0-md5:	8552a4479090616f4bc04d8473765fc9
 Patch0:		%{name}-devpts.patch
-URL:		http://lxc.sourceforge.net
+Patch1:		%{name}-pld.patch
+URL:		http://lxc.sourceforge.net/
+BuildRequires:	autoconf >= 2.50
+BuildRequires:	automake
+BuildRequires:	docbook2X
 BuildRequires:	docbook-dtd30-sgml
 BuildRequires:	docbook-utils
+BuildRequires:	libapparmor-devel
 BuildRequires:	libcap-devel
-BuildRequires:	libtool
+%{?with_seccomp:BuildRequires:	libseccomp-devel}
+%{?with_lua:BuildRequires:	lua51-devel >= 5.1}
+BuildRequires:	pkgconfig
+%{?with_python:BuildRequires:	python3-devel >= 3.2}
+BuildRequires:	rpmbuild(macros) >= 1.612
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		configpath	/var/lib/lxc
@@ -26,21 +43,73 @@ asynchronous events notification, or the freeze of the container. This
 package is useful to create Virtual Private Server, or to run isolated
 applications like bash or sshd.
 
+%description -l pl.UTF-8
+Narzędzia do tworzenia i zarządzania kontenerami. System ten obejmuje
+w pełni funkcjonalne kontenery z ilozacją/wirtualizacją pidów, ipc,
+utsname, punktów montowania, /proc, /sys, sieci oraz uwzględniające
+grupy kontrolne. Jest bardzo lekki, elastyczny i udostępnia narzędzia
+do czynności związanych z kontenerami, takich jak monitorowanie z
+asynchronicznym powiadamianiem o zdarzeniach czy zamrażanie. Ten
+pakiet jest przydatny do tworzenia wirtualnych serwerów prywatnych
+oraz uruchamiania izolowanych aplikacji, takich jak bash czy sshd.
+
 %package devel
-Summary:	Header files and develpment documentation for lxc
+Summary:	Header files for lxc library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki lxc
 Group:		Development/Libraries
-Requires:	%{name} = %{epoch}:%{version}-%{release}
+Requires:	%{name} = %{version}-%{release}
 
 %description devel
-lxc development files.
+Header files for lxc library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki lxc.
+
+%package -n lua-lxc
+Summary:	Lua binding for LXC
+Summary(pl.UTF-8):	Wiązanie Lua do LXC
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	lua51-libs >= 5.1
+
+%description -n lua-lxc
+Lua binding for LXC.
+
+%description -n lua-lxc -l pl.UTF-8
+Wiązanie Lua do LXC.
+
+%package -n python3-lxc
+Summary:	Python (3.x) binding for LXC
+Summary(pl.UTF-8):	Wiązanie Pythona (3.x) do LXC
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	python3-libs >= 3.2
+
+%description -n python3-lxc
+Python (3.x) binding for LXC.
+
+%description -n python3-lxc -l pl.UTF-8
+Wiązanie Pythona (3.x) do LXC.
 
 %prep
-%setup -q -n %{name}-%{version}
+%setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
+%{__aclocal} -I config
+%{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure \
-	--with-config-path=%{configpath}
+	db2xman=docbook2X2man \
+	--disable-rpath \
+	--enable-doc \
+	%{?with_lua:--enable-lua} \
+	%{?with_python:--enable-python} \
+	%{?with_seccomp:--enable-seccomp} \
+	--with-config-path=%{configpath} \
+	--with-distro=pld
 
 %{__make}
 %{__make} -C doc
@@ -59,29 +128,53 @@ rm -rf $RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT%{configpath}
 
+%if %{with python}
+%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
+%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog CONTRIBUTING MAINTAINERS README TODO doc/FAQ.txt doc/examples/*.conf
-%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_bindir}/lxc-*
 %attr(755,root,root) %{_libdir}/liblxc.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/liblxc.so.0
-%{_libdir}/lxc/rootfs/README
 %dir %{configpath}
 %dir %{_libdir}/lxc
 %dir %{_libdir}/lxc/rootfs
+%{_libdir}/lxc/rootfs/README
 %attr(755,root,root) %{_libdir}/lxc/lxc-init
 %dir %{_sysconfdir}/lxc
-%config(noreplace) %{_sysconfdir}/lxc/default.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf
 %{_datadir}/lxc
+%{_mandir}/man1/lxc-*.1*
+%{_mandir}/man5/lxc.conf.5*
+%{_mandir}/man7/lxc.7*
 
 %files devel
 %defattr(644,root,root,755)
-%{_includedir}/lxc
 %attr(755,root,root) %{_libdir}/liblxc.so
+%{_includedir}/lxc
 %{_pkgconfigdir}/lxc.pc
+
+%if %{with lua}
+%files -n lua-lxc
+%defattr(644,root,root,755)
+%dir %{_libdir}/lua/5.1/lxc
+%attr(755,root,root) %{_libdir}/lua/5.1/lxc/core.so
+%{_datadir}/lua/5.1/lxc.lua
+%endif
+
+%if %{with python}
+%files -n python3-lxc
+%defattr(644,root,root,755)
+%{py3_sitedir}/lxc
+%attr(755,root,root) %{py3_sitedir}/_lxc.cpython-*.so
+%{py3_sitedir}/_lxc-0.1-py*.egg-info
+%endif
diff --git a/lxc-pld.patch b/lxc-pld.patch
new file mode 100644
index 0000000..66b8daa
--- /dev/null
+++ b/lxc-pld.patch
@@ -0,0 +1,20 @@
+--- lxc-0.9.0/configure.ac.orig	2013-04-05 11:47:10.000000000 +0200
++++ lxc-0.9.0/configure.ac	2013-04-17 20:04:27.905564169 +0200
+@@ -67,7 +67,7 @@
+ 	db2xman=""
+ 
+ 	AC_MSG_CHECKING(for docbook2x-man)
+-	for name in docbook2x-man db2x_docbook2man; do
++	for name in docbook2X2man docbook2x-man db2x_docbook2man; do
+ 		if "$name" --help >/dev/null 2>&1; then
+ 			db2xman="$name"
+ 			break;
+@@ -140,6 +140,8 @@
+ # Lua module and scripts
+ if test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu" ; then
+     LUAPKGCONFIG=lua5.1
++elif test x"$with_distro" = "xpld"; then
++    LUAPKGCONFIG=lua51
+ else
+     LUAPKGCONFIG=lua
+ fi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lxc.git/commitdiff/67c70229b1b693a7567ac34c397c1ddea62f8e87



More information about the pld-cvs-commit mailing list