https://github.com/p-kraszewski/xbps-cache
LAN cache for Void Linux xbps packages
https://github.com/p-kraszewski/xbps-cache
Last synced: 8 months ago
JSON representation
LAN cache for Void Linux xbps packages
- Host: GitHub
- URL: https://github.com/p-kraszewski/xbps-cache
- Owner: p-kraszewski
- License: gpl-3.0
- Created: 2020-12-11T08:10:07.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-10T18:41:09.000Z (over 4 years ago)
- Last Synced: 2024-06-19T14:53:05.226Z (over 1 year ago)
- Language: Go
- Size: 57.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `xbps-cache`, a caching proxy for Void Linux packages
## Config file `/etc/xbps-cache.conf`
```toml
# Port and IP to listen on
# LocalEndpoint = ":8081"
# Path for downloaded files. Must exist and be writable by cache user
StoreDir = "/var/cache/xbps-cache"
# Path for logs. Must exist and be writable by cache user
LogDir = "/var/log/xbps-cache"
# Uplink server to query
#UplinkURL = "https://alpha.de.repo.voidlinux.org"
```
## Service file `/etc/sv/xbps-cache/run`
```sh
#!/bin/sh
export USERNAME=xbps-cache
exec chpst -u $USERNAME /usr/bin/xbps-cache
```
## Script to override repository definitions
```sh
#!/bin/sh
# Enter URL of configured cache
LOCAL=http://192.168.1.60:8081
# Original URL to replace
ORIG=https://alpha.de.repo.voidlinux.org
for REPO in /usr/share/xbps.d/*-repository-*.conf ; do
BASE=$(basename $REPO)
sed "s#${ORIG}#${LOCAL}#" $REPO > /etc/xbps.d/$BASE
done
```