From 0d05ca4a09294ddbcd7735c4fc6f3bddd524b0e7 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 9 Mar 2021 00:04:16 -0800 Subject: [PATCH 1/5] python3-libselinux: update to 3.2 Signed-off-by: Rosen Penev --- lang/python/python3-libselinux/Makefile | 6 +- .../patches/010-setup-py-custom-cc.patch | 2 +- .../patches/030-musl12x.patch | 66 ------------------- 3 files changed, 4 insertions(+), 70 deletions(-) delete mode 100644 lang/python/python3-libselinux/patches/030-musl12x.patch diff --git a/lang/python/python3-libselinux/Makefile b/lang/python/python3-libselinux/Makefile index 159e09dc3..18caa46b4 100644 --- a/lang/python/python3-libselinux/Makefile +++ b/lang/python/python3-libselinux/Makefile @@ -7,13 +7,13 @@ include $(TOPDIR)/rules.mk SRC_NAME:=libselinux PKG_NAME:=python3-$(SRC_NAME) -PKG_VERSION:=3.1 -PKG_RELEASE:=2 +PKG_VERSION:=3.2 +PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/python-libselinux/$(SRC_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(SRC_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20200710 -PKG_HASH:=ea5dcbb4d859e3f999c26a13c630da2f16dff9462e3cc8cb7b458ac157d112e7 +PKG_HASH:=df758ef1d9d4811051dd901ea6b029ae334ffd7c671c128beb16bce1e25ac161 PKG_BUILD_DEPENDS:=swig/host PKG_MAINTAINER:=Thomas Petazzoni diff --git a/lang/python/python3-libselinux/patches/010-setup-py-custom-cc.patch b/lang/python/python3-libselinux/patches/010-setup-py-custom-cc.patch index 6b86f6fa1..8fe816588 100644 --- a/lang/python/python3-libselinux/patches/010-setup-py-custom-cc.patch +++ b/lang/python/python3-libselinux/patches/010-setup-py-custom-cc.patch @@ -1,6 +1,6 @@ --- a/src/Makefile +++ b/src/Makefile -@@ -131,7 +131,7 @@ SWIGRUBY = swig -Wall -ruby -o $(SWIGRUB +@@ -139,7 +139,7 @@ SWIGRUBY = swig -Wall -ruby -o $(SWIGRUB all: $(LIBA) $(LIBSO) $(LIBPC) pywrap: all selinuxswig_python_exception.i diff --git a/lang/python/python3-libselinux/patches/030-musl12x.patch b/lang/python/python3-libselinux/patches/030-musl12x.patch deleted file mode 100644 index 9eea417bc..000000000 --- a/lang/python/python3-libselinux/patches/030-musl12x.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 398d2ceef92cb1baac18e6b34a1a8e1bf41296cd Mon Sep 17 00:00:00 2001 -From: Nicolas Iooss -Date: Tue, 16 Feb 2021 22:13:28 +0100 -Subject: [PATCH] libselinux: rename gettid() to something which never - conflicts with the libc - -Musl recently added a wrapper for gettid() syscall. There is no way to -detect this new version in a reliable way, so rename our gettid() -wrapper to a non-conflicting name. - -Introduce a new function which, when using a libc known to provide a -wrapper for gettid(), calls it, and which, otherwise, performs the -syscall directly. - -Anyway this function is only used on systems where /proc/thread-self -does not exist, which are therefore running Linux<3.17. - -Fixes: https://github.com/SELinuxProject/selinux/issues/282 -Signed-off-by: Nicolas Iooss -Acked-by: Petr Lautrbach ---- - src/procattr.c | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) - ---- a/src/procattr.c -+++ b/src/procattr.c -@@ -25,21 +25,23 @@ static __thread char destructor_initiali - /* Bionic and glibc >= 2.30 declare gettid() system call wrapper in unistd.h and - * has a definition for it */ - #ifdef __BIONIC__ -- #define OVERRIDE_GETTID 0 -+ #define HAVE_GETTID 1 - #elif !defined(__GLIBC_PREREQ) -- #define OVERRIDE_GETTID 1 -+ #define HAVE_GETTID 0 - #elif !__GLIBC_PREREQ(2,30) -- #define OVERRIDE_GETTID 1 -+ #define HAVE_GETTID 0 - #else -- #define OVERRIDE_GETTID 0 -+ #define HAVE_GETTID 1 - #endif - --#if OVERRIDE_GETTID --static pid_t gettid(void) -+static pid_t selinux_gettid(void) - { -+#if HAVE_GETTID -+ return gettid(); -+#else - return syscall(__NR_gettid); --} - #endif -+} - - static void procattr_thread_destructor(void __attribute__((unused)) *unused) - { -@@ -94,7 +96,7 @@ static int openattr(pid_t pid, const cha - if (fd >= 0 || errno != ENOENT) - goto out; - free(path); -- tid = gettid(); -+ tid = selinux_gettid(); - rc = asprintf(&path, "/proc/self/task/%d/attr/%s", tid, attr); - } else { - errno = EINVAL; From acb72e74529a5f3c6ec067cfe6047b621407c29a Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 9 Mar 2021 00:05:06 -0800 Subject: [PATCH 2/5] python3-libsemanage: update to 3.2 Signed-off-by: Rosen Penev --- lang/python/python3-libsemanage/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/python/python3-libsemanage/Makefile b/lang/python/python3-libsemanage/Makefile index 5cb91ef76..c1670e567 100644 --- a/lang/python/python3-libsemanage/Makefile +++ b/lang/python/python3-libsemanage/Makefile @@ -7,13 +7,13 @@ include $(TOPDIR)/rules.mk SRC_NAME:=libsemanage PKG_NAME:=python3-$(SRC_NAME) -PKG_VERSION:=3.1 +PKG_VERSION:=3.2 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/python-libsemanage/$(SRC_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(SRC_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20200710 -PKG_HASH:=22d6c75526e40d1781c30bcf29abf97171bdfe6780923f11c8e1c76a75a21ff8 +PKG_HASH:=d722a55ca4fe2d4e2b30527720db657e6238b28079e69e2e4affeb8e733ee511 PKG_BUILD_DEPENDS:=swig/host PKG_MAINTAINER:=Thomas Petazzoni From 39bce0e7191bab285d3c0fb6b205df7bcfd36e4f Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 9 Mar 2021 00:22:25 -0800 Subject: [PATCH 3/5] setools: update to 4.4.0 Remove no longer needed patches. Signed-off-by: Rosen Penev --- utils/setools/Makefile | 8 ++++---- utils/setools/patches/010-no-format.patch | 10 ---------- utils/setools/patches/020-no-deprecated.patch | 10 ---------- 3 files changed, 4 insertions(+), 24 deletions(-) delete mode 100644 utils/setools/patches/010-no-format.patch delete mode 100644 utils/setools/patches/020-no-deprecated.patch diff --git a/utils/setools/Makefile b/utils/setools/Makefile index dbfb5d298..8b1b2eb8b 100644 --- a/utils/setools/Makefile +++ b/utils/setools/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=setools -PKG_VERSION:=4.3.0 -PKG_RELEASE:=3 +PKG_VERSION:=4.4.0 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://github.com/SELinuxProject/setools/releases/download/4.3.0 -PKG_HASH:=315df3ae0eb29b399123c5e3330480c5d1c0da038671c9fd62a439c49a6f9105 +PKG_SOURCE_URL:=https://github.com/SELinuxProject/setools/releases/download/$(PKG_VERSION) +PKG_HASH:=f3786677e40b7f16a226f48f233dcf835e700739614a7dbed2ff61cc9607814e PKG_BUILD_DIR:=$(BUILD_DIR)/setools HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=Cython # Cython>=0.27 diff --git a/utils/setools/patches/010-no-format.patch b/utils/setools/patches/010-no-format.patch deleted file mode 100644 index 939959f65..000000000 --- a/utils/setools/patches/010-no-format.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -109,7 +109,6 @@ ext_py_mods = [Extension('setools.policy - extra_compile_args=['-Werror', '-Wextra', - '-Waggregate-return', - '-Wfloat-equal', -- '-Wformat', '-Wformat=2', - '-Winit-self', - '-Wmissing-format-attribute', - '-Wmissing-include-dirs', diff --git a/utils/setools/patches/020-no-deprecated.patch b/utils/setools/patches/020-no-deprecated.patch deleted file mode 100644 index cf3b0e2fe..000000000 --- a/utils/setools/patches/020-no-deprecated.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -125,6 +125,7 @@ ext_py_mods = [Extension('setools.policy - '-Wno-unreachable-code', - '-Wno-implicit-fallthrough', - '-Wno-cast-function-type', -+ '-Wno-deprecated-declarations', - '-fno-exceptions'])] - - installed_data = [('share/man/man1', glob.glob("man/*.1"))] From 961c0129e24d4cc793ad7df22dcf5c2658fbee86 Mon Sep 17 00:00:00 2001 From: Dominick Grift Date: Tue, 9 Mar 2021 09:01:37 +0100 Subject: [PATCH 4/5] semodule-utils: update to version 3.2 no changes Signed-off-by: Dominick Grift --- utils/semodule-utils/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/semodule-utils/Makefile b/utils/semodule-utils/Makefile index 82504859d..ba08eac8d 100644 --- a/utils/semodule-utils/Makefile +++ b/utils/semodule-utils/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=semodule-utils -PKG_VERSION:=3.1 -PKG_RELEASE:=2 +PKG_VERSION:=3.2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20200710 -PKG_HASH:=0cc37f9cec751d9c2abb5f2b228b060567e973cb47c19b53b8a4a7378baaa853 +PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION) +PKG_HASH:=be155654883c8dc4d05493e04a3eb9e56d28803009f1fdd721d42c68b878f757 PKG_MAINTAINER:=W. Michael Petullo PKG_LICENSE:=GPL-2.0-only From a63bc367b7bce448d98c865da1ec2ee3e3741ff9 Mon Sep 17 00:00:00 2001 From: Dominick Grift Date: Tue, 9 Mar 2021 11:59:32 +0100 Subject: [PATCH 5/5] selinux-python: update to version 3.2 be065c4b sepolicy: Do not try to load policy on import 8f0f0a28 selinux(8,5): Describe fcontext regular expressions e12f71e8 python/sepolgen: allow any policy statement in if(n)def b15dff0f python/semanage: Sort imports in alphabetical order 92e01969 python/semanage: empty stdout before exiting on BrokenPipeError fadcc839 python/sepolicy: allow to override manpage date 2a60de8e sepolgen: sort extended rules like normal ones 9e239e55 sepolgen: print extended permissions in hexadecimal ccd973f7 python/audit2allow: add #include to sepolgen-ifgen-attr-helper.c Signed-off-by: Dominick Grift --- utils/selinux-python/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/selinux-python/Makefile b/utils/selinux-python/Makefile index da67210dc..ffaa99c7f 100644 --- a/utils/selinux-python/Makefile +++ b/utils/selinux-python/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=selinux-python -PKG_VERSION:=3.1 +PKG_VERSION:=3.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20200710 -PKG_HASH:=f4d0a1a030bc291a6af498b26e0676b745075dd289a8ba16cdec86c3ea8f2f02 +PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION) +PKG_HASH:=770855ea8120ef23007fdb9db94b1ed6e8cd77917b584ed8877bbee9c16e74fb PKG_MAINTAINER:=Thomas Petazzoni PKG_LICENSE:=GPL-2.0-only