mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-08-12 11:49:53 +00:00
feat: get rid of sudoers modification during setup command
This commit introduces small shell wrapper, which calls archbuild mimicing symlinked command. It allows to distribute static sudoers file. Additionally build_command option has been renamed to devtools_wrapper in order to allow to keep backward compatibility
This commit is contained in:
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
usage() {
|
||||
local cmd="${0##*/}"
|
||||
echo "Usage: $cmd [options] -- [archbuild args]"
|
||||
echo " -r <repository> Repository name"
|
||||
echo " -a <architecture> Repository architecture"
|
||||
exit 1
|
||||
}
|
||||
|
||||
repository=
|
||||
architecture=
|
||||
|
||||
while getopts ":r:a:" arg; do
|
||||
case "$arg" in
|
||||
r) repository="$OPTARG" ;;
|
||||
a) architecture="$OPTARG" ;;
|
||||
*) usage ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -z $repository || -z $architecture ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
source "/usr/share/devtools/lib/archroot.sh"
|
||||
check_root "SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,NPROC,MAKEFLAGS,PACKAGER,GNUPGHOME" "${BASH_SOURCE[0]}" "$@"
|
||||
|
||||
exec bash -c '
|
||||
source "$1" "${@:2}"
|
||||
' "${repository}-${architecture}-build" "archbuild" "${@:$OPTIND}"
|
||||
@@ -35,7 +35,7 @@ retry_backoff = 1.0
|
||||
; List of additional flags passed to archbuild command.
|
||||
;archbuild_flags =
|
||||
; Path to build command.
|
||||
;build_command =
|
||||
devtools_wrapper = ahriman-archbuild
|
||||
; List of packages to be ignored during automatic updates.
|
||||
;ignore_packages =
|
||||
; Include debug packages.
|
||||
|
||||
Reference in New Issue
Block a user