From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id cCYuLDHsS2SYkAAASxT56A (envelope-from ) for ; Fri, 28 Apr 2023 17:54:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id CHUBLDHsS2Q0JQAA9RJhRA (envelope-from ) for ; Fri, 28 Apr 2023 17:54:25 +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 425C439202 for ; Fri, 28 Apr 2023 17:54:25 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psP5F-0007y7-KW; Fri, 28 Apr 2023 10:28:25 -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 1psP4y-0007bu-Jf for bug-guix@gnu.org; Fri, 28 Apr 2023 10:28:12 -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 1psP4x-00060G-Qz for bug-guix@gnu.org; Fri, 28 Apr 2023 10:28:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1psP4x-00059k-MG for bug-guix@gnu.org; Fri, 28 Apr 2023 10:28:07 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 14/17] services: mpd: Obsolete 'environment-variables' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28: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.168269208719805 (code B ref 63082); Fri, 28 Apr 2023 14:28:07 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:28:07 +0000 Received: from localhost ([127.0.0.1]:34169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4w-00059F-BZ for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:28:06 -0400 Received: from mail-qv1-f54.google.com ([209.85.219.54]:55608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4Y-00055h-Kq for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:43 -0400 Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-5ef8af5d211so190496d6.3 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692057; x=1685284057; 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=6Tnwv07RoJgbiAa9NQrH/0zkdfJOHWnODFx+NJLooLA=; b=J5FljoNYNdDa/iQT2QebvLM+JCbhIlgQ563UuDyAUTL3wio1bCsKxlHlaulMDM6PeP xXda9CEFcCdfTJTWNgF+KJ9Z0d8TrEZTOA5VFjcJuMfjI+upQwBf25kyNOLqSXipJA4K BsvBVqt79PdpgjKX87WS0Fva0AfzB0N7k5kUnSadGgMSdJpxQEbdYDfxJjrOg7TW3wC5 78qoSop+NGd4ggtlcuu971DD3CLOZUJCrJrCm9VpM5fdFreJsgGzJf3j+9qR+hIB9lMf gaJSvHJSB64h/Gh7LTxI+VmOlmZcbZjTL4ye2D5X958+5l3N1FO5fmvWzlu54MSvjHSa w+DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692057; x=1685284057; 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=6Tnwv07RoJgbiAa9NQrH/0zkdfJOHWnODFx+NJLooLA=; b=HdQeCM6HneChPIebyKNs7qN8sJp0fyyhIt8VHe85HA0xIn/aCCV/NUfuxrGCrzpoZL 6aWYVLck2P9i8lVjq2n6gPbkeHaX7Dhpq4VVSvCgoLawzidmIp9NIlBr0P1Zu3kGtDKb rsTuIGGOOAIGad+TunMZF+FdKLmKpSZJMSur97NzAOI/+KwSb5c9VJGeWxZ3a0tQUGJi wrHAsy72DJBFNCVhbM29iH3MWWWsKSXsfROaww1pDpC68TyEpIb+0N8IOXlLCWu7Th6V Z8zo4QQ29zdIFz2D4kASlDHWSYVFvIJdoeVt9r7rKpHzZQrrZCZ3+Z+fZJMjWAWqJRiO BL2Q== X-Gm-Message-State: AC+VfDxB4jkb8ARhOctpm3qx5OFW41Ujzwkt3lyddnSW6LZ0goYp3ztL 04LQMbj7zLo0uiXBH3KNMj+Np4pnn+M= X-Google-Smtp-Source: ACHHUZ6QwolTwkYiVxH70s/YiYtZuJ2dWLyOLBbAMCO/UOmdy42EmOMuQUsaW5RACh5lH/qFnOIbLA== X-Received: by 2002:a05:6214:d66:b0:5ac:fb9a:67a1 with SMTP id 6-20020a0562140d6600b005acfb9a67a1mr8982120qvs.47.1682692056994; Fri, 28 Apr 2023 07:27:36 -0700 (PDT) Received: from localhost.localdomain ([2607:fad8:4:3::1000]) by smtp.gmail.com with ESMTPSA id d8-20020a0cfe88000000b005ff569bca72sm6176940qvs.93.2023.04.28.07.27.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:36 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:27:07 -0400 Message-Id: <16e06b4b2a932a7c48696fcc1b89c5a454dc9d2b.1682690696.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=1682697265; a=rsa-sha256; cv=none; b=Nacli3OHKvrdGYMHAai5csOycHnG4ybyehR5ECKp0E7+8rXaeS+IPMS3ARhgEUnZDwwuph KjKezzrFv8Dvdp6A6VXaUIAout5pW0D42O9PxmBXYtDxSsrX6/56gPKoLDDuPzBhhUP3dW z/nsCMwUx8R/NgBJ9OnN5EmXtFVwp5bOc3Y7VAdnf6cvrryiNorGEvWbSWO3QYfJHH9uCb mqMrztuXXgpouxlBwO72Y0i8fm0V/Qv2Hhk11hOsQeaeymlnM403SM5Bjbhv0xWkdW+8Ix SV6JUREcu/+ww5yCS/80G0YQFn5rHn4bksZ07vk5OJdmtqb9+HIXBMTAI6GGXA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=J5FljoNY; 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=1682697265; 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=6Tnwv07RoJgbiAa9NQrH/0zkdfJOHWnODFx+NJLooLA=; b=gQonVVO9p33mhxRS5KHLurlYOXT5YkCgOewISDBzd5GRmWl+Qi2+9bQociF9zNXeQGGdfH ZxlvLdHY9uB8Kkey6jc5ls43vj3epzFAzAeHoisHP2Ous08F8zzmiiAVI0KNPzb2MH/k9N 4f5+dWoMurnPL9LGSmMzbcIWq/sYnOErgwlatXyu0jKCJiy/9rYydecwHcXiF0LPCjZPIc wilqazOO9F69Ct9vLvNZ/1f61XiK7wGQb+FId3DGAaZ/Z3zbO5z5flYQMztHPNd/Q8F4CH MNwLtrtJtCG9VD4AdN/OybicCz8ih8QAeeOnunAtkeW8P/NUR/OHMwW4w8Yl3Q== 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=J5FljoNY; 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: 6.30 X-Spam-Score: 6.30 X-Migadu-Queue-Id: 425C439202 X-TUID: qil997Fa1qBW 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 | 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 -- 2.39.2