From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mHKJNAwfDGDzXQAA0tVLHw (envelope-from ) for ; Sat, 23 Jan 2021 13:05:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id eDNgMAwfDGD9NAAAB5/wlQ (envelope-from ) for ; Sat, 23 Jan 2021 13:05:16 +0000 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 340019402B1 for ; Sat, 23 Jan 2021 13:05:16 +0000 (UTC) Received: from localhost ([::1]:60338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3IbL-0006C4-1s for larch@yhetil.org; Sat, 23 Jan 2021 08:05:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Ib8-0006Bt-FK for guix-patches@gnu.org; Sat, 23 Jan 2021 08:05:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3Ib8-0007hy-8F for guix-patches@gnu.org; Sat, 23 Jan 2021 08:05:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l3Ib8-0001eY-1p for guix-patches@gnu.org; Sat, 23 Jan 2021 08:05:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 2/4] gnu: Make file-systems target extensible by services. Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Jan 2021 13:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45692 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16114070836324 (code B ref 45692); Sat, 23 Jan 2021 13:05:01 +0000 Received: (at 45692) by debbugs.gnu.org; 23 Jan 2021 13:04:43 +0000 Received: from localhost ([127.0.0.1]:33818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Iap-0001dv-B2 for submit@debbugs.gnu.org; Sat, 23 Jan 2021 08:04:43 -0500 Received: from mail-oln040092255014.outbound.protection.outlook.com ([40.92.255.14]:18704 helo=APC01-HK2-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Iam-0001dh-FU for 45692@debbugs.gnu.org; Sat, 23 Jan 2021 08:04:42 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mIMxghx8Z14GQUNmbrzS5LDBC2vWUQ9tiDcrjrRw7xZ/tz7VOea9qsPlXDvSbOzaIbQ/Ue5kWrO4p3G0t9PpRNb8ARD9x5X30N7Wk1AHqYTvpFQYzxqoZd/SrdBgF7viiZYnkN6AFhtCMg0UYk25m/s9Jr2DhVV0JgQYPLyXASqdR7/usuqR2BEJ7vydon3leD2qctZiCjYfavWqTbFAziGzrQ6SiTKI4mjcDAk2wy5BBkBuoqhMknT7AJkYCCJDpBYLphKPatMf/1DRPAd3OAAvFS0l9g77v2Nfk+2MFkJVDOtVShaLwZkgYqDhXT1TYkb5JKSApRwWswVuShHipg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D3oBjD9Dcj2FGBQOQlgE2NuhOy9GPSubTci567kf3OM=; b=awxwd0AHQMecwI3KOVQL/Kz1MHavz8LpenryOT9nFLieAu+BHyardWzKx9U2JjzoAOZF8MWTCtX08DYl3/qn9PD6C70YPRd9KwWJCsxtIyFMlrl5d5F6Z6qsDMNnlGbhoxfCryOmIrYwPb5g/Da3lsYz7O7PWe4NS51oXnn/UgfHKBTk/W1a7bChmMIwP37kiU8Hv/ogNGFDFC52/JbgUDu1+Rv4KkM0hEykZfWeYBtTYjdiuPJwhqcM7xO6RsKbznRP/NgzvAzaulbFQOyNM/gFzFpDJz05Vl+7NzM/awMokUCoB5vrMFx+cph5o/CLZuKM6j5odPEALLtCflmj6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D3oBjD9Dcj2FGBQOQlgE2NuhOy9GPSubTci567kf3OM=; b=rCMKfXRLy9BKyyvcuZRLXeoky/o6xvSg9ZIoQ+ev+E0TuLUNSLSKQ+SlkdL9IlH4Mepf6xfimH+XyLw0dN0u/d63O73L4BUWC9lasAJ2UZbel4L8QfNTQcz9OCUdNA64feKHBahRUC78nVRWoMFoNAzW+EBvZ/sffSqFWscJKAUQK9+WSaoEmYl+SApibzWHUtZB2bbi9pRw/HdnbXBMM8Dfhy+UHIMZIdb17p78vViiQEtqAZ3M5S71+E+pR5o2lYYCPDU/PhL6uyKg5e9HGHQWB1akAPmZD9FM/V25aoal5XjCjnJK6DcNWb8ZcN0ukr35N03AOuXAgwDXwHokIw== Received: from PU1APC01FT026.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebe::4a) by PU1APC01HT028.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebe::329) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Sat, 23 Jan 2021 13:04:29 +0000 Received: from OSZP286MB0664.JPNP286.PROD.OUTLOOK.COM (10.152.252.56) by PU1APC01FT026.mail.protection.outlook.com (10.152.252.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11 via Frontend Transport; Sat, 23 Jan 2021 13:04:29 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:52F3BB86BB62349C3ED0D3D26C52DF11289E966485B422BBD40DA849B3CD4D0D; UpperCasedChecksum:8617A2D03830379A80A0A7D356822EA01B73BEB8F405B85D771A8B5788751920; SizeAsReceived:9080; Count:46 Received: from OSZP286MB0664.JPNP286.PROD.OUTLOOK.COM ([fe80::4987:bbf2:2bff:6b22]) by OSZP286MB0664.JPNP286.PROD.OUTLOOK.COM ([fe80::4987:bbf2:2bff:6b22%5]) with mapi id 15.20.3784.016; Sat, 23 Jan 2021 13:04:28 +0000 From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= References: Date: Sat, 23 Jan 2021 21:05:36 +0800 In-Reply-To: (raid5atemyhomework@protonmail.com's message of "Wed, 06 Jan 2021 15:55:36 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Content-Type: multipart/mixed; boundary="=-=-=" X-TMN: [i3LMU7LzT9kGavNcn/tu7i4v+KhAoiaicViLi9nlbslVRatG481kwI+di7JFt9y3] X-ClientProxiedBy: AM0PR08CA0021.eurprd08.prod.outlook.com (2603:10a6:208:d2::34) To OSZP286MB0664.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:ec::11) X-Microsoft-Original-Message-ID: <87sg6r3isf.fsf@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (2409:8a62:37f:8120:2f1:f5ff:fe18:6bb) by AM0PR08CA0021.eurprd08.prod.outlook.com (2603:10a6:208:d2::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.13 via Frontend Transport; Sat, 23 Jan 2021 13:04:27 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 728127c2-37f6-4718-61c3-08d8bf9f6ab5 X-MS-TrafficTypeDiagnostic: PU1APC01HT028: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yaPFY+kVbeXOGXiaG6BYkELnBqbYwzPGW4wTCmpdWcyTe1Xnvu3FS3kXCL9tv7ernoLHu+a7rmy3ZhNfKEjb/p0kn0umLSIUV88ZxIm+AjNXCwUtCyUdROij3V95McMaHuuspP/9xnmoqLRE7yPuqXoc44kr9kKyi8wZIkzaW1eE0xhBUuUwvWDPrWjbz5qCjDxs032ygRqG8wtE9kNEBcSRgcz3ja4ZvpsTyoph+SLeJ0NouqMVtaZC5soSA8ih X-MS-Exchange-AntiSpam-MessageData: hTti5cVwdPUgPbRaD3K2blrsmePbU4DkDw9lsFszJLjQoxQ09M16x7ZflA5ctvoPLPpzgI1iR3HjO247za4Rznq140By2F8rDctmxWF7+UF5IB10amDPWVsfLsmDH9HJBseA44DBD6TCj3tYkmdMq6FO/n9WcGrjG+4cMyoOEy/3s1GN8+Jj9dAxHwViCDi3YSjHvLcqeFJ6efA3c5tHxw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 728127c2-37f6-4718-61c3-08d8bf9f6ab5 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2021 13:04:28.7566 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: PU1APC01FT026.eop-APC01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU1APC01HT028 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: , Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.75 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=outlook.com header.s=selector1 header.b=rCMKfXRL; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed)" header.from=outlook.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 340019402B1 X-Spam-Score: 0.75 X-Migadu-Scanner: scn1.migadu.com X-TUID: /MaL4Q62eLEi --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello! raid5atemyhomework writes: >>>From 792a8f8efc95e4fe9a94d42f839ddcfb034b8540 Mon Sep 17 00:00:00 2001 > From: raid5atemyhomework > Date: Wed, 6 Jan 2021 08:15:54 +0800 > Subject: [PATCH 2/4] gnu: Make file-systems target extensible by services= . It=E2=80=99s not clear to me what =E2=80=9Cfile-systems target=E2=80=9D is,= and why we=E2=80=99re extending =E2=80=98file-systems-target-service-type=E2=80=99=E2=80=A6 I th= ink what we want is to extend the =E2=80=98file-system-service-type=E2=80=99 with shepherd serv= ices=E2=80=99 names, which means some shepherd services that will handle file systems mounting themself instead of the usual objects, fstab entries, mounted by kernel. So I write with this patch to extend file-system-service-type directly instead of introducing a new =E2=80=98file-systems-target-service-type=E2= =80=99: --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-services-Allow-file-system-service-type-extensible-b.patch Content-Transfer-Encoding: quoted-printable >From 44ee1e470a2f9d4985af4d51654d9f943caa0f24 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?=3DE5=3DAE=3D8B=3DE6=3D96=3D87=3DE6=3DAD=3DA6?=3D Date: Sat, 23 Jan 2021 20:39:06 +0800 Subject: [PATCH] services: Allow 'file-system-service-type' extensible by service name. MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * gnu/services/base.scm (file-system-shepherd-services): Add 'extra-services-names' paramater. (file-system-service-type): Handle services=E2=80=99 names from extensions. --- gnu/services/base.scm | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index f6a490f712..7bddef5034 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -364,15 +364,16 @@ FILE-SYSTEM." (gnu system file-systems) ,@%default-modules))))))) =20 -(define (file-system-shepherd-services file-systems) +(define (file-system-shepherd-services file-systems extra-services-names) "Return the list of Shepherd services for FILE-SYSTEMS." (let* ((file-systems (filter file-system-mount? file-systems))) (define sink (shepherd-service (provision '(file-systems)) - (requirement (cons* 'root-file-system 'user-file-systems - (map file-system->shepherd-service-name - file-systems))) + (requirement (append '(root-file-system user-file-systems) + (map file-system->shepherd-service-name + file-systems) + extra-services-names)) (documentation "Target for all the initially-mounted file systems") (start #~(const #t)) (stop #~(const #f)))) @@ -429,13 +430,23 @@ FILE-SYSTEM." (service-type (name 'file-systems) (extensions (list (service-extension shepherd-root-service-type - file-system-shepherd-services) + (lambda (value) + (file-system-shepherd-services + (filter file-system? value) + (filter symbol? value)))) (service-extension fstab-service-type - file-system-fstab-entries) + (lambda (value) + (file-system-fstab-entries + (filter file-system? value)))= ) =20 ;; Have 'user-processes' depend on 'file-systems'. (service-extension user-processes-service-type (const '(file-systems))))) + + ;; Extensions consist of lists of objects or + ;; shepherd services=E2=80=99 names (symbols). In the lat= ter case, + ;; the provided shepherd services supposed to mount and + ;; unmount some file systems themself. (compose concatenate) (extend append) (description --=20 2.29.2 --=-=-= Content-Type: text/plain What do you think? Thank you! --=-=-=--