From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id cHoQBckeKGaFGgAAe85BDQ:P1 (envelope-from ) for ; Tue, 23 Apr 2024 22:49:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id cHoQBckeKGaFGgAAe85BDQ (envelope-from ) for ; Tue, 23 Apr 2024 22:49:13 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b="iC/D/0pp"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713905353; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=v3IW4uFe6Ct60NonFKfWMHf3ECzON50UkPPy5OhczLo=; b=mmq33hQNaQP9KosLZ/Fi1aHu2iZCpiL5yOfv7lGxJoxs+thrUA6PnXNCrTiytOKnjK8qVP MUs5IEoXe4jLae9wrUfvKzlupOeH3Wn9yPB0DGrvVIbQ5AByQhJAv4R6oLH5j/1ONUYlBS 2F6N0fHAAU2BbMfIBcYQ8xQNM9iUZgnfMykLegUhm5ZyyL37L8rDO6Rx9Tb2Tk2YHNbEGK 4OVW0+XXc7Z84n8gmbhEqUFubJodSzKg077A22AdocURVqOSiuHkAIT7s2zwAgGnDl4wKl NV+qrN5HJLcuBMKd73S/yyw0ORWvWre8u6JciRnohH3eoGjkAM5kxUJXWzqxBA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b="iC/D/0pp"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713905353; a=rsa-sha256; cv=none; b=XbJD1ig3gi29U7XBuCqa9KGBsdqPYgjfIsW1GHr1fh/qc92QU/XHCXNflyEsAaGe/+lZ5i cS2QWVVoBPjYfuGTYIT3KyRJA1LavJYtxGbenqoKh6tuVpzP7dCxGTX9qK9xkRxqyWUuKc bwZazbSkf7Kto7ajNgTe/wgxQtSjYoTG+FyCVtdPs/d17bGy/FJWq6JUNnbVumIqeaI9Cx 9ZeoCgdtPoOgfI2vvpSxtPDhzCOqUCD41jJA7TP6h3BvpUo5iuLF6/VaW8FDUxCM2VY0/r lhpXNBpgpoife30n9aPZlPeN7X7F2mmlg3BDFlu1mvxLFGSgnnZRi18J64vgXA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B0C0F66E59 for ; Tue, 23 Apr 2024 22:49:12 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzN4h-00032g-5v; Tue, 23 Apr 2024 16:49:11 -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 1rzN4O-0002zb-1g for guix-patches@gnu.org; Tue, 23 Apr 2024 16:48:52 -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 1rzN4N-0003Od-9N for guix-patches@gnu.org; Tue, 23 Apr 2024 16:48:51 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rzN4d-0003Xq-Gz for guix-patches@gnu.org; Tue, 23 Apr 2024 16:49:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70542] [PATCH 1/4] file-systems: Add requirements field to file-systems Resent-From: Richard Sent Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 23 Apr 2024 20:49:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70542@debbugs.gnu.org Cc: Richard Sent Received: via spool by 70542-submit@debbugs.gnu.org id=B70542.171390529913081 (code B ref 70542); Tue, 23 Apr 2024 20:49:07 +0000 Received: (at 70542) by debbugs.gnu.org; 23 Apr 2024 20:48:19 +0000 Received: from localhost ([127.0.0.1]:54255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rzN3j-0003NV-Ku for submit@debbugs.gnu.org; Tue, 23 Apr 2024 16:48:18 -0400 Received: from mail-108-mta19.mxroute.com ([136.175.108.19]:46821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rzN3d-0003M9-3a for 70542@debbugs.gnu.org; Tue, 23 Apr 2024 16:48:09 -0400 Received: from filter006.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta19.mxroute.com (ZoneMTA) with ESMTPSA id 18f0cb6e2b40003bea.001 for <70542@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 23 Apr 2024 20:47:43 +0000 X-Zone-Loop: 0216e505b7a0a8264361f18032a25031e2a3b3c2cb82 X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=v3IW4uFe6Ct60NonFKfWMHf3ECzON50UkPPy5OhczLo=; b=iC/D/0ppWINBDLjJjss8erhdpz 34hfaO4vv5+P5m1U237xZOZmKXfRXvB0uzJ8EecLSJGFW7akMBlBigC3OAYDB89BemIzSLwycvOVD OZzK6OdI85gXP0eBsd0+Fc3W30p+F5lYZ8r2QoaHa2IpxlKPm/iih94cFqIr9oX6HoxWKutE/vLzM PxOe3fdRMyYlJ/oF9Xz+msVZsDuldHpuO5elTCWDT9lsXXyuuMmecTGgOgaoLvJ5P66caQVYf1JkH HxpnEFeh4857UfW657x0ws1M3Hlyp6Bo8hIo3w+BuIqxfVSmcZ4dJe+ay9Vf62BlCj72A87bxBsGX l3lJoeOg==; From: Richard Sent Date: Tue, 23 Apr 2024 16:47:19 -0400 Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated-Id: richard@freakingpenguin.com 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.89 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -4.89 X-Migadu-Queue-Id: B0C0F66E59 X-TUID: RuAoFUTxSg/+ * gnu/system/file-systems.scm (file-system): Add requirements field to the file-system record. This field will be used for adding additional Shepherd requirements to a file system Shepherd service. * doc/guix.texi: Add documentation for file-system requirements. Change-Id: If0392db03d48e8820aa53df1df482c12ec72e1a5 --- doc/guix.texi | 13 +++++++++++++ gnu/system/file-systems.scm | 3 +++ 2 files changed, 16 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 65af136e61..80b24e2de9 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17751,6 +17751,19 @@ File Systems Another example is a file system that depends on a mapped device, for example for an encrypted partition (@pxref{Mapped Devices}). + +@item @code{requirements} (default: @code{'()}) +This is a list of symbols denoting Shepherd requirements that must be +met before mounting the file system. + +As an example, an NFS file system would typically have a requirement for +@code{networking}. + +Typically, file systems are mounted before most other Shepherd services +are started. However, file systems with a non-empty requirements field +are mounted after Shepherd services have begun. Any Shepherd service +that depends on a file system with a non-empty requirements field must +depend on it directly and not on the generic symbol @code{file-systems}. @end table @end deftp diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index af0567bd3e..76a51a2b69 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -57,6 +57,7 @@ (define-module (gnu system file-systems) file-system-repair file-system-create-mount-point? file-system-dependencies + file-system-requirements file-system-location file-system-type-predicate @@ -185,6 +186,8 @@ (define-record-type* file-system (default #f)) (dependencies file-system-dependencies ; list of (default '())) ; or + (requirements file-system-requirements ; list of symbols + (default '())) (location file-system-location (default (current-source-location)) (innate))) -- 2.41.0