From 5be9e32e9a409f2a4071761a7543ff78c2892fb9254e6d7ea860ad99520c1139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sun, 18 Feb 2018 09:52:15 +0000 Subject: [PATCH 1/3] Accepting request 577712 from home:avindra - Update to version 0.7.9: * Fix byte compiling python3 bindings * Rework spec file to show new python2/3 separation - cleanup with spec-cleaner - use https urls - Update to version 0.7.9: * Detect and output a couple errors in filecap * Use pthread_atfork to optionally reset the pid and related info on fork - cleanup with spec-cleaner - use https urls OBS-URL: https://build.opensuse.org/request/show/577712 OBS-URL: https://build.opensuse.org/package/show/security/libcap-ng?expand=0&rev=31 --- libcap-ng-0.7.8.tar.gz | 3 --- libcap-ng-0.7.9.tar.gz | 3 +++ libcap-ng-python.changes | 9 +++++++++ libcap-ng-python.spec | 15 ++++++--------- libcap-ng.changes | 10 ++++++++++ libcap-ng.spec | 17 ++++++----------- 6 files changed, 34 insertions(+), 23 deletions(-) delete mode 100644 libcap-ng-0.7.8.tar.gz create mode 100644 libcap-ng-0.7.9.tar.gz diff --git a/libcap-ng-0.7.8.tar.gz b/libcap-ng-0.7.8.tar.gz deleted file mode 100644 index fa69458..0000000 --- a/libcap-ng-0.7.8.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c21af997445cd4107a55d386f955c5ea6f6e96ead693e9151277c0ab5f97d05f -size 447946 diff --git a/libcap-ng-0.7.9.tar.gz b/libcap-ng-0.7.9.tar.gz new file mode 100644 index 0000000..bab598e --- /dev/null +++ b/libcap-ng-0.7.9.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a1532bcf3731aade40936f6d6a586ed5a66ca4c7455e1338d1f6c3e09221328 +size 449038 diff --git a/libcap-ng-python.changes b/libcap-ng-python.changes index c15b6ae..448f8f8 100644 --- a/libcap-ng-python.changes +++ b/libcap-ng-python.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sun Feb 18 09:22:44 UTC 2018 - avindra@opensuse.org + +- Update to version 0.7.9: + * Fix byte compiling python3 bindings + * Rework spec file to show new python2/3 separation +- cleanup with spec-cleaner +- use https urls + ------------------------------------------------------------------- Thu May 17 16:46:07 UTC 2017 - alexander_naumov@opensuse.org diff --git a/libcap-ng-python.spec b/libcap-ng-python.spec index 2296d61..013ac6a 100644 --- a/libcap-ng-python.spec +++ b/libcap-ng-python.spec @@ -1,7 +1,7 @@ # # spec file for package libcap-ng-python # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,19 +18,18 @@ %define soname 0 Name: libcap-ng-python -Version: 0.7.8 +Version: 0.7.9 Release: 0 Summary: An alternate POSIX capabilities library License: LGPL-2.1+ Group: System/Libraries -Url: http://people.redhat.com/sgrubb/libcap-ng -Source0: http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz +Url: https://people.redhat.com/sgrubb/libcap-ng +Source0: https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz Source1: baselibs.conf Source99: libcap-ng.rpmlintrc BuildRequires: kernel-headers >= 2.6.11 -BuildRequires: pkg-config +BuildRequires: pkgconfig BuildRequires: python-base -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Libcap-ng is a library that makes using posix capabilities easier @@ -42,7 +41,6 @@ BuildRequires: libcap-ng-devel = %{version} BuildRequires: python-devel BuildRequires: swig Requires: libcap-ng%{soname} = %{version} -%{py_requires} %description -n python-capng The libcap-ng-python package contains the bindings so that libcap-ng @@ -60,11 +58,10 @@ and can be used by python applications. make %{?_smp_mflags} %install -make DESTDIR=%{buildroot} install %{?_smp_mflags} -C bindings/python +%make_install -C bindings/python find %{buildroot} -type f -name "*.la" -delete -print %files -n python-capng -%defattr(-,root,root,-) %{python_sitearch}/_capng.so %{python_sitearch}/capng.py* diff --git a/libcap-ng.changes b/libcap-ng.changes index 4e72272..e377a4e 100644 --- a/libcap-ng.changes +++ b/libcap-ng.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sun Feb 18 09:23:18 UTC 2018 - avindra@opensuse.org + +- Update to version 0.7.9: + * Detect and output a couple errors in filecap + * Use pthread_atfork to optionally reset the pid and related info + on fork +- cleanup with spec-cleaner +- use https urls + ------------------------------------------------------------------- Thu May 17 16:46:07 UTC 2017 - alexander_naumov@opensuse.org diff --git a/libcap-ng.spec b/libcap-ng.spec index a61be3f..13db3ad 100644 --- a/libcap-ng.spec +++ b/libcap-ng.spec @@ -1,7 +1,7 @@ # # spec file for package libcap-ng # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,18 +18,17 @@ %define soname 0 Name: libcap-ng -Version: 0.7.8 +Version: 0.7.9 Release: 0 Summary: An alternate POSIX capabilities library License: LGPL-2.1+ Group: System/Libraries -Url: http://people.redhat.com/sgrubb/libcap-ng -Source0: http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz +Url: https://people.redhat.com/sgrubb/libcap-ng +Source0: https://people.redhat.com/sgrubb/%{name}/%{name}-%{version}.tar.gz Source1: baselibs.conf Source99: libcap-ng.rpmlintrc BuildRequires: kernel-headers >= 2.6.11 -BuildRequires: pkg-config -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: pkgconfig %description Libcap-ng is a library that makes using posix capabilities easier @@ -75,21 +74,18 @@ lets you set the file system based capabilities. make %{?_smp_mflags} %install -make DESTDIR=%{buildroot} install %{?_smp_mflags} +%make_install find %{buildroot} -type f -name "*.la" -delete -print %post -n %{name}%{soname} -p /sbin/ldconfig - %postun -n %{name}%{soname} -p /sbin/ldconfig %files -n %{name}%{soname} -%defattr(-,root,root,-) %doc COPYING.LIB %{_libdir}/%{name}.so.%{soname} %{_libdir}/%{name}.so.%{soname}.* %files devel -%defattr(-,root,root,-) %{_mandir}/man3/*.3%{ext_man} %{_includedir}/cap-ng.h %{_libdir}/%{name}.so @@ -97,7 +93,6 @@ find %{buildroot} -type f -name "*.la" -delete -print %{_libdir}/pkgconfig/%{name}.pc %files utils -%defattr(-,root,root,-) %doc COPYING %{_bindir}/captest %{_bindir}/filecap From 39c582e8eacc38d8180301ee5d6c44c51223eb484b7ad1895e4ae1f1c72069a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 19 Feb 2018 08:04:27 +0000 Subject: [PATCH 2/3] Accepting request 577735 from home:jengelh:branches:security - Remove ineffective --with-pic. Fix SRPM group. Redo descriptions. - Rename %soname to %sover to better reflect its use. OBS-URL: https://build.opensuse.org/request/show/577735 OBS-URL: https://build.opensuse.org/package/show/security/libcap-ng?expand=0&rev=32 --- libcap-ng-python.changes | 6 ++++++ libcap-ng-python.spec | 15 ++++++++------- libcap-ng.changes | 6 ++++++ libcap-ng.spec | 38 ++++++++++++++++++++------------------ 4 files changed, 40 insertions(+), 25 deletions(-) diff --git a/libcap-ng-python.changes b/libcap-ng-python.changes index 448f8f8..3c8ed56 100644 --- a/libcap-ng-python.changes +++ b/libcap-ng-python.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Feb 18 12:13:56 UTC 2018 - jengelh@inai.de + +- Remove ineffective --with-pic. Fix SRPM group. Redo descriptions. +- Rename %soname to %sover to better reflect its use. + ------------------------------------------------------------------- Sun Feb 18 09:22:44 UTC 2018 - avindra@opensuse.org diff --git a/libcap-ng-python.spec b/libcap-ng-python.spec index 013ac6a..af11b08 100644 --- a/libcap-ng-python.spec +++ b/libcap-ng-python.spec @@ -16,13 +16,13 @@ # -%define soname 0 +%define sover 0 Name: libcap-ng-python Version: 0.7.9 Release: 0 -Summary: An alternate POSIX capabilities library +Summary: An alternate Linux/POSIX capabilities library License: LGPL-2.1+ -Group: System/Libraries +Group: Development/Libraries/C and C++ Url: https://people.redhat.com/sgrubb/libcap-ng Source0: https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz Source1: baselibs.conf @@ -32,7 +32,9 @@ BuildRequires: pkgconfig BuildRequires: python-base %description -Libcap-ng is a library that makes using posix capabilities easier +libcap-ng is a library providing an alternate mechanism to libcap to +inspect and set Linux process and file capabilities (modeled upon a +withdrawn POSIX.1e draft). %package -n python-capng Summary: Python bindings for libcap-ng library @@ -40,11 +42,11 @@ Group: Development/Libraries/Python BuildRequires: libcap-ng-devel = %{version} BuildRequires: python-devel BuildRequires: swig -Requires: libcap-ng%{soname} = %{version} +Requires: libcap-ng%{sover} = %{version} %description -n python-capng The libcap-ng-python package contains the bindings so that libcap-ng -and can be used by python applications. +and can be used by Python applications. %prep %setup -q -n libcap-ng-%{version} @@ -52,7 +54,6 @@ and can be used by python applications. %build %configure \ --disable-static \ - --with-pic \ --with-python \ --without-python3 make %{?_smp_mflags} diff --git a/libcap-ng.changes b/libcap-ng.changes index e377a4e..aaf9e88 100644 --- a/libcap-ng.changes +++ b/libcap-ng.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Feb 18 12:13:56 UTC 2018 - jengelh@inai.de + +- Remove ineffective --with-pic. Fix SRPM group. Redo descriptions. +- Rename %soname to %sover to better reflect its use. + ------------------------------------------------------------------- Sun Feb 18 09:23:18 UTC 2018 - avindra@opensuse.org diff --git a/libcap-ng.spec b/libcap-ng.spec index 13db3ad..43211a8 100644 --- a/libcap-ng.spec +++ b/libcap-ng.spec @@ -16,13 +16,13 @@ # -%define soname 0 +%define sover 0 Name: libcap-ng Version: 0.7.9 Release: 0 -Summary: An alternate POSIX capabilities library +Summary: An alternate Linux/POSIX capabilities library License: LGPL-2.1+ -Group: System/Libraries +Group: Development/Libraries/C and C++ Url: https://people.redhat.com/sgrubb/libcap-ng Source0: https://people.redhat.com/sgrubb/%{name}/%{name}-%{version}.tar.gz Source1: baselibs.conf @@ -31,21 +31,24 @@ BuildRequires: kernel-headers >= 2.6.11 BuildRequires: pkgconfig %description -Libcap-ng is a library that makes using posix capabilities easier +libcap-ng is a library providing an alternate mechanism to libcap to +make use of Linux process and file capabilities. -%package -n %{name}%{soname} -Summary: An alternate POSIX capabilities library +%package -n %{name}%{sover} +Summary: An alternate Linux/POSIX capabilities library License: LGPL-2.1+ Group: System/Libraries -%description -n %{name}%{soname} -Libcap-ng is a library that makes using posix capabilities easier +%description -n %{name}%{sover} +libcap-ng is a library providing an alternate mechanism to libcap to +inspect and set Linux process and file capabilities (modeled upon a +withdrawn POSIX.1e draft). %package devel -Summary: Header files for libcap-ng library +Summary: Header files for the libcap-ng library License: LGPL-2.1+ Group: Development/Libraries/C and C++ -Requires: %{name}%{soname} = %{version} +Requires: %{name}%{sover} = %{version} Requires: kernel-headers >= 2.6.11 Requires: pkgconfig @@ -60,8 +63,8 @@ Group: System/Base %description utils The libcap-ng-utils package contains applications to analyse the -posix capabilities of all the program running on a system. It also -lets you set the file system based capabilities. +Linux process capabilities of programs running on a system. It also +lets you set the filesystem-based capabilities. %prep %setup -q @@ -69,7 +72,6 @@ lets you set the file system based capabilities. %build %configure \ --disable-static \ - --with-pic \ --without-python make %{?_smp_mflags} @@ -77,13 +79,13 @@ make %{?_smp_mflags} %make_install find %{buildroot} -type f -name "*.la" -delete -print -%post -n %{name}%{soname} -p /sbin/ldconfig -%postun -n %{name}%{soname} -p /sbin/ldconfig +%post -n %{name}%{sover} -p /sbin/ldconfig +%postun -n %{name}%{sover} -p /sbin/ldconfig -%files -n %{name}%{soname} +%files -n %{name}%{sover} %doc COPYING.LIB -%{_libdir}/%{name}.so.%{soname} -%{_libdir}/%{name}.so.%{soname}.* +%{_libdir}/%{name}.so.%{sover} +%{_libdir}/%{name}.so.%{sover}.* %files devel %{_mandir}/man3/*.3%{ext_man} From f2bbc472516e1a208031d4acd4f51cfb4c4afb4aa4960ff6ac5743025869525f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 20 Feb 2018 10:29:37 +0000 Subject: [PATCH 3/3] - Switch to singlespec approach to allow building of python3 bindings - Move %doc to %license for licenses OBS-URL: https://build.opensuse.org/package/show/security/libcap-ng?expand=0&rev=33 --- libcap-ng-python.changes | 6 ++++++ libcap-ng-python.spec | 41 ++++++++++++++++++++++++++++++---------- libcap-ng.changes | 5 +++++ libcap-ng.spec | 4 ++-- 4 files changed, 44 insertions(+), 12 deletions(-) diff --git a/libcap-ng-python.changes b/libcap-ng-python.changes index 3c8ed56..3881aa2 100644 --- a/libcap-ng-python.changes +++ b/libcap-ng-python.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 20 10:28:46 UTC 2018 - tchvatal@suse.com + +- Switch to singlespec approach to allow building of python3 + bindings + ------------------------------------------------------------------- Sun Feb 18 12:13:56 UTC 2018 - jengelh@inai.de diff --git a/libcap-ng-python.spec b/libcap-ng-python.spec index af11b08..7453367 100644 --- a/libcap-ng-python.spec +++ b/libcap-ng-python.spec @@ -17,6 +17,8 @@ %define sover 0 +%bcond_without python2 +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: libcap-ng-python Version: 0.7.9 Release: 0 @@ -27,43 +29,62 @@ Url: https://people.redhat.com/sgrubb/libcap-ng Source0: https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz Source1: baselibs.conf Source99: libcap-ng.rpmlintrc +BuildRequires: %{python_module devel} BuildRequires: kernel-headers >= 2.6.11 +BuildRequires: libcap-ng-devel = %{version} BuildRequires: pkgconfig -BuildRequires: python-base +BuildRequires: python-rpm-macros +BuildRequires: swig %description libcap-ng is a library providing an alternate mechanism to libcap to inspect and set Linux process and file capabilities (modeled upon a withdrawn POSIX.1e draft). -%package -n python-capng +%package -n python2-capng Summary: Python bindings for libcap-ng library Group: Development/Libraries/Python -BuildRequires: libcap-ng-devel = %{version} -BuildRequires: python-devel -BuildRequires: swig Requires: libcap-ng%{sover} = %{version} -%description -n python-capng +%description -n python2-capng The libcap-ng-python package contains the bindings so that libcap-ng and can be used by Python applications. +%package -n python3-capng +Summary: Python bindings for libcap-ng library +Group: Development/Libraries/Python +Requires: libcap-ng%{sover} = %{version} + +%description -n python3-capng +The libcap-ng-python package contains the bindings so that libcap-ng +and can be used by Python applications. + + %prep %setup -q -n libcap-ng-%{version} %build %configure \ --disable-static \ +%if %{with python2} --with-python \ - --without-python3 +%endif + --with-python3 make %{?_smp_mflags} %install +%if %{with python2} %make_install -C bindings/python +%endif +%make_install -C bindings/python3 find %{buildroot} -type f -name "*.la" -delete -print -%files -n python-capng -%{python_sitearch}/_capng.so -%{python_sitearch}/capng.py* +%if %{with python2} +%files -n python2-capng +%{python2_sitearch}/* +%endif + +%files -n python3-capng +%{python3_sitearch}/* %changelog diff --git a/libcap-ng.changes b/libcap-ng.changes index aaf9e88..5f2020e 100644 --- a/libcap-ng.changes +++ b/libcap-ng.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 20 10:16:07 UTC 2018 - tchvatal@suse.com + +- Move %doc to %license for licenses + ------------------------------------------------------------------- Sun Feb 18 12:13:56 UTC 2018 - jengelh@inai.de diff --git a/libcap-ng.spec b/libcap-ng.spec index 43211a8..fcfcf83 100644 --- a/libcap-ng.spec +++ b/libcap-ng.spec @@ -83,7 +83,7 @@ find %{buildroot} -type f -name "*.la" -delete -print %postun -n %{name}%{sover} -p /sbin/ldconfig %files -n %{name}%{sover} -%doc COPYING.LIB +%license COPYING.LIB %{_libdir}/%{name}.so.%{sover} %{_libdir}/%{name}.so.%{sover}.* @@ -95,7 +95,7 @@ find %{buildroot} -type f -name "*.la" -delete -print %{_libdir}/pkgconfig/%{name}.pc %files utils -%doc COPYING +%license COPYING %{_bindir}/captest %{_bindir}/filecap %{_bindir}/netcap