first commit

This commit is contained in:
Mateusz Gruszczyński committed 2026-09-29 13:37:57 +02:00
commit 093e6a7c14
39 files changed
+1112

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
#!/bin/sh
set -eu
if [ "$(id -u)" -ne 0 ]; then
echo "Run as root" >&2
exit 1
fi
BUILDER_USER="${1:-builder}"
BUILDER_GROUP="$BUILDER_USER"
ASSUME_ALWAYS_YES=yes pkg bootstrap -f
pkg update
pkg install -y git rust python3 pkgconf cmake gmake perl5 rsync
if ! pw groupshow "$BUILDER_GROUP" >/dev/null 2>&1; then
pw groupadd "$BUILDER_GROUP"
fi
if ! pw usershow "$BUILDER_USER" >/dev/null 2>&1; then
pw useradd "$BUILDER_USER" -g "$BUILDER_GROUP" -m -s /bin/sh -c "RustProxy package builder"
fi
install -d -o "$BUILDER_USER" -g "$BUILDER_GROUP" -m 0755 /usr/local/rustproxy-build
install -d -o "$BUILDER_USER" -g "$BUILDER_GROUP" -m 0700 /usr/local/rustproxy-build/keys
echo "FreeBSD builder dependencies installed."
echo "Builder account: $BUILDER_USER"
echo "Add its SSH public key to /home/$BUILDER_USER/.ssh/authorized_keys."
echo "Then log in as $BUILDER_USER and create the repository signing key."
rust_version="$(rustc --version | awk '{print $2}')"
if [ "$(pkg version -t "$rust_version" 1.88)" = "<" ]; then
echo "RustProxy requires Rust >= 1.88, found $rust_version" >&2
exit 1
fi
echo "Rust version OK: $rust_version"