From fa6bfb18526a8dfac99f3cfaffca0a45b7555c2e Mon Sep 17 00:00:00 2001 From: Alex Butler Date: Wed, 14 Feb 2018 18:34:01 +0000 Subject: [PATCH] Release 0.4 Add sudoers config for passwordless usage of aurto group --- bin/aurto | 2 +- conf/50_aurto_passwordless | 4 ++++ makefile | 18 ++++++------------ 3 files changed, 11 insertions(+), 13 deletions(-) create mode 100644 conf/50_aurto_passwordless diff --git a/bin/aurto b/bin/aurto index 195081f..cf88752 100755 --- a/bin/aurto +++ b/bin/aurto @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -eu -version="0.3.1" +version="0.4" command=${1:-} arg1=${2:-} diff --git a/conf/50_aurto_passwordless b/conf/50_aurto_passwordless new file mode 100644 index 0000000..2451323 --- /dev/null +++ b/conf/50_aurto_passwordless @@ -0,0 +1,4 @@ +%wheel ALL=(ALL) NOPASSWD: /usr/bin/arch-nspawn +%wheel ALL=(ALL) NOPASSWD: /usr/bin/pacsync aurto +%wheel ALL=(ALL) NOPASSWD:SETENV: /usr/bin/makechrootpkg +%wheel ALL=(ALL) NOPASSWD:SETENV: /usr/bin/aurbuild_chroot diff --git a/makefile b/makefile index cea3705..49c1bcf 100644 --- a/makefile +++ b/makefile @@ -1,20 +1,14 @@ - PREFIX = /usr -build_dist_args?= all: @rm -rf target - @mkdir -p target/etc/pacman.d - @cp conf/aurto.pacman.conf target/etc/pacman.d/aurto - - @mkdir -p target$(PREFIX)/bin - @cp -r bin/* target$(PREFIX)/bin/ - - @mkdir -p target$(PREFIX)/lib/aurto - @cp -r lib/* target$(PREFIX)/lib/aurto/ + @install -D conf/aurto.pacman.conf target/etc/pacman.d/aurto + @install -Dm440 conf/50_aurto_passwordless -t target/etc/sudoers.d + @chmod 750 target/etc/sudoers.d - @mkdir -p target$(PREFIX)/lib/systemd/system - @cp -r timer/* target$(PREFIX)/lib/systemd/system/ + @install -D bin/* -t target$(PREFIX)/bin + @install -D lib/* -t target$(PREFIX)/lib/aurto + @install -D timer/* -t target$(PREFIX)/lib/systemd/system @if command -v tree >/dev/null 2>&1; then tree target; fi