You are not logged in.
I am trying to write a short script that builds multiple AUR packages, the later ones depending on the prior ones in the list. I am building these packages in a clean chroot.
Unfortunately, makechrootpkg prompts for a sudo password, which I would like to avoid, as I would prefer not to be in front of my computer the whole time that gcc builds
Is there a way to use devtools without sudo, or is there a minimal set of commands I could add to sudoers so that I could build my AUR packages in a clean chroot unattended?
Offline
archie ALL = (root) NOPASSWD: SETENV: /usr/bin/makechrootpkg
archie ALL = (root) NOPASSWD: /usr/bin/mkarchroot, /usr/bin/arch-nspawn
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
Thanks for this!
Since this is a script that I always call manually, I ended up doing this (taken from SO360201 and SO625645).
# Kill background jobs started by this script.
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
# Cache sudo credentials
sudo -v
while sleep 180; do sudo -v; done &
<rest of the script>
Last edited by valandil (2021-05-01 18:13:41)
Offline