updated README
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Eric Phillips <eric@ewpt3ch.dev>
|
# Maintainer: Eric Phillips <eric@ewpt3ch.dev>
|
||||||
|
|
||||||
pkgname=pkgstash
|
pkgname=pkgstash
|
||||||
pkgver=0.1.1
|
pkgver=0.1.2
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc='Sparse caching pacman server'
|
pkgdesc='Sparse caching pacman server'
|
||||||
arch=(x86_64)
|
arch=(x86_64)
|
||||||
@@ -10,7 +10,7 @@ backup=(etc/pkgstash/pkgstash.toml etc/pkgstash/pkgstash.env)
|
|||||||
license=(GPL-2.0-only)
|
license=(GPL-2.0-only)
|
||||||
install=pkgstash.install
|
install=pkgstash.install
|
||||||
source=("https://github.com/ewpt3ch/${pkgname}/releases/download/v${pkgver}/pkgstash-v${pkgver}-$CARCH.tar.gz")
|
source=("https://github.com/ewpt3ch/${pkgname}/releases/download/v${pkgver}/pkgstash-v${pkgver}-$CARCH.tar.gz")
|
||||||
sha256sums=('e1eed03e58259f037c71459f729b6544ff02264dc7243107bc9b0ed25b854e28')
|
sha256sums=('7b67b7e1bee72f6ee1672dcc6d737abf147d4b92a1fdf45afbb3de71d60e5a3c')
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd deploy
|
cd deploy
|
||||||
|
|||||||
@@ -1,3 +1,59 @@
|
|||||||
# pkgstash
|
# pkgstash
|
||||||
|
|
||||||
A caching pacman mirror and aur build server.
|
## A sparse caching pacman mirror
|
||||||
|
|
||||||
|
Reduces external traffic in a local network with multiple arch linux systems with minimal config. It replicates the structure of a full mirror without downloading the whole mirror. Clients add this in mirrorlist and pacman just works.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
### From PKGBUILD
|
||||||
|
|
||||||
|
Currently disributed as a binary. Download the PKGBUILD and pkgstash.install, use makepkg -i to install. See [Arch User Repository](https://wiki.archlinux.org/title/Arch_User_Repository) for more information.
|
||||||
|
|
||||||
|
### From source
|
||||||
|
|
||||||
|
clone the repo from repo root
|
||||||
|
|
||||||
|
go build ./cmd/server
|
||||||
|
|
||||||
|
Binary is called pkgstash, sample config, env and service files are in deploy/
|
||||||
|
### Configure and Start
|
||||||
|
|
||||||
|
Edit `/etc/pkgstash/pkgstash.env` and change the token to a secure one. I used openssl like so:
|
||||||
|
|
||||||
|
openssl rand -base64 64
|
||||||
|
|
||||||
|
```
|
||||||
|
#/etc/pkgstash/pkgstash.env
|
||||||
|
|
||||||
|
PKGSTASH_TOKEN=<paste secure token here>
|
||||||
|
```
|
||||||
|
|
||||||
|
start with the included systemd service
|
||||||
|
|
||||||
|
systemctl enable --now pkgstash.service
|
||||||
|
|
||||||
|
systemctl enable --now pkgstash-refresh.timer
|
||||||
|
|
||||||
|
|
||||||
|
### Technical details
|
||||||
|
|
||||||
|
1. Go as the language. It has most of the tools necessary for a http server ins the standard library and it's performant.
|
||||||
|
2. Singleflight to prevent 2 clients from causing the server to fetch the same package more than once.
|
||||||
|
3. Pkgs are written atomically to prevent serving partial files
|
||||||
|
4. Use multiple mirrors for redundancy and spread the load out.
|
||||||
|
5. Refresh the remote db files on a schedule to enable prefetching of cached pkgs.
|
||||||
|
|
||||||
|
### Roadmap
|
||||||
|
|
||||||
|
- Prefetch and cache cleanup
|
||||||
|
- Streaming on cache misses
|
||||||
|
- cli admin tool
|
||||||
|
- Custom repo
|
||||||
|
- Build server
|
||||||
|
- Automate builds on updated aur pkgs
|
||||||
|
- Auto approve on version bump with not other changes in PKGSBUILD
|
||||||
|
- Notify if a build needs approval
|
||||||
|
- Web admin interface
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user