Add github_deb metadata-only package type #112
Reference in New Issue
Block a user
Delete Branch "benvin/deb-github-metadataonly"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
This stacks the Debian/apt analog of
github_rpmon top of the deb local+remote work (#111). It lets a GitHub repo's.debrelease assets be consumed as a real apt repository without artifactapi ever precaching whole packages: it derives per-asset control metadata from a ranged prefix fetch, synthesizes a flat apt repo from the cache, and redirects the actual.debdownloads to a backendreleases_remote(the generic github.com remote).Base is
benvin/deb-local-remote(stacked) to keep the diff atomic.How
github_debto the package-type enum and validity map.github_debprovider mirroringgithub_rpm:ServeRemoteservesPackages/Packages.gz/Release, returns 404 forInRelease/Release.gpg(unsigned, consumed via[trusted=yes]), and 302-redirects*.debto{proxyBaseURL}/api/v1/remote/{releases_remote}/{path}; cold-start prime with a retryable 503.deriveAssetranged-GETs the front of the.deb(anararchive), locates and fully readscontrol.tar.*, and parses the control paragraph — doubling the range if the control member is truncated. The PackagesSHA256comes from the GitHub assetdigestwhen present, else a one-time full stream;MD5sumis left unset (apt verifies against SHA256 under[trusted=yes]).github_debbackground Syncer (own worker pool, shared rate limiter, deduped queue) with per-remote DB-lease-gated scans so only one replica scans per window.github_deb_sync_statetable plusListGitHubDebRemotes/ClaimGitHubDebSyncLease/ReleaseGitHubDebSyncLeaseDB helpers, kept separate from the rpm ones.github_debremotes on create and runs the deb syncer alongside the rpm one; prime-on-create is routed by package type.Notes / deviations
Filenamestored in the Packages index is the github-relative asset path (same as rpm'sassetPath), notpool/<asset>. This is required for the.deb302 to{releases_remote=github}/{path}to resolve against github.com; it still matches the*.debredirect rule.package rpmand the task requires not modifying the rpm provider.go build,go vet,go mod tidy, andmake test(-race, incl. the Postgres lease integration tests) all pass; pre-commit clean.Do not merge — for review.
992d4a68fftofd4fb160df