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.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184796): 
https://lists.openembedded.org/g/openembedded-core/message/184796
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]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to