[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: guix-install.sh: Add the build users to the 'kvm'
From: |
guix-commits |
Subject: |
branch master updated: guix-install.sh: Add the build users to the 'kvm' group. |
Date: |
Wed, 14 Apr 2021 15:33:29 -0400 |
This is an automated email from the git hooks/post-receive script.
lfam pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 8e214c5 guix-install.sh: Add the build users to the 'kvm' group.
8e214c5 is described below
commit 8e214c53a48a841887a59f24a20e7392b5e59b55
Author: Leo Famulari <leo@famulari.name>
AuthorDate: Thu Apr 8 18:34:43 2021 -0400
guix-install.sh: Add the build users to the 'kvm' group.
Fixes <https://bugs.gnu.org/42129>.
* etc/guix-install.sh (sys_create_build_user): If a 'kvm' group exists,
add it to the guixbuilders' lists of supplementary groups.
---
etc/guix-install.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index c84e7b7..949ef77 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -330,15 +330,20 @@ sys_create_build_user()
_msg "${PAS}group <guixbuild> created"
fi
+ if [ $(getent group kvm) ]; then
+ _msg "${INF}group kvm exists and build users will be added to it"
+ local KVMGROUP=,kvm
+ fi
+
for i in $(seq -w 1 10); do
if id "guixbuilder${i}" &>/dev/null; then
_msg "${INF}user is already in the system, reset"
- usermod -g guixbuild -G guixbuild \
+ usermod -g guixbuild -G guixbuild${KVMGROUP} \
-d /var/empty -s "$(which nologin)" \
-c "Guix build user $i" \
"guixbuilder${i}";
else
- useradd -g guixbuild -G guixbuild \
+ useradd -g guixbuild -G guixbuild${KVMGROUP} \
-d /var/empty -s "$(which nologin)" \
-c "Guix build user $i" --system \
"guixbuilder${i}";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: guix-install.sh: Add the build users to the 'kvm' group.,
guix-commits <=