]> git.pld-linux.org Git - packages/libapparmor.git/commitdiff
- rel 2; raise exceptions in python bindings auto/th/libapparmor-2.8.3-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 12 Mar 2014 18:47:00 +0000 (19:47 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 12 Mar 2014 18:47:00 +0000 (19:47 +0100)
libapparmor-python-exception.patch [new file with mode: 0644]
libapparmor.spec

diff --git a/libapparmor-python-exception.patch b/libapparmor-python-exception.patch
new file mode 100644 (file)
index 0000000..ce23c4a
--- /dev/null
@@ -0,0 +1,27 @@
+=== modified file 'libraries/libapparmor/swig/SWIG/libapparmor.i'
+--- libraries/libapparmor/swig/SWIG/libapparmor.i      2014-01-06 22:08:55 +0000
++++ libraries/libapparmor/swig/SWIG/libapparmor.i      2014-03-07 19:54:12 +0000
+@@ -9,6 +9,16 @@
+ %include "typemaps.i"
+ %include <aalogparse.h>
++#ifdef SWIGPYTHON
++%exception {
++  $action
++  if (result < 0) {
++    PyErr_SetFromErrno(PyExc_OSError);
++    return NULL;
++  }
++}
++#endif
++
+ /* swig doesn't like the macro magic we do in apparmor.h so the fn prototypes
+  * are manually inserted here
+  */
+@@ -37,3 +37,5 @@
+ extern int aa_getcon(char **con, char **mode);
+ extern int aa_getpeercon_raw(int fd, char *buffer, int *size);
+ extern int aa_getpeercon(int fd, char **con);
++
++%exception;
+
index dabafdc53aa6c8ae98a1b535d1f2a188bc5d3794..efe91273bbf9188053472783e8cceec9cf8a544b 100644 (file)
@@ -3,12 +3,13 @@ Summary:      Library to provide key AppArmor symbols
 Summary(pl.UTF-8):     Biblioteka udostępniająca kluczowe symbole AppArmor
 Name:          libapparmor
 Version:       2.8.3
-Release:       1
+Release:       2
 Epoch:         1
 License:       LGPL v2.1
 Group:         Libraries
 Source0:       http://launchpad.net/apparmor/2.8/%{version}/+download/apparmor-%{version}.tar.gz
 # Source0-md5: 43586e5096606e857fef45c49553e468
+Patch0:                %{name}-python-exception.patch
 URL:           http://apparmor.wiki.kernel.org/
 BuildRequires: autoconf
 BuildRequires: automake >= 1.4
@@ -114,6 +115,7 @@ Dowiązania do AppArmor dla języka Ruby.
 
 %prep
 %setup -q -n apparmor-%{version}
+%patch0 -p0
 
 %build
 cd libraries/libapparmor
This page took 0.092494 seconds and 4 git commands to generate.