rpm5 & ts.hdrFromFdno from .hdr file

Elan Ruusamäe glen at pld-linux.org
Sat May 18 22:37:09 CEST 2013


On 05/18/2013 08:58 PM, Jeffrey Johnson wrote:
> On May 18, 2013, at 7:37 AM, Elan Ruusamäe wrote:
>
>> On 05/18/2013 01:54 PM, Elan Ruusamäe wrote:
>>> seems the .hdr files that yum/anaconda creates are not parseable by rpm5 on the same system:
>>> ...
>>> above tar is available from here to debug:
>>> http://carme.pld-linux.org/~glen/rpm5-hdr.tar
>>>
>>
>> header is extracted from this repodata info:
>>
>>     <rpm:header-range start="368" end="7947"/>
>>
>> perhaps those offsets are incorrect?
>>
> Heh: offsets being different.
>
> You (in fact) asked for the change in offsets years ago. I also gave you the
> backport to rpm-4.4.9 at the time.
i suspected so...

ok. found the patch
https://github.com/pld-linux/rpm/blob/rpm-4_5/rpm-sigpad.patch

> The corollary is that the metadata header always starts at the same offset.
>
> Offhand, you do not seem to be using the functionality that you asked for: "368"
> is way too small.
it was never patched in yum part, so this can be explained
> I also suspect that you are using ancient versions of yum (and perhaps anaconda)
> if attempting to produce files containing only header metadata, rpm5 goes to some
> 'lenghts to ALWAYS verify package signatures, and EVERY package produced by
> rpmbuild has a non-repudiable signature (i.e. there is ALWAYS a signature and
> public key  present in every package produced by rpmbuild).
yum and anaconda are recent, and that _get_header_byte_range() seems 
unchanged for ages [1]
just they don't do the padding there

and i don't know what yum or anaconda-yum are doing there (it's too much 
code), but yum itself works in pld (can install packages), anaconda-yum 
gets stuck with this problem, as it seems to store .hdr of each package, 
and later it can't process it.

[1] http://yum.baseurl.org/gitweb?p=yum.git;a=commitdiff;h=2d835c75

-- 
glen



More information about the pld-devel-en mailing list