Repository navigation
apt proxies: serve pool/updates/<component>/ paths, so a proxy of security.debian.org serves security updates - #782
Merged
Conversation
A proxy answered 404 for every pool path but `pool/<component>/<prefix>/<package>/<file>`. The Debian security archive keeps its packages one level deeper, `pool/updates/main/o/openssl/...`, listed in `dists/<distribution>/main/binary-<arch>/Packages`, so a proxy of security.debian.org, as docs/apt.md sets one up, served no security updates. A pool path may now have an area before its component. Proxies serve it and check the file against the index of the component, the directory before the name's prefix (`main`). Hosted repositories keep their one layout: a path below an area is neither found nor deleted there. Fixes #750 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012e6DJb6V3DHD5wQrsYhKda
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012e6DJb6V3DHD5wQrsYhKda
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.
Fixes #750
What
An apt proxy answered 404 for every pool path except
pool/<component>/<prefix>/<package>/<file>. The Debian security archive keeps its packages one level deeper. Itsdists/bookworm-security/main/binary-amd64/Packageslists, today:So a proxy of
security.debian.org/debian-security, set up asdocs/apt.mddescribes, servedapt-get updatebut no security package.How
layout. A pool path may have an area before its component:pool/[<area>/]<component>/<prefix>/<directory>/<file>.PoolPath::areais empty for the layout hosted repositories anddpkg's tools write, andupdatesfor the security archive.Packagesindex of its component, the directory before the name's prefix (main). That index is the one the archive'sReleaselists hashes for and the one clients read. Package selectors apply to these files as to any other pool file (hello:amd64).pool_matches) nor deleted (pool_ref) there:DELETE pool/updates/main/h/hello/…answers 404 and leavespool/main/h/hello/…alone.apt repositories are new in 2.2.0 (#176), so there is no changelog fragment.
Tests
forge-format-aptunit tests: parsing apool/updates/main/…path; selectors andpool_matcheson such a path; the proxy looks the file up indists/<d>/main/binary-amd64/Packages.gz. 44 passed.crates/server/tests/apt.rsproxies_serve_the_security_archives_pool:main's index answers 502;pool/updates/.7 passed.
.github/scripts/apt-e2e.sh: the mock mirror also holdssecurity-pkgunderpool/updates/main/, and the realapt-getinstalls it through the proxy. CI'sapt-e2ejob runs it; I did not run it locally.cargo clippy -p forge-format-apt -p forge-server --all-targets -- -D warningsandcargo fmt --checkare clean.Generated by Claude Code