2023. 07. 25. 12:29 keltezéssel, Richard Purdie írta:
On Tue, 2023-07-25 at 12:24 +0200, Böszörményi Zoltán wrote:
2023. 07. 24. 22:16 keltezéssel, Richard Purdie írta:
On Mon, 2023-07-24 at 20:13 +0200, Böszörményi Zoltán wrote:
2023. 07. 24. 17:59 keltezéssel, Richard Purdie írta:
On Mon, 2023-07-24 at 14:35 +0200, Zoltan Boszormenyi wrote:
Some BSP architecture builds (e.g. genericx86-64 or anything from
meta-intel) don't have their /usr/lib/rpm/platform/<arch>-linux
directories. This causes rpmbuild fail on the target machine.
Use ${SDK_ARCH}-linux as the base arch which likely exists in
/usr/lib/rpm/platform and clone it as ${MACHINE_ARCH}-linux.
Also, fix %_lib and %_libdir in the new cloned platform directory
to use ${baselib} and ${libdir} so the RPM package contents will
be correct for library packages.
Signed-off-by: Zoltán Böszörményi <[email protected]>
---
meta/recipes-devtools/rpm/rpm_4.18.1.bb | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/meta/recipes-devtools/rpm/rpm_4.18.1.bb
b/meta/recipes-devtools/rpm/rpm_4.18.1.bb
index 95a9e92f96..21f0127561 100644
--- a/meta/recipes-devtools/rpm/rpm_4.18.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.18.1.bb
@@ -131,7 +131,20 @@ do_install:append:class-nativesdk() {
# Rpm's make install creates var/tmp which clashes with base-files packaging
do_install:append:class-target() {
rm -rf ${D}/var
+
+ if [ -d "${D}${prefix}/lib/rpm/platform/${SDK_ARCH}-linux" ]; then
+ if [ ! -d ${D}${prefix}/lib/rpm/platform/${MACHINE_ARCH}-linux ]; then
+ cp -r ${D}${prefix}/lib/rpm/platform/${SDK_ARCH}-linux
${D}${prefix}/lib/rpm/platform/${MACHINE_ARCH}-linux
+ fi
+ fi
SDK_ARCH should not be referenced outside of nativesdk recipes. This
reference is almost certainly incorrect as it would make the target
recipe dependent on the value of SDKMACHINE.
Please advise what setting should be used instead.
MACHINE_ARCH is what ends up in /etc/rpm/platform.
TARGET_ARCH is not available in Honister but SDK_ARCH is.
Suggest a common setting that can be used in both older and
newer Yocto versions that has the base arch name and is
usable for target builds.
I'm afraid I don't understand the problem you're running into from your
description so I don't know how to answer that. TARGET_ARCH has been
around in OE for many years so I'd be surprised it is unavailable in
honister though.
I usually verify variable settings via "bitbake -e packagename"
and what I can see is that this:
bitbake -e rpm >rpm-vars.txt 2>&1
grep TARGET_ARCH rpm-vars.txt
shows TRANSLATED_TARGET_ARCH on Honister with TARGET_ARCH missing.
Can I still use TARGET_ARCH in the rpm recipe on this old Yocto version?
In honister there is this:
$ grep TARGET_ARCH.*export * -R
meta/conf/bitbake.conf:# Make sure TARGET_ARCH isn't exported
meta/conf/bitbake.conf:TARGET_ARCH[unexport] = "1"
which is why it doesn't show up in bitbake -e, the variable does exist
though.
Thanks!
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184836):
https://lists.openembedded.org/g/openembedded-core/message/184836
Mute This Topic: https://lists.openembedded.org/mt/100328070/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-