In experiments with rpmbuild, we have found that it generally assumes that it is building for the host system (in this case, the "exec" platform) or "noarch". This readily breaks down in the face of cross-compilation, which is supported and commonly used in Bazel.
Determine if there's some RPM macro that can be changed to support this. _target_os? It seems like there would need to be a way to map platform CPU names to what RPM expects them to be.
The setarch command, unfortunately, may not be adequate here, as it doesn't seem to be able to cross non-compatible architectures (e.g. intel <-> arm)
In experiments with rpmbuild, we have found that it generally assumes that it is building for the host system (in this case, the "exec" platform) or "noarch". This readily breaks down in the face of cross-compilation, which is supported and commonly used in Bazel.
Determine if there's some RPM macro that can be changed to support this.
_target_os
? It seems like there would need to be a way to map platform CPU names to what RPM expects them to be.The
setarch
command, unfortunately, may not be adequate here, as it doesn't seem to be able to cross non-compatible architectures (e.g. intel <-> arm)