From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 6OhMKK9GwWRXZAEASxT56A (envelope-from ) for ; Wed, 26 Jul 2023 18:15:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id CGMcKK9GwWQ4agAAauVa8A (envelope-from ) for ; Wed, 26 Jul 2023 18:15:43 +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 41FEA54640 for ; Wed, 26 Jul 2023 18:15:43 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=InxKZOY4; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690388143; 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:dkim-signature; bh=Loo2R6pNjGQOyIS8qQYcCQrUwUHm6rdo0CS/kFFVcQs=; b=ISk/RcK/lgqIKYXNCSXqachXZjK74RrrJq++k8GjJLbiawbuJtAscCKEBBK7uQI4K4y95H QzTZFhBEmMse8xWtV+vvATs8LUwKg0LoA2mBkUTkATnPfNHnnnccNdAVZ57k5w61pFucsD nYYwWbsPbyvuVVIPWGWT+0ZgcLQB8e1L5ZVl+9uodsS9WdyJ9JO0rEJlmaM3x7y5Xsnyfn m2WN8632GomxvbAX34o3RKnY2+FdaAwt0oFKqoJE8Rt72IULhYcvC6wZDkZlx+EXZP4kxw KVBeu85vNQdrj2qAKKScSe08Gp7puN9OlU19S7kdw8zHp1kcyBv+fRXYd5gyMA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690388143; a=rsa-sha256; cv=none; b=ZUG5DMDQCB3vDu2RYei/vAZFyZ1DeCV+fBTuM7MSfaOeHkk+R63HlT9Vo0cCllNH6xrIqZ bdh3QdrwxJxomgY5trUvI50RmuIBHi2SkOSsMR6SIF7PAZqZpH8lWPo0Ta369DrrgUx25w h7ZXdbLJcC0FAiT46WNnF342armJpxGBcUr9EpyxkVXADsGdISUVTesyfThvak8desoKn9 ejX5zIKkDNxHGwE9XYZS0N4IBHxuwHQq58VBVoxtaxTOV3sT9kSwieQEfvdEG/ceh3mpxB kdGAKSt+68bISP6PLQIR3/ikhrrIgZzFeMkylUWZyy+f2Tr2RKW6ijTwJ7q1Lw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=InxKZOY4; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOh9r-0007CD-DQ; Wed, 26 Jul 2023 12:14:39 -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 1qOh8J-0006Y9-9M for bug-guix@gnu.org; Wed, 26 Jul 2023 12:13:03 -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 1qOh8I-0004QS-LY for bug-guix@gnu.org; Wed, 26 Jul 2023 12:13:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qOh8I-0004wO-Gt for bug-guix@gnu.org; Wed, 26 Jul 2023 12:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63082: mpd defaul configuration does not work ('No database' error) Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 26 Jul 2023 16:13: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: Bruno Victal Cc: 63082-done@debbugs.gnu.org Received: via spool by 63082-done@debbugs.gnu.org id=D63082.169038796118951 (code D ref 63082); Wed, 26 Jul 2023 16:13:02 +0000 Received: (at 63082-done) by debbugs.gnu.org; 26 Jul 2023 16:12:41 +0000 Received: from localhost ([127.0.0.1]:49949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOh7w-0004va-QZ for submit@debbugs.gnu.org; Wed, 26 Jul 2023 12:12:41 -0400 Received: from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c]:44103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOh7s-0004vI-O4 for 63082-done@debbugs.gnu.org; Wed, 26 Jul 2023 12:12:39 -0400 Received: by mail-qv1-xf2c.google.com with SMTP id 6a1803df08f44-63ce8bea776so243276d6.0 for <63082-done@debbugs.gnu.org>; Wed, 26 Jul 2023 09:12:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690387951; x=1690992751; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=Loo2R6pNjGQOyIS8qQYcCQrUwUHm6rdo0CS/kFFVcQs=; b=InxKZOY4MlLgL/ZNazbEZuWgw6agiG3J/7zny6FWJEje8UAk1c12Vxfw2aI46OGqJe 4ztfX6jdTrFLddllzNEEDBBh2sgSgfb7CfQZEN+qQgG15c7iZADnmG2SMRWr2uFZyUwA mmfBxi/gkETcRDCh6WHBb8FHH34NjszKQnRSuKtW9lUcT/shJYz6uA4GKkve80wEwBZ7 YJy2VHlja8HqO9OKimXkqJUiRqHP9s9Jp3PfqLwsQwWZagW+UwZEscY6QIBrNRBXTDJf oyKpBwvH08yuNdXu10P99WXpyFwwdveC5fh0dXchlafj1gCqswN4erU1gglLPQRU4c1O iWeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690387951; x=1690992751; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Loo2R6pNjGQOyIS8qQYcCQrUwUHm6rdo0CS/kFFVcQs=; b=JN+VQ5EvAvzkFoF8az/pBZC/Hncf21IiVzwU6/ZjJ6zv9A9H9ixaNoCOe5w2HCscIV buc1CYCYFZ0IRjjrPcdZxC89YL0iC7sGF4/oPCUVeexgy8/ghwJsMx+GtZvfzcWmkzbR g6FyHyfbVp72dYKpweaI4oytkD2OmnKCa/fbMS+1B8kLVX1SWP8+jTBoiK8stUMfI9Gd cvz888qsrmXrgR3SBocS/eRPZDYqPYiZukvR6UzjdI09RQXlyUry8T8ytNTF1EUqTvNz J93Ll51vkCd0OwovQgqj029RGMwLJXyYKcoys19/C3cz0243hdQHtAzE3HBlQFBXuZCk sWdA== X-Gm-Message-State: ABy/qLaw/KP+x8M0yzkAyODKXOLlslottojDgQjaWFhnH9ilz+kELXQ2 eP3qt3FpMlIMqQogxzM39blnuMr6EmI= X-Google-Smtp-Source: APBJJlFSL1Cl88HKcxchXM/X9nrA1+X6YYaTe0f4KdI4oV+TPWbEUm4HNUBkRyoIz2OJnwsp0cyMaw== X-Received: by 2002:a0c:e549:0:b0:636:60c6:203d with SMTP id n9-20020a0ce549000000b0063660c6203dmr2472925qvm.35.1690387950772; Wed, 26 Jul 2023 09:12:30 -0700 (PDT) Received: from hurd (dsl-10-141-65.b2b2c.ca. [72.10.141.65]) by smtp.gmail.com with ESMTPSA id t9-20020a0cde09000000b00631ecb1052esm5198673qvk.74.2023.07.26.09.12.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 09:12:30 -0700 (PDT) From: Maxim Cournoyer References: <685ac37d86b0e8eb135c5e40aa1f89240c2b4934.1683299529.git.maxim.cournoyer@gmail.com> <927eb9f7-17e6-136d-8fbc-ab1e5d5bb87b@makinata.eu> <87cz0f1zvv.fsf_-_@gmail.com> Date: Wed, 26 Jul 2023 12:12:28 -0400 In-Reply-To: (Bruno Victal's message of "Wed, 26 Jul 2023 15:02:20 +0100") Message-ID: <87r0ouzm6r.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 X-Migadu-Spam-Score: -5.06 X-Spam-Score: -5.06 X-Migadu-Queue-Id: 41FEA54640 X-Migadu-Scanner: mx1.migadu.com X-TUID: zfivYLJeqx0Y Hi, Bruno Victal writes: > Hi Maxim, > > On 2023-07-25 21:48, Maxim Cournoyer wrote: >> Hi Bruno, >>=20 >> Bruno Victal writes: >>=20 >>> Hi Maxim, >>> >>> On 2023-05-05 19:28, Maxim Cournoyer wrote: >>>> * gnu/services/audio.scm (mpd-shepherd-service): Register a new update= action. >>>> * doc/guix.texi (Audio Services): Document it. >>>> --- >>>> doc/guix.texi | 10 ++++++++++ >>>> gnu/services/audio.scm | 11 +++++++++++ >>>> 2 files changed, 21 insertions(+) >>>> >>> >>> I've been looking at this part for the past few weeks in attempt to >>> make it more robust and after countless hours, I'd advise against this >>> (in its current form), reason being that this only works if your >>> configuration happens to match the default values used by mpc. >>> >>> My attempts at getting the values from the configuration into >>> something that mpc understands have been unsuccessful. Not only the >>> decision =E2=80=9Clogic=E2=80=9D of what values to pass is non-trivial,= parsing the >>> endpoints field has been so far a complete nightmare. (with interesting >>> gems like IPv6 address formats that the daemon is happy to use yet >>> mpc will reject) >>> >>> Having the proper hostname (and port) intelligently deduced from >>> the endpoints field is a big minefield that is likely to end in >>> unmaintainable spaghetti. >>> >>> Short of introducing additional fields like =E2=80=9Cinternal-mpc-host= =E2=80=9D and >>> =E2=80=9Cinternal-mpc-port=E2=80=9D, you could modify this to relay the >>> 'environment-variables' field for mpc as well. (since it can make use >>> of the MPD_HOST and MPD_PORT varibles if present) >>=20 >> Apologies if it's been a couple weeks, but was the above comment really >> meant for patch 02/16 of this series ("services: mpd: Add an 'update' >> action to trigger a database update.") ? I don't see how they relate. > > Yes, since this action uses 'mpc' to issue the 'update' command and > the way it works is that mpc is using a 'default' value to connect to MPD= .=20 > > The 'default' works until you change the 'endpoints' to something that > _doesn't_ match the defaults that 'mpc' uses (e.g. [fe80::1234%eno1], > /var/run/mpd/not-your-expected-name.socket, 2001:db8::1, etc.) > > Since the 'endpoints' field is equivalent to MPDs 'bind_to_address' > directive [1], you have to take into account the flexible formats it allo= ws > and the 'port' field as well. This makes it somewhat non-trivial to > inspect the 'endpoints' and 'port' fields to select an address for the > shepherd 'update' action to use. You also need to take into account that > you have to pass the address and port separately (if needed) for 'mpc'. > > One additional avenue (from the ones originally listed) we could explore > is to make the endpoints field no longer a maybe-type. We set a default > value (that is aligned with upstream, like localhost:6600) and also set > an =E2=80=9Cinternal=E2=80=9D unix socket to be used primarily by shepher= d. > > [1]: Thanks for the analysis. I've reverted the commit, as I don't intend to work toward fixing it. --=20 Thanks, Maxim