From b0996f591e39ee2c747a92bfb0f34d38919bc8d05b3bbac6a414a762062554cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Sun, 12 Feb 2012 20:49:20 +0000 Subject: [PATCH] Accepting request 104152 from home:elvigia:branches:security - Move libraries back to %{_libdir}, /usr merge project - cross-build workaround: make sure no attempt is made to build python stuff even if it's installed on the host system - Move libraries back to %{_libdir}, /usr merge project OBS-URL: https://build.opensuse.org/request/show/104152 OBS-URL: https://build.opensuse.org/package/show/security/libcap-ng?expand=0&rev=17 --- libcap-ng-python.changes | 11 ++++++++ libcap-ng-python.spec | 58 +++++++++++++++++----------------------- libcap-ng.changes | 5 ++++ libcap-ng.spec | 58 +++++++++++++++++----------------------- 4 files changed, 64 insertions(+), 68 deletions(-) diff --git a/libcap-ng-python.changes b/libcap-ng-python.changes index eabb3b2..7f80f78 100644 --- a/libcap-ng-python.changes +++ b/libcap-ng-python.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Sun Feb 12 17:25:23 UTC 2012 - crrodriguez@opensuse.org + +- Move libraries back to %{_libdir}, /usr merge project + +------------------------------------------------------------------- +Wed Oct 5 15:06:00 UTC 2011 - uli@suse.com + +- cross-build workaround: make sure no attempt is made to build + python stuff even if it's installed on the host system + ------------------------------------------------------------------- Wed Aug 31 01:49:59 UTC 2011 - crrodriguez@opensuse.org diff --git a/libcap-ng-python.spec b/libcap-ng-python.spec index 554b12f..e1eb1fa 100644 --- a/libcap-ng-python.spec +++ b/libcap-ng-python.spec @@ -1,7 +1,7 @@ # # spec file for package libcap-ng-python # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 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 @@ -20,14 +20,14 @@ %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} Summary: An alternate POSIX capabilities library +License: LGPL-2.1+ +Group: System/Libraries Name: libcap-ng-python Version: 0.6.6 -Release: 1 +Release: 0 %define soname 0 %define rname libcap-ng -License: LGPLv2+ -Group: System/Libraries Url: http://people.redhat.com/sgrubb/libcap-ng # http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz Source0: libcap-ng-%{version}.tar.bz2 @@ -36,7 +36,9 @@ Source2: baselibs.conf Source99: libcap-ng.rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: kernel-headers >= 2.6.11 -BuildRequires: libattr-devel pkg-config python-base +BuildRequires: libattr-devel +BuildRequires: pkg-config +BuildRequires: python-base %description Libcap-ng is a library that makes using posix capabilities easier @@ -46,7 +48,7 @@ Libcap-ng is a library that makes using posix capabilities easier %package -n %{name}%{soname} Summary: An alternate POSIX capabilities library -License: LGPLv2+ +License: LGPL-2.1+ Group: System/Libraries %description -n %{name}%{soname} @@ -55,7 +57,7 @@ Libcap-ng is a library that makes using posix capabilities easier %package devel Summary: Header files for libcap-ng library -License: LGPLv2+ +License: LGPL-2.1+ Group: Development/Libraries/C and C++ Requires: kernel-headers >= 2.6.11 Requires: %{name}%{soname} = %{version} @@ -68,7 +70,7 @@ applications that need to use the libcap-ng library. %package utils Summary: Utilities for analysing and setting file capabilities -License: GPLv2+ +License: GPL-2.0+ Group: System/Base %description utils @@ -80,9 +82,10 @@ lets you set the file system based capabilities. %package -n python-capng Summary: Python bindings for libcap-ng library -License: LGPLv2+ +License: LGPL-2.1+ Group: Development/Libraries/Python -BuildRequires: python-devel swig +BuildRequires: python-devel +BuildRequires: swig Requires: %{rname}%{soname} = %{version} %py_requires @@ -96,36 +99,23 @@ and can be used by python applications. %setup -q -n %{rname}-%{version} %build -%configure --libdir="/%{_lib}" +%configure --disable-static --with-pic --with-python=yes %__make %{?_smp_mflags} %install %__make DESTDIR="%{buildroot}" install -# Move the symlink -%__rm -f "%{buildroot}/%{_lib}/%{rname}.so" -%__mkdir_p "%{buildroot}%{_libdir}" -VLIBNAME=$(/bin/ls -1 "%{buildroot}/%{_lib}/%{rname}.so".*.*.*) -[ -n "$VLIBNAME" ] || { echo "ERROR: failed to find %{buildroot}/%{_lib}/%{rname}.so.*.*.*" >&2; exit 1; } -LIBNAME=$(basename "$VLIBNAME") -%__ln_s "../../%{_lib}/$LIBNAME" "%{buildroot}%{_libdir}/%{rname}.so" - -# Move the pkgconfig file -%__install -d "%{buildroot}%{_libdir}" -%__mv "%{buildroot}/%{_lib}/pkgconfig" "%{buildroot}%{_libdir}/pkgconfig" - # Remove a couple things so they don't get picked up -%__rm -f "%{buildroot}/%{_lib}/%{rname}".{a,la} -%__rm -f "%{buildroot}%{python_sitearch}/_capng".{a,la} +find %{buildroot} -type f -name "*.la" -print -delete %if "%{name}" == "%{rname}-python" -%__rm -f %{buildroot}/%{_lib}/lib*.so* -%__rm -f %{buildroot}/%{_libdir}/lib*.so* -%__rm -rf %{buildroot}/%{_libdir}/pkgconfig -%__rm -rf %{buildroot}/%{_bindir} -%__rm -rf %{buildroot}/%{_mandir} -%__rm -rf %{buildroot}/%{_includedir} -%__rm -rf %{buildroot}/%{_datadir}/aclocal +%__rm -f %{buildroot}%{_libdir}/lib*.so* +%__rm -f %{buildroot}%{_libdir}/lib*.so* +%__rm -rf %{buildroot}%{_libdir}/pkgconfig +%__rm -rf %{buildroot}%{_bindir} +%__rm -rf %{buildroot}%{_mandir} +%__rm -rf %{buildroot}%{_includedir} +%__rm -rf %{buildroot}%{_datadir}/aclocal %endif %clean @@ -140,8 +130,8 @@ LIBNAME=$(basename "$VLIBNAME") %files -n %{name}%{soname} %defattr(-,root,root,-) %doc COPYING.LIB -%attr(0755,root,root) /%{_lib}/%{rname}.so.%{soname} -%attr(0755,root,root) /%{_lib}/%{rname}.so.%{soname}.* +%attr(0755,root,root) %{_libdir}/%{rname}.so.%{soname} +%attr(0755,root,root) %{_libdir}/%{rname}.so.%{soname}.* %files devel %defattr(-,root,root,-) diff --git a/libcap-ng.changes b/libcap-ng.changes index 1a73047..163f4b3 100644 --- a/libcap-ng.changes +++ b/libcap-ng.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Feb 12 17:24:55 UTC 2012 - crrodriguez@opensuse.org + +- Move libraries back to %{_libdir}, /usr merge project + ------------------------------------------------------------------- Wed Oct 5 15:06:00 UTC 2011 - uli@suse.com diff --git a/libcap-ng.spec b/libcap-ng.spec index 71ea481..68ebea4 100644 --- a/libcap-ng.spec +++ b/libcap-ng.spec @@ -1,7 +1,7 @@ # # spec file for package libcap-ng # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 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 @@ -20,14 +20,14 @@ %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} Summary: An alternate POSIX capabilities library +License: LGPL-2.1+ +Group: System/Libraries Name: libcap-ng Version: 0.6.6 -Release: 1 +Release: 0 %define soname 0 %define rname libcap-ng -License: LGPLv2+ -Group: System/Libraries Url: http://people.redhat.com/sgrubb/libcap-ng # http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz Source0: libcap-ng-%{version}.tar.bz2 @@ -36,7 +36,9 @@ Source2: baselibs.conf Source99: libcap-ng.rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: kernel-headers >= 2.6.11 -BuildRequires: libattr-devel pkg-config python-base +BuildRequires: libattr-devel +BuildRequires: pkg-config +BuildRequires: python-base %description Libcap-ng is a library that makes using posix capabilities easier @@ -46,7 +48,7 @@ Libcap-ng is a library that makes using posix capabilities easier %package -n %{name}%{soname} Summary: An alternate POSIX capabilities library -License: LGPLv2+ +License: LGPL-2.1+ Group: System/Libraries %description -n %{name}%{soname} @@ -55,7 +57,7 @@ Libcap-ng is a library that makes using posix capabilities easier %package devel Summary: Header files for libcap-ng library -License: LGPLv2+ +License: LGPL-2.1+ Group: Development/Libraries/C and C++ Requires: kernel-headers >= 2.6.11 Requires: %{name}%{soname} = %{version} @@ -68,7 +70,7 @@ applications that need to use the libcap-ng library. %package utils Summary: Utilities for analysing and setting file capabilities -License: GPLv2+ +License: GPL-2.0+ Group: System/Base %description utils @@ -80,9 +82,10 @@ lets you set the file system based capabilities. %package -n python-capng Summary: Python bindings for libcap-ng library -License: LGPLv2+ +License: LGPL-2.1+ Group: Development/Libraries/Python -BuildRequires: python-devel swig +BuildRequires: python-devel +BuildRequires: swig Requires: %{rname}%{soname} = %{version} %py_requires @@ -96,36 +99,23 @@ and can be used by python applications. %setup -q -n %{rname}-%{version} %build -%configure --libdir="/%{_lib}" --with-python=no +%configure --disable-static --with-pic --with-python=no %__make %{?_smp_mflags} %install %__make DESTDIR="%{buildroot}" install -# Move the symlink -%__rm -f "%{buildroot}/%{_lib}/%{rname}.so" -%__mkdir_p "%{buildroot}%{_libdir}" -VLIBNAME=$(/bin/ls -1 "%{buildroot}/%{_lib}/%{rname}.so".*.*.*) -[ -n "$VLIBNAME" ] || { echo "ERROR: failed to find %{buildroot}/%{_lib}/%{rname}.so.*.*.*" >&2; exit 1; } -LIBNAME=$(basename "$VLIBNAME") -%__ln_s "../../%{_lib}/$LIBNAME" "%{buildroot}%{_libdir}/%{rname}.so" - -# Move the pkgconfig file -%__install -d "%{buildroot}%{_libdir}" -%__mv "%{buildroot}/%{_lib}/pkgconfig" "%{buildroot}%{_libdir}/pkgconfig" - # Remove a couple things so they don't get picked up -%__rm -f "%{buildroot}/%{_lib}/%{rname}".{a,la} -%__rm -f "%{buildroot}%{python_sitearch}/_capng".{a,la} +find %{buildroot} -type f -name "*.la" -print -delete %if "%{name}" == "%{rname}-python" -%__rm -f %{buildroot}/%{_lib}/lib*.so* -%__rm -f %{buildroot}/%{_libdir}/lib*.so* -%__rm -rf %{buildroot}/%{_libdir}/pkgconfig -%__rm -rf %{buildroot}/%{_bindir} -%__rm -rf %{buildroot}/%{_mandir} -%__rm -rf %{buildroot}/%{_includedir} -%__rm -rf %{buildroot}/%{_datadir}/aclocal +%__rm -f %{buildroot}%{_libdir}/lib*.so* +%__rm -f %{buildroot}%{_libdir}/lib*.so* +%__rm -rf %{buildroot}%{_libdir}/pkgconfig +%__rm -rf %{buildroot}%{_bindir} +%__rm -rf %{buildroot}%{_mandir} +%__rm -rf %{buildroot}%{_includedir} +%__rm -rf %{buildroot}%{_datadir}/aclocal %endif %clean @@ -140,8 +130,8 @@ LIBNAME=$(basename "$VLIBNAME") %files -n %{name}%{soname} %defattr(-,root,root,-) %doc COPYING.LIB -%attr(0755,root,root) /%{_lib}/%{rname}.so.%{soname} -%attr(0755,root,root) /%{_lib}/%{rname}.so.%{soname}.* +%attr(0755,root,root) %{_libdir}/%{rname}.so.%{soname} +%attr(0755,root,root) %{_libdir}/%{rname}.so.%{soname}.* %files devel %defattr(-,root,root,-)