From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 ILwhL1dFHmQF0wAASxT56A (envelope-from ) for ; Sat, 25 Mar 2023 01:50:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id aFA3LldFHmRqMwEAG6o9tA (envelope-from ) for ; Sat, 25 Mar 2023 01:50:31 +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 8D6963ECBC for ; Sat, 25 Mar 2023 01:50:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfs6g-0000mx-GN; Fri, 24 Mar 2023 20:50: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 1pfs6d-0000me-MQ for guix-patches@gnu.org; Fri, 24 Mar 2023 20:50: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 1pfs6c-0006ib-UC for guix-patches@gnu.org; Fri, 24 Mar 2023 20:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pfs6b-0008DL-Ic for guix-patches@gnu.org; Fri, 24 Mar 2023 20:50:01 -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:50:01 +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: Liliana Marie Prikler Cc: ludo@gnu.org, 62298@debbugs.gnu.org, maxim.cournoyer@gmail.com Received: via spool by 62298-submit@debbugs.gnu.org id=B62298.167970537631540 (code B ref 62298); Sat, 25 Mar 2023 00:50:01 +0000 Received: (at 62298) by debbugs.gnu.org; 25 Mar 2023 00:49:36 +0000 Received: from localhost ([127.0.0.1]:41762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfs6C-0008Ce-Bs for submit@debbugs.gnu.org; Fri, 24 Mar 2023 20:49:36 -0400 Received: from smtpmciv1.myservices.hosting ([185.26.107.237]:58848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfs6A-0008CW-L1 for 62298@debbugs.gnu.org; Fri, 24 Mar 2023 20:49:35 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv1.myservices.hosting (Postfix) with ESMTP id 6871B20E2A; Sat, 25 Mar 2023 01:49:33 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id B3EC08009B; Sat, 25 Mar 2023 01:39:51 +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 aFj2IqzOKlOb; Sat, 25 Mar 2023 01:39:51 +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 244AD8009A; Sat, 25 Mar 2023 01:39:51 +0100 (CET) Message-ID: <8ce45dff-8f82-78de-fba1-27bf96168b7e@makinata.eu> Date: Sat, 25 Mar 2023 00:39:46 +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> From: Bruno Victal In-Reply-To: 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: 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679705431; a=rsa-sha256; cv=none; b=WYr2N4B0HFA7ltvbTSZBXQbRzcJ2SGrhyHoKG7lWzc1m750xbm4ubnAyMolsEE0jPC9bV0 ngLYd/yvMDGYvcwOx/sNottNi7ycpfsvZ3tCU/07ISUf1JdB3LMkiKgn3Xp3QZpwbolKX7 HQdNeWWRLActINkm+Gxd541UJfu1LwUE0Q9sKUavdSoDxynUITCyFQXT5ZVPtNH/qnDKgo s6XOVV+/ql6445dBg0gBFdTo/a4xxycGZgDxd7tDguIZZS2ujrq09WqOitYrj2RSfbJ5M0 PzhiIZdcQFlgAdGekq7k3zPdfqmy6gaRtIR20BhzCeg933g4DiWL6xuDzJjyhA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=1679705431; 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=1vbjpB3LdWwT8n7twHayUEj+4BUuSc71GKrYAk7BBIk=; b=nkx31SIeZvmm4gzhxT18HvZT8L4VhK7FQmezbgz+A+RfcXWGCFPQ17yy+YUn/UWD0jw86D ZyEZHw13ZBToHjBeXcdEfYlqS/sf0fyTt1jE5A5u7HGelQUkuaL7t2fQUqNvxW9NYwAblF +O+sMoMV1UhXTuCCPpyaXPsWLMPmRg8jOL3L0XI8wyq1cnzi6lC72/lraWjc0XnafAd/Yy kDcHaTAzEu4u7GmcMaEf8P8dlJQCObbu7ZJtV3nEDB45ijRITJUKZuEZNugjrIqfh7zT2K pzp/yYgA1nKwvylQsgO2UirPUmxwosFjxEUJel2eIRpRTsW3I9khmvnP6J0SBQ== Authentication-Results: aspmx1.migadu.com; dkim=none; 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" X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -0.23 X-Spam-Score: -0.23 X-Migadu-Queue-Id: 8D6963ECBC X-TUID: 2AE4PGfsbOJF On 2023-03-23 19:19, Liliana Marie Prikler wrote: > Am Donnerstag, dem 23.03.2023 um 15:02 +0000 schrieb Bruno Victal: >> +(define %mympd-user >> +  (user-account >> +      (name "mympd") >> +      (group "mympd") >> +      (system? #t) >> +      (comment "myMPD user") >> +      (home-directory "/var/empty") >> +      (shell (file-append shadow "/sbin/nologin")))) >> + >> +(define %mympd-group >> +  (user-group >> +   (name "mympd") >> +   (system? #t))) >> + >> +;;; TODO: procedures for unsupported value types, to be removed. >> +(define (mympd-user-sanitizer value) >> +  (cond ((user-account? value) value) >> +        ((string? value) >> +         (warning (G_ "string value for 'user' is not supported, use >> \ >> +user-account instead~%")) >> +         (user-account >> +          (inherit %mympd-user) >> +          (name value) >> +          ;; XXX: this is to be lazily substituted in (…-accounts) >> +          ;;      with the value from 'group'. >> +          (group %lazy-group))) >> +        (else >> +         (configuration-field-error #f 'user value)))) > I think an in-place creation of the user and group might make more > sense than defining a dummy value for inheritance purposes. Same > probably also applies to the MPD service patch. Though already replied to in private via IRC, to leave this clarified for other reviewers, these are not dummy values. They're the default values that the service will use if none are specified. The inheritance happened to be a bonus here. Cheers, Bruno