← Back to issue list

Add source-checksum option

View original Github issue

Metadata

Project
snapcraft
Number
#619
Type
pull request
State
closed
Author
tsimonq2
Labels
—
Created
Updated
Closed

Current evaluation

Closed as inactive after review; source-checksum support was later delivered by merged PR #980 in commit 3e9c4d381.

Resolution: closed superseded

Reason: A maintainer closed #619 due to inactivity after unresolved review questions. PR #980 later implemented the feature and was merged as commit 3e9c4d381.

Evaluated by: mr-cal-bot

No scores available.

Issue body

This adds an optional `source-checksum` tag to ensure download integrity by checking the checksum. ## Features - It supports the following `source-type`s: - `source-type: tar` - `source-type: zip` - It supports the following checksums: - `md5` - `sha1` - `sha224` - `sha256` - `sha384` - `sha512` - You can use it in the following ways: - `source-checksum: HASH` - raw hash - `source-checksum: checksum.txt` - local file - `source-checksum: http(s)://example.com/checksum` - remote URL ## Failsafes It has the following failsafes to ensure the code always works as intended: - Special exception for a checksum that doesn't match - Raises an exception for a checksum that is invalid, or incompatible with the checksums supported ## Testing coverage I have the following testing in place: - Unit tests: - Testing of each checksum in raw form with a created file (tar/zip) that has a static checksum - Creation of a checksum file and checking the checksum with that local file - Pulling http://tsimonq2.net/misc/snapcraft-checksum-tar and http://tsimonq2.net/misc/snapcraft-checksum-zip respectively and checking the checksum of the static file with those - Checking for an invalid checksum - Integration tests: - Testing of each checksum in raw form with a created file (tar/zip) that has a static checksum in the `snapcraft.yaml` files for `simple-tar` and `simple-zip` ## Discrepancies between this specification and the source If you find any difference between the code in this PR and the specification above, please comment, as that wasn't intended.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed superseded Closed as inactive after review; source-checksum support was later delivered by merged PR #980 in commit 3e9c4d381.
stealth/space-bunny-alpha — closed superseded Closed for inactivity; the feature was later merged in PR #980 via commit 3e9c4d381, adding source-checksum validation for tar, zip, deb, and rpm sources.
stealth/space-bunny-alpha — closed superseded PR #619 was closed for inactivity; the same feature was later merged in PR #980 via commit 3e9c4d381, adding source checksums for tar, zip, deb and rpm sources.
stealth/space-bunny-alpha — closed resolved PR #980 was merged as commit 3e9c4d381, adding optional source-checksum validation for tar, zip, deb and rpm sources, with checksum retrieval, validation and tests.
qwen/qwen3.6-35b-a3b — — Adding a source-checksum option for download integrity was closed due to inactivity. Reviewers requested naming adjustments and SHA-3 support, but the author did not address the final feedback.
qwen3.6-35b-a3b-mtp-q6 — — Proposed a source-checksum option for download integrity. Reviewers requested code changes and asked about SHA-3-384 autodetection. The author updated the code but did not answer, leading to closure due to inactivity.

Update history

No update history recorded yet.

Related work

  • Superseded By: canonical/snapcraft#980 (confidence 99%)

    Merged PR #980 delivered source-checksum validation and tests after #619 was closed.

Related issues

Issue Project State Summary Similarity
#980 sources: add optional "source-checksum" property snapcraft merged PR #980 merged as commit 3e9c4d381, adding the optional source-checksum property to verify integrity of tar, zip, deb and rpm sources, with algorithm/digest errors plus unit and integration tests.
73%
#26 sources: add support for source checksum craft-parts merged Merged in #26 via bff37166, adding file checksum verification for the source-checksum part property.
72%
#355 Source checksum mismatch is confusing craft-parts closed Closed after checksum mismatch errors gained clearer part/source context in PR #1683, merged as commit 4efd5bd0.
71%