From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id QJcOJLQueGYiUQEA62LTzQ:P1 (envelope-from ) for ; Sun, 23 Jun 2024 14:18:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id QJcOJLQueGYiUQEA62LTzQ (envelope-from ) for ; Sun, 23 Jun 2024 16:18:28 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailoo.org header.s=mailo header.b=XgVFuFWX; dmarc=pass (policy=none) header.from=gnu.org; 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=1719152308; h=from:from:sender:sender:reply-to: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=F9H564Pd5eGXW3SRXSL77kcSpCH37DUi181BCUM8n5c=; b=l+g/9wB/D4KYZRNWoZZak114JzmCTgzthwxJhLlGt/lJbbi9TsusGqIhHYF2yBXjb9bHOK HoG9f2BfTr9QOHWFsPJILvtmOg+fSUOYKqx5NkXpZXxpDBOE6YsaTik+HA3aJleR520Mmd p8OQQPUI2W7AdI1eTvgTGULi9UZgmDPFXuDgDk8TVS7BxKtZ9bcyCd4UxqEZ6M/mMAwTvW yycNDEkxP8QM2YJI+8TZ9RuQtnDcbtbrlbC64zF0GDwB4ZZIV/JBB/EEQgQji2mG5CPWn5 Wo5OghxlO6YtHI2gM1XrWdQ3ss9BQlRSrOL+/io4hj8W+fGVPOwbn8XvAHU5jA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1719152308; a=rsa-sha256; cv=none; b=Qf2RQ/J393prJhtm21pXYYOSXb/7KDAPndscC60+ztUyS6iprnbAZCkl06sD4QloHPO0iM ujqiRmL8Ce4Ho/WcHz7aPApB3hjz6/pZymokwpejxg6H72KaHTQlfcogGrnc3IAcg3tNqo 7uud3lejZiai0uszKTHwfa4o3/WRuajNDWIxBdsfbFxtu1n2nggS35aT/rfZzzLmi1N1NT gxX4GttMjIpVuFCqs9Rn/ihCp8hde8CKS+HBCcr22LFPZFUEs7d1YxQ1i53OiIEeLHpRB7 uqlyoovmmaY+2w5aHaH4t53H9mS/ryJDWILx2BboAGxtoH32kBbVreXYwMYz3A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailoo.org header.s=mailo header.b=XgVFuFWX; dmarc=pass (policy=none) header.from=gnu.org; 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" 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 40D6D63F0B for ; Sun, 23 Jun 2024 16:18:28 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLO2f-0001MG-57; Sun, 23 Jun 2024 10:18:05 -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 1sLO2b-0001M5-Nf for guix-patches@gnu.org; Sun, 23 Jun 2024 10:18:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLO2b-0006gC-Fp for guix-patches@gnu.org; Sun, 23 Jun 2024 10:18:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sLO2b-0005dM-O3 for guix-patches@gnu.org; Sun, 23 Jun 2024 10:18:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71735] [PATCH] services: mpd: fix log to file Resent-From: Yarl Baudig Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 23 Jun 2024 14:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71735 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71735@debbugs.gnu.org Cc: Yarl Baudig X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171915222921550 (code B ref -1); Sun, 23 Jun 2024 14:18:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jun 2024 14:17:09 +0000 Received: from localhost ([127.0.0.1]:34315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLO1l-0005bW-5n for submit@debbugs.gnu.org; Sun, 23 Jun 2024 10:17:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:34234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLO1j-0005bN-J9 for submit@debbugs.gnu.org; Sun, 23 Jun 2024 10:17:08 -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 1sLO1i-0001Gi-Jw for guix-patches@gnu.org; Sun, 23 Jun 2024 10:17:06 -0400 Received: from msg-4.mailo.com ([213.182.54.15] helo=mailo.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLO1g-0006Px-Ne for guix-patches@gnu.org; Sun, 23 Jun 2024 10:17:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1719152220; bh=XIIdJE2NOpv+nM2IsIU2ttte5nywc0/aHm5p46sylyg=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding; b=XgVFuFWXR0F0BD75ZvSCKS+3dPm/8+RBauG3Se3fnlwE/1ewaDhZtiGdZwiSVjLa2 A9OORpOMxwZSHCE8D3yAorKpbUCgXw8njqg0pJBwZd/d1so8QDaV72hmdYGl5G+PKb 17USvbCjQtSx8PsY07kTte3KUEAPXWnPJ0ChhDIM= Received: by b221-3.in.mailobj.net [192.168.90.23] with ESMTP via ip-20.mailobj.net [213.182.54.20] Sun, 23 Jun 2024 16:17:00 +0200 (CEST) X-EA-Auth: 2+0Ek67p73dpP2anWkfRPZ8k76m89VVYXCt0D9ZaMUgBRWqtoF8Nizk0cqb5JcI8CCt9O8Kk/cvy8TJWKoKZTTd8g85yc7BZ8JMxR3wXl0I= Date: Sun, 23 Jun 2024 16:15:58 +0200 Message-ID: <20240623141657.61044-1-yarl-baudig@mailoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=213.182.54.15; envelope-from=yarl-baudig@mailoo.org; helo=mailo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Reply-to: Yarl Baudig X-ACL-Warn: , Yarl Baudig via Guix-patches From: Yarl Baudig via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.56 X-Spam-Score: -3.56 X-Migadu-Queue-Id: 40D6D63F0B X-Migadu-Scanner: mx11.migadu.com X-TUID: qd+0MdzoPE+B (match value (%unset-value ...)) is equivalent here to (match value (_ ...)). Even if you set 'log-file to some path, it's always "syslog" in the configuration file. * gnu/services/audio.scm (mpd): fix buggy 'match'. --- gnu/services/audio.scm | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index ae991ced4d..2c8af138e7 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -251,16 +251,12 @@ (define (mpd-group-sanitizer value) (configuration-field-error #f 'group value)))) (define (mpd-log-file-sanitizer value) - (match value - (%unset-value - ;; XXX: While leaving the 'sys_log' option out of the mpd.conf file is - ;; supposed to cause logging to happen via systemd (elogind provides a - ;; compatible interface), this doesn't work (nothing gets logged); use - ;; syslog instead. - "syslog") - ((? string?) - value) - (_ (configuration-field-error #f 'log-file value)))) + ;; XXX: While leaving the 'sys_log' option out of the mpd.conf file is + ;; supposed to cause logging to happen via systemd (elogind provides a + ;; compatible interface), this doesn't work (nothing gets logged); use + ;; syslog instead. + (let ((value (maybe-value value "syslog"))) + (if (string? value) value (configuration-field-error #f 'log-file value)))) ;;; -- 2.45.1