https://bugzilla.redhat.com/show_bug.cgi?id=2073765
--- Comment #4 from Robin Lee robinlee.sysu@gmail.com --- Spec URL: https://cheeselee.fedorapeople.org/arch-test.spec SRPM URL: https://cheeselee.fedorapeople.org/arch-test-0.18-1.fc36.src.rpm
Changes: 1. use %generate_buildrequires to generate the list of binutils BR 2. Don't run configure to not opt out any arch 3. Include the mingw arches and apply an upstream patch to fix the build 4. Convert to rpmautospec
(In reply to Jakub Kadlčík from comment #3)
BuildRequires: binutils-riscv64-linux-gnu BuildRequires: binutils-aarch64-linux-gnu BuildRequires: binutils-alpha-linux-gnu BuildRequires: binutils-arc-linux-gnu ...
Are these really needed? I removed all the binutils-* BuildRequires and the package still successfully builds in Copr for all Fedora chroots and architectures.
I use %generate_buildrequires to generate the list of binutils variants
%{_bindir}/* %{_prefix}/lib/* %{_mandir}/man1/*
Please be more specific here, for example
%{_bindir}/%{name} %{_bindir}/elf-arch ...
done
arch-test.noarch: E: arch-independent-package-contains-binary-or-object /usr/lib/arch-test/alpha arch-test.noarch: E: arch-independent-package-contains-binary-or-object /usr/lib/arch-test/amd64 arch-test.noarch: E: arch-independent-package-contains-binary-or-object /usr/lib/arch-test/arm64
Fedora-review tool returns these in the Rpmlint section but if I understand correctly, this is done intentionally.
Yes. That's the trick of this package. It simple build different kinds of executables and run each to see whether the current environment can run codes of that arch.