package/libselinux: bump version to 3.0
PATCH v2 1/7 package/libselinux: bump version to 3.0
Other changes:
- Remove upstream packages.
- Modify existing patches to work with 3.0.
- Remove Python2 check, as 3.0 has removed Python2 support.
---
package/libselinux/0001-fix-musl-build.patch | 22 +-
...-and-rely-on-the-installed-file-nam.patch} | 6 +-
...ng-against-musl-and-uclibc-libraries.patch | 29 +++
...ython-distutils-to-install-SELinux-p.patch | 207 ------------------
...-t-pass-bogus-I-and-L-to-python-setu.patch | 34 ---
package/libselinux/libselinux.hash | 2 +-
package/libselinux/libselinux.mk | 25 +--
7 files changed, 55 insertions(+), 270 deletions(-)
rename package/libselinux/{0006-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch => 0002-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch} (95%)
create mode 100644 package/libselinux/0003-fix-building-against-musl-and-uclibc-libraries.patch
delete mode 100644 package/libselinux/0003-libselinux-Use-Python-distutils-to-install-SELinux-p.patch
delete mode 100644 package/libselinux/0004-src-Makefile-don-t-pass-bogus-I-and-L-to-python-setu.patchpackage/libselinux/0001-fix-musl-build.patch +15 -7
@@ -1,4 +1,7 @@ -fix undefined macros in musl +From 78f7f09028fdd6a5e8e4e4b584749621eaef412f Mon Sep 17 00:00:00 2001 +From: Yann E. MORIN" <[email protected]> +Date: Sat, 7 Dec 2019 17:24:50 -0800 +Subject: [PATCH] fix undefined macros in musl musl does not define glibc-specific macros, so use a simple version of the macro when it is not defined.
@@ -9,11 +12,13 @@ Domain, and we want to avoid license propagation, so this macro is completely written from scratch, and non-optimal. Signed-off-by: "Yann E. MORIN" <[email protected]> - -diff -durN libselinux-2.1.13.orig/src/booleans.c libselinux-2.1.13/src/booleans.c ---- libselinux-2.1.13.orig/src/booleans.c 2013-02-06 02:43:22.000000000 +0100 -+++ libselinux-2.1.13/src/booleans.c 2015-07-26 20:40:41.311801914 +0200 -@@ -62,6 +62,14 @@ +[Updated for 3.0] +Signed-off-by: Adam Duskett <[email protected]> +diff --git a/src/booleans.c b/src/booleans.c +index ffa8d26..8569002 100644 +--- a/src/booleans.c ++++ b/src/booleans.c +@@ -65,6 +65,14 @@ int security_get_boolean_names(char ***names, int *len) goto bad; }
@@ -26,5 +31,8 @@ diff -durN libselinux-2.1.13.orig/src/booleans.c libselinux-2.1.13/src/booleans. +#endif + for (i = 0; i < *len; i++) { - n[i] = (char *)malloc(_D_ALLOC_NAMLEN(namelist[i])); + n[i] = strdup(namelist[i]->d_name); if (!n[i]) { +-- +2.23.0 +
package/libselinux/0002-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch renamed from package/libselinux/0006-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch +4 -2
@@ -17,12 +17,14 @@ was installed. [Upstream: https://github.com/SELinuxProject/selinux/pull/184] Signed-off-by: Thomas Petazzoni <[email protected]> +[Refreshed for 3.0] +Signed-off-by: Adam Duskett <[email protected]> --- src/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile -index 799df2b0..95684ed7 100644 +index 4b6a4d4..7b14ef1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -15,7 +15,6 @@ INCLUDEDIR ?= $(PREFIX)/include
@@ -43,5 +45,5 @@ index 799df2b0..95684ed7 100644 install-rubywrap: rubywrap test -d $(DESTDIR)$(RUBYINSTALL) || install -m 755 -d $(DESTDIR)$(RUBYINSTALL) -- -2.21.0 +2.23.0
package/libselinux/0003-fix-building-against-musl-and-uclibc-libraries.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 0f6cd4ef20639ac3b3e26af8f743ee03b5d6f8a4 Mon Sep 17 00:00:00 2001 +From: Adam Duskett <[email protected]> +Date: Wed, 11 Dec 2019 14:00:16 -0800 +Subject: [PATCH] Fix building against musl and uClibc libc libraries. + +Currently, the src/Makefile provides the FTS_LDLIBS when building against musl +or uClibc. However, this is missing from utils/Makefile, which causes linking +to fail. + +Add the FTS_LDLIBS variable to the LDLIBS variable in utils/Makefile to fix +compiling against uClibc and musl. +--- + libselinux/utils/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/Makefile b/utils/Makefile +index 36150638..a5632b7c 100644 +--- a/utils/Makefile ++++ b/utils/Makefile +@@ -45,7 +45,7 @@ endif + + override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS) + override LDFLAGS += -L../src +-override LDLIBS += -lselinux ++override LDLIBS += -lselinux $(FTS_LDLIBS) + PCRE_LDLIBS ?= -lpcre + + ifeq ($(ANDROID_HOST),y) +
package/libselinux/0003-libselinux-Use-Python-distutils-to-install-SELinux-p.patch deleted +0 -207
207 lines not on this page · raw message
package/libselinux/0004-src-Makefile-don-t-pass-bogus-I-and-L-to-python-setu.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From 4b1568bce5bbdc7bf76a4bbf1066ba7e7b84649f Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <[email protected]> -Date: Fri, 25 Oct 2019 11:45:04 +0200 -Subject: [PATCH] src/Makefile: don't pass bogus -I and -L to python setup.py - build_ext - -Using $(DESTDIR) during the build does not follow the normal/standard -semantic of DESTDIR: it is normally only needed during the -installation. Therefore, a lot of build systems/environments don't -pass any DESTDIR at build time, which causes setup.py to be called -with -I /usr/include -L /usr/lib, which breaks cross-compilation. - -[Upstream: https://github.com/SELinuxProject/selinux/pull/183] -Signed-off-by: Thomas Petazzoni <[email protected]> ---- - src/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Makefile b/src/Makefile -index 2b1696a0..3b8bad81 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -130,7 +130,7 @@ SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS) - all: $(LIBA) $(LIBSO) $(LIBPC) - - pywrap: all selinuxswig_python_exception.i -- CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext -I $(DESTDIR)$(INCLUDEDIR) -L $(DESTDIR)$(LIBDIR) -+ CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext - - rubywrap: all $(SWIGRUBYSO) - --- -2.21.0 -
package/libselinux/libselinux.hash +1 -1
@@ -1,5 +1,5 @@ # From: https://github.com/SELinuxProject/selinux/wiki/Releases -sha256 1bccc8873e449587d9a2b2cf253de9b89a8291b9fbc7c59393ca9e5f5f4d2693 libselinux-2.9.tar.gz +sha256 2ea2b30f671dae9d6b1391cbe8fb2ce5d36a3ee4fb1cd3c32f0d933c31b82433 libselinux-3.0.tar.gz # Hash for license file sha256 86657b4c0fe868d7cbd977cb04c63b6c667e08fa51595a7bc846ad4bed8fc364 LICENSE
package/libselinux/libselinux.mk +6 -19
@@ -4,8 +4,8 @@ # ################################################################################ -LIBSELINUX_VERSION = 2.9 -LIBSELINUX_SITE = https://github.com/SELinuxProject/selinux/releases/download/20190315 +LIBSELINUX_VERSION = 3.0 +LIBSELINUX_SITE = https://github.com/SELinuxProject/selinux/releases/download/20191204 LIBSELINUX_LICENSE = Public Domain LIBSELINUX_LICENSE_FILES = LICENSE
@@ -27,18 +27,13 @@ LIBSELINUX_DEPENDENCIES += musl-fts LIBSELINUX_MAKE_OPTS += FTS_LDLIBS=-lfts endif -ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y) ifeq ($(BR2_PACKAGE_PYTHON3),y) LIBSELINUX_DEPENDENCIES += python3 host-swig LIBSELINUX_PYLIBVER = python$(PYTHON3_VERSION_MAJOR) -else ifeq ($(BR2_PACKAGE_PYTHON),y) -LIBSELINUX_DEPENDENCIES += python host-swig -LIBSELINUX_PYLIBVER = python$(PYTHON_VERSION_MAJOR) -endif LIBSELINUX_MAKE_OPTS += \ $(PKG_PYTHON_DISTUTILS_ENV) \ - PYTHON=$(LIBSELINUX_PYLIBVER) + PYTHON=python$(PYTHON3_VERSION_MAJOR) LIBSELINUX_MAKE_INSTALL_TARGETS += install-pywrap
@@ -49,7 +44,7 @@ define LIBSELINUX_BUILD_PYTHON_BINDINGS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ $(LIBSELINUX_MAKE_OPTS) swigify pywrap endef -endif # python || python3 +endif # python3 # Filter out D_FILE_OFFSET_BITS=64. This fixes errors caused by glibc # 2.22. We set CFLAGS and LDFLAGS here because we want to win over the
@@ -82,15 +77,7 @@ define LIBSELINUX_INSTALL_TARGET_CMDS endef HOST_LIBSELINUX_DEPENDENCIES = \ - host-libsepol host-pcre host-swig - -ifeq ($(BR2_PACKAGE_PYTHON3),y) -HOST_LIBSELINUX_DEPENDENCIES += host-python3 -HOST_LIBSELINUX_PYLIBVER = python$(PYTHON3_VERSION_MAJOR) -else -HOST_LIBSELINUX_DEPENDENCIES += host-python -HOST_LIBSELINUX_PYLIBVER = python$(PYTHON_VERSION_MAJOR) -endif + host-libsepol host-pcre host-swig host-python3 HOST_LIBSELINUX_MAKE_OPTS = \ $(HOST_CONFIGURE_OPTS) \
@@ -98,7 +85,7 @@ HOST_LIBSELINUX_MAKE_OPTS = \ SHLIBDIR=$(HOST_DIR)/lib \ LDFLAGS="$(HOST_LDFLAGS) -lpcre -lpthread" \ $(HOST_PKG_PYTHON_DISTUTILS_ENV) \ - PYTHON=$(HOST_LIBSELINUX_PYLIBVER) + PYTHON=python$(PYTHON3_VERSION_MAJOR) define HOST_LIBSELINUX_BUILD_CMDS $(HOST_MAKE_ENV) $(MAKE1) -C $(@D) \
Signature · 1 line
2.24.1
PATCH v2 2/7 package/libsemanage: bump version to 3.0
Other changes:
- Remove the Python2 check, as 3.0 has removed support for Python2.
--- package/libsemanage/libsemanage.hash | 2 +- package/libsemanage/libsemanage.mk | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-)
package/libsemanage/libsemanage.hash +1 -1
@@ -1,5 +1,5 @@ # From: https://github.com/SELinuxProject/selinux/wiki/Releases -sha256 2576349d344492e73b468059767268dec1dabd8c35f3c7222c3ec2448737bc1c libsemanage-2.9.tar.gz +sha256 a497b0720d54eac427f1f3f618eed417e50ed8f4e47ed0f7a1d391bd416e84cf libsemanage-3.0.tar.gz # Hash for license file sha256 6095e9ffa777dd22839f7801aa845b31c9ed07f3d6bf8a26dc5d2dec8ccc0ef3 COPYING
package/libsemanage/libsemanage.mk +4 -12
@@ -4,8 +4,8 @@ # ################################################################################ -LIBSEMANAGE_VERSION = 2.9 -LIBSEMANAGE_SITE = https://github.com/SELinuxProject/selinux/releases/download/20190315 +LIBSEMANAGE_VERSION = 3.0 +LIBSEMANAGE_SITE = https://github.com/SELinuxProject/selinux/releases/download/20191204 LIBSEMANAGE_LICENSE = LGPL-2.1+ LIBSEMANAGE_LICENSE_FILES = COPYING LIBSEMANAGE_DEPENDENCIES = host-bison host-flex audit libselinux bzip2
@@ -31,7 +31,8 @@ HOST_LIBSEMANAGE_DEPENDENCIES = \ host-libsepol \ host-libselinux \ host-bzip2 \ - host-swig + host-swig \ + host-python3 HOST_LIBSEMANAGE_MAKE_OPTS += \ $(HOST_CONFIGURE_OPTS) \
@@ -39,19 +40,10 @@ HOST_LIBSEMANAGE_MAKE_OPTS += \ SWIG_LIB="$(HOST_DIR)/share/swig/$(SWIG_VERSION)/" \ DEFAULT_SEMANAGE_CONF_LOCATION=$(HOST_DIR)/etc/selinux/semanage.conf -ifeq ($(BR2_PACKAGE_PYTHON3),y) -HOST_LIBSEMANAGE_DEPENDENCIES += host-python3 HOST_LIBSEMANAGE_MAKE_OPTS += \ PYINC="-I$(HOST_DIR)/include/python$(PYTHON3_VERSION_MAJOR)/" \ PYTHONLIBDIR="$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/" \ PYLIBVER="python$(PYTHON3_VERSION_MAJOR)" -else -HOST_LIBSEMANAGE_DEPENDENCIES += host-python -HOST_LIBSEMANAGE_MAKE_OPTS += \ - PYINC="-I$(HOST_DIR)/include/python$(PYTHON_VERSION_MAJOR)/" \ - PYTHONLIBDIR="$(HOST_DIR)/lib/python$(PYTHON_VERSION_MAJOR)/" \ - PYLIBVER="python$(PYTHON_VERSION_MAJOR)" -endif define HOST_LIBSEMANAGE_BUILD_CMDS $(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_LIBSEMANAGE_MAKE_OPTS) all
Signature · 1 line
2.24.1
PATCH v2 3/7 package/libsepol: bump version to 3.0
In reply to Adam DuskettOther changes:
- Add policy version 32 as a default version of toolchains build with kernel headers 5.5 or later.
- Add Help text for the above.
--- package/libsepol/Config.in | 3 ++- package/libsepol/libsepol.hash | 2 +- package/libsepol/libsepol.mk | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-)
package/libsepol/Config.in +2 -1
@@ -11,6 +11,7 @@ if BR2_PACKAGE_LIBSEPOL config BR2_PACKAGE_LIBSEPOL_POLICY_VERSION int "Policy version" + default 32 if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_5 default 31 if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13 default 30 if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 default 29 if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
@@ -27,7 +28,7 @@ config BR2_PACKAGE_LIBSEPOL_POLICY_VERSION > 3.5 <= 3.14 28 (27 and 28 were added@the same time) > 3.14 <= 4.3 29 > 4.3 <= 4.13 30 - > 4.13 31 + > 4.13 <= 5.5 31 endif
package/libsepol/libsepol.hash +1 -1
@@ -1,5 +1,5 @@ # From: https://github.com/SELinuxProject/selinux/wiki/Releases -sha256 a34b12b038d121e3e459b1cbaca3c9202e983137819c16baf63658390e3f1d5d libsepol-2.9.tar.gz +sha256 5b7ae1881909f1048b06f7a0c364c5c8a86ec12e0ec76e740fe9595a6033eb79 libsepol-3.0.tar.gz # Hash for license file sha256 6095e9ffa777dd22839f7801aa845b31c9ed07f3d6bf8a26dc5d2dec8ccc0ef3 COPYING
package/libsepol/libsepol.mk +2 -2
@@ -4,8 +4,8 @@ # ################################################################################ -LIBSEPOL_VERSION = 2.9 -LIBSEPOL_SITE = https://github.com/SELinuxProject/selinux/releases/download/20190315 +LIBSEPOL_VERSION = 3.0 +LIBSEPOL_SITE = https://github.com/SELinuxProject/selinux/releases/download/20191204 LIBSEPOL_LICENSE = LGPL-2.1+ LIBSEPOL_LICENSE_FILES = COPYING
Signature · 1 line
2.24.1
PATCH v2 4/7 package/policycoreutils: bump version to 3.0
In reply to Adam Duskett--- package/policycoreutils/policycoreutils.hash | 2 +- package/policycoreutils/policycoreutils.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
package/policycoreutils/policycoreutils.hash +1 -1
@@ -1,3 +1,3 @@ # https://github.com/SELinuxProject/selinux/wiki/Releases -sha256 c53c344f28007b3c0742bd958751e9b5d2385898adeb8aec6281ae57342f0f7b policycoreutils-2.9.tar.gz +sha256 3379c9bd722e36be9bf8856c6fa373bfa9b33305ac9da5fc807cfe7fa605f489 policycoreutils-3.0.tar.gz sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 COPYING
package/policycoreutils/policycoreutils.mk +2 -2
@@ -4,8 +4,8 @@ # ################################################################################ -POLICYCOREUTILS_VERSION = 2.9 -POLICYCOREUTILS_SITE = https://github.com/SELinuxProject/selinux/releases/download/20190315 +POLICYCOREUTILS_VERSION = 3.0 +POLICYCOREUTILS_SITE = https://github.com/SELinuxProject/selinux/releases/download/20191204 POLICYCOREUTILS_LICENSE = GPL-2.0 POLICYCOREUTILS_LICENSE_FILES = COPYING
Signature · 1 line
2.24.1
PATCH v2 5/7 package/restorecond: bump version to 3.0
In reply to Adam Duskett--- package/restorecond/restorecond.hash | 2 +- package/restorecond/restorecond.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
package/restorecond/restorecond.hash +1 -1
@@ -1,5 +1,5 @@ # https://github.com/SELinuxProject/selinux/wiki/Releases -sha256 cbf9820583e641ee0462fa7bc89e6024676af281e025703e17b2d019b1a25a4f restorecond-2.9.tar.gz +sha256 32a92c9f4bf48c613f9f467ced58d8c369eec8892239cd44d5d0e139b41926dc restorecond-3.0.tar.gz # Hash for license file sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 COPYING
package/restorecond/restorecond.mk +2 -2
@@ -4,8 +4,8 @@ # ################################################################################ -RESTORECOND_VERSION = 2.9 -RESTORECOND_SITE = https://github.com/SELinuxProject/selinux/releases/download/20190315 +RESTORECOND_VERSION = 3.0 +RESTORECOND_SITE = https://github.com/SELinuxProject/selinux/releases/download/20191204 RESTORECOND_LICENSE = GPL-2.0 RESTORECOND_LICENSE_FILES = COPYING
Signature · 1 line
2.24.1
PATCH v2 6/7 package/semodule-utils: bump version to 3.0
In reply to Adam Duskett--- package/semodule-utils/semodule-utils.hash | 2 +- package/semodule-utils/semodule-utils.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
package/semodule-utils/semodule-utils.hash +1 -1
@@ -1,5 +1,5 @@ # https://github.com/SELinuxProject/selinux/wiki/Releases -sha256 8083679ee634570f6e9a18632f2c2862b9134fa308b689b2e1952a369ae5d907 semodule-utils-2.9.tar.gz +sha256 14ee2db21f36766ffbbb65770f8e7236d21675db9f0f5d40f50974711da598cf semodule-utils-3.0.tar.gz # Hash for license file sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 COPYING
package/semodule-utils/semodule-utils.mk +2 -2
@@ -4,8 +4,8 @@ # ################################################################################ -SEMODULE_UTILS_VERSION = 2.9 -SEMODULE_UTILS_SITE = https://github.com/SELinuxProject/selinux/releases/download/20190315 +SEMODULE_UTILS_VERSION = 3.0 +SEMODULE_UTILS_SITE = https://github.com/SELinuxProject/selinux/releases/download/20191204 SEMODULE_UTILS_LICENSE = GPL-2.0 SEMODULE_UTILS_LICENSE_FILES = COPYING SEMODULE_UTILS_DEPENDENCIES = libsepol
Signature · 1 line
2.24.1
PATCH v2 7/7 package/checkpolicy: bump version to 3.0
In reply to Adam Duskett--- package/checkpolicy/checkpolicy.hash | 2 +- package/checkpolicy/checkpolicy.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
package/checkpolicy/checkpolicy.hash +1 -1
@@ -1,5 +1,5 @@ # https://github.com/SELinuxProject/selinux/wiki/Releases -sha256 a946c32b284532447857e4c48830f8816867c61220c8c08bdd32e6f691335f8e checkpolicy-2.9.tar.gz +sha256 c88c719a141dd5c1202d49c378c7f063349d630522d5e04dc6e0c53da81aa4f8 checkpolicy-3.0.tar.gz # Hash for license file sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 COPYING
package/checkpolicy/checkpolicy.mk +2 -2
@@ -4,8 +4,8 @@ # ################################################################################ -CHECKPOLICY_VERSION = 2.9 -CHECKPOLICY_SITE = https://github.com/SELinuxProject/selinux/releases/download/20190315 +CHECKPOLICY_VERSION = 3.0 +CHECKPOLICY_SITE = https://github.com/SELinuxProject/selinux/releases/download/20191204 CHECKPOLICY_LICENSE = GPL-2.0 CHECKPOLICY_LICENSE_FILES = COPYING
Signature · 1 line
2.24.1