Hello community, here is the log from the commit of package libcap-ng for openSUSE:Factory checked in at 2015-12-13 09:34:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libcap-ng (Old) and /work/SRC/openSUSE:Factory/.libcap-ng.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libcap-ng" Changes: -------- --- /work/SRC/openSUSE:Factory/libcap-ng/libcap-ng-python.changes 2014-05-17 06:43:23.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libcap-ng.new/libcap-ng-python.changes 2015-12-13 09:34:28.000000000 +0100 @@ -1,0 +2,20 @@ +Mon Dec 7 14:31:06 UTC 2015 - [email protected] + +- Fix build by passing --without-python3 argument. For now we are + fine with py2 bindings only + +------------------------------------------------------------------- +Wed Dec 2 14:29:55 UTC 2015 - [email protected] + +- Update to version 0.7.7 + * Make sure all types used in _lnode are defined in proc-llist.h + * Fix python binding test for old kernels + * Fix leaked FD in library init +- Changes from version 0.7.6 + * Fix python3 support +- Changes from version 0.7.5 + * Make python3 supported + * In python bindings test, clamp CAP_LAST_CAP with /proc/.../cap_last_cap + * Update table for 3.16 kernel + +------------------------------------------------------------------- --- /work/SRC/openSUSE:Factory/libcap-ng/libcap-ng.changes 2014-06-24 15:15:41.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libcap-ng.new/libcap-ng.changes 2015-12-13 09:34:28.000000000 +0100 @@ -1,0 +2,14 @@ +Wed Dec 2 14:28:00 UTC 2015 - [email protected] + +- Update to version 0.7.7 + * Make sure all types used in _lnode are defined in proc-llist.h + * Fix python binding test for old kernels + * Fix leaked FD in library init +- Changes from version 0.7.6 + * Fix python3 support +- Changes from version 0.7.5 + * Make python3 supported + * In python bindings test, clamp CAP_LAST_CAP with /proc/.../cap_last_cap + * Update table for 3.16 kernel + +------------------------------------------------------------------- Old: ---- libcap-ng-0.7.4.tar.gz New: ---- libcap-ng-0.7.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libcap-ng-python.spec ++++++ --- /var/tmp/diff_new_pack.UkTxTb/_old 2015-12-13 09:34:29.000000000 +0100 +++ /var/tmp/diff_new_pack.UkTxTb/_new 2015-12-13 09:34:29.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package libcap-ng-python # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 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,7 +18,7 @@ %define soname 0 Name: libcap-ng-python -Version: 0.7.4 +Version: 0.7.7 Release: 0 Summary: An alternate POSIX capabilities library License: LGPL-2.1+ @@ -55,7 +55,8 @@ %configure \ --disable-static \ --with-pic \ - --with-python + --with-python \ + --without-python3 make %{?_smp_mflags} %install ++++++ libcap-ng.spec ++++++ --- /var/tmp/diff_new_pack.UkTxTb/_old 2015-12-13 09:34:29.000000000 +0100 +++ /var/tmp/diff_new_pack.UkTxTb/_new 2015-12-13 09:34:29.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package libcap-ng # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 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,7 +18,7 @@ %define soname 0 Name: libcap-ng -Version: 0.7.4 +Version: 0.7.7 Release: 0 Summary: An alternate POSIX capabilities library License: LGPL-2.1+ ++++++ libcap-ng-0.7.4.tar.gz -> libcap-ng-0.7.7.tar.gz ++++++ ++++ 4595 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/ChangeLog new/libcap-ng-0.7.7/ChangeLog --- old/libcap-ng-0.7.4/ChangeLog 2014-04-24 14:41:44.000000000 +0200 +++ new/libcap-ng-0.7.7/ChangeLog 2015-05-13 22:41:06.000000000 +0200 @@ -1,3 +1,16 @@ +0.7.7 +- Make sure all types used in _lnode are defined in proc-llist.h +- Fix python binding test for old kernels +- Fix leaked FD in library init + +0.7.6 +- Fix python3 support + +0.7.5 +- Make python3 supported +- In python bindings test, clamp CAP_LAST_CAP with /proc/.../cap_last_cap +- Update table for 3.16 kernel + 0.7.4 - In pscap, remove unused code - Add CAPNG_INIT_SUPP_GRP to capng_change_id diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/INSTALL new/libcap-ng-0.7.7/INSTALL --- old/libcap-ng-0.7.4/INSTALL 2014-04-24 14:41:51.000000000 +0200 +++ new/libcap-ng-0.7.7/INSTALL 2015-05-13 22:41:13.000000000 +0200 @@ -12,8 +12,8 @@ Basic Installation ================== - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following + Briefly, the shell command `./configure && make && make install' +should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/bindings/Makefile.am new/libcap-ng-0.7.7/bindings/Makefile.am --- old/libcap-ng-0.7.4/bindings/Makefile.am 2014-04-24 14:41:44.000000000 +0200 +++ new/libcap-ng-0.7.7/bindings/Makefile.am 2015-05-13 22:41:07.000000000 +0200 @@ -1,5 +1,5 @@ # Makefile.am -- -# Copyright 2009 Red Hat Inc., Durham, North Carolina. +# Copyright 2009,2015 Red Hat Inc., Durham, North Carolina. # All Rights Reserved. # # This library is free software; you can redistribute it and/or @@ -21,9 +21,11 @@ # CONFIG_CLEAN_FILES = *.loT *.rej *.orig -SUBDIRS = +SUBDIRS = src if HAVE_PYTHON SUBDIRS += python endif - +if USE_PYTHON3 +SUBDIRS += python3 +endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/bindings/python/Makefile.am new/libcap-ng-0.7.7/bindings/python/Makefile.am --- old/libcap-ng-0.7.4/bindings/python/Makefile.am 2014-04-24 14:41:44.000000000 +0200 +++ new/libcap-ng-0.7.7/bindings/python/Makefile.am 2015-05-13 22:41:07.000000000 +0200 @@ -1,5 +1,5 @@ # Makefile.am -- -# Copyright 2009 Red Hat Inc., Durham, North Carolina. +# Copyright 2009,2014-15 Red Hat Inc., Durham, North Carolina. # All Rights Reserved. # # This library is free software; you can redistribute it and/or @@ -20,12 +20,13 @@ # Steve Grubb <[email protected]> # SUBDIRS = test -EXTRA_DIST = capng_swig.i CONFIG_CLEAN_FILES = *.loT *.rej *.orig AM_CFLAGS = -fPIC -DPIC PYLIBVER ?= python$(PYTHON_VERSION) -INCLUDES = -I. -I$(top_builddir) -I/usr/include/$(PYLIBVER) +AM_CPPFLAGS = -I. -I$(top_builddir) -I@PYINCLUDEDIR@ LIBS = $(top_builddir)/src/libcap-ng.la +SWIG_FLAGS = -python +SWIG_INCLUDES = ${AM_CPPFLAGS} pyexec_PYTHON = capng.py pyexec_LTLIBRARIES = _capng.la pyexec_SOLIBRARIES = _capng.so @@ -34,8 +35,8 @@ _capng_la_HEADERS: $(top_builddir)/config.h _capng_la_DEPENDENCIES =${top_srcdir}/src/cap-ng.h ${top_builddir}/src/libcap-ng.la nodist__capng_la_SOURCES = capng_wrap.c -capng.py capng_wrap.c: ${srcdir}/capng_swig.i caps.h capng.h - swig -o capng_wrap.c -python ${INCLUDES} ${srcdir}/capng_swig.i +capng.py capng_wrap.c: ${srcdir}/../src/capng_swig.i caps.h capng.h + swig -o capng_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/capng_swig.i caps.h: cat /usr/include/linux/capability.h | grep '^#define CAP' | grep -v '[()]' > caps.h capng.h: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/bindings/python/capng.py new/libcap-ng-0.7.7/bindings/python/capng.py --- old/libcap-ng-0.7.4/bindings/python/capng.py 2014-04-24 14:41:55.000000000 +0200 +++ new/libcap-ng-0.7.7/bindings/python/capng.py 2015-05-13 22:41:15.000000000 +0200 @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 2.0.11 +# Version 3.0.5 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. @@ -9,7 +9,7 @@ from sys import version_info -if version_info >= (2,6,0): +if version_info >= (2, 6, 0): def swig_import_helper(): from os.path import dirname import imp @@ -33,166 +33,304 @@ try: _swig_property = property except NameError: - pass # Python < 2.2 doesn't have 'property'. -def _swig_setattr_nondynamic(self,class_type,name,value,static=1): - if (name == "thisown"): return self.this.own(value) + pass # Python < 2.2 doesn't have 'property'. + + +def _swig_setattr_nondynamic(self, class_type, name, value, static=1): + if (name == "thisown"): + return self.this.own(value) if (name == "this"): if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return - method = class_type.__swig_setmethods__.get(name,None) - if method: return method(self,value) + method = class_type.__swig_setmethods__.get(name, None) + if method: + return method(self, value) if (not static): - self.__dict__[name] = value + if _newclass: + object.__setattr__(self, name, value) + else: + self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) -def _swig_setattr(self,class_type,name,value): - return _swig_setattr_nondynamic(self,class_type,name,value,0) -def _swig_getattr(self,class_type,name): - if (name == "thisown"): return self.this.own() - method = class_type.__swig_getmethods__.get(name,None) - if method: return method(self) - raise AttributeError(name) +def _swig_setattr(self, class_type, name, value): + return _swig_setattr_nondynamic(self, class_type, name, value, 0) + + +def _swig_getattr_nondynamic(self, class_type, name, static=1): + if (name == "thisown"): + return self.this.own() + method = class_type.__swig_getmethods__.get(name, None) + if method: + return method(self) + if (not static): + return object.__getattr__(self, name) + else: + raise AttributeError(name) + +def _swig_getattr(self, class_type, name): + return _swig_getattr_nondynamic(self, class_type, name, 0) + def _swig_repr(self): - try: strthis = "proxy of " + self.this.__repr__() - except: strthis = "" + try: + strthis = "proxy of " + self.this.__repr__() + except: + strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) try: _object = object _newclass = 1 except AttributeError: - class _object : pass + class _object: + pass _newclass = 0 + +_capng.CAP_CHOWN_swigconstant(_capng) CAP_CHOWN = _capng.CAP_CHOWN + +_capng.CAP_DAC_OVERRIDE_swigconstant(_capng) CAP_DAC_OVERRIDE = _capng.CAP_DAC_OVERRIDE + +_capng.CAP_DAC_READ_SEARCH_swigconstant(_capng) CAP_DAC_READ_SEARCH = _capng.CAP_DAC_READ_SEARCH + +_capng.CAP_FOWNER_swigconstant(_capng) CAP_FOWNER = _capng.CAP_FOWNER + +_capng.CAP_FSETID_swigconstant(_capng) CAP_FSETID = _capng.CAP_FSETID + +_capng.CAP_KILL_swigconstant(_capng) CAP_KILL = _capng.CAP_KILL + +_capng.CAP_SETGID_swigconstant(_capng) CAP_SETGID = _capng.CAP_SETGID + +_capng.CAP_SETUID_swigconstant(_capng) CAP_SETUID = _capng.CAP_SETUID + +_capng.CAP_SETPCAP_swigconstant(_capng) CAP_SETPCAP = _capng.CAP_SETPCAP + +_capng.CAP_LINUX_IMMUTABLE_swigconstant(_capng) CAP_LINUX_IMMUTABLE = _capng.CAP_LINUX_IMMUTABLE + +_capng.CAP_NET_BIND_SERVICE_swigconstant(_capng) CAP_NET_BIND_SERVICE = _capng.CAP_NET_BIND_SERVICE + +_capng.CAP_NET_BROADCAST_swigconstant(_capng) CAP_NET_BROADCAST = _capng.CAP_NET_BROADCAST + +_capng.CAP_NET_ADMIN_swigconstant(_capng) CAP_NET_ADMIN = _capng.CAP_NET_ADMIN + +_capng.CAP_NET_RAW_swigconstant(_capng) CAP_NET_RAW = _capng.CAP_NET_RAW + +_capng.CAP_IPC_LOCK_swigconstant(_capng) CAP_IPC_LOCK = _capng.CAP_IPC_LOCK + +_capng.CAP_IPC_OWNER_swigconstant(_capng) CAP_IPC_OWNER = _capng.CAP_IPC_OWNER + +_capng.CAP_SYS_MODULE_swigconstant(_capng) CAP_SYS_MODULE = _capng.CAP_SYS_MODULE + +_capng.CAP_SYS_RAWIO_swigconstant(_capng) CAP_SYS_RAWIO = _capng.CAP_SYS_RAWIO + +_capng.CAP_SYS_CHROOT_swigconstant(_capng) CAP_SYS_CHROOT = _capng.CAP_SYS_CHROOT + +_capng.CAP_SYS_PTRACE_swigconstant(_capng) CAP_SYS_PTRACE = _capng.CAP_SYS_PTRACE + +_capng.CAP_SYS_PACCT_swigconstant(_capng) CAP_SYS_PACCT = _capng.CAP_SYS_PACCT + +_capng.CAP_SYS_ADMIN_swigconstant(_capng) CAP_SYS_ADMIN = _capng.CAP_SYS_ADMIN + +_capng.CAP_SYS_BOOT_swigconstant(_capng) CAP_SYS_BOOT = _capng.CAP_SYS_BOOT + +_capng.CAP_SYS_NICE_swigconstant(_capng) CAP_SYS_NICE = _capng.CAP_SYS_NICE + +_capng.CAP_SYS_RESOURCE_swigconstant(_capng) CAP_SYS_RESOURCE = _capng.CAP_SYS_RESOURCE + +_capng.CAP_SYS_TIME_swigconstant(_capng) CAP_SYS_TIME = _capng.CAP_SYS_TIME + +_capng.CAP_SYS_TTY_CONFIG_swigconstant(_capng) CAP_SYS_TTY_CONFIG = _capng.CAP_SYS_TTY_CONFIG + +_capng.CAP_MKNOD_swigconstant(_capng) CAP_MKNOD = _capng.CAP_MKNOD + +_capng.CAP_LEASE_swigconstant(_capng) CAP_LEASE = _capng.CAP_LEASE + +_capng.CAP_AUDIT_WRITE_swigconstant(_capng) CAP_AUDIT_WRITE = _capng.CAP_AUDIT_WRITE + +_capng.CAP_AUDIT_CONTROL_swigconstant(_capng) CAP_AUDIT_CONTROL = _capng.CAP_AUDIT_CONTROL + +_capng.CAP_SETFCAP_swigconstant(_capng) CAP_SETFCAP = _capng.CAP_SETFCAP + +_capng.CAP_MAC_OVERRIDE_swigconstant(_capng) CAP_MAC_OVERRIDE = _capng.CAP_MAC_OVERRIDE + +_capng.CAP_MAC_ADMIN_swigconstant(_capng) CAP_MAC_ADMIN = _capng.CAP_MAC_ADMIN + +_capng.CAP_SYSLOG_swigconstant(_capng) CAP_SYSLOG = _capng.CAP_SYSLOG + +_capng.CAP_WAKE_ALARM_swigconstant(_capng) CAP_WAKE_ALARM = _capng.CAP_WAKE_ALARM + +_capng.CAP_BLOCK_SUSPEND_swigconstant(_capng) CAP_BLOCK_SUSPEND = _capng.CAP_BLOCK_SUSPEND + +_capng.CAP_AUDIT_READ_swigconstant(_capng) +CAP_AUDIT_READ = _capng.CAP_AUDIT_READ + +_capng.CAP_LAST_CAP_swigconstant(_capng) CAP_LAST_CAP = _capng.CAP_LAST_CAP + +_capng.CAPNG_DROP_swigconstant(_capng) CAPNG_DROP = _capng.CAPNG_DROP + +_capng.CAPNG_ADD_swigconstant(_capng) CAPNG_ADD = _capng.CAPNG_ADD + +_capng.CAPNG_EFFECTIVE_swigconstant(_capng) CAPNG_EFFECTIVE = _capng.CAPNG_EFFECTIVE + +_capng.CAPNG_PERMITTED_swigconstant(_capng) CAPNG_PERMITTED = _capng.CAPNG_PERMITTED + +_capng.CAPNG_INHERITABLE_swigconstant(_capng) CAPNG_INHERITABLE = _capng.CAPNG_INHERITABLE + +_capng.CAPNG_BOUNDING_SET_swigconstant(_capng) CAPNG_BOUNDING_SET = _capng.CAPNG_BOUNDING_SET + +_capng.CAPNG_SELECT_CAPS_swigconstant(_capng) CAPNG_SELECT_CAPS = _capng.CAPNG_SELECT_CAPS + +_capng.CAPNG_SELECT_BOUNDS_swigconstant(_capng) CAPNG_SELECT_BOUNDS = _capng.CAPNG_SELECT_BOUNDS + +_capng.CAPNG_SELECT_BOTH_swigconstant(_capng) CAPNG_SELECT_BOTH = _capng.CAPNG_SELECT_BOTH + +_capng.CAPNG_FAIL_swigconstant(_capng) CAPNG_FAIL = _capng.CAPNG_FAIL + +_capng.CAPNG_NONE_swigconstant(_capng) CAPNG_NONE = _capng.CAPNG_NONE + +_capng.CAPNG_PARTIAL_swigconstant(_capng) CAPNG_PARTIAL = _capng.CAPNG_PARTIAL + +_capng.CAPNG_FULL_swigconstant(_capng) CAPNG_FULL = _capng.CAPNG_FULL + +_capng.CAPNG_PRINT_STDOUT_swigconstant(_capng) CAPNG_PRINT_STDOUT = _capng.CAPNG_PRINT_STDOUT + +_capng.CAPNG_PRINT_BUFFER_swigconstant(_capng) CAPNG_PRINT_BUFFER = _capng.CAPNG_PRINT_BUFFER + +_capng.CAPNG_NO_FLAG_swigconstant(_capng) CAPNG_NO_FLAG = _capng.CAPNG_NO_FLAG + +_capng.CAPNG_DROP_SUPP_GRP_swigconstant(_capng) CAPNG_DROP_SUPP_GRP = _capng.CAPNG_DROP_SUPP_GRP + +_capng.CAPNG_CLEAR_BOUNDING_swigconstant(_capng) CAPNG_CLEAR_BOUNDING = _capng.CAPNG_CLEAR_BOUNDING + +_capng.CAPNG_INIT_SUPP_GRP_swigconstant(_capng) CAPNG_INIT_SUPP_GRP = _capng.CAPNG_INIT_SUPP_GRP -def capng_clear(*args): - return _capng.capng_clear(*args) +def capng_clear(set): + return _capng.capng_clear(set) capng_clear = _capng.capng_clear -def capng_fill(*args): - return _capng.capng_fill(*args) +def capng_fill(set): + return _capng.capng_fill(set) capng_fill = _capng.capng_fill -def capng_setpid(*args): - return _capng.capng_setpid(*args) +def capng_setpid(pid): + return _capng.capng_setpid(pid) capng_setpid = _capng.capng_setpid def capng_get_caps_process(): - return _capng.capng_get_caps_process() + return _capng.capng_get_caps_process() capng_get_caps_process = _capng.capng_get_caps_process -def capng_update(*args): - return _capng.capng_update(*args) +def capng_update(action, type, capability): + return _capng.capng_update(action, type, capability) capng_update = _capng.capng_update -def capng_updatev(*args): - return _capng.capng_updatev(*args) +def capng_updatev(action, type, capability): + return _capng.capng_updatev(action, type, capability) capng_updatev = _capng.capng_updatev -def capng_apply(*args): - return _capng.capng_apply(*args) +def capng_apply(set): + return _capng.capng_apply(set) capng_apply = _capng.capng_apply def capng_lock(): - return _capng.capng_lock() + return _capng.capng_lock() capng_lock = _capng.capng_lock -def capng_change_id(*args): - return _capng.capng_change_id(*args) +def capng_change_id(uid, gid, flag): + return _capng.capng_change_id(uid, gid, flag) capng_change_id = _capng.capng_change_id -def capng_get_caps_fd(*args): - return _capng.capng_get_caps_fd(*args) +def capng_get_caps_fd(fd): + return _capng.capng_get_caps_fd(fd) capng_get_caps_fd = _capng.capng_get_caps_fd -def capng_apply_caps_fd(*args): - return _capng.capng_apply_caps_fd(*args) +def capng_apply_caps_fd(fd): + return _capng.capng_apply_caps_fd(fd) capng_apply_caps_fd = _capng.capng_apply_caps_fd -def capng_have_capabilities(*args): - return _capng.capng_have_capabilities(*args) +def capng_have_capabilities(set): + return _capng.capng_have_capabilities(set) capng_have_capabilities = _capng.capng_have_capabilities -def capng_have_capability(*args): - return _capng.capng_have_capability(*args) +def capng_have_capability(which, capability): + return _capng.capng_have_capability(which, capability) capng_have_capability = _capng.capng_have_capability -def capng_print_caps_numeric(*args): - return _capng.capng_print_caps_numeric(*args) +def capng_print_caps_numeric(where, set): + return _capng.capng_print_caps_numeric(where, set) capng_print_caps_numeric = _capng.capng_print_caps_numeric -def capng_print_caps_text(*args): - return _capng.capng_print_caps_text(*args) +def capng_print_caps_text(where, which): + return _capng.capng_print_caps_text(where, which) capng_print_caps_text = _capng.capng_print_caps_text -def capng_name_to_capability(*args): - return _capng.capng_name_to_capability(*args) +def capng_name_to_capability(name): + return _capng.capng_name_to_capability(name) capng_name_to_capability = _capng.capng_name_to_capability -def capng_capability_to_name(*args): - return _capng.capng_capability_to_name(*args) +def capng_capability_to_name(capability): + return _capng.capng_capability_to_name(capability) capng_capability_to_name = _capng.capng_capability_to_name # This file is compatible with both classic and new-style classes. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/bindings/python/capng_swig.i new/libcap-ng-0.7.7/bindings/python/capng_swig.i --- old/libcap-ng-0.7.4/bindings/python/capng_swig.i 2014-04-24 14:41:44.000000000 +0200 +++ new/libcap-ng-0.7.7/bindings/python/capng_swig.i 1970-01-01 01:00:00.000000000 +0100 @@ -1,44 +0,0 @@ -/* capngswig.i -- - * Copyright 2009 Red Hat Inc., Durham, North Carolina. - * All Rights Reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Authors: - * Steve Grubb <[email protected]> - */ - -%module capng -%{ - #include "./capng.h" -%} - -%typemap(python,except) int { - $action - if (result < 0) { - PyErr_SetFromErrno(PyExc_OSError); - return NULL; - } -} - -%define __signed__ -signed -%enddef -#define __attribute(X) /*nothing*/ -typedef unsigned __u32; -#define __extension__ /*nothing*/ -%include "./caps.h" -%include "./capng.h" - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/bindings/python/test/capng-test.py new/libcap-ng-0.7.7/bindings/python/test/capng-test.py --- old/libcap-ng-0.7.4/bindings/python/test/capng-test.py 2014-04-24 14:41:44.000000000 +0200 +++ new/libcap-ng-0.7.7/bindings/python/test/capng-test.py 2015-05-13 22:41:07.000000000 +0200 @@ -8,7 +8,13 @@ sys.path.insert(0, load_path) import capng + last = capng.CAP_LAST_CAP +try: + with open('/proc/sys/kernel/cap_last_cap', 'r') as f: + last = int(f.readline()) +except IOError as e: + print "Error opening /proc/sys/kernel/cap_last_cap: {0}".format(e.strerror) print("Doing basic bit tests...") capng.capng_clear(capng.CAPNG_SELECT_BOTH) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/bindings/python3/Makefile.am new/libcap-ng-0.7.7/bindings/python3/Makefile.am --- old/libcap-ng-0.7.4/bindings/python3/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ new/libcap-ng-0.7.7/bindings/python3/Makefile.am 2015-05-13 22:41:07.000000000 +0200 @@ -0,0 +1,46 @@ +# Makefile.am -- +# Copyright 2009,2014-15 Red Hat Inc., Durham, North Carolina. +# All Rights Reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Authors: +# Steve Grubb <[email protected]> +# +#SUBDIRS = test +CONFIG_CLEAN_FILES = *.loT *.rej *.orig +AM_CFLAGS = -fPIC -DPIC $(PYTHON3_CFLAGS) +AM_CPPFLAGS = -I. -I$(top_builddir) $(PYTHON3_INCLUDES) +SWIG_FLAGS = -python -py3 -modern +SWIG_INCLUDES = ${AM_CPPFLAGS} +py3exec_PYTHON = capng.py +py3exec_LTLIBRARIES = _capng.la +py3exec_SOLIBRARIES = _capng.so +_capng_la_CFLAGS = -shared +_capng_la_LDFLAGS = -module -avoid-version -shared +_capng_la_HEADERS: $(top_builddir)/config.h +_capng_la_DEPENDENCIES =${top_srcdir}/src/cap-ng.h ${top_builddir}/src/libcap-ng.la +_capng_py_la_LIBADD = $(top_builddir)/src/libcap-ng.la +nodist__capng_la_SOURCES = capng_wrap.c + +capng.py capng_wrap.c: ${srcdir}/../src/capng_swig.i caps.h capng.h + swig -o capng_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/capng_swig.i +caps.h: + cat /usr/include/linux/capability.h | grep '^#define CAP' | grep -v '[()]' > caps.h +capng.h: + cat ${top_srcdir}/src/cap-ng.h | grep -v '_state' > capng.h + +CLEANFILES = capng.py* capng_wrap.c caps.h capng.h *~ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/bindings/python3/capng.py new/libcap-ng-0.7.7/bindings/python3/capng.py --- old/libcap-ng-0.7.4/bindings/python3/capng.py 1970-01-01 01:00:00.000000000 +0100 +++ new/libcap-ng-0.7.7/bindings/python3/capng.py 2015-05-13 22:41:16.000000000 +0200 @@ -0,0 +1,345 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 3.0.5 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + + + + + +from sys import version_info +if version_info >= (2, 6, 0): + def swig_import_helper(): + from os.path import dirname + import imp + fp = None + try: + fp, pathname, description = imp.find_module('_capng', [dirname(__file__)]) + except ImportError: + import _capng + return _capng + if fp is not None: + try: + _mod = imp.load_module('_capng', fp, pathname, description) + finally: + fp.close() + return _mod + _capng = swig_import_helper() + del swig_import_helper +else: + import _capng +del version_info +try: + _swig_property = property +except NameError: + pass # Python < 2.2 doesn't have 'property'. + + +def _swig_setattr_nondynamic(self, class_type, name, value, static=1): + if (name == "thisown"): + return self.this.own(value) + if (name == "this"): + if type(value).__name__ == 'SwigPyObject': + self.__dict__[name] = value + return + method = class_type.__swig_setmethods__.get(name, None) + if method: + return method(self, value) + if (not static): + object.__setattr__(self, name, value) + else: + raise AttributeError("You cannot add attributes to %s" % self) + + +def _swig_setattr(self, class_type, name, value): + return _swig_setattr_nondynamic(self, class_type, name, value, 0) + + +def _swig_getattr_nondynamic(self, class_type, name, static=1): + if (name == "thisown"): + return self.this.own() + method = class_type.__swig_getmethods__.get(name, None) + if method: + return method(self) + if (not static): + return object.__getattr__(self, name) + else: + raise AttributeError(name) + +def _swig_getattr(self, class_type, name): + return _swig_getattr_nondynamic(self, class_type, name, 0) + + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + +try: + _object = object + _newclass = 1 +except AttributeError: + class _object: + pass + _newclass = 0 + + + +def _swig_setattr_nondynamic_method(set): + def set_attr(self, name, value): + if (name == "thisown"): + return self.this.own(value) + if hasattr(self, name) or (name == "this"): + set(self, name, value) + else: + raise AttributeError("You cannot add attributes to %s" % self) + return set_attr + + + +_capng.CAP_CHOWN_swigconstant(_capng) +CAP_CHOWN = _capng.CAP_CHOWN + +_capng.CAP_DAC_OVERRIDE_swigconstant(_capng) +CAP_DAC_OVERRIDE = _capng.CAP_DAC_OVERRIDE + +_capng.CAP_DAC_READ_SEARCH_swigconstant(_capng) +CAP_DAC_READ_SEARCH = _capng.CAP_DAC_READ_SEARCH + +_capng.CAP_FOWNER_swigconstant(_capng) +CAP_FOWNER = _capng.CAP_FOWNER + +_capng.CAP_FSETID_swigconstant(_capng) +CAP_FSETID = _capng.CAP_FSETID + +_capng.CAP_KILL_swigconstant(_capng) +CAP_KILL = _capng.CAP_KILL + +_capng.CAP_SETGID_swigconstant(_capng) +CAP_SETGID = _capng.CAP_SETGID + +_capng.CAP_SETUID_swigconstant(_capng) +CAP_SETUID = _capng.CAP_SETUID + +_capng.CAP_SETPCAP_swigconstant(_capng) +CAP_SETPCAP = _capng.CAP_SETPCAP + +_capng.CAP_LINUX_IMMUTABLE_swigconstant(_capng) +CAP_LINUX_IMMUTABLE = _capng.CAP_LINUX_IMMUTABLE + +_capng.CAP_NET_BIND_SERVICE_swigconstant(_capng) +CAP_NET_BIND_SERVICE = _capng.CAP_NET_BIND_SERVICE + +_capng.CAP_NET_BROADCAST_swigconstant(_capng) +CAP_NET_BROADCAST = _capng.CAP_NET_BROADCAST + +_capng.CAP_NET_ADMIN_swigconstant(_capng) +CAP_NET_ADMIN = _capng.CAP_NET_ADMIN + +_capng.CAP_NET_RAW_swigconstant(_capng) +CAP_NET_RAW = _capng.CAP_NET_RAW + +_capng.CAP_IPC_LOCK_swigconstant(_capng) +CAP_IPC_LOCK = _capng.CAP_IPC_LOCK + +_capng.CAP_IPC_OWNER_swigconstant(_capng) +CAP_IPC_OWNER = _capng.CAP_IPC_OWNER + +_capng.CAP_SYS_MODULE_swigconstant(_capng) +CAP_SYS_MODULE = _capng.CAP_SYS_MODULE + +_capng.CAP_SYS_RAWIO_swigconstant(_capng) +CAP_SYS_RAWIO = _capng.CAP_SYS_RAWIO + +_capng.CAP_SYS_CHROOT_swigconstant(_capng) +CAP_SYS_CHROOT = _capng.CAP_SYS_CHROOT + +_capng.CAP_SYS_PTRACE_swigconstant(_capng) +CAP_SYS_PTRACE = _capng.CAP_SYS_PTRACE + +_capng.CAP_SYS_PACCT_swigconstant(_capng) +CAP_SYS_PACCT = _capng.CAP_SYS_PACCT + +_capng.CAP_SYS_ADMIN_swigconstant(_capng) +CAP_SYS_ADMIN = _capng.CAP_SYS_ADMIN + +_capng.CAP_SYS_BOOT_swigconstant(_capng) +CAP_SYS_BOOT = _capng.CAP_SYS_BOOT + +_capng.CAP_SYS_NICE_swigconstant(_capng) +CAP_SYS_NICE = _capng.CAP_SYS_NICE + +_capng.CAP_SYS_RESOURCE_swigconstant(_capng) +CAP_SYS_RESOURCE = _capng.CAP_SYS_RESOURCE + +_capng.CAP_SYS_TIME_swigconstant(_capng) +CAP_SYS_TIME = _capng.CAP_SYS_TIME + +_capng.CAP_SYS_TTY_CONFIG_swigconstant(_capng) +CAP_SYS_TTY_CONFIG = _capng.CAP_SYS_TTY_CONFIG + +_capng.CAP_MKNOD_swigconstant(_capng) +CAP_MKNOD = _capng.CAP_MKNOD + +_capng.CAP_LEASE_swigconstant(_capng) +CAP_LEASE = _capng.CAP_LEASE + +_capng.CAP_AUDIT_WRITE_swigconstant(_capng) +CAP_AUDIT_WRITE = _capng.CAP_AUDIT_WRITE + +_capng.CAP_AUDIT_CONTROL_swigconstant(_capng) +CAP_AUDIT_CONTROL = _capng.CAP_AUDIT_CONTROL + +_capng.CAP_SETFCAP_swigconstant(_capng) +CAP_SETFCAP = _capng.CAP_SETFCAP + +_capng.CAP_MAC_OVERRIDE_swigconstant(_capng) +CAP_MAC_OVERRIDE = _capng.CAP_MAC_OVERRIDE + +_capng.CAP_MAC_ADMIN_swigconstant(_capng) +CAP_MAC_ADMIN = _capng.CAP_MAC_ADMIN + +_capng.CAP_SYSLOG_swigconstant(_capng) +CAP_SYSLOG = _capng.CAP_SYSLOG + +_capng.CAP_WAKE_ALARM_swigconstant(_capng) +CAP_WAKE_ALARM = _capng.CAP_WAKE_ALARM + +_capng.CAP_BLOCK_SUSPEND_swigconstant(_capng) +CAP_BLOCK_SUSPEND = _capng.CAP_BLOCK_SUSPEND + +_capng.CAP_AUDIT_READ_swigconstant(_capng) +CAP_AUDIT_READ = _capng.CAP_AUDIT_READ + +_capng.CAP_LAST_CAP_swigconstant(_capng) +CAP_LAST_CAP = _capng.CAP_LAST_CAP + +_capng.CAPNG_DROP_swigconstant(_capng) +CAPNG_DROP = _capng.CAPNG_DROP + +_capng.CAPNG_ADD_swigconstant(_capng) +CAPNG_ADD = _capng.CAPNG_ADD + +_capng.CAPNG_EFFECTIVE_swigconstant(_capng) +CAPNG_EFFECTIVE = _capng.CAPNG_EFFECTIVE + +_capng.CAPNG_PERMITTED_swigconstant(_capng) +CAPNG_PERMITTED = _capng.CAPNG_PERMITTED + +_capng.CAPNG_INHERITABLE_swigconstant(_capng) +CAPNG_INHERITABLE = _capng.CAPNG_INHERITABLE + +_capng.CAPNG_BOUNDING_SET_swigconstant(_capng) +CAPNG_BOUNDING_SET = _capng.CAPNG_BOUNDING_SET + +_capng.CAPNG_SELECT_CAPS_swigconstant(_capng) +CAPNG_SELECT_CAPS = _capng.CAPNG_SELECT_CAPS + +_capng.CAPNG_SELECT_BOUNDS_swigconstant(_capng) +CAPNG_SELECT_BOUNDS = _capng.CAPNG_SELECT_BOUNDS + +_capng.CAPNG_SELECT_BOTH_swigconstant(_capng) +CAPNG_SELECT_BOTH = _capng.CAPNG_SELECT_BOTH + +_capng.CAPNG_FAIL_swigconstant(_capng) +CAPNG_FAIL = _capng.CAPNG_FAIL + +_capng.CAPNG_NONE_swigconstant(_capng) +CAPNG_NONE = _capng.CAPNG_NONE + +_capng.CAPNG_PARTIAL_swigconstant(_capng) +CAPNG_PARTIAL = _capng.CAPNG_PARTIAL + +_capng.CAPNG_FULL_swigconstant(_capng) +CAPNG_FULL = _capng.CAPNG_FULL + +_capng.CAPNG_PRINT_STDOUT_swigconstant(_capng) +CAPNG_PRINT_STDOUT = _capng.CAPNG_PRINT_STDOUT + +_capng.CAPNG_PRINT_BUFFER_swigconstant(_capng) +CAPNG_PRINT_BUFFER = _capng.CAPNG_PRINT_BUFFER + +_capng.CAPNG_NO_FLAG_swigconstant(_capng) +CAPNG_NO_FLAG = _capng.CAPNG_NO_FLAG + +_capng.CAPNG_DROP_SUPP_GRP_swigconstant(_capng) +CAPNG_DROP_SUPP_GRP = _capng.CAPNG_DROP_SUPP_GRP + +_capng.CAPNG_CLEAR_BOUNDING_swigconstant(_capng) +CAPNG_CLEAR_BOUNDING = _capng.CAPNG_CLEAR_BOUNDING + +_capng.CAPNG_INIT_SUPP_GRP_swigconstant(_capng) +CAPNG_INIT_SUPP_GRP = _capng.CAPNG_INIT_SUPP_GRP + +def capng_clear(set: 'capng_select_t') -> "void": + return _capng.capng_clear(set) +capng_clear = _capng.capng_clear + +def capng_fill(set: 'capng_select_t') -> "void": + return _capng.capng_fill(set) +capng_fill = _capng.capng_fill + +def capng_setpid(pid: 'int') -> "void": + return _capng.capng_setpid(pid) +capng_setpid = _capng.capng_setpid + +def capng_get_caps_process() -> "int": + return _capng.capng_get_caps_process() +capng_get_caps_process = _capng.capng_get_caps_process + +def capng_update(action: 'capng_act_t', type: 'capng_type_t', capability: 'unsigned int') -> "int": + return _capng.capng_update(action, type, capability) +capng_update = _capng.capng_update + +def capng_updatev(action: 'capng_act_t', type: 'capng_type_t', capability: 'unsigned int') -> "int": + return _capng.capng_updatev(action, type, capability) +capng_updatev = _capng.capng_updatev + +def capng_apply(set: 'capng_select_t') -> "int": + return _capng.capng_apply(set) +capng_apply = _capng.capng_apply + +def capng_lock() -> "int": + return _capng.capng_lock() +capng_lock = _capng.capng_lock + +def capng_change_id(uid: 'int', gid: 'int', flag: 'capng_flags_t') -> "int": + return _capng.capng_change_id(uid, gid, flag) +capng_change_id = _capng.capng_change_id + +def capng_get_caps_fd(fd: 'int') -> "int": + return _capng.capng_get_caps_fd(fd) +capng_get_caps_fd = _capng.capng_get_caps_fd + +def capng_apply_caps_fd(fd: 'int') -> "int": + return _capng.capng_apply_caps_fd(fd) +capng_apply_caps_fd = _capng.capng_apply_caps_fd + +def capng_have_capabilities(set: 'capng_select_t') -> "capng_results_t": + return _capng.capng_have_capabilities(set) +capng_have_capabilities = _capng.capng_have_capabilities + +def capng_have_capability(which: 'capng_type_t', capability: 'unsigned int') -> "int": + return _capng.capng_have_capability(which, capability) +capng_have_capability = _capng.capng_have_capability + +def capng_print_caps_numeric(where: 'capng_print_t', set: 'capng_select_t') -> "char *": + return _capng.capng_print_caps_numeric(where, set) +capng_print_caps_numeric = _capng.capng_print_caps_numeric + +def capng_print_caps_text(where: 'capng_print_t', which: 'capng_type_t') -> "char *": + return _capng.capng_print_caps_text(where, which) +capng_print_caps_text = _capng.capng_print_caps_text + +def capng_name_to_capability(name: 'char const *') -> "int": + return _capng.capng_name_to_capability(name) +capng_name_to_capability = _capng.capng_name_to_capability + +def capng_capability_to_name(capability: 'unsigned int') -> "char const *": + return _capng.capng_capability_to_name(capability) +capng_capability_to_name = _capng.capng_capability_to_name + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/bindings/src/Makefile.am new/libcap-ng-0.7.7/bindings/src/Makefile.am --- old/libcap-ng-0.7.4/bindings/src/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ new/libcap-ng-0.7.7/bindings/src/Makefile.am 2015-05-13 22:41:07.000000000 +0200 @@ -0,0 +1,25 @@ +# Makefile.am -- +# Copyright 2015 Red Hat Inc., Durham, North Carolina. +# All Rights Reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Authors: +# Steve Grubb <[email protected]> +# + +EXTRA_DIST = capng_swig.i +SWIG_SOURCES = capng_swig.i +CONFIG_CLEAN_FILES = *.loT *.rej *.orig diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/bindings/src/capng_swig.i new/libcap-ng-0.7.7/bindings/src/capng_swig.i --- old/libcap-ng-0.7.4/bindings/src/capng_swig.i 1970-01-01 01:00:00.000000000 +0100 +++ new/libcap-ng-0.7.7/bindings/src/capng_swig.i 2015-05-13 22:41:07.000000000 +0200 @@ -0,0 +1,44 @@ +/* capngswig.i -- + * Copyright 2009 Red Hat Inc., Durham, North Carolina. + * All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Authors: + * Steve Grubb <[email protected]> + */ + +%module capng +%{ + #include "./capng.h" +%} + +%typemap(python,except) int { + $action + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } +} + +%define __signed__ +signed +%enddef +#define __attribute(X) /*nothing*/ +typedef unsigned __u32; +#define __extension__ /*nothing*/ +%include "./caps.h" +%include "./capng.h" + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/config.h.in new/libcap-ng-0.7.7/config.h.in --- old/libcap-ng-0.7.4/config.h.in 2014-04-24 14:41:51.000000000 +0200 +++ new/libcap-ng-0.7.7/config.h.in 2015-05-13 22:41:15.000000000 +0200 @@ -49,9 +49,6 @@ */ #undef LT_OBJDIR -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - /* Name of package */ #undef PACKAGE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/configure.ac new/libcap-ng-0.7.7/configure.ac --- old/libcap-ng-0.7.4/configure.ac 2014-04-24 14:41:45.000000000 +0200 +++ new/libcap-ng-0.7.7/configure.ac 2015-05-13 22:41:08.000000000 +0200 @@ -1,7 +1,7 @@ dnl define([AC_INIT_NOTICE], [### Generated automatically using autoconf version] AC_ACVERSION [ -### Copyright 2009-2012 Steve Grubb <[email protected]> +### Copyright 2009-2015 Steve Grubb <[email protected]> ### ### Permission is hereby granted, free of charge, to any person obtaining a ### copy of this software and associated documentation files (the "Software"), @@ -29,7 +29,7 @@ ]) AC_REVISION($Revision: 1.3 $)dnl -AC_INIT(libcap-ng,0.7.4) +AC_INIT(libcap-ng,0.7.7) AC_PREREQ(2.12)dnl AM_CONFIG_HEADER(config.h) AC_CONFIG_MACRO_DIR([m4]) @@ -123,8 +123,10 @@ else AC_MSG_RESULT(testing) AM_PATH_PYTHON -if test -f /usr/include/python${am_cv_python_version}/Python.h ; then +PYINCLUDEDIR=`python${am_cv_python_version} -c "from distutils import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"` +if test -f ${PYINCLUDEDIR}/Python.h ; then python_found="yes" + AC_SUBST(PYINCLUDEDIR) AC_MSG_NOTICE(Python bindings will be built) else python_found="no" @@ -137,9 +139,49 @@ fi AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes") +AC_MSG_CHECKING(whether to create python3 bindings) +AC_ARG_WITH(python3, +AS_HELP_STRING([--with-python3],[enable building python3 bindings]), +use_python3=$withval, +use_python3=auto) +if test x$use_python3 = xno ; then + AC_MSG_RESULT(no) +else + if test ${python_found} = no ; then + AC_MSG_RESULT(no) + use_python3=no + else + AC_MSG_RESULT(yes) + use_python3=yes + AC_PATH_PROG([PYTHON3], [python3], [no]) + if test "$PYTHON3" == "no" ; then + echo "The python3 program was not found in the search path. Please ensure" + echo "that it is installed and its directory is included in the search path or" + echo "pass --without-python3 to ./configure." + exit 1 + fi + PYTHON3_CFLAGS=`python3-config --cflags 2> /dev/null` + PYTHON3_LIBS=`python3-config --libs 2> /dev/null` + PYTHON3_INCLUDES=`python3-config --includes 2> /dev/null` + AC_SUBST([PYTHON3_PREFIX], ['${prefix}']) + AC_SUBST([PYTHON3_EXEC_PREFIX], ['${exec_prefix}']) + PYTHON3_DIR=`$PYTHON3 -c "import distutils.sysconfig; \ + print(distutils.sysconfig.get_python_lib(0,0,prefix='$PYTHON3_PREFIX'))"` + PYTHON3_EXECDIR=`$PYTHON3 -c "import distutils.sysconfig; \ + print(distutils.sysconfig.get_python_lib(1,0,prefix='$PYTHON3_EXEC_PREFIX'))"` + AC_SUBST(PYTHON3_CFLAGS) + AC_SUBST(PYTHON3_LIBS) + AC_SUBST(PYTHON3_INCLUDES) + AC_SUBST(python3dir, $PYTHON3_DIR) + AC_SUBST(py3execdir, $PYTHON3_EXECDIR) + fi +fi +AM_CONDITIONAL(USE_PYTHON3, test ${use_python3} = "yes") + AC_OUTPUT(Makefile src/Makefile src/libcap-ng.pc src/test/Makefile - bindings/Makefile bindings/python/Makefile - bindings/python/test/Makefile utils/Makefile + bindings/Makefile bindings/python/Makefile + bindings/python3/Makefile bindings/src/Makefile + bindings/python/test/Makefile utils/Makefile m4/Makefile docs/Makefile) echo . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/libcap-ng.spec new/libcap-ng-0.7.7/libcap-ng.spec --- old/libcap-ng-0.7.4/libcap-ng.spec 2014-04-24 14:41:43.000000000 +0200 +++ new/libcap-ng-0.7.7/libcap-ng.spec 2015-05-13 22:41:06.000000000 +0200 @@ -2,7 +2,7 @@ Summary: An alternate posix capabilities library Name: libcap-ng -Version: 0.7.4 +Version: 0.7.7 Release: 1 License: LGPLv2+ Group: System Environment/Libraries @@ -38,6 +38,17 @@ The libcap-ng-python package contains the bindings so that libcap-ng and can be used by python applications. +%package python3 +Summary: Python3 bindings for libcap-ng library +License: LGPLv2+ +Group: Development/Libraries +BuildRequires: python3-devel swig +Requires: %{name} = %{version}-%{release} + +%description python3 +The libcap-ng-python3 package contains the bindings so that libcap-ng +and can be used by python3 applications. + %package utils Summary: Utilities for analyzing and setting file capabilities License: GPLv2+ @@ -52,12 +63,12 @@ %setup -q %build -%configure --libdir=/%{_lib} +%configure --libdir=/%{_lib} --with-python --with-python3 make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT -make DESTDIR="${RPM_BUILD_ROOT}" install +make DESTDIR="${RPM_BUILD_ROOT}" INSTALL='install -p' install # Move the symlink rm -f $RPM_BUILD_ROOT/%{_lib}/%{name}.so @@ -89,13 +100,13 @@ %files %defattr(-,root,root,-) %doc COPYING.LIB -%attr(0755,root,root) /%{_lib}/libcap-ng.so.* +/%{_lib}/libcap-ng.so.* %files devel %defattr(-,root,root,-) %attr(0644,root,root) %{_mandir}/man3/* %attr(0644,root,root) %{_includedir}/cap-ng.h -%attr(0755,root,root) %{_libdir}/libcap-ng.so +%{_libdir}/libcap-ng.so %attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4 %{_libdir}/pkgconfig/libcap-ng.pc @@ -104,6 +115,11 @@ %attr(755,root,root) /%{_libdir}/python?.?/site-packages/_capng.so %{python_sitearch}/capng.py* +%files python3 +%defattr(-,root,root,-) +%attr(755,root,root) /%{_libdir}/python3.?/site-packages/* +%{python3_sitearch}/capng.py* + %files utils %defattr(-,root,root,-) %doc COPYING @@ -111,6 +127,6 @@ %attr(0644,root,root) %{_mandir}/man8/* %changelog -* Thu Apr 24 2014 Steve Grubb <[email protected]> 0.7.4-1 +* Wed May 13 2015 Steve Grubb <[email protected]> 0.7.7-1 - New upstream release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/missing new/libcap-ng-0.7.7/missing --- old/libcap-ng-0.7.4/missing 2014-04-24 14:41:51.000000000 +0200 +++ new/libcap-ng-0.7.7/missing 2015-05-13 22:41:13.000000000 +0200 @@ -1,7 +1,7 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <[email protected]>, 1996. @@ -160,7 +160,7 @@ ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." + echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/src/Makefile.am new/libcap-ng-0.7.7/src/Makefile.am --- old/libcap-ng-0.7.4/src/Makefile.am 2014-04-24 14:41:43.000000000 +0200 +++ new/libcap-ng-0.7.7/src/Makefile.am 2015-05-13 22:41:06.000000000 +0200 @@ -1,5 +1,5 @@ # Makefile.am -- -# Copyright 2009 Red Hat Inc., Durham, North Carolina. +# Copyright 2009,2015 Red Hat Inc., Durham, North Carolina. # All Rights Reserved. # # This library is free software; you can redistribute it and/or @@ -27,7 +27,7 @@ CLEANFILES = $(BUILT_SOURCES) CONFIG_CLEAN_FILES = *.loT *.rej *.orig AM_CFLAGS = -fPIC -DPIC -W -Wall -Wshadow -Wformat -Wundef -D_GNU_SOURCE -INCLUDES = -I. -I${top_srcdir} +AM_CPPFLAGS = -I. -I${top_srcdir} lib_LTLIBRARIES = libcap-ng.la include_HEADERS = cap-ng.h noinst_HEADERS = captab.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/src/cap-ng.c new/libcap-ng-0.7.7/src/cap-ng.c --- old/libcap-ng-0.7.4/src/cap-ng.c 2014-04-24 14:41:43.000000000 +0200 +++ new/libcap-ng-0.7.7/src/cap-ng.c 2015-05-13 22:41:06.000000000 +0200 @@ -197,6 +197,7 @@ if (errno == 0) last_cap = val; } + close(fd); } if (last_cap == -1) last_cap = CAP_LAST_CAP; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/src/captab.h new/libcap-ng-0.7.7/src/captab.h --- old/libcap-ng-0.7.4/src/captab.h 2014-04-24 14:41:43.000000000 +0200 +++ new/libcap-ng-0.7.7/src/captab.h 2015-05-13 22:41:06.000000000 +0200 @@ -1,5 +1,5 @@ /* captab.h -- - * Copyright 2009,2011-13 Red Hat Inc., Durham, North Carolina. + * Copyright 2009,2011-14 Red Hat Inc., Durham, North Carolina. * All Rights Reserved. * * This library is free software; you can redistribute it and/or @@ -75,4 +75,7 @@ #ifdef CAP_BLOCK_SUSPEND _S(CAP_BLOCK_SUSPEND, "block_suspend" ) #endif +#ifdef CAP_AUDIT_READ +_S(CAP_AUDIT_READ, "audit_read" ) +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/src/test/Makefile.am new/libcap-ng-0.7.7/src/test/Makefile.am --- old/libcap-ng-0.7.4/src/test/Makefile.am 2014-04-24 14:41:43.000000000 +0200 +++ new/libcap-ng-0.7.7/src/test/Makefile.am 2015-05-13 22:41:06.000000000 +0200 @@ -1,5 +1,5 @@ # Makefile.am -- -# Copyright 2009,10 Red Hat Inc., Durham, North Carolina. +# Copyright 2009,10,15 Red Hat Inc., Durham, North Carolina. # All Rights Reserved. # # This library is free software; you can redistribute it and/or @@ -20,7 +20,7 @@ # Steve Grubb <[email protected]> # -INCLUDES = -I${top_srcdir} -I${top_srcdir}/src +AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/src check_PROGRAMS = lib_test thread_test TESTS = $(check_PROGRAMS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/test-driver new/libcap-ng-0.7.7/test-driver --- old/libcap-ng-0.7.4/test-driver 2014-04-24 14:41:51.000000000 +0200 +++ new/libcap-ng-0.7.7/test-driver 2015-05-13 22:41:13.000000000 +0200 @@ -1,7 +1,7 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2012-06-27.10; # UTC +scriptversion=2013-07-13.22; # UTC # Copyright (C) 2011-2013 Free Software Foundation, Inc. # @@ -44,13 +44,12 @@ Usage: test-driver --test-name=NAME --log-file=PATH --trs-file=PATH [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT + [--enable-hard-errors={yes|no}] [--] + TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] The '--test-name', '--log-file' and '--trs-file' options are mandatory. END } -# TODO: better error handling in option parsing (in particular, ensure -# TODO: $log_file, $trs_file and $test_name are defined). test_name= # Used for reporting. log_file= # Where to save the output of the test script. trs_file= # Where to save the metadata of the test run. @@ -69,10 +68,23 @@ --enable-hard-errors) enable_hard_errors=$2; shift;; --) shift; break;; -*) usage_error "invalid option: '$1'";; + *) break;; esac shift done +missing_opts= +test x"$test_name" = x && missing_opts="$missing_opts --test-name" +test x"$log_file" = x && missing_opts="$missing_opts --log-file" +test x"$trs_file" = x && missing_opts="$missing_opts --trs-file" +if test x"$missing_opts" != x; then + usage_error "the following mandatory options are missing:$missing_opts" +fi + +if test $# -eq 0; then + usage_error "missing argument" +fi + if test $color_tests = yes; then # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. red='[0;31m' # Red. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/utils/Makefile.am new/libcap-ng-0.7.7/utils/Makefile.am --- old/libcap-ng-0.7.4/utils/Makefile.am 2014-04-24 14:41:45.000000000 +0200 +++ new/libcap-ng-0.7.7/utils/Makefile.am 2015-05-13 22:41:07.000000000 +0200 @@ -1,5 +1,5 @@ # Makefile.am -- -# Copyright 2009 Red Hat Inc., Durham, North Carolina. +# Copyright 2009,2015 Red Hat Inc., Durham, North Carolina. # All Rights Reserved. # # This library is free software; you can redistribute it and/or @@ -23,7 +23,7 @@ CONFIG_CLEAN_FILES = *.loT *.rej *.orig AUTOMAKE_OPTIONS = no-dependencies EXTRA_DIST = $(man_MANS) -INCLUDES = -I${top_srcdir} -I${top_srcdir}/src +AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/src LIBS = -L${top_builddir}/src -lcap-ng AM_CFLAGS = -W -Wall -Wshadow -Wformat -Wundef -D_GNU_SOURCE bin_PROGRAMS = pscap netcap filecap captest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcap-ng-0.7.4/utils/proc-llist.h new/libcap-ng-0.7.7/utils/proc-llist.h --- old/libcap-ng-0.7.4/utils/proc-llist.h 2014-04-24 14:41:45.000000000 +0200 +++ new/libcap-ng-0.7.7/utils/proc-llist.h 2015-05-13 22:41:08.000000000 +0200 @@ -25,6 +25,7 @@ #define PROC_HEADER #include "config.h" +#include <sys/types.h> /* Ensure types in _lnode are defined on all systems */ /* This is the node of the linked list. Any data elements that are per
