From patchwork Fri Oct 25 09:39:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 69452 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 53C7D27BBEC; Fri, 25 Oct 2024 10:42:35 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 D126327BBEA for ; Fri, 25 Oct 2024 10:42:34 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t4Gp5-0002Qe-G4; Fri, 25 Oct 2024 05:41:35 -0400 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 1t4Gp3-0002PP-It for guix-patches@gnu.org; Fri, 25 Oct 2024 05:41:34 -0400 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 1t4Gp3-0003tS-AC for guix-patches@gnu.org; Fri, 25 Oct 2024 05:41:33 -0400 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=jHaKbg4o/jE+GpBXlbLJ5PGb1IQGQgzbQVVHRqpqhLg=; b=uZhIr8bfUd9tiKMdbEYVrVXNGo0wJ0oXq1eBFvVxVfkPx8JWHAnHGrlF2Ak/Jl/ZTOoVUS4PqMjc2tyrGZG6yKMqIony/LPfb+8/x60wMo+V2qDhpUvwankBOPCEd7yo5MIeo3k4/AO5P2kyA5nl4VRRtVJkxPkGH1TfQzNvgVbk/LHZiJrKBuLpNl9l9A3INVfmmOD4S1tGZR37j5gpp+aFI75Sfav5TVX+jmN2HUR/8kTxhrIywmyJzYig7RRXB5irw0tIursh/RraNCiceU0wbBvelT9JwnaF59xlZLCLwBOcnzenPpWDew9+PXffE626vhI2yryzHE6S0YrvSA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t4GpZ-00026P-1T for guix-patches@gnu.org; Fri, 25 Oct 2024 05:42:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73927] [PATCH v3 07/17] hurd-boot: Support second boot. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Oct 2024 09:42:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73927 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73927@debbugs.gnu.org Received: via spool by 73927-submit@debbugs.gnu.org id=B73927.17298492877900 (code B ref 73927); Fri, 25 Oct 2024 09:42:05 +0000 Received: (at 73927) by debbugs.gnu.org; 25 Oct 2024 09:41:27 +0000 Received: from localhost ([127.0.0.1]:37329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4Gow-00023G-W6 for submit@debbugs.gnu.org; Fri, 25 Oct 2024 05:41:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4Gol-000210-ET for 73927@debbugs.gnu.org; Fri, 25 Oct 2024 05:41:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t4GoA-0003na-Bl; Fri, 25 Oct 2024 05:40:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=jHaKbg4o/jE+GpBXlbLJ5PGb1IQGQgzbQVVHRqpqhLg=; b=ZbrN4zqiSGcMSXL0KeNy 4OObyq50QJRIStmknQMJdGDGRB5Ge2PmECAaBXROsKubdVvLb+pLCSXihaQyaVHbB0QCCRWw+Gw62 nZhX3L2b4sGMyxd+xQOZZirlR1Qzmc7pi+OwAGbvP9NvdoTTjLvE3H4W2aXT+d1xRXphbNZK6W+Sq YKe/6Vz+8p6jG1DMoSMkY98Z7jf+/YzVSQjM0NeSH7cvaJJib/1tJ+CPh1lAmDJyRC4W92kdBC0an +F12QSBZmcjvASPAhCYzNrMZp2fLPWTMIrU3FviAI7NpgFmac2c4vI/uTaViJeNDc1lpL5gfeCsqj tqAcrlx/tRHpnQ==; From: Janneke Nieuwenhuizen Date: Fri, 25 Oct 2024 11:39:59 +0200 Message-ID: <20241025094011.8540-8-janneke@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241025094011.8540-1-janneke@gnu.org> References: <20241025094011.8540-1-janneke@gnu.org> MIME-Version: 1.0 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: , 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 * gnu/build/hurd-boot.scm (boot-hurd-system): Check for stale shepherd socket and remove it. Be chattier about /hurd symlink replacement. Change-Id: I5e528c131ebeadb7ebc9727336a0f9301af3e68e --- gnu/build/hurd-boot.scm | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm index daf4fb41ab..23ace25d4f 100644 --- a/gnu/build/hurd-boot.scm +++ b/gnu/build/hurd-boot.scm @@ -322,18 +322,29 @@ (define* (boot-hurd-system #:key (on-error 'debug)) (let* ((args (command-line)) (system (find-long-option "gnu.system" args)) - (to-load (find-long-option "gnu.load" args))) + (to-load (find-long-option "gnu.load" args)) + (profile (string-append system "/profile")) + (bin (string-append profile "/bin")) + (sbin (string-append profile "/bin"))) - (false-if-exception (delete-file "/hurd")) - (let ((hurd/hurd (readlink* (string-append system "/profile/hurd")))) - (symlink hurd/hurd "/hurd")) + (setenv "PATH" (string-append bin ":" sbin)) + + (when (file-exists? "/var/run/shepherd/socket") + (format #t "Removing stale shepherd socket...\n") + (delete-file "/var/run/shepherd/socket")) (unless (file-exists? "/servers/startup") (format #t "Creating essential device nodes...\n") (make-hurd-device-nodes)) + (let ((profile/hurd (readlink* (string-append profile "/hurd")))) + (when (file-exists? "/hurd") + (format #t "Removing stale /hurd link\n") + (delete-file "/hurd")) + (format #t "Linking /hurd from ~a...\n" profile/hurd) + (symlink profile/hurd "/hurd")) + (format #t "Setting-up essential translators...\n") - (setenv "PATH" (string-append system "/profile/bin")) (set-hurd-device-translators) (format #t "Starting pager...\n")