diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-07-27 10:33:45 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-07-27 10:33:45 +0100 |
commit | a12f416baa722b8bda57c0d527fb28b3d06b2aeb (patch) | |
tree | 00347496d39521fc572cc53fbd17037fbe73ca06 /app-admin/setools/files | |
parent | ef27446dc21d9fb7ee400987661cb759f6a6ee85 (diff) |
gentoo auto-resync : 27:07:2023 - 10:33:45
Diffstat (limited to 'app-admin/setools/files')
-rw-r--r-- | app-admin/setools/files/setools-4.4.1-cython3.patch | 43 | ||||
-rw-r--r-- | app-admin/setools/files/setools-4.4.2-remove-gui.patch | 18 |
2 files changed, 61 insertions, 0 deletions
diff --git a/app-admin/setools/files/setools-4.4.1-cython3.patch b/app-admin/setools/files/setools-4.4.1-cython3.patch new file mode 100644 index 000000000000..386b92f44576 --- /dev/null +++ b/app-admin/setools/files/setools-4.4.1-cython3.patch @@ -0,0 +1,43 @@ +https://bugs.gentoo.org/898664 +https://github.com/SELinuxProject/setools/pull/105/commits/fc443b5a0379f3644e071a458e996ea6115ccba3 +(cherry-picked from https://github.com/SELinuxProject/setools/commit/31e104c3a9ca97038e09d3a4549fe2b8c8df36e8) + +From fc443b5a0379f3644e071a458e996ea6115ccba3 Mon Sep 17 00:00:00 2001 +From: Chris PeBenito <chpebeni@linux.microsoft.com> +Date: Mon, 17 Jul 2023 16:08:21 -0400 +Subject: [PATCH] SELinuxPolicy: Add explicit cast for libspol message + callback. + +Cython 3.0 is more strict. The change fixes this issue: + +setools/policyrep/selinuxpolicy.pxi:685:46: Cannot assign type 'void (void *, sepol_handle_t *, const char *, ...) except *' to 'msg_callback' + +Additionally, the msg_callback is not typedef-ed in sepol/debug.h, so it must +be explicitly defined in sepol.pxd for the casting to work. + +Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com> +--- a/setools/policyrep/selinuxpolicy.pxi ++++ b/setools/policyrep/selinuxpolicy.pxi +@@ -668,7 +668,7 @@ cdef class SELinuxPolicy: + if self.sh == NULL: + raise MemoryError + +- sepol.sepol_msg_set_callback(self.sh, sepol_logging_callback, self.handle) ++ sepol.sepol_msg_set_callback(self.sh, <sepol.msg_callback>sepol_logging_callback, self.handle) + + if sepol.sepol_policydb_create(&self.handle) < 0: + raise MemoryError +--- a/setools/policyrep/sepol.pxd ++++ b/setools/policyrep/sepol.pxd +@@ -16,8 +16,10 @@ cdef extern from "<sepol/handle.h>": + void sepol_handle_destroy(sepol_handle_t *sh) + + ++ctypedef void (*msg_callback)(void *varg, sepol_handle_t *handle, const char *fmt, ...) ++ ++ + cdef extern from "<sepol/debug.h>": +- ctypedef void (*msg_callback)(void *varg, sepol_handle_t *handle, const char *fmt, ...) + void sepol_msg_set_callback(sepol_handle * handle, msg_callback cb, void *cb_arg) + + diff --git a/app-admin/setools/files/setools-4.4.2-remove-gui.patch b/app-admin/setools/files/setools-4.4.2-remove-gui.patch new file mode 100644 index 000000000000..49d16ec66b56 --- /dev/null +++ b/app-admin/setools/files/setools-4.4.2-remove-gui.patch @@ -0,0 +1,18 @@ +--- a/setup.py ++++ b/setup.py +@@ -139,12 +139,10 @@ setup(name='setools', + author_email='pebenito@ieee.org', + url='https://github.com/SELinuxProject/setools', + cmdclass={'build_qhc': QtHelpCommand, 'clean': CleanCommand}, +- packages=['setools', 'setools.checker', 'setools.diff', 'setoolsgui', 'setoolsgui.apol'], +- scripts=['apol', 'sediff', 'seinfo', 'seinfoflow', 'sesearch', 'sedta', 'sechecker'], ++ packages=['setools', 'setools.checker', 'setools.diff'], ++ scripts=['sediff', 'seinfo', 'seinfoflow', 'sesearch', 'sedta', 'sechecker'], + data_files=installed_data, +- package_data={'': ['*.ui', '*.qhc', '*.qch'], 'setools': ['perm_map', +- 'policyrep.pyi', +- 'py.typed']}, ++ package_data={'setools': ['perm_map', 'policyrep.pyi', 'py.typed']}, + ext_modules=cythonize(ext_py_mods, include_path=['setools/policyrep'], + annotate=cython_annotate, + compiler_directives={"language_level": 3, |