Repository navigation
Add Arch Linux pacman repository support - #436
Open
pinguinfuss wants to merge 4 commits into
Open
pinguinfuss wants to merge 4 commits into
pinguinfuss wants to merge 4 commits into
Conversation
…connects. pacman gives up after 10 seconds without data, and since the proxy only starts sending once the whole file is stored, a large package on a slow upstream was cancelled on every try and never got cached. Client requests now mark their context so the shared fetch runs on context.WithoutCancel, still bounded by the artifact client timeout. Mirror jobs don't set the marker, so cancelling a job still aborts its fetches.
… geo.mirror.pkgbuild.com as the built-in archlinux repository and more mirrors configurable under upstream.arch. Databases and file lists go through the metadata cache byte for byte, and a database signature is refreshed together with its database so the two always match. Packages and package signatures go to the artifact cache and stay available offline. The path is passed through unchanged, so Arch Linux ARM's $arch/$repo layout works too. README, config example, configuration docs and the dashboard have pacman instructions.
…hat a fetch is tied to its client again, so nobody can start an unbounded number of large downloads and leave. A server test now checks that client requests actually get the detach marker.
…erved. When the database was refreshed and the signature refetch fails, the proxy answers 404 or 502 instead of falling back to the cached signature, which pacman would reject. Paths with a decoded ? or # are refused, since they would fetch one file and cache it under another name. The README now says that pacman -Sy only works offline with cache_metadata enabled.
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 #263.
Point pacman at
/arch/archlinux/$repo/os/$archand it works. More mirrors go underupstream.arch, and Arch Linux ARM works too.Databases come unchanged from the metadata cache. Packages and their signatures come from the artifact cache. Signature checks pass, and installs keep working while the upstream is down. A database
.siggets refreshed together with its database, so an outdated one is never served.Paths containing
?or#are now rejected. APK, RPM and Debian have the same bug; I'll fix those separately.Outside the handler: a client that hangs up no longer cancels the fetch it started (up to 64 such fetches). pacman gives up after 10s without data, so big packages on slow mirrors never got cached.
Tested with real pacman in an
archlinuxcontainer:-Sy,-S(incl. an epoch package) and-F, with the upstream up and down.