Repository navigation
Conversation
Debian packages for apt, like Nexus' apt-hosted and apt-proxy, served at
/repository/<name>/.
- crates/formats/apt: the apt format plugin. Packages are
<name>:<architecture>, versions are ordered as dpkg orders them, a
.deb's control file (gzip, xz, zstd or plain control member) is read
within bounds, the Section names the component, and the pool layout,
Packages and Release are Debian's. Uploads: Nexus' raw-body POST, a
form, or a PUT; a DELETE of a pool file deletes the version. Proxies
pass the upstream's files on unchanged and check packages against the
upstream's Packages index.
- The plugin contract grows: format options (apt's distribution) in the
descriptor, checked by the plugin and set through the admin API; host-
kept signed indexes (Query::Index, FormatPlugin::index), made when a
client asks and the packages, options or keys changed, replaced in one
transaction, by-hash copies kept a day; files of package formats
(file, fetch-file, serve-file, file_package for selectors); file-at
locations (immutable files, a size and digest checked before caching);
and Prereleases::None, so apt's 1.0-1 is a release in browse and
retention.
- Signing keys per repository (repository_signing_key): Ed25519 keys made
with rPGP, generated at creation or imported, sealed with the secret
encryption, every key signing InRelease and Release.gpg so a key is
rotated without warnings; /admin/repositories/{name}/signing-keys.
- Web UI: the format's options in the repository form, a signing keys
panel, the sources.list, key and auth.conf.d snippets, and the
distribution browsed by component and architecture.
- Tests: the plugin's units (version order, traversal, indexes), server
integration tests, and .github/scripts/apt-e2e.sh with the real apt-get
in debian:bookworm and gpgv (CI job apt-e2e).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012e6DJbxCkG53eCuDWqGGFy
schmitch
enabled auto-merge
October 31, 2026 17:20
schmitch
disabled auto-merge
October 31, 2026 17:20
main merged its own 0009 (#718), so the merge had two migrations of version 9 and every job that migrates a database failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012e6DJbxCkG53eCuDWqGGFy
…e apt branch - The apt migration is 0012 now, after main's 0010_raw_import and 0011_retention_unlisted_at. - Retention asks the plugin's `version_class` (#721): apt answers `Release` for every version, and the host's `Format::is_prerelease` of this branch is dropped. `Descriptor.prereleases` stays for the search filter, which still reads the `-` (browse lists every apt version). - The raw import's file store write sets `immutable: false`. - docs: the Signed indexes, Format options and Retention sections side by side; apt's package ids already count keep-N per architecture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012e6DJbxCkG53eCuDWqGGFy
This branch has not been deployed
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 #176
apt repositories, like Nexus' apt-hosted and apt-proxy, served at
/repository/<name>/(the Nexus path, so a migratedsources.listonly changes the host). User guide: docs/apt.md.What it does
Hosted
distributionoption). The component comes from the package'sSection(contrib/net→contrib, elsemain); architectures come from the packages.curl -H "Content-Type: multipart/form-data" --data-binary @pkg.deb, a form, orPUT.DELETEof a pool file deletes the version.<name>:<arch>(hello:amd64) as the package id, so each architecture is its own package. Versions are ordered by dpkg's rules (epoch,~, revision). Redeploy policy, selectors, retention and trusted publishing work as for the other package formats.dists/<dist>/{InRelease,Release,Release.gpg},Packages{,.gz,.xz}withby-hash/SHA256(Acquire-By-Hash: yes), andpool/<comp>/<prefix>/<name>/<file>.deb. They are made when a client asks and the packages, options or keys changed, stored in the CAS, and replaced in one transaction.by-hashcopies stay a day after a newer index stops naming them.[crypto]. Every key signsInReleaseandRelease.gpg, so a rotation needs no downtime.key.asc/key.gpghold every key; keys are managed under/admin/repositories/{name}/signing-keys.Proxy
InRelease/Release/Packagesare served unchanged and re-validated aftermetadata_ttl_seconds.pool/andby-hash/files are immutable: cached on first pull, never re-validated. Pool files are checked against size and SHA-256 from the upstream'sPackagesindex when it lists them; a mismatch is not cached (502).Web UI
sources.listwithsigned-by,auth.conf.d, upload.ReleaseandPackages).Contract additions (forge-plugin-api)
Descriptor.options+FormatPlugin::check_option+Repository::options/Remote::options; admin APIoptionson create/update;GET /admin/formatslists them.Descriptor.indexes+Query::Index+FormatPlugin::index(IndexInput→IndexFiles withSignedCopys).file/fetch-file/serve-file.FormatPlugin::file_packagelets selectors decide on a file's package.UpstreamAnswer::FileAt(FileLocation): immutable, plus size/SHA-256 checked before caching.Descriptor.prereleases(Dash|None) for the host's search filter, so the web UI lists every apt version (1.0-1). Retention uses Retention: cron schedules in a time zone, superseded/unlisted/count triggers, version and tag patterns, and format retention hooks #721'sversion_class, which apt answers withReleasefor every version.For review
rsa0.9 andcrypto-bigint0.5..cargo/audit.tomlnow ignores RUSTSEC-2026-0387, and the RUSTSEC-2023-0071 rationale is rewritten, becausersais no longer dev-only. Mitigation: Forge only generates and imports Ed25519 keys; RSA/ECDSA imports are refused, so those code paths never run with a secret key. The catch is that existing RSA archive keys can't be imported.limitationchangelog fragment. If you'd rather keep apt (Debian/Ubuntu) repositories: hosted, proxy and group, Nexus-style #176 open for them, drop theFixesline or open a follow-up issue.apt-e2e. Added torelease.yml'sREQUIRED_JOBS,ci-changes.shand DEVELOPMENT.md. It also needs adding to the branch protection's required checks, which only a maintainer can do.0012_apt.sql, after main's0009–0011) addsraw_file.immutable,repository_signing_keyandrepository_index. The DEK rotation sweep and revocation scan include the sealed keys.Tests
crates/formats/apt: 36 unit tests (dpkg version order, control parsing,.debin every compression, traversal, index rendering, proxy lookups).crates/server/tests/apt.rs:.github/scripts/apt-e2e.sh: realapt-getindebian:bookworm.signed-by+auth.conf.d,updatewith noW:/E:, install then upgrade,gpgvacross a key rotation, and a proxy of a signed mock mirror installing again while the mirror is down. Passed locally.main: clippy (-D warnings), the db/core/plugin/format suites, the server lib and apt/raw/import/retention/browse suites, webtsc+ 561 vitest tests,cargo audit, and the xtask changelog/docs checks.Generated by Claude Code