Skip to content

package: Accept sha512 digests for repository files - #403

Open
daandemeyer wants to merge 2 commits into
amutable:mainfrom
daandemeyer:sha512-digests
Open

daandemeyer wants to merge 2 commits into
amutable:mainfrom
daandemeyer:sha512-digests

Conversation

@daandemeyer

Copy link
Copy Markdown
Member

openSUSE states only a sha512 for its packages and repomd streams, while the
snapshot, the transaction and the package pool only take a sha256. Let's bump
buck2 to a release whose download_file() checks a sha512, key a package by its
sha256 or sha512 (told apart by length), and let a metadata file carry
whichever digest its repository states. This is the groundwork for an openSUSE
release in the catalog.

@martinpitt martinpitt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks! The buck bump needs the new digests, I take the liberty to push them to your branch.

openSUSE publishes sha512 checksums for its repository metadata and packages,
but the pinned buck2 only verifies a download against a sha1 or sha256. The
2026-11-12 release accepts a sha512 in download_file(), so let's bump to it.

Signed-off-by: Daan De Meyer <daan@amutable.com>
openSUSE states a sha512 for every package and every repomd stream, and no
sha256. The snapshot, the transaction and the package pool only accept a
sha256, so we can't pin an openSUSE repository. Let's key a package by its
sha256 or its sha512, and tell a sha256 from a sha512 by its length. A metadata
file then contains whichever digest its repository states, and download_file()
checks that digest.

Signed-off-by: Daan De Meyer <daan@amutable.com>
Signed-off-by: Martin Pitt <martin@amutable.com>
@martinpitt
martinpitt enabled auto-merge (rebase) November 13, 2026 06:47
@daandemeyer
daandemeyer disabled auto-merge November 13, 2026 06:51
@daandemeyer

Copy link
Copy Markdown
Member Author

Don't merge just yet this needs more work

@martinpitt

Copy link
Copy Markdown
Member

@daandemeyer oh, ok -- want to land the buck2 bump separately? that feels independent and a nice prep to regression test the new version and get the digest updated.

@daandemeyer

Copy link
Copy Markdown
Member Author

We can land it, though I wouldn't use the sha512 stuff just yet, it might need work before it's usable for this and other use cases given how much claude is going in circles here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants