3
0
forked from pool/libcap-ng

Accepting request 578311 from security

- Switch to singlespec approach to allow building of python3
  bindings

- Remove ineffective --with-pic. Fix SRPM group. Redo descriptions.
- Rename %soname to %sover to better reflect its use.

- 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

- Move %doc to %license for licenses

- Remove ineffective --with-pic. Fix SRPM group. Redo descriptions.
- Rename %soname to %sover to better reflect its use.

- 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/578311
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libcap-ng?expand=0&rev=27
This commit is contained in:
Dominique Leuenberger 2018-02-23 14:28:00 +00:00 committed by Git OBS Bridge
commit 85db1c551e
6 changed files with 118 additions and 60 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c21af997445cd4107a55d386f955c5ea6f6e96ead693e9151277c0ab5f97d05f
size 447946

3
libcap-ng-0.7.9.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4a1532bcf3731aade40936f6d6a586ed5a66ca4c7455e1338d1f6c3e09221328
size 449038

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
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
- 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
- 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 Thu May 17 16:46:07 UTC 2017 - alexander_naumov@opensuse.org

View File

@ -1,7 +1,7 @@
# #
# spec file for package libcap-ng-python # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,37 +16,49 @@
# #
%define soname 0 %define sover 0
%bcond_without python2
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: libcap-ng-python Name: libcap-ng-python
Version: 0.7.8 Version: 0.7.9
Release: 0 Release: 0
Summary: An alternate POSIX capabilities library Summary: An alternate Linux/POSIX capabilities library
License: LGPL-2.1+ License: LGPL-2.1+
Group: System/Libraries Group: Development/Libraries/C and C++
Url: http://people.redhat.com/sgrubb/libcap-ng Url: https://people.redhat.com/sgrubb/libcap-ng
Source0: http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz Source0: https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz
Source1: baselibs.conf Source1: baselibs.conf
Source99: libcap-ng.rpmlintrc Source99: libcap-ng.rpmlintrc
BuildRequires: %{python_module devel}
BuildRequires: kernel-headers >= 2.6.11 BuildRequires: kernel-headers >= 2.6.11
BuildRequires: pkg-config BuildRequires: libcap-ng-devel = %{version}
BuildRequires: python-base BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-rpm-macros
BuildRequires: swig
%description %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 %package -n python2-capng
Summary: Python bindings for libcap-ng library Summary: Python bindings for libcap-ng library
Group: Development/Libraries/Python Group: Development/Libraries/Python
BuildRequires: libcap-ng-devel = %{version} Requires: libcap-ng%{sover} = %{version}
BuildRequires: python-devel
BuildRequires: swig
Requires: libcap-ng%{soname} = %{version}
%{py_requires}
%description -n python-capng %description -n python2-capng
The libcap-ng-python package contains the bindings so that libcap-ng 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.
%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 %prep
%setup -q -n libcap-ng-%{version} %setup -q -n libcap-ng-%{version}
@ -54,18 +66,25 @@ and can be used by python applications.
%build %build
%configure \ %configure \
--disable-static \ --disable-static \
--with-pic \ %if %{with python2}
--with-python \ --with-python \
--without-python3 %endif
--with-python3
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
make DESTDIR=%{buildroot} install %{?_smp_mflags} -C bindings/python %if %{with python2}
%make_install -C bindings/python
%endif
%make_install -C bindings/python3
find %{buildroot} -type f -name "*.la" -delete -print find %{buildroot} -type f -name "*.la" -delete -print
%files -n python-capng %if %{with python2}
%defattr(-,root,root,-) %files -n python2-capng
%{python_sitearch}/_capng.so %{python2_sitearch}/*
%{python_sitearch}/capng.py* %endif
%files -n python3-capng
%{python3_sitearch}/*
%changelog %changelog

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
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
- 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
- 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 Thu May 17 16:46:07 UTC 2017 - alexander_naumov@opensuse.org

View File

@ -1,7 +1,7 @@
# #
# spec file for package libcap-ng # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,37 +16,39 @@
# #
%define soname 0 %define sover 0
Name: libcap-ng Name: libcap-ng
Version: 0.7.8 Version: 0.7.9
Release: 0 Release: 0
Summary: An alternate POSIX capabilities library Summary: An alternate Linux/POSIX capabilities library
License: LGPL-2.1+ License: LGPL-2.1+
Group: System/Libraries Group: Development/Libraries/C and C++
Url: http://people.redhat.com/sgrubb/libcap-ng Url: https://people.redhat.com/sgrubb/libcap-ng
Source0: http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz Source0: https://people.redhat.com/sgrubb/%{name}/%{name}-%{version}.tar.gz
Source1: baselibs.conf Source1: baselibs.conf
Source99: libcap-ng.rpmlintrc Source99: libcap-ng.rpmlintrc
BuildRequires: kernel-headers >= 2.6.11 BuildRequires: kernel-headers >= 2.6.11
BuildRequires: pkg-config BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %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} %package -n %{name}%{sover}
Summary: An alternate POSIX capabilities library Summary: An alternate Linux/POSIX capabilities library
License: LGPL-2.1+ License: LGPL-2.1+
Group: System/Libraries Group: System/Libraries
%description -n %{name}%{soname} %description -n %{name}%{sover}
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 devel %package devel
Summary: Header files for libcap-ng library Summary: Header files for the libcap-ng library
License: LGPL-2.1+ License: LGPL-2.1+
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %{name}%{soname} = %{version} Requires: %{name}%{sover} = %{version}
Requires: kernel-headers >= 2.6.11 Requires: kernel-headers >= 2.6.11
Requires: pkgconfig Requires: pkgconfig
@ -61,8 +63,8 @@ Group: System/Base
%description utils %description utils
The libcap-ng-utils package contains applications to analyse the The libcap-ng-utils package contains applications to analyse the
posix capabilities of all the program running on a system. It also Linux process capabilities of programs running on a system. It also
lets you set the file system based capabilities. lets you set the filesystem-based capabilities.
%prep %prep
%setup -q %setup -q
@ -70,26 +72,22 @@ lets you set the file system based capabilities.
%build %build
%configure \ %configure \
--disable-static \ --disable-static \
--with-pic \
--without-python --without-python
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
make DESTDIR=%{buildroot} install %{?_smp_mflags} %make_install
find %{buildroot} -type f -name "*.la" -delete -print find %{buildroot} -type f -name "*.la" -delete -print
%post -n %{name}%{soname} -p /sbin/ldconfig %post -n %{name}%{sover} -p /sbin/ldconfig
%postun -n %{name}%{sover} -p /sbin/ldconfig
%postun -n %{name}%{soname} -p /sbin/ldconfig %files -n %{name}%{sover}
%license COPYING.LIB
%files -n %{name}%{soname} %{_libdir}/%{name}.so.%{sover}
%defattr(-,root,root,-) %{_libdir}/%{name}.so.%{sover}.*
%doc COPYING.LIB
%{_libdir}/%{name}.so.%{soname}
%{_libdir}/%{name}.so.%{soname}.*
%files devel %files devel
%defattr(-,root,root,-)
%{_mandir}/man3/*.3%{ext_man} %{_mandir}/man3/*.3%{ext_man}
%{_includedir}/cap-ng.h %{_includedir}/cap-ng.h
%{_libdir}/%{name}.so %{_libdir}/%{name}.so
@ -97,8 +95,7 @@ find %{buildroot} -type f -name "*.la" -delete -print
%{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/%{name}.pc
%files utils %files utils
%defattr(-,root,root,-) %license COPYING
%doc COPYING
%{_bindir}/captest %{_bindir}/captest
%{_bindir}/filecap %{_bindir}/filecap
%{_bindir}/netcap %{_bindir}/netcap