From patchwork Mon Nov 1 11:39:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Fitzhenry X-Patchwork-Id: 34202 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 406AB27BBE1; Mon, 1 Nov 2021 13:53:21 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 02F0F27BBE3 for ; Mon, 1 Nov 2021 13:53:20 +0000 (GMT) Received: from localhost ([::1]:49752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhXkV-0005V8-5I for patchwork@mira.cbaines.net; Mon, 01 Nov 2021 09:53:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhVgU-0001hf-P8 for guix-patches@gnu.org; Mon, 01 Nov 2021 07:41:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50537) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhVgU-0000BQ-Gf for guix-patches@gnu.org; Mon, 01 Nov 2021 07:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mhVgU-0005Po-CE for guix-patches@gnu.org; Mon, 01 Nov 2021 07:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51548] [PATCH] services: Create /run and /var/run on activation. Resent-From: Tom Fitzhenry Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Nov 2021 11:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51548 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51548@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163576680220723 (code B ref -1); Mon, 01 Nov 2021 11:41:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Nov 2021 11:40:02 +0000 Received: from localhost ([127.0.0.1]:33850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhVfW-0005O4-4r for submit@debbugs.gnu.org; Mon, 01 Nov 2021 07:40:02 -0400 Received: from lists.gnu.org ([209.51.188.17]:50530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhVfT-0005Nl-17 for submit@debbugs.gnu.org; Mon, 01 Nov 2021 07:40:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhVfS-0001WI-Ic for guix-patches@gnu.org; Mon, 01 Nov 2021 07:39:58 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:59835) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhVfO-0008Az-04 for guix-patches@gnu.org; Mon, 01 Nov 2021 07:39:55 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 929685C00EA for ; Mon, 1 Nov 2021 07:39:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 01 Nov 2021 07:39:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= tom-fitzhenry.me.uk; h=message-id:date:mime-version:to:from :subject:content-type:content-transfer-encoding; s=fm3; bh=SLejP sDI8/bMnXJSOai1I1tX8wtELqJDg/bUEpGbmyc=; b=xJuvo39k7nYFHgOUEHJpP 0b1DJvqyJrDtSSrVPNdJaDa20qIiOVf30NooCrIXqa4M8FVY1l5wF62iVKoLoFND kpgWYpQ9PxcQ0cMDKRKH0HWoHmccb94xL+3oh/OMvzRIRtKytCmhSExhFgZAcqJP 67cMnwr9BCOcAAvT5QiUc+9Rf2W6V2fi5vj84ye+Dbjt6v3Dzr6BLQHIFN0Pddej TTfcSu6+gHs2eOSFOQI1YGmmQHzySiK81aLqaEVxr2e3YMg0yzQa2mlaVX8kGodF 4a7UkpeOGpE7m1soOlTuAIioKe4/Hr8AUtixsGPWX+/i3SVL0XldmTOt6qeGzIAN w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=SLejPs DI8/bMnXJSOai1I1tX8wtELqJDg/bUEpGbmyc=; b=dAenl7WAlyPo2EnOAKc0sn 8a8jUHgM13rXGGJNJqNOAoxJwtlu/suaDDcwDWVsKU2iOsYMCTeQNI42xsQ4+PaG fK6t8+ul9Mk3yomCMBO7qa1XfZKF/oEy7H6tK8VguRA4jLpP8CY87aS/X/FPxyzD Mg+H97Xy1FAWCgAM342NcKR/oIX5+jfYH/drb5YNilPeZJCvvFk0GX5vgZ1hC1Ei wHTs4TCoXLiHgWkl49TFWTbrsJihbXOlWRTlNEvtLHqrBLr9HYZGXBf2jTcBWRur 1Zzx/1BnaiM0Zj9kFdMrahdGqWu9QEPnnmWDDiL2vGBCmrQeEuYUx5UFXshRcFUw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdehvddgfedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfvhffutgfgsehtjeertd dtfeejnecuhfhrohhmpefvohhmucfhihhtiihhvghnrhihuceothhomhesthhomhdqfhhi thiihhgvnhhrhidrmhgvrdhukheqnecuggftrfgrthhtvghrnhepgeeludejkeeigffhle eiheeuleevkeekhfffffeiudeguedtgfehtefhtdeiieeinecuffhomhgrihhnpehgnhhu rdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epthhomhesthhomhdqfhhithiihhgvnhhrhidrmhgvrdhukh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 1 Nov 2021 07:39:51 -0400 (EDT) Message-ID: <9da03290-b031-fec0-11fe-a3f591b38f61@tom-fitzhenry.me.uk> Date: Mon, 1 Nov 2021 22:39:48 +1100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Content-Language: en-US From: Tom Fitzhenry Received-SPF: pass client-ip=66.111.4.25; envelope-from=tom@tom-fitzhenry.me.uk; helo=out1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Mon, 01 Nov 2021 09:53:09 -0400 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" X-getmail-retrieved-from-mailbox: Patches This is needed as part of being able to boot with just /boot, /guix and /var/guix, per https://issues.guix.gnu.org/51547. Without this patch, activation-on-boot fails due to the inability to open /var/run/utmpx and symlink /run/current-system. This is similar to what activation-script does with /var/log/. * gnu/services.scm (activation-script): Create /run/ and /var/run/. --- gnu/services.scm | 2 ++ 1 file changed, 2 insertions(+) ;; Same for 'wtmp', which is populated by mingetty et @@ -630,6 +631,7 @@ (define actions ;; Set up /run/current-system. Among other things this ;; sets up locales, which the activation snippets ;; executed below may expect. + (mkdir-p "/run") (activate-current-system) ;; Run the services' activation snippets. diff --git a/gnu/services.scm b/gnu/services.scm index 1655218f2d..f60d7dc4c3 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -620,6 +620,7 @@ (define actions ;; Make sure the user accounting database exists. If it ;; does not exist, 'setutxent' does not create it and ;; thus there is no accounting at all. + (mkdir-p "/var/run") (close-port (open-file "/var/run/utmpx" "a0"))