On Wed, 2016-10-05 at 10:49 +0200, Michael Schroeder wrote:
On Wed, Oct 05, 2016 at 09:38:29AM +0200, Dave Plater wrote:
On 05/10/2016 09:01, Roger Oberholtzer wrote:
When I build packages in OBS, I get a source RPM for each architecture (e.g., i586, x86_64). I am curious what the differences might be in these source RPMs. I would guess there are two possible sources of differences: the package's .spec file and the OBS macros used when making the source RPMs. Are there directives in either of these that are resolved when the source RPM is built, resulting in a different source RPMs on a specific platform?
I ask because I am considering making a local copy of the source RPMs I have in OBS so that, in an emergency, they can be used to rpmbuild --rebuild the package locally. This is working fantastic for me. But I have been using the source rpm for each platform. Do I really need to do this? The built binary RPMs I build locally are, of course, for the platform on which I run rpmbuild.
Does this question make sense?
The only time a source rpm can differ between i586 and x86_64 is if it contains a binary package like flash-player for instance. Otherwise they are identical.
Not always true. Consider having:
%ifarch x86_64 Patch: x86_64.patch %endif
%ifarch x86_64 %patch %endif
Then x86_64.patch will only be in the x86_64 src rpm. (That's why it's considered bad styly to have %ifs in the Source/Patch section and your package will be rejected for Factory.)
And that's actually a case the review team tries to spot and decline. The idea IS to get re-usable src.rpms... you can APPLY the patch conditionally - but please don't add it to the src.rpm conditionally. Cheers, Dominique