Regression: libcap-ng failed to build againt swig 4.2.0
by lucabon from LinuxQuestions.org on (#6HKC3)
In swig 4.2.0 the deprecated feature %except was removed, but libcap-ng still uses it.
The following patch could be used to fix the bug/regression:
Code:--- libcap-ng-0.8.4.old/bindings/src/capng_swig.i 2023-12-20 16:23:01.000000000 +0100
+++ libcap-ng-0.8.4/bindings/src/capng_swig.i 2024-01-04 12:53:12.131746399 +0100
@@ -30,7 +30,16 @@
%varargs(16, signed capability = 0) capng_updatev;
-%except(python) {
+%exception capng_clear {
+ $action
+}
+%exception capng_fill {
+ $action
+}
+%exception capng_setpid {
+ $action
+}
+%exception {
$action
if (result < 0) {
PyErr_SetFromErrno(PyExc_OSError);An issue is already opened in libcap-ng repository: https://github.com/stevegrubb/libcap-ng/issues/48
The following patch could be used to fix the bug/regression:
Code:--- libcap-ng-0.8.4.old/bindings/src/capng_swig.i 2023-12-20 16:23:01.000000000 +0100
+++ libcap-ng-0.8.4/bindings/src/capng_swig.i 2024-01-04 12:53:12.131746399 +0100
@@ -30,7 +30,16 @@
%varargs(16, signed capability = 0) capng_updatev;
-%except(python) {
+%exception capng_clear {
+ $action
+}
+%exception capng_fill {
+ $action
+}
+%exception capng_setpid {
+ $action
+}
+%exception {
$action
if (result < 0) {
PyErr_SetFromErrno(PyExc_OSError);An issue is already opened in libcap-ng repository: https://github.com/stevegrubb/libcap-ng/issues/48