diff options
author | Christophe PRIOUZEAU <christophe.priouzeau@st.com> | 2019-11-05 14:47:09 +0000 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2019-12-09 09:22:12 -0500 |
commit | 5fd3c5b71edb99659aeb5cb5903088d84517382e (patch) | |
tree | 4e5706888c0da320f0d390a7ce34d08eadb3fb85 /recipes-security | |
parent | 44d760413920ba440439b8bc7c2a71ca26cd7a2d (diff) | |
download | meta-selinux-5fd3c5b71edb99659aeb5cb5903088d84517382e.tar.gz |
autorelabel: only selinux-autorelabel need autorelabel file
With previous implementation, several packages provided
.autorelabel file while only selinux-autorelabel manage it.
If there is several packages which try to install .autorelabel
file, an issue occur during installation of packagegroup-core-selinux.
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'recipes-security')
-rw-r--r-- | recipes-security/selinux/selinux-autorelabel_0.1.bb | 9 | ||||
-rw-r--r-- | recipes-security/selinux/selinux-initsh.inc | 7 |
2 files changed, 9 insertions, 7 deletions
diff --git a/recipes-security/selinux/selinux-autorelabel_0.1.bb b/recipes-security/selinux/selinux-autorelabel_0.1.bb index 4eb2b4e..7e7d08c 100644 --- a/recipes-security/selinux/selinux-autorelabel_0.1.bb +++ b/recipes-security/selinux/selinux-autorelabel_0.1.bb | |||
@@ -18,3 +18,12 @@ SRC_URI = "file://${BPN}.sh \ | |||
18 | INITSCRIPT_PARAMS = "start 01 S ." | 18 | INITSCRIPT_PARAMS = "start 01 S ." |
19 | 19 | ||
20 | require selinux-initsh.inc | 20 | require selinux-initsh.inc |
21 | |||
22 | do_install_append() { | ||
23 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
24 | install -d ${D}${bindir} | ||
25 | install -m 0755 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.sh ${D}${bindir} | ||
26 | sed -i -e '/.*HERE$/d' ${D}${bindir}/${SELINUX_SCRIPT_SRC}.sh | ||
27 | echo "# first boot relabelling" > ${D}/.autorelabel | ||
28 | fi | ||
29 | } | ||
diff --git a/recipes-security/selinux/selinux-initsh.inc b/recipes-security/selinux/selinux-initsh.inc index 8e31cda..6084762 100644 --- a/recipes-security/selinux/selinux-initsh.inc +++ b/recipes-security/selinux/selinux-initsh.inc | |||
@@ -29,13 +29,6 @@ do_install () { | |||
29 | 29 | ||
30 | install -d ${D}${systemd_unitdir}/system | 30 | install -d ${D}${systemd_unitdir}/system |
31 | install -m 0644 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.service ${D}${systemd_unitdir}/system | 31 | install -m 0644 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.service ${D}${systemd_unitdir}/system |
32 | |||
33 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
34 | install -d ${D}${bindir} | ||
35 | install -m 0755 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.sh ${D}${bindir} | ||
36 | sed -i -e '/.*HERE$/d' ${D}${bindir}/${SELINUX_SCRIPT_SRC}.sh | ||
37 | echo "# first boot relabelling" > ${D}/.autorelabel | ||
38 | fi | ||
39 | } | 32 | } |
40 | 33 | ||
41 | sysroot_stage_all_append () { | 34 | sysroot_stage_all_append () { |