From 49610aff3f03446fda6829d011a40e36f9f97e89 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Tue, 1 Mar 2022 13:15:45 -0300 Subject: [PATCH] Replace nobody user --- pkgbuild.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgbuild.sh b/pkgbuild.sh index 9344b7f..b834c0e 100755 --- a/pkgbuild.sh +++ b/pkgbuild.sh @@ -2,14 +2,14 @@ setPermissions() { useradd calbuilder -m - echo "nobody ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers + echo "calbuilder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers visudo -c chmod -R a+rw . } installAurDeps() { aurPkgs=() - sudo -u nobody makepkg --printsrcinfo > .SRCINFO + sudo -u calbuilder makepkg --printsrcinfo > .SRCINFO regExp="^[[:space:]]*\(make\)\?depends\(.\)* = \([[:alnum:][:punct:]]*\)[[:space:]]*$" mapfile -t pkgDeps < <(sed -n -e "s/$regExp/\3/p" .SRCINFO) for pkgDep in "${pkgDeps[@]}"; do @@ -24,7 +24,7 @@ installAurDeps() { if [ "${#aurPkgs[@]}" -gt 0 ]; then pacman -S --noconfirm --needed git git clone https://aur.archlinux.org/paru-bin.git - cd paru-bin; sudo -u nobody makepkg -si --noconfirm; cd .. + cd paru-bin; sudo -Hu calbuilder makepkg -si --noconfirm; cd .. for aurPkg in "${aurPkgs[@]}"; do paru -S --noconfirm "$aurPkg" done @@ -52,10 +52,10 @@ buildPackage() { } exportPackageFiles() { - sudo -u nobody makepkg --printsrcinfo > .SRCINFO + sudo -u calbuilder makepkg --printsrcinfo > .SRCINFO exportFile "srcInfo" ".SRCINFO" - pkgFile=$(sudo -u nobody makepkg --packagelist) + pkgFile=$(sudo -u calbuilder makepkg --packagelist) if [ -f "$pkgFile" ]; then relPkgFile="$(realpath --relative-base="$baseDir" "$pkgFile")" exportFile "pkgFile" "$relPkgFile" "$pkgFile"