From patchwork Fri Nov 8 14:10:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Boilleau X-Patchwork-Id: 70149 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5C09027BBE9; Fri, 8 Nov 2024 18:46:39 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8AE8227BBE2 for ; Fri, 8 Nov 2024 18:46:33 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9Tzj-0003FZ-2A; Fri, 08 Nov 2024 13:46:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9Tzf-0003ED-4s for guix-patches@gnu.org; Fri, 08 Nov 2024 13:46:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t9Tze-0007jP-SB for guix-patches@gnu.org; Fri, 08 Nov 2024 13:46:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=862NZUM707SZJFoROMhU5edXDBjNqbImESMZv4G0jhM=; b=MgVGUMHZmv844EXNFvhfspWINVlWHgw3b7T1+SsWNNvirLcAA3j7XI7G+Sx6Ihd+CG8OMfUprF4kgUnVF+VRngy5os5nfI7XHbBPFt1o0mP9v0hE6X6MxW3o+nvqAmz/WPlQ23RETFG0l9Vna4qFaUFE1n/QhvSVab0XsHP1pUXNn91p99YM/mJHJ/fq/mreCBSlC4abhjZHCtsJbDM6xlyI39b4sWT5dkzqH5/3lozfkeFezSCgXaVEGpgWosT31hVhi0QIkU6qKRQD0lcd6kZiwNZFw81gxGxeVqB21EhbJ190XwIkSIm4yubhJe2yspYsq3KgfVWCFcaxpro4Og==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9Tze-0004Wt-L5 for guix-patches@gnu.org; Fri, 08 Nov 2024 13:46:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74258] [PATCH 1/3] guix-install.sh: Test if gnu-store.mount exists before removing the unit Resent-From: David Boilleau Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Nov 2024 18:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74258 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74258@debbugs.gnu.org Cc: David Boilleau Received: via spool by 74258-submit@debbugs.gnu.org id=B74258.173109150216910 (code B ref 74258); Fri, 08 Nov 2024 18:46:02 +0000 Received: (at 74258) by debbugs.gnu.org; 8 Nov 2024 18:45:02 +0000 Received: from localhost ([127.0.0.1]:52129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9Tyc-0004OD-FA for submit@debbugs.gnu.org; Fri, 08 Nov 2024 13:45:01 -0500 Received: from mout.gmx.net ([212.227.17.22]:43721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9PhO-0000AG-7y for 74258@debbugs.gnu.org; Fri, 08 Nov 2024 09:10:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.fr; s=s31663417; t=1731075048; x=1731679848; i=david_boilleau@gmx.fr; bh=862NZUM707SZJFoROMhU5edXDBjNqbImESMZv4G0jhM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-ID:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=VMJEW99viHFKnNtHE9ByWRHq4bAl0nyc1gn7cVYFfV8JDv7RvmMz2CJVXt2shqeD TMQ1wx1vCfdeQ9h3AlY7ndtF8hPmbOlfcizWOxnwaOWB4HccEmgAEkn6hwxh9TzCw WeBAd4Va8NHQuc2fpJvtlUPvCUtX09fX7trWtnqCA5CGWDD7mvXT1pb/rm5rYSrBP skN0kVB0ReFy9h+HxjwUi7lwYJB6ubzFep2Mujz6OdP8Qmx3oTCNWA6xobvMGvGCK S0dP4C95Pn1QySGHYoiuM4I0Flz1z0nMOiLyRWgwLnqUbP6/7DkduiGeSxebcVCG8 QsMsjNPt3sZupVShCQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from pms ([88.126.7.20]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MmULx-1taFzK0grZ-00kNfe; Fri, 08 Nov 2024 15:10:48 +0100 Date: Fri, 8 Nov 2024 15:10:22 +0100 Message-ID: <2a447bdebd8520746ff31f34b87801938e8af17c.1731055803.git.david_boilleau@gmx.fr> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:UFD05tR8ih4acR8lv36Nqoy4xboRQjM4gzFFPyv1YX+Fg52je93 /aBWDwx+ntfByUM9v/AK1Fk+udAmlt2vJV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OvmyTgUXuVyubtabKn28tJz7rMk8Xc+pPBHuQpgKPG0 X-Mailman-Approved-At: Fri, 08 Nov 2024 13:44:56 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: David Boilleau X-ACL-Warn: , David Boilleau via Guix-patches X-Patchwork-Original-From: David Boilleau via Guix-patches via From: David Boilleau Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches The file /etc/systemd/system/gnu-store.mount has permissions 664, since the `install_unit()` function installed it so. So the test prior to removing the matching Systemd unit should not be wether this file is executable, otherwise it will always fail. The relevant test is on the file existence. * etc/guix-install.sh (sys_delete_guix_daemon): Test if gnu-store.mount file exists rather than if it is executable. Change-Id: Ic7cc186618b0b92fccf49a3b27805756a9126b89 --- etc/guix-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.43.0 diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 9d9c294d75..e97190d964 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -576,7 +576,7 @@ sys_delete_guix_daemon() _msg "${INF}removing guix-daemon" rm -f /etc/systemd/system/guix-daemon.service - if [ -x /etc/systemd/system/gnu-store.mount ]; then + if [ -f /etc/systemd/system/gnu-store.mount ]; then _msg "${INF}disabling gnu-store.mount" systemctl disable gnu-store.mount _msg "${INF}stopping gnu-store.mount" From patchwork Fri Nov 8 14:10:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Boilleau X-Patchwork-Id: 70146 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8AFF327BBE9; Fri, 8 Nov 2024 18:46:38 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DA14627BBEA for ; Fri, 8 Nov 2024 18:46:33 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9Tzh-0003F5-H6; Fri, 08 Nov 2024 13:46:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9Tzf-0003EO-IY for guix-patches@gnu.org; Fri, 08 Nov 2024 13:46:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t9Tzf-0007jV-9G for guix-patches@gnu.org; Fri, 08 Nov 2024 13:46:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=h3ZyX81ZgsMMHdfeZgBLEau2mmLqN0sTzAhLPqmu/9w=; b=nB/dIZ7OE/H6rfPcCM2w3i66j90WuaTsoXd8+oYKxxdqMJejvv3bqHrRYgGK9K5twhlPxT3gWEWUmp0HXlKQiNgQCYJJ8vSZ8qcg7mQg1+YLXW6zLRi+/b/6/yqw8FSXe+cP/77XgEaCrBoC+ojk+xmkrsN4Z3VsVURl9mzmPFeJkVx8S/qECjplkl/byJunHPLXPgHTEZX51lNrSRIN7tkWLXZSLJS/g4vzZQoYVOJPsWZUaMCRNRVW7pWXNnM3u08HhJSPa7uXhjKxaJqdhaWeCLDX55ZewpANQLhc56WySx+YSo672lmKafjko/dEr+GRWwvDwI9Qtxx7NriQPA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9Tzf-0004X0-3j for guix-patches@gnu.org; Fri, 08 Nov 2024 13:46:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74258] [PATCH 2/3] guix-install.sh: Replace `ROOT_HOME` with `~root` Resent-From: David Boilleau Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Nov 2024 18:46:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74258 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74258@debbugs.gnu.org Cc: David Boilleau Received: via spool by 74258-submit@debbugs.gnu.org id=B74258.173109150216933 (code B ref 74258); Fri, 08 Nov 2024 18:46:03 +0000 Received: (at 74258) by debbugs.gnu.org; 8 Nov 2024 18:45:02 +0000 Received: from localhost ([127.0.0.1]:52131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9Tyf-0004Oh-Um for submit@debbugs.gnu.org; Fri, 08 Nov 2024 13:45:02 -0500 Received: from mout.gmx.net ([212.227.17.21]:36255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9PhS-0000AL-HD for 74258@debbugs.gnu.org; Fri, 08 Nov 2024 09:10:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.fr; s=s31663417; t=1731075052; x=1731679852; i=david_boilleau@gmx.fr; bh=h3ZyX81ZgsMMHdfeZgBLEau2mmLqN0sTzAhLPqmu/9w=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-ID:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=uBtyvAj7pHZ1LZjQEZ/z8rvxXzB26v944uSPWZuEmuLk2cRQ6eJ39jGgvy1WuVOQ FH7thHHi12q4XQBtnUA3kh3EHChOHQ1yKwuJDD/AjkSHOqjbze224k7pAziMu7B4A s47YyjTiYVy4wASlirF+MYNZYHOxvLdjlEj8aEOjMEJjb4HAiEkVF41qsNwA5NyF7 VHEeubFfEVhzCMX0YaWliOyQFxLqE2eYuSYM+cDvk6byrS7t5KYgb5Lwv5Xn9RYAv vutV4GHyI7fsqwXrhBgQOUqN/n2NBg8yvIe1+W6AVx9sPf1CWqe9lpv2marIkmd/n PLcJlMMcyjWjnZmjqA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from pms ([88.126.7.20]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MTzb8-1tHlOr0ZaU-00TXft; Fri, 08 Nov 2024 15:10:52 +0100 Date: Fri, 8 Nov 2024 15:10:23 +0100 Message-ID: <1a9aa88fcacc1c9b2f173a0aa8a6aa7327a3a2b7.1731055803.git.david_boilleau@gmx.fr> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:gckVTgaalK6xsLZRIEQBuvEohOvs22nlKg3n27GD8BTgX0lzTxY 5RKRWKWpF8amkTixBt4m3sX7J8a+GB/gWDmOKV7Fq7ZRdB7dCFCIyn1lH41I2KgOM4fquVn XNtmo6XV+G0KKBH1+A470xlFeTs3forQSx85IzyPolsdl6z8Hb/cQ7X+IIBdLeRJ0NBJQZ8 r5hz/+AJ6fPtzONz0U/EA== UI-OutboundReport: notjunk:1;M01:P0:/D2Slg94AQk=;jvwIS2aP4FYr5LKEsnUmu0O8i3y a9gH1OFngcSZBqIwBCqvRsJPVkINNq/NSCvf9jISxVviG/0JbBlcZIqhwJgHtKFo9zP26cyeV 4P3UMWfLXmgWVQ4GqksXCso/At7qbFmCihJiP2rsBs6CKSBndRmOINX2FxecTFzEbnTGl1Ouz RGftMDjr0wJ7aRmVbI3wZ8MOMVNCSg5AQ30x4tlZ8pcMwTsunQs01G8eiF8WMlDtEf3vdO+Ax NKa9yO63YxyUQh6WqfyUJIRvA0EK50kY5KzwskhhoBDSbunV+HtkJafkcFsNnTLqIoktgW+IV qGu7n/jpCcygEJNSc3qx23C3N83cb4+Pd7Ecb9TAuCaGqgm7I1NUTIBUmGF0noVID8/tqSl+P PBPDh2Nqyhl7WrVZuJsys73TL+n5B6vWYHdsun5MeM4a3b7tCuKfLdNuospEVyop3VCMZmsOu jMtJsmra7WajdVXsfeODCtZuVeVkR3Lhc4cfrgNMLSNmgnETZ8ZcYazLsRTe+zt5bKFXeRpK7 ydrVwfMZuftekXbc6xT97iDSFEgYb7Gn3o8CUpDUNFURC6NCK0JDNI3GuatI29N7Ss6BZoRE3 Iuy2yccm0g8FcLvbf742FMMbUEMfUh8YtWPzJzweXBFBsl6j/E/gUQuMRakibKNeOK8iq+Uov YFpRYES2zvZdAlT0H6OAph7r7PVSBhtW34fgTjoyRc9KP7k7kobaiBxH02zRsXZT95Xrkk0Bo OBV46wLFJYVfTM9vkG9lpPFkoLsPtXPIxvIIUdFXNwkqd4TtUIWqFSILzwp45TQY5DFLR1eM6 1tmOxOkIwHmVh5KtMtmFax69cF+JpLpW4XiPpJxYg03C3vQVVJ03fOmPHl1VKpBB1plGoZPrZ BFieeT7t0EGELn38ofaONNDHp7UBUSLKsN44yB+FWiai0bbB8FmE/Vug2 X-Mailman-Approved-At: Fri, 08 Nov 2024 13:44:56 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: David Boilleau X-ACL-Warn: , David Boilleau via Guix-patches X-Patchwork-Original-From: David Boilleau via Guix-patches via From: David Boilleau Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches The `ROOT_HOME` variable is natively absent from some systems, however the form `~root`, which is used by the install functions in this same file, works. * etc/guix-install.sh (sys_delete_store, sys_delete_guix_daemon) (sys_delete_user_profiles): Replace `ROOT_HOME` with `~root`. Change-Id: Ia867e271ac4c5557d9708235fee028bccce68342 --- etc/guix-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.43.0 diff --git a/etc/guix-install.sh b/etc/guix-install.sh index e97190d964..7fb5ac63c5 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -410,8 +410,8 @@ sys_delete_store() _msg "${INF}removing /gnu" rm -rf /gnu - _msg "${INF}removing ${ROOT_HOME}/.config/guix" - rm -rf ${ROOT_HOME}/.config/guix + _msg "${INF}removing ~root/.config/guix" + rm -rf ~root/.config/guix } sys_create_build_user() @@ -594,7 +594,7 @@ sys_delete_guix_daemon() ;; NA|*) _msg "${ERR}unsupported init system; disable, stop and remove the daemon manually:" - echo " ${ROOT_HOME}/.config/guix/current/bin/guix-daemon --build-users-group=guixbuild" + echo " ~root/.config/guix/current/bin/guix-daemon --build-users-group=guixbuild" ;; esac @@ -743,9 +743,9 @@ sys_delete_init_profile() sys_delete_user_profiles() { - _msg "${INF}removing ${ROOT_HOME}/.guix-profile" - rm -f ${ROOT_HOME}/.guix-profile - rm -rf ${ROOT_HOME}/.cache/guix + _msg "${INF}removing ~root/.guix-profile" + rm -f ~root/.guix-profile + rm -rf ~root/.cache/guix _msg "${INF}removing .guix-profile, .cache/guix and .config/guix of all /home users" for user in `ls -1 /home`; do From patchwork Fri Nov 8 14:10:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Boilleau X-Patchwork-Id: 70147 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 23C3727BBE9; Fri, 8 Nov 2024 18:46:41 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C5EEF27BBE2 for ; Fri, 8 Nov 2024 18:46:39 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9Tzg-0003Ex-Rn; Fri, 08 Nov 2024 13:46:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9Tzg-0003Em-26 for guix-patches@gnu.org; Fri, 08 Nov 2024 13:46:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t9Tzf-0007jb-Pt for guix-patches@gnu.org; Fri, 08 Nov 2024 13:46:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=j+A13LMfNHbGxe6k1Y7NzSGS5JkWgpCCO5WYKdTIV5U=; b=ARtw+7Z2fv2Vw9/UeOMgKBGpyVPg/00R7kAVahs/0eSCNBoHi9nqxLCilCM3rVE2LJctqPwhMYe8zcFgXlq20W2Km3ZIdlegK7BRxm31umBsrGiDejug48KTX6Aqnmg2ygp65e3rLmICOYQNEnkhOPu4S0gpXKulmDTTcNzapRuZavnrZ2e07VzE+Kck+VtBCothipUhglvfL1iPn2hKZUXL5q86LKDa/YV4z4f+vQAVQUAZ/HApsR8d3/qAM3Bd+n1XJ6DiXK1wa+p1i9Ek6BrLviPIiqzGoyUU0qQ546Jjh+NatvF3YC3b39GJE8B2wDZLv7k/dv+daXHQlavgNQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9Tzf-0004X8-Ko for guix-patches@gnu.org; Fri, 08 Nov 2024 13:46:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74258] [PATCH 3/3] guix-install.sh: Run the uninstall even if already partially done Resent-From: David Boilleau Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Nov 2024 18:46:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74258 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74258@debbugs.gnu.org Cc: David Boilleau Received: via spool by 74258-submit@debbugs.gnu.org id=B74258.173109150316941 (code B ref 74258); Fri, 08 Nov 2024 18:46:03 +0000 Received: (at 74258) by debbugs.gnu.org; 8 Nov 2024 18:45:03 +0000 Received: from localhost ([127.0.0.1]:52134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9Tyg-0004P4-Lp for submit@debbugs.gnu.org; Fri, 08 Nov 2024 13:45:03 -0500 Received: from mout.gmx.net ([212.227.17.22]:42481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9PhW-0000AQ-PQ for 74258@debbugs.gnu.org; Fri, 08 Nov 2024 09:11:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.fr; s=s31663417; t=1731075057; x=1731679857; i=david_boilleau@gmx.fr; bh=j+A13LMfNHbGxe6k1Y7NzSGS5JkWgpCCO5WYKdTIV5U=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-ID:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=j8y+tBkbdeujwfXK1vgPDo3KMxkJIKllaUp7bDXr/fh39TRHFlzIfTGxydENm3Mt HWjQAXyqEEY7YhhEDNWW/1d/UwN9E3DNKB1nIdztgGDumQNZo8k/z9+lRQjqMACpz wb1IqkTursdab3z+nt4UmZ1v9AtwK6THhNcpx5ljkK6WClvxVT9YeDVYx2DPOt65Y lG/+b27GghJzB4toAXni/ZCb4NAa+dVcLcFXekEv4yFGpPhJXgmeK5I0zpggK752X 1MDywVJ6UcPybKcHxM2AvhcqpPzVMPDeM14AFcXP1wAzSDUmWR/dF2+KBWBqx5g62 sFvrPKTpraxBKGAuQg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from pms ([88.126.7.20]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MwfWU-1u22O20sX4-00wFfV; Fri, 08 Nov 2024 15:10:57 +0100 Date: Fri, 8 Nov 2024 15:10:24 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:Fi6eoLr3KYlCWL9kqTDgXUIEcYNuwkNnAIpD8eSf603si6EluWw GGO6Dcz8Azc18Dfckzf+49w27mScdVvFG8h2aUlnfhTfJAY22CwnJyFf160Hcm7eUqC8ydl TpWwmTpkohpr9DX6/3siGdOGlafF53e8dXdO+H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2024 13:44:56 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: David Boilleau X-ACL-Warn: , David Boilleau via Guix-patches X-Patchwork-Original-From: David Boilleau via Guix-patches via From: David Boilleau Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Removing users, groups or Systemd units fails if they are already absent, causing the uninstall script to exit. The goal here is to make the uninstall always run entirely, whatever parts are already done. * etc/guix-install.sh (sys_delete_build_user): Test if users and groups exist before deleting them. (sys_delete_guix_daemon): Test if /etc/systemd/system/guix-daemon.service file exists before removing the matching Systemd unit. Change-Id: Ibffb1f1b39de675542fb8057af21ecaea1b53d4c --- etc/guix-install.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) -- 2.43.0 diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 7fb5ac63c5..f07b2741bb 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -451,11 +451,15 @@ sys_create_build_user() sys_delete_build_user() { for i in $(seq -w 1 10); do - userdel -f guixbuilder${i} + if id -u "guixbuilder${i}" &>/dev/null; then + userdel -f guixbuilder${i} + fi done _msg "${INF}delete group guixbuild" - groupdel -f guixbuild + if getent group guixbuild &>/dev/null; then + groupdel -f guixbuild + fi } sys_enable_guix_daemon() @@ -569,12 +573,14 @@ sys_delete_guix_daemon() ;; systemd) - _msg "${INF}disabling guix-daemon" - systemctl disable guix-daemon - _msg "${INF}stopping guix-daemon" - systemctl stop guix-daemon - _msg "${INF}removing guix-daemon" - rm -f /etc/systemd/system/guix-daemon.service + if [ -f /etc/systemd/system/guix-daemon.service ]; then + _msg "${INF}disabling guix-daemon" + systemctl disable guix-daemon + _msg "${INF}stopping guix-daemon" + systemctl stop guix-daemon + _msg "${INF}removing guix-daemon" + rm -f /etc/systemd/system/guix-daemon.service + fi if [ -f /etc/systemd/system/gnu-store.mount ]; then _msg "${INF}disabling gnu-store.mount"