From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id EHkKA95vTGSx6wAASxT56A (envelope-from ) for ; Sat, 29 Apr 2023 03:16:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id AFTgAt5vTGQPVgEA9RJhRA (envelope-from ) for ; Sat, 29 Apr 2023 03:16:14 +0200 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 74F1927DED for ; Sat, 29 Apr 2023 03:16:13 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psZC0-0006ok-TE; Fri, 28 Apr 2023 21:16: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 1psZBz-0006oU-2w for bug-guix@gnu.org; Fri, 28 Apr 2023 21:16: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 1psZBy-0000Re-RG for bug-guix@gnu.org; Fri, 28 Apr 2023 21:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1psZBy-0000Cv-DV for bug-guix@gnu.org; Fri, 28 Apr 2023 21:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 01:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63082 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Bruno Victal Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.1682730927747 (code B ref 63082); Sat, 29 Apr 2023 01:16:02 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 01:15:27 +0000 Received: from localhost ([127.0.0.1]:34745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psZBO-0000By-UA for submit@debbugs.gnu.org; Fri, 28 Apr 2023 21:15:27 -0400 Received: from mail-qv1-f49.google.com ([209.85.219.49]:51336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psZBJ-0000Bd-Se for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 21:15:25 -0400 Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-5ef4d902708so6264746d6.2 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 18:15:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682730916; x=1685322916; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=4EjAI5qW/BZtuPXZ/Fl6gBJIylNRC8NyzdsqjBXAuSE=; b=guNoALVYLz3gKkt0vJQmbCpFPh5LPTEpE82RNq3pvOQi+1gVB2JXRXQxws+MSCzDil F9ji1KW1xed378vrxsS2wqJ7smNBjZKZ1ODg3hyhwqeu5qh5xQ7SW5AFmkJCafT7Fo5g xrBT5ByrjurzRD8ghGAA43kkge2Vo+HOKfnK0qLJMC1CNZ+PSyWQa/4wI28iRUROSLnM ggv2ZCxJ6OYxqyIb9gY6NT7EF2oBJAjEtycooO/YDUoTqgGZ4me711/mwoN0Om1YWklW Oyw/1YlhZ/O6iTvgMZY9Q+LXLn4VPZLSqaY31v/ea0Vyl60iXFur7EiU2JJowLwlj5/m AHEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682730916; x=1685322916; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4EjAI5qW/BZtuPXZ/Fl6gBJIylNRC8NyzdsqjBXAuSE=; b=HOTPzM6Nu9aLzT5L8eimMP0Mtx9f1DEn56tIWVS+E0EHu1hytql9D7E084MoBYgRdD lqqNDs6lP0rfYNG42yL5WqV+cgAD6CSL//2W1rnltgecxsLkWIgGTCTB9uVE5xYr6wu6 tA1Js5b4Yzj8aiq0R6KbbLyIttXR2hugqj3DEzdSHjTzBXPvUk2o77zpvs06Antp8AnJ pAWjG0kDa3cyilzPBHe7Wi9m5aR8nkp8CUYdk3Tu1UGay0qI8TmD658+95x9xl++y8NL iexqKqGWCtiXQDEScx7ME8W/zc273/0xWpJzS8UMbop/fE1pH0WvH7Df5+ESi4n/IuaY xyQg== X-Gm-Message-State: AC+VfDxPK5llmeR9h30bxIngshT6H7vv45N77uXlc0Md+7jJE2muYM6h Dee6aOPXpOIGCvKdDzU36ZYpGwbCabaswA== X-Google-Smtp-Source: ACHHUZ5TbWgdY1TUxQqvpYlSs3n79xdAyu7ssAQRUusb0Hf/1c1ShTFG1+bapYiahT0hzSP5T1xyeA== X-Received: by 2002:a05:6214:21e4:b0:5fa:8692:3882 with SMTP id p4-20020a05621421e400b005fa86923882mr11862862qvj.16.1682730915772; Fri, 28 Apr 2023 18:15:15 -0700 (PDT) Received: from hurd (dsl-157-4.b2b2c.ca. [66.158.157.4]) by smtp.gmail.com with ESMTPSA id u17-20020a0cdd11000000b006166a6c62cesm2046949qvk.69.2023.04.28.18.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 18:15:15 -0700 (PDT) From: Maxim Cournoyer References: <0f027280-0cf3-dd82-3ec1-3bffddc638c0@makinata.eu> Date: Fri, 28 Apr 2023 21:15:14 -0400 In-Reply-To: <0f027280-0cf3-dd82-3ec1-3bffddc638c0@makinata.eu> (Bruno Victal's message of "Fri, 28 Apr 2023 22:50:18 +0100") Message-ID: <87sfcja3q5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682730973; a=rsa-sha256; cv=none; b=thOlGUrgXT0iikIEhGm0zmJf1HMFEW6AeOS43fkwtb/Jc3ZCTK+pmsxm9T1qyTbr0CBIM3 9AomkUqNb9MiK9p28MhRsgPtLAX2K3A2D8ohZMLOIxUXzbD+a6w6kF/dhW8jJulISCKr9r bkFHiTaaVayC6J1oOMLFUUUcWe1VlHTt2+GuvSHaE9qOkrXkgFOmYbY6J77Qr8IkRx6pz3 EVaqvLLRJAccJJBIdw6v3emvcpr/3fYMw5oozRu8D7yBGA6qvg0DDoY7Stvk94WWJHU6Tr 7t0wAj0KjAw/2GpGfQgshFHBLGJHJcQbAKc/AfyT0ireyJVOJ+7dDpbhDayN4w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=guNoALVY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682730973; 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: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=4EjAI5qW/BZtuPXZ/Fl6gBJIylNRC8NyzdsqjBXAuSE=; b=V/7ilVVeYd4oUOakuS7wlA2fr5r9mSYPqUKgHXVCrslE9iWqZqOl99NA+bjoJjq/7C6xsE lwohCpbxyvwtVT6OJf06pgrki3cKEJwpUAtrHwYsytLeqtYA8Ol7BkvTNxuuM/w6cytqdC 5WAc4AFARO/REH97/Bb8lsm3jf8CfXoCKVhZkMFkvx2/HgfE1KNRLspaBstbqykFY0jzCD sltwv6nomOr5jg1g2JNJjScfZ9xRri4ToE1FfuwTnlNm6JWlOAORRN31KTUiYrJkW11Ouv ugwPEm/mgRsydGZ7594goZDgnQJDjZvKip6je8iMR8Cr8ivnYXZfFXyc84nQXA== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=guNoALVY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.80 X-Spam-Score: 5.80 X-Migadu-Queue-Id: 74F1927DED X-TUID: 8HXnC0dZz+HH Hi, Bruno Victal writes: [...] >> @item @code{shepherd-requirement} (default: @code{()}) (type: list-of-symbol) >> This is a list of symbols naming Shepherd services that this service >> @@ -33824,15 +33824,12 @@ Audio Services >> This is a list of symbols naming Shepherd services that this service >> will depend on. >> >> -@item @code{user} (default: @code{%mympd-user}) (type: user-account) >> +@item @code{user} (type: user-account) >> Owner of the @command{mympd} process. >> >> -The default @code{%mympd-user} is a system user with the name ``mympd'', >> -who is a part of the group @var{group} (see below). >> -@item @code{group} (default: @code{%mympd-group}) (type: user-group) >> -Owner group of the @command{mympd} process. >> +@item @code{group} (default: @code{#f}) (type: boolean) >> +Obsolete. Do not use. > > I'd skip documenting obsolete fields. 'define-configuration' doesn't allow me to skip documenting a field, I think :-). >> >> -The default @code{%mympd-group} is a system group with name ``mympd''. >> @item @code{work-directory} (default: @code{"/var/lib/mympd"}) (type: string) >> Where myMPD will store its data. >> >> @@ -33872,7 +33869,7 @@ Audio Services >> Override URI to myMPD. See >> @uref{https://github.com/jcorporation/myMPD/issues/950}. >> >> -@item @code{script-acl} (default: @code{(mympd-ip-acl (allow >> '("127.0.0.1")))}) (type: maybe-mympd-ip-acl) >> +@item @code{script-acl} (type: maybe-mympd-ip-acl) >> ACL to access the myMPD script backend. > > Unrelated change? >From the generated doc, which was probably lagging behind the source. >> (define mpd-deprecated-fields '((music-dir . music-directory) >> @@ -242,15 +224,9 @@ (define (mpd-user-sanitizer value) >> (configuration-field-error #f 'user value)))) >> >> (define (mpd-group-sanitizer value) >> - (cond ((user-group? value) value) >> - ((string? value) >> - (warning (G_ "string value for 'group' is deprecated, use \ >> -user-group instead~%")) >> - (user-group >> - (inherit %mpd-group) >> - (name value))) >> - (else >> - (configuration-field-error #f 'group value)))) >> + (when value >> + (warning (G_ "'group' in is obsolete; ignoring~%"))) >> + #f) > > You can drop the trailing #f I think. You are right that I could, but I prefer to leave it, as sanitizer should return a value compatible with their field declared type. >> >> ;;; >> >> @@ -407,9 +383,10 @@ (define-configuration mpd-configuration >> (sanitizer mpd-user-sanitizer)) >> >> (group >> - (user-group %mpd-group) >> - "The group to run mpd as." >> - (sanitizer mpd-group-sanitizer)) >> + (boolean #f) >> + "Obsolete. Do not use." >> + (sanitizer mpd-group-sanitizer) >> + (serializer empty-serializer)) > > You can simply use empty-serializer after (or before) sanitizer, it is > a recognized literal for define-configuration. I was under the impression that form had been deprecated; per (gnu services configuration), around line 217: --8<---------------cut here---------------start------------->8--- (warning #f (G_ "specifying serializers after documentation is \ deprecated, use (serializer ~a) instead~%") (syntax->datum #'proc)) --8<---------------cut here---------------end--------------->8--- [...] >> (work-directory >> (string "/var/lib/mympd") >> @@ -904,12 +871,9 @@ (define (mympd-shepherd-service config) >> (stop #~(make-kill-destructor)))))) >> >> (define (mympd-accounts config) >> - (match-record config (user group) >> - ;; TODO: Deprecation code, to be removed. >> - (let ((user (if (eq? (user-account-group user) %lazy-group) >> - (set-user-group user group) >> - user))) >> - (list user group)))) >> + (match-record config >> + (user) >> + (list user))) > > Nitpick, personally I'm a fan of styling this part as: > > (match-record config (user) > (list user)) > Can't; it'd format this way in Emacs: --8<---------------cut here---------------start------------->8--- (match-record config (user) (list user)) --8<---------------cut here---------------end--------------->8--- -- Thanks, Maxim