I am implementing a library for reading and writing RPM files. I've used the rpm source and from max-rpm[1] as documentation on the file format.
I'm thus far able to happily read older RPMs from,CentOS5 and Fedora 10 (and earlier). I am not able to correctly read RPMs from CentOS 6 and Fedora 11 (and beyond)
The problem seems to be around the length of each header section (signature and regular header). With older RPMs, my calculation correctly computes the length, but for newer rpms (Fedora 11+ and CentOS6+) I am usually short by 4 bytes.
This causes me a problem because I'll read the Signature header and fail when reading the next header because I'm 4 bytes behind the actual start of the next header.
I have wrangled it down to a small example script that can read older rpms but fails on newer ones as described. I have also included some data and output as well in a gist found here:
If you have any pointers on how I'm reading these newer RPM files incorrectly, I'd love to know :)
-Jordan
_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx http://lists.rpm.org/mailman/listinfo/rpm-list