Since oe-core upgrades sysvinit to 2.96, wildcard its bbappend and drop the backported patch
Signed-off-by: Hongxu Jia <hongxu....@windriver.com> --- .../sysvinit-fix-is_selinux_enabled.patch | 71 ------------------- ....88dsf.bbappend => sysvinit_2.9%.bbappend} | 2 +- ...88dsf_selinux.inc => sysvinit_selinux.inc} | 2 - 3 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 recipes-core/sysvinit/files/sysvinit-fix-is_selinux_enabled.patch rename recipes-core/sysvinit/{sysvinit_2.88dsf.bbappend => sysvinit_2.9%.bbappend} (64%) rename recipes-core/sysvinit/{sysvinit-2.88dsf_selinux.inc => sysvinit_selinux.inc} (74%) diff --git a/recipes-core/sysvinit/files/sysvinit-fix-is_selinux_enabled.patch b/recipes-core/sysvinit/files/sysvinit-fix-is_selinux_enabled.patch deleted file mode 100644 index 62703b1..0000000 --- a/recipes-core/sysvinit/files/sysvinit-fix-is_selinux_enabled.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 0db0276202094c8d902fc93a18eca453b6211f8a Mon Sep 17 00:00:00 2001 -From: Xin Ouyang <xin.ouy...@windriver.com> -Date: Thu, 12 Apr 2012 10:48:04 +0800 -Subject: [PATCH] sysvinit: Fix is_selinux_enabled() for libselinux - -is_selinux_enabled()!=1 means SELinux is disabled by kernel -or SELinux is enabled but policy is not loaded. -Only at this time, /sbin/init program should call -selinux_init_load_policy() to detect whether SELinux is enabled -and to load SELinux policy. - -This is fixed already in the upstream sysvinit, -http://svn.savannah.nongnu.org/viewvc/sysvinit/trunk/src/init.c?root=sysvinit&r1=72&r2=90 ---- - src/init.c | 33 +++++++++++++-------------------- - 1 files changed, 13 insertions(+), 20 deletions(-) - -diff --git a/src/init.c b/src/init.c -index 27532ad..75ccf25 100644 ---- a/src/init.c -+++ b/src/init.c -@@ -54,10 +54,6 @@ - - #ifdef WITH_SELINUX - # include <selinux/selinux.h> --# include <sys/mount.h> --# ifndef MNT_DETACH /* present in glibc 2.10, missing in 2.7 */ --# define MNT_DETACH 2 --# endif - #endif - - #ifdef __i386__ -@@ -2869,22 +2865,19 @@ int main(int argc, char **argv) - - #ifdef WITH_SELINUX - if (getenv("SELINUX_INIT") == NULL) { -- const int rc = mount("proc", "/proc", "proc", 0, 0); -- if (is_selinux_enabled() > 0) { -- putenv("SELINUX_INIT=YES"); -- if (rc == 0) umount2("/proc", MNT_DETACH); -- if (selinux_init_load_policy(&enforce) == 0) { -- execv(myname, argv); -- } else { -- if (enforce > 0) { -- /* SELinux in enforcing mode but load_policy failed */ -- /* At this point, we probably can't open /dev/console, so log() won't work */ -- fprintf(stderr,"Unable to load SELinux Policy. Machine is in enforcing mode. Halting now.\n"); -- exit(1); -- } -- } -- } -- if (rc == 0) umount2("/proc", MNT_DETACH); -+ if (is_selinux_enabled() != 1) { -+ if (selinux_init_load_policy(&enforce) == 0) { -+ putenv("SELINUX_INIT=YES"); -+ execv(myname, argv); -+ } else { -+ if (enforce > 0) { -+ /* SELinux in enforcing mode but load_policy failed */ -+ /* At this point, we probably can't open /dev/console, so log() won't work */ -+ fprintf(stderr,"Unable to load SELinux Policy. Machine is in enforcing mode. Halting now.\n"); -+ exit(1); -+ } -+ } -+ } - } - #endif - /* Start booting. */ --- -1.7.5.4 - diff --git a/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend b/recipes-core/sysvinit/sysvinit_2.9%.bbappend similarity index 64% rename from recipes-core/sysvinit/sysvinit_2.88dsf.bbappend rename to recipes-core/sysvinit/sysvinit_2.9%.bbappend index 9df30b6..4ec2267 100644 --- a/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend +++ b/recipes-core/sysvinit/sysvinit_2.9%.bbappend @@ -1 +1 @@ -require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'sysvinit-2.88dsf_selinux.inc', '', d)} +require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'sysvinit_selinux.inc', '', d)} diff --git a/recipes-core/sysvinit/sysvinit-2.88dsf_selinux.inc b/recipes-core/sysvinit/sysvinit_selinux.inc similarity index 74% rename from recipes-core/sysvinit/sysvinit-2.88dsf_selinux.inc rename to recipes-core/sysvinit/sysvinit_selinux.inc index fcfbdb7..2e54330 100644 --- a/recipes-core/sysvinit/sysvinit-2.88dsf_selinux.inc +++ b/recipes-core/sysvinit/sysvinit_selinux.inc @@ -2,8 +2,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" B = "${S}" -SRC_URI += "file://sysvinit-fix-is_selinux_enabled.patch" - inherit selinux DEPENDS += "${LIBSELINUX}" -- 2.21.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#47659): https://lists.yoctoproject.org/g/yocto/message/47659 Mute This Topic: https://lists.yoctoproject.org/mt/68524567/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-