Add Snap ecosystem support#1624
Open
andrew wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for indexing Snap packages from the Snap Store.
The full package list comes from
snapcraft.io/store/sitemap.xml(~7400 snaps in a single request) rather thanapi.snapcraft.io/api/v1/snaps/names, which is aggressively rate-limited and returned 429 on the second call during testing. The sitemap also includes<lastmod>dates so the same fetch drivesrecently_updated_package_names.Per-package metadata comes from
api.snapcraft.io/v2/snaps/info/{name}with the requiredSnap-Device-Series: 16header. This endpoint is not rate-limited in practice.Maps
links.source→ repository_url,license→ licenses,summary→ description,publisher→ namespace and maintainer. Channel-map entries are deduped by version across architectures; each version records architectures, channels, revision, base, confinement, size, and the .snap download URL with its sha3-384 hash. The base snap (core24etc) is recorded as a runtime dependency so reverse lookups like "what runs on core22" work. purl type issnap.Repology doesn't index snap at all, likely because of the v1 API rate limits.
To enable in production:
Closes #1615