[Fedora-packaging] arched BuildRequires?

Panu Matilainen pmatilai at laiskiainen.org
Fri Jun 14 13:42:20 UTC 2013


On 06/14/2013 04:07 PM, Michael Schwendt wrote:
> On Fri, 14 Jun 2013 15:26:59 +0300, Panu Matilainen wrote:
>
>>> The src.rpm is built on an arbitrary build host, and Fedora publishes
>>> a single src.rpm build in the sources repo. It's just lame if the user
>>> of an x86_64 installation downloads src.rpm packages, which contain
>>> x86-32, ppc or other arch-specific dependencies. That doesn't add any
>>> value at all.
>>>
>>>> $ rpmbuild --rebuild globus-common-14.9-3.fc18.src.rpm
>>>
>>> That doesn't evaluate the src.rpm's Requires as yum-builddep or "rpm -qpR" do.
>>> So, why obfuscate the BuildRequires and the src.rpm's Requires?
>>
>> No, rpmbuild does not use src.rpm requires for determining
>> build-requires because they're no good for that.
>
> But yum-builddep does evaluate them.

Sure does, but that doesn't make it the right thing to do for src.rpm's 
built for another architecture, such as often is the case in Fedora 
source repositories. Perhaps I should patch it to at least warn about 
such a case, although IIRC that's not possible for the repository 
metadata which fakes the architecture of src.rpm's to "src" which is not 
correct either.

>> The requires of src.rpm
>> only reflect what build-requires were active during the creation of that
>> specific src.rpm file,
>
> Which is nearly what I've been preaching. "The spec file's BuildRequires
> become the src.rpm's Requires" depending on the environment the src.rpm is
> built within.

Well, yes. And exactly because of that, the src.rpm's requires are not 
cross-arch usable: the spec can contain things like

%ifarch ppc64
BuildRequires: ppc64-utils
%endif

...which might or might not end up in the src.rpm, depending on which 
arch it was created on, and the requires of that src.rpm are only valid 
for the same architecture the src.rpm was created on, not any other.

> And why collect "what build-requires were active during the creation of that
> specific src.rpm file" even when building a src.rpm with --nodeps?

s/active/parsed/ might be closer to the mark.

>
>>> Nasty, isn't it? The package specifies '(x86-32)' requirements, but you've
>>> just built for '(x86-64)'.
>>>
>>
>> See above, you're misunderstanding the meaning of src.rpm requires.
>
> That's friendly from you. I think they don't serve a useful purpose,
> if one must "recreate" them or ignore them in favour of working with
> only the spec file contents.

Mind you, I'm not arguing about the usefulness (or lack of thereof) of 
the src.rpm metadata, I'm just explaining what it is and what it is not, 
because there clearly is a lot of confusion and misconceptions about it.

	- Panu -


More information about the packaging mailing list