-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
configs: s/powerpc64le/ppc64le/ the %_host_cpu macro
For older RPM versions, %_host_cpu macro used to be set wrongly in ppc64le Mock chroots. Work-around this fact. That's because RPM always decides the per-distribution %_host_cpu macro value at the rpm.rpm package built-time. The value is given to RPM by the build system/environment. The older versions of RPMs are using config.guess script (originally C&P'ed from the Automake package) for this purpose, and that script reports (even nowadays in Y2024) a wrong variant of the architecture string in it's N-ary output: $ /usr/lib/rpm/redhat/config.guess powerpc64le-unknown-linux-gnu Newer versions of RPMs (v4.19+, so Fedora 39+ and EL 10+) have moved to CMake build-system where the build-time decision is done correctly, and so the %_host_cpu contains a correct value for "newer" ppc64le chroots. The point of this commit is to fix (override) the macro for older chroots, with RPM v4.18 and older. This is what the Fedora Koji build system has been doing for ages anyways for (all) the ppc64le Mock chroots (just this is being done for everyone in Mock). The macro %_host_cpu is used, e.g., transitively by /bin/rpmbuild while checking for the 'ExclusiveArch/ExcludeArch' architecture validity. Maintainers often do: ExcludeArch: %java_arches But since %java_arches doesn't contain the "non-standard" 'powerpc64le' architecture from %_host_cpu (no similar macro does actually, neither the much more beefy ones like %go_arches), such a build in Mock would fail early: error: Architecture is not included: ppc64le That's because: $ rpm --eval %java_arches aarch64 ppc64le s390x x86_64 $ rpm --eval %_host_cpu powerpc64le This affects `BuildArch: noarch` packages, too. These packages have `%_target_cpu == noarch` initially, so RPM checks %_build_cpu: https://github.com/rpm-software-management/rpm/blob/21457de886faf2415500a8bb7cc6c816d72939ef/build/parsePreamble.c#L442-L449 which equals to %_host_cpu: $ rpm --showrc | grep build_cpu -13: _build_cpu %{_host_cpu} Relates: fedora-copr/copr#2870 Relates: https://bugzilla.redhat.com/show_bug.cgi?id=1461288
- Loading branch information
Showing
9 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters