Skip to content

pkg/*: use '.sha256sum' extension for checksums - #578

Open
thaJeztah wants to merge 1 commit into
docker:mainfrom
thaJeztah:shasums
Open

thaJeztah wants to merge 1 commit into
docker:mainfrom
thaJeztah:shasums

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

commit 810d7bd introduced checksums for static binaries. These checksums use the standard format produced by sha256sum, which includes both the checksum and filename.

When adding checksum validation to the official docker:dind image repository, there was discussion which format is most expected for a per-file checksum; using the sha256sum format allows sha256sum -c <package>.sha256 to verify the package, but there's also various situations where a bare checksum is preferable.

Unfortunately, there are no strict conventions here; either option makes sense. However, some further searching for precedents / conventions led me to the containerd repository; containerd publishes checksums and also uses the sha256sum format. However, those files use a .sha256sum file- extension (see containerd@650a7e5).

Using .sha256sum as file-extension makes the format less ambiguous; it also keeps a path open to publish both a bare checksum and a sha256sum format. It also aligns with the conventions used by containerd, which gives some consistency between related projects.

Given that we didn't ship a stable release yet with these checksums, we can still make changes. This patch renames the checksumfiles to use .sha256sum as file-extension.

updates 810d7bd
updates 7d994c2

commit 810d7bd introduced checksums for
static binaries. These checksums use the standard format produced by
sha256sum, which includes both the checksum and filename.

When adding checksum validation to the official docker:dind image repository,
there was discussion which format is most expected for a per-file checksum;
using the sha256sum format allows `sha256sum -c <package>.sha256` to verify
the package, but there's also various situations where a bare checksum is
preferable.

Unfortunately, there are no strict conventions here; either option makes
sense. However, some further searching for precedents / conventions led
me to the containerd repository; containerd publishes checksums and also
uses the `sha256sum` format. However, those files use a `.sha256sum` file-
extension (see [containerd@650a7e5]).

Using `.sha256sum` as file-extension makes the format less ambiguous; it
also keeps a path open to publish _both_ a bare checksum _and_ a sha256sum
format. It also aligns with the conventions used by containerd, which gives
some consistency between related projects.

Given that we didn't ship a stable release yet with these checksums, we can
still make changes. This patch renames the checksumfiles to use `.sha256sum`
as file-extension.

updates 810d7bd
updates 7d994c2

[containerd@650a7e5]: containerd/containerd@650a7e5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@tianon-sso

Copy link
Copy Markdown
Member

IMO, .sha256sum is a really awkward file extension and we should just leave this as-is (between this and #579, the action I would take is just the cut half of #579, but it's honestly very acceptable as-is).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants