diff options
author | Andreas Grapentin <andreas@grapentin.org> | 2020-04-11 16:45:56 +0200 |
---|---|---|
committer | Andreas Grapentin <andreas@grapentin.org> | 2020-04-11 16:45:56 +0200 |
commit | 2996f9eab6bbe6cd577a9507322579fe9e41610c (patch) | |
tree | a76c7428611ff084f4cc502fbc9a7a18315f9a2b | |
parent | bce0c3db8edc05d62cfdf8fc64cf2a3f4f618b8e (diff) |
adding hook for a bare-bones parabola package build vm
-rw-r--r-- | src/hooks/hook-parabola-buildbox.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/hooks/hook-parabola-buildbox.sh b/src/hooks/hook-parabola-buildbox.sh new file mode 100644 index 0000000..d85ccfa --- /dev/null +++ b/src/hooks/hook-parabola-buildbox.sh @@ -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 |