-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
infra!: migrate to hetzner and sign packages
BREAKING CHANGE: Packages are hosted on cdn.archpkgs.net, because GitHub Pages has a hard size limit of 100MB. BREAKING CHANGE: Packages are signed in GitHub Actions. To migrate delete the [archpkgs] section in /etc/pacman.conf and run the new setup script as shown in the readme.
- Loading branch information
Showing
9 changed files
with
306 additions
and
440 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/repo/ | ||
/public/ | ||
/rclone.conf | ||
*.pkg.tar.zst |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
#!/bin/sh | ||
exec docker run -i --rm -v "$PWD:/build" ghcr.io/dadevel/archpkgs-builder:latest bash << EOF | ||
set -euv | ||
shopt -s nullglob | ||
#!/usr/bin/env bash | ||
exec docker run -i --rm -v "$PWD:/build" -e SIGNING_KEY ghcr.io/dadevel/archpkgs-builder:latest bash << EOF | ||
set -euo pipefail | ||
cd /build | ||
rm -rf ./public | ||
echo "$SIGNING_KEY" | gpg --import - | ||
mkdir ./public | ||
cp ./index.html ./public | ||
ls -lA ./artifacts | ||
mv ./artifacts/*/*.pkg.tar.zst ./artifacts/*/*.pkg.tar.zst.sig ./public | ||
cd ./public | ||
ls -lA | ||
repo-add ./archpkgs.db.tar.gz ./*.pkg.tar.zst | ||
mv ./artifacts/package-*/*.pkg.tar.zst ./public | ||
for pkg in ./public/*.pkg.tar.zst; do | ||
gpg --detach-sign --output "\${pkg}.sig" --sign "\${pkg}" | ||
done | ||
repo-add ./public/archpkgs.db.tar.zst ./public/*.pkg.tar.zst | ||
echo 'Options +Indexes' > ./public/.htaccess | ||
EOF |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
# add repo | ||
if ! grep -q '[archpkgs]' /etc/pacman.conf 2> /dev/null; then | ||
echo >> /etc/pacman.conf | ||
echo '[archpkgs]' >> /etc/pacman.conf | ||
echo 'Server = https://cdn.archpkgs.net' >> /etc/pacman.conf | ||
fi | ||
|
||
# trust signing key | ||
curl -sSf https://raw.githubusercontent.com/dadevel/archpkgs/main/signature.gpg | pacman-key --add - | ||
pacman-key --lsign-key [email protected] | ||
|
||
# refresh cache | ||
pacman -Sy | ||
|
||
# configure path | ||
echo 'export "PATH=/opt/archpkgs/bin:$PATH"' > /etc/profile.d/archpkgs.sh | ||
|
||
# configure sudo | ||
if grep -q secure_path= /etc/sudoers; then | ||
if ! grep -q /opt/archpkgs/bin /etc/sudoers; then | ||
echo 'WARNING: Please prepend "/opt/archpkgs/bin" to the "secure_path" option in /etc/sudoers' | ||
fi | ||
fi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-----BEGIN PGP PUBLIC KEY BLOCK----- | ||
|
||
mDMEZkhmBBYJKwYBBAHaRw8BAQdAIUFwge55FV7U8oeCFw415tIz2cWMI8y1KTrP | ||
Pvj8HVa0J2FkbWluQGFyY2hwa2dzLm5ldCA8YWRtaW5AYXJjaHBrZ3MubmV0PoiT | ||
BBMWCgA7FiEEmyTnmdrlqW3/E8eHOCT7Q0MIigsFAmZIZgQCGwMFCwkIBwICIgIG | ||
FQoJCAsCBBYCAwECHgcCF4AACgkQOCT7Q0MIigvLZgD+MFi1wAjxoRlhmC/qqX72 | ||
6zPMR06IORspwcQ8J+sa6XIA/1oOc9VWdLFtqQQsRAAS7mMFR6wOaM1YtSpn65Os | ||
5G4OuDgEZkhmBBIKKwYBBAGXVQEFAQEHQIM2L0v2Zlcjm0PBu3zPcXzOtbOw9JZL | ||
ETR15wsKcRskAwEIB4h4BBgWCgAgFiEEmyTnmdrlqW3/E8eHOCT7Q0MIigsFAmZI | ||
ZgQCGwwACgkQOCT7Q0MIigs4PwD/bVgJuDJse2PxpWH20S3VGLK1deA33Yz8+bXS | ||
nbFskWEA/AxC76CZXv99KWfQ9IEGNXI1CtjjP6E3srhMzD72Sj4K | ||
=SbJd | ||
-----END PGP PUBLIC KEY BLOCK----- |