summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2022-08-28 10:29:26 +0800
committerJoe MacDonald <joe@deserted.net>2022-08-28 13:54:59 -0400
commit7d634556b0400548dd2898d1c523a7a44432cf50 (patch)
tree4019dece87fb1a6aed48350c2dc5dcac51820214
parent74b2eb2da974a7821a6e23542701f5d6535304cc (diff)
downloadmeta-selinux-7d634556b0400548dd2898d1c523a7a44432cf50.tar.gz
policycoreutils: upgrade 3.3 -> 3.4
Refresh patch. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
-rw-r--r--recipes-security/selinux/policycoreutils/policycoreutils-fixfiles-de-bashify.patch14
-rw-r--r--recipes-security/selinux/policycoreutils_3.4.bb (renamed from recipes-security/selinux/policycoreutils_3.3.bb)72
2 files changed, 43 insertions, 43 deletions
diff --git a/recipes-security/selinux/policycoreutils/policycoreutils-fixfiles-de-bashify.patch b/recipes-security/selinux/policycoreutils/policycoreutils-fixfiles-de-bashify.patch
index 70cdd4f..0e80959 100644
--- a/recipes-security/selinux/policycoreutils/policycoreutils-fixfiles-de-bashify.patch
+++ b/recipes-security/selinux/policycoreutils/policycoreutils-fixfiles-de-bashify.patch
@@ -1,4 +1,4 @@
1From 25ca94680f2fe20f49b80e8b5b180a0dbb903f17 Mon Sep 17 00:00:00 2001 1From cdc8f6e887d9ab8944e3ae89dd18bf55edf080c4 Mon Sep 17 00:00:00 2001
2From: Joe MacDonald <joe_macdonald@mentor.com> 2From: Joe MacDonald <joe_macdonald@mentor.com>
3Date: Fri, 20 Feb 2015 17:00:19 -0500 3Date: Fri, 20 Feb 2015 17:00:19 -0500
4Subject: [PATCH] fixfiles: de-bashify 4Subject: [PATCH] fixfiles: de-bashify
@@ -10,7 +10,7 @@ necessarily the best option here. Introducing a second invocation of rpm
10is minimal overhead on an operation that should happen very infrequently, 10is minimal overhead on an operation that should happen very infrequently,
11so we'll try that instead. 11so we'll try that instead.
12 12
13Upstream-Status: Pending 13Upstream-Status: Inappropriate [embedded specific]
14 14
15Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> 15Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
16Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> 16Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
@@ -19,7 +19,7 @@ Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
19 1 file changed, 14 insertions(+), 9 deletions(-) 19 1 file changed, 14 insertions(+), 9 deletions(-)
20 20
21diff --git a/scripts/fixfiles b/scripts/fixfiles 21diff --git a/scripts/fixfiles b/scripts/fixfiles
22index 1aa330f..a10837d 100755 22index c72ca0e..143cc2e 100755
23--- a/scripts/fixfiles 23--- a/scripts/fixfiles
24+++ b/scripts/fixfiles 24+++ b/scripts/fixfiles
25@@ -1,4 +1,4 @@ 25@@ -1,4 +1,4 @@
@@ -51,7 +51,7 @@ index 1aa330f..a10837d 100755
51 exclude_from_relabelling="$exclude_from_relabelling -e $i" 51 exclude_from_relabelling="$exclude_from_relabelling -e $i"
52 done < /etc/selinux/fixfiles_exclude_dirs 52 done < /etc/selinux/fixfiles_exclude_dirs
53 fi 53 fi
54@@ -138,7 +139,7 @@ fi 54@@ -140,7 +141,7 @@ fi
55 # Log directories excluded from relabelling by configuration file 55 # Log directories excluded from relabelling by configuration file
56 # 56 #
57 LogExcluded() { 57 LogExcluded() {
@@ -60,7 +60,7 @@ index 1aa330f..a10837d 100755
60 echo "skipping the directory $i" 60 echo "skipping the directory $i"
61 done 61 done
62 } 62 }
63@@ -201,8 +202,12 @@ fi 63@@ -203,8 +204,12 @@ fi
64 } 64 }
65 65
66 rpmlist() { 66 rpmlist() {
@@ -75,7 +75,7 @@ index 1aa330f..a10837d 100755
75 } 75 }
76 76
77 # 77 #
78@@ -276,7 +281,7 @@ relabel() { 78@@ -295,7 +300,7 @@ relabel() {
79 exit 1 79 exit 1
80 fi 80 fi
81 81
@@ -85,5 +85,5 @@ index 1aa330f..a10837d 100755
85 return 85 return
86 fi 86 fi
87-- 87--
882.13.0 882.25.1
89 89
diff --git a/recipes-security/selinux/policycoreutils_3.3.bb b/recipes-security/selinux/policycoreutils_3.4.bb
index 552d354..ab871a3 100644
--- a/recipes-security/selinux/policycoreutils_3.3.bb
+++ b/recipes-security/selinux/policycoreutils_3.4.bb
@@ -18,48 +18,47 @@ PAM_SRC_URI = "file://pam.d/newrole \
18 file://pam.d/run_init \ 18 file://pam.d/run_init \
19 " 19 "
20 20
21DEPENDS += "libsepol libselinux libsemanage libcap gettext-native" 21DEPENDS = "libsepol libselinux libsemanage gettext-native"
22EXTRA_DEPENDS = "libcap-ng libcgroup" 22DEPENDS:append:class-target = " libcap-ng"
23DEPENDS += "${@['', '${EXTRA_DEPENDS}']['${PN}' != '${BPN}-native']}"
24 23
25S = "${WORKDIR}/git/policycoreutils" 24S = "${WORKDIR}/git/policycoreutils"
26 25
27inherit selinux python3native 26inherit selinux python3native
28 27
29RDEPENDS:${BPN}-fixfiles += "\ 28RDEPENDS:${PN}-fixfiles = "\
30 ${BPN}-setfiles \ 29 ${PN}-setfiles \
31 grep \ 30 grep \
32 findutils \ 31 findutils \
33" 32"
34RDEPENDS:${BPN}-genhomedircon += "\ 33RDEPENDS:${PN}-genhomedircon = "\
35 ${BPN}-semodule \ 34 ${PN}-semodule \
36" 35"
37RDEPENDS:${BPN}-loadpolicy += "\ 36RDEPENDS:${PN}-loadpolicy = "\
38 libselinux \ 37 libselinux \
39 libsepol \ 38 libsepol \
40" 39"
41RDEPENDS:${BPN}-newrole += "\ 40RDEPENDS:${PN}-newrole = "\
42 libcap-ng \ 41 libcap-ng \
43 libselinux \ 42 libselinux \
44" 43"
45RDEPENDS:${BPN}-runinit += "libselinux" 44RDEPENDS:${PN}-runinit = "libselinux"
46RDEPENDS:${BPN}-secon += "libselinux" 45RDEPENDS:${PN}-secon = "libselinux"
47RDEPENDS:${BPN}-semodule += "\ 46RDEPENDS:${PN}-semodule = "\
48 libsepol \ 47 libsepol \
49 libselinux \ 48 libselinux \
50 libsemanage \ 49 libsemanage \
51" 50"
52RDEPENDS:${BPN}-sestatus += "libselinux" 51RDEPENDS:${PN}-sestatus = "libselinux"
53RDEPENDS:${BPN}-setfiles += "\ 52RDEPENDS:${PN}-setfiles = "\
54 libselinux \ 53 libselinux \
55 libsepol \ 54 libsepol \
56" 55"
57RDEPENDS:${BPN}-setsebool += "\ 56RDEPENDS:${PN}-setsebool = "\
58 libsepol \ 57 libsepol \
59 libselinux \ 58 libselinux \
60 libsemanage \ 59 libsemanage \
61" 60"
62RDEPENDS:${BPN} += "selinux-python" 61RDEPENDS:${PN}:class-target = "selinux-python"
63 62
64PACKAGES =+ "\ 63PACKAGES =+ "\
65 ${PN}-fixfiles \ 64 ${PN}-fixfiles \
@@ -74,34 +73,34 @@ PACKAGES =+ "\
74 ${PN}-setfiles \ 73 ${PN}-setfiles \
75 ${PN}-setsebool \ 74 ${PN}-setsebool \
76" 75"
77FILES:${PN}-fixfiles += "${base_sbindir}/fixfiles" 76FILES:${PN}-fixfiles = "${base_sbindir}/fixfiles"
78FILES:${PN}-genhomedircon += "${base_sbindir}/genhomedircon" 77FILES:${PN}-genhomedircon = "${base_sbindir}/genhomedircon"
79FILES:${PN}-loadpolicy += "\ 78FILES:${PN}-loadpolicy = "\
80 ${base_sbindir}/load_policy \ 79 ${base_sbindir}/load_policy \
81" 80"
82FILES:${PN}-newrole += "\ 81FILES:${PN}-newrole = "\
83 ${bindir}/newrole \ 82 ${bindir}/newrole \
84 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/newrole', '', d)} \ 83 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/newrole', '', d)} \
85" 84"
86FILES:${PN}-runinit += "\ 85FILES:${PN}-runinit = "\
87 ${base_sbindir}/run_init \ 86 ${base_sbindir}/run_init \
88 ${base_sbindir}/open_init_pty \ 87 ${base_sbindir}/open_init_pty \
89 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/run_init', '', d)} \ 88 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/run_init', '', d)} \
90" 89"
91FILES:${PN}-dbg += "${prefix}/libexec/selinux/hll/.debug" 90FILES:${PN}-dbg += "${prefix}/libexec/selinux/hll/.debug"
92FILES:${PN}-secon += "${bindir}/secon" 91FILES:${PN}-secon = "${bindir}/secon"
93FILES:${PN}-semodule += "${base_sbindir}/semodule" 92FILES:${PN}-semodule = "${base_sbindir}/semodule"
94FILES:${PN}-hll += "${prefix}/libexec/selinux/hll/*" 93FILES:${PN}-hll = "${prefix}/libexec/selinux/hll/*"
95FILES:${PN}-sestatus += "\ 94FILES:${PN}-sestatus = "\
96 ${base_sbindir}/sestatus \ 95 ${base_sbindir}/sestatus \
97 ${sysconfdir}/sestatus.conf \ 96 ${sysconfdir}/sestatus.conf \
98" 97"
99FILES:${PN}-setfiles += "\ 98FILES:${PN}-setfiles = "\
100 ${base_sbindir}/restorecon \ 99 ${base_sbindir}/restorecon \
101 ${base_sbindir}/restorecon_xattr \ 100 ${base_sbindir}/restorecon_xattr \
102 ${base_sbindir}/setfiles \ 101 ${base_sbindir}/setfiles \
103" 102"
104FILES:${PN}-setsebool += "\ 103FILES:${PN}-setsebool = "\
105 ${base_sbindir}/setsebool \ 104 ${base_sbindir}/setsebool \
106 ${datadir}/bash-completion/completions/setsebool \ 105 ${datadir}/bash-completion/completions/setsebool \
107" 106"
@@ -115,11 +114,12 @@ PACKAGECONFIG:class-target ?= "\
115 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} \ 114 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} \
116 audit \ 115 audit \
117" 116"
117PACKAGECONFIG:class-native ?= ""
118 118
119PACKAGECONFIG[libpam] = ",,libpam," 119PACKAGECONFIG[libpam] = ",,libpam,"
120PACKAGECONFIG[audit] = ",,audit," 120PACKAGECONFIG[audit] = ",,audit,"
121 121
122EXTRA_OEMAKE += "\ 122EXTRA_OEMAKE = "\
123 ${@bb.utils.contains('PACKAGECONFIG', 'libpam', 'PAMH=y', 'PAMH=', d)} \ 123 ${@bb.utils.contains('PACKAGECONFIG', 'libpam', 'PAMH=y', 'PAMH=', d)} \
124 ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'AUDITH=y', 'AUDITH=', d)} \ 124 ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'AUDITH=y', 'AUDITH=', d)} \
125 INOTIFYH=n \ 125 INOTIFYH=n \
@@ -131,6 +131,14 @@ BBCLASSEXTEND = "native"
131 131
132PCU_NATIVE_CMDS = "setfiles semodule hll" 132PCU_NATIVE_CMDS = "setfiles semodule hll"
133 133
134do_compile:prepend() {
135 export PYTHON=python3
136 export PYLIBVER='python${PYTHON_BASEVERSION}'
137 export PYTHON_CPPFLAGS="-I${STAGING_INCDIR}/${PYLIBVER}"
138 export PYTHON_LDFLAGS="${STAGING_LIBDIR}/lib${PYLIBVER}.so"
139 export PYTHON_SITE_PKG="${libdir}/${PYLIBVER}/site-packages"
140}
141
134do_compile:class-native() { 142do_compile:class-native() {
135 for PCU_CMD in ${PCU_NATIVE_CMDS} ; do 143 for PCU_CMD in ${PCU_NATIVE_CMDS} ; do
136 oe_runmake -C $PCU_CMD \ 144 oe_runmake -C $PCU_CMD \
@@ -143,14 +151,6 @@ sysroot_stage_dirs:append:class-native() {
143 cp -R $from/${prefix}/libexec $to/${prefix}/libexec 151 cp -R $from/${prefix}/libexec $to/${prefix}/libexec
144} 152}
145 153
146do_compile:prepend() {
147 export PYTHON=python3
148 export PYLIBVER='python${PYTHON_BASEVERSION}'
149 export PYTHON_CPPFLAGS="-I${STAGING_INCDIR}/${PYLIBVER}"
150 export PYTHON_LDFLAGS="${STAGING_LIBDIR}/lib${PYLIBVER}.so"
151 export PYTHON_SITE_PKG="${libdir}/${PYLIBVER}/site-packages"
152}
153
154do_install:prepend() { 154do_install:prepend() {
155 export PYTHON=python3 155 export PYTHON=python3
156 export SBINDIR="${D}/${base_sbindir}" 156 export SBINDIR="${D}/${base_sbindir}"