Hi Alex I'd like to explain the path ${SDKTARGETSYSROOT} in this patch.
As you see, ${SDKTARGETSYSROOT} for x86_64 is /opt/poky/2.7+snapshot/sysroots/core2-64-pokysdk-linux. I make it because config file in host-sysroot as /opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux will be covered by another ARCH. For example, first install SDK for x86_64, and next install SDK for x86, as host-sysroot is same, the same config file will be covered. In that case config settings for x86_64 will be inefficacy. To resolve that problem, I put config file in target-sysroot like /opt/poky/2.7+snapshot/sysroots/core2-64-poky-linux. As each ARCH has its own target-sysroot, config file will not be covered. -- -------------------------------------------------- Zheng Ruoqin Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) ADDR.: No.6 Wenzhu Road, Software Avenue, Nanjing, 210012, China MAIL : zhengrq.f...@cn.fujistu.com > -----Original Message----- > From: Zheng, Ruoqin/郑 若钦 > Sent: Monday, September 09, 2019 6:57 PM > To: openembedded-core@lists.openembedded.org > Cc: Zheng, Ruoqin/郑 若钦 <zhengrq.f...@cn.fujitsu.com> > Subject: [OE-core][PATCH] rpm: make rpm work in toolchain. > > We need to configure rpm to use package architecture from yocto build system. > > Signed-off-by: Zheng Ruoqin <zhengrq.f...@cn.fujitsu.com> > --- > meta/recipes-devtools/rpm/rpm_4.14.2.1.bb | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb b/meta/recipes- > devtools/rpm/rpm_4.14.2.1.bb > index 063f4269a5..af8e144f96 100644 > --- a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb > +++ b/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb > @@ -102,6 +102,9 @@ do_install_append_class-native() { > done > } > > +REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}- > ${TARGET_OS}" > +SDKTARGETSYSROOT = > "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}" > + > do_install_append_class-nativesdk() { > for tool in ${WRAPPER_TOOLS}; do > create_wrapper ${D}$tool \ @@ -112,6 +115,16 @@ > do_install_append_class-nativesdk() { > done > > rm -rf ${D}/var > + install -d ${D}/${SDKTARGETSYSROOT}/etc/rpm > + > + cat >${D}/${SDKTARGETSYSROOT}/etc/rpmrc <<EOF > +arch_compat: ${MACHINE_ARCH}: ${PACKAGE_ARCHS} EOF > + sed -i 's/-nativesdk//g' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc > + sed -i 's/-/_/' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc > + cat >${D}/${SDKTARGETSYSROOT}/etc/rpm/platform <<EOF > +${MACHINE_ARCH}-pc-linux EOF > } > > # Rpm's make install creates var/tmp which clashes with base-files packaging > @@ -133,6 +146,8 @@ FILES_${PN} += "${libdir}/rpm-plugins/*.so \ > > FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \ > " > +FILES_${PN}_append_class-nativesdk += "${SDKTARGETSYSROOT}" > + > > PACKAGES += "python3-rpm" > PROVIDES += "python3-rpm" > -- > 2.17.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core