libcap-ng/libcap-ng-python.spec

90 lines
2.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package libcap-ng-python
#
# Copyright (c) 2023 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define sover 0
%bcond_without python2
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: libcap-ng-python
Accepting request 975729 from home:polslinux:branches:security - Update to 0.8.3: * Add vararg support to python bindings for capng_updatev * Add support for ambient capabilities * Add support for V3 filesystem capabilities * If procfs is not available, leave last_cap as CAP_LAST_CAP * If bounding and ambient not found in status, try prctl method * In capng_apply, move ambient caps to the end of the transaction * In capng_apply, return errors more aggressively. * In capng_apply, if the action includes the bounding set,resync with the kernel * Fix signed/unsigned warning in cap-ng.c * In capng_apply, return a unique error code to diagnose any failure * In capng_have_capability, return 0 for failure * Add the libdrop_ambient admin tool * In capng_apply, if we blew up in bounding set, allow setting capabilities * If PR_CAP_AMBIENT is not available, do not build libdrop_ambient * Improve last_cap check * Fix parameters to capng_updatev python bindings to be signed * Detect capability options at runtime to make containerization easier (ntkme) * Initialize the library when linked statically * Add gcc function attributes for deallocation - Update to 0.8.3: * Add vararg support to python bindings for capng_updatev * Add support for ambient capabilities * Add support for V3 filesystem capabilities * If procfs is not available, leave last_cap as CAP_LAST_CAP * If bounding and ambient not found in status, try prctl method * In capng_apply, move ambient caps to the end of the transaction * In capng_apply, return errors more aggressively. * In capng_apply, if the action includes the bounding set,resync with the kernel OBS-URL: https://build.opensuse.org/request/show/975729 OBS-URL: https://build.opensuse.org/package/show/security/libcap-ng?expand=0&rev=40
2022-05-16 10:32:13 +02:00
Version: 0.8.3
Release: 0
Summary: An alternate Linux/POSIX capabilities library
License: LGPL-2.1-or-later
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
Source99: libcap-ng.rpmlintrc
BuildRequires: %{python_module devel}
BuildRequires: kernel-headers >= 2.6.11
BuildRequires: libcap-ng-devel = %{version}
BuildRequires: pkgconfig
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 python2-capng
Summary: Python bindings for libcap-ng library
Group: Development/Libraries/Python
Requires: libcap-ng%{sover} = %{version}
%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 \
%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
%if %{with python2}
%files -n python2-capng
%{python2_sitearch}/*
%endif
%files -n python3-capng
%{python3_sitearch}/*
%changelog