From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 kPGnA3LcU2SaEwAASxT56A (envelope-from ) for ; Thu, 04 May 2023 18:25:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id iGB5AnLcU2RtowAAG6o9tA (envelope-from ) for ; Thu, 04 May 2023 18:25:22 +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 7481343AD0 for ; Thu, 4 May 2023 18:25:21 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1publQ-0008Cu-7m; Thu, 04 May 2023 12:25: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 1pubiW-0007n2-4l for bug-guix@gnu.org; Thu, 04 May 2023 12:22:04 -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 1pubiU-00048q-Ou for bug-guix@gnu.org; Thu, 04 May 2023 12:22:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pubiU-0000mQ-8q for bug-guix@gnu.org; Thu, 04 May 2023 12:22:02 -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: Thu, 04 May 2023 16:22: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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.16832172842941 (code B ref 63082); Thu, 04 May 2023 16:22:02 +0000 Received: (at 63082) by debbugs.gnu.org; 4 May 2023 16:21:24 +0000 Received: from localhost ([127.0.0.1]:51927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pubhr-0000lN-HH for submit@debbugs.gnu.org; Thu, 04 May 2023 12:21:23 -0400 Received: from smtpm3.myservices.hosting ([185.26.105.234]:38544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pubhm-0000l9-Ej for 63082@debbugs.gnu.org; Thu, 04 May 2023 12:21:22 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id 450D420F8E; Thu, 4 May 2023 18:21:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id E49278009A; Thu, 4 May 2023 18:21:11 +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 KZtRC0JH2yvw; Thu, 4 May 2023 18:21:10 +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 9384480098; Thu, 4 May 2023 18:21:10 +0200 (CEST) Message-ID: Date: Thu, 4 May 2023 17:21:10 +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> <2fabf610-5256-dad1-0e62-449fbcc738f0@makinata.eu> <874joyaad3.fsf@gmail.com> <2e5d3ddb-5948-de11-4fa5-da02e848a8e6@makinata.eu> <87h6su1944.fsf@gmail.com> From: Bruno Victal In-Reply-To: <87h6su1944.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: 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683217521; a=rsa-sha256; cv=none; b=Xs3bjj5q/0l3fSlgmoT5WFDW5G9xLL2BBzA8vzKi447FB1RqRxqTMRNaks3Pq16501iq3h 5pW4Sd+D8ybrRtBVhkrlQGx548Ggz+1bs8+sqnDRx7jLKEPomDsDHVcTHMnZNndNwU0dYg ioT5OcUHQ7kaQ+Vt9urggW5cQiUt0MGhNyfbxkMetdAZSkoWaVgozlKFZtnPTXOw1OyZAa KC6Dlbfp1lq27dLplGjhYFWoMImVsSBpi7F/M9MZeU0Nqdozxq/gjPfbsYRtZU+hgkApdj a/j58aCwOwuVA8wSr+M01H1pDiWYfnfhXXwipYr7AcyiTLexQ0S2xRL033KCIg== 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=1683217521; 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=dU3JoGzPgLrFSCT6pgtXEmzKQvSNSqBP8Mr2f7ytzzo=; b=to22g8wj2fmY04jdeInWKywizG0h8mTZXeDE4zVQPZE2XA0ZsXpbuE0m1l4SbSlQ3jPpkB E5xld38ZFQ4iKdkfAd95HUI6j5WiHepvIcGkhxeG5LD8bnx/AFyGMqmLhusscfOQgfSfSy qsYZyWITV5km7f+Js/uDfZ/8wUW7sDT965bG+h4BQwtMWo2T1FsO7dH5WX/8NnGzqCFpD5 7KC1FZyd7720TmURWlBFhzHVRwTZhkms924fXoGPbEVXkmGx8DRpTtMQBx3tECSrqOMo/T NLTe8tD6MocjwcVTJZuK1pu2VAQgoWeSxDWTYe/TgaDMXQ9cU30wktY+rMGfWA== X-Migadu-Spam-Score: -1.91 X-Spam-Score: -1.91 X-Migadu-Queue-Id: 7481343AD0 X-Migadu-Scanner: scn0.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-TUID: QrQ7wYbmMHSP Hi Maxim, On 2023-05-03 02:44, Maxim Cournoyer wrote: > Hi Bruno, > > Bruno Victal writes: > >> On 2023-04-29 18:04, Maxim Cournoyer wrote: >>> Hi Bruno, >>> >>> Bruno Victal writes: >>> >>>> 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. >>> >>> Our only means to declare a pulseaudio configuration >>> (pulseaudio-service-type) places it at this location, so it seems >>> reasonable to hard code it. What use case do you have for a custom >>> pulseaudio configuration that pulseaudio-service-type could not cater >>> to? This prevents users defining another environment variable and >>> forgetting to replace these, then wondering why the default pulse >>> configuration doesn't work, and it felt out of place to me (an >>> implementation detail better encapsulated). >> >> Indeed but note that there's a small subtlety to pulseaudio-service-type, chiefly that >> the service is not your typical ¿monodaemonic? process that is used throughout the system, >> rather it simply provides you a default config for the pulseaudio daemon. >> The fact that multiple pulseaudio daemons can be launched alongside is a strong indicator that >> perhaps you will want for some of them to use different configurations, which is done via the >> environment variables. >> >> Right now this would be mainly achieved using local-file, text-file or specifying a path >> but in theory the procedures for pulseaudio-service-type could be reused for serializing >> configurations to be used outside of the service. >> >> Regarding the users forgetting the variables, it looks obvious that if you omit the default >> values there then the behavior will also change accordingly. >> If you strongly feel that this is very pitfall prone (IMO it's no worse than forgetting to add %base-services >> at the end of the services field) then perhaps documenting it would suffice? > > Is this a use case in actual use? It seems a bit of a stretch in my > mind, especially considering the service was already difficult to get > working in its default configuration; I doubt someone would go out of > their way to manage multiple distinctly configured pulseaudio daemons > :-). But if it's something in actual use providing value, I don't mind > to keep it until we have a better way to extend a common set of basic > properties for services in general. I added this field because while I was refactoring this in #59866 I cleared #:environment-variables from the service constructor as they were setting “wrong variables” (stemming from the abuse of the service as a home service) and since I was mostly interested on the network (http) outputs which didn't require any variables set I didn't notice any issues until I learned about PulseAudio's rtp modules and tried using them. With this, I realized that the environment variables should be adjustable in order for the service to be flexible enough for general usage. (in general I prefer the services to be less opinionated) Though originally thought towards multiple PulseAudio configurations, I should stress that PulseAudio (and PipeWire when we get there) understand a plethora of environment variables: * * Cheers, Bruno