The behavior of bdist_rpm is defined by a bunch of settings in:
/usr/lib/rpm/macros
/etc/rpm/macros
$HOME/.rpmmacros
I'm willing to bet that only /usr/lib/rpm/macros
exists on your system. This is normal.
So, in order to prevent the "Arch dependent binaries in noarch package" error you would create /etc/rpm/macros
or ~/.rpmmacros
and add the following:
%_unpackaged_files_terminate_build 0
%_binaries_in_noarch_packages_terminate_build 0
Do not modify /usr/lib/rpm/macros
because that file will be overwritten by the system whenever the rpm-build package is upgraded, downgraded, or re-installed.
If you want to override the behavior for everyone on the system put the settings in /etc/rpm/macros
. If you want override the behavior for a particular user then add the settings to $HOME/.rpmmacros
.
.rpmmacros
trumps /etc/rpm/macros
which trumps /usr/lib/rpm/macros
.
Note: it's useful to examine /usr/lib/rpm/macros
to see what settings are available and for syntax examples.
As a side note, %_unpackaged_files_terminate_build 0
setting prevents the error: Installed (but unpackaged) file(s) found:
error.