On 10/14/26 2:48 PM, Richard W.M. Jones via devel wrote:

I have two possible concerns.

- Will the same C API still work?  We use it here:

https://github.com/libguestfs/libguestfs/blob/master/daemon/rpm-c.c

The short answer is that based on that code, your usage is not affected at all.

The longer answer is that technically there's no API change. The only thing that does is some low-level details of the package data generated at build time, but these "leak" through to users because the header tags remain such a central way to access the package data. The main "user visible" changes in v6 packages are:

1) size tags are always 64bit
2) MD5 and SHA1 hashes are no longer there

Whether these affect a given program depend on how they use the API:

For programs accessing file data through rpmfi/rpmfiles APIs this was always automatically handled. For those accessing the raw taga, most rpm-related software has been updated to use the LONG* variants of the various SIZE tags long ago, because that was what was needed to support > 4GB sizes on v4 already.

Anything using the old hashes for program logic will need to adjust. IIRC this was the main issue for koji, which used these as package identifiers, but also sanity checking that these header tags are present. All manner of things look at these tags even if they don't actually *need* the data, and if they treat a missing MD5/SHA1 tag an error then they need to be changed.

We could actually compute the SHA1 value at query time, but it could still affect some queries because the concrete tag is not there.

- Can RPM v6 packages query the old database, so we can for example
   still inspect and v2v convert older guests using the new rpmlib?

Mm, package format does not query anything, I guess that question is a bit backwards.

The short answer is that this doesn't affect the above libguestfs code in the slightest. The database format change from BDB to sqlite was a MUCH bigger compatibility bump for you.

The longer version:

The full compatibility breakdown can be found at https://rpm.org/releases/6.0.0#compatibility-notes (this is linked from the change, but the formatting was a bit messed up, now fixed).

The hard line is at rpm 4.6 from 2009, older versions cannot read v6 packages at all. For the linked libguestfs code, it relies on APIs from rpm 4.8 (think RHEL 6). In other words: for what libguestfs does, it's v6 package format compatible down to RHEL 6. Assuming the database is in readable format, but that is not changing here.

        - Panu -


Rich.


--
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to