[OE-core] [PATCH] meta-environment: make rpm and dnf work in toolchain

Zheng, Ruoqin zhengrq.fnst at cn.fujitsu.com
Wed Sep 4 01:43:59 UTC 2019


Hi Alex

Thank you for your advice and I have a question.

1:-> This does not seem like the right place to me to adjust the settings.

Well, did you mean that I shouldn’t adjust the settings in meta-environment recipe, instead of it, adjust the settings in the nativesdk-meson recipe?


--------------------------------------------------
Zheng Ruoqin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)

From: Alexander Kanavin [mailto:alex.kanavin at gmail.com]
Sent: Monday, September 02, 2019 4:12 PM
To: Zheng, Ruoqin/郑 若钦 <zhengrq.fnst at cn.fujitsu.com>
Cc: OE-core <openembedded-core at lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] meta-environment: make rpm and dnf work in toolchain

On Mon, 2 Sep 2019 at 03:16, Zheng Ruoqin <zhengrq.fnst at cn.fujitsu.com<mailto:zhengrq.fnst at cn.fujitsu.com>> wrote:
We need to configure dnf and rpm to use and make it compatible with package architecture from yocto build system.
+
+    mkdir -p ${D}/${SDKTARGETSYSROOT}/etc/rpm
+    echo "arch_compat: ${MACHINE_ARCH}: ${PACKAGE_ARCHS}" > ${D}/${SDKTARGETSYSROOT}/etc/rpmrc
+    sed -i 's/-nativesdk//g' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc
+    sed -i 's/-/_/' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc
+    echo "${MACHINE_ARCH}-pc-linux" > ${D}/${SDKTARGETSYSROOT}/etc/rpm/platform
+
+    mkdir -p ${D}/${SDKTARGETSYSROOT}/etc/dnf/vars
+    echo "${DEFAULTTUNE}:${MACHINE_ARCH}:${TARGET_ARCH}" > ${D}/${SDKTARGETSYSROOT}/etc/dnf/vars/arch
+    sed -i 's/-/_/' ${D}/${SDKTARGETSYSROOT}/etc/dnf/vars/arch

This does not seem like the right place to me to adjust the settings. I think (not sure; never tried it) that the right technique is in the nativesdk-meson recipe:

    install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d
    install -m 0755 ${WORKDIR}/meson-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/

    # We need to wrap the real meson with a thin env setup wrapper.
    mv ${D}${bindir}/meson ${D}${bindir}/meson.real
    install -m 0755 ${WORKDIR}/meson-wrapper ${D}${bindir}/meson

Alex


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20190904/859692ba/attachment-0001.html>


More information about the Openembedded-core mailing list