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 2L6oOHBaTWTaAwAASxT56A (envelope-from ) for ; Sat, 29 Apr 2023 19:57:05 +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 aKKaN3BaTWQK3AAAG6o9tA (envelope-from ) for ; Sat, 29 Apr 2023 19:57:04 +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 98EAF39434 for ; Sat, 29 Apr 2023 19:57:04 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psoHt-00018I-Ti; Sat, 29 Apr 2023 13:23:09 -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 1psoHs-00016e-0B for bug-guix@gnu.org; Sat, 29 Apr 2023 13:23:08 -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 1psoHr-0003Np-Ns for bug-guix@gnu.org; Sat, 29 Apr 2023 13:23:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1psoHr-00008d-JM for bug-guix@gnu.org; Sat, 29 Apr 2023 13:23:07 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 13/16] services: mpd: Obsolete 'environment-variables' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23:07 +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: 63082@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.1682788960356 (code B ref 63082); Sat, 29 Apr 2023 17:23:07 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:40 +0000 Received: from localhost ([127.0.0.1]:36581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoHP-00005Z-JF for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:39 -0400 Received: from mail-qv1-f41.google.com ([209.85.219.41]:47228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoH9-0008V5-91 for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:23 -0400 Received: by mail-qv1-f41.google.com with SMTP id 6a1803df08f44-5ef51c44141so5827826d6.2 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788937; x=1685380937; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tkm19UqJL1L1ERVzGHm3BZg28c7LbA4b7CRT72uaDJY=; b=J8bsqI50s+NDSNzw/VlzK7FFcpNCW5Sq853XTRPE0FoJ0TdZTuJWJelPr87ybY3jX3 SKoLOUNYywXOjXUBaXpcU7HYfWac9i0fJ8T3NV1qKahTeaCZW2zUGci2S2gOMg3goFRd o4c0ujv97b2WSPuCbx4h9iS1tXS3LS8XZ6fLicijlQrWLagRmenIL7/nx5MU452cM5Cp kGZ9jFI3mljB8OHedz1qTidCN5JP9rRvCAPV4cD/8aeGNOuaQNa1akFlNGk+FNvCve3y RBJNp/r6bCt/gkwW9OFOnvcYn8HlIT9+z7oxsFa/TGNWR44oAeRnqndR50INC8TWUk/Z mITA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788937; x=1685380937; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tkm19UqJL1L1ERVzGHm3BZg28c7LbA4b7CRT72uaDJY=; b=GXmLKmZZb2Vi++Ry6sk57X43eLAX3mkrkSfMl/AcOYhopZDj0+iDO7svK0sI2TPX6w TdhBulBV9igPgRkINyRYmayC9v37wbGd4zXltn5K9GulCok96sJRML7b/u+pmFy/BFqx MCXFwHAFJxCc/qogCdez3WzH+OhvtSWzxY7umqlwS7oKXPxDlFHJ09fozwSJvOujMSoi FhgJucXlTPqMl1gctzEyJPlidYkRom2lBevU3KNZ+9rqSgK5bG6tOaOrMNp5TQ0N6V7S Xx24tP4vT+5DQso1bq2vrFxYLFdKhXCUuVvXasUo6FJa31MxWjW0lwNC3JFjtOeSXsaW VPmg== X-Gm-Message-State: AC+VfDxQUxmn349b4XoRNdKDzITNJmY3Kt2YWCvos/Z2QpoqokD87LJK K4Jzkm7SjYRQY2+9D6XE2bC9jlSxJwE= X-Google-Smtp-Source: ACHHUZ4yQ6sogV+yV6wTKXXhORUc09JZIOb68MiVPlsCgAF85sGS8LP+nF+E6ouQQpLeL+1zR7+77g== X-Received: by 2002:a05:6214:f02:b0:5ee:2789:15f9 with SMTP id gw2-20020a0562140f0200b005ee278915f9mr16899214qvb.16.1682788937428; Sat, 29 Apr 2023 10:22:17 -0700 (PDT) Received: from localhost.localdomain (dsl-155-245.b2b2c.ca. [66.158.155.245]) by smtp.gmail.com with ESMTPSA id dm45-20020a05620a1d6d00b0074cf009f443sm7582489qkb.85.2023.04.29.10.22.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:17 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:50 -0400 Message-Id: <56615a1e8f212d453e47ccacbe30e5a3b7f17678.1682788744.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 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-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682791024; a=rsa-sha256; cv=none; b=CBfYi4MbU39eqvzQYr4EhKTiVhpMSuU8Mq4Kk+COQJJp8tqbXjoOvWNcQJwv/huJEAljll snpkez0atU1jVJZ0E1yw9g91mwkHqgOP9ieAvarVqoGnCIeDw+f+qMhZwhBZh+mEzLmsLj ixvKyXbgXS3OHiOLKVr4gdJOajnwQXY9JUiLcRq/Zhw9Bb8gBQS8mofLyccRxtUXJBC1IP l01QBBVYrwchTye8l+nNcTftuNzmSMAogm4JLmbu9UUoHBT1CSQHx6oeJiVOq0NtnZJF2s G6W52R3M0jnRwqxr4e1otgG71AMMT+lXguBji4SpRyCLJqA9SdDz7/rfiMQSMg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=J8bsqI50; 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=1682791024; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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:dkim-signature; bh=tkm19UqJL1L1ERVzGHm3BZg28c7LbA4b7CRT72uaDJY=; b=EhZZxAxJI34HfWK1J47nzb2wmM9Dap1L+IMEFDXXPtQI6k5F26jVlOhgmCXMTHAoavjIBz 92W0sGl96sN5YEVWomPBHV62rM9BdFrtyuwdJWmxWYvsc91DEseMT0yTTFqwZ1suNssumE CvnSfGGrGZ8DPEwbfAQo4M6yziNI1PZl1fTUXgFi047Yir93lXYYeur/miKsQcsigzDM57 oNcaMJCXhs3Z+yRATTkEVAySpJVHUR+qDvpfmtEzjiLGvFiIhOUZ/dNvB9Bmehul61fBjj 3LlrZs+ObqG81LWkV7ndOK1tZP4A/0zbrEN97cN+BwQ7yFvwU2HGGcv6jiO9MQ== 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=J8bsqI50; 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: 7.80 X-Spam-Score: 7.80 X-Migadu-Queue-Id: 98EAF39434 X-TUID: CflPdycpOjWW 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. --- doc/guix.texi | 4 ++-- gnu/services/audio.scm | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 3de7405318..148ca88633 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, logs are sent to the diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 1e0a8b7f9e..dca2e8e5f6 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -249,7 +249,11 @@ (define (mpd-log-file-sanitizer value) value) (_ (configuration-field-error #f 'log-file value)))) -;;; +(define (mpd-environment-variables-sanitizer value) + (when value + (warning (G_ "'environment-variables' in is obsolete;\ + ignoring~%"))) + #f) ;; Generic MPD plugin record, lists only the most prevalent fields. (define-configuration mpd-plugin @@ -423,9 +427,9 @@ (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." + (boolean #f) + "Obsolete. Do not use." + (sanitizer mpd-environment-variables-sanitizer) empty-serializer) (log-file @@ -626,7 +630,10 @@ (define (mpd-shepherd-service config) (make-forkexec-constructor (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 -- 2.39.2