adding hook for a bare-bones parabola package build vm

This commit is contained in:
Andreas Grapentin 2020-04-11 16:45:56 +02:00
parent bce0c3db8e
commit 2996f9eab6
No known key found for this signature in database
GPG Key ID: 7171986E4B745536

@ -0,0 +1,27 @@
#!/bin/bash
set -e
# essential tools
pacman -S --noconfirm base-devel libretools
# matter of preference
pacman -S --noconfirm vim bash-completion
# create builduser
useradd -mU parabola
chpasswd <<<"parabola:parabola"
# enable sudo access
cat >> /etc/sudoers <<EOF
parabola ALL=(ALL) NOPASSWD: ALL
EOF
# setup environment
sed -i 's|#PKGDEST=.*|PKGDEST=/home/parabola/output/packages|' /etc/makepkg.conf
sed -i 's|#SRCDEST=.*|PKGDEST=/home/parabola/output/sources|' /etc/makepkg.conf
sed -i 's|#SRCPKGDEST=.*|PKGDEST=/home/parabola/output/srcpackages|' /etc/makepkg.conf
sed -i 's|#LOGDEST=.*|PKGDEST=/home/parabola/output/makepkglogs|' /etc/makepkg.conf
sed -i '/^OPTIONS=/ s/debug/!debug/' /etc/makepkg.conf
sudo -u parabola createworkdir