recipes: WORKDIR -> UNPACKDIR transition

* WORKDIR -> UNPACKDIR transition
* Switch away from S = WORKDIR

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
This commit is contained in:
Changqing Li 2024-05-28 14:35:53 +08:00 committed by Joe MacDonald
parent 8784122dde
commit de19386222
3 changed files with 12 additions and 10 deletions

View File

@ -214,12 +214,12 @@ EOF
}
install_misc_files() {
cat ${WORKDIR}/customizable_types >> \
cat ${UNPACKDIR}/customizable_types >> \
${D}${sysconfdir}/selinux/${POLICY_NAME}/contexts/customizable_types
# Install setrans.conf for mls/mcs policy
if [ -f ${WORKDIR}/setrans-${POLICY_TYPE}.conf ]; then
install -m 0644 ${WORKDIR}/setrans-${POLICY_TYPE}.conf \
if [ -f ${UNPACKDIR}/setrans-${POLICY_TYPE}.conf ]; then
install -m 0644 ${UNPACKDIR}/setrans-${POLICY_TYPE}.conf \
${D}${sysconfdir}/selinux/${POLICY_NAME}/setrans.conf
fi

View File

@ -1,4 +1,6 @@
S ?= "${WORKDIR}"
S ?= "${WORKDIR}/sources"
UNPACKDIR = "${S}"
SECTION ?= "base"
# Default is for script name to be the same as the recipe name.
@ -21,17 +23,17 @@ FILES:${PN} += "/.autorelabel"
do_install () {
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.sh ${D}${sysconfdir}/init.d/${SELINUX_SCRIPT_DST}
install -m 0755 ${S}/${SELINUX_SCRIPT_SRC}.sh ${D}${sysconfdir}/init.d/${SELINUX_SCRIPT_DST}
# Insert the relabelling code which is only needed with sysvinit
sed -i -e '/HERE/r ${WORKDIR}/${SELINUX_SCRIPT_SRC}.sh.sysvinit' \
sed -i -e '/HERE/r ${S}/${SELINUX_SCRIPT_SRC}.sh.sysvinit' \
-e '/.*HERE$/d' -e '/.*Contents.*sysvinit/d' \
${D}${sysconfdir}/init.d/${SELINUX_SCRIPT_DST}
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.service ${D}${systemd_unitdir}/system
install -m 0644 ${S}/${SELINUX_SCRIPT_SRC}.service ${D}${systemd_unitdir}/system
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.sh ${D}${bindir}
install -m 0755 ${S}/${SELINUX_SCRIPT_SRC}.sh ${D}${bindir}
sed -i -e '/.*HERE$/d' ${D}${bindir}/${SELINUX_SCRIPT_SRC}.sh
fi
}

View File

@ -166,9 +166,9 @@ do_install:class-native() {
}
do_install:append:class-target() {
if [ -e ${WORKDIR}/pam.d ]; then
if [ -e ${UNPACKDIR}/pam.d ]; then
install -d ${D}${sysconfdir}/pam.d/
install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
install -m 0644 ${UNPACKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
fi
# /var/lib/selinux is involved by seobject.py: