From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eM79FS9GTGQFDQAASxT56A (envelope-from ) for ; Sat, 29 Apr 2023 00:18:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id IO4IFi9GTGQD0QAAauVa8A (envelope-from ) for ; Sat, 29 Apr 2023 00:18:23 +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 1F23946EB9 for ; Sat, 29 Apr 2023 00:18:23 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psWPk-0005QB-G8; Fri, 28 Apr 2023 18:18: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 1psWPi-0005Pn-Q9 for bug-guix@gnu.org; Fri, 28 Apr 2023 18:18:02 -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 1psWPi-0003Pj-Fn for bug-guix@gnu.org; Fri, 28 Apr 2023 18:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1psWPh-0003IG-RQ for bug-guix@gnu.org; Fri, 28 Apr 2023 18:18:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 14/17] services: mpd: Obsolete 'environment-variables' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 22:18:01 +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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168272025612616 (code B ref 63082); Fri, 28 Apr 2023 22:18:01 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 22:17:36 +0000 Received: from localhost ([127.0.0.1]:34692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psWPH-0003HQ-VM for submit@debbugs.gnu.org; Fri, 28 Apr 2023 18:17:36 -0400 Received: from smtpmciv5.myservices.hosting ([185.26.107.241]:35152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psWPF-0003HF-EP for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 18:17:34 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv5.myservices.hosting (Postfix) with ESMTP id 3727220DDF; Sat, 29 Apr 2023 00:17:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id D838980097; Sat, 29 Apr 2023 00:17:28 +0200 (CEST) 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 e-rfh985Kdqt; Sat, 29 Apr 2023 00:17:28 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 66DD180060; Sat, 29 Apr 2023 00:17:28 +0200 (CEST) Message-ID: <2fabf610-5256-dad1-0e62-449fbcc738f0@makinata.eu> Date: Fri, 28 Apr 2023 23:17:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: <16e06b4b2a932a7c48696fcc1b89c5a454dc9d2b.1682690696.git.maxim.cournoyer@gmail.com> From: Bruno Victal In-Reply-To: <16e06b4b2a932a7c48696fcc1b89c5a454dc9d2b.1682690696.git.maxim.cournoyer@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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=1682720303; a=rsa-sha256; cv=none; b=VkZ/FP32z0cV/vSTgGqyq6vIKpqqPmJZOZ9pBLN1xlfGPsEqbjZdNbTdj6hfzhEL0wW5Xp PIaeqHi68LS41Y6Ago9fqcrPGpTIbYKiyieZEaTXU0fafCLQi0AWFoGEHII1wcWD0ThVSN 5s8iLOc0ziHWyInVFe/OuD9Itbfbbo342pdabzuHSfMlwvHCiLqRzwEtNsgEpNsnI7c2CY KZr1u2yj80GkbsaIAUOAtYguNnfZpKCLjFZws2EfiKNwo3pf3MWodmbiBNDksE3tEq+8ED caKdvsGoSEO9W4Yc4J5yC+KIq8NatY87BzFRJHVdrmJVnBvXTErLEOm7Vqke6Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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=1682720303; 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=hZhYW5WZXuMiZMxPZu1T8WI4U58oz7XeUga3eW+gvTQ=; b=IfaPx2Y34WkI4HlJbtGoq7L41tdGM/l+SvZVgre3zBQo6KyU7gTQPrm8fmW9oQ6joE8l6z TEAqGcgizQhriX+bCaQiQJp+WIObgiX9u9uWpkkH3Ig7RpUy3LwbeqCrabEcWlHcOb0gst txV+5Cdxv3qxkrtMs7TjRx9lz2nfW4qbzV/i0yCiiCpyapBPBfu9XfXq1J/kKmqMUWL+Lp 06OSvbgzgUtYMT3OU7DEgjgA3nKQIIWlSdFFh6n5qn12+RXu8w33KYZYgnKAr1ikvP/Q5F ls7mxnW/9/R6p4kd+xkPxe8c05xCsc628zCtaK7gTRScxLrkfgd2R+wA2nvF1g== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: -3.20 X-Spam-Score: -3.20 X-Migadu-Queue-Id: 1F23946EB9 X-TUID: ADX1pDuprKjJ On 2023-04-28 15:27, Maxim Cournoyer wrote: > Rationale: Services can be extended via the simple-service mechanism instead > of having to expose fields on service configurations that are not directly > connected to the service's configuration. > > * gnu/services/audio.scm (mpd-environment-variables-sanitizer): New sanitizer. > (mpd-configuration): Use it. > (mpd-shepherd-service): Hard code the useful environment variables inside the > Shepherd service. > --- This field shouldn't be deprecated as one of it's primary purposes is to allow for the pulseaudio daemon configuration to be set to another one. What you're doing here is effectively hardcoding the pulseaudio configuration. I'd consider this field to be within the same category as 'shepherd-requirement', it's for flexibility. > doc/guix.texi | 4 ++-- > gnu/services/audio.scm | 19 ++++++++++++++----- > 2 files changed, 16 insertions(+), 7 deletions(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index 550e6606e5..23f3070f39 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -33578,8 +33578,8 @@ Audio Services > This is a list of symbols naming Shepherd services that this service > will depend on. > > -@item @code{environment-variables} (default: @code{("PULSE_CLIENTCONFIG=/etc/pulse/client.conf" "PULSE_CONFIG=/etc/pulse/daemon.conf")}) (type: list-of-strings) > -A list of strings specifying environment variables. > +@item @code{environment-variables} (default: @code{#f}) (type: boolean) > +Obsolete. Do not use. > > @item @code{log-file} (type: maybe-string) > The location of the log file. Unless specified, the logs are collected > diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm > index c11a7cfd26..f0587b9106 100644 > --- a/gnu/services/audio.scm > +++ b/gnu/services/audio.scm > @@ -236,6 +236,12 @@ (define (mpd-group-sanitizer value) > (warning (G_ "'group' in is obsolete; ignoring~%"))) > #f) > > +(define (mpd-environment-variables-sanitizer value) > + (when value > + (warning (G_ "'environment-variables' in is obsolete;\ > + ignoring~%"))) > + #f) > + > (define (mpd-log-file-sanitizer value) > (match value > (%unset-value > @@ -420,10 +426,10 @@ (define-configuration mpd-configuration > empty-serializer) > > (environment-variables > - (list-of-strings '("PULSE_CLIENTCONFIG=/etc/pulse/client.conf" > - "PULSE_CONFIG=/etc/pulse/daemon.conf")) > - "A list of strings specifying environment variables." > - empty-serializer) > + (boolean #f) > + "Obsolete. Do not use." > + (sanitizer mpd-environment-variables-sanitizer) > + (serializer empty-serializer)) > > (log-file > maybe-string > @@ -611,7 +617,10 @@ (define (mpd-shepherd-service config) > (list #$(file-append package "/bin/mpd") > "--no-daemon" > #$config-file) > - #:environment-variables '#$environment-variables > + #:environment-variables > + ;; Use the system-configured pulse configuration. > + (list "PULSE_CLIENTCONFIG=/etc/pulse/client.conf" > + "PULSE_CONFIG=/etc/pulse/daemon.conf") > #:user #$username > #:group #$(user-account-group user) > #:supplementary-groups