From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CN5rDVaGb2CBigAAgWs5BA (envelope-from ) for ; Fri, 09 Apr 2021 00:40:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yD5RB1aGb2BZKQAA1q6Kng (envelope-from ) for ; Thu, 08 Apr 2021 22:40:22 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E50352097D for ; Fri, 9 Apr 2021 00:40:20 +0200 (CEST) Received: from localhost ([::1]:40622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUdJz-0000rN-Hl for larch@yhetil.org; Thu, 08 Apr 2021 18:40:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUdJi-0000r9-TN for bug-guix@gnu.org; Thu, 08 Apr 2021 18:40:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36942) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lUdJi-0004mo-Lh for bug-guix@gnu.org; Thu, 08 Apr 2021 18:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lUdJi-0004Uk-Go for bug-guix@gnu.org; Thu, 08 Apr 2021 18:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42129: guix-install.sh does not add build users to kvm group Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 08 Apr 2021 22:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42129 X-GNU-PR-Package: guix X-GNU-PR-Keywords: easy To: Marius Bakke Received: via spool by 42129-submit@debbugs.gnu.org id=B42129.161792154917211 (code B ref 42129); Thu, 08 Apr 2021 22:40:02 +0000 Received: (at 42129) by debbugs.gnu.org; 8 Apr 2021 22:39:09 +0000 Received: from localhost ([127.0.0.1]:48488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUdIr-0004TX-9I for submit@debbugs.gnu.org; Thu, 08 Apr 2021 18:39:09 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:54891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUdIp-0004T9-9M for 42129@debbugs.gnu.org; Thu, 08 Apr 2021 18:39:08 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 279D05C00B8; Thu, 8 Apr 2021 18:39:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 08 Apr 2021 18:39:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=xmPrvDxukJVNLoRh/2792Cl9 fHYApFDxzyn7MYwkGQ8=; b=mhwUb8XLVINA8zEp/zwgous/7D34JQjEnEVtRN+M n2l9e3Tl5VQpxnWFvCxO1Ih6M0sbMFsZvnOD/YAUVTtRG1YDOqcj4qYm+zmHa3dv O6ZrfUOtQrU6etzTh/LBV98oHgK3qi1hwlR97UCFUcwimB8Tq1xhhWi/GrojFtNu pOM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=xmPrvD xukJVNLoRh/2792Cl9fHYApFDxzyn7MYwkGQ8=; b=I/vp8FX7neVJgGi+95/EDr BuMKrIgFTFhoyAxfwdJwOey+9cINzQq+Op6DPHhitgtVsp+s7hQDhJQFKsekl+O1 3P+QmzVwFpa2PKrrGif6JpSRq2AHGH2B5BIMB98oPj8mn/BGkRqv6upNITxbVE75 RWgaTWsURZXYeTPOwlChTbjv4gB+px34LXntPBSkTJ3KRmt/xy/yCuuLzBwwY6xf IqJQbb5tNbelHVFIB7RWymy8oApbw+FOAakQ5Ahlyp1vAF9sHkL9CyNO7Jt6Drg5 4BZ3nILAa8f79MHctn9013pJPZazwM+d1ERp76FI0Okks8E2aiEq7rGKKwB2erdQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudektddguddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefnvghoucfh rghmuhhlrghrihcuoehlvghosehfrghmuhhlrghrihdrnhgrmhgvqeenucggtffrrghtth gvrhhnpedukeevgeetkeeltefgiedtjefgjeekffduteehvdfhueekudelieekjeefheff teenucfkphepuddttddruddurdduieelrdduudeknecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomheplhgvohesfhgrmhhulhgrrhhirdhnrghmvg X-ME-Proxy: Received: from localhost (pool-100-11-169-118.phlapa.fios.verizon.net [100.11.169.118]) by mail.messagingengine.com (Postfix) with ESMTPA id 9F46F240065; Thu, 8 Apr 2021 18:39:01 -0400 (EDT) Date: Thu, 8 Apr 2021 18:38:59 -0400 From: Leo Famulari Message-ID: References: <875zb91w0d.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0Siuxbb1LkUtNrSn" Content-Disposition: inline In-Reply-To: <875zb91w0d.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 42129@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617921621; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=xmPrvDxukJVNLoRh/2792Cl9fHYApFDxzyn7MYwkGQ8=; b=WYlxl13HGyWWywbdrxp8+rCIU3Lf1zi40K0Ym8qTvF5mahso1v7zuPFpGSW0NGe+hZ0BnY 8XqMxDxLgrlTw7lX1MYiNjLClIdoJJC9YvJpqsJ9c44Tfe2dwstVbtSNDexAU36yNDl7hs bhm1cDHJvMwO2FoQOsiS4nGV5JRSfDhLVX1fCJLFWgMJa2bcMQ1kKasvwJrs/5VHEb/dct r0/7BQtSFQ6TCHr4lYTLPiFws7rxEhSH6Rj/gb4bWxCuVqe0YtZrW4uPUQw2dhHGjcJ646 E2dRd2xmd+TUl35W5dviaLxzncXMTN6uioWhsJJm4l6PXux0Q0xSzLURpb/J0g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617921621; a=rsa-sha256; cv=none; b=ew0f8o08Ds92Kikgiv5S9UtOYiRptlH3rR9dCDjGsN3FgJWEk2KV+MenzyBgTVeJIBzLcv mreGb7lhXppx3yfmck0p3+v58K1EccJcYK9t/qfYn9ztGYSi5M94Pfw/qSAelhXtNxR95B aNGshFAsmExV23Mz9vBituoQi/Q2J8uZTwUZfpOh+K7EEkoWi4DpbT+cmhOeE4X7DC0mXM q5kDqUfayWKp7ggo3i7NTzvxIaZ2twftG4WqbD5Ieqte8zUCkDyfXVr0OpAhNfHPRAS0tg pZicsBaLQ1/bDK8LetHarDeI7LtoWArKNUtnQb0NRFi2Y/p2V08J4oOkjfguFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=famulari.name header.s=mesmtp header.b=mhwUb8XL; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b="I/vp8FX7"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.04 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=famulari.name header.s=mesmtp header.b=mhwUb8XL; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b="I/vp8FX7"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: E50352097D X-Spam-Score: -2.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: +Yadis/4xzlx --0Siuxbb1LkUtNrSn Content-Type: multipart/mixed; boundary="war7xvZVd7f2FQ+H" Content-Disposition: inline --war7xvZVd7f2FQ+H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 29, 2020 at 10:01:54PM +0200, Marius Bakke wrote: > guix-install.sh should add the build users to the 'kvm' group if present > so that commands that require use of KVM can succeed. Here is a patch (untested) that makes sure a 'kvm' group exists and adds it to the guixbuilders' groups. --war7xvZVd7f2FQ+H Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-guix-install.sh-Add-the-build-users-to-the-kvm-group.patch" Content-Transfer-Encoding: quoted-printable =46rom 929102f7b52d00f731a9f61fb2fe32bad441f1dd Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari Date: Thu, 8 Apr 2021 18:34:43 -0400 Subject: [PATCH] guix-install.sh: Add the build users to the 'kvm' group. * etc/guix-install.sh (sys_create_build_user): Ensure that a 'kvm' group ex= ists, and add it to the guixbuilders' lists of supplementary groups. --- etc/guix-install.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index c84e7b7577..15fa44f1e2 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -330,15 +330,22 @@ sys_create_build_user() _msg "${PAS}group created" fi =20 + if [ $(getent group kvm) ]; then + _msg "${INF}group kvm exists" + else + groupadd --system kvm + _msg "${PAS}group created" + 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,kvm \ -d /var/empty -s "$(which nologin)" \ -c "Guix build user $i" \ "guixbuilder${i}"; else - useradd -g guixbuild -G guixbuild \ + useradd -g guixbuild -G guixbuild,kvm \ -d /var/empty -s "$(which nologin)" \ -c "Guix build user $i" --system \ "guixbuilder${i}"; --=20 2.31.1 --war7xvZVd7f2FQ+H-- --0Siuxbb1LkUtNrSn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAmBvhgMACgkQJkb6MLrK fwgM1xAA2mP7NRqSGW2sCjZUhYY1IvCCoFrCfnd2jqnV1n8BtsYcTUDnlnfdILOZ ufMbSyfMyn0rZQHjdR9zJCAZcD1NKLRku9iFotVu3ai8qa72mJ+XA1gNX55r6xdV FGAhp4kAYJxRYY58hUO/mYQ69HHoy0hHuCCl+H/VfMuqNkHn1ukip9F1I90q9qdn uwnda3GuL5eFdtqio5MaVuVf6eDNhX+yaXYUAY/D361Q3v5b6l4BxEjQHa7bbgjd cAHLWxbxGROtqBZ7JLZk6b7zxso85a6euQCFTCnHwS+oLAORNW/Bqi80GfQ2RLoW DoqekRpDUJ68XfVXva+8Y5O6RBfMqrKLAdiIh3ptgcUZAJal5N8ClWtKR4VQOc4X AUuN08LFome0k1B9wWVKwU1lM5EHC3Ah9cbE3K4le1m679wNkrbALdnmc9YExwl6 IutG3hkzhWa7zKaZF6nMpaQayAxXBxEbJcx5faWmWUhnIlPsPW99K5BUb5ZOqg9s h46W39sVXjOPiPuEKkoD7qtaeVAdJ9xa2NikTwXH6yfTO3Vvj3jY1ep7BtKqk9o5 2Ikk6Qt5VNKktoOpk3cGD/oMz7MUxeSxsXrxYHtgr6pHhH8DRhBFhZ1LChpbX935 CrWqbmR5qVkPkjLAyRhkPKtP+1/5QimQ7IOOzkeL3w8pT5VOBuQ= =vyZm -----END PGP SIGNATURE----- --0Siuxbb1LkUtNrSn--