From e4d829a3e609aeb289457730c2ba4c3a2d2c8d53f3421ecccdeb675fd63fb8cd Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Thu, 19 May 2011 10:46:22 +0000 Subject: [PATCH 1/6] Updating link to change in openSUSE:Factory/libsemanage revision 17.0 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libsemanage?expand=0&rev=24c59c59cbea0828c58ef78220139646 --- libsemanage.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsemanage.spec b/libsemanage.spec index 75bbc10..207eb31 100644 --- a/libsemanage.spec +++ b/libsemanage.spec @@ -25,7 +25,7 @@ BuildRequires: libsepol-devel >= %{libsepol_ver} Name: libsemanage Version: 2.0.43 -Release: 9 +Release: 10 Url: http://www.nsa.gov/selinux/ License: LGPLv2.1 Group: System/Libraries From 6d7c006f61c3ca0aafa690b0ce0ef90cf3e29a020abc7aa8b05fea625deb5f71 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 23 May 2011 14:20:28 +0000 Subject: [PATCH 2/6] - split off python bindings to separate package to reduce build dependencies for rpm [bnc#695436] OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libsemanage?expand=0&rev=18 --- libsemanage.changes | 6 ++++ libsemanage.spec | 46 +++++++++--------------- python-semanage.changes | 77 +++++++++++++++++++++++++++++++++++++++++ python-semanage.spec | 68 ++++++++++++++++++++++++++++++++++++ 4 files changed, 167 insertions(+), 30 deletions(-) create mode 100644 python-semanage.changes create mode 100644 python-semanage.spec diff --git a/libsemanage.changes b/libsemanage.changes index 018f8a0..53f810e 100644 --- a/libsemanage.changes +++ b/libsemanage.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon May 23 14:15:42 UTC 2011 - prusnak@opensuse.org + +- split off python bindings to separate package to reduce build + dependencies for rpm [bnc#695436] + ------------------------------------------------------------------- Wed May 18 13:38:44 UTC 2011 - coolo@novell.com diff --git a/libsemanage.spec b/libsemanage.spec index 207eb31..77ce0d7 100644 --- a/libsemanage.spec +++ b/libsemanage.spec @@ -15,21 +15,21 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - %define libsepol_ver 2.0.37 %define libselinux_ver 2.0.0 -BuildRequires: bison flex libustr-devel python-devel swig +BuildRequires: bison +BuildRequires: flex BuildRequires: libselinux-devel >= %{libselinux_ver} BuildRequires: libsepol-devel >= %{libsepol_ver} +BuildRequires: libustr-devel Name: libsemanage Version: 2.0.43 Release: 10 -Url: http://www.nsa.gov/selinux/ License: LGPLv2.1 -Group: System/Libraries Summary: SELinux binary policy manipulation library +Url: http://www.nsa.gov/selinux/ +Group: System/Libraries Source: %{name}-%{version}.tar.bz2 Source1: baselibs.conf Patch0: %{name}-rhat.patch @@ -54,8 +54,8 @@ on binary policies such as customizing policy boolean settings. %package -n libsemanage1 License: LGPLv2.1 -Group: System/Libraries Summary: SELinux binary policy manipulation library +Group: System/Libraries %description -n libsemanage1 Security-enhanced Linux is a feature of the Linux kernel and a @@ -78,7 +78,8 @@ boolean settings. License: LGPLv2.1 Summary: Header files and libraries used to build policy manipulation tools Group: Development/Libraries -Requires: libsemanage1 = %{version} libustr-devel +Requires: libsemanage1 = %{version} +Requires: libustr-devel %description devel The semanage-devel package contains the libraries and header files @@ -94,35 +95,24 @@ Requires: libsemanage-devel The semanage-static package contains the static libraries needed for developing applications that manipulate binary policies. - -%package -n python-semanage -License: LGPLv2.1 -Summary: semanage python bindings for libsemanage -Group: Development/Libraries -Requires: libsemanage1 = %{version} - -%description -n python-semanage -The libsemanage-python package contains the python bindings for developing -SELinux management applications. - %prep %setup -q %patch0 -p1 %build make clean -make -j1 CFLAGS="$RPM_OPT_FLAGS" swigify -make -j1 CFLAGS="$RPM_OPT_FLAGS" LIBDIR="%{_libdir}" SHLIBDIR="%{_lib}" all pywrap +make -j1 CFLAGS="%{optflags}" +make -j1 CFLAGS="%{optflags}" LIBDIR="%{_libdir}" SHLIBDIR="%{_lib}" all %install -mkdir -p $RPM_BUILD_ROOT/%{_lib} -mkdir -p $RPM_BUILD_ROOT%{_libdir} -mkdir -p $RPM_BUILD_ROOT%{_includedir} -make DESTDIR="$RPM_BUILD_ROOT" LIBDIR="$RPM_BUILD_ROOT%{_libdir}" SHLIBDIR="$RPM_BUILD_ROOT/%{_lib}" install install-pywrap -ln -sf /%{_lib}/libsemanage.so.1 ${RPM_BUILD_ROOT}/%{_libdir}/libsemanage.so +mkdir -p %{buildroot}/%{_lib} +mkdir -p %{buildroot}%{_libdir} +mkdir -p %{buildroot}%{_includedir} +make DESTDIR=%{buildroot} LIBDIR="%{buildroot}%{_libdir}" SHLIBDIR="%{buildroot}/%{_lib}" install +ln -sf /%{_lib}/libsemanage.so.1 %{buildroot}/%{_libdir}/libsemanage.so %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %post -n libsemanage1 -p /sbin/ldconfig @@ -146,8 +136,4 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_libdir}/libsemanage.a -%files -n python-semanage -%defattr(-,root,root) -%{_libdir}/python*/site-packages/* - %changelog diff --git a/python-semanage.changes b/python-semanage.changes new file mode 100644 index 0000000..53f810e --- /dev/null +++ b/python-semanage.changes @@ -0,0 +1,77 @@ +------------------------------------------------------------------- +Mon May 23 14:15:42 UTC 2011 - prusnak@opensuse.org + +- split off python bindings to separate package to reduce build + dependencies for rpm [bnc#695436] + +------------------------------------------------------------------- +Wed May 18 13:38:44 UTC 2011 - coolo@novell.com + +- add baselibs.conf for rpm-32bit to use + +------------------------------------------------------------------- +Wed Feb 23 05:42:43 UTC 2011 - coolo@novell.com + +- disable parallel build, it breaks too often + +------------------------------------------------------------------- +Thu Feb 25 14:59:32 UTC 2010 - prusnak@suse.cz + +- updated to 2.0.43 + * changes too numerous to list + +------------------------------------------------------------------- +Fri Jan 16 14:24:38 CET 2009 - prusnak@suse.cz + +- fix assignment of wrong context [bnc#466793] + +------------------------------------------------------------------- +Wed Jan 14 14:06:28 CET 2009 - prusnak@suse.cz + +- updated to 2.0.31 + * policy module compression (bzip) support from Dan Walsh + * hard link files between tmp/active/previous from Dan Walsh + * add semanage_mls_enabled() interface from Stephen Smalley + +------------------------------------------------------------------- +Mon Dec 1 11:35:58 CET 2008 - prusnak@suse.cz + +- updated to 2.0.29 + * add USER to lines to homedir_template context file + * add compression support + * allow fcontext and seuser changes without rebuilding the policy + * don't rebuild on fcontext or seuser modifications + * modify genhomedircon to skip %groupname entries + +------------------------------------------------------------------- +Wed Oct 22 16:17:23 CEST 2008 - mrueckert@suse.de + +- fix debug_packages_requires define + +------------------------------------------------------------------- +Tue Sep 23 12:52:32 CEST 2008 - prusnak@suse.cz + +- require only version, not release [bnc#429053] + +------------------------------------------------------------------- +Tue Sep 2 12:13:42 CEST 2008 - prusnak@suse.cz + +- updated to 2.0.27 + * Modify genhomedircon to skip %groupname entries. + Ultimately we need to expand them to the list of users to support + per-role homedir labeling when using the %groupname syntax. +- updated to 2.0.26 + * Fix bug in genhomedircon fcontext matches logic from Dan Walsh. + Strip any trailing slash before appending /*$. + +------------------------------------------------------------------- +Fri Aug 1 17:32:21 CEST 2008 - ro@suse.de + +- fix requires for debuginfo package + +------------------------------------------------------------------- +Tue Jul 15 16:58:47 CEST 2008 - prusnak@suse.cz + +- initial version 2.0.25 + * based on Fedora package by Dan Walsh + diff --git a/python-semanage.spec b/python-semanage.spec new file mode 100644 index 0000000..5e04fe1 --- /dev/null +++ b/python-semanage.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-semanage +# +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +%define libsepol_ver 2.0.37 +%define libselinux_ver 2.0.0 +BuildRequires: bison +BuildRequires: flex +BuildRequires: libselinux-devel >= %{libselinux_ver} +BuildRequires: libsepol-devel >= %{libsepol_ver} +BuildRequires: libustr-devel +BuildRequires: python-devel +BuildRequires: swig + +Name: python-semanage +Version: 2.0.43 +Release: 10 +License: LGPLv2.1 +Summary: Python bindings for libsemanage +Url: http://www.nsa.gov/selinux/ +Group: Development/Libraries +Source: %{name}-%{version}.tar.bz2 +Source1: baselibs.conf +Patch0: %{name}-rhat.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Requires: libsemanage1 = %{version} + +%description +This package contains the python bindings for developing +SELinux management applications. + +%prep +%setup -q +%patch0 -p1 + +%build +make clean +make -j1 CFLAGS="%{optflags}" swigify +make -j1 CFLAGS="%{optflags}" LIBDIR="%{_libdir}" SHLIBDIR="%{_lib}" all pywrap + +%install +mkdir -p %{buildroot}/%{_lib} +mkdir -p %{buildroot}%{_libdir} +mkdir -p %{buildroot}%{_includedir} +make DESTDIR=%{buildroot} LIBDIR="%{buildroot}%{_libdir}" SHLIBDIR="%{buildroot}/%{_lib}" install install-pywrap +ln -sf /%{_lib}/libsemanage.so.1 %{buildroot}/%{_libdir}/libsemanage.so + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_libdir}/python*/site-packages/* + +%changelog From 7ed3aba4e9f21506f6ad8e7f7c8c923bc68cfc715625c459dcf4cd623a1f0a74 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 23 May 2011 14:24:03 +0000 Subject: [PATCH 3/6] fix tarball name OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libsemanage?expand=0&rev=19 --- python-semanage.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-semanage.spec b/python-semanage.spec index 5e04fe1..52b4606 100644 --- a/python-semanage.spec +++ b/python-semanage.spec @@ -32,7 +32,7 @@ License: LGPLv2.1 Summary: Python bindings for libsemanage Url: http://www.nsa.gov/selinux/ Group: Development/Libraries -Source: %{name}-%{version}.tar.bz2 +Source: libsemanage-%{version}.tar.bz2 Source1: baselibs.conf Patch0: %{name}-rhat.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build From 4c3eb043874e0b0dfe0776f8746c2f7f51654a837dfe90387cf6cf1a990b0672 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 23 May 2011 14:25:26 +0000 Subject: [PATCH 4/6] once more :) OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libsemanage?expand=0&rev=20 --- python-semanage.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-semanage.spec b/python-semanage.spec index 52b4606..a65ef93 100644 --- a/python-semanage.spec +++ b/python-semanage.spec @@ -34,7 +34,7 @@ Url: http://www.nsa.gov/selinux/ Group: Development/Libraries Source: libsemanage-%{version}.tar.bz2 Source1: baselibs.conf -Patch0: %{name}-rhat.patch +Patch0: libsemanage-rhat.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: libsemanage1 = %{version} From f0613aa098550dad15411cba6c12f6b48a4e751ace84de0e727070ac6ccf331e Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 23 May 2011 14:26:25 +0000 Subject: [PATCH 5/6] fix setup macro OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libsemanage?expand=0&rev=21 --- python-semanage.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-semanage.spec b/python-semanage.spec index a65ef93..75b58bd 100644 --- a/python-semanage.spec +++ b/python-semanage.spec @@ -43,7 +43,7 @@ This package contains the python bindings for developing SELinux management applications. %prep -%setup -q +%setup -q -n libsemanage-%{version} %patch0 -p1 %build From a7337d0b81b0bc039842ad6020c1f7e7801b9c0716cacb3441667e96374a776a Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 23 May 2011 14:32:05 +0000 Subject: [PATCH 6/6] remove unpackaged files in python-semamage OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libsemanage?expand=0&rev=22 --- python-semanage.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/python-semanage.spec b/python-semanage.spec index 75b58bd..36ff9e4 100644 --- a/python-semanage.spec +++ b/python-semanage.spec @@ -31,7 +31,7 @@ Release: 10 License: LGPLv2.1 Summary: Python bindings for libsemanage Url: http://www.nsa.gov/selinux/ -Group: Development/Libraries +Group: Development/Languages/Python Source: libsemanage-%{version}.tar.bz2 Source1: baselibs.conf Patch0: libsemanage-rhat.patch @@ -56,13 +56,20 @@ mkdir -p %{buildroot}/%{_lib} mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_includedir} make DESTDIR=%{buildroot} LIBDIR="%{buildroot}%{_libdir}" SHLIBDIR="%{buildroot}/%{_lib}" install install-pywrap -ln -sf /%{_lib}/libsemanage.so.1 %{buildroot}/%{_libdir}/libsemanage.so + +# remove files contained in other packages +rm -rf %{buildroot}%{_sysconfdir} +rm -rf %{buildroot}/%{_lib} +rm -rf %{buildroot}%{_includedir} +rm -f %{buildroot}%{_libdir}/libsemanage.* +rm -rf %{buildroot}%{_libdir}/pkgconfig +rm -rf %{buildroot}%{_mandir} %clean rm -rf %{buildroot} %files %defattr(-,root,root) -%{_libdir}/python*/site-packages/* +%{python_sitearch}/* %changelog