Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: add PKGID and HDRID tag extensions #3330

Open
pmatilai opened this issue Sep 26, 2024 · 0 comments
Open

RFE: add PKGID and HDRID tag extensions #3330

pmatilai opened this issue Sep 26, 2024 · 0 comments
Labels
API API related v6 Related to rpm v6 (readiness)
Milestone

Comments

@pmatilai
Copy link
Member

Related to #2633, rpm currently aliases RPMTAG_PKGID to MD5 and RPMTAG_HDRID to SHA1HEADER tags. This doesn't cut it going forward because said tags will no longer be there.

We can sort of keep these alive by adding tag extensions that provide an identifying hash for the package. Differentiating between the header and the package id was always pointless IMO but even more so in v6 where the main header carries a digest on the payload too. So if we conclude that the header is what identifies a package, then we can conclude that pkgid and hdrid should be the same exact thing. And with >= v4 packages we can always calculate any hash we like on the immutable region, so we can eg use SHA256HEADER as the header ID and dynamically calculate it for older v4 packages that lack it.
Another difference between RPMTAG_PKGID and RPMTAG_HDRID is that the former has been in binary form, whereas the latter has been in ASCII form. That difference we could easily retain if we want - whether it makes sense is a different matter.

Pointing the aliases to something entirely different of course has the potential to break something, but it's either that or those tag names come simply invalid forever.

@pmatilai pmatilai added API API related v6 Related to rpm v6 (readiness) labels Sep 26, 2024
@pmatilai pmatilai added this to the 6.0.0 alpha milestone Sep 26, 2024
@pmatilai pmatilai added this to RPM Sep 26, 2024
@github-project-automation github-project-automation bot moved this to Backlog in RPM Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API related v6 Related to rpm v6 (readiness)
Projects
Status: Backlog
Development

No branches or pull requests

1 participant