From 323751b2843891f25edb8be7833a0255982129c6 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Mon, 28 Feb 2022 17:56:52 -0300 Subject: [PATCH] Use nobody user --- pkgbuild.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgbuild.sh b/pkgbuild.sh index cbb5dc9..913cad1 100755 --- a/pkgbuild.sh +++ b/pkgbuild.sh @@ -4,8 +4,7 @@ set -euo pipefail pacman -Syu --noconfirm --needed base-devel -useradd calbuilder -m -echo "calbuilder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers +echo "nobody ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers visudo -c chmod -R a+rw . @@ -13,13 +12,13 @@ baseDir="$PWD" cd "${INPUT_PKGDIR:-.}" oldFiles=$(find -H "$PWD") -sudo -H -u calbuilder makepkg -s --noconfirm +sudo -u nobody makepkg -s --noconfirm -sudo -u calbuilder makepkg --printsrcinfo > .SRCINFO +sudo -u nobody makepkg --printsrcinfo > .SRCINFO echo "::set-output name=srcInfo::.SRCINFO" sudo mv .SRCINFO /github/workspace -pkgFile=$(sudo -u calbuilder makepkg --packagelist) +pkgFile=$(sudo -u nobody makepkg --packagelist) relPkgFile="$(realpath --relative-base="$baseDir" "$pkgFile")" echo "::set-output name=pkgFile::$relPkgFile" sudo mv "$pkgFile" /github/workspace