From patchwork Mon Oct 21 08:17:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 32288 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 15A3527BBEA; Mon, 21 Oct 2024 09:18:37 +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 CDF1B27BBE2 for ; Mon, 21 Oct 2024 09:18:36 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2nbl-0008VL-8W; Mon, 21 Oct 2024 04:17:45 -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 1t2nbh-0008TJ-34 for guix-patches@gnu.org; Mon, 21 Oct 2024 04:17:41 -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 1t2nbg-0003UV-Qb for guix-patches@gnu.org; Mon, 21 Oct 2024 04:17:40 -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=jSTBr8isJOGkEJIRsHiTVa7nKUOlKGXu4He32Nxsj4vabu0vrzLWdRSz3mvclSd0e9rfB8iovXKavZcWm6X+x8ocGmkt3gFi4Lix3FMvTQIy+xu/ZVQ7dAiMoh2qW24yjaryWcumqU6W0uofmS6gMhvJSayiIrvsGV4M1NrErA7mxYK9YrzEOm9iEDyOOrH+mMSUEmNMSuEcCUpMTTcOpqVSle1cmZsTtsBi4E9vYvR+Ub1awcmxFJ2kGNm9mVr1GY9ICl/674oykYEp+zFiqlC4WRucUcvcyCqQP21ZY87TYZZ6o9TTdlCSwZRJCbOAvGcsmeuk0H8pwwPE6iiGBg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2nc6-0003gL-Vf for guix-patches@gnu.org; Mon, 21 Oct 2024 04:18:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73927] [PATCH 06/16] hurd-boot: Support second boot. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 21 Oct 2024 08:18:06 +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.172949868414112 (code B ref 73927); Mon, 21 Oct 2024 08:18:06 +0000 Received: (at 73927) by debbugs.gnu.org; 21 Oct 2024 08:18:04 +0000 Received: from localhost ([127.0.0.1]:50006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2nc3-0003fG-Gc for submit@debbugs.gnu.org; Mon, 21 Oct 2024 04:18:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2nbx-0003dQ-8j for 73927@debbugs.gnu.org; Mon, 21 Oct 2024 04:17:57 -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 1t2nbR-0003Rm-Lf; Mon, 21 Oct 2024 04:17:25 -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=MkdunvxaPtTtpHGONjiq N2pYX53WTk69aznukpYgWZpJMYc7D6SV9w1N+OTFuEPVK8c44MBHjgZW+fB2b7RvtpPE+qlmPydAB cpFZyUuRVvIXtb1JVPxOu4C11OyULrghpdOFFl31gwDvEkzCpO+5yALKAOv55nr/ZOYxmAPZZM+Oh z3ZeBgCaUuGI/PR0kNNECl22Jz8H0lGamhiz6gub44cxy8AQM4C8Kufvxr4Z+k8dZ8UOVXCq9hF4V KEaZSa0k1K866QkNsr3wJauIbWcX5MHY3XsBGorJIMyCENTFoVY+bGCjuPt2RHSZqnKC4sSLkZg3K jDGGTU6qRsOsQw==; From: Janneke Nieuwenhuizen Date: Mon, 21 Oct 2024 10:17:02 +0200 Message-ID: <26625af5d6dbd20fd7cfbbe36dcc2b3cfd01a0d3.1729494414.git.janneke@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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")