Use TOOLCHAIN_HOST_TASK:append = " ..." in your image recipe.

Alex

On Fri, 21 Jan 2022 at 21:00, Winfried <winfried_mb2@xmsnet.nl> wrote:
Hi Alex,

Thanks for the tip. When I add hardening-check to IMAGE_INSTALL the build does indeed succeed.
But then the script is installed in the target sysroot of the SDK. I would like to have it in the native (x86_64-pokysdk-linux) sysroot as it is a tool to use on the build server.

Any idea how to achieve that ?

Thanks,
Winfried
Op 21-01-2022 20:09 schreef Alexander Kanavin <alex.kanavin@gmail.com>:


You need to drop the -native suffix when installing to target image or SDK. -native is only for the bitbake build itself.

Alex

On Fri, 21 Jan 2022 at 20:07, W. Dobbe <winfried_mb2@xmsnet.nl> wrote:
Hi,

I'm writing a recipe for package hardening-check .
This package builds with only a simple Makefile (that has no install target). The recipe only installs a script hardening-check in /usr/bin.

I would like to include this script in our SDK.
The recipe itself builds fine (bitbake hardening-check-native).

But when I add hardening-check-native to IMAGE_INSTALL in my image the build fails with:
Task do_populate_sdk in myimage.bb rdepends upon non-existent task do_package_write_rpm in virtual:native:(...)/recipes-devtools/hardening-check/hardening-check_2.6.bb
Same error when I append the package to TOOLCHAIN_HOST_TASK instead.

Any idea how to solve this? Do I need to inherit my recipe from something?
Recipe included below.

Thanks in advance for the help!

regards,
Winfried


SUMMARY = "Script to check an executable for certain security weaknesses."
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=06ff97d53f05a9b8ce2a416b30f496b9"

SRC_URI = "http://ftp.debian.org/debian/pool/main/h/hardening-wrapper/hardening-wrapper_${PV}.tar.xz \
          file://0001-perl_regex.patch \
         "
SRC_URI[md5sum] = "47c93c05b4d0199be8df0d35dbd68192"
SRC_URI[sha256sum] = "c5fc46439646d0929a0605e4f3db67e57eefbbf5ceec5a2888440dbdf4450224"

RDEPENDS_${PN} = "perl"

S = "${WORKDIR}/hardening-wrapper"

do_patch () {
   cd ${S}
   patch -p1 -u -i ${WORKDIR}/0001-perl_regex.patch
}

do_configure () {
       # Specify any needed configure commands here
       :
}

do_compile () {
       export DEB_HOST_ARCH=`uname -m`
       export DEB_HOST_ARCH_OS=`uname -s`
       oe_runmake
}

do_install () {
   install -d ${D}/${bindir}
   install -m 755 ${S}/build-tree/hardening-check ${D}/${bindir}
}

BBCLASSEXTEND = "native nativesdk"




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#55941): https://lists.yoctoproject.org/g/yocto/message/55941
Mute This Topic: https://lists.yoctoproject.org/mt/88590330/3617711
Group Owner: yocto+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [winfried_mb2@xmsnet.nl]
-=-=-=-=-=-=-=-=-=-=-=-