From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8DbcM5XokWPK8gAAbAwnHQ (envelope-from ) for ; Thu, 08 Dec 2022 14:37:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cILLMpXokWNoXwEAG6o9tA (envelope-from ) for ; Thu, 08 Dec 2022 14:37:25 +0100 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 A6A923D471 for ; Thu, 8 Dec 2022 14:37:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3H5T-0007G5-Ov; Thu, 08 Dec 2022 08:37:19 -0500 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 1p3H5E-0007DC-UG for guix-patches@gnu.org; Thu, 08 Dec 2022 08:37:08 -0500 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 1p3H5C-00054u-4Q for guix-patches@gnu.org; Thu, 08 Dec 2022 08:37:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3H5C-000349-0T for guix-patches@gnu.org; Thu, 08 Dec 2022 08:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54986] [PATCH 0/2] services: mpd: Refactor MPD service Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 08 Dec 2022 13:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54986 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: mirai , 59866@debbugs.gnu.org Cc: 54986@debbugs.gnu.org Received: via spool by 54986-submit@debbugs.gnu.org id=B54986.167050656711749 (code B ref 54986); Thu, 08 Dec 2022 13:37:01 +0000 Received: (at 54986) by debbugs.gnu.org; 8 Dec 2022 13:36:07 +0000 Received: from localhost ([127.0.0.1]:56813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3H4I-00033M-Kk for submit@debbugs.gnu.org; Thu, 08 Dec 2022 08:36:07 -0500 Received: from mail-ej1-f66.google.com ([209.85.218.66]:40764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3H4G-00032r-32; Thu, 08 Dec 2022 08:36:04 -0500 Received: by mail-ej1-f66.google.com with SMTP id b2so3910445eja.7; Thu, 08 Dec 2022 05:36:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=NLSGOOf2eRBAwiYW6X8+LYnqDTQCwpP7U+hL/+ZUHVQ=; b=nigV6vxdvqjvSTOBVGJyMbgXrlmDMcah6CMYU/lv5MW5wZT+kBSuknsHSss1CdDjUY 6wRpQtaQI5omo1xhgw+PKP1ob4YB4ZTGDInr8WeZSdG3Sii2Ah5VpzXwFCMkwmAmf1eN wRpFNNDLkR2jJ88h6EDYxYEM4wF3ouMvrVW70uZcAEsVdtfkgGLA3jnb3BLuNy8ATVWr tdamTH7ktq2IB1x82EsiLpWkEFerMn+tz0d1Vlsnz5aYHp7d35h+xI2AH5radpNkbYYi B3OlfNb4nhb9OhgbTSKFi+W4ssNJuCh1TqfOjI9l5CUUDffwiE4PrpQJMoism9pG/wG9 mHug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=NLSGOOf2eRBAwiYW6X8+LYnqDTQCwpP7U+hL/+ZUHVQ=; b=eWuofNeZrctnoL2UbNalrbcOaQ3WKlwJwIY8Ne6bh32NymI6g0h2Hd6jnLoJsChZIh eLOPCADI+aggBnVFyzP/so3Mx8JStyqkKK8cs0t4fvQVxiap+DIAc+czT3ai3iHNgiTE irUqN7KS3tCCJm4XZ6+Jkru2rRI//qeEMa8xGR4UxDq0rjPCcDaNWyxukO35wPtKZT27 KDlSAB8QeJ59NAFPBUnh7SELHFRKCN2/86DrRyXEAVCazAIphJylpfCYGUy/i2tHvBFP XH5bGpnTIjU2mKRKc3REXK8cFZ2e0TL+lwaJOhdJqV35VqFeGtg8wcjx68UrsUsgD0bs Sqag== X-Gm-Message-State: ANoB5pkQ2329GieiWpoRajUiVj0L2JUQEqOBszVd7KluM5r9VrzGSebw 8xwox0JAldLPqifJnBjHrZI= X-Google-Smtp-Source: AA0mqf5Ln50FtyONi6KSjrGOB+MJbHvtPfzUlpfihVKWxpPlvU/LquS4omNId7i5rnq+03w5Lt3aQQ== X-Received: by 2002:aa7:cd02:0:b0:46c:9536:8598 with SMTP id b2-20020aa7cd02000000b0046c95368598mr15835083edw.123.1670506557965; Thu, 08 Dec 2022 05:35:57 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id i26-20020aa7dd1a000000b0045c47b2a800sm3358568edv.67.2022.12.08.05.35.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 05:35:57 -0800 (PST) Message-ID: From: Liliana Marie Prikler Date: Thu, 08 Dec 2022 14:35:55 +0100 In-Reply-To: <71f31a0d-cc58-a0e6-4aa4-b5c46513c835@makinata.eu> References: <6e66967984d1bc22d8abf5dd4b07c1a20b4b06ee.camel@gmail.com> <71f31a0d-cc58-a0e6-4aa4-b5c46513c835@makinata.eu> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 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: , 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670506645; 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=NLSGOOf2eRBAwiYW6X8+LYnqDTQCwpP7U+hL/+ZUHVQ=; b=Sm/e8jk5EHnh+fASzGGfZmIXMbvM3/XHNGzXK6mTIWg5KnF0QnBcT9acvgfXaReLTOjTHX vV8EhyfzK6ICMVMuM/zAAT2Icr+lpIjB1GbKv/pW173klZ0nv1xO3RqtVQLGxEMM7fT6Od 7sH/CAadUB62bYn42NwDsyO5j4qfkYQiDrv8V91GwRLAWH5wWRjIltG9IkynRbad9xNElj WGEGYEyHghW7C3+9t+0Rdip/BJH9N2bbENZf3p6DF6DjNEyjIcoK6Aub0P0dOaDt1xcnny IqPCvscKOyBq8ai7K3U9GEJs3PUySjotQuaGNvMbAgXApLJRGEEPqhbiMXXZiQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670506645; a=rsa-sha256; cv=none; b=dCXYO8Dff/+kC36E5mKCix12h1sy5fwwvFtGuHSgaznX8LddaFyxjUJVk1fieviqFjvtJ+ w4OdwXmkHgwIkx1ojADCnHQlR6obSoc9fFj4aTMOOx3H226is1D2JAf7u5Tke/QoAo1xfN NGgCa74O7JhK4eSySV92BTFN4R2DrMCZTVfkFlr3uLvPfWxk1rJw5b+/C7RK7WiXiunC05 XwLdIcweMhgYIZ0Y+nS/QEgW0EdPfdwBRF0tBAWQKco8HUXqXRy8ilWNafffDKGUlfGjE/ M3UgKxkfNvHANxZlo1ZUOPQo6Yiv18qfAb0X51CA9BNqJUFmr/eWm3VquQex1w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=nigV6vxd; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Spam-Score: 5.24 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=nigV6vxd; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Queue-Id: A6A923D471 X-Spam-Score: 5.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: F7RNi8dPI53A Am Donnerstag, dem 08.12.2022 um 13:11 +0000 schrieb mirai: > On 2022-12-07 18:27, Liliana Marie Prikler wrote: > > Note that there is [1], which attempts to make it so that shepherd > > endpoints can be specified in lieu of MPD endpoints.=C2=A0 You don't > > need to implement this logic =E2=80=93 you are free to do so if you wan= t to > > =E2=80=93 but could you make it so that there is an explicit endpoint > > abstraction that would allow for extension later on? > >=20 > > Cheers > >=20 > > [1] https://issues.guix.gnu.org/54986 >=20 > Hi, >=20 > After reading issue #54986, regarding mpd escaping shepherd > management, my guess is that there could be two issues at play here: >=20 > * mpd.conf was serialized with pid_file [1]. The safest is > to actually not serialize any unused directives and let MPD decide > based on what's actually present. pid_file should only be set if > MPD is to be launched as a "daemon process". [2] >=20 > * But the service definition for MPD is launched with '--no-daemon' > option as seen in [3], which could be triggering a bug in MPD. It's > probably worth testing the combinations of having pid_file set and > invoking --no-daemon. Nice catch, but completely unrelated to the issue. In neither case do we ever spawn MPD as a regular daemon, yet only in the systemd case does shepherd have a problem with it. That statement was concerning shepherd's (mis)management of sockets, not MPD. > > but could you make it so that there is an explicit endpoint > > abstraction that would allow for extension later on? >=20 > If I'm understanding correctly what [1] is about, I think this can be > implemented through the 'extend' interface. See how certbot adds a > nginx-server-configuration to a nginx-service-type through the > 'extend' interface. For MPD, this would amount to appending the > 'adresses' field with "adequately formatted" values. This doesn't work for #54986, which makes it so that in-file addresses are ignored in favour of handing over the sockets directly through shepherd. Looking at [4], it appears the meaning of "port" is closer to that of a default port, as addresses can have ports in them. But I would still prefer addresses to be "endpoints", which if they happen to be a list of strings are taken as MPD addresses and if they happen to be shepherd endpoints are passed on to the shepherd service. WDYT? [4] https://mpd.readthedocs.io/en/stable/user.html#client-connections