From patchwork Wed Oct 30 14:30:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 69637 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 BB9EE27BBEA; Wed, 30 Oct 2024 14:34:54 +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=-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 7CA7727BBE2 for ; Wed, 30 Oct 2024 14:34:54 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t69m2-0002Gq-P7; Wed, 30 Oct 2024 10:34:15 -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 1t69lt-0002Bf-Si for guix-patches@gnu.org; Wed, 30 Oct 2024 10:34:05 -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 1t69lt-0003d2-JX for guix-patches@gnu.org; Wed, 30 Oct 2024 10:34:05 -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=iaWfx4jNOFpVzCd71bf93ta8DO59udVxL6qBakwsMDE=; b=PCGoKR8dexuu0MOZ+q6U4otBkREWJZumUUbEPE3oW0CAgN4k+drXWtt6PH2q/CpGzBuJprfQnoQwHonnQH7bbFf3388RR4TwyIXOY7T333Q/PmuFZdwU2TcQ+FRjqf+/t2WcIGRbxJAmR7/0hwD3ZxS+X9cmaDbpshlg4z+C0Ft8PuIGykM474H8EnDf/NElrsfDE3wbVHVNk4TEZcouGl5ZvaUPJD3QBq8yGsY28oLpNtfBBYwFiqQhnAy8FiaZkRkqXwkArq6gUE3XLrRK/0mKHkNVz2idWYMEI5n2RAkTvD480EZ6IJAmh7S5vhlyw/e0/xXaB+eFA644Kkl0+g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t69lt-0003yZ-C2 for guix-patches@gnu.org; Wed, 30 Oct 2024 10:34:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73927] [PATCH v4 08/18] hurd-boot: Support second boot. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 30 Oct 2024 14:34: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.173029883115147 (code B ref 73927); Wed, 30 Oct 2024 14:34:05 +0000 Received: (at 73927) by debbugs.gnu.org; 30 Oct 2024 14:33:51 +0000 Received: from localhost ([127.0.0.1]:35328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t69lb-0003wC-Vu for submit@debbugs.gnu.org; Wed, 30 Oct 2024 10:33:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t69lH-0003uK-E2 for 73927@debbugs.gnu.org; Wed, 30 Oct 2024 10:33:28 -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 1t69j6-0003La-24; Wed, 30 Oct 2024 10:31:12 -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=iaWfx4jNOFpVzCd71bf93ta8DO59udVxL6qBakwsMDE=; b=lGXcgK1br0ACdjparLZl MV11RAiPQWo2VhtlCartwhELxfeAy50FQv7sYZz5+lx7d9fZZFPvAq2tk9zaCca4CJ1u16+UsHTS0 unnCwp0MSruKG0rb00XwuWZxOKfft4vhxhPOSHppscqNjhvHue/n4hhVWKLtNn6LV5XOES1GKVccs ixrLbClMc0dwIK93vOXd/a/ZUMvgjRt1ZwvRkDVUoNTfEaNmaa8hoxEIuj6R9Ws7wvp8vTcmouA6N QGqcUJJMyq6Ob9cDWIwpGD/VimJFGCqpdm1xcgtk0b5lOLJYmxSZ4oHYCalUbBNoL9kcD76K0GQra cmsU1KUFWOjTiA==; From: Janneke Nieuwenhuizen Date: Wed, 30 Oct 2024 15:30:37 +0100 Message-ID: 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")