From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 8AqiMIdBHmTf7gAASxT56A (envelope-from ) for ; Sat, 25 Mar 2023 01:34:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EK2UMIdBHmQG9QAAauVa8A (envelope-from ) for ; Sat, 25 Mar 2023 01:34:15 +0100 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 AE99728555 for ; Sat, 25 Mar 2023 01:34:14 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679704455; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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; bh=i8tK/Uy+KLRo4gwxEVt8vwnUX0P8LFv/QCSiFa9Or3Y=; b=jzxxMybLOFeuebHeVoZSVE1NXmSGtPashjtmahcBgIV8hiihzt7h6JZGZmRzsCLN++OITK bjufmDA9AqvkZU+Mr6V7ZfNDth5KsvkxXr4cOTkZ+3KlHfpndeYN0Z8o1IEVX0TWaxOTfc seK7vk12eaKVXGpTHs5Gq9h0s7csoF0DoQv59wNE3slrPuG9r7LT5xyuGLPLnwEToC2WjK vVmcWUpItRpbvKCT+70JER/gevBmguevQhw1tWbezQiumsV7KHBgs7FCfmbeh6xfFFiMYj TnacgSiQ6u/9fdpF740/dhTrsl4rEamgiSF2KyNpVS2ywksW8vmCit6nZyXp+Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679704455; a=rsa-sha256; cv=none; b=l0+S3lRGy1OYe+NKTxhy3GGWauCIGBKfwoouzwKVqqBcwRxu2PhRzHO1IxwEa1ADmh11ai dJR556BYpuUlS31eUJATBJI+0WBkJTCVwv0SYwm4lv46yATs4lOqAsnjoNMetEn0BhuXeS 4uZz7+B26yiZTNOFngxgLUD7Us0TCy7buVAwG+wN64VtSlA45tHLCVSLACBrckci40pFod dxjSdbXHXaZuN8e92dRF5zzGZvd1GDgsYkjCuQ/kDjNwPvyzj7sOGbY5jehFiG098RQl7Q TGHGXDAW/aQQOIsxijXl3kxPUfd6Mgz0z9ONo3KmyJFP5iCroXSTOYriA5cHmA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfrrA-0005Mk-Kt; Fri, 24 Mar 2023 20:34:04 -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 1pfrr9-0005LP-Ah for guix-patches@gnu.org; Fri, 24 Mar 2023 20:34:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pfrr8-0003UM-UW for guix-patches@gnu.org; Fri, 24 Mar 2023 20:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pfrr8-0007mr-Ja for guix-patches@gnu.org; Fri, 24 Mar 2023 20:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62298] [PATCH v2 8/8] services: mympd: Use user-account (resp. user-group) for user (resp. group) fields. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Mar 2023 00:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62298 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 62298@debbugs.gnu.org, ludo@gnu.org, liliana.prikler@gmail.com Received: via spool by 62298-submit@debbugs.gnu.org id=B62298.167970441929901 (code B ref 62298); Sat, 25 Mar 2023 00:34:02 +0000 Received: (at 62298) by debbugs.gnu.org; 25 Mar 2023 00:33:39 +0000 Received: from localhost ([127.0.0.1]:41750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfrqk-0007mD-Ls for submit@debbugs.gnu.org; Fri, 24 Mar 2023 20:33:39 -0400 Received: from smtpm4.myservices.hosting ([185.26.105.235]:47012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfrqi-0007m3-FF for 62298@debbugs.gnu.org; Fri, 24 Mar 2023 20:33:37 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm4.myservices.hosting (Postfix) with ESMTP id 4847D20D97; Sat, 25 Mar 2023 01:33:32 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id DA69680098; Sat, 25 Mar 2023 01:33:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id WUPp7DoqKnQg; Sat, 25 Mar 2023 01:33:31 +0100 (CET) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 32F9480097; Sat, 25 Mar 2023 01:33:31 +0100 (CET) Message-ID: <6adedff0-30d3-c1c4-7b10-ece811f517ab@makinata.eu> Date: Sat, 25 Mar 2023 00:33:30 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US References: <364a2fe961ddce2c4668c0c8b78f46bffe2c2096.1679583701.git.mirai@makinata.eu> <877cv6yw5e.fsf@gmail.com> From: Bruno Victal In-Reply-To: <877cv6yw5e.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: X-Migadu-Queue-Id: AE99728555 X-Spam-Score: -1.23 X-Migadu-Spam-Score: -1.23 X-Migadu-Scanner: scn0.migadu.com 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-Country: US X-Migadu-Flow: FLOW_IN X-TUID: 8HpHCKavPCiH On 2023-03-24 16:03, Maxim Cournoyer wrote:> Bruno Victal writes: >> >> +;; XXX: These will shadow the previous definition used by mpd >> +;; and cause warnings to be shown. Maybe split the file >> +;; into audio/mpd.scm and audio/mympd.scm ? >> +#;(define-maybe/no-serialization user-account) >> +#;(define-maybe/no-serialization user-group) > > I'd rather keeping them together if possible; could the prefix trick be > used with them? No need for a hanging indent for continued text, here > and for the other occurrences. The prefix trick is unlikely to help since the previous ones already use it. --8<---------------cut here---------------start------------->8--- (define-maybe user-account (prefix mpd-)) (define-maybe user-group (prefix mpd-)) --8<---------------cut here---------------end--------------->8--- I'm using define-maybe as a “cheat” here for prettier documentation generation. Without define-maybe, the documentation is rendered as: --8<---------------cut here---------------start------------->8--- @item @code{user} (type: user-account) The user to run mpd as. --8<---------------cut here---------------end--------------->8--- … which is the documentation format for a field that requires an explicit value, even though we are setting a default one using %mpd-account. On the other hand, using define-maybe yields: --8<---------------cut here---------------start------------->8--- @item @code{user} (type: maybe-user-account) The user to run mpd as. --8<---------------cut here---------------end--------------->8--- … which is the format for fields that do not require any manual intervention. > The expressions commented; should they be? On another note, '#;' > appears undocumented, I'd avoid it until it is (and it's not necessary > here). They're commented because the “right way of things” would have that the first maybe-user-account is mpd-configuration specific due to (prefix mpd-) and that we should have another maybe-user-account that is unrelated. Here, we're actually reusing the one from mpd and it happens to be “ok” since we do no serialization due to define-configuration/no-serialization. Regarding #;, it is documented, though perhaps in a indirect manner. It's SRFI-62, which is listed as supported in Guile manual. >> + (inherit %mympd-group) >> + (name value))) >> + (else >> + (configuration-field-error #f 'group value)))) >> +;;; > > Was this ';;;' added by mistake? It serves as an aid to demarcate the deprecation helpers to be erased when the time arrives. The helpers for MPD are also similarly demarcated.