diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2020-04-14 15:41:46 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2020-04-15 14:58:15 -0400 |
commit | a1db7a9925d781450595641692b44cb5353155cc (patch) | |
tree | 06f27a19f006551e14ee6f9b8da7e04d9757a068 | |
parent | 1735987a6499119652623dd7edd4a81b8537cc3e (diff) | |
download | meta-selinux-a1db7a9925d781450595641692b44cb5353155cc.tar.gz |
libselinux: upgrade to 3.0 (20191204)
* Backport a patch to fix build failure with musl.
* Fix typos in patches.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r-- | recipes-security/selinux/libselinux/0001-Fix-building-against-musl-and-uClibc-libc-libraries.patch | 38 | ||||
-rw-r--r-- | recipes-security/selinux/libselinux/libselinux-define-FD_CLOEXEC-as-necessary.patch | 2 | ||||
-rw-r--r-- | recipes-security/selinux/libselinux/libselinux-drop-Wno-unused-but-set-variable.patch | 2 | ||||
-rw-r--r-- | recipes-security/selinux/libselinux/libselinux-make-O_CLOEXEC-optional.patch | 2 | ||||
-rw-r--r-- | recipes-security/selinux/libselinux/libselinux-make-SOCK_CLOEXEC-optional.patch | 2 | ||||
-rw-r--r-- | recipes-security/selinux/libselinux_3.0.bb (renamed from recipes-security/selinux/libselinux_2.9.bb) | 7 |
6 files changed, 46 insertions, 7 deletions
diff --git a/recipes-security/selinux/libselinux/0001-Fix-building-against-musl-and-uClibc-libc-libraries.patch b/recipes-security/selinux/libselinux/0001-Fix-building-against-musl-and-uClibc-libc-libraries.patch new file mode 100644 index 0000000..8308553 --- /dev/null +++ b/recipes-security/selinux/libselinux/0001-Fix-building-against-musl-and-uClibc-libc-libraries.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 61bfcbffce32be51d712040c3f84293b78428184 Mon Sep 17 00:00:00 2001 | ||
2 | From: Adam Duskett <Aduskett@gmail.com> | ||
3 | Date: Tue, 7 Apr 2020 13:53:05 -0700 | ||
4 | Subject: [PATCH] Fix building against musl and uClibc libc libraries. | ||
5 | |||
6 | Currently, the src/Makefile provides the FTS_LDLIBS when building against musl | ||
7 | or uClibc. However, this is missing from utils/Makefile, which causes linking | ||
8 | to fail. | ||
9 | |||
10 | Add the FTS_LDLIBS variable to the LDLIBS variable in utils/Makefile to fix | ||
11 | compiling against uClibc and musl. | ||
12 | |||
13 | Signed-off-by: Adam Duskett <Aduskett@gmail.com> | ||
14 | |||
15 | Upstream-Status: Backport | ||
16 | [https://github.com/SELinuxProject/selinux/commit/aa40067b7b86d5e4c951fccae1aa98baff148613] | ||
17 | |||
18 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
19 | --- | ||
20 | utils/Makefile | 2 +- | ||
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/utils/Makefile b/utils/Makefile | ||
24 | index 3615063..a5632b7 100644 | ||
25 | --- a/utils/Makefile | ||
26 | +++ b/utils/Makefile | ||
27 | @@ -45,7 +45,7 @@ endif | ||
28 | |||
29 | override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS) | ||
30 | override LDFLAGS += -L../src | ||
31 | -override LDLIBS += -lselinux | ||
32 | +override LDLIBS += -lselinux $(FTS_LDLIBS) | ||
33 | PCRE_LDLIBS ?= -lpcre | ||
34 | |||
35 | ifeq ($(ANDROID_HOST),y) | ||
36 | -- | ||
37 | 2.7.4 | ||
38 | |||
diff --git a/recipes-security/selinux/libselinux/libselinux-define-FD_CLOEXEC-as-necessary.patch b/recipes-security/selinux/libselinux/libselinux-define-FD_CLOEXEC-as-necessary.patch index ad18cf5..25d4b24 100644 --- a/recipes-security/selinux/libselinux/libselinux-define-FD_CLOEXEC-as-necessary.patch +++ b/recipes-security/selinux/libselinux/libselinux-define-FD_CLOEXEC-as-necessary.patch | |||
@@ -7,7 +7,7 @@ In truly old systems, even FD_CLOEXEC may not be defined. Produce a | |||
7 | warning and duplicate the #define for FD_CLOEXEC found in | 7 | warning and duplicate the #define for FD_CLOEXEC found in |
8 | asm-generic/fcntl.h on more modern platforms. | 8 | asm-generic/fcntl.h on more modern platforms. |
9 | 9 | ||
10 | Uptream-Status: Inappropriate | 10 | Upstream-Status: Inappropriate |
11 | 11 | ||
12 | Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> | 12 | Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> |
13 | 13 | ||
diff --git a/recipes-security/selinux/libselinux/libselinux-drop-Wno-unused-but-set-variable.patch b/recipes-security/selinux/libselinux/libselinux-drop-Wno-unused-but-set-variable.patch index d58e4eb..688b4e3 100644 --- a/recipes-security/selinux/libselinux/libselinux-drop-Wno-unused-but-set-variable.patch +++ b/recipes-security/selinux/libselinux/libselinux-drop-Wno-unused-but-set-variable.patch | |||
@@ -3,7 +3,7 @@ From: Randy MacLeod <Randy.MacLeod@windriver.com> | |||
3 | Date: Tue, 30 Apr 2013 17:28:34 -0400 | 3 | Date: Tue, 30 Apr 2013 17:28:34 -0400 |
4 | Subject: [PATCH] libselinux: drop flag: -Wno-unused-but-set-variable | 4 | Subject: [PATCH] libselinux: drop flag: -Wno-unused-but-set-variable |
5 | 5 | ||
6 | Upstream status: inappropriate (older compilers only). | 6 | Upstream status: Inappropriate [older compilers only] |
7 | 7 | ||
8 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> | 8 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> |
9 | 9 | ||
diff --git a/recipes-security/selinux/libselinux/libselinux-make-O_CLOEXEC-optional.patch b/recipes-security/selinux/libselinux/libselinux-make-O_CLOEXEC-optional.patch index 6394bf0..1d6f3a7 100644 --- a/recipes-security/selinux/libselinux/libselinux-make-O_CLOEXEC-optional.patch +++ b/recipes-security/selinux/libselinux/libselinux-make-O_CLOEXEC-optional.patch | |||
@@ -14,7 +14,7 @@ compile-time option and generate a warning when it is not available. The | |||
14 | actual impact of leaking these file descriptors is minimal, though it does | 14 | actual impact of leaking these file descriptors is minimal, though it does |
15 | produce curious AVC Denied messages. | 15 | produce curious AVC Denied messages. |
16 | 16 | ||
17 | Uptream-Status: Inappropriate [O_CLOEXEC has been in Linux since 2007 and POSIX since 2008] | 17 | Upstream-Status: Inappropriate [O_CLOEXEC has been in Linux since 2007 and POSIX since 2008] |
18 | 18 | ||
19 | Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> | 19 | Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> |
20 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | 20 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> |
diff --git a/recipes-security/selinux/libselinux/libselinux-make-SOCK_CLOEXEC-optional.patch b/recipes-security/selinux/libselinux/libselinux-make-SOCK_CLOEXEC-optional.patch index febced7..77a9136 100644 --- a/recipes-security/selinux/libselinux/libselinux-make-SOCK_CLOEXEC-optional.patch +++ b/recipes-security/selinux/libselinux/libselinux-make-SOCK_CLOEXEC-optional.patch | |||
@@ -9,7 +9,7 @@ SOCK_CLOEXEC suffers the same problem as O_CLOEXEC on some older | |||
9 | platforms, we need to ensure we protect the references it it in the same | 9 | platforms, we need to ensure we protect the references it it in the same |
10 | way. | 10 | way. |
11 | 11 | ||
12 | Uptream-Status: Inappropriate | 12 | Upstream-Status: Inappropriate |
13 | 13 | ||
14 | Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> | 14 | Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> |
15 | 15 | ||
diff --git a/recipes-security/selinux/libselinux_2.9.bb b/recipes-security/selinux/libselinux_3.0.bb index f04bc4a..05d2346 100644 --- a/recipes-security/selinux/libselinux_2.9.bb +++ b/recipes-security/selinux/libselinux_3.0.bb | |||
@@ -1,14 +1,15 @@ | |||
1 | require selinux_20190315.inc | 1 | require selinux_20191204.inc |
2 | require ${BPN}.inc | 2 | require ${BPN}.inc |
3 | 3 | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0" | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0" |
5 | 5 | ||
6 | SRC_URI[md5sum] = "bb449431b6ed55a0a0496dbc366d6e31" | 6 | SRC_URI[md5sum] = "b387a66f087b6d97713570e85ec89d89" |
7 | SRC_URI[sha256sum] = "1bccc8873e449587d9a2b2cf253de9b89a8291b9fbc7c59393ca9e5f5f4d2693" | 7 | SRC_URI[sha256sum] = "2ea2b30f671dae9d6b1391cbe8fb2ce5d36a3ee4fb1cd3c32f0d933c31b82433" |
8 | 8 | ||
9 | SRC_URI += "\ | 9 | SRC_URI += "\ |
10 | file://libselinux-drop-Wno-unused-but-set-variable.patch \ | 10 | file://libselinux-drop-Wno-unused-but-set-variable.patch \ |
11 | file://libselinux-make-O_CLOEXEC-optional.patch \ | 11 | file://libselinux-make-O_CLOEXEC-optional.patch \ |
12 | file://libselinux-make-SOCK_CLOEXEC-optional.patch \ | 12 | file://libselinux-make-SOCK_CLOEXEC-optional.patch \ |
13 | file://libselinux-define-FD_CLOEXEC-as-necessary.patch \ | 13 | file://libselinux-define-FD_CLOEXEC-as-necessary.patch \ |
14 | file://0001-Fix-building-against-musl-and-uClibc-libc-libraries.patch \ | ||
14 | " | 15 | " |