fix python testsuite failing on rawhide due to CAP_LAST_CAP
Clamp CAP_LAST_CAP at /proc/sys/kernel/cap_last_cap's value in the Python bindings test if possible, otherwise use the value from <linux/capability.h> since the kernel now has 37 capabilities upstream, but our builders are not that up to date.
This commit is contained in:
parent
ee5f3f46c5
commit
f01cb9a3ea
14
libcap-ng-check-proc-python.patch
Normal file
14
libcap-ng-check-proc-python.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -Nur libcap-ng-0.7.4/bindings/python/test/capng-test.py libcap-ng-0.7.4-2/bindings/python/test/capng-test.py
|
||||
--- libcap-ng-0.7.4/bindings/python/test/capng-test.py 2014-04-24 08:41:44.000000000 -0400
|
||||
+++ libcap-ng-0.7.4-2/bindings/python/test/capng-test.py 2014-06-23 13:25:20.113624203 -0400
|
||||
@@ -8,7 +8,10 @@
|
||||
sys.path.insert(0, load_path)
|
||||
|
||||
import capng
|
||||
+
|
||||
last = capng.CAP_LAST_CAP
|
||||
+with open('/proc/sys/kernel/cap_last_cap', 'r') as f:
|
||||
+ last = int(f.readline())
|
||||
|
||||
print("Doing basic bit tests...")
|
||||
capng.capng_clear(capng.CAPNG_SELECT_BOTH)
|
@ -8,6 +8,7 @@ License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://people.redhat.com/sgrubb/libcap-ng
|
||||
Source0: http://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
|
||||
Patch0: libcap-ng-check-proc-python.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: kernel-headers >= 2.6.11
|
||||
|
||||
@ -50,6 +51,7 @@ lets you set the file system based capabilities.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .proc~
|
||||
|
||||
%build
|
||||
%configure --libdir=/%{_lib}
|
||||
@ -111,6 +113,12 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%attr(0644,root,root) %{_mandir}/man8/*
|
||||
|
||||
%changelog
|
||||
* Mon Jun 23 2014 Kyle McMartin <kyle@redhat.com>
|
||||
- Clamp CAP_LAST_CAP at /proc/sys/kernel/cap_last_cap's value in the
|
||||
Python bindings test if possible, otherwise use the value from
|
||||
<linux/capability.h> since the kernel now has 37 capabilities upstream,
|
||||
but our builders are not that up to date.
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user