From patchwork Wed Mar 19 00:14:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ian Eure X-Patchwork-Id: 2817 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 C77CB27BBEA; Wed, 19 Mar 2025 00:15:52 +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 AF0F127BBE2 for ; Wed, 19 Mar 2025 00:15:51 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuh5O-0004FT-P8; Tue, 18 Mar 2025 20:15:06 -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 1tuh5M-0004D0-EX for guix-patches@gnu.org; Tue, 18 Mar 2025 20:15:04 -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 1tuh5M-0005AM-3b for guix-patches@gnu.org; Tue, 18 Mar 2025 20:15:04 -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:Date:From:To:Subject; bh=dxvUwFWXfwb2AQn2TTUavFFUq1PxbRZIQZvFHnsrdzw=; b=Gza7bJQwAOdA4JFPE6qsOpUuhioFPmEXrWc9aLO9tE5nt6lJ6WK1Edq2epYOo32/zqgjsC22EHUrFDldBlXXWhVvfZh2Evdh8GTreOZMxoew9RkrsXr4wmoZ0pqYKfiMhGNEQ/zsCadqvbv3ed9GM5SKNKcbVfS3dvUONwUaGr3VLX3sernf3tw8Aad2km4fr+lLE9pWVYdyGIy1ojFkZ+Xu73wOrA5iovwGkRcTFP9rlhODru84VQAFO9Cpr7HEiQIawOoZLrGANInWhuKYuhhNX0j+YCZFWbb2ozsPZCN5WC/7j4cH8+aIMHTvGRiBR34x/z11Ek09VrzDl2Nw2A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tuh5K-0005zg-Ni for guix-patches@gnu.org; Tue, 18 Mar 2025 20:15:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77106] [PATCH 0/1] Add autofs-service-type Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 19 Mar 2025 00:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77106 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77106@debbugs.gnu.org Cc: Ian Eure X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174234328622884 (code B ref -1); Wed, 19 Mar 2025 00:15:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Mar 2025 00:14:46 +0000 Received: from localhost ([127.0.0.1]:43927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tuh52-0005wj-N3 for submit@debbugs.gnu.org; Tue, 18 Mar 2025 20:14:46 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53428) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tuh4z-0005v9-Ks for submit@debbugs.gnu.org; Tue, 18 Mar 2025 20:14:42 -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 1tuh4p-00048O-FE for guix-patches@gnu.org; Tue, 18 Mar 2025 20:14:31 -0400 Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tuh4n-00051T-Gu for guix-patches@gnu.org; Tue, 18 Mar 2025 20:14:31 -0400 Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfhigh.phl.internal (Postfix) with ESMTP id 9D93B114021D; Tue, 18 Mar 2025 20:14:26 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Tue, 18 Mar 2025 20:14:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :subject:subject:to:to; s=fm3; t=1742343266; x=1742429666; bh=dx vUwFWXfwb2AQn2TTUavFFUq1PxbRZIQZvFHnsrdzw=; b=Ybwadfez0Vf3m4H7op mRFr3JrhpCDiIgFLsewax1AIxuwB6SlyAu5sG+Jjae8lsyVzNOdnTOxa0o+UfUlW +rKCVb1toL5gmjAK6uB7vHVRnqdbRZRyFgibieQTFMlE1fJEFtzm9HLA0PStxyRJ MrEM8IGdfNdEoW9QY2HLaQ6hAxgz9eMusiDAXwM+ZsHDFa7TGkctGhey2BB5Fv7T ori9vM2lfUp1QZnCNRazZIqylr8Hby8LjxeyFvkkn8nA5aIkbYnZV8fkDD22TPQF obI1i4fTw9AU38vLnXZuz36Wr8Cenzw79LPq8LwWydethNhTsvwH+KPgi9I+QMw1 sAEQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1742343266; x=1742429666; bh=dxvUwFWXfwb2AQn2TTUavFFUq1Px bRZIQZvFHnsrdzw=; b=GPKfukh8Wtoxj5sJrDIfct7CIgQyCRcqTi9WQIrD4DkM 3TLqQIghpxgEjg0v5p8cYrSWH/PvpNtJc66HlrXXQa8Zj8iLtBXqOu/5cCAj6dG9 VWDOwW/KTiNaBBtgqug53ISg3jR35atuEnKFoTf3H8mcVQE+rn7XnGlgyW0CZVLx Nad6Aws1WvVAk9BREEnT3CMgY7VqJ05wwY662bf8QuqyFHsqVaf/8vaS1OR2tUSv JOx63TW8uuX5gffiw/zGPnVE6bWogXdpxgmyoqX4yK3U0su4ezABz8wtcgyh9rL3 g0Socq134Sq0pjS4488aurXS2+/DHPEpv84g9VMqtg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugeefkeeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf evufffkffogggtgfesthekredtredtjeenucfhrhhomhepkfgrnhcugfhurhgvuceoihgr nhesrhgvthhrohhsphgvtgdrthhvqeenucggtffrrghtthgvrhhnpefgueekffejudfgvd evteelteeitdeuuddufffhuefhiefhjeetuefhgfettedvteenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehirghnsehrvghtrhhoshhpvggtrd htvhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep ghhuihigqdhprghttghhvghssehgnhhurdhorhhgpdhrtghpthhtohepihgrnhesrhgvth hrohhsphgvtgdrthhv X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Mar 2025 20:14:25 -0400 (EDT) From: Ian Eure Date: Tue, 18 Mar 2025 17:14:20 -0700 Message-ID: <20250319001421.14954-1-ian@retrospec.tv> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 Received-SPF: pass client-ip=103.168.172.153; envelope-from=ian@retrospec.tv; helo=fhigh-a2-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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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-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 This is a draft of a system service to manage autofs, the lack of which has been an impediment to my daily-driver experience with Guix. It’s in working status, but incomplete (missing documentation) and may need other adjustments. I’m seeking feedback now, so I don’t waste time writing documentation for a moving target. What it does: - Lets you declaratively configure autofs in your operating-system. - Computes requirements based on the configuration, ex. if you have all local mounts, no requirements are added, but if you configure NFS mounts, it requires networking and rpc.statd services. - Supports direct mounts and indirect maps. - Flexibly supports any filesystem and mount options. - Creates mountpoints on service activation. - Most important of all, Works On My Machine. What it lacks: - Support for many autofs options, ex. verbose logging, "timeout for caching failed key lookups," a handful of others. I’ll add these in later versions of the patch. - Support for options per indirect map, ex no/browse, timeout, etc. I can add these if desired, but it’s somewhat annoying to do so. - Support for autofs maps other than the "file" type. Autofs supports many map formats, including esoteric things like maps stored in hesiod, nis, yp, ldap, etc. Most of these require fairly involved configuration, and are difficult to validate -- I don’t run hesiod or LDAP -- so I’ve omited them. The "file" type covers the majority of usecases. It’s possible to extend this patch to support them, should someone be motivated to do so. - Documentation. I want the code to be firmed up more before writing this. There are also some descriptions that need expanding. Areas which could use attention: - I’m not completely happy with how the config serializer works, for example, the `name' argument is mostly not used. I’m not sure if the model for this is a poor fit for my usecase or if I’m using it wrong. Feedback appreciated here. - I opted to use a loose configuration setup for mount options, where they’re specified as arbitrary lists. Options in the form `'(noatime (remount . ro) (wsize . 8192))' result in `noatime,remount=ro,wsize=8192'. While I think it might be nice to have fully explicit options, this would require very large configuration records, one per supported filesystem. I decided the cost-benefit wasn’t there. I considered reusing the `file-system' record from (gnu system file-systems), but it’s a poor match for this usecase, as it includes many irrelevant fields. - The name. I went with autofs-service-type to match the package, but "automount" is the name of the actual binary, and they’re used fairly interchangeably. It `provides' both autofs and automount. - Autofs itself doesn’t let you specify a configuration file and hardcodes the path to it (/etc/autofs.conf). Currently, the service doesn’t create one at all (it specifies the supported arguments on the command line), so autofs complains about that. I could add config file support if desired, but on a scale from One to Jazzed about it, I am Not Jazzed. Ian Eure (1): gnu: Add autofs-service-type. gnu/services/nfs.scm | 305 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 299 insertions(+), 6 deletions(-)