[Rpm-maint] [rpm-software-management/rpm] %_target_cpu and various other macros are wrong in during build in BuildArch packages (Issue #3049)

Panu Matilainen notifications at github.com
Thu Apr 18 11:05:01 UTC 2024


One report of the issue is here: https://bugzilla.redhat.com/show_bug.cgi?id=2069163 but also ran into this in various other circumstances, eg #2319 and %ifarch not working in dynamic spec parts.

The spec parsing recurses through build architectures, pushing and popping %_target_cpu as it goes, and the last pop leaves the value to whatever the host is, ie almost certainly wrong and always wrong for noarch packages. It's not just %_target_cpu though, RPM_ARCH environment variable in the build scriptlets gets set from %_arch which is similarly off, and then there's %_libdir, %optflags and all.

This affects both dynamically generated .specpart and the templated parts that get expanded during doScript().

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3049
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/3049 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240418/5bdafd90/attachment-0001.html>


More information about the Rpm-maint mailing list