diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2023-07-16 20:20:54 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2023-07-16 20:20:54 +0200 |
commit | 6ade883494654fb0c79ddd856c925457a9fdc1be (patch) | |
tree | 6d3a3fcfc0c4a444e07935c021a542586b00d991 | |
parent | a12ee835d97aff88b23c239a045bebb836c25fe9 (diff) | |
download | aurbuilder-6ade883494654fb0c79ddd856c925457a9fdc1be.tar.gz |
some changes
-rw-r--r-- | aurbuilder.install | 18 | ||||
-rwxr-xr-x | scripts/build_packages.sh | 3 |
2 files changed, 20 insertions, 1 deletions
diff --git a/aurbuilder.install b/aurbuilder.install new file mode 100644 index 0000000..c8f383c --- /dev/null +++ b/aurbuilder.install @@ -0,0 +1,18 @@ +pre_install() { + pkgname=aurbuilder + + if ! id -u $pkgname > /dev/null 2>&1; then + useradd -r -U $pkgname -d /var/lib/$pkgname -m -s /usr/bin/nologin + uid=$(id -u $pkgname) + gid=$(id -g $pkgname) + + usermod --add-subuids "${uid}000-${uid}999" \ + --add-subgids "${gid}000-${gid}999" \ + $pkgname + + loginctl enable-linger "$uid" + fi + + mkdir -p /srv/pkg + chown $pkgname:$pkgname /srv/pkg +} diff --git a/scripts/build_packages.sh b/scripts/build_packages.sh index 2393569..34bbb15 100755 --- a/scripts/build_packages.sh +++ b/scripts/build_packages.sh @@ -29,7 +29,8 @@ while read -r LINE; do --env FORCE_REBUILD="$FORCE_REBUILD" \ --env CHOWN="$(id -u "$CHOWN_TO"):$(id -g "$CHOWN_TO")" \ -v "$OUTPUT:/pkgout:z" \ - aurbuilder \ + aurbuilder + RET=$? $PODMAN rm "$CONT_NAME" |