mirror of
https://git.yoctoproject.org/meta-security
synced 2026-01-11 15:00:34 +00:00
recipes: WORKDIR -> UNPACKDIR transition
* WORKDIR -> UNPACKDIR transition * Switch away from S = WORKDIR Signed-off-by: Changqing Li <changqing.li@windriver.com> [Fixed up the smack changes due to prior patch] Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
committed by
Armin Kuster
parent
651767d028
commit
ceb47a8a39
@@ -90,7 +90,7 @@ do_install () {
|
||||
install -d ${D}/${PYTHON_SITEPACKAGES_DIR}
|
||||
mv ${D}/${BPN} ${D}/${PYTHON_SITEPACKAGES_DIR}
|
||||
|
||||
install -m 600 ${WORKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN}
|
||||
install -m 600 ${UNPACKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN}
|
||||
|
||||
# /var/log/sssd needs to be created in runtime. Use rmdir to catch if
|
||||
# upstream stops creating /var/log/sssd, or adds something else in
|
||||
|
||||
@@ -8,6 +8,6 @@ SRC_URI += " \
|
||||
do_install:append () {
|
||||
for i in machine-id-commit random-seed; do
|
||||
install -d ${D}/${systemd_system_unitdir}/systemd-$i.service.d
|
||||
install -m 0644 ${WORKDIR}/$i-sync.conf ${D}/${systemd_system_unitdir}/systemd-$i.service.d
|
||||
install -m 0644 ${UNPACKDIR}/$i-sync.conf ${D}/${systemd_system_unitdir}/systemd-$i.service.d
|
||||
done
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir},
|
||||
|
||||
do_install:append() {
|
||||
install -d "${D}${sysconfdir}/init.d"
|
||||
install -m 0755 "${WORKDIR}/tpm2-abrmd-init.sh" "${D}${sysconfdir}/init.d/tpm2-abrmd"
|
||||
install -m 0755 "${UNPACKDIR}/tpm2-abrmd-init.sh" "${D}${sysconfdir}/init.d/tpm2-abrmd"
|
||||
|
||||
install -d "${D}${sysconfdir}/default"
|
||||
install -m 0644 "${WORKDIR}/tpm2-abrmd.default" "${D}${sysconfdir}/default/tpm2-abrmd"
|
||||
install -m 0644 "${UNPACKDIR}/tpm2-abrmd.default" "${D}${sysconfdir}/default/tpm2-abrmd"
|
||||
}
|
||||
|
||||
FILES:${PN} += "${libdir}/systemd/system-preset \
|
||||
|
||||
@@ -6,7 +6,7 @@ SRC_URI:append = "\
|
||||
|
||||
do_install:append() {
|
||||
# dm-verity
|
||||
install ${WORKDIR}/dmverity ${D}/init.d/80-dmverity
|
||||
install ${S}/dmverity ${D}/init.d/80-dmverity
|
||||
}
|
||||
|
||||
PACKAGES:append = " initramfs-module-dmverity"
|
||||
|
||||
@@ -16,11 +16,11 @@ TARGET_CC_ARCH += "${LDFLAGS}"
|
||||
do_install:append() {
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
install -d ${D}${sysconfdir}/tmpfiles.d
|
||||
install -m 0644 ${WORKDIR}/samhain-server-volatiles.conf \
|
||||
install -m 0644 ${UNPACKDIR}/samhain-server-volatiles.conf \
|
||||
${D}${sysconfdir}/tmpfiles.d/samhain-server.conf
|
||||
else
|
||||
install -d ${D}${sysconfdir}/default/volatiles
|
||||
install -m 0644 ${WORKDIR}/samhain-server-volatiles \
|
||||
install -m 0644 ${UNPACKDIR}/samhain-server-volatiles \
|
||||
${D}${sysconfdir}/default/volatiles/samhain-server
|
||||
fi
|
||||
|
||||
|
||||
@@ -64,8 +64,8 @@ EXTRA_OEMAKE:append:aarch64 = " CPPFLAGS+=-DCONFIG_ARCH_AARCH64=1"
|
||||
EXTRA_OEMAKE:append:mips64 = " CPPFLAGS+=-DCONFIG_ARCH_MIPS64=1"
|
||||
|
||||
do_unpack_samhain() {
|
||||
cd ${WORKDIR}
|
||||
tar -xzvf samhain-${PV}.tar.gz
|
||||
cd ${UNPACKDIR}
|
||||
tar -xzvf samhain-${PV}.tar.gz -C ${WORKDIR}
|
||||
}
|
||||
|
||||
python do_unpack:append() {
|
||||
@@ -129,19 +129,19 @@ do_compile:prepend:libc-musl () {
|
||||
do_install:append () {
|
||||
oe_runmake install DESTDIR='${D}' INSTALL=install-boot
|
||||
|
||||
install -D -m 755 ${WORKDIR}/${INITSCRIPT_NAME}.init \
|
||||
install -D -m 755 ${UNPACKDIR}/${INITSCRIPT_NAME}.init \
|
||||
${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
|
||||
|
||||
install -D -m 755 ${WORKDIR}/${INITSCRIPT_NAME}.default \
|
||||
install -D -m 755 ${UNPACKDIR}/${INITSCRIPT_NAME}.default \
|
||||
${D}${sysconfdir}/default/${INITSCRIPT_NAME}
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||
if [ "${SAMHAIN_MODE}" = "no" ]; then
|
||||
install -D -m 0644 ${WORKDIR}/samhain.service ${D}/${systemd_system_unitdir}/samhain.service
|
||||
install -D -m 0644 ${UNPACKDIR}/samhain.service ${D}/${systemd_system_unitdir}/samhain.service
|
||||
else
|
||||
install -D -m 0644 ${WORKDIR}/samhain.service ${D}/${systemd_system_unitdir}/${BPN}.service
|
||||
install -D -m 0644 ${UNPACKDIR}/samhain.service ${D}/${systemd_system_unitdir}/${BPN}.service
|
||||
fi
|
||||
install -D -m 0755 ${WORKDIR}/${BPN}.init ${D}/${libexecdir}/${BPN}
|
||||
install -D -m 0755 ${UNPACKDIR}/${BPN}.init ${D}/${libexecdir}/${BPN}
|
||||
sed -i -e 's,@LIBDIR@,${libexecdir},' \
|
||||
-e 's,@SAMHAIN_HELPER@,${BPN},' \
|
||||
-e 's,@MODE_NAME@,${MODE_NAME},' \
|
||||
|
||||
@@ -62,7 +62,7 @@ do_install:append() {
|
||||
-e 's:-L${STAGING_LIBDIR}::' ${D}/${libdir}/pkgconfig/libecryptfs.pc
|
||||
sed -i -e "s: ${base_sbindir}/cryptsetup: ${sbindir}/cryptsetup:" ${D}${bindir}/ecryptfs-setup-swap
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||
install -D -m 0644 ${WORKDIR}/ecryptfs.service ${D}${systemd_system_unitdir}/ecryptfs.service
|
||||
install -D -m 0644 ${UNPACKDIR}/ecryptfs.service ${D}${systemd_system_unitdir}/ecryptfs.service
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ do_install:append() {
|
||||
|
||||
do_compile_ptest() {
|
||||
if [ ! -d ${S}/demo ]; then mkdir ${S}/demo; fi
|
||||
cp ${WORKDIR}/Makefile.test ${S}/demo/Makefile
|
||||
cp ${WORKDIR}/mhash.c ${S}/demo/
|
||||
cp ${UNPACKDIR}/Makefile.test ${S}/demo/Makefile
|
||||
cp ${UNPACKDIR}/mhash.c ${S}/demo/
|
||||
make -C ${S}/demo CFLAGS="${CFLAGS} -I${S}/include/" LDFLAGS="${LDFLAGS} -L${S}/lib/.libs"
|
||||
}
|
||||
|
||||
|
||||
@@ -18,23 +18,24 @@ SRC_URI = "file://find-chroot-py.sh \
|
||||
file://selinux-check-devices.sh \
|
||||
file://selinux-ls-unconfined.sh"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
S = "${WORKDIR}/sources"
|
||||
UNPACKDIR = "${S}"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/find-chroot-py.sh ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/find-chroot.sh ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/find-elf4tmp.sh ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/find-execstack.sh ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/find-hidden-exec.sh ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/find-nodrop-groups.sh ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/find-sh4errors.sh ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/find-sh4tmp.sh ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/lib-bin-check.sh ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/rpm-chksec.sh ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/rpm-drop-groups.sh ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/selinux-check-devices.sh ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/selinux-ls-unconfined.sh ${D}${bindir}
|
||||
install -m 0755 ${S}/find-chroot-py.sh ${D}${bindir}
|
||||
install -m 0755 ${S}/find-chroot.sh ${D}${bindir}
|
||||
install -m 0755 ${S}/find-elf4tmp.sh ${D}${bindir}
|
||||
install -m 0755 ${S}/find-execstack.sh ${D}${bindir}
|
||||
install -m 0755 ${S}/find-hidden-exec.sh ${D}${bindir}
|
||||
install -m 0755 ${S}/find-nodrop-groups.sh ${D}${bindir}
|
||||
install -m 0755 ${S}/find-sh4errors.sh ${D}${bindir}
|
||||
install -m 0755 ${S}/find-sh4tmp.sh ${D}${bindir}
|
||||
install -m 0755 ${S}/lib-bin-check.sh ${D}${bindir}
|
||||
install -m 0755 ${S}/rpm-chksec.sh ${D}${bindir}
|
||||
install -m 0755 ${S}/rpm-drop-groups.sh ${D}${bindir}
|
||||
install -m 0755 ${S}/selinux-check-devices.sh ${D}${bindir}
|
||||
install -m 0755 ${S}/selinux-ls-unconfined.sh ${D}${bindir}
|
||||
}
|
||||
|
||||
RDEPENDS:${PN} = "file libcap-ng procps findutils"
|
||||
|
||||
Reference in New Issue
Block a user