From unknown Sat Aug 16 17:00:18 2025 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 Apr 2023 02:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63082 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 63082@debbugs.gnu.org X-Debbugs-Original-To: bug-guix Received: via spool by submit@debbugs.gnu.org id=B.168247790618642 (code B ref -1); Wed, 26 Apr 2023 02:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 Apr 2023 02:58:26 +0000 Received: from localhost ([127.0.0.1]:53904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prVMQ-0004qb-Go for submit@debbugs.gnu.org; Tue, 25 Apr 2023 22:58:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:58634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prVMM-0004qR-OT for submit@debbugs.gnu.org; Tue, 25 Apr 2023 22:58: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 1prVMM-0006Nl-Do for bug-guix@gnu.org; Tue, 25 Apr 2023 22:58:22 -0400 Received: from mail-qk1-x72a.google.com ([2607:f8b0:4864:20::72a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1prVMK-0006v4-S6 for bug-guix@gnu.org; Tue, 25 Apr 2023 22:58:22 -0400 Received: by mail-qk1-x72a.google.com with SMTP id af79cd13be357-74e462a540aso211075885a.1 for ; Tue, 25 Apr 2023 19:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682477899; x=1685069899; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=X4rK5cvImKkNvqsyWnW2Leh/T1TvG7jjgxdB6J1aEf4=; b=r9qK98/1Yj57Rlhc9O2TvL/gxzlcnbc6W8zoYQbwgsiFCFYvvCpP1GJfeSe72kkTuB ubGt3hlaKoaBHKh/rQQ02RUWFoPg9taQcFNVVFOMRznUBng0Y9x1ALIG9MNiPluR9KXh 9GS+9trg73ADBgbzaJXylsb/AK20LI9aA8ccmBFo16N+vWMhAQNKYFzTo02TnUMuNcCo N9w+Ng5bRpKPuAmUvMa/i6PlTCG5yDCDvFnSaQgyQnhv6BxvCKZXIJ9d5iTHtaHfZ4QS Nq3EY2BXZNH1lARqePhtH+jprRJ+kxZShEl/fElrQplzF1tZfbSocpg5Pgupg8arV+N9 l9kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682477899; x=1685069899; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=X4rK5cvImKkNvqsyWnW2Leh/T1TvG7jjgxdB6J1aEf4=; b=OQifvpHfA69shxrV98jcDpktOsY5SLkcZv91HvdlRmg1RTZ4Y75eqXLxS1Rv9f05DU ndZmQMzJhl9FVTRVojl+lkM/i3CYdMUaxuCOzTJ2Q0wvc1HQ/rdVTIXyx7trNu771jb7 LTFshsoqh9zGO7DoIBIPqZeuhD4dRRR2kFdODbKWHrCyGOyGbrM4egNN620cs7GmPl1m /d0nbMAKy61oSY9UT0cQGwMN7ESCzPLYoAUs7yPsTmo18GF8yHWsyKZXvE58gHFWo2zK PJOMGB2PnLPMrb+lrVDMkV2qbYrhf+gPyQ5edQmExOm0thcXgIKMlmK6yTxq2TbNUV+Y wBPw== X-Gm-Message-State: AAQBX9dsSJHeaHUuopJol0JAfUMsIzanpPOTe96WjUUT96TLetThmCbf wn+kx1YEJEB8LDcmPUl0nj7M8mObNsqyCw== X-Google-Smtp-Source: AKy350ao4NcNvqA0AREzWgPXuyGw72xSVhkTvRPFFzyp4q3lVDXkcfEWjzOwFWGFK62hTaOUuDhReg== X-Received: by 2002:a05:6214:c46:b0:5ef:653e:16a0 with SMTP id r6-20020a0562140c4600b005ef653e16a0mr31465935qvj.43.1682477898845; Tue, 25 Apr 2023 19:58:18 -0700 (PDT) Received: from hurd ([2607:fad8:4:3::1003]) by smtp.gmail.com with ESMTPSA id t6-20020a0cde06000000b005dd8b9345d7sm4528809qvk.111.2023.04.25.19.58.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Apr 2023 19:58:18 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 25 Apr 2023 22:58:16 -0400 Message-ID: <874jp3nyd3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::72a; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x72a.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hello, Our MPD service does not work out of the box. Running under its default 'mpd' user, clients would get the following error attempting to update its database, e.g. by running 'mpc update': --8<---------------cut here---------------start------------->8--- MPD error: database --8<---------------cut here---------------end--------------->8--- This particular problem was solved by adding the following field to my mpd-configuration record (thanks to Bruno): --8<---------------cut here---------------start------------->8--- (database (mpd-plugin (plugin "simple") (extra-options '((path . "/var/lib/mpd/database") (cache-directory . "/var/cache/mpd"))))) --8<---------------cut here---------------end--------------->8--- and running --8<---------------cut here---------------start------------->8--- mkdir /var/cache/mpd && chown mpd:users /var/cache/mpd --8<---------------cut here---------------end--------------->8--- Now the above error is gone, but I do not hear any audio coming out, so there seems to be another problem. I'm opening this ticket so that we can document and resolve all these issues in the configuration, so that hopefully our mpd system service can work out of the box. -- Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 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 Apr 2023 03:12:01 +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 Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168247867819864 (code B ref 63082); Wed, 26 Apr 2023 03:12:01 +0000 Received: (at 63082) by debbugs.gnu.org; 26 Apr 2023 03:11:18 +0000 Received: from localhost ([127.0.0.1]:53910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prVYr-0005AJ-Ui for submit@debbugs.gnu.org; Tue, 25 Apr 2023 23:11:18 -0400 Received: from mail-qt1-f174.google.com ([209.85.160.174]:54516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prVYo-0005A4-3k for 63082@debbugs.gnu.org; Tue, 25 Apr 2023 23:11:16 -0400 Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-3ef112cab37so57565871cf.0 for <63082@debbugs.gnu.org>; Tue, 25 Apr 2023 20:11:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682478668; x=1685070668; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=EPerRix+2dcDQaNi2Cu1bynr5w2SLlvf70jKZ+AjuqM=; b=N/8A2XO/jdo8hmVpApY0mZl1oPlR3o+cyNAaWOgtTOHye/NOlWA06cwOn3JybHJ7yX xED6kZbQJmGqeXO+s10nAbW6BOZNVpdUPQ/BF2fiy6kLU7Y2KwEgIKV18olwcNLxQ9mg B7NtM7Is+1qAPLF6XwkoguqSJz35fg0q5b/KuCSTAwzwPf30B8NnQy1wvwm5sJm2xJfW T8vV654HY7v9xo9HTsuN35+i1mPMjJKlGDYWwi8qP/rer80QDV0ABHoTKTQDitLmLbc4 eoGKv24lJkUC8HMQVa0cgljzij1TgdCWJ58hdl0QGQTAzZUtlRYUk7q+MNf+0QRh6yQv E7Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682478668; x=1685070668; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EPerRix+2dcDQaNi2Cu1bynr5w2SLlvf70jKZ+AjuqM=; b=atZNN3aPGZa2j4z3Dr5dHRPwrw6441JFNaw2aN8O/xncLnNWK5MtCD2tp74br4dTrm YXWdFcBYfyoH62INPFOjhfnIpl+rgoprUALraa5W3BaBalAw7UUu2PUvj9ubTEweGe5W j6OF/pIf7r7x0tb0XjFGlo01ngupU9T1sXhBuU2ZO9/n+jTIH75hhnB/QjVS33umwOC2 by/fp1ukEACns1hpX75tFwx3JBiDtUADMaQv2QcfJcX13KbIr944xrDDav2KzqnRWFJa Z8P/C4vIOu5VSA8Opt3JkYRf9nZb8ZlX3tCxSkpv9P/9a6+I/tt0iV0RS3vrfudNJzCY ZplQ== X-Gm-Message-State: AAQBX9fRk26Q6Y+oGIF9aJjNecP7KUcXHzuB2WauP/cAgpRp6ifCPUmw O/uv8WW7KKui3xUOIscOc78tc3Q01xif/g== X-Google-Smtp-Source: AKy350Z6yiLa0sRb1M6O83nmNk1mVJbD7uVNRGdKQ4eA17Wrw+PxItjjM6p1+pyBmvV5Q/XDQihmVg== X-Received: by 2002:ac8:5c92:0:b0:3f0:a755:61ef with SMTP id r18-20020ac85c92000000b003f0a75561efmr12805065qta.0.1682478668185; Tue, 25 Apr 2023 20:11:08 -0700 (PDT) Received: from hurd ([2607:fad8:4:3::1003]) by smtp.gmail.com with ESMTPSA id d125-20020a376883000000b0074fafbea974sm2138625qkc.2.2023.04.25.20.11.07 for <63082@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Apr 2023 20:11:07 -0700 (PDT) From: Maxim Cournoyer References: <874jp3nyd3.fsf@gmail.com> Date: Tue, 25 Apr 2023 23:11:04 -0400 In-Reply-To: <874jp3nyd3.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 25 Apr 2023 22:58:16 -0400") Message-ID: <87zg6vmj7b.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Maxim Cournoyer writes: > Hello, > > Our MPD service does not work out of the box. Running under its default > 'mpd' user, clients would get the following error attempting to update > its database, e.g. by running 'mpc update': > > MPD error: database > > > This particular problem was solved by adding the following field to my > mpd-configuration record (thanks to Bruno): > > (database (mpd-plugin > (plugin "simple") > (extra-options > '((path . "/var/lib/mpd/database") > (cache-directory . "/var/cache/mpd"))))) > > > and running > > mkdir /var/cache/mpd && chown mpd:users /var/cache/mpd The cache-directory configuration doesn't seem to be useful so far; nothing was being populated under /var/cache/mpd. in /var/log/messages, pulseaudio throws a couple errors: --8<---------------cut here---------------start------------->8--- Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] module-jackdbus-detect.c: Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] module.c: Failed to load module "module-jackdbus-detect" (argument: "channels=2"): initialization failed. Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] cli-command.c: stat('/gnu/store/5ahapvp7rnd2ymakyjv1pwwdav7w9wdc-pulseaudio-16.1/etc/pulse/default.pa.d'): No such file or directory Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] main.c: No card found by this name or index. Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] main.c: Source alsa_input.pci-0000_01_01.0.analog-mono does not exist. Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] main.c: Sink alsa_output.pci-0000_01_01.0.analog-surround-40 does not exist. Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 --8<---------------cut here---------------end--------------->8--- -- Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: mpd defaul configuration does not work ('No database' error) Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 26 Apr 2023 18:29:01 +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: Maxim Cournoyer , 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168253373816548 (code B ref 63082); Wed, 26 Apr 2023 18:29:01 +0000 Received: (at 63082) by debbugs.gnu.org; 26 Apr 2023 18:28:58 +0000 Received: from localhost ([127.0.0.1]:56983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prjsw-0004Ip-5E for submit@debbugs.gnu.org; Wed, 26 Apr 2023 14:28:58 -0400 Received: from mail-ej1-f66.google.com ([209.85.218.66]:61689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prjsr-0004Ia-U3 for 63082@debbugs.gnu.org; Wed, 26 Apr 2023 14:28:55 -0400 Received: by mail-ej1-f66.google.com with SMTP id a640c23a62f3a-94f32588c13so1104380066b.2 for <63082@debbugs.gnu.org>; Wed, 26 Apr 2023 11:28:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682533728; x=1685125728; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=BSHo4QpQw+nWkLo0maL0KX6GHB2UJ/SK1OgAhWrfJx8=; b=ambQBjomRly5GlIN8fnpjrHRkTnIegebHUvtAncv12GtXKpwszC9hyVPVOo4hptqgJ FevPlZ0hWnLiyq1Q4qIDexGvA0hddHSHNF5hstKlM+ESlXDrGtntWQDxqDIo0RgJvKTJ HZiPNk2x/h0I+pFTzhPKHsfm70TjLO1nn/Ip/fIyeofoHfYFYpmMCJDMzVKg9C3W36Nf AOn2UtShsTBDNYVaLYsrHWBQGgYB8lDPmMr+zRsk7PYepB/54SMI0rPYUnFJP1y34/uL ChZ80fZq/kUGaHMSioTTsE+8kf1ZTdmDSl3AtDmXS4dRyWB87iwWNisUb9VVdIRI3m+9 Vq8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682533728; x=1685125728; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=BSHo4QpQw+nWkLo0maL0KX6GHB2UJ/SK1OgAhWrfJx8=; b=NJggG1u92nNXnXFoeqy87OkKt4NYDDqXbxwkD9M5orXqYhpNcxQPiIjMwCJrah2DEA hzKZ7aAlmtPkDaZ2Gho2nfmhPXxhgw73fPQQ1QK/7fASmqdGnYtGzQrxUw9c8MTzxqMv EfKJw5xQgMaxAVf4E+XqJ4lWrLkFMXSYyqKYDqoeHzcychWGdjjbNgR7DOgoNJHWSmXe jKF//5bxcgPii1FwQn9w/MhffiNb56aj8n0A3eNmMVfJEfKiLuw2OGoiF1Hqurg/Y1Q+ +9v0Mqd6s5yk0L4vGJQ5/eovZ5zS2t+oo3QKSyE0IrIjtTRigv8Vkm5L77TVRzNt3RhB P3aA== X-Gm-Message-State: AC+VfDyRnB22bTlobOT2Pj/TN/s81af39cy3VYR2AqOtQCUGyfF7Yikv YQ4Y4Kt6grYFDfSBPykrDO8I6LHzyYAkiQ== X-Google-Smtp-Source: ACHHUZ4fefv21PtRDul1Gu9fCADXlm2zlQ7aN5/uYMpVnk3086hkLzWFPkNKnvnz5q7jYQjw9xNqhw== X-Received: by 2002:a17:907:9b04:b0:95f:1e0d:8e01 with SMTP id kn4-20020a1709079b0400b0095f1e0d8e01mr2615245ejc.13.1682533727960; Wed, 26 Apr 2023 11:28:47 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id gt11-20020a1709072d8b00b0094f07545d40sm8531935ejc.220.2023.04.26.11.28.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Apr 2023 11:28:47 -0700 (PDT) Message-ID: <80aabf998f97b4e66b94b14020ec1810d9ef93a5.camel@gmail.com> From: Liliana Marie Prikler Date: Wed, 26 Apr 2023 20:28:46 +0200 In-Reply-To: <87zg6vmj7b.fsf@gmail.com> References: <874jp3nyd3.fsf@gmail.com> <87zg6vmj7b.fsf@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Maxim, Am Dienstag, dem 25.04.2023 um 23:11 -0400 schrieb Maxim Cournoyer: > The cache-directory configuration doesn't seem to be useful so far; > nothing was being populated under /var/cache/mpd. > > in /va [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (liliana.prikler[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.3 RCVD_IN_VALIDITY_RPBL RBL: Relay in Validity RPBL, https://senderscore.org/blocklistlookup/ [209.85.218.66 listed in bl.score.senderscore.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.218.66 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.218.66 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) Hi Maxim, Am Dienstag, dem 25.04.2023 um 23:11 -0400 schrieb Maxim Cournoyer: > The cache-directory configuration doesn't seem to be useful so far; > nothing was being populated under /var/cache/mpd. >=20 > in /var/log/messages, pulseaudio throws a couple errors: >=20 > --8<---------------cut here---------------start------------->8--- > Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] module- > jackdbus-detect.c: Unable to contact D-Bus session bus: > org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus- > daemon without a $DISPLAY for X11 > Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] module.c: > Failed to load module "module-jackdbus-detect" (argument: > "channels=3D2"): initialization failed. > Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] cli- > command.c: stat('/gnu/store/5ahapvp7rnd2ymakyjv1pwwdav7w9wdc- > pulseaudio-16.1/etc/pulse/default.pa.d'): No such file or directory > Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] main.c: No > card found by this name or index. > Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] main.c: > Source alsa_input.pci-0000_01_01.0.analog-mono does not exist. > Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] main.c: > Sink alsa_output.pci-0000_01_01.0.analog-surround-40 does not exist. > Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] server- > lookup.c: Unable to contact D-Bus: > org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus- > daemon without a $DISPLAY for X11 > Apr 25 23:06:52 localhost pulseaudio[10356]: [pulseaudio] main.c: > Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: > Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 > --8<---------------cut here---------------end--------------->8--- Configuring MPD in a vacuum meaningfully is a little difficult.=20 Usually, you don't want it to spawn its own pulse, but rather to communicate with an already existing server that has to allow network access. Rather than supposing this, we could make the default a null sink or similar. Cheers From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 00/17] Improve out-of-the-box experience with mpd-service-type References: <874jp3nyd3.fsf@gmail.com> In-Reply-To: <874jp3nyd3.fsf@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28:01 +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: Bruno Victal , Liliana Marie Prikler , Maxim Cournoyer Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168269204419471 (code B ref 63082); Fri, 28 Apr 2023 14:28:01 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:27:24 +0000 Received: from localhost ([127.0.0.1]:34115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4F-00053y-RV for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:24 -0400 Received: from mail-qv1-f53.google.com ([209.85.219.53]:60677) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4E-00053a-9W for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:22 -0400 Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-5f428830e54so322526d6.1 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692036; x=1685284036; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=G0egGu2NgiARRIcMx6IXgwOAqI//63Zcgf8JojRvbVk=; b=ancAQsEfQsGL5k7jBqWHJttJuppPi3+s/ZQDR/OaZ7fvL5q0i+ErZvkfyf4MmfGjq2 LLXJ70Mx4DlUpoMvrNXG0RG3bPvu9YgLkO74awMiV8B9SLzejPtEAYr7PdFAb2nvqU6X jkZiBkmJ9KLVIHTtGOyhbAXrl3meGpEpGSmpsYuRdwBdSa064agekmfmRwbaxeH+9Oy+ /6Ov7JvmVYrXkULUEdccsCRCOT61dk1mkXwMIo+U9Yf2yM+EJwISb4Fn6HHEbBJNoM7/ QObee2b3uV41DqZU8jXB3ajDoMGDzP9jBxQIoxPfpxbrBThaybgylf+6hbb4vMRW14Bs oZMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692036; x=1685284036; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=G0egGu2NgiARRIcMx6IXgwOAqI//63Zcgf8JojRvbVk=; b=XmLmTI8c3o7DkYQxb8rVk0ynOIa/ryINa9C8UXuSpF+W4MF0UfPhIP9nuDq6U/+Wye Qb0oNkbJBukrh+uJO84I2Fwxz89vYNuuyDNCkTnQ8KLhSORsCZUux6p6mNaNUlG2DSOL LujhBGI3gUzqBEEMy7KSb/WBHExc8u9Z+R+6V7oZ71GRNkkztkVBw89F0C89l8b3dl15 h7PnXxwYu1dixVaqgJBB1YNft9NHB4wAk02q6b/L9m7G4fZV1jl8qsxP0hv9ZdXTSsks BICJr3xJB2UniYsDkNPBSkpguE/gOvWN02N/PLZ4RVN2wsulVtxK3MCpYcUAwvutS+/D Wjtg== X-Gm-Message-State: AC+VfDzupVf6eGOqz6zAIPKUzcKRNrZxpTTs/EWicnrDGS4TquFE0tlt mHR1VXaAk9ZFosEhopHgAJ+JTd5Adhk= X-Google-Smtp-Source: ACHHUZ4n8ReQuHQQZm1KPffi6RaE8XGu6CvNcZ1c/1PVAFAohg8wh5nTWqf6R6WxEH3JjFgzgB46Og== X-Received: by 2002:a05:6214:1c48:b0:5f4:5af6:1304 with SMTP id if8-20020a0562141c4800b005f45af61304mr8657981qvb.16.1682692036533; Fri, 28 Apr 2023 07:27:16 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:16 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:26:53 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, I've recently had enough issues trying to setup a very basic, minimal MTP server that I've found an itch to improve a few things, leading to the patches below. It obsoletes a few things to make the configuration less error prone or easier to reason with, and focus on making things "just work" out of the box, using something as minimal as: (service mpd-service-type (mpd-configuration (music-directory "/srv/music"))) Previously this would fail due to requiring the user to provide a database file themselves in the configuration, and the default mpd user would also fail to access the /dev/snd/* devices due to the mpd user not deing in the audio group. Having 'group' in mpd.conf would also cause mpd to strip the user's supplementary groups, making this issue more likely. Other note-worthy changes: * Log to syslog by default (to match upstream behavior) * Auto-detect the mixer type (to match upstream behavior) I hope the series helps you to setup MPD too. Maxim Cournoyer (17): services: mpd: Add an 'update' action to trigger a database update. services: mpd: Streamline mpd-user-sanitizer and mympd-user-sanitizer. services: mpd: Rename %set-user-group to set-user-group. services: mpd: Obsolete the 'group' field. services: mpd: List log-level in decreasing verbosity order in doc. services: mympd: Fix log file name. services: mpd: Log to syslog by default. services: mpd: Only rotate log when a log file is specified. services: mpd: Let Shepherd effect the user/group change. system: accounts: Export . services: mpd: Warn when the MPD user is not in the "audio" group. services: mpd: Auto-detect mpd-output mixer type by default. services: mpd: Fix indentation. services: mpd: Obsolete 'environment-variables' field. services: mpd: Provision a default cache directory and set HOME. services: mpd: Update basic example. services: Avoid 'delete' overrides warning in audio module. doc/guix.texi | 79 ++++++---- gnu/services/audio.scm | 311 +++++++++++++++++++++++----------------- gnu/system/accounts.scm | 3 +- 3 files changed, 228 insertions(+), 165 deletions(-) base-commit: ccf64b6a8b8718a8bb69719cf9ed2873464e3850 prerequisite-patch-id: eace011dd080f709a8eeb77c7a739f87079dbb81 prerequisite-patch-id: fd596ecff861483a486910ca0feecded27f6a4a2 prerequisite-patch-id: 948c73edc0a8a0a21b1d4f6878d3f09158059f38 prerequisite-patch-id: becfd217e53934fe9ef16939ff433e5ed00a4b1e prerequisite-patch-id: 20f12e01af25b881e362ea7dc837a07aeec8a489 prerequisite-patch-id: 7534d08dbc06589ce0fe7bd306585321cb5385d1 -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 01/17] services: mpd: Add an 'update' action to trigger a database update. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28: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: 63082@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168269204919499 (code B ref 63082); Fri, 28 Apr 2023 14:28:02 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:27:29 +0000 Received: from localhost ([127.0.0.1]:34119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4L-00054Q-AH for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:29 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:62483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4J-00053n-AK for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:28 -0400 Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-751319e0dbfso636522485a.0 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692041; x=1685284041; 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=LCjNcdnqGnMHI8HiaI9YijbTNs2o1xtt8cqovArg8Ng=; b=Libebs3hDQu3i58DpOmP1qO8TPeP05SjmimX0X8m7L/Jo9KC5qqbGWmsgN4if9258a zhiqUbIuccVHyVmNaa8hVOFuBgijK3XSrDkdLnhowvxtb2t0AgcLIYVi0G6VSXQvcE5+ d43gJlY6lSsbTZ2pjW8L65xYw1krddwbP+9RGfHhlDVs3rARUoMESrB5zEyWzGy+DzBW a9P0Zov3t3FeqEjGEaQcm2hCBPwHXP4jeOgqeUWirVgWPRqAC7qqypR+mar3hZnUsYFl ec46nwvDBF2TxpP5CDf77LTTKNXrQ0TKKM+P4wDPpPXwh2JjweLNRcI9MrWP4rbRmsOk 196g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692041; x=1685284041; 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=LCjNcdnqGnMHI8HiaI9YijbTNs2o1xtt8cqovArg8Ng=; b=kxIs5/3aL3iXKgad4aqGMDNSQdgwazucWydm0bv8bwXEQl1GbyiJMDRfw7pZ/CAerB zOkx9HNYS2iKa0bBO0ImQKYTVSydP/aEZRv1XwiEqIKmR30zZibDtL1SLWBt28IHecHu zc+7AduSE35Uwi/GiuI+XHKgDRkWdffmHKaFTbbJTY7yI3jNVbHf5KI9tE480v+5fawO ZclmISixQTDlZFlIZ4tiFo/0DApPZa7NfKyT9zCN1g8YBFfp+DrvZ69mP4eKsy5zwyIX GIxznpHILincpY5NM+cHW+Up0BRFVOh7a8zUJKhS7JjoYX+jfwECVpc2oRF1k0jserWr sZPg== X-Gm-Message-State: AC+VfDyM3oRaBKwGIjeZDTc76lGMMV86/DiFB5k27pOhcbQ0N/MekEG9 QGn3z8+/FyRtKubTVoUN2wQO62QScfg= X-Google-Smtp-Source: ACHHUZ6rJxWu8rx7w9ZfFM15FCuGgn/Jr2tPwQR5+SCvS7IReJyRm/NRrMnaZXv6K/BD3j5MmeipWA== X-Received: by 2002:a05:6214:2027:b0:5ac:96c3:14d4 with SMTP id 7-20020a056214202700b005ac96c314d4mr11468541qvf.17.1682692041564; Fri, 28 Apr 2023 07:27:21 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:21 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:26:54 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * 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(+) diff --git a/doc/guix.texi b/doc/guix.texi index bdacb56af5..f8acdbd6b5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33546,6 +33546,16 @@ Audio Services (port "6666"))) @end lisp +Most MPD clients will trigger a database update upon connecting, but you +can also use the @code{update} action do to so: + +@example +herd update mpd +@end example + +All the MPD configuration fields are documented below, and a more +complex example follows. + @defvar mpd-service-type The service type for @command{mpd} @end defvar diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 8c061da47f..6e4ce3f9fb 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -620,6 +620,17 @@ (define (mpd-shepherd-service config) (format #t "Issued SIGHUP to Service MPD (PID ~a)." pid)) + (format #t "Service MPD is not running."))))) + (shepherd-action + (name 'update) + (documentation "Request MPD to update its music database.") + (procedure + #~(lambda (pid) + (if pid + (begin + (invoke #$(file-append mpd-mpc "/bin/mpc") "update") + (format #t "Database update requested for service \ +MPD (PID ~a)." pid)) (format #t "Service MPD is not running."))))))))))) (define (mpd-accounts config) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 02/17] services: mpd: Streamline mpd-user-sanitizer and mympd-user-sanitizer. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28: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: 63082@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168269205019512 (code B ref 63082); Fri, 28 Apr 2023 14:28:02 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:27:30 +0000 Received: from localhost ([127.0.0.1]:34122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4L-00054T-LJ for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:30 -0400 Received: from mail-qv1-f52.google.com ([209.85.219.52]:56538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4K-00053u-DD for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:28 -0400 Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-5ef420b51adso300636d6.0 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692043; x=1685284043; 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=E907hWJp1Rcb9drxhnCJiM7IicvT0X0UX/hd/jgk/vk=; b=ErNOFoq1fN7b4oY8kR+tB1Qn4uHgImswfk6B8wVXb0W87BXNQ3QbKbJMNoaKSGM/9b LMUNSfjA6R4pkM2Vod6BGl7O9Nrl3i5sv4biNcq3qzc8XdgYIAuFdSOizDse5V5wlLzu R50uDKi31xFnV9yVKf7bNpazZNyZcrsTkpkubIj8Tcweavx0ucy8X44u7FK9Vtth3NGl KErBVfzm2dvYnMfRiL2XShvctzpr5KDOWQjHs1go1SMm6JJX09jmwP2YlDAF3sq/I4Ie DuCa6Ybi1aW3UOfexcBXL/4JkXgae/weXua6xah/rKrHMZpRlaH9OpqNDOaQbc1tELlT 0KxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692043; x=1685284043; 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=E907hWJp1Rcb9drxhnCJiM7IicvT0X0UX/hd/jgk/vk=; b=HdKWOsS3cQK6L03N2d39C0dMig+sDVCSKD93TJxoLuT1AzbDGGkvn8wp8PkmIAcOjA va7Q09RyAM2cjC83F2NnhG5ou666XkaiYTBR4CzZkt6rUQ5liQqcY6Pb855hCevmRfGI NUbEhACR1A8F48cs4pDVuSBlSo0CKkAhiHhwm3LWlkiY37ICEO7hVgwvCJ7F0qWpinA6 I+K/Hn1KN47ysxajMEhKDRGoAY5dh5yv122okHptnIHnWbSjzxCq/mnzKlfMEdHFYbu6 eYtuITxjKSYZKLTdtlTWkhjCOZ5mJYJbMoZCy8hM8u9gMh55YBFlpyI2GG5SdcO061cz /6iA== X-Gm-Message-State: AC+VfDz97YqG1RlGKvkc68ivLPde3685TBxkZken9/yQoL+J3BldYjY7 wQ09FZzAul6IKoF3iNdSNvwBGDVy86w= X-Google-Smtp-Source: ACHHUZ75nT/VgXQ5iQrxE0MWkNYgxHZQpqfpuVR0ZdCAe+y1a3W+Z/87cjlh7Wa0AnBjOpV8vFyzLw== X-Received: by 2002:a05:6214:212d:b0:5e7:f7eb:d87 with SMTP id r13-20020a056214212d00b005e7f7eb0d87mr8680557qvc.47.1682692042769; Fri, 28 Apr 2023 07:27:22 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:22 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:26:55 -0400 Message-Id: <15db5c777d50d410cc898dba62bfd21fdecdb60d.1682690696.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm (mpd-user-sanitizer, %mympd-user): Remove extraneous group field, already inherited. (%mpd-user, %mympd-user): Clarify %lazy-group explanatory comment. Fix indentation. --- gnu/services/audio.scm | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 6e4ce3f9fb..dc83479e40 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -184,13 +184,15 @@ (define-maybe boolean (prefix mpd-)) (define %mpd-user (user-account - (name "mpd") - (group %lazy-group) - (system? #t) - (comment "Music Player Daemon (MPD) user") - ;; MPD can use $HOME (or $XDG_CONFIG_HOME) to place its data - (home-directory "/var/lib/mpd") - (shell (file-append shadow "/sbin/nologin")))) + (name "mpd") + ;; XXX: This is a place-holder to be lazily substituted in (…-accounts) + ;; with the value from the 'group' field of . + (group %lazy-group) + (system? #t) + (comment "Music Player Daemon (MPD) user") + ;; MPD can use $HOME (or $XDG_CONFIG_HOME) to place its data. + (home-directory "/var/lib/mpd") + (shell (file-append shadow "/sbin/nologin")))) (define %mpd-group (user-group @@ -235,10 +237,7 @@ (define (mpd-user-sanitizer value) user-account instead~%")) (user-account (inherit %mpd-user) - (name value) - ;; XXX: This is to be lazily substituted in (…-accounts) - ;; with the value from 'group'. - (group %lazy-group))) + (name value))) (else (configuration-field-error #f 'user value)))) @@ -676,12 +675,14 @@ (define-maybe/no-serialization mympd-ip-acl) (define %mympd-user (user-account - (name "mympd") - (group %lazy-group) - (system? #t) - (comment "myMPD user") - (home-directory "/var/empty") - (shell (file-append shadow "/sbin/nologin")))) + (name "mympd") + ;; XXX: This is a place-holder to be lazily substituted in 'mympd-accounts' + ;; with the value from the 'group' field of . + (group %lazy-group) + (system? #t) + (comment "myMPD user") + (home-directory "/var/empty") + (shell (file-append shadow "/sbin/nologin")))) (define %mympd-group (user-group @@ -696,10 +697,7 @@ (define (mympd-user-sanitizer value) user-account instead~%")) (user-account (inherit %mympd-user) - (name value) - ;; XXX: this is to be lazily substituted in (…-accounts) - ;; with the value from 'group'. - (group %lazy-group))) + (name value))) (else (configuration-field-error #f 'user value)))) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 03/17] services: mpd: Rename %set-user-group to set-user-group. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28: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: 63082@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168269205719576 (code B ref 63082); Fri, 28 Apr 2023 14:28:02 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:27:37 +0000 Received: from localhost ([127.0.0.1]:34133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4T-00055f-7h for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:37 -0400 Received: from mail-qv1-f48.google.com ([209.85.219.48]:44064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4L-000540-E7 for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:29 -0400 Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-5ef51361ff6so262366d6.0 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692044; x=1685284044; 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=tifie4UXBeiflyejnrNW3Mfmy2natxq8FBP0x9+4ywY=; b=qbbZvqZL+I0t7ulg/j8EW8546u9XqrOtbsM0vdTxi2nJs/s6uKNwHLeoYHi9ojiuqO Ynj68rH6XMN3aovcauG/zgE8o4+Z+/F+K9zaS+AimvXY15bVEJnamK7ViX7WfsMuyoK+ Ci4KAsVsXtVBCy6fmllALOx6s8onWyIU98Jo6qYvV/0Y7zci50FO1ZLYDzkzoT0WEjfF 6JBzs7JR9iUMaJXGSJ3XKaVO6b8KhYW2u+x38FLItdm7jCUVyq9elxV60F6133vbX82O ir4aWzmtkhzzh1Vh8gEZWEZLOoZ8ddvxBtZB2ftyvvnOe16lu0f0N7CwcE4XE4S0AeBQ TY0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692044; x=1685284044; 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=tifie4UXBeiflyejnrNW3Mfmy2natxq8FBP0x9+4ywY=; b=fMJkJXAGg5c4qR2Z0oWLkuQcX27ICZx5VYspGvf9+ZmK+8u9GIFnvj8HsdVEqlMkGd 7eErY3k1PJfof0S/ls1XpIBpy79MvP1cDeLqqGTCCTwg6i5mHxtYzaZ7pJQffikijMgS fZzP4jDNfDuy6DC2ZC5a64rXQqOTYMTHw/aJiMxA92ePg6IJnspIBv+VLw6wAPRnbKkJ VRpO9I97z/okuYzozuEvhDAod8b7qpXkzQUHCHJwcyUOn1bLmBjbSnjWaNYI1Niae/aR n36UV9P1s0ntF9lmQUCaSevWGn/Xtq8ecGlAzTenjgPXRVwAapLsoHaqybCKxvoEuGOr QGuA== X-Gm-Message-State: AC+VfDx2AOvPIE7o8vzKB9y+wL6qXq2djxUgkotAytqtAHQ8Y2H0wqR7 xPGf9UEIXRv3Um3zv+GcK1rFd7yf5gA= X-Google-Smtp-Source: ACHHUZ7TMNzzlzZiwnuQoo17wqZE3kcH1s0Uv/u8Ii8UhKyaXGO6Xdx6VQuwrDX1HD+Bd/bB66S3mA== X-Received: by 2002:a05:6214:27e1:b0:5f0:23be:a302 with SMTP id jt1-20020a05621427e100b005f023bea302mr7425366qvb.9.1682692043823; Fri, 28 Apr 2023 07:27:23 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:23 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:26:56 -0400 Message-Id: <749575616a3bb183c40a8ca321cb32d5f578b71e.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) The convention to use % as a prefix is for "special" variables rather than procedures. * gnu/services/audio.scm ((%set-user-group): Rename to... (set-user-group): ... this. --- gnu/services/audio.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index dc83479e40..7874539810 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -143,7 +143,7 @@ (define list-of-symbol? ;; Helpers for deprecated field types, to be removed later. (define %lazy-group (make-symbol "%lazy-group")) -(define (%set-user-group user group) +(define (set-user-group user group) (user-account (inherit user) (group (user-group-name group)))) @@ -636,7 +636,7 @@ (define (mpd-accounts config) (match-record config (user group) ;; TODO: Deprecation code, to be removed. (let ((user (if (eq? (user-account-group user) %lazy-group) - (%set-user-group user group) + (set-user-group user group) user))) (list user group)))) @@ -907,7 +907,7 @@ (define (mympd-accounts config) (match-record config (user group) ;; TODO: Deprecation code, to be removed. (let ((user (if (eq? (user-account-group user) %lazy-group) - (%set-user-group user group) + (set-user-group user group) user))) (list user group)))) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 08/17] services: mpd: Only rotate log when a log file is specified. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28:03 +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.168269206019590 (code B ref 63082); Fri, 28 Apr 2023 14:28:03 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:27:40 +0000 Received: from localhost ([127.0.0.1]:34135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4W-00055t-Gj for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:40 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:62483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4M-00053n-8T for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:30 -0400 Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-751319e0dbfso636576285a.0 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692050; x=1685284050; 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=G706y8/svulTHnaumUVdPiBiJIyymJf5ckrawe+5/3M=; b=GTy00KuEdDVKMU06NnBt0G6fY6hB0SOYIeWIUDJqQjj4LzZqqBVhNi4WzGdMhDDzh3 +d4GfBrQllGhGPLsTC0T8/oEDkG1JSU3QrwcoF/SajcLO27Os7yfIDgVM8axlj4NuXTv UR3Dm9QRhT+5suvRm0KX9Mi6Qtzj3TlncDWNmkC66jHax/Wy62B71UYavFyWJGFKhHwR sdsY9lhZt8gmDk75oNxNVvAvy0rkUWXhSrq5uBIpcyzfWEBAge/m0dzIJmdMLcn7ckQn 49eXfbimFG9AePhS3K6PjzkihtIe2VN0uRHgdUNE+5bgPq1inIEcEuZHuiX2j21qvJ1S IUQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692050; x=1685284050; 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=G706y8/svulTHnaumUVdPiBiJIyymJf5ckrawe+5/3M=; b=Szoc50+S3mJTnYDQJHBZrme5sFf9+giqQtYbRTq3X7EexAvtJKaDv/lUxak5vpN3jm NTqhuRZ86VBjAnw1Kdi7RXIg8As1HukGgiBE4Nui9snlShDOeD33UhM/aYbjW2QV3j+q LKYbdq9I0d5D1ULkuBBwMCV/iLZa1NM5GNH1dpD4BubKaMSnne0gFed+HQN1AYV/+xvs nOZ966bRmQwDjftWmQj1f0sBfpRe3xJdpr3OY84h8oGpKPuvdPduWrj2SFSWc8ntWCQ8 3VrAr7h+FLRjTQeB+dyZz7I+wYI/QOeR6xwgIDy8yogOsO+lZqp2vXT6twa+irXXry5P 4NLQ== X-Gm-Message-State: AC+VfDwluqOcQ8gRZGYdxJQFkv1NwqE4O/RJdlabYq3rVS2iZCcIagem FODIGSXbahYW3aOL2nPKc5V9W0vp43Y= X-Google-Smtp-Source: ACHHUZ6FPbBkpIaawdcVDy7aZCInPE+8LfGfnQ6VNS5p3St5PM5/8GCzkyVg9VTMsqcoQpKwIUBvbQ== X-Received: by 2002:ad4:5bac:0:b0:5ef:8b6e:583c with SMTP id 12-20020ad45bac000000b005ef8b6e583cmr8182326qvq.5.1682692049767; Fri, 28 Apr 2023 07:27:29 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:29 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:27:01 -0400 Message-Id: <6bb4e569bc450907fd412118a6ff43ca22e55f9b.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is to avoid adding a bogus log rotation job when syslog is used (which already has its own log rotation job). * gnu/services/audio.scm (mpd-log-rotation): Add conditional to avoid producing a log-rotation object when no log-file was provided. (mpd-shepherd-service): Do not manage log file parent directory creation. Assume it already exists. Adjust the rottlog-service-type extension. --- gnu/services/audio.scm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index a1d1a3d2fe..cccf5c2693 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -554,12 +554,15 @@ (define (mpd-serialize-configuration configuration) (serialize-configuration configuration mpd-configuration-fields))) (define (mpd-log-rotation config) - (match-record config (log-file) - (log-rotation - (files (list log-file)) - (post-rotate #~(begin - (use-modules (gnu services herd)) - (with-shepherd-action 'mpd ('reopen) #f)))))) + (match-record config + (log-file) + (if (maybe-value log-file) + (list (log-rotation + (files (list log-file)) + (post-rotate #~(begin + (use-modules (gnu services herd)) + (with-shepherd-action 'mpd ('reopen) #f))))) + '()))) (define (mpd-shepherd-service config) (match-record config (user package shepherd-requirement @@ -635,7 +638,7 @@ (define mpd-service-type (service-extension account-service-type mpd-accounts) (service-extension rottlog-service-type - (compose list mpd-log-rotation)))) + mpd-log-rotation))) (default-value (mpd-configuration)))) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28:03 +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.168269206119604 (code B ref 63082); Fri, 28 Apr 2023 14:28:03 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:27:41 +0000 Received: from localhost ([127.0.0.1]:34137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4W-00055v-Qm for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:41 -0400 Received: from mail-qk1-f179.google.com ([209.85.222.179]:55401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4M-000548-Lr for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:31 -0400 Received: by mail-qk1-f179.google.com with SMTP id af79cd13be357-74fc1452fbdso386336085a.2 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692045; x=1685284045; 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=ftIw5Voni/LtV02KaheyqRtLcnsjgX4ZN/X2LPvGxyY=; b=r32GW2BNxnX5C8lI7+FcvseRPqsFubQaotnCTd4lJSVokLEWggrlJSTPsMMor/FlnU HtLATHTxk8aBxoIAA1BbSrZqRgBgT5pPntSVC5SnY29boBWDbQNbWHBple6jJD741tma S0+y+zHrir/ojoLHE/229UYdz/o85uhqmASwViLK8ra1RQSJD34OT2ghmgOVJj4gXs8e coi25RogbtsX7ZQRrvCx1v18wGRRBhQe3i3GhBs+yUA77QfDeDIGnt1GUJa7y9dFxvZn fG8uiB71NMsUZuLiPblnBRxjS/5onXDt2wNOeHKBJ9MfeIT1m9tBnQBmknhVp5mE91It 7djA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692045; x=1685284045; 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=ftIw5Voni/LtV02KaheyqRtLcnsjgX4ZN/X2LPvGxyY=; b=PxPi+eTPBj1xu1u34M4tRWRr+996rYImlT3RLaNjeqnAhIDXgwo4bM8xG1TD93g8mP LWPQ4xlij5U/bVMC6P2GFcwQ54Ak/7ZheYP0PZ6PeibsNArBjrR2bLVtmiUF24I0FiAw k7lyy8qT6yicZmCRH9HYE4kKxNf9ilazrKLaVzqsutHJAaYqb9fl0H+A2IAA476/+S0o X/++lf0nfxk1emvms41p9pj89KmtmcyCdlNNFxyMfGp2fjwABqom57SKP79/7X95Qb6i QGw2T9WnjHIWUtzVP3yHnBkiluX3UpR+dO8P6bK11ido1QAdgRxNIOdmsIjByHtW17I5 HGDg== X-Gm-Message-State: AC+VfDwIQdnfVgWIoNbhPuVeuRuCWY7fG1/fcnASiqWfTMxPybsbN15n RwKr3V9OyK1p2W/2xgOLmoOH3VV0ALw= X-Google-Smtp-Source: ACHHUZ4XC1SAyFPBUxlk+AkrE5DcOBrhtolPK/mUzxm0yfiDrojEPoHC22W7z3+vboinLpDywhs/bA== X-Received: by 2002:a05:6214:2a47:b0:616:5755:ca68 with SMTP id jf7-20020a0562142a4700b006165755ca68mr8934669qvb.25.1682692044960; Fri, 28 Apr 2023 07:27:24 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:24 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:26:57 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Prior to this change, there was a discrepancy where a user could have disagreeing groups between the group and user fields (the user field being a record, which includes its primary group as a string). This could have caused problems because the USER's group was being used to set the file permissions, while the GROUP name was serialized to MPD's configuration, and MPD would use it to set the group of its running process. Synchronizing both is not practical, as it can easily lead to slightly different objects conflicting, again causing problems. The compromise is to obsolete the 'group' field. A group can still be configured via the 'user' field, which accepts a object, with the limitation that the group should already exist. * gnu/services/audio.scm (%lazy-group): Delete variable. (%set-user-group): Delete procedure. (mpd-serialize-user-group): Likewise. (%mpd-user) [group]: Default to "audio". (%mpd-group): Delete variable. (mpd-group-sanitizer, mympd-group-sanitizer): Adjust sanitizers. (mpd-configuration, mympd-configuration) [group]: Default to #f. Update doc. (mpd-accounts, mympd-accounts): Remove group. (%mympd-user) [group]: Default to "nogroup". * doc/guix.texi: Regenerate doc. --- doc/guix.texi | 15 ++++---- gnu/services/audio.scm | 80 ++++++++++++------------------------------ 2 files changed, 28 insertions(+), 67 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f8acdbd6b5..34703b1698 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33571,8 +33571,8 @@ Audio Services @item @code{user} (type: user-account) The user to run mpd as. -@item @code{group} (type: user-group) -The group to run mpd as. +@item @code{group} (default: @code{#f}) (type: boolean) +Obsolete. Do not use. @item @code{shepherd-requirement} (default: @code{()}) (type: list-of-symbol) This is a list of symbols naming Shepherd services that this service @@ -33824,15 +33824,12 @@ Audio Services This is a list of symbols naming Shepherd services that this service will depend on. -@item @code{user} (default: @code{%mympd-user}) (type: user-account) +@item @code{user} (type: user-account) Owner of the @command{mympd} process. -The default @code{%mympd-user} is a system user with the name ``mympd'', -who is a part of the group @var{group} (see below). -@item @code{group} (default: @code{%mympd-group}) (type: user-group) -Owner group of the @command{mympd} process. +@item @code{group} (default: @code{#f}) (type: boolean) +Obsolete. Do not use. -The default @code{%mympd-group} is a system group with name ``mympd''. @item @code{work-directory} (default: @code{"/var/lib/mympd"}) (type: string) Where myMPD will store its data. @@ -33872,7 +33869,7 @@ Audio Services Override URI to myMPD. See @uref{https://github.com/jcorporation/myMPD/issues/950}. -@item @code{script-acl} (default: @code{(mympd-ip-acl (allow '("127.0.0.1")))}) (type: maybe-mympd-ip-acl) +@item @code{script-acl} (type: maybe-mympd-ip-acl) ACL to access the myMPD script backend. @item @code{ssl?} (default: @code{#f}) (type: boolean) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 7874539810..58262f7842 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -140,14 +140,6 @@ (define (uglify-field-name field-name) (define list-of-symbol? (list-of symbol?)) -;; Helpers for deprecated field types, to be removed later. -(define %lazy-group (make-symbol "%lazy-group")) - -(define (set-user-group user group) - (user-account - (inherit user) - (group (user-group-name group)))) - ;;; ;;; MPD @@ -175,9 +167,6 @@ (define (mpd-serialize-list-of-strings field-name value) (define (mpd-serialize-user-account field-name value) (mpd-serialize-string field-name (user-account-name value))) -(define (mpd-serialize-user-group field-name value) - (mpd-serialize-string field-name (user-group-name value))) - (define-maybe string (prefix mpd-)) (define-maybe list-of-strings (prefix mpd-)) (define-maybe boolean (prefix mpd-)) @@ -185,20 +174,13 @@ (define-maybe boolean (prefix mpd-)) (define %mpd-user (user-account (name "mpd") - ;; XXX: This is a place-holder to be lazily substituted in (…-accounts) - ;; with the value from the 'group' field of . - (group %lazy-group) + (group "audio") (system? #t) (comment "Music Player Daemon (MPD) user") ;; MPD can use $HOME (or $XDG_CONFIG_HOME) to place its data. (home-directory "/var/lib/mpd") (shell (file-append shadow "/sbin/nologin")))) -(define %mpd-group - (user-group - (name "mpd") - (system? #t))) - ;;; TODO: Procedures for deprecated fields, to be removed. (define mpd-deprecated-fields '((music-dir . music-directory) @@ -242,15 +224,9 @@ (define (mpd-user-sanitizer value) (configuration-field-error #f 'user value)))) (define (mpd-group-sanitizer value) - (cond ((user-group? value) value) - ((string? value) - (warning (G_ "string value for 'group' is deprecated, use \ -user-group instead~%")) - (user-group - (inherit %mpd-group) - (name value))) - (else - (configuration-field-error #f 'group value)))) + (when value + (warning (G_ "'group' in is obsolete; ignoring~%"))) + #f) ;;; @@ -407,9 +383,10 @@ (define-configuration mpd-configuration (sanitizer mpd-user-sanitizer)) (group - (user-group %mpd-group) - "The group to run mpd as." - (sanitizer mpd-group-sanitizer)) + (boolean #f) + "Obsolete. Do not use." + (sanitizer mpd-group-sanitizer) + (serializer empty-serializer)) (shepherd-requirement (list-of-symbol '()) @@ -633,12 +610,9 @@ (define (mpd-shepherd-service config) (format #t "Service MPD is not running."))))))))))) (define (mpd-accounts config) - (match-record config (user group) - ;; TODO: Deprecation code, to be removed. - (let ((user (if (eq? (user-account-group user) %lazy-group) - (set-user-group user group) - user))) - (list user group)))) + (match-record config + (user) + (list user))) (define mpd-service-type (service-type @@ -676,9 +650,7 @@ (define-maybe/no-serialization mympd-ip-acl) (define %mympd-user (user-account (name "mympd") - ;; XXX: This is a place-holder to be lazily substituted in 'mympd-accounts' - ;; with the value from the 'group' field of . - (group %lazy-group) + (group "nogroup") (system? #t) (comment "myMPD user") (home-directory "/var/empty") @@ -702,15 +674,10 @@ (define (mympd-user-sanitizer value) (configuration-field-error #f 'user value)))) (define (mympd-group-sanitizer value) - (cond ((user-group? value) value) - ((string? value) - (warning (G_ "string value for 'group' is not supported, use \ -user-group instead~%")) - (user-group - (inherit %mympd-group) - (name value))) - (else - (configuration-field-error #f 'group value)))) + (when value + (warning (G_ "'group' in is obsolete; ignoring~%"))) + #f) + ;;; @@ -737,10 +704,10 @@ (define-configuration/no-serialization mympd-configuration empty-serializer) (group - (user-group %mympd-group) - "Owner group of the @command{mympd} process." + (boolean #f) + "Obsolete. Do not use." (sanitizer mympd-group-sanitizer) - empty-serializer) + (serializer empty-serializer)) (work-directory (string "/var/lib/mympd") @@ -904,12 +871,9 @@ (define (mympd-shepherd-service config) (stop #~(make-kill-destructor)))))) (define (mympd-accounts config) - (match-record config (user group) - ;; TODO: Deprecation code, to be removed. - (let ((user (if (eq? (user-account-group user) %lazy-group) - (set-user-group user group) - user))) - (list user group)))) + (match-record config + (user) + (list user))) (define (mympd-log-rotation config) (match-record config (log-to) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 05/17] services: mpd: List log-level in decreasing verbosity order in doc. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28:04 +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.168269206219611 (code B ref 63082); Fri, 28 Apr 2023 14:28:04 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:27:42 +0000 Received: from localhost ([127.0.0.1]:34140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4X-000569-K1 for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:41 -0400 Received: from mail-qk1-f172.google.com ([209.85.222.172]:56588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4N-00054A-Rd for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:32 -0400 Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-74e00fcdec6so520924085a.1 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692046; x=1685284046; 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=+aUIGTCb05pGBGYlPk+lZBS1Om30oi+KzCkGM6OLPzg=; b=sLc3b4vSsDLMJ5Ewm95DRVMtJpQKW1ARvrPgvPwCKrumTzOTW3eDit/Qfhcu2xjWWm Dt5rCtCnqIV8gPwi5dUjnfVEmP1VwuvjrQrVRy2PjvGuL5axd26kxPn27Y40Guwgmn11 gWrJnICbnzaBQF4AcmsRvSOPicAZycttMXW1L1x2ety9NRzYJKdMAsEAvJdLdJ1QDftb UbdyKEg6cegA+1ZoxfLh7f0PQwz6/ZgWzOgjbMq4426KKhTv9+qBidphwJ6HCCgCDCAM NzSOqIEJkJ+0Ft1W5Nz2L0IAmzbY9p7fd4GZGGqHedXP260eVyJwDKcy6NGt/7PH0zP8 copA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692046; x=1685284046; 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=+aUIGTCb05pGBGYlPk+lZBS1Om30oi+KzCkGM6OLPzg=; b=FoLItvfUI/cfBn2O2RSuxlzlvA1ke1U1LHUWFpZ5X5mqpvcOEanM6svUlL/doPVVlc s44SsHbl+7v0x9eiyUe7R35rx/ZsaV796wvuge/XUq706jXbSd2IZOeDZabyrfcL/zj4 /6YgxAs1VM3yH4OBJqrcmDR9H8+v1MTEtUyGMN62SL/c/K+CHlPXQygdbBWUtZz85cew 4q/MknY4ocJd4TAxLl5fsflLiZ9QLS4Jkhy68cwSw2qRbcygibBY3trsyiCrT53QWPOR SWy4CNNlF9G3ZEa1JrnvJsLWMXpbvpN4lqx0VqohMYwK98M0KvBpUGuYrQiE6mxrSrB8 5SUw== X-Gm-Message-State: AC+VfDxg/XnO97yKNM1g2rzoRXiZ/nxKv0bK5VXQuyYhUlUqRXsce5mU UsqbURoiutqDuzyqXYvlHiS5E/njQzg= X-Google-Smtp-Source: ACHHUZ7ka1mewQImjVktrUYmORLQo1SvCYroBySXBMvnq8KdKmE3vXBGoOYBZ4kZkHulHmMYhIEZVA== X-Received: by 2002:a05:6214:5097:b0:5ba:8af3:5d58 with SMTP id kk23-20020a056214509700b005ba8af35d58mr8190272qvb.36.1682692046074; Fri, 28 Apr 2023 07:27:26 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:25 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:26:58 -0400 Message-Id: <15e3bdd07a14690befeb707fdcc9eeac9aafd770.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm (mpd-configuration) [log-level]: List log-level in decreasing verbosity order in doc. * doc/guix.texi (Audio Services): Update doc. --- doc/guix.texi | 6 +++--- gnu/services/audio.scm | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 34703b1698..1aa8dc2809 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33587,9 +33587,9 @@ Audio Services configuration file. @item @code{log-level} (type: maybe-string) -Supress any messages below this threshold. Available values: -@code{notice}, @code{info}, @code{verbose}, @code{warning} and -@code{error}. +Supress any messages below this threshold. The available values, in +decreasing order of verbosity, are: @code{verbose}, @code{info}, +@code{notice}, @code{warning} and @code{error}. @item @code{music-directory} (type: maybe-string) The directory to scan for music files. diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 58262f7842..1dc3204fc0 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -409,8 +409,8 @@ (define-configuration mpd-configuration (log-level maybe-string "Supress any messages below this threshold. -Available values: @code{notice}, @code{info}, @code{verbose}, -@code{warning} and @code{error}.") +The available values, in decreasing order of verbosity, are: @code{verbose}, +@code{info}, @code{notice}, @code{warning} and @code{error}.") (music-directory maybe-string -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 10/17] system: accounts: Export . Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28:04 +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.168269206219618 (code B ref 63082); Fri, 28 Apr 2023 14:28:04 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:27:42 +0000 Received: from localhost ([127.0.0.1]:34142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4Y-00056G-1O for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:42 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:62483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4O-00053n-KB for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:32 -0400 Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-751319e0dbfso636593385a.0 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692052; x=1685284052; 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=85aHwTtrAZsvDTtM0VKoidEaKkvUE2p2WOxWRNJlN7s=; b=nD/ruN1jKGYm1uUDcHb/O24OddVlvS5JOZd2dGKauP/rWstfKNxgvHb2CG+ggK/bmu J2ZhDGk2iqGEX+iOTYXh8CF/oX9jlg+iiEluLoRTfmD6qWomIcUD2hbfaTU7zf5oSa9v rj3KGiLUSyY7hVhV2iufTj1GBOMIXtqWwypppyVxs1RnslB1waO8U2xX8aRHlfIIKaK4 ZxAtyDT6LSMyFwuHCFEsFaJUuUHh89KDmD4m2AtC2cTGelj3FlZX3opf2A9n9OpwsGVX AP8PxPCpgXGeRPPQ0fpeNG75naou9yO7n7heMxt4EoevJ8g37zt48RRD6ANx/fCHIpX2 sgUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692052; x=1685284052; 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=85aHwTtrAZsvDTtM0VKoidEaKkvUE2p2WOxWRNJlN7s=; b=ivtdBK6NkOux2g7zC+2aHkFuRLPJaBoxxFTZsL35eaUSFpBC8loHGDRdxX6Ev1/Onw jq/0AXxf8qJr+BJHguvrTlbqZ/Uq01cMgWC9paNs1P9VjthQHLctaHnIPdJhKsmGSsXo r1m2Baps6RcYzSnLgScCYvAxi9EPPgwMm+tQVRZGaHi9uYHwxR6igWFO8S7Tog7cp8tj 7ZgEqjc6nMQ8yCk3+JL8sro7j+WWaXNboWYztETJIqlAkViGkydLNrXtqqGlz5n+zqN/ OPeqD/DfuI7veWpXyU7eV1Smc8Sjh3vdxt5OQfUaHgVMAo/R/gMX9HhKEaOgf+632WRd 9DfA== X-Gm-Message-State: AC+VfDzywqW6PvE3PU5s09bWou6lfjQaslKsT2Aa8QzeBODWp02r5w6G BRNNLE5AeZkMgy4HlCpe9nUGlNj6zLY= X-Google-Smtp-Source: ACHHUZ6mNhAg51H/cdUbrEaNo5WI1Xta6H+HcdNcgvxskRHA4kzpIUWvoJjMo4sIIJ9rRrGqocid8Q== X-Received: by 2002:a05:6214:509a:b0:616:5e2f:f56c with SMTP id kk26-20020a056214509a00b006165e2ff56cmr9489584qvb.3.1682692052127; Fri, 28 Apr 2023 07:27:32 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:31 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:27:03 -0400 Message-Id: <0347f233a469f93c411b0ad016b718e8954f1a2a.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --- gnu/system/accounts.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/system/accounts.scm b/gnu/system/accounts.scm index 586cff1842..e37b733c6d 100644 --- a/gnu/system/accounts.scm +++ b/gnu/system/accounts.scm @@ -19,7 +19,8 @@ (define-module (gnu system accounts) #:use-module (guix records) #:use-module (ice-9 match) - #:export (user-account + #:export ( + user-account user-account? user-account-name user-account-password -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 06/17] services: mympd: Fix log file name. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28:05 +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.168269206219626 (code B ref 63082); Fri, 28 Apr 2023 14:28:05 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:27:42 +0000 Received: from localhost ([127.0.0.1]:34144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4Y-00056N-9B for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:42 -0400 Received: from mail-qk1-f178.google.com ([209.85.222.178]:54765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4P-00054D-8m for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:33 -0400 Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-74e17099772so845577385a.1 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692047; x=1685284047; 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=lSadPPU85WFUdQ37+BeW9wty0+0NKJ6eA/xgeCrCg0g=; b=TGDemCTdDP9vIO2jVoW1G2AXTCh6ePwEN9SuC2RPjoW49fL/pmYn5JtegkHI/q+WY3 PZ36AYuhwKcTWjli8k9zxl7HGliUdcA142h58uDMFSlsKFa6z5MjVA5E9KSwdiCfBz8L +GiZC0sz39IYj3m9VObtYBgeDMQLGxSDBKIePJCpyL0HH/ieDIVQAVqVe68i2wL3ODSd Ypmjf8SSCS0jlQ06iq4v8iT3nYXs0kIMyRSO/6w+Jaw1qSlEg/U1afHovqAkUno0V/6Y sg6eilFhqCjdq6HtgXC/vH1BeuRV+w91CGOv25XcyObJArpSRTNkHskgxlFWGUY/fUAd wF1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692047; x=1685284047; 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=lSadPPU85WFUdQ37+BeW9wty0+0NKJ6eA/xgeCrCg0g=; b=Q6JK/GHTzUPuxRP94SHa9EQRA68uubfibZQygKyAHwq9adqCkMA7W9276JzS98fjLz yEOQjRStw3KP0oKdNLt3XtBwBaRTZvLf6LVDFoP0jvpTzErR5cOcogMw6XEJLYcN91bU 9T4uWsMzMcTAAyO1kxpMdgGMHpZIA31ysbY1qsKnhvSeBPCdUB30Obyy5zSKV++tnrjT Ocf2XsD3kkAsR7bxcuSrUPOBVCJumn6IpvaxIUjsF/PLT711s59EKGZn1uC4NVJUfmTk PLcBQYh5dR85YNhMlTpWysngYYOzrHQrds+K73OO90n7naHV538oWS8GJunv2xRT8Bzw kUWw== X-Gm-Message-State: AC+VfDw7PLhG4prgqji5IPD2Pe993UeOmn5PKdMZTDLBrjhoVS0Ursj7 wb2vQiQ0S9n8VcOCBW7AkpZl1rfeDso= X-Google-Smtp-Source: ACHHUZ6mdAE+JDe8c/XvWv06dmJZws+GRSwa6P6ZdVlLG05CvhuGI6thgS7Kc7lj5BBFIYdMF5n9Zg== X-Received: by 2002:a05:6214:262c:b0:5ef:4a4b:cdd7 with SMTP id gv12-20020a056214262c00b005ef4a4bcdd7mr9952475qvb.16.1682692047591; Fri, 28 Apr 2023 07:27:27 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:26 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:26:59 -0400 Message-Id: <878098810429d25922de0be323fae83b5a92e616.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm (mympd-configuration): Adjust log file name to match documentation. --- gnu/services/audio.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 1dc3204fc0..0b7a25d9ef 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -744,7 +744,7 @@ (define-configuration/no-serialization mympd-configuration "How much detail to include in logs, possible values: @code{0} to @code{7}.") (log-to - (string-or-symbol "/var/log/mympd/log") + (string-or-symbol "/var/log/mympd.log") "Where to send logs. By default, the service logs to @file{/var/log/mympd.log}. The alternative is @code{'syslog}, which sends output to the running syslog service under the @samp{daemon} facility." -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 11/17] services: mpd: Warn when the MPD user is not in the "audio" group. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28:05 +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.168269206319633 (code B ref 63082); Fri, 28 Apr 2023 14:28:05 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:27:43 +0000 Received: from localhost ([127.0.0.1]:34146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4Y-00056V-IC for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:43 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:62483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4P-00053n-OE for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:34 -0400 Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-751319e0dbfso636600585a.0 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692053; x=1685284053; 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=o4U8pVE1/cq70SoX9Vyc18icUVpuiGeny/xWK+c/O3Y=; b=bKdS9h7pYcTP0eWHeoj+rwxmgga4u/GmINWK2yrfSOUAzY1HKXRLpy5U9BTd6G6rwl y8ETTgeUv7A3HYnjADrhOAA1q7vh6LKBAiQamSdcE68ub6OKNr7p0Rl/zmMfXHtd7kbB f2rVepErMyQIflFwefi6sGF1lFOmCOfZ+Emv+y1QayEqgN/nrV2a4f3goWZZCndmnTdf /+eZ9tuJBAJBZcTYbF5FKuU5dyELvY5ktNmGw/ItBKzCVA7QXI3zlJ4KXT7ZplNbCvzo iIVCE64iFs3riPiJ0779ECxaXuqDr1pwc5NOSIKmuiPVF3b2grfMNjPHOTCrft/23OBn HX3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692053; x=1685284053; 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=o4U8pVE1/cq70SoX9Vyc18icUVpuiGeny/xWK+c/O3Y=; b=PmaBDztgPNKzMiNkz+cXEN8v6E+XB4da7bdEwTo/Gb8LYqUknpmknwiEz9Nu0CJ3eZ aCzlyDsEze2PnbPCiKgETtcAatZgn/zKynuk/xtrrEzqIaIKJDfq1uAPTrfVEoDISAPw DSlnwooPMhm1Wv21MC8abp2j/0NuEJS9PolLCObyaicH39qNQOSWLl7/wcOrlfW1grFn x2BtgVwYlFJvxe0Tte1U4N7DeBUeOFOEHUEJTuG103N+sOTfUaKGaLLLWX++9tH1DBaX AsLEw70lzRvxrdXn1CKTCrul39U5ssFeIwLrsYpFPO+vFiq68gFD8kioK/j8elFdNhgH vYfA== X-Gm-Message-State: AC+VfDxZTYb6pAD4H/i3aWM6vrVz7RjsL9fesGq++cR5PxmRdLtk3u1d tt5CNiMAT0UiOKFvvnzgBGdNXQCwmgc= X-Google-Smtp-Source: ACHHUZ6JcTcU3mSjG4QFfN0H+CxJqLi54Z+ffo6pn00Kq3kguFrPcWAM9+cecutqx6VlNjlbGVM1AQ== X-Received: by 2002:ad4:5bc8:0:b0:5ef:5481:595 with SMTP id t8-20020ad45bc8000000b005ef54810595mr17084757qvt.0.1682692053227; Fri, 28 Apr 2023 07:27:33 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:32 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:27:04 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . * gnu/services/audio.scm (%mpd-user) [group]: Add comment. (mpd-user-sanitizer): Warn if the MPD user is not in the audio group. --- gnu/services/audio.scm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 550ccc542c..9579432ea3 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -30,6 +30,7 @@ (define-module (gnu services audio) #:use-module (gnu services configuration) #:use-module (gnu services shepherd) #:use-module (gnu services admin) + #:use-module (gnu system accounts) #:use-module (gnu system shadow) #:use-module (gnu packages admin) #:use-module (gnu packages mpd) @@ -172,6 +173,8 @@ (define-maybe boolean (prefix mpd-)) (define %mpd-user (user-account (name "mpd") + ;; Being in the audio group ensures that PulseAudio can access sound + ;; devices. (group "audio") (system? #t) (comment "Music Player Daemon (MPD) user") @@ -208,10 +211,17 @@ (define (mpd-serialize-port field-name value) (define-maybe port (prefix mpd-)) -;;; Procedures for unsupported value types, to be removed. - +;;; Sanitizer procedures. (define (mpd-user-sanitizer value) - (cond ((user-account? value) value) + (cond ((user-account? value) + (match-record value + (group supplementary-groups) + (unless (or (string=? "audio" group) + (member "audio" supplementary-groups)) + ;; Being in the "audio" group is necessary for access to the + ;; sound devices. + (warning (G_ "mpd user not member of \"audio\" group~%")))) + value) ((string? value) (warning (G_ "string value for 'user' is deprecated, use \ user-account instead~%")) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 07/17] services: mpd: Log to syslog by default. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28:05 +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.168269206319647 (code B ref 63082); Fri, 28 Apr 2023 14:28:05 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:27:43 +0000 Received: from localhost ([127.0.0.1]:34149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4Z-00056c-30 for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:43 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:60868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4Q-00054P-BG for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:34 -0400 Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-74e3c84e689so804443785a.1 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692048; x=1685284048; 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=XQigCdqi5DT1gXN0dtWr4qs1oGNNKVmAhzjl6bpTitM=; b=N7aWROgCjjLHC/JCSFHOttXjdyG8zTblO43KlXcV+8x8fplxUocWfak1YEHanfzXQ6 goJsr3EhkJVmGH1mTckqXbdTjwkmN+SdOWGD6hEnHtJGxQ8v2i84xC/y9C7FvYwndwpy 8ZJ5SHyUrwOeLExkqRFv1ZpWkpY5BhR6cYpWYFnhQjz51I1etIVKKdGGUf+VzkvikWON Q/W+BYN/5TZCdkMPVIyd/Wp/2YCD+3Aerv3LF2Ch+4iyc7Ewfi8Q5KQHMB0WgpwDnp/7 FxE+bEQuRklJQH7o8c/o7NQzvCrM9FaisYKSS3Z5nK/87cRlC8Zn6bHcKatJtQthFCRN 3bPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692048; x=1685284048; 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=XQigCdqi5DT1gXN0dtWr4qs1oGNNKVmAhzjl6bpTitM=; b=CFblUmXfwLUSCgtv1dzxf+qbcbSkzYKVZaxGRyDCgaX09b34x1q/re5uSlry4bDBOg cNt/G4Of/+P1ZQ7OPFsUpTYOMNasRqCXZEBEozW/xRw4fySASMA362cIGTBg6/IRyKc4 EYVD7Bq76NXwYma32xQ+dPFbMEIQpeDsvPZDvEIjR/WJ1V/G8/oy8JZ4AQ0pBbiCeSF8 MS+Fi6qFG2DQwZ9FVnVx1tM5CLD4rd77I+HDeUoszcFUKJD0rAuI8T94dmCyWIZ3jIrg ocqORTCJpersFh+bo84kzBl8NCmIL8qJPoelyfrEsbAKOumWqd6ikxaVxhrWhVhJ1eYt sSyQ== X-Gm-Message-State: AC+VfDzECFHF7iP+FWAbto7fHw46FWT2XOIynanhOiSW1c9zyxXQ8VSf 8Mk9abt3/jDX2sl18qz4ZxQtKRHwObs= X-Google-Smtp-Source: ACHHUZ43aJEqlOaQcHXg7EZe/SD5HsMGF+oYSQFzRbpDN5HwXtf9idWoxeb9aInI1Cv4TfZMHpYaVQ== X-Received: by 2002:ad4:5f0d:0:b0:5e8:979f:2e49 with SMTP id fo13-20020ad45f0d000000b005e8979f2e49mr10050064qvb.41.1682692048710; Fri, 28 Apr 2023 07:27:28 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:28 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:27:00 -0400 Message-Id: <44c9a5cf9836a71db9bf78c2eba005a40a006fff.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Rationale: the tristate value was awkward to deal with, the default log file name was odd (/var/log/mpd/log) and it required special attention to create the 'mpd' parent directory as root and chowning it to the MPD user. It also didn't match the default behavior of MPD, which is to log to systemd or syslog unless a log file is specified. * gnu/services/audio.scm (mpd-log-file-sanitizer): New procedure. (mpd-configuration) [log-file]: Remove default maybe value. Add sanitizer. (mpd-shepherd-service): Validate the log file parent directory exists and has the right permissions. * doc/guix.texi (Audio Services): Update doc. --- doc/guix.texi | 7 +++---- gnu/services/audio.scm | 29 ++++++++++++++++++++--------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 1aa8dc2809..a71a05bcf3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33581,10 +33581,9 @@ Audio Services @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{log-file} (default: @code{"/var/log/mpd/log"}) (type: maybe-string) -The location of the log file. Set to @code{syslog} to use the local -syslog daemon or @code{%unset-value} to omit this directive from the -configuration file. +@item @code{log-file} (type: maybe-string) +The location of the log file. Unless specified, the logs are collected +by the local syslog daemon. @item @code{log-level} (type: maybe-string) Supress any messages below this threshold. The available values, in diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 0b7a25d9ef..a1d1a3d2fe 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -228,7 +228,17 @@ (define (mpd-group-sanitizer value) (warning (G_ "'group' in is obsolete; ignoring~%"))) #f) -;;; +(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 'user value)))) ;; Generic MPD plugin record, lists only the most prevalent fields. (define-configuration mpd-plugin @@ -401,10 +411,10 @@ (define-configuration mpd-configuration empty-serializer) (log-file - (maybe-string "/var/log/mpd/log") - "The location of the log file. Set to @code{syslog} to use the -local syslog daemon or @code{%unset-value} to omit this directive -from the configuration file.") + maybe-string + "The location of the log file. Unless specified, the logs are collected by +the local syslog daemon." + (sanitizer mpd-log-file-sanitizer)) (log-level maybe-string @@ -563,17 +573,18 @@ (define (mpd-shepherd-service config) (requirement `(user-processes loopback ,@shepherd-requirement)) (provision '(mpd)) (start #~(begin - (and=> #$(maybe-value log-file) - (compose mkdir-p dirname)) - (let ((user (getpw #$username))) (for-each (lambda (x) - (when (and x (not (file-exists? x))) + ;; Take action on absolute file names, to filter out + ;; the 'syslog' special value. + (when (and x (string-prefix? "/" x) + (not (file-exists? x))) (mkdir-p x) (chown x (passwd:uid user) (passwd:gid user)))) (list #$(maybe-value playlist-directory) (and=> #$(maybe-value db-file) dirname) + (and=> #$(maybe-value log-file) dirname) (and=> #$(maybe-value state-file) dirname) (and=> #$(maybe-value sticker-file) dirname)))) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 12/17] services: mpd: Auto-detect mpd-output mixer type by default. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28:06 +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.168269206419654 (code B ref 63082); Fri, 28 Apr 2023 14:28:06 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:27:44 +0000 Received: from localhost ([127.0.0.1]:34151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4Z-00056q-Om for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:44 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:60868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4R-00054P-3d for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:35 -0400 Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-74e3c84e689so804456385a.1 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692054; x=1685284054; 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=nMAlz5+UB02jcYlmJCkOz4YxXZGXzQS9vtctbQ+umwU=; b=Th35pVBs86aCufj3tLswbeTbr5B0ciu4etRnUKsbl62wL9bGgDda2bwMdngkalCHJi RAOT2Y3kN/gyHMI7e9diXiuq4Bh3qBNdowvWxydXWx4RqVpTFQ/cTXuXKFohEB5Ja8mJ qky9gr47AX23ApWQd3VQWPOxpRGJEVCnQ92Hr7nF7R4YA52ifTR+WQfe5Ir5ichSH9Y2 aJ0aEfDqm8m6qyuNg/g0ZtxUzmVpryjM10ml65q6j6SKlaGRmZNfL16fPhhXsRRoJkdE PDTb/3WYHPxIlRtXRS6N091yFG+ZqKFoTf4bGQ6ILn3T+tb8qWfIVerbxjpCAH3n9xjs vQzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692054; x=1685284054; 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=nMAlz5+UB02jcYlmJCkOz4YxXZGXzQS9vtctbQ+umwU=; b=ijIYv2xJsH4KlO1wIiBHN0TRnQCkuZiNpGAF2HCIjcD20X1lEv9xMvXiTV1EnvLLyn NS73cyPb2RCykl3SkrGIrFS9TZOKGF5TwT7l49VzU71bsxHFyhRj/Fl5v/BPHsatggMn XCNSsrbF0oKz8NVLsapbOXqfya3wkcr5cA1xVdzMjJL34KucYUxZ/ksXicmfsXzx/AWL sRZh9Bo/NjzNBabChB9YbALpM05Y1dTzDnfcRkhw1G5zUvz/IFvkyFC5fUFlaPuLibNy UrAd0Tcc0R7YZMvKUC2+3rFC/af/TzoWostiY1B2CP1LOSZdt0zule5sWzymTxKH28lJ hT0g== X-Gm-Message-State: AC+VfDwGIQKY5+2B3L6i42TcyyLp6eCyYNeTrOymosrc/3wRO/FYxvYV Rn2uAJQpQyjm4CVhYFoppr5Y3J+1JOI= X-Google-Smtp-Source: ACHHUZ54g2WKzXMODgFereKl7B5NTfoeUEAOe2HDFb2D9nIIewdlORGj1G6HoGjBn7zs9le4gTB8Gw== X-Received: by 2002:a05:6214:20ee:b0:614:da60:f45d with SMTP id 14-20020a05621420ee00b00614da60f45dmr8976872qvk.30.1682692054546; Fri, 28 Apr 2023 07:27:34 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:34 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:27:05 -0400 Message-Id: <1f115d25dc8c9ab9dff4f86dba5079b21b4316a9.1682690696.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . * gnu/services/audio.scm (mpd-output) [mixer-type]: Change default value from "none" to unspecified. * doc/guix.texi (Audio Services): Regenerate doc. --- doc/guix.texi | 11 +++++++---- gnu/services/audio.scm | 15 +++++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 19320c2185..550e6606e5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33709,8 +33709,9 @@ Audio Services @end table @end deftp +@c %start of fragment @deftp {Data Type} mpd-output -Data type representing a @command{mpd} audio output. +Available @code{mpd-output} fields are: @table @asis @item @code{name} (default: @code{"MPD"}) (type: string) @@ -33737,15 +33738,16 @@ Audio Services @item @code{always-on?} (default: @code{#f}) (type: boolean) If set to @code{#t}, then MPD attempts to keep this audio output always -open. This may be useful for streaming servers, when you don?t want to +open. This may be useful for streaming servers, when you don’t want to disconnect all listeners even when playback is accidentally stopped. -@item @code{mixer-type} (default: @code{"none"}) (type: string) +@item @code{mixer-type} (type: maybe-string) This field accepts a string that specifies which mixer should be used for this audio output: the @code{hardware} mixer, the @code{software} mixer, the @code{null} mixer (allows setting the volume, but with no effect; this can be used as a trick to implement an external mixer -External Mixer) or no mixer (@code{none}). +External Mixer) or no mixer (@code{none}). When left unspecified, a +@code{hardware} mixer is used for devices that support it. @item @code{replay-gain-handler} (type: maybe-string) This field accepts a string that specifies how @@ -33760,6 +33762,7 @@ Audio Services @end table @end deftp +@c %end of fragment The following example shows a configuration of @command{mpd} that configures some of its plugins and provides a HTTP audio streaming output. diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 9579432ea3..071cebcef4 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -343,15 +343,18 @@ (define-configuration mpd-output disconnect all listeners even when playback is accidentally stopped.") (mixer-type - (string "none") - "This field accepts a string that specifies which mixer should be used -for this audio output: the @code{hardware} mixer, the @code{software} -mixer, the @code{null} mixer (allows setting the volume, but with no -effect; this can be used as a trick to implement an external mixer -External Mixer) or no mixer (@code{none})." + maybe-string + "This field accepts a string that specifies which mixer should be used for +this audio output: the @code{hardware} mixer, the @code{software} mixer, the +@code{null} mixer (allows setting the volume, but with no effect; this can be +used as a trick to implement an external mixer External Mixer) or no +mixer (@code{none}). When left unspecified, a @code{hardware} mixer is used +for devices that support it." (sanitizer (lambda (x) ; TODO: deprecated, remove me later. (cond + ((eq? %unset-value x) + x) ((symbol? x) (warning (G_ "symbol value for 'mixer-type' is deprecated, \ use string instead~%")) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 09/17] services: mpd: Let Shepherd effect the user/group change. 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.168269206519666 (code B ref 63082); Fri, 28 Apr 2023 14:28:07 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:27:45 +0000 Received: from localhost ([127.0.0.1]:34154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4a-00056x-Ep for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:45 -0400 Received: from mail-qk1-f178.google.com ([209.85.222.178]:60589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4S-00054w-Gn for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:37 -0400 Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-74adf6adac6so971716485a.0 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692051; x=1685284051; 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=3YVYTiNglXC6c3/OfUN8DD3/yYvwWBMLzh6/MUo6HoE=; b=MUKgP5a6cq9zUfNTTKqFb5raR4b2boOYPentn2ZgH4up0IM6ULCmoEOR8UvdQxdNhp FweQmcGlYqJ8NeabZT0qLr/7EYn9H4nc1iUsGxu/91dqgeU5jTrf8qP0ncX97BWA4dnW wIVyxH2ftx1DIHtBnKA2KLvZ6HsdcfR5UoXsFEHBP5uobidAiQNrjGav08zZiX/wvNE9 c1QqCd04TZkrOKiTXx27jtjLVnKnMRKdLFqe/QUckr/dpSg2rzR76KAzluNh5pao6vr7 PjtJ0kfja1TfXxPo72RiIWE6o06kKWB2zTwW2FUsX29vKG4hzppQW6kyq41rpx0A7y9m KLhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692051; x=1685284051; 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=3YVYTiNglXC6c3/OfUN8DD3/yYvwWBMLzh6/MUo6HoE=; b=gTedI2VaLfp0C3+3ozK4x8vbCndJ65LRggHqcsjLO8/Y9p29j2LCKSJmRYMwBZa/mr 9BSdYVEiN1POcD4vLMx5UfANLWVoN+07xwhDFkBVhlynMLAxS+t/gHpAa6FemoOfXLCd AXqU2YaFkijHY1gqXojtEHqlxxthqB3o47NdXKUwL6rPlA0mdAXqodAqf+K9k02uQwNF UrVTFFkBELYID3dWL5b4BgCwiuhf7TSabVGKU1LV71JoD9VQ3dmKcmTGHvImWhwLiaaf N2wVtS7/Joy5L4OJAbfFG0cAVsjMPvxad2BUMr7l4TBRJsma9/48nFB3vrUoIxaiSeyg SfGA== X-Gm-Message-State: AC+VfDwtoRrdax702jPfpCul6rKXG6oYz/yEr/dbHzILDpjQ4xuPs9Gf u5NRyInFn2nFmc7PIUmaqe97k+sWPA8= X-Google-Smtp-Source: ACHHUZ7ohPSCGu5PQkAALhOBckhfXbt2moswKBaQMVRiwJi4q0vXJ3c1nLwl0t4Kuj8CoqBBMK/YNQ== X-Received: by 2002:a05:6214:628:b0:5f7:a9e1:bbbf with SMTP id a8-20020a056214062800b005f7a9e1bbbfmr8223864qvx.44.1682692050966; Fri, 28 Apr 2023 07:27:30 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:30 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:27:02 -0400 Message-Id: <70d3c80ef59f9519a69218c504e72c4c836a6ab1.1682690696.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . Quoting a MPD developer, regarding MPD's feature to switch user itself: "that's legacy for the dark ages when proper service managers did not exist" :-). * gnu/services/audio.scm (mpd-serialize-user-account) (mpd-serialize-user-group): Delete procedures. * gnu/services/audio.scm (mpd-configuration) [user]: Do not serialize. [group]: Likewise. (mpd-shepherd-service): Provide the #:user, #:group and #:supplementary-groups arguments. (mympd-shepherd-service): Likewise, and remove the '--user' argument. * doc/guix.texi (Audio Services): Decorate mpd with @command. --- doc/guix.texi | 4 ++-- gnu/services/audio.scm | 31 ++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index a71a05bcf3..19320c2185 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33569,7 +33569,7 @@ Audio Services The MPD package. @item @code{user} (type: user-account) -The user to run mpd as. +The user to run @command{mpd} as. @item @code{group} (default: @code{#f}) (type: boolean) Obsolete. Do not use. @@ -33612,7 +33612,7 @@ Audio Services The location of the sticker database. @item @code{default-port} (default: @code{6600}) (type: maybe-port) -The default port to run mpd on. +The default port to run @command{mpd} on. @item @code{endpoints} (type: maybe-list-of-strings) The addresses that mpd will bind to. A port different from diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index cccf5c2693..550ccc542c 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2020 Ludovic Courtès ;;; Copyright © 2022⁠–⁠2023 Bruno Victal +;;; Copyright © 2023 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -164,9 +165,6 @@ (define mpd-serialize-boolean mpd-serialize-field) (define (mpd-serialize-list-of-strings field-name value) #~(string-append #$@(map (cut mpd-serialize-string field-name <>) value))) -(define (mpd-serialize-user-account field-name value) - (mpd-serialize-string field-name (user-account-name value))) - (define-maybe string (prefix mpd-)) (define-maybe list-of-strings (prefix mpd-)) (define-maybe boolean (prefix mpd-)) @@ -387,10 +385,14 @@ (define-configuration mpd-configuration "The MPD package." empty-serializer) + ;; Note: The user and its group are not serialized, otherwise MPD would + ;; attempt to switch the user/group itself. The task of switching the + ;; user/group is left to Shepherd instead. (user (user-account %mpd-user) - "The user to run mpd as." - (sanitizer mpd-user-sanitizer)) + "The user to run @command{mpd} as." + (sanitizer mpd-user-sanitizer) + (serializer empty-serializer)) (group (boolean #f) @@ -454,7 +456,7 @@ (define-configuration mpd-configuration (default-port (maybe-port 6600) - "The default port to run mpd on.") + "The default port to run @command{mpd} on.") (endpoints maybe-list-of-strings @@ -595,7 +597,11 @@ (define (mpd-shepherd-service config) (list #$(file-append package "/bin/mpd") "--no-daemon" #$config-file) - #:environment-variables '#$environment-variables))) + #:environment-variables '#$environment-variables + #:user #$username + #:group #$(user-account-group user) + #:supplementary-groups + '#$(user-account-supplementary-groups user)))) (stop #~(make-kill-destructor)) (actions (list (shepherd-configuration-action config-file) @@ -876,12 +882,19 @@ (define (mympd-shepherd-service config) (make-forkexec-constructor `(#$(file-append package "/bin/mympd") - "--user" #$username #$@(if (eq? log-to 'syslog) '("--syslog") '()) "--workdir" #$work-directory "--cachedir" #$cache-directory) #:environment-variables (list #$log-level*) - #:log-file #$(if (string? log-to) log-to #f)))) + #:log-file #$(if (string? log-to) log-to #f) + #:user #$username + ;; Note: the group of the record or that of + ;; the record can be used interchangeably + ;; here, since they've been synced in the 'mympd-accounts' + ;; procedure. + #:group #$(user-account-group user) + #:supplementary-groups + '#$(user-account-supplementary-groups user)))) (stop #~(make-kill-destructor)))))) (define (mympd-accounts config) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 13/17] services: mpd: Fix indentation. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28:08 +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.168269208719816 (code B ref 63082); Fri, 28 Apr 2023 14:28:08 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:28:07 +0000 Received: from localhost ([127.0.0.1]:34172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4w-00059Q-RU for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:28:07 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:49462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4X-00055X-3F for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:41 -0400 Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-74de7182043so469774285a.3 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692055; x=1685284055; 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=59riMfh2kGLqywwlfof4xz+Pw/nsEqmHoqIVAG18iss=; b=YL8ry3dOfaYJhAaJSHUrhFDbetlwgrtinpTg+1bSfwlZ+nOyRX8F8CLcUTjf611bfq 5phaLZTmA9AWYzYcN9gaio8oTI9DbRLm4r6IcP8/GmfaGC4KqO1mJBqUXnGD7JeAYND0 pZoePGCiEgr1nGZNEcxgmYuU2oBXq2BxdrSxCFpH+yZSQLvIk3SWlCAfL6gEzUlAU6fZ ogyC1Qe2CeoROpoZoCdL96oMMjBeUd7yndKZxmbVbsCDUXziAwbu1Y3KLuvybN7jUSe5 sFHdSrGzBSSg2MF7JGrAaNfmBqYVMF5jHAdzAiFAfT08roUun9H9lpfdNOhQnsIq8EFi Bg6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692055; x=1685284055; 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=59riMfh2kGLqywwlfof4xz+Pw/nsEqmHoqIVAG18iss=; b=cSgm9BbNJe5/Ib2eHM2H5r9gRzqc4kNGUHSLir7pWg566DW8bVtyUj2V4GQcCSHRxN UpachtwvaS6svaPzHD0KbNGCXDu4M3rqUORRibEyHcidqKNtHysi0kBRMyBJyxXX/Db/ crV67VBzv54Q+j91BanqgmvU3NGWK61wmRPzBLo92xHDkWv/Ciqa/Sfe4wZGBeGE0qvb Fiwv8pQsq0+N7J7dsagZIFYSYF1Qm4kBdDQi4zoZB70urpMCSfBLngk3HA3YlnpKjXb0 D/XcYqkljfS0VzBsouZwLrnzLzzOLSWdbMqK0N95bCzD5o1ntoiQ8i/e5KUrYfK19tEo 9tFw== X-Gm-Message-State: AC+VfDwtJgH+Pe2edBCltMBoOFpkrrCGHb0HAQgcbYmjFFOhe4RJK1LI zxmg/vvJg1qCcJmtlALKwCWSTLlTCgU= X-Google-Smtp-Source: ACHHUZ6qCg0mO4JOtxIqXO4dkb38wzPycM00J7CE8fHJkcam2FUW4eFIrGlAZRx2bx/Zxw2zm3bPvg== X-Received: by 2002:ad4:4eeb:0:b0:5a9:129:c704 with SMTP id dv11-20020ad44eeb000000b005a90129c704mr9456545qvb.9.1682692055580; Fri, 28 Apr 2023 07:27:35 -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.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:35 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:27:06 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm (mpd-log-rotation): Fix indentation. --- gnu/services/audio.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 071cebcef4..c11a7cfd26 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -580,10 +580,11 @@ (define (mpd-log-rotation config) '()))) (define (mpd-shepherd-service config) - (match-record config (user package shepherd-requirement - log-file playlist-directory - db-file state-file sticker-file - environment-variables) + (match-record config + (user package shepherd-requirement + log-file playlist-directory + db-file state-file sticker-file + environment-variables) (let ((config-file (mpd-serialize-configuration config)) (username (user-account-name user))) (shepherd-service -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 15/17] services: mpd: Provision a default cache directory and set HOME. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28:08 +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.168269208819834 (code B ref 63082); Fri, 28 Apr 2023 14:28:08 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:28:08 +0000 Received: from localhost ([127.0.0.1]:34174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4x-00059Z-6s for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:28:07 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:62758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4Z-00055p-T0 for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:44 -0400 Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-75131c2997bso635580885a.1 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692058; x=1685284058; 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=4MRX8aoiUGdan7giiWUWwNbOOWjzJJvCk+9FJSk+9jo=; b=Uq6S4ltVNquZalgeKpYKTnaeie/wRYKw4VdWRP0vse55iq3RqehifIVdyBPOKwDAgP 49oJ1DHenTfnCir58g8UODDrqiuA+PBq+fnoD4YkBapmG5RKdOfEcZ2G+BxmGTbC2t6G Kx1TcxUsb2DlfDH80AFwBhIfKppTvn0+twtk9u0WUye2stLJJXTwpf5nktfiQBXfvKJx FOUbwCkYgWxIVSBXzKDInchafmQwn/3ifpSLa7ZQxps7hPHUBu27wrKpQoqgpvqZXWHL l6BK/Dic0DHFkuY4zi1FQmfq8LVufPW2um8NqRUwm+VcAChwRN/BTjXCjhg+YLUQ0F9g 4Tpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692058; x=1685284058; 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=4MRX8aoiUGdan7giiWUWwNbOOWjzJJvCk+9FJSk+9jo=; b=MOdm8ubBB+pryMGkX1j6TBhuAcayfTciiCGPMwbEkJtYHyUG0hX5BE0AKlU+JjxQo/ 6zERC75zZS+d0Ucf5nLMBciIGlb/OfkgWZ7tdEmJFScI6U7Az4ShdED/TKC6ybMwlF/3 zFtufKLTtwQvt/D2KgGVk92NYYmRoeh/jJwMEbXQ65aY9mh+y1q/lnzDNCSMNdvSFXl+ u7Db18mZj4w+6CaqcpSXwfwe7iwrfAloLRL7DYDljq4Yh7+amL7wpnf+zBV2JNbd4TCC O1qA4qIuSapcEekgM1mjz0GeZN4BP1QuSfMgvjJDL9GUIxrMmgKi5a8HGK1AYcgenqeU G82w== X-Gm-Message-State: AC+VfDzWRIqnUJ1H7k0K1RHciEDRN+y69XeOJTyMuRrzPLXrZRZngl4S U8RvyUeqKoyLYrlhkSe3RqeVHdfyg3w= X-Google-Smtp-Source: ACHHUZ7LSHb8AxLpm7lrQGVgJsp2Yx7MlMpFTvnx+jDsEuPaP1Fdppr5gMtr7pm2bRSCzeK+0mAxhA== X-Received: by 2002:ad4:5de4:0:b0:5f1:6aa8:cd2d with SMTP id jn4-20020ad45de4000000b005f16aa8cd2dmr9052932qvb.22.1682692058316; Fri, 28 Apr 2023 07:27:38 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:38 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:27:08 -0400 Message-Id: <3baf1982e8435b4a3ef13c050153d505b98fa52a.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . * gnu/services/audio.scm (mpd-shepherd-service): Create a default .cache directory. Use mkdir-p/perms and refactor loop. Set the HOME environment variables. --- doc/guix.texi | 3 +- gnu/services/audio.scm | 76 ++++++++++++++++++++++++++---------------- 2 files changed, 49 insertions(+), 30 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 23f3070f39..9be59f9f02 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33603,7 +33603,8 @@ Audio Services The directory to store playlists. @item @code{db-file} (type: maybe-string) -The location of the music database. +The location of the music database. When left unspecified, +@file{~/.cache/db} is used. @item @code{state-file} (type: maybe-string) The location of the file that stores current MPD's state. diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index f0587b9106..7c577ff73b 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -25,6 +25,7 @@ (define-module (gnu services audio) #:use-module (guix deprecation) #:use-module (guix diagnostics) #:use-module (guix i18n) + #:use-module (guix modules) #:use-module (gnu services) #:use-module (gnu services admin) #:use-module (gnu services configuration) @@ -463,7 +464,8 @@ (define-configuration mpd-configuration (db-file maybe-string - "The location of the music database.") + "The location of the music database. When left unspecified, +@file{~/.cache/db} is used.") (state-file maybe-string @@ -597,34 +599,50 @@ (define (mpd-shepherd-service config) (documentation "Run the MPD (Music Player Daemon)") (requirement `(user-processes loopback ,@shepherd-requirement)) (provision '(mpd)) - (start #~(begin - (let ((user (getpw #$username))) - (for-each - (lambda (x) - ;; Take action on absolute file names, to filter out - ;; the 'syslog' special value. - (when (and x (string-prefix? "/" x) - (not (file-exists? x))) - (mkdir-p x) - (chown x (passwd:uid user) (passwd:gid user)))) - (list #$(maybe-value playlist-directory) - (and=> #$(maybe-value db-file) dirname) - (and=> #$(maybe-value log-file) dirname) - (and=> #$(maybe-value state-file) dirname) - (and=> #$(maybe-value sticker-file) dirname)))) - - (make-forkexec-constructor - (list #$(file-append package "/bin/mpd") - "--no-daemon" - #$config-file) - #: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 - '#$(user-account-supplementary-groups user)))) + (start + (with-imported-modules (source-module-closure + '((gnu build activation))) + #~(begin + (use-modules (gnu build activation)) + + (let ((home #$(user-account-home-directory user))) + (let ((user (getpw #$username)) + (default-cache-dir (string-append home "/.cache"))) + + (define (init-directory directory) + (unless (file-exists? directory) + (mkdir-p/perms directory user #o755))) + + ;; Define a cache location that can be automatically used + ;; for the database file, in case it hasn't been explicitly + ;; specified. + (for-each + init-directory + (cons default-cache-dir + '#$(map dirname + ;; XXX: Delete the potential "syslog" + ;; log-file value, which is not a directory. + (delete "syslog" + (filter-map maybe-value + (list db-file + log-file + state-file + sticker-file))))))) + + (make-forkexec-constructor + (list #$(file-append package "/bin/mpd") "--no-daemon" + #$config-file) + #:environment-variables + ;; Use the system-configured pulse configuration. Set HOME + ;; so MPD can infer default paths, such as for the database + ;; file. + (list (string-append "HOME=" home) + "PULSE_CLIENTCONFIG=/etc/pulse/client.conf" + "PULSE_CONFIG=/etc/pulse/daemon.conf") + #:user #$username + #:group #$(user-account-group user) + #:supplementary-groups + '#$(user-account-supplementary-groups user)))))) (stop #~(make-kill-destructor)) (actions (list (shepherd-configuration-action config-file) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 16/17] services: mpd: Update basic example. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28:09 +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.168269208819849 (code B ref 63082); Fri, 28 Apr 2023 14:28:09 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:28:08 +0000 Received: from localhost ([127.0.0.1]:34178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4x-00059r-RV for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:28:08 -0400 Received: from mail-qv1-f52.google.com ([209.85.219.52]:58420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4b-00055r-9u for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:45 -0400 Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-5ef524eaca1so270386d6.0 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692060; x=1685284060; 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=FxgC/z6CTX0u687CYrXSDmhKMXFUI/C+8Y9wZO+N/6k=; b=IJWlq6caXr1u926zyNjysC5wS4U3p+JPMTMLRX2MGtFjeyAuTy8MzGJllelwyqci2v aIq5PtQbGcRV0qS0hYJKC6B1s/lFsnfW8FJD46jp3SXlrpIgkwKE1hzfUIz09SHzA3d9 2iToi8BJpOzqVAikMuBBEwl/2QPCFSy6M50jW+H/a2V1N+NifsE/SnFF/qAfZxAufZts 9pHrXtsS/laZtAf0B4NYu3vQ7FslVi+G9M7YZM0nDYwgEPYDAG7JNjDQ/i3d7cmn6O+R EroMzZw5dCX8/bm9O8Xix3zHyCZni90VoKW+v0+m+y4TIzdlgTZtK4d0BYF7PdczLgvr 9Aig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692060; x=1685284060; 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=FxgC/z6CTX0u687CYrXSDmhKMXFUI/C+8Y9wZO+N/6k=; b=EwSf4T7yiUvxMQjE98ToGTLY6kTwcs/0QCPBm3t4asl7gQwPvuU8bY+aARxLnEwbfP neco7WixzUelWOin6mYKH3YBW1adxH5s2i9l9kaynXupiNunypAGZkf9J3sN6dwkFmcW 4AGRI+FoAO3r0dd2BguVOk2Jo4ARtZWpJcYzW9Rzkp4exMRQ3j8wUfIIPWlvpo/sljZZ Uar5N2a2r1+MLfMxAJyxZ7ghRakYje+jrAcS2s+sL+mN6L+Rols0PxUFQuIV2II44f+o ADYclj5b1qnujVXpd4uh2KG2xpcxdE0L+RNNedlGZVD1+UGPC6KS11xsZVZnPCARwz4j xWgg== X-Gm-Message-State: AC+VfDwLHkRHXS0CqIajeaQMZKEY1ysvEqnNM/1tmZjJ4U+cZGArgynI 2xvOIPWxIp5fl6OEFWfhBS3mInE/KpU= X-Google-Smtp-Source: ACHHUZ53gMviJtaYYPmGjaboaUrjB7kn1PD8vFfMJNyllvH7LyiM5ySxM6CQGcVREy+SYf7x/d+V1w== X-Received: by 2002:a05:6214:2347:b0:615:29ab:e4a8 with SMTP id hu7-20020a056214234700b0061529abe4a8mr8342644qvb.31.1682692059572; Fri, 28 Apr 2023 07:27:39 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:39 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:27:09 -0400 Message-Id: <7015c07c1ce928e22e4e2f810408d551d62657be.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . * doc/guix.texi (Audio Services): Do not use a deprecated user form; keep the default one. Remove port. Specify a music-directory. Mention the importance of permissions on the music directory. --- doc/guix.texi | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 9be59f9f02..467870e0c4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33536,16 +33536,27 @@ Audio Services being controlled from the local machine or over the network by a variety of clients. -The following example shows how one might run @code{mpd} as user -@code{"bob"} on port @code{6666}. It uses pulseaudio for output. +The following example shows the simplest configuration to locally +expose, via PulseAudio, a music collection kept at @file{/srv/music}, +with @command{mpd} running as the default @samp{mpd} user. This user +will spawn its own PulseAudio daemon, which may compete for the sound +card access with that of your own user. In this configuration, you may +have to stop the playback of your user audio applications to hear MPD's +output and vice-versa. @lisp (service mpd-service-type (mpd-configuration - (user "bob") - (port "6666"))) + (music-directory "/srv/music"))) @end lisp +@quotation Important +The music directory must be readable to the MPD user, by default, +@samp{mpd}. Permission problems will be reported via @samp{Permission +denied} errors in the MPD logs, which appear in @file{/var/log/messages} +by default. +@end quotation + Most MPD clients will trigger a database update upon connecting, but you can also use the @code{update} action do to so: -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 17/17] services: Avoid 'delete' overrides warning in audio module. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 14:28:09 +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.168269208819856 (code B ref 63082); Fri, 28 Apr 2023 14:28:09 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 14:28:08 +0000 Received: from localhost ([127.0.0.1]:34180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4y-0005A6-7f for submit@debbugs.gnu.org; Fri, 28 Apr 2023 10:28:08 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:44206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psP4c-000561-6i for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 10:27:46 -0400 Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-74e1745356dso487519585a.0 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 07:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682692060; x=1685284060; 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=IPriK7LEYlHqtaD5GijGDRqGOR2xpoN0iC+60ny72jw=; b=DlIPXRNC/TsR0YxIBLvi8RHkXVfJpINMZWMYDw34s9MhrYqPBqgnmCfGW0y/W5Dlpk rAaUKuDscwK8xOAfB4XGQ6Jeyi1lONAPnsafq1UjuXN/KVBpeAaWdyK1u1V3fMmyFKhH +PJERe+lIehXYLgx/axlk6X63EbC48VgEtB0HKIxYt3m7mRY9UOtdlzVxFHpgpFnlwFF 63QwBLTypJ9F/GBpRI7/6McTWBgvX8t9xbKmwkGsuAkLCC0HOIgcN8L997S4FF8y3Cdn yXHhb9FHc3hB5NlL23BFJqmM8dasMsrBtMbivRbVLi+Vtsko5qdaSr60ZC5Tm/Ksdyop m5tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682692060; x=1685284060; 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=IPriK7LEYlHqtaD5GijGDRqGOR2xpoN0iC+60ny72jw=; b=JqmlEaHoIIHKlSvjIGiPkkG1LK75HwYSKKodgIo68npGGCUUDS5/dGFSj0l1c5iwS5 QtTVYep1roIdgOz3G82tuBwASGFJgwqVwPkiMScW/3aUzVaPKOdO/7042+Tq7Chdxo3R 5/x1NUwBT3bPPscNYvo8scH9hG142vPaOCQz9mxw3gbPoT1kHrOMX1Px1TlT2JbqjY13 +mTnHahB1M71+0mxdXrS5mUTppvhjrYZnWZsn0CLGJ8GTAHAPcsOQiZacJQfKZto9odF /QfgWRq/yXp3vTCV1mHjIezNhO/ilwjGamSNGykzEJnoTxEkonosYVDTJBf6h9C3QaaI 1IIg== X-Gm-Message-State: AC+VfDzBtpffSh/q63qpvp8fG2OpGXTH6N8ez/EI67b0mWBCGy6YUEjQ Gf2DRVXp5ZcNkh4xTd86B+YXNfn/1Ok= X-Google-Smtp-Source: ACHHUZ71TjXYZ9Ergh9cxM/3K3mSt5K9zZ4o8eaRz8ilRR0LNxP52V346PW0c67URLTDXnNQBYlGYw== X-Received: by 2002:a05:6214:e6c:b0:570:ccb9:a4d0 with SMTP id jz12-20020a0562140e6c00b00570ccb9a4d0mr8719229qvb.16.1682692060672; Fri, 28 Apr 2023 07:27:40 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:27:40 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 28 Apr 2023 10:27:10 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm: Hide 'delete' on (gnu services) import. --- gnu/services/audio.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 7c577ff73b..40db31335e 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -26,7 +26,7 @@ (define-module (gnu services audio) #:use-module (guix diagnostics) #:use-module (guix i18n) #:use-module (guix modules) - #:use-module (gnu services) + #:use-module ((gnu services) #:hide (delete)) #:use-module (gnu services admin) #:use-module (gnu services configuration) #:use-module (gnu services shepherd) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 21:51:01 +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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.16827186279128 (code B ref 63082); Fri, 28 Apr 2023 21:51:01 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 21:50:27 +0000 Received: from localhost ([127.0.0.1]:34675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psVz0-0002NA-N3 for submit@debbugs.gnu.org; Fri, 28 Apr 2023 17:50:27 -0400 Received: from smtpmciv1.myservices.hosting ([185.26.107.237]:37698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psVyy-0002N1-Iv for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 17:50:25 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv1.myservices.hosting (Postfix) with ESMTP id 18D0E20C19; Fri, 28 Apr 2023 23:50:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 9D36A80097; Fri, 28 Apr 2023 23:50:19 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id o7a48F_DV_fQ; Fri, 28 Apr 2023 23:50:19 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 010DA80060; Fri, 28 Apr 2023 23:50:18 +0200 (CEST) Message-ID: <0f027280-0cf3-dd82-3ec1-3bffddc638c0@makinata.eu> Date: Fri, 28 Apr 2023 22:50:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: From: Bruno Victal In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 2023-04-28 15:26, Maxim Cournoyer wrote: > Prior to this change, there was a discrepancy where a user could have > disagreeing groups between the group and user fields (the user field being a > record, which includes its primary group as a string). This > could have caused problems because the USER's group was being used to set the > file permissions, while the GROUP name was serialized to MPD's configuration, > and MPD would use it to set the group of its running process. Synchronizing > both is not practical, as it can easily lead to slightly different > objects conflicting, again causing problems. > > The compromise is to obsolete the 'group' field. A group can still be > configured via the 'user' field, which accepts a object, with > the limitation that the group should already exist. > > * gnu/services/audio.scm (%lazy-group): Delete variable. > (%set-user-group): Delete procedure. > (mpd-serialize-user-group): Likewise. > (%mpd-user) [group]: Default to "audio". > (%mpd-group): Delete variable. > (mpd-group-sanitizer, mympd-group-sanitizer): Adjust sanitizers. > (mpd-configuration, mympd-configuration) [group]: Default to #f. Update doc. > (mpd-accounts, mympd-accounts): Remove group. > (%mympd-user) [group]: Default to "nogroup". > * doc/guix.texi: Regenerate doc. > --- > doc/guix.texi | 15 ++++---- > gnu/services/audio.scm | 80 ++++++++++++------------------------------ > 2 files changed, 28 insertions(+), 67 deletions(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index f8acdbd6b5..34703b1698 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -33571,8 +33571,8 @@ Audio Services > @item @code{user} (type: user-account) > The user to run mpd as. > > -@item @code{group} (type: user-group) > -The group to run mpd as. > +@item @code{group} (default: @code{#f}) (type: boolean) > +Obsolete. Do not use. [...] > > @item @code{shepherd-requirement} (default: @code{()}) (type: list-of-symbol) > This is a list of symbols naming Shepherd services that this service > @@ -33824,15 +33824,12 @@ Audio Services > This is a list of symbols naming Shepherd services that this service > will depend on. > > -@item @code{user} (default: @code{%mympd-user}) (type: user-account) > +@item @code{user} (type: user-account) > Owner of the @command{mympd} process. > > -The default @code{%mympd-user} is a system user with the name ``mympd'', > -who is a part of the group @var{group} (see below). > -@item @code{group} (default: @code{%mympd-group}) (type: user-group) > -Owner group of the @command{mympd} process. > +@item @code{group} (default: @code{#f}) (type: boolean) > +Obsolete. Do not use. I'd skip documenting obsolete fields. > > -The default @code{%mympd-group} is a system group with name ``mympd''. > @item @code{work-directory} (default: @code{"/var/lib/mympd"}) (type: string) > Where myMPD will store its data. > > @@ -33872,7 +33869,7 @@ Audio Services > Override URI to myMPD. See > @uref{https://github.com/jcorporation/myMPD/issues/950}. > > -@item @code{script-acl} (default: @code{(mympd-ip-acl (allow '("127.0.0.1")))}) (type: maybe-mympd-ip-acl) > +@item @code{script-acl} (type: maybe-mympd-ip-acl) > ACL to access the myMPD script backend. Unrelated change? > (define mpd-deprecated-fields '((music-dir . music-directory) > @@ -242,15 +224,9 @@ (define (mpd-user-sanitizer value) > (configuration-field-error #f 'user value)))) > > (define (mpd-group-sanitizer value) > - (cond ((user-group? value) value) > - ((string? value) > - (warning (G_ "string value for 'group' is deprecated, use \ > -user-group instead~%")) > - (user-group > - (inherit %mpd-group) > - (name value))) > - (else > - (configuration-field-error #f 'group value)))) > + (when value > + (warning (G_ "'group' in is obsolete; ignoring~%"))) > + #f) You can drop the trailing #f I think. > > ;;; > > @@ -407,9 +383,10 @@ (define-configuration mpd-configuration > (sanitizer mpd-user-sanitizer)) > > (group > - (user-group %mpd-group) > - "The group to run mpd as." > - (sanitizer mpd-group-sanitizer)) > + (boolean #f) > + "Obsolete. Do not use." > + (sanitizer mpd-group-sanitizer) > + (serializer empty-serializer)) You can simply use empty-serializer after (or before) sanitizer, it is a recognized literal for define-configuration. > > (define (mympd-group-sanitizer value) > - (cond ((user-group? value) value) > - ((string? value) > - (warning (G_ "string value for 'group' is not supported, use \ > -user-group instead~%")) > - (user-group > - (inherit %mympd-group) > - (name value))) > - (else > - (configuration-field-error #f 'group value)))) > + (when value > + (warning (G_ "'group' in is obsolete; ignoring~%"))) > + #f) Trailing #f as mentioned above. > @@ -737,10 +704,10 @@ (define-configuration/no-serialization mympd-configuration > empty-serializer) > > (group > - (user-group %mympd-group) > - "Owner group of the @command{mympd} process." > + (boolean #f) > + "Obsolete. Do not use." > (sanitizer mympd-group-sanitizer) > - empty-serializer) > + (serializer empty-serializer)) empty-serializer is a literal here. (although it's simply being used for indication per the comment above this record-type) > > (work-directory > (string "/var/lib/mympd") > @@ -904,12 +871,9 @@ (define (mympd-shepherd-service config) > (stop #~(make-kill-destructor)))))) > > (define (mympd-accounts config) > - (match-record config (user group) > - ;; TODO: Deprecation code, to be removed. > - (let ((user (if (eq? (user-account-group user) %lazy-group) > - (set-user-group user group) > - user))) > - (list user group)))) > + (match-record config > + (user) > + (list user))) Nitpick, personally I'm a fan of styling this part as: --8<---------------cut here---------------start------------->8--- (match-record config (user) (list user)) --8<---------------cut here---------------end--------------->8--- From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 06/17] services: mympd: Fix log file name. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 21:54:01 +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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.16827188209698 (code B ref 63082); Fri, 28 Apr 2023 21:54:01 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 21:53:40 +0000 Received: from localhost ([127.0.0.1]:34679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psW28-0002WM-Ih for submit@debbugs.gnu.org; Fri, 28 Apr 2023 17:53:40 -0400 Received: from smtpmciv2.myservices.hosting ([185.26.107.238]:35546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psW26-0002WE-Hu for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 17:53:39 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv2.myservices.hosting (Postfix) with ESMTP id B4E2620D10; Fri, 28 Apr 2023 23:53:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 5E2F480097; Fri, 28 Apr 2023 23:53:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id oRpKL2NmaUMN; Fri, 28 Apr 2023 23:53:37 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id ED8DE80060; Fri, 28 Apr 2023 23:53:36 +0200 (CEST) Message-ID: <987f5bb4-88e0-6f3f-e941-0cbdfd8775a5@makinata.eu> Date: Fri, 28 Apr 2023 22:53:36 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: <878098810429d25922de0be323fae83b5a92e616.1682690696.git.maxim.cournoyer@gmail.com> From: Bruno Victal In-Reply-To: <878098810429d25922de0be323fae83b5a92e616.1682690696.git.maxim.cournoyer@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 2023-04-28 15:26, Maxim Cournoyer wrote: > * gnu/services/audio.scm (mympd-configuration): Adjust log file name to match > documentation. > --- > gnu/services/audio.scm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm > index 1dc3204fc0..0b7a25d9ef 100644 > --- a/gnu/services/audio.scm > +++ b/gnu/services/audio.scm > @@ -744,7 +744,7 @@ (define-configuration/no-serialization mympd-configuration > "How much detail to include in logs, possible values: @code{0} to @code{7}.") > > (log-to > - (string-or-symbol "/var/log/mympd/log") > + (string-or-symbol "/var/log/mympd.log") > "Where to send logs. By default, the service logs to > @file{/var/log/mympd.log}. The alternative is @code{'syslog}, which > sends output to the running syslog service under the @samp{daemon} facility." No, this is correct although perhaps /var/log/mympd/mympd.log would have been less error prone? IIRC mympd is supposed to write to a subdirectory within /var/log and this change would break the service. From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 07/17] services: mpd: Log to syslog by default. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 22:03:01 +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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168271936310952 (code B ref 63082); Fri, 28 Apr 2023 22:03:01 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 22:02:43 +0000 Received: from localhost ([127.0.0.1]:34683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psWAq-0002qW-IY for submit@debbugs.gnu.org; Fri, 28 Apr 2023 18:02:43 -0400 Received: from smtpm3.myservices.hosting ([185.26.105.234]:53460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psWAa-0002q6-8f for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 18:02:37 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id 87A8120ECA; Sat, 29 Apr 2023 00:02:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 28ADE80097; Sat, 29 Apr 2023 00:02:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id qFSBvXtAj6oJ; Sat, 29 Apr 2023 00:02:21 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id B8EF480060; Sat, 29 Apr 2023 00:02:21 +0200 (CEST) Message-ID: <93e9013b-561a-0549-bf84-9752796e5c4a@makinata.eu> Date: Fri, 28 Apr 2023 23:02:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: <44c9a5cf9836a71db9bf78c2eba005a40a006fff.1682690696.git.maxim.cournoyer@gmail.com> From: Bruno Victal In-Reply-To: <44c9a5cf9836a71db9bf78c2eba005a40a006fff.1682690696.git.maxim.cournoyer@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 2023-04-28 15:27, Maxim Cournoyer wrote: > Rationale: the tristate value was awkward to deal with, the default log file > name was odd (/var/log/mpd/log) and it required special attention to create > the 'mpd' parent directory as root and chowning it to the MPD user. It also > didn't match the default behavior of MPD, which is to log to systemd or syslog > unless a log file is specified. > > * gnu/services/audio.scm (mpd-log-file-sanitizer): New procedure. > (mpd-configuration) [log-file]: Remove default maybe value. Add sanitizer. > (mpd-shepherd-service): Validate the log file parent directory exists and has > the right permissions. > * doc/guix.texi (Audio Services): Update doc. How about a similar approach taken in mympd for handling the logging parameter? In any case, I'd like to remind you that mpd-service-type also has a rottlog service extension so that also needs to be taken into account. > (log-level > maybe-string > @@ -563,17 +573,18 @@ (define (mpd-shepherd-service config) > (requirement `(user-processes loopback ,@shepherd-requirement)) > (provision '(mpd)) > (start #~(begin > - (and=> #$(maybe-value log-file) > - (compose mkdir-p dirname)) > - > (let ((user (getpw #$username))) > (for-each > (lambda (x) > - (when (and x (not (file-exists? x))) > + ;; Take action on absolute file names, to filter out > + ;; the 'syslog' special value. > + (when (and x (string-prefix? "/" x) > + (not (file-exists? x))) > (mkdir-p x) > (chown x (passwd:uid user) (passwd:gid user)))) I'd use mkdir-p/perms from (gnu build activation) instead. From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 09/17] services: mpd: Let Shepherd effect the user/group change. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 22:12:01 +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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168271989511884 (code B ref 63082); Fri, 28 Apr 2023 22:12:01 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 22:11:35 +0000 Received: from localhost ([127.0.0.1]:34688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psWJS-00035b-Va for submit@debbugs.gnu.org; Fri, 28 Apr 2023 18:11:35 -0400 Received: from smtpm1.myservices.hosting ([185.26.105.232]:54678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psWJO-00035P-Fg for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 18:11:33 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm1.myservices.hosting (Postfix) with ESMTP id 2EF22201C1; Sat, 29 Apr 2023 00:11:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id C8F8180097; Sat, 29 Apr 2023 00:11:28 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id oYgEHA7MVRHf; Sat, 29 Apr 2023 00:11:28 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id E32F680060; Sat, 29 Apr 2023 00:11:27 +0200 (CEST) Message-ID: Date: Fri, 28 Apr 2023 23:11:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: <70d3c80ef59f9519a69218c504e72c4c836a6ab1.1682690696.git.maxim.cournoyer@gmail.com> From: Bruno Victal In-Reply-To: <70d3c80ef59f9519a69218c504e72c4c836a6ab1.1682690696.git.maxim.cournoyer@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 2023-04-28 15:27, Maxim Cournoyer wrote: > Relates to . > > Quoting a MPD developer, regarding MPD's feature to switch user itself: > "that's legacy for the dark ages when proper service managers did not exist" > :-). > > * gnu/services/audio.scm (mpd-serialize-user-account) > (mpd-serialize-user-group): Delete procedures. > * gnu/services/audio.scm (mpd-configuration) [user]: Do not serialize. > [group]: Likewise. > (mpd-shepherd-service): Provide the #:user, #:group and #:supplementary-groups > arguments. > (mympd-shepherd-service): Likewise, and remove the '--user' argument. > * doc/guix.texi (Audio Services): Decorate mpd with @command. > --- > doc/guix.texi | 4 ++-- > gnu/services/audio.scm | 31 ++++++++++++++++++++++--------- > 2 files changed, 24 insertions(+), 11 deletions(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index a71a05bcf3..19320c2185 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -33569,7 +33569,7 @@ Audio Services > The MPD package. > > @item @code{user} (type: user-account) > -The user to run mpd as. > +The user to run @command{mpd} as. > > @item @code{group} (default: @code{#f}) (type: boolean) > Obsolete. Do not use. > @@ -33612,7 +33612,7 @@ Audio Services > The location of the sticker database. > > @item @code{default-port} (default: @code{6600}) (type: maybe-port) > -The default port to run mpd on. > +The default port to run @command{mpd} on. > > @item @code{endpoints} (type: maybe-list-of-strings) > The addresses that mpd will bind to. A port different from > diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm > index cccf5c2693..550ccc542c 100644 > --- a/gnu/services/audio.scm > +++ b/gnu/services/audio.scm > @@ -3,6 +3,7 @@ > ;;; Copyright © 2019 Ricardo Wurmus > ;;; Copyright © 2020 Ludovic Courtès > ;;; Copyright © 2022⁠–⁠2023 Bruno Victal > +;;; Copyright © 2023 Maxim Cournoyer > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -164,9 +165,6 @@ (define mpd-serialize-boolean mpd-serialize-field) > (define (mpd-serialize-list-of-strings field-name value) > #~(string-append #$@(map (cut mpd-serialize-string field-name <>) value))) > > -(define (mpd-serialize-user-account field-name value) > - (mpd-serialize-string field-name (user-account-name value))) > - > (define-maybe string (prefix mpd-)) > (define-maybe list-of-strings (prefix mpd-)) > (define-maybe boolean (prefix mpd-)) > @@ -387,10 +385,14 @@ (define-configuration mpd-configuration > "The MPD package." > empty-serializer) > > + ;; Note: The user and its group are not serialized, otherwise MPD would > + ;; attempt to switch the user/group itself. The task of switching the > + ;; user/group is left to Shepherd instead. > (user > (user-account %mpd-user) > - "The user to run mpd as." > - (sanitizer mpd-user-sanitizer)) > + "The user to run @command{mpd} as." > + (sanitizer mpd-user-sanitizer) > + (serializer empty-serializer)) Simply write empty-serializer after sanitizer instead. > "--cachedir" #$cache-directory) > #:environment-variables (list #$log-level*) > - #:log-file #$(if (string? log-to) log-to #f)))) > + #:log-file #$(if (string? log-to) log-to #f) Generic advice but how about this instead? --8<---------------cut here---------------start------------->8--- #$@(if (string? log-to) `(#:log-file ,log-to) '()) --8<---------------cut here---------------end--------------->8--- It's cleaner to not explicitly set the keyword argument values when they're not used. From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 14/17] services: mpd: Obsolete 'environment-variables' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 22:18:01 +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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168272025612616 (code B ref 63082); Fri, 28 Apr 2023 22:18:01 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 22:17:36 +0000 Received: from localhost ([127.0.0.1]:34692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psWPH-0003HQ-VM for submit@debbugs.gnu.org; Fri, 28 Apr 2023 18:17:36 -0400 Received: from smtpmciv5.myservices.hosting ([185.26.107.241]:35152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psWPF-0003HF-EP for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 18:17:34 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv5.myservices.hosting (Postfix) with ESMTP id 3727220DDF; Sat, 29 Apr 2023 00:17:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id D838980097; Sat, 29 Apr 2023 00:17:28 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id e-rfh985Kdqt; Sat, 29 Apr 2023 00:17:28 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 66DD180060; Sat, 29 Apr 2023 00:17:28 +0200 (CEST) Message-ID: <2fabf610-5256-dad1-0e62-449fbcc738f0@makinata.eu> Date: Fri, 28 Apr 2023 23:17:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: <16e06b4b2a932a7c48696fcc1b89c5a454dc9d2b.1682690696.git.maxim.cournoyer@gmail.com> From: Bruno Victal In-Reply-To: <16e06b4b2a932a7c48696fcc1b89c5a454dc9d2b.1682690696.git.maxim.cournoyer@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 2023-04-28 15:27, Maxim Cournoyer wrote: > 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. > --- This field shouldn't be deprecated as one of it's primary purposes is to allow for the pulseaudio daemon configuration to be set to another one. What you're doing here is effectively hardcoding the pulseaudio configuration. I'd consider this field to be within the same category as 'shepherd-requirement', it's for flexibility. > 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 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 15/17] services: mpd: Provision a default cache directory and set HOME. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Apr 2023 22:23:01 +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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168272055913220 (code B ref 63082); Fri, 28 Apr 2023 22:23:01 +0000 Received: (at 63082) by debbugs.gnu.org; 28 Apr 2023 22:22:39 +0000 Received: from localhost ([127.0.0.1]:34696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psWUA-0003R9-RU for submit@debbugs.gnu.org; Fri, 28 Apr 2023 18:22:39 -0400 Received: from smtpm5.myservices.hosting ([185.26.105.236]:42432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psWU6-0003Qu-Oo for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 18:22:38 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm5.myservices.hosting (Postfix) with ESMTP id 96AA920CBA; Sat, 29 Apr 2023 00:22:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 3256580097; Sat, 29 Apr 2023 00:22:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id DtVg3FWTlF87; Sat, 29 Apr 2023 00:22:32 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id AE2A680060; Sat, 29 Apr 2023 00:22:32 +0200 (CEST) Message-ID: <0c936b06-75a8-1946-2c24-e4782e7ee377@makinata.eu> Date: Fri, 28 Apr 2023 23:22:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: <3baf1982e8435b4a3ef13c050153d505b98fa52a.1682690696.git.maxim.cournoyer@gmail.com> From: Bruno Victal In-Reply-To: <3baf1982e8435b4a3ef13c050153d505b98fa52a.1682690696.git.maxim.cournoyer@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 2023-04-28 15:27, Maxim Cournoyer wrote: > Relates to . > > * gnu/services/audio.scm (mpd-shepherd-service): Create a default .cache > directory. Use mkdir-p/perms and refactor loop. Set the HOME environment > variables. There's a slight problem here, you might really not want db_file to be set _at all_. Case in point, I use a database-plugin instead which would be incongruent if db_file is forcibly serialized into the config. Perhaps we could add some kind of warning mechanism that alerts the user that either db_file or database-plugin must be configured? From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 01:16: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@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.1682730927747 (code B ref 63082); Sat, 29 Apr 2023 01:16:02 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 01:15:27 +0000 Received: from localhost ([127.0.0.1]:34745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psZBO-0000By-UA for submit@debbugs.gnu.org; Fri, 28 Apr 2023 21:15:27 -0400 Received: from mail-qv1-f49.google.com ([209.85.219.49]:51336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psZBJ-0000Bd-Se for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 21:15:25 -0400 Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-5ef4d902708so6264746d6.2 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 18:15:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682730916; x=1685322916; h=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=4EjAI5qW/BZtuPXZ/Fl6gBJIylNRC8NyzdsqjBXAuSE=; b=guNoALVYLz3gKkt0vJQmbCpFPh5LPTEpE82RNq3pvOQi+1gVB2JXRXQxws+MSCzDil F9ji1KW1xed378vrxsS2wqJ7smNBjZKZ1ODg3hyhwqeu5qh5xQ7SW5AFmkJCafT7Fo5g xrBT5ByrjurzRD8ghGAA43kkge2Vo+HOKfnK0qLJMC1CNZ+PSyWQa/4wI28iRUROSLnM ggv2ZCxJ6OYxqyIb9gY6NT7EF2oBJAjEtycooO/YDUoTqgGZ4me711/mwoN0Om1YWklW Oyw/1YlhZ/O6iTvgMZY9Q+LXLn4VPZLSqaY31v/ea0Vyl60iXFur7EiU2JJowLwlj5/m AHEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682730916; x=1685322916; h=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=4EjAI5qW/BZtuPXZ/Fl6gBJIylNRC8NyzdsqjBXAuSE=; b=HOTPzM6Nu9aLzT5L8eimMP0Mtx9f1DEn56tIWVS+E0EHu1hytql9D7E084MoBYgRdD lqqNDs6lP0rfYNG42yL5WqV+cgAD6CSL//2W1rnltgecxsLkWIgGTCTB9uVE5xYr6wu6 tA1Js5b4Yzj8aiq0R6KbbLyIttXR2hugqj3DEzdSHjTzBXPvUk2o77zpvs06Antp8AnJ pAWjG0kDa3cyilzPBHe7Wi9m5aR8nkp8CUYdk3Tu1UGay0qI8TmD658+95x9xl++y8NL iexqKqGWCtiXQDEScx7ME8W/zc273/0xWpJzS8UMbop/fE1pH0WvH7Df5+ESi4n/IuaY xyQg== X-Gm-Message-State: AC+VfDxPK5llmeR9h30bxIngshT6H7vv45N77uXlc0Md+7jJE2muYM6h Dee6aOPXpOIGCvKdDzU36ZYpGwbCabaswA== X-Google-Smtp-Source: ACHHUZ5TbWgdY1TUxQqvpYlSs3n79xdAyu7ssAQRUusb0Hf/1c1ShTFG1+bapYiahT0hzSP5T1xyeA== X-Received: by 2002:a05:6214:21e4:b0:5fa:8692:3882 with SMTP id p4-20020a05621421e400b005fa86923882mr11862862qvj.16.1682730915772; Fri, 28 Apr 2023 18:15:15 -0700 (PDT) Received: from hurd (dsl-157-4.b2b2c.ca. [66.158.157.4]) by smtp.gmail.com with ESMTPSA id u17-20020a0cdd11000000b006166a6c62cesm2046949qvk.69.2023.04.28.18.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 18:15:15 -0700 (PDT) From: Maxim Cournoyer References: <0f027280-0cf3-dd82-3ec1-3bffddc638c0@makinata.eu> Date: Fri, 28 Apr 2023 21:15:14 -0400 In-Reply-To: <0f027280-0cf3-dd82-3ec1-3bffddc638c0@makinata.eu> (Bruno Victal's message of "Fri, 28 Apr 2023 22:50:18 +0100") Message-ID: <87sfcja3q5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Bruno Victal writes: [...] >> @item @code{shepherd-requirement} (default: @code{()}) (type: list-of-symbol) >> This is a list of symbols naming Shepherd services that this service >> @@ -33824,15 +33824,12 @@ Audio Services >> This is a list of symbols naming Shepherd services that this service >> will depend on. >> >> -@item @code{user} (default: @code{%mympd-user}) (type: user-account) >> +@item @code{user} (type: user-account) >> Owner of the @command{mympd} process. >> >> -The default @code{%mympd-user} is a system user with the name ``mympd'', >> -who is a part of the group @var{group} (see below). >> -@item @code{group} (default: @code{%mympd-group}) (type: user-group) >> -Owner group of the @command{mympd} process. >> +@item @code{group} (default: @code{#f}) (type: boolean) >> +Obsolete. Do not use. > > I'd skip documenting obsolete fields. 'define-configuration' doesn't allow me to skip documenting a field, I think :-). >> >> -The default @code{%mympd-group} is a system group with name ``mympd''. >> @item @code{work-directory} (default: @code{"/var/lib/mympd"}) (type: string) >> Where myMPD will store its data. >> >> @@ -33872,7 +33869,7 @@ Audio Services >> Override URI to myMPD. See >> @uref{https://github.com/jcorporation/myMPD/issues/950}. >> >> -@item @code{script-acl} (default: @code{(mympd-ip-acl (allow >> '("127.0.0.1")))}) (type: maybe-mympd-ip-acl) >> +@item @code{script-acl} (type: maybe-mympd-ip-acl) >> ACL to access the myMPD script backend. > > Unrelated change? >From the generated doc, which was probably lagging behind the source. >> (define mpd-deprecated-fields '((music-dir . music-directory) >> @@ -242,15 +224,9 @@ (define (mpd-user-sanitizer value) >> (configuration-field-error #f 'user value)))) >> >> (define (mpd-group-sanitizer value) >> - (cond ((user-group? value) value) >> - ((string? value) >> - (warning (G_ "string value for 'group' is deprecated, use \ >> -user-group instead~%")) >> - (user-group >> - (inherit %mpd-group) >> - (name value))) >> - (else >> - (configuration-field-error #f 'group value)))) >> + (when value >> + (warning (G_ "'group' in is obsolete; ignoring~%"))) >> + #f) > > You can drop the trailing #f I think. You are right that I could, but I prefer to leave it, as sanitizer should return a value compatible with their field declared type. >> >> ;;; >> >> @@ -407,9 +383,10 @@ (define-configuration mpd-configuration >> (sanitizer mpd-user-sanitizer)) >> >> (group >> - (user-group %mpd-group) >> - "The group to run mpd as." >> - (sanitizer mpd-group-sanitizer)) >> + (boolean #f) >> + "Obsolete. Do not use." >> + (sanitizer mpd-group-sanitizer) >> + (serializer empty-serializer)) > > You can simply use empty-serializer after (or before) sanitizer, it is > a recognized literal for define-configuration. I was under the impression that form had been deprecated; per (gnu services configuration), around line 217: --8<---------------cut here---------------start------------->8--- (warning #f (G_ "specifying serializers after documentation is \ deprecated, use (serializer ~a) instead~%") (syntax->datum #'proc)) --8<---------------cut here---------------end--------------->8--- [...] >> (work-directory >> (string "/var/lib/mympd") >> @@ -904,12 +871,9 @@ (define (mympd-shepherd-service config) >> (stop #~(make-kill-destructor)))))) >> >> (define (mympd-accounts config) >> - (match-record config (user group) >> - ;; TODO: Deprecation code, to be removed. >> - (let ((user (if (eq? (user-account-group user) %lazy-group) >> - (set-user-group user group) >> - user))) >> - (list user group)))) >> + (match-record config >> + (user) >> + (list user))) > > Nitpick, personally I'm a fan of styling this part as: > > (match-record config (user) > (list user)) > Can't; it'd format this way in Emacs: --8<---------------cut here---------------start------------->8--- (match-record config (user) (list user)) --8<---------------cut here---------------end--------------->8--- -- Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 06/17] services: mympd: Fix log file name. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 01:50: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@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.16827329694255 (code B ref 63082); Sat, 29 Apr 2023 01:50:02 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 01:49:29 +0000 Received: from localhost ([127.0.0.1]:34781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psZiK-00016Z-QB for submit@debbugs.gnu.org; Fri, 28 Apr 2023 21:49:29 -0400 Received: from mail-qv1-f50.google.com ([209.85.219.50]:49173) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psZiI-00016L-Kv for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 21:49:27 -0400 Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-5ef6b757a60so3332146d6.2 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 18:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682732960; x=1685324960; h=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=/iRgSIOHde6EiC7tINtDoGVtN3Kg49u9FK8mzCye5G8=; b=f1hAAE7jjysHqK7I7ZxDXW7W6Pc6w8//6XPurPlde3B2yg5WyXWx58nKGUsH6/J1U8 5eekP3Mnx/L7iZi7NZGEtUe9ZFTZi7EqDsZV0554EwKY+K2OrkTuQkgtG7BWeOzjgMDi qtYhjAuGNPLCD/g6li5fbgGwOLbznOxq9RklLtd2tn214on2EA7IqiirGcIxZL3xC8hU fDffKZenLKR/khIqOS6XgRlut/FukYm2q8qHn/qXsjo2enTC/D1QkBo2J7CXmbAK/6Mu RTsZAoubw0RtJu3bOhu7TbdXLn9KdWWXIt3ovmlWKtNUOrCBNUEk4u36ChZ7Eyel21xP KqoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682732960; x=1685324960; h=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=/iRgSIOHde6EiC7tINtDoGVtN3Kg49u9FK8mzCye5G8=; b=BdHKILwvqehjGMSVeR4utZ06BoSLvKn6SUFW7DaAb/Yz2GgInXnk7q7grsME2KJ0M1 P7iWW9Dq3FjpZ+V/Hg5yr44wnZsp7i1acimKezGtAQ5aF/f8tAJMsLDpfyZlRpEEQgqS MFKmermpCbp+kjdHXU2zLc+nczDgZvRZWRv5El304VkoTy/ISYLXZivhnFsJIGPNWiGN RRjgonEtdul+ljXe1baXICGEZYHG9ejrJvVq5XJ+tX/dapP3se4lWemmcjeayibfD7BK JbI7mZlj2C1fhvkaPMh8RIC4t6x2MUCWEpUTH+EFCeCCwEYxzpqKGq/QvlVgsM07OhNy YZmQ== X-Gm-Message-State: AC+VfDz+XPvGuLppvJxb4bTo9mzoUcRhVx0gvYT1+kOr1J1rVgIimaXq t0njyBrtJbUTixryZJzdVuSOHOEsptGiFA== X-Google-Smtp-Source: ACHHUZ6ZE6oWMfxh8LM597W+6U++mSsXySW6/xMN/EgYdg10lj0ITOFsBdD+DAUpOeaw3XzfuLg3QQ== X-Received: by 2002:ad4:5be8:0:b0:5e8:e6ac:594e with SMTP id k8-20020ad45be8000000b005e8e6ac594emr11064995qvc.29.1682732960113; Fri, 28 Apr 2023 18:49:20 -0700 (PDT) Received: from hurd (dsl-157-4.b2b2c.ca. [66.158.157.4]) by smtp.gmail.com with ESMTPSA id r7-20020a0ce287000000b00606750abaf9sm6005902qvl.136.2023.04.28.18.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 18:49:19 -0700 (PDT) From: Maxim Cournoyer References: <878098810429d25922de0be323fae83b5a92e616.1682690696.git.maxim.cournoyer@gmail.com> <987f5bb4-88e0-6f3f-e941-0cbdfd8775a5@makinata.eu> Date: Fri, 28 Apr 2023 21:49:18 -0400 In-Reply-To: <987f5bb4-88e0-6f3f-e941-0cbdfd8775a5@makinata.eu> (Bruno Victal's message of "Fri, 28 Apr 2023 22:53:36 +0100") Message-ID: <87o7n7a25d.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Bruno Victal writes: > On 2023-04-28 15:26, Maxim Cournoyer wrote: >> * gnu/services/audio.scm (mympd-configuration): Adjust log file name to match >> documentation. >> --- >> gnu/services/audio.scm | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm >> index 1dc3204fc0..0b7a25d9ef 100644 >> --- a/gnu/services/audio.scm >> +++ b/gnu/services/audio.scm >> @@ -744,7 +744,7 @@ (define-configuration/no-serialization mympd-configuration >> "How much detail to include in logs, possible values: @code{0} to @code{7}.") >> >> (log-to >> - (string-or-symbol "/var/log/mympd/log") >> + (string-or-symbol "/var/log/mympd.log") >> "Where to send logs. By default, the service logs to >> @file{/var/log/mympd.log}. The alternative is @code{'syslog}, which >> sends output to the running syslog service under the @samp{daemon} facility." > > No, this is correct although perhaps /var/log/mympd/mympd.log would have been less error prone? > IIRC mympd is supposed to write to a subdirectory within /var/log and > this change would break the service. The only consumer of a 'log-to' is Shepherd, as far as I can see; so mympd doesn't get to know where the log is going (its output goes to stdout/stderr, captured by Shepherd), so shouldn't be writing anything under /var/log/mympd. Looking at upstream, they ship a fancy systemd service which wouldn't log to text files but to the journal, closer in spirit to syslog. For symmetry with mpd, I've now adjusted logging of mympd to default to syslog (and found it had an erroneous requirement on 'syslog rather than syslogd with the test :-)). -- Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 06/17] services: mympd: Fix log file name. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 01:57:01 +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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.16827333865436 (code B ref 63082); Sat, 29 Apr 2023 01:57:01 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 01:56:26 +0000 Received: from localhost ([127.0.0.1]:34785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psZp3-0001Pc-Mr for submit@debbugs.gnu.org; Fri, 28 Apr 2023 21:56:25 -0400 Received: from smtpmciv1.myservices.hosting ([185.26.107.237]:54868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psZoy-0001PN-Fa for 63082@debbugs.gnu.org; Fri, 28 Apr 2023 21:56:24 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv1.myservices.hosting (Postfix) with ESMTP id C412E20BFC; Sat, 29 Apr 2023 03:56:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 6D83380097; Sat, 29 Apr 2023 03:56:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fM09AJNz8rYy; Sat, 29 Apr 2023 03:56:18 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 10F6580060; Sat, 29 Apr 2023 03:56:17 +0200 (CEST) Message-ID: <25f73db2-1291-be3a-cef3-7a196b4caee6@makinata.eu> Date: Sat, 29 Apr 2023 02:56:17 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: <878098810429d25922de0be323fae83b5a92e616.1682690696.git.maxim.cournoyer@gmail.com> <987f5bb4-88e0-6f3f-e941-0cbdfd8775a5@makinata.eu> <87o7n7a25d.fsf@gmail.com> From: Bruno Victal In-Reply-To: <87o7n7a25d.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 2023-04-29 02:49, Maxim Cournoyer wrote: >> No, this is correct although perhaps /var/log/mympd/mympd.log would have been less error prone? >> IIRC mympd is supposed to write to a subdirectory within /var/log and >> this change would break the service. > > The only consumer of a 'log-to' is Shepherd, as far as I can see; so > mympd doesn't get to know where the log is going (its output goes to > stdout/stderr, captured by Shepherd), so shouldn't be writing anything > under /var/log/mympd. Looking at upstream, they ship a fancy systemd > service which wouldn't log to text files but to the journal, closer in > spirit to syslog. Oh you're right, I must have been misremembering this. > For symmetry with mpd, I've now adjusted logging of mympd to default to > syslog (and found it had an erroneous requirement on 'syslog rather than > syslogd with the test :-)). > Nice! From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 06:27:01 +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: Maxim Cournoyer , 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.16827495843188 (code B ref 63082); Sat, 29 Apr 2023 06:27:01 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 06:26:24 +0000 Received: from localhost ([127.0.0.1]:34993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pse2K-0000pL-94 for submit@debbugs.gnu.org; Sat, 29 Apr 2023 02:26:24 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:48231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pse2G-0000p6-Nb for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 02:26:22 -0400 Received: by mail-ed1-f67.google.com with SMTP id 4fb4d7f45d1cf-505035e3368so934254a12.0 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 23:26:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682749575; x=1685341575; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=8QaLvOuGvP/VTY5fNEvyFgLx3AUnJ5DiY7zL+MDNAxk=; b=QrfxJ6XV3edz34IrPyA2TqKtn6YTrquxOU34vjMTc1kt4hbj4hP5QtuWcBcXrvtKkm /Skg88Rm2mdpaGT9lQfg6H4fBA1eGhl9nyRHOzujT1K1MSe+pnrjH1t/oSV9KZJ30sEN p9TQ8szpVNP86cA/+AzEhyIOEqJ0Erw4VNy907jthuf86V8p+g+jwvSFDvvvhNArAr4c JCllGUxCK749DGjYlGj9Bc3Q50M3rPOOCR59vkCMw2+5pyTb6Dm6JMyUsMV6WPgbDQhV kYhFrBnBmK+W1BMSciMgS54/bcdtKoAmr6NJ/Sqfaxr+qDtusvM4zzfpwUHruZMcEtKE 1BQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682749575; x=1685341575; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=8QaLvOuGvP/VTY5fNEvyFgLx3AUnJ5DiY7zL+MDNAxk=; b=dscx3/Bm88YT6XRDXwD7AI+oRRxhuzaCoY5+CI2HKpkcYeSyRY6VRrAiQqGA84V7fw /V4uga3ZBaD1ERjA3eAtE8pf2TWFhFBzkoOilpnnCCoboE6cG6UzyRyJ7cW9uDt++j9T W0LF0jbniQNdRMPVdDub7L+Tb2nxubl5A+Q/kxo+NWcAZidWbEOWDOHIlmJYzSNbV/BB x/zce6oxoj+7EV65zZPi8biQtHrvx6x3ed91mumyoBSYYtY2mw+RnW6N8nydbur8MFoU Der+p70Yy/0jEiq+OOjcaUcWkDRizr5c+K9go/1vK2hvXiKxOSokQtEMIjJ745KarajW B0Vg== X-Gm-Message-State: AC+VfDxpzwPkocKhTIJBYuhnYZ46Qm4nwIr5j7n2WCRuZ/4hB7alSrQP 40FzDUINh9L5CPeRz+V+Ya4= X-Google-Smtp-Source: ACHHUZ7aBRiX0aGGui40N2Qad/IuEq5er8s1CBm7SNgY6BktRYH+EqjY3hUbKIc1qpOIBPNTin8iJg== X-Received: by 2002:a17:907:268e:b0:862:c1d5:ea1b with SMTP id bn14-20020a170907268e00b00862c1d5ea1bmr6436101ejc.8.1682749574579; Fri, 28 Apr 2023 23:26:14 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id v10-20020a1709063bca00b0094ee3e4c934sm12193625ejf.221.2023.04.28.23.26.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 23:26:14 -0700 (PDT) Message-ID: <172f246e91445b431fb289b6cb346d37a8da1c08.camel@gmail.com> From: Liliana Marie Prikler Date: Sat, 29 Apr 2023 08:26:13 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Freitag, dem 28.04.2023 um 10:26 -0400 schrieb Maxim Cournoyer: > Prior to this change, there was a discrepancy where a user could have > disagreeing groups between the group and user fields (the user field > being a record, which includes its primary group as a > string).=C2=A0 This could have caused problems because the USER's group > was being used to set the file permissions, while the GROUP name was > serialized to MPD's configuration, and MPD would use it to set the > group of its running process.=C2=A0 Synchronizing both is not practical, > as it can easily lead to slightly different objects > conflicting, again causing problems. >=20 > The compromise is to obsolete the 'group' field.=C2=A0 A group can still > be configured via the 'user' field, which accepts a > object, with the limitation that the group should already exist. Most services generate both an account and a group, whereas MPD would be the odd one out here. Defaulting to mpd:audio also has some minor consequences when group permissions entail semantics, as this would allow everyone in the audio group group access to mpd's stuff, which seems needlessly permissive. For this reason I think it makes sense to allow users to specify a group, though it need not necessarily be via the group field =E2=80=93 for instance, we could make the user-accounts vis= ible to allow both specification of (list user group) and user alone, deprecating the user and group fields in the process. (Though we could still provide read accessors to those.) This still leaves us with the question of how to make audio work out of the box. IIRC using supplementary groups does not suffice, because the service won't work then; do I actually recall that correctly? =20 Cheers From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 11/17] services: mpd: Warn when the MPD user is not in the "audio" group. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 06:30: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: Maxim Cournoyer , 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.16827498013488 (code B ref 63082); Sat, 29 Apr 2023 06:30:02 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 06:30:01 +0000 Received: from localhost ([127.0.0.1]:34998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pse5p-0000uC-0g for submit@debbugs.gnu.org; Sat, 29 Apr 2023 02:30:01 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:62911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pse5o-0000u0-3X for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 02:30:00 -0400 Received: by mail-ed1-f66.google.com with SMTP id 4fb4d7f45d1cf-50a145a0957so24050966a12.1 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 23:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682749794; x=1685341794; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=ja/MlC8rPXErLv63vw5ds3BpKAmfBJ9035PZQ0IIri4=; b=li4T73N9Ca9CxiQG9N/8EuNlWdozdrr620vmBLuj8yuHorKdfqiYxqNpstThq45i84 3OkhdsNhxsm+gjN0oDMWT+V2yPWuUoMgL463ik8OTRScTHODg83H/Vz01Y4prvC4AW4c zasbb1yQmSgSK+DFuy2SaO/ub36/ymUrnUpO5tBh8XTLVGW0Zk5KyWbxYM+bYGmtT3qq fcW5dB1JqyRZFt1/xwd+wFWYB6qbZyQWCoOtyKz0iqHKfYPcyJXuka6D/9yziWmty3nV NJwRp8mcHBPXiczlt/yrWcTZJ86knulcNMbF6im450/BV5R5T/E1YmyYUDDdmD0rXn5o LYjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682749794; x=1685341794; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ja/MlC8rPXErLv63vw5ds3BpKAmfBJ9035PZQ0IIri4=; b=Gumef+TH78K9wi2ae03c/YKDfpCZQJYXJ2EoLJTVrjdyJhDfrY5XOnLDkiDZNAcYHr 6c3M0mU81JXIBlmDbku8t0zLNcSNXwJlzRowhI+gefHQ5LdjV+QRQUKM3BLgW71OihVh POgBm1oCL1P5gCJlbYNlbXpLs5w9FpSysWvbQ7r0yPI7HK76F6qk8B75KgCiBi2rKdYB xu42WwityJfgbjCSlc5T0TaK+W9malnrGJz3SX4JBt3623DxnL+e7Y6Den/TtclWd+yP qgdWAQ96E8YOCD+mslXmyQ6Ib7eraXqiMb4p13CH/NxJ/O/cbCRxifbslIwSk+6BFaUe 0usg== X-Gm-Message-State: AC+VfDyFwdZ2aLiV5qNXzBrgwC20AhZA95iQbbkIv5tOPmf8MAJSxTXj kh5f9YWLIpLXgN5XK4cYs/s= X-Google-Smtp-Source: ACHHUZ65HnDFdTD2Fwl/cLDclXVL2pvxiEfenWgYqrUlocenj1BpM0UtZuafbeyn83DBBIfpqGfbEQ== X-Received: by 2002:aa7:d0ce:0:b0:506:a44c:e213 with SMTP id u14-20020aa7d0ce000000b00506a44ce213mr828930edo.20.1682749794335; Fri, 28 Apr 2023 23:29:54 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id s16-20020a056402165000b0050477decdfasm9717429edx.3.2023.04.28.23.29.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 23:29:54 -0700 (PDT) Message-ID: <20ba24c1173d4377731c70380e630076e88a4ef4.camel@gmail.com> From: Liliana Marie Prikler Date: Sat, 29 Apr 2023 08:29:53 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Freitag, dem 28.04.2023 um 10:27 -0400 schrieb Maxim Cournoyer: > Relates to . >=20 > * gnu/services/audio.scm (%mpd-user) [group]: Add comment. > (mpd-user-sanitizer): Warn if the MPD user is not in the audio group. > --- > =C2=A0gnu/services/audio.scm | 16 +++++++++++++--- > =C2=A01 file changed, 13 insertions(+), 3 deletions(-) >=20 > diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm > index 550ccc542c..9579432ea3 100644 > --- a/gnu/services/audio.scm > +++ b/gnu/services/audio.scm > @@ -30,6 +30,7 @@ (define-module (gnu services audio) > =C2=A0=C2=A0 #:use-module (gnu services configuration) > =C2=A0=C2=A0 #:use-module (gnu services shepherd) > =C2=A0=C2=A0 #:use-module (gnu services admin) > +=C2=A0 #:use-module (gnu system accounts) > =C2=A0=C2=A0 #:use-module (gnu system shadow) > =C2=A0=C2=A0 #:use-module (gnu packages admin) > =C2=A0=C2=A0 #:use-module (gnu packages mpd) > @@ -172,6 +173,8 @@ (define-maybe boolean (prefix mpd-)) > =C2=A0(define %mpd-user > =C2=A0=C2=A0 (user-account > =C2=A0=C2=A0=C2=A0 (name "mpd") > +=C2=A0=C2=A0 ;; Being in the audio group ensures that PulseAudio can acc= ess > sound > +=C2=A0=C2=A0 ;; devices. > =C2=A0=C2=A0=C2=A0 (group "audio") > =C2=A0=C2=A0=C2=A0 (system? #t) > =C2=A0=C2=A0=C2=A0 (comment "Music Player Daemon (MPD) user") > @@ -208,10 +211,17 @@ (define (mpd-serialize-port field-name value) > =C2=A0 > =C2=A0(define-maybe port (prefix mpd-)) > =C2=A0 > -;;; Procedures for unsupported value types, to be removed. > - > +;;; Sanitizer procedures. > =C2=A0(define (mpd-user-sanitizer value) > -=C2=A0 (cond ((user-account? value) value) > +=C2=A0 (cond ((user-account? value) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (match-record value > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (group supp= lementary-groups) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (unless (or= (string=3D? "audio" group) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (member "audio= " supplementary-groups)) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ;; Being in the "audio" group is necessary for access > to the > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ;; sound devices. > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= (warning (G_ "mpd user not member of \"audio\" > group~%")))) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 value) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ((string? value) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (warning (G_ "stri= ng value for 'user' is deprecated, use \ > =C2=A0user-account instead~%")) I think this check is "only" required when using alsa/pulseaudio for outputs and should be a hard error then. When configured to write to httpd or null outputs, other checks are needed. Cheers From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 06:36: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: Maxim Cournoyer , 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.16827501154078 (code B ref 63082); Sat, 29 Apr 2023 06:36:02 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 06:35:15 +0000 Received: from localhost ([127.0.0.1]:35014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pseAt-00013i-9Y for submit@debbugs.gnu.org; Sat, 29 Apr 2023 02:35:15 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:49596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pseAr-00013X-L7 for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 02:35:13 -0400 Received: by mail-ed1-f68.google.com with SMTP id 4fb4d7f45d1cf-506c04dd879so891920a12.3 for <63082@debbugs.gnu.org>; Fri, 28 Apr 2023 23:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682750108; x=1685342108; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=3aTU43mN1ddanqRGhTmJ+US2w0yIGJP/w9M3Ziha8Jc=; b=n6u6bEqC151Qo60VE1fnuiUVSa7aGoJQ3+d33WrYstxDggFChUScYgx/OHJr4aZ/Vs W3Zm/4BrQnOMTMwIlv7OAI/tXY2iCQP8+KPkAZBInYx+sZinabf/DIEzE4OSNrjs6TIS sCELFELqUlGsrMm/T3z26MOxoVlQWGip0SjiAzA+/VumuZyf4dOKanDpgtEvS9UJkX7L Jrf9TrdHm+ecBNFDylKX4Vt5DzyPurXtBIgKCXPTy0B36x4x5dQkHAo5ZvjkKpKw/kwQ EJvAiiKPp+lZJJrogXzIcklQRamdnPWw/uJfoAfemRpGJgwrFvhfhp3bc39xNWm1o5+1 58NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682750108; x=1685342108; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=3aTU43mN1ddanqRGhTmJ+US2w0yIGJP/w9M3Ziha8Jc=; b=gEtJlxky1s2kgcBFOoGnKQNZdEEhhDX2dERy6GwIPs1RVMsiUPD0JL0nnvX0KPUycm X1SGxjFf1vxJfFsatIW57BBErSDtQ3YkS/WvXpxlj0QfD7l03KX0Oq62vlsSFNk669Vb CVV8AHt02KKmm2Drwpcmk3XlYSeZclSQJyUvoiPm8GOhVk7vrUB8PmpRwE9JYBnLj1tw ep5Q6bSOFvcTdkYheukKGaufiiOQ+qYHsxcMrTS9IMe9OuKhzVq0OUCK2ua3n3Fdw0i8 j9Vf1HLMjCL210OWqC5L06M2+jLUvBUYKvtKQja5agJ2ADzFPXroG5QzyIH+CvlX8tt7 natw== X-Gm-Message-State: AC+VfDw0JwY7LrG5o1UleX3oYiXvef5S8OPVmdfCsM/sLKsVcCeFFF1U 5fsUM5tAK0zOs/BqBLwdZSU= X-Google-Smtp-Source: ACHHUZ4nYdPy14tCVYG7TG7ZvLaHussg/ZtcXk6OPBbz5BpuHMzbw/gMsHAoanIbAwmndakWoUa4Bg== X-Received: by 2002:a17:906:fe4e:b0:94f:6218:191d with SMTP id wz14-20020a170906fe4e00b0094f6218191dmr7923030ejb.32.1682750107577; Fri, 28 Apr 2023 23:35:07 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id i15-20020a1709061e4f00b0094f3d700868sm12160628ejj.80.2023.04.28.23.35.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 23:35:07 -0700 (PDT) Message-ID: From: Liliana Marie Prikler Date: Sat, 29 Apr 2023 08:35:06 +0200 In-Reply-To: <172f246e91445b431fb289b6cb346d37a8da1c08.camel@gmail.com> References: <172f246e91445b431fb289b6cb346d37a8da1c08.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Samstag, dem 29.04.2023 um 08:26 +0200 schrieb Liliana Marie Prikler: > IIRC using supplementary groups does not suffice, because the > service won't work then; do I actually recall that correctly?=C2=A0=20 Reading the rest of the series it turns out that worry was unwarranted. Supplementary groups do work as they should. From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 12:13:01 +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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168277037917320 (code B ref 63082); Sat, 29 Apr 2023 12:13:01 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 12:12:59 +0000 Received: from localhost ([127.0.0.1]:35369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psjRj-0004VH-5G for submit@debbugs.gnu.org; Sat, 29 Apr 2023 08:12:59 -0400 Received: from smtpmciv5.myservices.hosting ([185.26.107.241]:48576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psjRg-0004V8-45 for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 08:12:57 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv5.myservices.hosting (Postfix) with ESMTP id DB72F20D57; Sat, 29 Apr 2023 14:12:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 754FC80097; Sat, 29 Apr 2023 14:12:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id jYFWE1N7UR0A; Sat, 29 Apr 2023 14:12:51 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id D646C80060; Sat, 29 Apr 2023 14:12:50 +0200 (CEST) Message-ID: <90123305-e143-27a9-bee3-c7f85cd44927@makinata.eu> Date: Sat, 29 Apr 2023 13:12:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: <0f027280-0cf3-dd82-3ec1-3bffddc638c0@makinata.eu> <87sfcja3q5.fsf@gmail.com> From: Bruno Victal In-Reply-To: <87sfcja3q5.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 2023-04-29 02:15, Maxim Cournoyer wrote: > Hi, > > Bruno Victal writes: > > [...] > >>> @item @code{shepherd-requirement} (default: @code{()}) (type: list-of-symbol) >>> This is a list of symbols naming Shepherd services that this service >>> @@ -33824,15 +33824,12 @@ Audio Services >>> This is a list of symbols naming Shepherd services that this service >>> will depend on. >>> >>> -@item @code{user} (default: @code{%mympd-user}) (type: user-account) >>> +@item @code{user} (type: user-account) >>> Owner of the @command{mympd} process. >>> >>> -The default @code{%mympd-user} is a system user with the name ``mympd'', >>> -who is a part of the group @var{group} (see below). >>> -@item @code{group} (default: @code{%mympd-group}) (type: user-group) >>> -Owner group of the @command{mympd} process. >>> +@item @code{group} (default: @code{#f}) (type: boolean) >>> +Obsolete. Do not use. >> >> I'd skip documenting obsolete fields. > > 'define-configuration' doesn't allow me to skip documenting a field, I > think :-). Right, but it can be manually removed from doc/guix.texi for now. >>> >>> -The default @code{%mympd-group} is a system group with name ``mympd''. >>> @item @code{work-directory} (default: @code{"/var/lib/mympd"}) (type: string) >>> Where myMPD will store its data. >>> >>> @@ -33872,7 +33869,7 @@ Audio Services >>> Override URI to myMPD. See >>> @uref{https://github.com/jcorporation/myMPD/issues/950}. >>> >>> -@item @code{script-acl} (default: @code{(mympd-ip-acl (allow >>> '("127.0.0.1")))}) (type: maybe-mympd-ip-acl) >>> +@item @code{script-acl} (type: maybe-mympd-ip-acl) >>> ACL to access the myMPD script backend. >> >> Unrelated change? > > From the generated doc, which was probably lagging behind the source. It's unfortunate but iirc this had to be manually edited in since generate-documentation will skip “serializing” values it doesn't know how to represent. From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 07/17] services: mpd: Log to syslog by default. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 16:07:01 +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@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168278439024323 (code B ref 63082); Sat, 29 Apr 2023 16:07:01 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 16:06:30 +0000 Received: from localhost ([127.0.0.1]:36415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psn5h-0006KF-RD for submit@debbugs.gnu.org; Sat, 29 Apr 2023 12:06:30 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:50386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psn5f-0006Jz-Dj for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 12:06:28 -0400 Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-3ef2f81a96cso11596751cf.0 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 09:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682784381; x=1685376381; h=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=kZ1WJypOGT4878BjWglhaxo2cOcbMJWnkRPblaxg7Po=; b=JsNmQgskRJl9T6G4i0SpYqoPtCrVL1eNYvwdmKcQPgC+yV1rVDUD6klAuPBrJWuMu1 N70XFtOXj5pq3RFtUVClnaImxv7FunZHdwx+UyfY0mpSNXYMqV57/M84rcD6+pbGELku QrRh0XkSE1BYvBKBafm6AOHAiH8FyWK7EJVuhJtq62WoMBIU4T/2lUtOZqk2fbEU/Frk jVHrJYOPdH4JAMqZUdY3UQSduxV645URKlZoqqijzmkgiz6WduKTYqvtD1eb4RFGT3VK g0yRVlidshGUxvR3DPf54XA3L0GqN+4ZeVh2Mka8LNkWsehjFNqOGXeeNOjrfS01GzYD UCZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682784381; x=1685376381; h=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=kZ1WJypOGT4878BjWglhaxo2cOcbMJWnkRPblaxg7Po=; b=AvQJ8yub76zouTkE9rP6G3KyDXwz/ShThCvXiaKIr1WgRLQxq3kEL0V/k3/fItWycI akPqGP5nuWmpyVvAvv4coma8F/YUmnu+vh82dJ+tGHBORXuj259fEi+5TfXIR7laBVQU vdOvbxjG9bFv0SIXxGqvX60nd3fpqYabGDMdxc7ostTlFigwPAFnS+yxaNW2bEpxwOpb drUG1PHNZwZjKIz5+kMEwRDBHr3U03EHeg55lbYqvjeCU7D34/Axs6W56+3w5UngAnRA hR86I5b5Gci5hUN1H85Mk21smsGJk2sqUPVo/rU+d2Hz+9T/tZPmXeGOSNEvJgtRMrY5 aEnw== X-Gm-Message-State: AC+VfDywwR4X5DwLDivMYYgnXp0mDyrldpsG41Nqs7rA6wXSzKnfw5lb 1plvhR1TeT7WTy5Hj7T3KYQqMnrRknA= X-Google-Smtp-Source: ACHHUZ6wX5Odiv3IP7wWLLw5nmu5RhaLKBQV+8Zq5Y3AkiI4KT2YRG9KTwvTC2DpsrKGSw/wRLMbXg== X-Received: by 2002:a05:622a:308:b0:3ef:389b:3ee2 with SMTP id q8-20020a05622a030800b003ef389b3ee2mr13892556qtw.43.1682784381434; Sat, 29 Apr 2023 09:06:21 -0700 (PDT) Received: from hurd (dsl-155-245.b2b2c.ca. [66.158.155.245]) by smtp.gmail.com with ESMTPSA id g11-20020a05620a218b00b0074a0051fcd4sm7544041qka.88.2023.04.29.09.06.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 09:06:20 -0700 (PDT) From: Maxim Cournoyer References: <44c9a5cf9836a71db9bf78c2eba005a40a006fff.1682690696.git.maxim.cournoyer@gmail.com> <93e9013b-561a-0549-bf84-9752796e5c4a@makinata.eu> Date: Sat, 29 Apr 2023 12:06:19 -0400 In-Reply-To: <93e9013b-561a-0549-bf84-9752796e5c4a@makinata.eu> (Bruno Victal's message of "Fri, 28 Apr 2023 23:02:21 +0100") Message-ID: <87cz3mad1g.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Bruno Victal writes: > On 2023-04-28 15:27, Maxim Cournoyer wrote: >> Rationale: the tristate value was awkward to deal with, the default log file >> name was odd (/var/log/mpd/log) and it required special attention to create >> the 'mpd' parent directory as root and chowning it to the MPD user. It also >> didn't match the default behavior of MPD, which is to log to systemd or syslog >> unless a log file is specified. >> >> * gnu/services/audio.scm (mpd-log-file-sanitizer): New procedure. >> (mpd-configuration) [log-file]: Remove default maybe value. Add sanitizer. >> (mpd-shepherd-service): Validate the log file parent directory exists and has >> the right permissions. >> * doc/guix.texi (Audio Services): Update doc. > > How about a similar approach taken in mympd for handling the logging parameter? > In any case, I'd like to remind you that mpd-service-type also has a rottlog service extension > so that also needs to be taken into account. Done, in yet to be sent v2. -- Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 09/17] services: mpd: Let Shepherd effect the user/group change. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 16:53: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@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168278713829142 (code B ref 63082); Sat, 29 Apr 2023 16:53:02 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 16:52:18 +0000 Received: from localhost ([127.0.0.1]:36438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psno2-0007Zy-E4 for submit@debbugs.gnu.org; Sat, 29 Apr 2023 12:52:18 -0400 Received: from mail-qk1-f174.google.com ([209.85.222.174]:54478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psno0-0007Zh-7n for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 12:52:17 -0400 Received: by mail-qk1-f174.google.com with SMTP id af79cd13be357-74da25049e0so83467985a.0 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 09:52:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682787130; x=1685379130; h=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=sV/kZSpYRziYZwpOLrQ53rogXLYjkYAZ/8COzEIyzBc=; b=Xd5ycAJCn9bp8DZ/n0B23iyN4uLvwK84zv8I1ZucgdstqQQwfi+586OpfO9t4D4bTp IkxCl7tv9kAUM3cCTMEXrmoV7hkNUYAoUxMeZdJhzsFekPlD7OT3mnaTh+n0HcrZFa+0 6M4VnDxhdvW/2y5CLm3Kgf4RSitx0kFvPPyj5/wJuX1qdjQIh6AJOlWpYTav/NzbzoSP IA9mp9n8vOWcor4lWp5oClh/hsrbryPYuhNjvn4vAI3YOSRgC9aflwJ7Bek5rw/CBVFS Zea5jvbADVfi0+hX5skvRBvlEoonMY4ys/woJpQ3Wy5rGAUqdHHotO5VKHLPjlyBTx2H QalQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682787130; x=1685379130; h=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=sV/kZSpYRziYZwpOLrQ53rogXLYjkYAZ/8COzEIyzBc=; b=G3hveGKOH6jRfkeJia0Fqu/laSwMShGSVIYku3bCkTgPVO7Xk6HXcNmU7v1S/o0q80 ueo/dP61IOpb/v0dbZ/aRZdVmwH+BdHxMdRVuewB9SxId2yL2dtysYHz7vDU+QDLwlxy RuJ6oUacDDAbmz4vlVImUIrXpFB2SCH0vFjg3yZVMJzRf5p7+ILNFXG0KElSbJCV2rKn VmjvRcYHpmAlbvoo6WbgZdDk71Tqg8xOC2SSU94fkkSExlELm/IwFlZoFrOT5TMPdpDU 5+6B2zBeGHEze8paZweAnczy+M8ZIZhbntvE5h4mpr81NEUsmG7WAffIy5W0KErqRdNV dd/A== X-Gm-Message-State: AC+VfDxk+Q08Cao0oReNTklwgyRD70NYMEjOWMKdUPOYwvmbnqCu/t+0 PUTI6N7vnEaPc6bFbBfANAs6BW2XL7I= X-Google-Smtp-Source: ACHHUZ4PWuCYP92T50cdvhVk5LEv8ukIYPwLzYJi0GjLApk+GsR1uoWXNg0DNsf2y5cEekz+xVXeVA== X-Received: by 2002:a05:6214:d4e:b0:5ef:56e4:f629 with SMTP id 14-20020a0562140d4e00b005ef56e4f629mr16091151qvr.38.1682787129850; Sat, 29 Apr 2023 09:52:09 -0700 (PDT) Received: from hurd (dsl-155-245.b2b2c.ca. [66.158.155.245]) by smtp.gmail.com with ESMTPSA id bq16-20020a05620a469000b0074e020ff0edsm7577641qkb.48.2023.04.29.09.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 09:52:09 -0700 (PDT) From: Maxim Cournoyer References: <70d3c80ef59f9519a69218c504e72c4c836a6ab1.1682690696.git.maxim.cournoyer@gmail.com> Date: Sat, 29 Apr 2023 12:52:08 -0400 In-Reply-To: (Bruno Victal's message of "Fri, 28 Apr 2023 23:11:27 +0100") Message-ID: <878reaaax3.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Bruno, Bruno Victal writes: [...] >> + ;; Note: The user and its group are not serialized, otherwise MPD would >> + ;; attempt to switch the user/group itself. The task of switching the >> + ;; user/group is left to Shepherd instead. >> (user >> (user-account %mpd-user) >> - "The user to run mpd as." >> - (sanitizer mpd-user-sanitizer)) >> + "The user to run @command{mpd} as." >> + (sanitizer mpd-user-sanitizer) >> + (serializer empty-serializer)) > > Simply write empty-serializer after sanitizer instead. Done, and for other commits too, though both works and the procedure version appeared more consistent/readable to my eyes. >> "--cachedir" #$cache-directory) >> #:environment-variables (list #$log-level*) >> - #:log-file #$(if (string? log-to) log-to #f)))) >> + #:log-file #$(if (string? log-to) log-to #f) > > Generic advice but how about this instead? > > #$@(if (string? log-to) `(#:log-file ,log-to) '()) > > It's cleaner to not explicitly set the keyword argument values when they're not used. They are used, but set to #f :-). I have a slight preference for the current version, which I find more readable. -- Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 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: Sat, 29 Apr 2023 17:05:01 +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@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168278785930586 (code B ref 63082); Sat, 29 Apr 2023 17:05:01 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:04:19 +0000 Received: from localhost ([127.0.0.1]:36452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psnze-0007xF-L7 for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:04:18 -0400 Received: from mail-qv1-f53.google.com ([209.85.219.53]:61536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psnzc-0007x2-PR for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:04:17 -0400 Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-5ed99ebe076so12811166d6.2 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:04:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682787851; x=1685379851; h=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=y7b/QDDCJKgxZpwXAIMGWLZ3Oewz+lkDcj/c4UMReEI=; b=VI2jMtzIndjGXk4t+eE+9ILBODjjgPfpIKVSQFAbezF+EBUUUe45j0g5b44wlVYXgl X1M2hn1SNl01hJiVMh66wVYfc2xUkggEqFFptNHBaRV0/+0dNneHRQ/Y2u/e89pElOr3 e/6CZ8guelR1hpdAD+SEcFPhVuIzwmOiTN7rxbE7ltrrmeRT1yo+jq5mptiVQuNs5DcR JFI9AqkWS5aXhVnpFW89BazzrjXfsv4yZqJHXtTCFENZWwQWSSHJdUYDGM6qBOQWDAR+ S1FlsPgbtf2His79dXG2+wGnNUhn+Clr9PH5YT0dg+AmOYaf4OQcm6ypZS4dyvTJtQBC eDEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682787851; x=1685379851; h=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=y7b/QDDCJKgxZpwXAIMGWLZ3Oewz+lkDcj/c4UMReEI=; b=iK+KLKZpbxBlO+pPOXapsxULhO+lqMtNIq4fOl1rm6b4D/iKq+qXaOk6T5GI3ZdyXe bxgXG6oTFF9cecCTg+3ah/mXifw83YycVp7R7N9r5k5uCYa21s5rbimp/0PQ7NLxuQN+ DVkQGwWLa3vQPy920iPJbZf6GpkTaETblrVui9yKauPRlWAKsPUnusvWH13VYl1sMUdk 7639X8MpB9vUQvtl0M6TVzJdNeduJ9P73QNGiWrdsRGR1Y7omc4kbsgSUPg0Fx3aJFhD NnEiTDOng8I++9oOmSKHhEinIEwtWEX5+6SgF2b/36cer91lgrt7rubgz+pFS59964IH T53g== X-Gm-Message-State: AC+VfDyFNwnFeDBtrqy7ZukCyS2Rox6Fnqsjk5lm+krUNoSLZ+qS2skG wpOqN6/cUDHzEDdN9JbmI5Pmbvt1daw= X-Google-Smtp-Source: ACHHUZ6OdQ+VL5mGtTc9RUmtrBdyk+KWN5/Xpx/Mo8l5pBhF2LFSXas1CZsIJpGEOWOfrgFk/YVfBw== X-Received: by 2002:a05:6214:20af:b0:5f1:5f73:aec1 with SMTP id 15-20020a05621420af00b005f15f73aec1mr12668443qvd.19.1682787850936; Sat, 29 Apr 2023 10:04:10 -0700 (PDT) Received: from hurd (dsl-155-245.b2b2c.ca. [66.158.155.245]) by smtp.gmail.com with ESMTPSA id u17-20020a0cdd11000000b006166a6c62cesm2514253qvk.69.2023.04.29.10.04.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:04:10 -0700 (PDT) From: Maxim Cournoyer References: <16e06b4b2a932a7c48696fcc1b89c5a454dc9d2b.1682690696.git.maxim.cournoyer@gmail.com> <2fabf610-5256-dad1-0e62-449fbcc738f0@makinata.eu> Date: Sat, 29 Apr 2023 13:04:08 -0400 In-Reply-To: <2fabf610-5256-dad1-0e62-449fbcc738f0@makinata.eu> (Bruno Victal's message of "Fri, 28 Apr 2023 23:17:28 +0100") Message-ID: <874joyaad3.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Bruno, Bruno Victal writes: > On 2023-04-28 15:27, Maxim Cournoyer wrote: >> 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. >> --- > > This field shouldn't be deprecated as one of it's primary purposes is to allow for > the pulseaudio daemon configuration to be set to another one. > What you're doing here is effectively hardcoding the pulseaudio configuration. Our only means to declare a pulseaudio configuration (pulseaudio-service-type) places it at this location, so it seems reasonable to hard code it. What use case do you have for a custom pulseaudio configuration that pulseaudio-service-type could not cater to? This prevents users defining another environment variable and forgetting to replace these, then wondering why the default pulse configuration doesn't work, and it felt out of place to me (an implementation detail better encapsulated). > I'd consider this field to be within the same category as > 'shepherd-requirement', it's for flexibility I like the idea of more flexibility, but I don't like that these fields need to be duplicated for each service, somewhat encumbering the view. Perhaps we need to devise some 'always nice to have' set that would be configurable for any service without having to expose these fields as part of their main configuration? -- Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 15/17] services: mpd: Provision a default cache directory and set HOME. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:08: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@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168278807830948 (code B ref 63082); Sat, 29 Apr 2023 17:08:02 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:07:58 +0000 Received: from localhost ([127.0.0.1]:36462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pso3B-000836-Mx for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:07:57 -0400 Received: from mail-qt1-f172.google.com ([209.85.160.172]:59639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pso38-00082o-2s for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:07:56 -0400 Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-3ef6e84945dso4799191cf.2 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788068; x=1685380068; h=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=L2CLrMSgHYxrQjIoX3v9L+5xAwtn9naje2KMHXSdZJE=; b=c5og7cL+4XzdUQ4GJq7Mz7rjOH1IsOzhXV0okhJOep+pwX8I2XR+tmeXseCfLVHEor zwoGdYRREOmDJHH1wMUw2z+2ZE4QXHc6TGP1x9KJ9fdLkgq9O4A7vjksrzzDLPQjPuE/ 7vbMTXQeQwhSBS5tKe3ebzmJGN51CiIYi85rgWowG0rxi9N9FUfXFcyyFc8dvHKdeD6u hg9MdDHgYA5Ztl4958txPZVPN3eY/z/5DSx1HJngSaDePzIJNlmOhGfMwSe2BhReh2NG n0avCKl/5X8PS24IUo5AQKvGXJj0lJFwCXCoOdyKioxIDWUYRSFfKWcSwg6mDXqwDMgy Ycag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788068; x=1685380068; h=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=L2CLrMSgHYxrQjIoX3v9L+5xAwtn9naje2KMHXSdZJE=; b=juoJ83fraLXxHWZnT2wSPZZlp5Rq9zHaVfzkb1OC97RwT9cvsv//9WjGZworGUal2j FrZsj2YD+woyHg52bOp4uNpx8WsVKmomYl2D2k3stp42ZOkBFjhnlEDSPVVq3OKy0Qaa wfkj6ASEPl8KVN4ygkciJFrg80T0qQp1D3cqLK+Xf7eBNpumOqQrOSnp/KYUgQiffCzR GgvYdAiuDh1joc3WoqFS0wM1XOV+PoRAvbg3hGhiXF5zHkb4vxV9b9wZogMUhajwEzEX KBjDo727VjB2Q3mBX14MY50SVjXOnw+ePKhsBXyMyV6ggC6FutaZupdM8R+fEYG4h2/L dsPg== X-Gm-Message-State: AC+VfDxK/3iUXJc+7I1aLRB39QHjWNDyp3Clc6tU+JtsbNtrIaWeuFQD 2YPEZyaSTKsO651W7or2lnObe0/M7kY= X-Google-Smtp-Source: ACHHUZ7a+/CV+rRGFj34kUEyKoB0nn/9fppePuW8XTrqzCNJI8IRdDUlFDEHqR9ZShbN+vsFekUYOg== X-Received: by 2002:ac8:58c4:0:b0:3e4:ed57:7fd3 with SMTP id u4-20020ac858c4000000b003e4ed577fd3mr14431545qta.51.1682788068233; Sat, 29 Apr 2023 10:07:48 -0700 (PDT) Received: from hurd (dsl-155-245.b2b2c.ca. [66.158.155.245]) by smtp.gmail.com with ESMTPSA id o8-20020a05620a228800b00746aa080eefsm7599771qkh.6.2023.04.29.10.07.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:07:47 -0700 (PDT) From: Maxim Cournoyer References: <3baf1982e8435b4a3ef13c050153d505b98fa52a.1682690696.git.maxim.cournoyer@gmail.com> <0c936b06-75a8-1946-2c24-e4782e7ee377@makinata.eu> Date: Sat, 29 Apr 2023 13:07:46 -0400 In-Reply-To: <0c936b06-75a8-1946-2c24-e4782e7ee377@makinata.eu> (Bruno Victal's message of "Fri, 28 Apr 2023 23:22:32 +0100") Message-ID: <87zg6q8vml.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Bruno, Bruno Victal writes: > On 2023-04-28 15:27, Maxim Cournoyer wrote: >> Relates to . >> >> * gnu/services/audio.scm (mpd-shepherd-service): Create a default .cache >> directory. Use mkdir-p/perms and refactor loop. Set the HOME environment >> variables. > > There's a slight problem here, you might really not want db_file to be set _at all_. > Case in point, I use a database-plugin instead which would be > incongruent if db_file is forcibly serialized into the config. > > Perhaps we could add some kind of warning mechanism that alerts the > user that either db_file or database-plugin must be configured? I believe there's no problem; I don't force a value to db_file, so the serialized configuration doesn't have any. MPD has a mechanism that scans the MPD user directory for XDG locations such as ~/.cache; when such directories exist it supports automatically figuring out a location for the database file and creating it itself. If the user has specified something precise, it'd be a bug in MPD that it doesn't honor these settings instead. Does it clarify the mechanism? -- Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:10:01 +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: Liliana Marie Prikler Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168278815931169 (code B ref 63082); Sat, 29 Apr 2023 17:10:01 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:09:19 +0000 Received: from localhost ([127.0.0.1]:36484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pso4V-00086d-2f for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:09:19 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:55368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pso4N-00085S-5C for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:09:11 -0400 Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-74fc1452fbdso82554885a.2 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:09:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788145; x=1685380145; 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=g/frUZMoOzW0iM3VF3wSXsfiGH3JYTpT9m1RDNeJo9Y=; b=D7D9FoCwQUog31pVcFyn7AWDR1fS4DGFgB+moAykDjZLxYpMLTpLAzMKCQt1DrvcPZ IxFmg8B8TcL3LzxrxAfHdq6ybkKPCmw2f/3xCTI+bcBaU3Mv0eROBA+p4l1Gp68LUkE/ bKJessTndm7TzvTdohMOmVWHKNVVBGoNsUccFU9xffQFWnY7k9+kM/3OAKPdjSIcitI2 J8YLabDvQ0lQoa4PU09FCyZF/HvqAdIBTHw2BYM9HwKwjMuz3x8t7+SE/ExoqEXFe7eV vS2ILKnaXxl8LvqnLZgnqQmX1XhSKdp4JojAnQOkiqrKkEd8jnC7mBlL/VtCl05YAZj5 y5Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788145; x=1685380145; 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=g/frUZMoOzW0iM3VF3wSXsfiGH3JYTpT9m1RDNeJo9Y=; b=Am/TosHn6XxI/zjrwH0TIdO2s0/4dTLJ1qMOHSRqEOkcx3A0JWA6XQNj9X9Y+H8mBy KJjeGR9kzwqDaYdBgMo4RPyTjyrSxwspwgN3f77r3TlO1jBln68C6p0pvwy92g0VOV2s jPeq9JAgMrF6RbTpHKO25jfPdYxfvnAkkPOH1Ee+nUIR11bQt4sLEjRQtjJurmUM8LMT ZI4F5LKTVNt5g7svMWrtD+KtY1Q1SGqYeHLxjQj8bByLYr5xAY3R+o4g5G5R9YYCMwTn 0MibaXTWxQL98AMimOnFEfzf3Vf454BK+cTFYJbzomw6OHts30U+LKrmZ3tCgPqA4xGy ICDw== X-Gm-Message-State: AC+VfDzFRmgPsqvT1CHJFiTwYKgvO1RNpefwWgox4T2yWloOWjrvQ+wO usqszYAecRnNW2FBl3/knFUui4uIujo= X-Google-Smtp-Source: ACHHUZ5vX0vjU8VUbIvvD4UyicZdBj993x4z+8X2UuCYczO0+MsiS2xxJo/AeJJJt3QRa+TBQObkIg== X-Received: by 2002:a05:6214:5015:b0:5dd:aee7:dffb with SMTP id jo21-20020a056214501500b005ddaee7dffbmr14077964qvb.22.1682788145366; Sat, 29 Apr 2023 10:09:05 -0700 (PDT) Received: from hurd (dsl-155-245.b2b2c.ca. [66.158.155.245]) by smtp.gmail.com with ESMTPSA id a21-20020a0ca995000000b005ef4de2cc3bsm7310011qvb.138.2023.04.29.10.09.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:09:04 -0700 (PDT) From: Maxim Cournoyer References: <172f246e91445b431fb289b6cb346d37a8da1c08.camel@gmail.com> Date: Sat, 29 Apr 2023 13:09:03 -0400 In-Reply-To: (Liliana Marie Prikler's message of "Sat, 29 Apr 2023 08:35:06 +0200") Message-ID: <87v8he8vkg.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Liliana, Liliana Marie Prikler writes: > Am Samstag, dem 29.04.2023 um 08:26 +0200 schrieb Liliana Marie > Prikler: >> IIRC using supplementary groups does not suffice, because the >> service won't work then; do I actually recall that correctly?=C2=A0=20 > Reading the rest of the series it turns out that worry was unwarranted. > Supplementary groups do work as they should. Correct, we can use a supplementary group for "audio". This still leaves the question as to what primary group to use though. I think I'll answer to this in your other comment. --=20 Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 11/17] services: mpd: Warn when the MPD user is not in the "audio" group. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:11:01 +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: Liliana Marie Prikler Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168278825831479 (code B ref 63082); Sat, 29 Apr 2023 17:11:01 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:10:58 +0000 Received: from localhost ([127.0.0.1]:36520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pso65-0008Bf-Re for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:10:58 -0400 Received: from mail-qt1-f181.google.com ([209.85.160.181]:47436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pso62-0008BS-W6 for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:10:56 -0400 Received: by mail-qt1-f181.google.com with SMTP id d75a77b69052e-3eef63eff7eso4828881cf.3 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788249; x=1685380249; 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=lxgW9w8+Lym3v7l9Zx3tT3LQpPpSshz1BnOqyzqfAH0=; b=cGPF5UilmMoA2DW+LZrgLTBXHoWY4QFpU08QkCCzMeiCMjP/tTLxc0qbvHL1e44C33 LxpLMxKtUYeMRWNHfHqWk/KP9mMSiMa4/BfIPGRIP8ZayUuavUhlY6r6UCIeOSrqGil+ ezVOCfluoh+ZXD1Q0k7J0c1WzgU0nHgnI/QdjnFni7e2xmZH+Wl8xsDc5R9x9tfjBx+d WfpWCYOgJLoVhP0fh4V7uCTfjXt2yW8J0bk4o6uhPGtwp/3pjIpXXpyFbTYzHTlwhGUv yQz8t74g1gHAoAuJsTipLR2MPlplJM2vrR80ILw5xtChA/WXqqjtA6xq0S8znUEe8VBt gEvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788249; x=1685380249; 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=lxgW9w8+Lym3v7l9Zx3tT3LQpPpSshz1BnOqyzqfAH0=; b=A+GPT0kt8vvOWrsdgwvFB5/S+enBuI8dnRrGpCZpXmjDMfocfzLgV1HaupJFJMnGfM W/k9UTKcm6/MWP8Lr1SpPY4r6jlTPgGi7O6/iQ/Gcmp5AcBKsNGom6fgbulTmqTZ0OdG K5wIMM1HScG0YiKZ2ZPUEDUrM8tb5SgjvmRuAbCIhCoTrktOQGJVBF0Sit5svwFM8COg OLxdAGdvU2wITtFRsX1ykGd6+KwEZr1XnIMi2WREz/X1mBhrbT4KgcNFCoPxQ9q5r89C BoMuv8np41lsLsydVzGsjEuFApue2+AfUuZJZluz/+G9rzdBczufUZd8AI4ng5yoLMls Z1hA== X-Gm-Message-State: AC+VfDxygi+TGhre9LPwjWza0yoY+c8hYylH0KzaTKwp0lGZFslCGBFw HZTO1vcTXXqQubVZgi2eKsqOLFymbPE= X-Google-Smtp-Source: ACHHUZ61XbnYLFbodV9tdkO60l2dMUDDhbamk0aJiazEBc8EN6sSDo5/zlIvltoBSc/pEAjizp/myg== X-Received: by 2002:ac8:7f8e:0:b0:3e3:7ce1:e73f with SMTP id z14-20020ac87f8e000000b003e37ce1e73fmr16912809qtj.53.1682788249301; Sat, 29 Apr 2023 10:10:49 -0700 (PDT) Received: from hurd (dsl-155-245.b2b2c.ca. [66.158.155.245]) by smtp.gmail.com with ESMTPSA id f3-20020ac81343000000b003e3921077d9sm7936470qtj.38.2023.04.29.10.10.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:10:48 -0700 (PDT) From: Maxim Cournoyer References: <20ba24c1173d4377731c70380e630076e88a4ef4.camel@gmail.com> Date: Sat, 29 Apr 2023 13:10:47 -0400 In-Reply-To: <20ba24c1173d4377731c70380e630076e88a4ef4.camel@gmail.com> (Liliana Marie Prikler's message of "Sat, 29 Apr 2023 08:29:53 +0200") Message-ID: <87r0s28vhk.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Liliana, Liliana Marie Prikler writes: > Am Freitag, dem 28.04.2023 um 10:27 -0400 schrieb Maxim Cournoyer: >> Relates to . >>=20 >> * gnu/services/audio.scm (%mpd-user) [group]: Add comment. >> (mpd-user-sanitizer): Warn if the MPD user is not in the audio group. >> --- >> =C2=A0gnu/services/audio.scm | 16 +++++++++++++--- >> =C2=A01 file changed, 13 insertions(+), 3 deletions(-) >>=20 >> diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm >> index 550ccc542c..9579432ea3 100644 >> --- a/gnu/services/audio.scm >> +++ b/gnu/services/audio.scm >> @@ -30,6 +30,7 @@ (define-module (gnu services audio) >> =C2=A0=C2=A0 #:use-module (gnu services configuration) >> =C2=A0=C2=A0 #:use-module (gnu services shepherd) >> =C2=A0=C2=A0 #:use-module (gnu services admin) >> +=C2=A0 #:use-module (gnu system accounts) >> =C2=A0=C2=A0 #:use-module (gnu system shadow) >> =C2=A0=C2=A0 #:use-module (gnu packages admin) >> =C2=A0=C2=A0 #:use-module (gnu packages mpd) >> @@ -172,6 +173,8 @@ (define-maybe boolean (prefix mpd-)) >> =C2=A0(define %mpd-user >> =C2=A0=C2=A0 (user-account >> =C2=A0=C2=A0=C2=A0 (name "mpd") >> +=C2=A0=C2=A0 ;; Being in the audio group ensures that PulseAudio can ac= cess >> sound >> +=C2=A0=C2=A0 ;; devices. >> =C2=A0=C2=A0=C2=A0 (group "audio") >> =C2=A0=C2=A0=C2=A0 (system? #t) >> =C2=A0=C2=A0=C2=A0 (comment "Music Player Daemon (MPD) user") >> @@ -208,10 +211,17 @@ (define (mpd-serialize-port field-name value) >> =C2=A0 >> =C2=A0(define-maybe port (prefix mpd-)) >> =C2=A0 >> -;;; Procedures for unsupported value types, to be removed. >> - >> +;;; Sanitizer procedures. >> =C2=A0(define (mpd-user-sanitizer value) >> -=C2=A0 (cond ((user-account? value) value) >> +=C2=A0 (cond ((user-account? value) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (match-record value >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (group sup= plementary-groups) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (unless (o= r (string=3D? "audio" group) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (member "au= dio" supplementary-groups)) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 ;; Being in the "audio" group is necessary for access >> to the >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 ;; sound devices. >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 (warning (G_ "mpd user not member of \"audio\" >> group~%")))) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 value) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ((string? value) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (warning (G_ "str= ing value for 'user' is deprecated, use \ >> =C2=A0user-account instead~%")) > I think this check is "only" required when using alsa/pulseaudio for > outputs and should be a hard error then. When configured to write to > httpd or null outputs, other checks are needed. I agree, but then the check couldn't be made in a sanitizer and would need to happen much later (in the start slot to ensure it runs at the right time?). I figured the current behavior, while not perfect, is better than the later. --=20 Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:13:01 +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@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168278837531665 (code B ref 63082); Sat, 29 Apr 2023 17:13:01 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:12:55 +0000 Received: from localhost ([127.0.0.1]:36524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pso7z-0008Ed-EL for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:12:55 -0400 Received: from mail-qv1-f48.google.com ([209.85.219.48]:57419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pso7x-0008EP-FN for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:12:53 -0400 Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-5f3da4f91a0so5586416d6.2 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:12:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788367; x=1685380367; 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=V7Trdu9L+w8I0qbkO38EmrNaF32OZLQadqsbmXbpOz4=; b=WG/4QNsjZBx1tsWfaZI0w9mcvi7FY2GWKqT00kse6Uu6Svnu8ffnFchQJMdQnFxi62 /GSo5XbZE7TEl/ZpXE2KSwcKXrFsm/RLeDcob8cKTWg8iKQfQ6DGDE4s9kD6pPOJF5mc czvbWkWH1ft/aYFPspYzWhJDZwyrHOCosdYqLsF6eZ91n4D9UYTQCxSRfp+LwufoIufD 6wP9q5p8L4EewjJqjVxCg9vC2WZaQblDooYcMsf0GBWz7mDwWqvhiDzrd5lCMvEralqQ 2WLeNUyhuHS0XQmwIn5GtRwVqW3vFBOZyjQK0ht5Ezn0PTNuCA7J9e6yfF6yyOuuD9kq JDcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788367; x=1685380367; 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=V7Trdu9L+w8I0qbkO38EmrNaF32OZLQadqsbmXbpOz4=; b=BYJBYJP9vg1S6rMv2VWOai3nyN0FohQN+xI2WEfIJ5w4yUiyywbuS4X15mVLYHjFOb eOHtlYLPCdDzNLKBMctAbT24vBbcownkUwe5k3JUlzNblZPMDHVWufPlKjW9B4235U2V w4kgkNYu4qIHK8kYSkObZpyWdjGJX0tP3fis2DPed+zSrv/5NJEHYhivd3jy+vVY35zU HZiQ2FIjyxu77vUE76WGSpEQJihng4dPmyYNVQt4HlmCoBf38Z0ejHZJtjrDftqS/jLV /tmI2jrFmM9raztnU/9D4ZuD9mN3QbXCh3/pbAuG0+X/4wQuasblihc3wJC12rVplZnK hkTQ== X-Gm-Message-State: AC+VfDyPtzaLB0gP8acTmDG5nCl9ftetuNjOo3otFAEPhT5FndsAfJHd +eaSCGbKXYBYrVj9FFs4MPSaxtjUaW8= X-Google-Smtp-Source: ACHHUZ5DZdQAFqXNylOqc+MdIcmUZYCu76ZoUGoXwIQM3hxVig7mMCZpgZEmN/6snsCvAOjQwDxw3g== X-Received: by 2002:a05:6214:29e2:b0:60b:b575:8e84 with SMTP id jv2-20020a05621429e200b0060bb5758e84mr13577145qvb.24.1682788367535; Sat, 29 Apr 2023 10:12:47 -0700 (PDT) Received: from hurd (dsl-155-245.b2b2c.ca. [66.158.155.245]) by smtp.gmail.com with ESMTPSA id r7-20020a0ce287000000b00606750abaf9sm6467357qvl.136.2023.04.29.10.12.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:12:47 -0700 (PDT) From: Maxim Cournoyer References: <0f027280-0cf3-dd82-3ec1-3bffddc638c0@makinata.eu> <87sfcja3q5.fsf@gmail.com> <90123305-e143-27a9-bee3-c7f85cd44927@makinata.eu> Date: Sat, 29 Apr 2023 13:12:46 -0400 In-Reply-To: <90123305-e143-27a9-bee3-c7f85cd44927@makinata.eu> (Bruno Victal's message of "Sat, 29 Apr 2023 13:12:50 +0100") Message-ID: <87mt2q8ve9.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Bruno, Bruno Victal writes: [...] >>>> -The default @code{%mympd-group} is a system group with name ``mympd''. >>>> @item @code{work-directory} (default: @code{"/var/lib/mympd"}) (type:= string) >>>> Where myMPD will store its data. >>>> >>>> @@ -33872,7 +33869,7 @@ Audio Services >>>> Override URI to myMPD. See >>>> @uref{https://github.com/jcorporation/myMPD/issues/950}. >>>> >>>> -@item @code{script-acl} (default: @code{(mympd-ip-acl (allow >>>> '("127.0.0.1")))}) (type: maybe-mympd-ip-acl) >>>> +@item @code{script-acl} (type: maybe-mympd-ip-acl) >>>> ACL to access the myMPD script backend. >>> >>> Unrelated change? >> > From the generated doc, which was probably lagging behind the source. > > It's unfortunate but iirc this had to be manually edited in since generat= e-documentation > will skip =E2=80=9Cserializing=E2=80=9D values it doesn't know how to rep= resent. OK. I'm not sure it's worth manually fiddling with the generated code instead of keeping it as a reminder to fix it at the source :-). It's already a bit of a pain to copy-paste the snippets already. --=20 Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:17: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: Liliana Marie Prikler Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168278860532062 (code B ref 63082); Sat, 29 Apr 2023 17:17:02 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:16:45 +0000 Received: from localhost ([127.0.0.1]:36529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoBh-0008L4-23 for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:16:45 -0400 Received: from mail-qt1-f170.google.com ([209.85.160.170]:49580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoBf-0008Kr-JL for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:16:43 -0400 Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-3f0b299d739so5014191cf.3 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788598; x=1685380598; 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=Ovf1KRdWvhLa9KzD+7M4C4ULEnrJOjRmJZqKwT4aW4w=; b=fPKTgj23N4nz9qJTGJsTBXeslC3biE/SMDcdZuiGp8/A7P1AAIck/7rkmrknd0662s HY809uN6mJsgDWEp55ikyfv6qVb6lEk/Q3JWobNDxVQbGEyeSiHNiGA3l4/SooqdXu3J Bf5nCqzmCUpptEzVq23nOJTmIbMCEv72OqX/ZC0ttBO5GRrmIWWEE59jK116JT4gxhRf J+qzOH1HMvc5GjKnRqvxLnE4CkY58XF7bvfy1Ivl0+Faiv70tdcEDPeYcWf6INoWN8le el8OrrWWpbpBIK8jyb/7lB1omrd2lFH1HiF6il/uzDtWjRSChrR1tLvLx+IQdl7DzQXg wr2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788598; x=1685380598; 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=Ovf1KRdWvhLa9KzD+7M4C4ULEnrJOjRmJZqKwT4aW4w=; b=fSx1LE3emEb5IODO/cHXh2fPe11ahj1fGCVz2HXZk7rAb5eyt8WcjCyUHeGnMzB37y WPxaPN23NxEp7+wZ8UuJmyaZEZq5RB8ZTzhpg/tBeZ8bj7imV9UbgFlnpmU0DqBCjD1F w8ddXtRm1g7e31CtcMJYE4rqkw3HuyQKCZILqkafuwrvR0/G5vLJ9iwUlxiCimrb49gW 6BRap+0qw8iJHQOiCMYN1oV/e7jeb25sWrs7nf4/z5ZRPio+hYoy3daLyaDEQH+x6Vey Qi64kgNIK1PDhygBOlZ2PhKzKpKgabeK7Qw/Kgzh2vk1cuzKHCR7oTyW/ALkMWKw7MdM hPkg== X-Gm-Message-State: AC+VfDwW4qlawdo7L6c5N4DT99YG85OQBeKJi6zyMDhyGcVx7m7BZeE5 Rhxxt4fywsUurSoYUMgJPevUhWRCwq0= X-Google-Smtp-Source: ACHHUZ4vUuvwBFSP34xXjQX0yfxEp0FBqz60wLDVy50F1yszDjSZBzXn0ygKUT/aY5kDnp2ca8meUA== X-Received: by 2002:a05:622a:1741:b0:3ef:3854:7cbf with SMTP id l1-20020a05622a174100b003ef38547cbfmr14738264qtk.42.1682788597911; Sat, 29 Apr 2023 10:16:37 -0700 (PDT) Received: from hurd (dsl-155-245.b2b2c.ca. [66.158.155.245]) by smtp.gmail.com with ESMTPSA id br13-20020a05620a460d00b0074e0abe59a0sm7587133qkb.78.2023.04.29.10.16.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:16:37 -0700 (PDT) From: Maxim Cournoyer References: <172f246e91445b431fb289b6cb346d37a8da1c08.camel@gmail.com> Date: Sat, 29 Apr 2023 13:16:36 -0400 In-Reply-To: (Liliana Marie Prikler's message of "Sat, 29 Apr 2023 08:35:06 +0200") Message-ID: <87ilde8v7v.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Liliana, Liliana Marie Prikler writes: > Am Samstag, dem 29.04.2023 um 08:26 +0200 schrieb Liliana Marie > Prikler: >> IIRC using supplementary groups does not suffice, because the >> service won't work then; do I actually recall that correctly?=C2=A0=20 > Reading the rest of the series it turns out that worry was unwarranted. > Supplementary groups do work as they should. Perhaps the simplest, more natural way to fix this would be to do the following: 1. Revert to use simple strings for the user/group, with their types to maybe-string. 2. When the fields are specified, it's assumed that their corresponding user/group already exist, as done for other services. When unspecified, then the service takes care to extend the user-accounts service with the mpd user/group. This means we do not have to expose user-accounts at the , which is not the right place for that anyway; it's already exposed via the users/groups fields of the record. That's much easier to reason with, for both humans and the code, in my opinion. --=20 Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 00/16] Improve out-of-the-box experience with mpd-service-type References: <874jp3nyd3.fsf@gmail.com> In-Reply-To: <874jp3nyd3.fsf@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23: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: 63082@debbugs.gnu.org Cc: Bruno Victal , Liliana Marie Prikler , Maxim Cournoyer Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168278893032613 (code B ref 63082); Sat, 29 Apr 2023 17:23:02 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:10 +0000 Received: from localhost ([127.0.0.1]:36540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoGv-0008Tn-JG for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:09 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:62486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoGs-0008T6-4z for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:07 -0400 Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-7515631b965so184044885a.0 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788920; x=1685380920; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=2o4FEpD9taKy2SxinDo1OZ72N/4ZdwuPg2pI3LpyvMM=; b=Tnd8G9IuPXybxkSQa5wwlCpAdYkyzqORaUdYAjhBBYtRwjEbP/0AMNSe+oljs4XMsN si0reokGqT8PdJb37D6FITISXzYzzg+NA0+1GvyHDbU0kRXLpu9DNWk1PFbqPAfyQHbh yx8gC+4Rtk9Mdhqluxp5pPDyRNCUKW4YpKT2TR0Ud3yfOXdLu07a9gpVUDwHt7dyt85M zBsCsH1CCsuZvw/c1HC4SSKGWye/S4sZB1cqi8YY6Rc1/WYyseiVOdoEJXp9XAegTjBZ j0YjueRiVPl8dsPuPIb3HMphND37fM/Vl13ZS6YAuv18U9zJQq9y5983xNOsLJlpHZCu AOqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788920; x=1685380920; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2o4FEpD9taKy2SxinDo1OZ72N/4ZdwuPg2pI3LpyvMM=; b=AdK0g+Yi0+7mHJ93Y7M3H1xV/xLq/3kSTvFKJtavTp4INwG3xaqFng+7A/usiOhFSk Bx0fzQqlaWsswoLABdBnUuYv/c7wXSd9CrLjtI9ENebY9alHMnBND3Olj1pJcetJCoo/ BhGl3VlI0jreiBX5cCZqFqC18odkn9KtWivVyPNYxIJBp1fYj5X24B9DR7nI69C0tAJd b31kKnZfWOiLXfVvuvTnfUpM3eScpergmSE+6HTLZISTPHX1NrJaj6WQ/nQdmG8d1Bad C4pzEXsq2ZY7TVOsjUSwazd8Q11I1iRx4hiP6zOg6+5Js+woKkFM+1vBB6ejoSSDvMp/ om0Q== X-Gm-Message-State: AC+VfDzjLxpvrSinWd9mljxpkO9I/P/tyhJxccYomQaQXnPRcSrQfmKN R+r7T5BAsXTCJ2GYeylvNAmnOkrZSYA= X-Google-Smtp-Source: ACHHUZ5S8Nh9xl3w+dOCB73wA2uuDSRElSyqwdEisbCb8mP491jEV2P+pZlrUgkv5IQHdiE3qHDxng== X-Received: by 2002:ac8:5b95:0:b0:3e3:9275:17ad with SMTP id a21-20020ac85b95000000b003e3927517admr23418831qta.12.1682788920270; Sat, 29 Apr 2023 10:22:00 -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.21.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:21:59 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:37 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This series harmonize mympd with mypd further, such as using syslog as default for the log output, and sharing more of the logic for their start slot. Otherwise it's the same as the previous series, with some clean ups and changes suggested by Bruno in its review (thanks!). Maxim Cournoyer (16): services: mpd: Add an 'update' action to trigger a database update. services: mpd: Streamline mpd-user-sanitizer and mympd-user-sanitizer. services: mpd: Rename %set-user-group to set-user-group. services: mpd: Obsolete the 'group' field. services: mpd: List log-level in decreasing verbosity order in doc. services: mpd; Refactor start slot directory initialization. services: mpd: Log to syslog by default. services: mpd: Do not rotate logs when using syslog. services: mpd: Let Shepherd effect the user/group change. system: accounts: Export . services: mpd: Warn when the MPD user is not in the "audio" group. services: mpd: Auto-detect mpd-output mixer type by default. services: mpd: Obsolete 'environment-variables' field. services: mpd: Provision a default cache directory and set HOME. services: mpd: Update basic example. services: Avoid 'delete' overrides warning in audio module. doc/guix.texi | 97 ++++++---- gnu/services/audio.scm | 405 +++++++++++++++++++++++----------------- gnu/system/accounts.scm | 3 +- gnu/tests/audio.scm | 4 +- 4 files changed, 294 insertions(+), 215 deletions(-) base-commit: ccf64b6a8b8718a8bb69719cf9ed2873464e3850 prerequisite-patch-id: eace011dd080f709a8eeb77c7a739f87079dbb81 prerequisite-patch-id: fd596ecff861483a486910ca0feecded27f6a4a2 prerequisite-patch-id: 948c73edc0a8a0a21b1d4f6878d3f09158059f38 prerequisite-patch-id: becfd217e53934fe9ef16939ff433e5ed00a4b1e prerequisite-patch-id: 20f12e01af25b881e362ea7dc837a07aeec8a489 prerequisite-patch-id: 7534d08dbc06589ce0fe7bd306585321cb5385d1 -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 01/16] services: mpd: Add an 'update' action to trigger a database update. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23: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: 63082@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168278893032621 (code B ref 63082); Sat, 29 Apr 2023 17:23:02 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:10 +0000 Received: from localhost ([127.0.0.1]:36543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoGv-0008Tx-UK for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:10 -0400 Received: from mail-qt1-f175.google.com ([209.85.160.175]:49636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoGt-0008TI-90 for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:07 -0400 Received: by mail-qt1-f175.google.com with SMTP id d75a77b69052e-3f0b299d739so5031231cf.3 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788921; x=1685380921; 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=LCjNcdnqGnMHI8HiaI9YijbTNs2o1xtt8cqovArg8Ng=; b=S+f3ZMAtCo5Hn6cId2jH8FQSPMI5AHjQKQEvqB/SplMamIbp22mKzlaxHna4fNPi+7 4hEVvFqa6SZiGtPIQ0mojYMIhRktYGnhKRsqbilaeE/VkKYGZtrGSptUnnWNPyODttOX lmti4tutkvS0w9kgLO+OL8pF6AlUFLGSJh+QGLWWh1UgBaw77YB8YbVBncSrhZPglytc k6aA65ncDNBFQMSX3P34D/aRlHdEadoO316aumd5/HDdR9NIJ/l1l7ATVmw6XMCH6901 62jgoQQy3OZGE8bqCvRgZCPjDky2mJwL5bj4Bhm4AbVQUfXi6SMINCSbfyGKeB9X09Wj y/Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788921; x=1685380921; 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=LCjNcdnqGnMHI8HiaI9YijbTNs2o1xtt8cqovArg8Ng=; b=JaaqR4STtQeIPOBx5oDhazjf590N/WXCX35KUHp/8QHqk+f3ygSvRhGbdvVF/N6QNe 4t+rlKgVhfx2qCh4OrIvllXukeQ4BtonYKW7TeznpWONQtEPePD+CigPo8VF74dtNzNL 7ePgnJ8wD8CPUqKlvPNb0tAEwDByttzSUiyoFuhkdoxvf0Pa9SnV+iyzSmXfV3r7G2hP Bd1i1+XPg8niv3E86LHdOwVcJIGIgQ79MpyfsnMQyeyX6xd+laa5wA4qUwLg2atH/MNr dO+7bUbxp6BBxr8rUL+Dly0ocqRpxljuAysH+9d14kE9E32fcl/G40LhUZeczM9UP5we /ZjA== X-Gm-Message-State: AC+VfDxZMUXLk7mddzV5PeTT2i0UWeR7rtMIExebyclPUieuhLJL802J YPQtq2g9pAKof6rIbI2h68mXiWipldA= X-Google-Smtp-Source: ACHHUZ7v4c1pmgSAVBUE8jVZEu00UnzG14pWmjv6ZntzTvcnaKVFmQUSZFQgBxGVpQ30mBNPRqE0sA== X-Received: by 2002:a05:622a:1891:b0:3ec:4705:d216 with SMTP id v17-20020a05622a189100b003ec4705d216mr14980392qtc.14.1682788921575; Sat, 29 Apr 2023 10:22:01 -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.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:01 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:38 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * 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(+) diff --git a/doc/guix.texi b/doc/guix.texi index bdacb56af5..f8acdbd6b5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33546,6 +33546,16 @@ Audio Services (port "6666"))) @end lisp +Most MPD clients will trigger a database update upon connecting, but you +can also use the @code{update} action do to so: + +@example +herd update mpd +@end example + +All the MPD configuration fields are documented below, and a more +complex example follows. + @defvar mpd-service-type The service type for @command{mpd} @end defvar diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 8c061da47f..6e4ce3f9fb 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -620,6 +620,17 @@ (define (mpd-shepherd-service config) (format #t "Issued SIGHUP to Service MPD (PID ~a)." pid)) + (format #t "Service MPD is not running."))))) + (shepherd-action + (name 'update) + (documentation "Request MPD to update its music database.") + (procedure + #~(lambda (pid) + (if pid + (begin + (invoke #$(file-append mpd-mpc "/bin/mpc") "update") + (format #t "Database update requested for service \ +MPD (PID ~a)." pid)) (format #t "Service MPD is not running."))))))))))) (define (mpd-accounts config) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 02/16] services: mpd: Streamline mpd-user-sanitizer and mympd-user-sanitizer. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23:03 +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.168278893832676 (code B ref 63082); Sat, 29 Apr 2023 17:23:03 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:18 +0000 Received: from localhost ([127.0.0.1]:36552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoH3-0008Uv-G7 for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:17 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:59537) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoGu-0008TU-LG for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:09 -0400 Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-3ef6e84945dso4845931cf.2 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788923; x=1685380923; 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=E907hWJp1Rcb9drxhnCJiM7IicvT0X0UX/hd/jgk/vk=; b=qm+sVrHNmXp2tLOa3MpKMvBfptCrE0MYI8Ui3UJ9pzzygypfBLFiOGc4U5i0lx7xXO YKyFA9GHOfJj1E031cT+frZvCMGFpR4BP3aMkktSv2m5sgEArvGWIZRjCwcCb4qUyxlg wheFaDe+3z0SBp8Vo6eL+NcnJvjIuGzOjxURodtqd/roNtk4VzyM/EHMD0DmG1OdlNTu QMtdg4kF+yKG2B0gJ7hVWTK4AndFg1xYRsrT/7TfWQgSmLG5Jsag5Gpxy+xZV/SzhaB7 wZI8uqjDopyZD0zANlgS+ETB3W7kHzQyYnQlcGMzwwpvxv8lQ/1F7A6qrJrs/6xFD4HC u8+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788923; x=1685380923; 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=E907hWJp1Rcb9drxhnCJiM7IicvT0X0UX/hd/jgk/vk=; b=PuhWkRmWnafj4DSye/PDzKEvS9sUpNuh/eV0qeqO8B778vCNGsAoEucMGND2dR6AS/ UrzuWcg/hCfsGUxpxk/nOhyhRW7kG08xPWHOngkuziiYQHUy9jv6vDTPL81707RLGJEi sl8WBlB1CchyZTeKnRn9R7RKRFgCqKNW0HagexJ6OZ6U7v4/CZVnb5AK/9WbIwIZFXwH V0Rned7huVPAwvTzLWkK1oUj8oRYuAPo2QZwQG3EeZkVQ1rB2MuQRast2CTJ5QsXqMo3 Asi7rskkmRa4Wm24pfzCrF9v1yAp0e7j3bfmUEItRon7xsLb+dmG7Qsd2rgXfbFt+Lta XGFA== X-Gm-Message-State: AC+VfDz0uT36WaqYlIjkW0TyaXx6uHyDA6qeFlokJ5eSpd7Ti9+wGcBT Kt4MgD8ZS1ZL48id+WQXV917LGBINX4= X-Google-Smtp-Source: ACHHUZ40XV+ftLUeIS9bxaCNcOSyxEFi94OoOAMKkaaQirEwI/UKhFZwj/qpMZ8btHsOMhEPxqENRA== X-Received: by 2002:ac8:5886:0:b0:3ef:2ce7:7f5f with SMTP id t6-20020ac85886000000b003ef2ce77f5fmr14426324qta.18.1682788922962; Sat, 29 Apr 2023 10:22:02 -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.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:02 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:39 -0400 Message-Id: <15db5c777d50d410cc898dba62bfd21fdecdb60d.1682788743.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm (mpd-user-sanitizer, %mympd-user): Remove extraneous group field, already inherited. (%mpd-user, %mympd-user): Clarify %lazy-group explanatory comment. Fix indentation. --- gnu/services/audio.scm | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 6e4ce3f9fb..dc83479e40 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -184,13 +184,15 @@ (define-maybe boolean (prefix mpd-)) (define %mpd-user (user-account - (name "mpd") - (group %lazy-group) - (system? #t) - (comment "Music Player Daemon (MPD) user") - ;; MPD can use $HOME (or $XDG_CONFIG_HOME) to place its data - (home-directory "/var/lib/mpd") - (shell (file-append shadow "/sbin/nologin")))) + (name "mpd") + ;; XXX: This is a place-holder to be lazily substituted in (…-accounts) + ;; with the value from the 'group' field of . + (group %lazy-group) + (system? #t) + (comment "Music Player Daemon (MPD) user") + ;; MPD can use $HOME (or $XDG_CONFIG_HOME) to place its data. + (home-directory "/var/lib/mpd") + (shell (file-append shadow "/sbin/nologin")))) (define %mpd-group (user-group @@ -235,10 +237,7 @@ (define (mpd-user-sanitizer value) user-account instead~%")) (user-account (inherit %mpd-user) - (name value) - ;; XXX: This is to be lazily substituted in (…-accounts) - ;; with the value from 'group'. - (group %lazy-group))) + (name value))) (else (configuration-field-error #f 'user value)))) @@ -676,12 +675,14 @@ (define-maybe/no-serialization mympd-ip-acl) (define %mympd-user (user-account - (name "mympd") - (group %lazy-group) - (system? #t) - (comment "myMPD user") - (home-directory "/var/empty") - (shell (file-append shadow "/sbin/nologin")))) + (name "mympd") + ;; XXX: This is a place-holder to be lazily substituted in 'mympd-accounts' + ;; with the value from the 'group' field of . + (group %lazy-group) + (system? #t) + (comment "myMPD user") + (home-directory "/var/empty") + (shell (file-append shadow "/sbin/nologin")))) (define %mympd-group (user-group @@ -696,10 +697,7 @@ (define (mympd-user-sanitizer value) user-account instead~%")) (user-account (inherit %mympd-user) - (name value) - ;; XXX: this is to be lazily substituted in (…-accounts) - ;; with the value from 'group'. - (group %lazy-group))) + (name value))) (else (configuration-field-error #f 'user value)))) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 03/16] services: mpd: Rename %set-user-group to set-user-group. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23:03 +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.168278893832684 (code B ref 63082); Sat, 29 Apr 2023 17:23:03 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:18 +0000 Received: from localhost ([127.0.0.1]:36554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoH3-0008Uz-RR for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:18 -0400 Received: from mail-qv1-f54.google.com ([209.85.219.54]:52566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoGv-0008TW-UI for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:11 -0400 Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-5f16a6fe2b1so5258186d6.1 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788924; x=1685380924; 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=tifie4UXBeiflyejnrNW3Mfmy2natxq8FBP0x9+4ywY=; b=nwM3n4W8j9CxCAggKqYMvErp5OolM3EMxGEhxdq6fnX3ubrumbBioGLZ2Nk4/tXYQ5 C+5uyDRSfp9pGUJzPjm5z4tdbxabneDBBYSeqmOvwDEJM1Rt6vBzud4XKtzxjcVIWwy2 2FTfGsQR3t4NqNMLZ0rmcDNKXXYt7utF/EoVicrvH6vGqdw5Gnh5K/KqWKF6WDFiVxXJ UfJf0sRgXV6lB9Wn8ZvcUM9pqn78AiqCbpKOlgyHX+mXFAdIpVq4c19cQeP+/bsc0/DI GLYUPKYXJEaEESERefXFZ1j1Sg4/bXzaFO6yfg/sRg5kwiBO1qY/e/jAGq6MIvhH2gcc Q7+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788924; x=1685380924; 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=tifie4UXBeiflyejnrNW3Mfmy2natxq8FBP0x9+4ywY=; b=iElAly+I5F+QGEhZJ04y7vJYH8yCTqnN1vFHQ5HnANEZXhI+j0zj45bLVM/m8bLdy8 6pDiYtdZspZDsBZWR+mFtKtWttwuNm7f21oQj3v6D2FfDO+A7CY16Ph9JM7x0FAvhxMP 8oj5zBq4NTSilvQ+NwhvbFdZEQXOxeb3CRpudpEeBkeM64fW8EXgNFJ2Q9vRFOexAkRr ifi8dZVsoivdFdR27lEogrCThIyRunqOyp0dfdTr8/Riv4U80ZAjKIFz3hciHXFtgYzl uHvmQljIE6gong2qPrLnaddezpWCaGlANU6h0b/FreBwzrUGLpvIAXKonRX2NWf+sBsb Giog== X-Gm-Message-State: AC+VfDybJD5VIQPk//5pEHjZ+57VyEeHoH2WYS3CVRc5543tvutIxUzd Dqh2hYqvUpP2IGM+AdRN/SuwNk7+/mc= X-Google-Smtp-Source: ACHHUZ6Vzx7SAuH2k/jbqoDF+FOycRnaXNpwNeaoaqtaa1YBNIw9ck3AAaQqTwKhhaIxrCmN8/UD3w== X-Received: by 2002:a05:6214:2b0d:b0:5eb:74ab:2e5e with SMTP id jx13-20020a0562142b0d00b005eb74ab2e5emr16049801qvb.11.1682788924161; Sat, 29 Apr 2023 10:22:04 -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.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:03 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:40 -0400 Message-Id: <749575616a3bb183c40a8ca321cb32d5f578b71e.1682788743.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) The convention to use % as a prefix is for "special" variables rather than procedures. * gnu/services/audio.scm ((%set-user-group): Rename to... (set-user-group): ... this. --- gnu/services/audio.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index dc83479e40..7874539810 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -143,7 +143,7 @@ (define list-of-symbol? ;; Helpers for deprecated field types, to be removed later. (define %lazy-group (make-symbol "%lazy-group")) -(define (%set-user-group user group) +(define (set-user-group user group) (user-account (inherit user) (group (user-group-name group)))) @@ -636,7 +636,7 @@ (define (mpd-accounts config) (match-record config (user group) ;; TODO: Deprecation code, to be removed. (let ((user (if (eq? (user-account-group user) %lazy-group) - (%set-user-group user group) + (set-user-group user group) user))) (list user group)))) @@ -907,7 +907,7 @@ (define (mympd-accounts config) (match-record config (user group) ;; TODO: Deprecation code, to be removed. (let ((user (if (eq? (user-account-group user) %lazy-group) - (%set-user-group user group) + (set-user-group user group) user))) (list user group)))) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 04/16] services: mpd: Obsolete the 'group' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23:04 +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.168278893932701 (code B ref 63082); Sat, 29 Apr 2023 17:23:04 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:19 +0000 Received: from localhost ([127.0.0.1]:36557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoH4-0008V7-9v for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:19 -0400 Received: from mail-qk1-f171.google.com ([209.85.222.171]:58522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoGx-0008TZ-DY for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:12 -0400 Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-74fb8677a36so46638185a.0 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788925; x=1685380925; 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=jOad/dnL1Fix/DeQmGi57a9BlCufRtJsVYAMDzZKedo=; b=XzjQbOipiIxf9HpmIiXwy+WkRDFMoRnDAIcKnNTtd4vrYAHGRMHosSAWnP2SX6bQ1R U5neollhcF1seNXal6QJO5UZA78mwXq4w5JIrWL+JXH8SHxPWH+6AO7m9w7IPqY3FP/w w8XfhUpJWgZbZ4RFHxSmH2cmEFaWYkfozcwE8v2enSEfdWavndNejNnJ1GMGitiwRqHM 7OELRqzU27W5o/z12yyaxnHo/kyXigZCkiirtxIvmwzVavW4Mmh3Xi4Jee1ZMklyiVwO NIACKwOCgH4qKTFyZM0qzaxovYiCDf+oCC0Le0gA/8R3XTHr/6mrLtI5LF6pTY1rxVbx ++vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788925; x=1685380925; 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=jOad/dnL1Fix/DeQmGi57a9BlCufRtJsVYAMDzZKedo=; b=B27OpTYgrnH0+oi+BZy1Y3q9PRcK1V/4Qj7Lfy7O/qP1PG5RmI26cMvE8GjhcksEwU Zdz84nUCOaIYB3qQ7SFFaJ+0US4UDmmLi6SBsXCJ/Ghdg4FO4NV9FiE2Hrznwuw1QCUY 36zXY6gSk8wwOtaG/izr3K1dbLZRdmsHSsjVzcYFMxP1lg22DuBgKh/E29jylTS0vGF/ tn1goQISK0H3YCStMx/wcL6PNk3YluBBrZEPfRP6s7+sYzCuak8E/sRXqqJaq3ch+4Gv OzJ2J6q8XBGIYs+E431BMmG5RAVBFq/s2ueMdiWpLco9HDZ7vt+OiOgoV48X1/rTs6rN gD9Q== X-Gm-Message-State: AC+VfDyvVy0ox/yqkl+HNUIIQj5R2hLXLHiqTjAfgWDKm51hO7prRWSB 7VblDkXklKylcCY1it96vHz0Xl4uh7c= X-Google-Smtp-Source: ACHHUZ7Ug2QPP3leKsa2iyiF36gPA5d5peu95TQG4kTtb+46ugPICbEgIUm8B46hbosImOmmyqyF4w== X-Received: by 2002:a05:6214:f07:b0:61a:197b:60b with SMTP id gw7-20020a0562140f0700b0061a197b060bmr792702qvb.39.1682788925502; Sat, 29 Apr 2023 10:22:05 -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.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:05 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:41 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Prior to this change, there was a discrepancy where a user could have disagreeing groups between the group and user fields (the user field being a record, which includes its primary group as a string). This could have caused problems because the USER's group was being used to set the file permissions, while the GROUP name was serialized to MPD's configuration, and MPD would use it to set the group of its running process. Synchronizing both is not practical, as it can easily lead to slightly different objects conflicting, again causing problems. The compromise is to obsolete the 'group' field. A group can still be configured via the 'user' field, which accepts a object, with the limitation that the group should already exist. * gnu/services/audio.scm (%lazy-group): Delete variable. (%set-user-group): Delete procedure. (mpd-serialize-user-group): Likewise. (%mpd-user) [group]: Default to "audio". (%mpd-group): Delete variable. (mpd-group-sanitizer, mympd-group-sanitizer): Adjust sanitizers. (mpd-configuration, mympd-configuration) [group]: Default to #f. Update doc. (mpd-accounts, mympd-accounts): Remove group. (%mympd-user) [group]: Default to "nogroup". (%mympd-group): Delete variable. * doc/guix.texi: Regenerate doc. --- doc/guix.texi | 15 +++----- gnu/services/audio.scm | 83 +++++++++++------------------------------- 2 files changed, 27 insertions(+), 71 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f8acdbd6b5..34703b1698 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33571,8 +33571,8 @@ Audio Services @item @code{user} (type: user-account) The user to run mpd as. -@item @code{group} (type: user-group) -The group to run mpd as. +@item @code{group} (default: @code{#f}) (type: boolean) +Obsolete. Do not use. @item @code{shepherd-requirement} (default: @code{()}) (type: list-of-symbol) This is a list of symbols naming Shepherd services that this service @@ -33824,15 +33824,12 @@ Audio Services This is a list of symbols naming Shepherd services that this service will depend on. -@item @code{user} (default: @code{%mympd-user}) (type: user-account) +@item @code{user} (type: user-account) Owner of the @command{mympd} process. -The default @code{%mympd-user} is a system user with the name ``mympd'', -who is a part of the group @var{group} (see below). -@item @code{group} (default: @code{%mympd-group}) (type: user-group) -Owner group of the @command{mympd} process. +@item @code{group} (default: @code{#f}) (type: boolean) +Obsolete. Do not use. -The default @code{%mympd-group} is a system group with name ``mympd''. @item @code{work-directory} (default: @code{"/var/lib/mympd"}) (type: string) Where myMPD will store its data. @@ -33872,7 +33869,7 @@ Audio Services Override URI to myMPD. See @uref{https://github.com/jcorporation/myMPD/issues/950}. -@item @code{script-acl} (default: @code{(mympd-ip-acl (allow '("127.0.0.1")))}) (type: maybe-mympd-ip-acl) +@item @code{script-acl} (type: maybe-mympd-ip-acl) ACL to access the myMPD script backend. @item @code{ssl?} (default: @code{#f}) (type: boolean) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 7874539810..60387272fc 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -140,14 +140,6 @@ (define (uglify-field-name field-name) (define list-of-symbol? (list-of symbol?)) -;; Helpers for deprecated field types, to be removed later. -(define %lazy-group (make-symbol "%lazy-group")) - -(define (set-user-group user group) - (user-account - (inherit user) - (group (user-group-name group)))) - ;;; ;;; MPD @@ -175,9 +167,6 @@ (define (mpd-serialize-list-of-strings field-name value) (define (mpd-serialize-user-account field-name value) (mpd-serialize-string field-name (user-account-name value))) -(define (mpd-serialize-user-group field-name value) - (mpd-serialize-string field-name (user-group-name value))) - (define-maybe string (prefix mpd-)) (define-maybe list-of-strings (prefix mpd-)) (define-maybe boolean (prefix mpd-)) @@ -185,20 +174,13 @@ (define-maybe boolean (prefix mpd-)) (define %mpd-user (user-account (name "mpd") - ;; XXX: This is a place-holder to be lazily substituted in (…-accounts) - ;; with the value from the 'group' field of . - (group %lazy-group) + (group "audio") (system? #t) (comment "Music Player Daemon (MPD) user") ;; MPD can use $HOME (or $XDG_CONFIG_HOME) to place its data. (home-directory "/var/lib/mpd") (shell (file-append shadow "/sbin/nologin")))) -(define %mpd-group - (user-group - (name "mpd") - (system? #t))) - ;;; TODO: Procedures for deprecated fields, to be removed. (define mpd-deprecated-fields '((music-dir . music-directory) @@ -242,15 +224,9 @@ (define (mpd-user-sanitizer value) (configuration-field-error #f 'user value)))) (define (mpd-group-sanitizer value) - (cond ((user-group? value) value) - ((string? value) - (warning (G_ "string value for 'group' is deprecated, use \ -user-group instead~%")) - (user-group - (inherit %mpd-group) - (name value))) - (else - (configuration-field-error #f 'group value)))) + (when value + (warning (G_ "'group' in is obsolete; ignoring~%"))) + #f) ;;; @@ -407,9 +383,10 @@ (define-configuration mpd-configuration (sanitizer mpd-user-sanitizer)) (group - (user-group %mpd-group) - "The group to run mpd as." - (sanitizer mpd-group-sanitizer)) + (boolean #f) + "Obsolete. Do not use." + (sanitizer mpd-group-sanitizer) + empty-serializer) (shepherd-requirement (list-of-symbol '()) @@ -633,12 +610,9 @@ (define (mpd-shepherd-service config) (format #t "Service MPD is not running."))))))))))) (define (mpd-accounts config) - (match-record config (user group) - ;; TODO: Deprecation code, to be removed. - (let ((user (if (eq? (user-account-group user) %lazy-group) - (set-user-group user group) - user))) - (list user group)))) + (match-record config + (user) + (list user))) (define mpd-service-type (service-type @@ -676,19 +650,12 @@ (define-maybe/no-serialization mympd-ip-acl) (define %mympd-user (user-account (name "mympd") - ;; XXX: This is a place-holder to be lazily substituted in 'mympd-accounts' - ;; with the value from the 'group' field of . - (group %lazy-group) + (group "nogroup") (system? #t) (comment "myMPD user") (home-directory "/var/empty") (shell (file-append shadow "/sbin/nologin")))) -(define %mympd-group - (user-group - (name "mympd") - (system? #t))) - ;;; TODO: Procedures for unsupported value types, to be removed. (define (mympd-user-sanitizer value) (cond ((user-account? value) value) @@ -702,15 +669,10 @@ (define (mympd-user-sanitizer value) (configuration-field-error #f 'user value)))) (define (mympd-group-sanitizer value) - (cond ((user-group? value) value) - ((string? value) - (warning (G_ "string value for 'group' is not supported, use \ -user-group instead~%")) - (user-group - (inherit %mympd-group) - (name value))) - (else - (configuration-field-error #f 'group value)))) + (when value + (warning (G_ "'group' in is obsolete; ignoring~%"))) + #f) + ;;; @@ -737,8 +699,8 @@ (define-configuration/no-serialization mympd-configuration empty-serializer) (group - (user-group %mympd-group) - "Owner group of the @command{mympd} process." + (boolean #f) + "Obsolete. Do not use." (sanitizer mympd-group-sanitizer) empty-serializer) @@ -904,12 +866,9 @@ (define (mympd-shepherd-service config) (stop #~(make-kill-destructor)))))) (define (mympd-accounts config) - (match-record config (user group) - ;; TODO: Deprecation code, to be removed. - (let ((user (if (eq? (user-account-group user) %lazy-group) - (set-user-group user group) - user))) - (list user group)))) + (match-record config + (user) + (list user))) (define (mympd-log-rotation config) (match-record config (log-to) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 05/16] services: mpd: List log-level in decreasing verbosity order in doc. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23:04 +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.168278894032714 (code B ref 63082); Sat, 29 Apr 2023 17:23:04 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:20 +0000 Received: from localhost ([127.0.0.1]:36560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoH5-0008VP-Ld for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:20 -0400 Received: from mail-qv1-f51.google.com ([209.85.219.51]:55475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoGy-0008Tg-Ek for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:12 -0400 Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-5f16be5dccfso10579606d6.2 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788927; x=1685380927; 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=ZzBLQkSBjhHE/4tIiPQDxZRT+AQYtB94utaJFJc6Eqg=; b=ekhXlI0WsR5FKicMBomDL7Qk+cnZWkFfORzy5DnWfK9uNrFFxZPmEWWh2lgr4LjNHl otdZ7FIvUPuIO1V9uJ3diKRvUuX9QI05kUWCtYkLgdTUt4aVJ3keGc1Be9Zxtw/am5f7 fbRD71x5EWF/b3CJ/M/goYTVyOFeMSm/h2D1fJnPaxYBUJ+SbJmJPCpFNmGyc6IH3qeI Oa7BpWKfNYTiyG9mcBC2KumhROPk9HAONpKLUhu7KXUdIpZOzUxAwnFc+AHAKUuvOr+r S0CPD/xX9ff96AxjyVGZPnA5U2wU97Tl71DF6/H4kZuyqR9kjlvK/V5u69t6B37LF8CZ VyKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788927; x=1685380927; 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=ZzBLQkSBjhHE/4tIiPQDxZRT+AQYtB94utaJFJc6Eqg=; b=fx57TJmqSZqW5+Yp9cCmuL5b9mEf57pQaif6bI6+3wHc4gTO92+JZ3ZsggCgezIIQa WHu2iG81Q7S94w3eO+3jVz830zWOpxQjXfA+MDkKeDeHPyrb6mBUjs+wLYKqTWRpCzL9 L4J4u6LF/+eZ8BtbnqLtLXBSwP6n/oW5YTqylIjvHU9jjF/TkQCaWOCr20ZAAexIF0kT REvxTKSdZjJTSu9hnXiJz3uDYdxw96/N2u8fCSySTkGDvEg4Pnx1hlpyY24ZndyCoESV jDHkLErunFbSMVUXQY6VaDNetJYS8fepDncWKI8L0fF42AZ27f1eerYnZpe1EQdjfIji P0Lg== X-Gm-Message-State: AC+VfDwu3Vhq35XTtuMaTEfSIhZpa/62kcmYn7wQP8FhXO2snFIJn9Bo qCYJimtxUOAobYujsSp/y09STW+RaZc= X-Google-Smtp-Source: ACHHUZ6h7USaXrSNcJN+RBEHUur7vLq/w31ztnEaZVVnHELcICfYVh8DrHiaTCH8lONGzyDCUx4q9g== X-Received: by 2002:ad4:5bc9:0:b0:5ef:6185:2e53 with SMTP id t9-20020ad45bc9000000b005ef61852e53mr13232202qvt.23.1682788926753; Sat, 29 Apr 2023 10:22:06 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:06 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:42 -0400 Message-Id: <6921796b7823bf8a022158b5005f191f92450e6a.1682788743.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm (mpd-configuration) [log-level]: List log-level in decreasing verbosity order in doc. * doc/guix.texi (Audio Services): Update doc. --- doc/guix.texi | 6 +++--- gnu/services/audio.scm | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 34703b1698..1aa8dc2809 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33587,9 +33587,9 @@ Audio Services configuration file. @item @code{log-level} (type: maybe-string) -Supress any messages below this threshold. Available values: -@code{notice}, @code{info}, @code{verbose}, @code{warning} and -@code{error}. +Supress any messages below this threshold. The available values, in +decreasing order of verbosity, are: @code{verbose}, @code{info}, +@code{notice}, @code{warning} and @code{error}. @item @code{music-directory} (type: maybe-string) The directory to scan for music files. diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 60387272fc..ead4cb8d90 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -409,8 +409,8 @@ (define-configuration mpd-configuration (log-level maybe-string "Supress any messages below this threshold. -Available values: @code{notice}, @code{info}, @code{verbose}, -@code{warning} and @code{error}.") +The available values, in decreasing order of verbosity, are: @code{verbose}, +@code{info}, @code{notice}, @code{warning} and @code{error}.") (music-directory maybe-string -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 06/16] services: mpd; Refactor start slot directory initialization. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23:05 +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.168278894032721 (code B ref 63082); Sat, 29 Apr 2023 17:23:05 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:20 +0000 Received: from localhost ([127.0.0.1]:36562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoH6-0008Vb-5w for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:20 -0400 Received: from mail-qv1-f50.google.com ([209.85.219.50]:47413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoGz-0008Tp-Tf for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:14 -0400 Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-6196146d636so1444306d6.3 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788928; x=1685380928; 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=FzkFOQ95JVWNZbu2arG+dwpzWOEStFiVEZ/u1Hr8YAI=; b=bK5/xnTlBkGscbomDqvm4YGAof9c1FcI3qsLL0kUYZIYrDTphZFOrRxhgTSI1xpBE+ Vm8TonWt+CjY7Kp1uXw5lZO8ZNfGeQYBhT0nE71gnObw34GnhtDk9I8ZNj/e9OZN7b5e dFpbkrie2koPG9htiiJytnU9B0vUR7R2A2F1KA4gUPbI9MkoIT7p5dFVZ/0JtC73mkhh F0ST6XdBBNhirQhD7IUk0+/g10FS1sQfdG44etX0DYG+Er0QYs2FzbGpbCHDcVbKioWK D3jkWpLSgqAqPK/gOHaDp/AX5rnYhSylM3eJ2vCiZYVF6BYqnL7TtrjoTXLnGjcmEcTb DnDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788928; x=1685380928; 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=FzkFOQ95JVWNZbu2arG+dwpzWOEStFiVEZ/u1Hr8YAI=; b=PNMvfuPrv81UGDQejgdzqagbAwLNIAfU4KVL7ed7y61XYnLqeEf4WmD7x/sbbKcP0i g77UKbho2zbDZbxMpUr8ZBSFbxv3pYW2NErmh+B6WHU2HQ3U6D1x2aMHCCPPevfCuhno u0qTXaW61At5SKzDYTEbYoy6FrnBrnZ2Hu0yyTFQ6PiqjO6WBxUEfXzRwAt975lg9hIu UEw2Vf7Q60n7WgUVP1ifZ8+ZqKKRZC+/9LMJDQOMEv/hz2xk5hQYKN25C3lrFgVndE9j +Idkw5k/dcGlyt6owmoIKdZO3eICh+vi4FomoWp1DhMw7qWyC9pYmB8yVIgmn3geBoGw OuUQ== X-Gm-Message-State: AC+VfDwAtM78zV8QnbzvPkvoAuiOi/ycWDUkaZQlTUC94pGNtzgau5c+ Ln9lABUJxJyhhelvnQb0TLJnXJKWdYI= X-Google-Smtp-Source: ACHHUZ5U6meC8ylLP/rFPgEnm9x9A9D6atCU4lHfJt+zW9l3DSK+NA1392IaznQr1X6yzNleDh5v7A== X-Received: by 2002:a05:6214:627:b0:5af:af15:8d44 with SMTP id a7-20020a056214062700b005afaf158d44mr13793315qvx.45.1682788928165; Sat, 29 Apr 2023 10:22:08 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:07 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:43 -0400 Message-Id: <05631cf44341b93ef5b91337e21f9d49f3b3b824.1682788743.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm (mpd-shepherd-service): Standardize the way the log file parent and other directories are initialized in the start slot. (mympd-shepherd-service): Likewise. --- gnu/services/audio.scm | 132 ++++++++++++++++++++++++----------------- 1 file changed, 77 insertions(+), 55 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index ead4cb8d90..6e57bf5cba 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -24,6 +24,7 @@ (define-module (gnu services audio) #:use-module (guix deprecation) #:use-module (guix diagnostics) #:use-module (guix i18n) + #:use-module (guix modules) #:use-module (gnu services) #:use-module (gnu services admin) #:use-module (gnu services configuration) @@ -552,36 +553,45 @@ (define (mpd-log-rotation config) (with-shepherd-action 'mpd ('reopen) #f)))))) (define (mpd-shepherd-service config) - (match-record config (user package shepherd-requirement - log-file playlist-directory - db-file state-file sticker-file - environment-variables) + (match-record config + (user package shepherd-requirement + log-file playlist-directory + db-file state-file sticker-file + environment-variables) (let ((config-file (mpd-serialize-configuration config)) (username (user-account-name user))) (shepherd-service (documentation "Run the MPD (Music Player Daemon)") (requirement `(user-processes loopback ,@shepherd-requirement)) (provision '(mpd)) - (start #~(begin - (and=> #$(maybe-value log-file) - (compose mkdir-p dirname)) - - (let ((user (getpw #$username))) - (for-each - (lambda (x) - (when (and x (not (file-exists? x))) - (mkdir-p x) - (chown x (passwd:uid user) (passwd:gid user)))) - (list #$(maybe-value playlist-directory) - (and=> #$(maybe-value db-file) dirname) - (and=> #$(maybe-value state-file) dirname) - (and=> #$(maybe-value sticker-file) dirname)))) - - (make-forkexec-constructor - (list #$(file-append package "/bin/mpd") - "--no-daemon" - #$config-file) - #:environment-variables '#$environment-variables))) + (start + (with-imported-modules (source-module-closure + '((gnu build activation))) + #~(begin + (use-modules (gnu build activation)) + + (let ((user (getpw #$username))) + + (define (init-directory directory) + (unless (file-exists? directory) + (mkdir-p/perms directory user #o755))) + + (for-each + init-directory + '#$(map dirname + ;; XXX: Delete the potential "syslog" + ;; log-file value, which is not a directory. + (delete "syslog" + (filter-map maybe-value + (list db-file + log-file + state-file + sticker-file)))))) + + (make-forkexec-constructor + (list #$(file-append package "/bin/mpd") "--no-daemon" + #$config-file) + #:environment-variables '#$environment-variables)))) (stop #~(make-kill-destructor)) (actions (list (shepherd-configuration-action config-file) @@ -833,37 +843,49 @@ (define (mympd-serialize-configuration config) filename-to-field))))) (define (mympd-shepherd-service config) - (match-record config (package shepherd-requirement - user work-directory - cache-directory log-level log-to) - (let ((log-level* (format #f "MYMPD_LOGLEVEL=~a" log-level)) - (username (user-account-name user))) - (shepherd-service - (documentation "Run the myMPD daemon.") - (requirement `(loopback user-processes - ,@(if (eq? log-to 'syslog) - '(syslog) - '()) - ,@shepherd-requirement)) - (provision '(mympd)) - (start #~(begin - (let* ((pw (getpwnam #$username)) - (uid (passwd:uid pw)) - (gid (passwd:gid pw))) - (for-each (lambda (dir) - (mkdir-p dir) - (chown dir uid gid)) - (list #$work-directory #$cache-directory))) - - (make-forkexec-constructor - `(#$(file-append package "/bin/mympd") - "--user" #$username - #$@(if (eq? log-to 'syslog) '("--syslog") '()) - "--workdir" #$work-directory - "--cachedir" #$cache-directory) - #:environment-variables (list #$log-level*) - #:log-file #$(if (string? log-to) log-to #f)))) - (stop #~(make-kill-destructor)))))) + (match-record config + (package shepherd-requirement user work-directory cache-directory + log-level log-to) + (shepherd-service + (documentation "Run the myMPD daemon.") + (requirement `(loopback user-processes + ,@(if (eq? log-to 'syslog) + '(syslog) + '()) + ,@shepherd-requirement)) + (provision '(mympd)) + (start + (let ((username (user-account-name user))) + (with-imported-modules (source-module-closure + '((gnu build activation))) + #~(begin + (use-modules (gnu build activation)) + + (let ((user (getpw #$username))) + + (define (init-directory directory) + (unless (file-exists? directory) + (mkdir-p/perms directory user #o755))) + + (for-each + init-directory + '#$(map dirname + ;; XXX: Delete the potential 'syslog log-file value, + ;; which is not a directory. + (delete 'syslog + (filter-map maybe-value + (list log-to + work-directory + cache-directory)))))) + (make-forkexec-constructor + `(#$(file-append package "/bin/mympd") + "--user" #$username + #$@(if (eq? log-to 'syslog) '("--syslog") '()) + "--workdir" #$work-directory + "--cachedir" #$cache-directory) + #:environment-variables + (list #$(format #f "MYMPD_LOGLEVEL=~a" log-level)) + #:log-file #$(if (string? log-to) log-to #f))))))))) (define (mympd-accounts config) (match-record config -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 11/16] services: mpd: Warn when the MPD user is not in the "audio" group. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23:05 +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.168278894132730 (code B ref 63082); Sat, 29 Apr 2023 17:23:05 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:21 +0000 Received: from localhost ([127.0.0.1]:36564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoH6-0008Vi-P3 for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:21 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:62486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoH1-0008T6-9Q for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:15 -0400 Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-7515631b965so184093085a.0 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788935; x=1685380935; 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=9LFeL7l7LE5J2ndqbCbw5hKIGzSWVdt45VK5TRc55k4=; b=Pb0g4Ly5kDJ8COpXrAMwrgXHzbUqeJsVkn7f5eQDxxI9ps1jKqn07BGOHBL5z+M9W+ UumAQ3AEpD12JynIEAqjQ99JzZ2EZEgkL+/Sr1ajJI0mr4gEQ6lexfUYNaWFkHEjSZz3 LJkxu9RC81riKD8UaVmUWNIq06w7b8EQGmwoDdhOdw7DYP4jGOyrHn+mPm1dbQkJRX9F 9peXOLg6NQvtAX5x1CxTKN1Ksx3RiRTFzWir/ZqDx8rckzF3gfgKa4AfgYnH/O11eEqD 13eqatvlazmdFU82sWNA8lqSRK2TJdEaKk3IDNIxWoBSgKElxZfHnGJhdQ8yli+HpdY9 TZFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788935; x=1685380935; 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=9LFeL7l7LE5J2ndqbCbw5hKIGzSWVdt45VK5TRc55k4=; b=EqgaVVBgW7lSijdJTz+6z0ND4SAii4ZDgv/lSIuiXsTZQlON2NQYh035PwLElRbh2p zX9e64GH8lf/JbGNa3LZwzCyX4DYYRv/d4PEMHgvZjDqXv0xvh0VgeHdCCN9h3FCS5fN XPDEmAqAx2pCgkt5FlaaSKwGrf7RuLdYw7G5gf94MbQUy2xYhLuYEXk5grw1v7/ZYLdW 6JKa+MlFfQOUTTR93OaIbVV1SS1yOPUXyiKtuJNurVuHeTbyhd6uOcpz2lNu7XVoUFju JFsph5cn6ryw5ZLITgjIjvX0nnG7NhKDrVzz7Ziq+WXC1I0b5bZUDaBihW0lckdbWc1k /FbQ== X-Gm-Message-State: AC+VfDzSg4wZMZTWU56ySLs6wR5IYFnklTsM5dZ+PB9QnVGKsaY0gZwr pxZ13ls3zywUhugmzJA6ma+sGnmdSSc= X-Google-Smtp-Source: ACHHUZ5yswg+Jjw85xBt9/iZGosVY5XN3rZWYcRmUp9bBIbF3nbWeBIeXAgsPhHJFj05NvnN2vr0SQ== X-Received: by 2002:a05:6214:5297:b0:5e7:c44f:5098 with SMTP id kj23-20020a056214529700b005e7c44f5098mr23284874qvb.13.1682788934771; Sat, 29 Apr 2023 10:22:14 -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.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:14 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:48 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . * gnu/services/audio.scm (%mpd-user) [group]: Add comment. (mpd-user-sanitizer): Warn if the MPD user is not in the audio group. --- gnu/services/audio.scm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index f470ca20e0..7040a63ecd 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -31,6 +31,7 @@ (define-module (gnu services audio) #:use-module (gnu services configuration) #:use-module (gnu services shepherd) #:use-module (gnu services admin) + #:use-module (gnu system accounts) #:use-module (gnu system shadow) #:use-module (gnu packages admin) #:use-module (gnu packages mpd) @@ -173,6 +174,8 @@ (define-maybe boolean (prefix mpd-)) (define %mpd-user (user-account (name "mpd") + ;; Being in the audio group ensures that PulseAudio can access sound + ;; devices. (group "audio") (system? #t) (comment "Music Player Daemon (MPD) user") @@ -209,10 +212,17 @@ (define (mpd-serialize-port field-name value) (define-maybe port (prefix mpd-)) -;;; Procedures for unsupported value types, to be removed. - +;;; Sanitizer procedures. (define (mpd-user-sanitizer value) - (cond ((user-account? value) value) + (cond ((user-account? value) + (match-record value + (group supplementary-groups) + (unless (or (string=? "audio" group) + (member "audio" supplementary-groups)) + ;; Being in the "audio" group is necessary for access to the + ;; sound devices. + (warning (G_ "mpd user not member of \"audio\" group~%")))) + value) ((string? value) (warning (G_ "string value for 'user' is deprecated, use \ user-account instead~%")) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 07/16] services: mpd: Log to syslog by default. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23:05 +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.168278894132736 (code B ref 63082); Sat, 29 Apr 2023 17:23:05 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:21 +0000 Received: from localhost ([127.0.0.1]:36566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoH7-0008Vr-5H for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:21 -0400 Received: from mail-qv1-f52.google.com ([209.85.219.52]:54300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoH1-0008U5-8u for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:15 -0400 Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-5f45fad3be1so10738896d6.0 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788929; x=1685380929; 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=LiV3js+T9Z7UcFYGft2OOApTn79wTpWfY7S5LUiK7X8=; b=TLqxHlAK/tZ83SFXcxnaa+/7un7Bz2WfuprITq0Go18sKrq/Cw49SuZLXG07zmgTeh qfwN/aWhkvvfZkfeJQXSlGWJtgbqm/5KpWtOBCWDa2WLD4JEqM6KXZ+wEzKdLjwl291D IwI/78gtH0YH0EPCTjoMj/Q0oD5EK9/AtxNDHwn4rNeIJ6ubQeNVn5+UGUtjO8qGDLye xVgXmvUxnOyFv+lBpYdaH877NENkh7+q0wBKoRslXeANm06vFPCxmYer1TvvV4SZKMzS GrHIdKuzDanvdCoqYAxroRnK6efowK0fBV1JMGiwAXsLji2q3cGnR5P5alDNht7ahbdN lHfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788929; x=1685380929; 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=LiV3js+T9Z7UcFYGft2OOApTn79wTpWfY7S5LUiK7X8=; b=R0zPhskYaOT0AZKHA4MHefMF3w0hDrUIHdsy1M7fCCcTWaGCZFU8g7mwvlBcY6eBZ0 hOe/5FM7m+jlOVIc5KqRuorCQDBybPFXu35T69hNfmZM72qfj/oXk3CpDS0h9BfP4zVf 0NeH9imVJeCO2AZJ9IPL87o9Q26HmzV4kih9E3RvN9JypwBJWIgGwLljSnJySjngXi7i 3JR0scYE36Kn4bQuFRvKzWDwj7Rrn+a/aKtnX1rHFClG79AzYkPTgJLgsegH7Sk7aAox rg6xye1618ExntNPkWETKjgrf79uvF0xL9VJGDWuyBGdA1Rr7Mjg9HaH1hdESC0kFEi7 ltzA== X-Gm-Message-State: AC+VfDwP41WvkzsFDck/eKN95z5na1IKvlJUTrpTdhwM6k5K5DZATAlL 02xs+kDoG6MZGprtApzbp03W6euvPrU= X-Google-Smtp-Source: ACHHUZ5e0V+BK4jJmQ4F0b/UqcUGZXZePFpNfAIHpzUDO/BSNRm16zVMZzMr8cYsEjmv2hbpNZzZXw== X-Received: by 2002:a05:6214:124b:b0:5ef:83cf:91cc with SMTP id r11-20020a056214124b00b005ef83cf91ccmr15158148qvv.44.1682788929524; Sat, 29 Apr 2023 10:22:09 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:09 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:44 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Rationale: the tristate value was awkward to deal with, the default log file name was odd (/var/log/mpd/log) and it required special attention to create the 'mpd' parent directory as root and chowning it to the MPD user. It also didn't match the default behavior of MPD, which is to log to systemd or syslog unless a log file is specified. * gnu/services/audio.scm (mpd-log-file-sanitizer): New procedure. (mpd-configuration) [log-file]: Remove default maybe value. Add sanitizer. (mpd-shepherd-service): Validate the log file parent directory exists and has the right permissions. Conditionally add syslogd to requirements. (mympd-log-to-sanitizer): New procedure. (mympd-configuration) [log-to]: Change type to maybe-string. Update doc and add sanitizer. (mympd-shepherd-service) [requirement]: Fix to use syslogd. Adjust accordingly. [start] Adjust accordingly. (mympd-log-rotation): Check log-to via maybe-value-set?. * doc/guix.texi (Audio Services): Update doc. --- doc/guix.texi | 17 +++++----- gnu/services/audio.scm | 74 ++++++++++++++++++++++++++++-------------- 2 files changed, 57 insertions(+), 34 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 1aa8dc2809..e558e5bb18 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33581,10 +33581,10 @@ Audio Services @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{log-file} (default: @code{"/var/log/mpd/log"}) (type: maybe-string) -The location of the log file. Set to @code{syslog} to use the local -syslog daemon or @code{%unset-value} to omit this directive from the -configuration file. +@item @code{log-file} (type: maybe-string) +The location of the log file. Unless specified, logs are sent to the +local syslog daemon. Alternatively, a log file name can be specified, +for example @file{/var/log/mpd.log}. @item @code{log-level} (type: maybe-string) Supress any messages below this threshold. The available values, in @@ -33855,11 +33855,10 @@ Audio Services How much detail to include in logs, possible values: @code{0} to @code{7}. -@item @code{log-to} (default: @code{"/var/log/mympd/log"}) (type: string-or-symbol) -Where to send logs. By default, the service logs to -@file{/var/log/mympd.log}. The alternative is @code{'syslog}, which -sends output to the running syslog service under the @samp{daemon} -facility. +@item @code{log-to} (type: maybe-string) +Where to send logs. Unless specified, the service logs to the local +syslog service under the @samp{daemon} facility. Alternatively, a log +file name can be specified, for example @file{/var/log/mympd.log}. @item @code{lualibs} (default: @code{"all"}) (type: maybe-string) See diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 6e57bf5cba..c1295837b6 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -229,6 +229,18 @@ (define (mpd-group-sanitizer value) (warning (G_ "'group' in is obsolete; ignoring~%"))) #f) +(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)))) + ;;; ;; Generic MPD plugin record, lists only the most prevalent fields. @@ -402,10 +414,11 @@ (define-configuration mpd-configuration empty-serializer) (log-file - (maybe-string "/var/log/mpd/log") - "The location of the log file. Set to @code{syslog} to use the -local syslog daemon or @code{%unset-value} to omit this directive -from the configuration file.") + maybe-string + "The location of the log file. Unless specified, logs are sent to the +local syslog daemon. Alternatively, a log file name can be specified, for +example @file{/var/log/mpd.log}." + (sanitizer mpd-log-file-sanitizer)) (log-level maybe-string @@ -562,7 +575,11 @@ (define (mpd-shepherd-service config) (username (user-account-name user))) (shepherd-service (documentation "Run the MPD (Music Player Daemon)") - (requirement `(user-processes loopback ,@shepherd-requirement)) + (requirement `(user-processes loopback + ,@(if (string=? "syslog" log-file) + '(syslogd) + '()) + ,@shepherd-requirement)) (provision '(mpd)) (start (with-imported-modules (source-module-closure @@ -683,6 +700,15 @@ (define (mympd-group-sanitizer value) (warning (G_ "'group' in is obsolete; ignoring~%"))) #f) +(define (mympd-log-to-sanitizer value) + (match value + ('syslog + (warning (G_ "syslog symbol value for 'log-to' is deprecated~%")) + %unset-value) + ((or %unset-value (? string?)) + value) + (_ (configuration-field-error #f 'log-to value)))) + ;;; @@ -749,10 +775,11 @@ (define-configuration/no-serialization mympd-configuration "How much detail to include in logs, possible values: @code{0} to @code{7}.") (log-to - (string-or-symbol "/var/log/mympd/log") - "Where to send logs. By default, the service logs to -@file{/var/log/mympd.log}. The alternative is @code{'syslog}, which -sends output to the running syslog service under the @samp{daemon} facility." + maybe-string + "Where to send logs. Unless specified, the service logs to the local +syslog service under the @samp{daemon} facility. Alternatively, a log file +name can be specified, for example @file{/var/log/mympd.log}." + (sanitizer mympd-log-to-sanitizer) empty-serializer) (lualibs @@ -849,9 +876,9 @@ (define (mympd-shepherd-service config) (shepherd-service (documentation "Run the myMPD daemon.") (requirement `(loopback user-processes - ,@(if (eq? log-to 'syslog) - '(syslog) - '()) + ,@(if (maybe-value-set? log-to) + '() + '(syslogd)) ,@shepherd-requirement)) (provision '(mympd)) (start @@ -867,16 +894,12 @@ (define (mympd-shepherd-service config) (unless (file-exists? directory) (mkdir-p/perms directory user #o755))) - (for-each - init-directory - '#$(map dirname - ;; XXX: Delete the potential 'syslog log-file value, - ;; which is not a directory. - (delete 'syslog - (filter-map maybe-value - (list log-to - work-directory - cache-directory)))))) + (for-each init-directory + '#$(map dirname (filter-map maybe-value + (list log-to + work-directory + cache-directory))))) + (make-forkexec-constructor `(#$(file-append package "/bin/mympd") "--user" #$username @@ -885,7 +908,7 @@ (define (mympd-shepherd-service config) "--cachedir" #$cache-directory) #:environment-variables (list #$(format #f "MYMPD_LOGLEVEL=~a" log-level)) - #:log-file #$(if (string? log-to) log-to #f))))))))) + #:log-file #$(maybe-value log-to))))))))) (define (mympd-accounts config) (match-record config @@ -893,8 +916,9 @@ (define (mympd-accounts config) (list user))) (define (mympd-log-rotation config) - (match-record config (log-to) - (if (string? log-to) + (match-record config + (log-to) + (if (maybe-value-set? log-to) (list (log-rotation (files (list log-to)))) '()))) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 08/16] services: mpd: Do not rotate logs when using syslog. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23:06 +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.1682788958322 (code B ref 63082); Sat, 29 Apr 2023 17:23:06 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:38 +0000 Received: from localhost ([127.0.0.1]:36573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoHN-000056-P1 for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:37 -0400 Received: from mail-qt1-f181.google.com ([209.85.160.181]:53377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoH2-0008UI-Ip for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:16 -0400 Received: by mail-qt1-f181.google.com with SMTP id d75a77b69052e-3ef6e8493ebso5086661cf.2 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788931; x=1685380931; 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=VRLJQ2UELRV3IoSgFwgpQCJTIshUesj0ylHqCs4qFfs=; b=WVDLaznXHZ13OzBPnEEtb0lfP75AUAgiWzdToGtNa4Q8sNwnTLZbOguG1dZEQHATfm pFBNFmh+5ikgaRaNmPqi9SQo1ZtNr45rH84teyQ7McnaD6/ock9+Se2dXgt0DVNu/aWO UPidgzIgpyjl/pE99J8s6OL1Un/T4UGLlaZ/p8FytnpKQMi5hw+InuF6qMgIV1Vn+kFG wI5a9VDnVicy04fLs6s9vM3diFcP6XtX4zkc5fIa+edQ/vRu1dKCH7lATdzIQkkVln08 BAqhn4iOajkg2FmBObwVGcaJ9BW8ceqx1/Y6DaRZkSEL0ri0jY2WUagPgEG0scp7Yiht 8cUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788931; x=1685380931; 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=VRLJQ2UELRV3IoSgFwgpQCJTIshUesj0ylHqCs4qFfs=; b=AS/TEp8roNngUXiVM1yp/5y7P7C/EbtQgakjFzmwXuFrp6/vbI36G6SN2iZHDp6a6b o8O7bHX+KN4LoE++vzExvVPUaHj8nFnj47dsBf228szvu10zHoun+6tTkGjjp7mrRLBS 2lbmThbU5heCtgNm89UBfIK1r+fpChl2adkmOfcxX5nuIcOuQj9P1ftzA1gfEYRT+4Nc Vl1Vqt6A9ulDUVmjKQMZzZ+kiPP6Vo64ZWWEJXzO3K3p38WRSYbc7s85sKNj/1qR4+Gk gi2fALkzL0Y9FJJwn22//Sk/5BCsAk1Z8eFk1kQXu5KDqn8HUMOk+pXjqblLz1cort3C dvGQ== X-Gm-Message-State: AC+VfDxLKo8ZwrCZuxBE4/1WaXrv6nMca30Yo2kRshDqO7L5M4IWuaPn 1S54RDcqP0gn+yzYk1lK+2oBKIXMkWQ= X-Google-Smtp-Source: ACHHUZ5w0guS5iEVmDB8LH+UwG/bg+v0QeC+0eZrL0XTBATari0i+aCWvWWzVTo/DE5rg6TDK5RqEg== X-Received: by 2002:ac8:7f09:0:b0:3e3:7dc9:b85a with SMTP id f9-20020ac87f09000000b003e37dc9b85amr14298225qtk.59.1682788930980; Sat, 29 Apr 2023 10:22:10 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:10 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:45 -0400 Message-Id: <31a6d4e3a35e110750f5a82930e2423097d92d85.1682788743.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm (mpd-log-rotation): Conditionlize based on the value of LOG-FILE. --- gnu/services/audio.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index c1295837b6..7fb4b8ccf7 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -558,12 +558,15 @@ (define (mpd-serialize-configuration configuration) (serialize-configuration configuration mpd-configuration-fields))) (define (mpd-log-rotation config) - (match-record config (log-file) - (log-rotation - (files (list log-file)) - (post-rotate #~(begin - (use-modules (gnu services herd)) - (with-shepherd-action 'mpd ('reopen) #f)))))) + (match-record config + (log-file) + (if (string=? "syslog" log-file) + '() ;nothing to do + (list (log-rotation + (files (list log-file)) + (post-rotate #~(begin + (use-modules (gnu services herd)) + (with-shepherd-action 'mpd ('reopen) #f)))))))) (define (mpd-shepherd-service config) (match-record config -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 09/16] services: mpd: Let Shepherd effect the user/group change. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23:06 +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.1682788958332 (code B ref 63082); Sat, 29 Apr 2023 17:23:06 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:38 +0000 Received: from localhost ([127.0.0.1]:36575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoHO-000059-1h for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:38 -0400 Received: from mail-qt1-f179.google.com ([209.85.160.179]:51695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoH4-0008UU-17 for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:19 -0400 Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-3ef32014101so11908741cf.3 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788932; x=1685380932; 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=o4UIS3U/bY8kp0hnhqOqYc6kj4830zgb5qRPv7NhxHU=; b=bQsLlhB6XX38wrDbza6rGsdKUvSUgFfc8R5xnwkkuhYsR/usSn/x+vk+XVl/AobSZG VnxRKIT4PdLM9bUWOZlX+laTvjVGOga/RS0vkTGm/jFWzAZ/SA5A8haa9uhbArvI6iWd udPyvQKluvsnsOeO+2zDQV9R7oDtEHAoJSKlG93fDL0UIiumbYxZqXckNJvC1J1OPnO0 1FJhAgWdlgMot2fKu9m72klE/XkcaQZCoPGD6kBxp+rBBfY5+Sb5wtnHEPlXJJCoHDaP vy4qg4BtoHCP9QdtUjNwnc9Xsb+PYaFnClnQEFSh6kteeW2iQ2K+BIlEqmR+8V1/BSR2 MAEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788932; x=1685380932; 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=o4UIS3U/bY8kp0hnhqOqYc6kj4830zgb5qRPv7NhxHU=; b=Rdz590UrMJM0Zp3rNO99LDhy81mdJt/X2WIK8vkTkqQFBGZYoNB8q3A9skQrQom0/Q /gHRF0Lkbhx4CKWkfdJzbT4/bkjzBDqigv5dqA9j+82qf2BBXv0diEToNBYlMiIqBFRd fEx8t5P4aOdF2dLaccJ+Ki6Xk1Zn6NHqdnxe3bK4DRw8GpLFj26qEI1RMbogGjmROsE3 +ho/xmDX1UnBC+8oSWwBGZLpyNVb0weepILyKisGzlXWKX+jhbdxCr7pWKCIYcpijVUc +t50ENA6fTvEEtg+pX4OV2VtZFmYzy51Db1wFZva8PBD5bON20MoZ3WwjDBdIWiX7DVY RsFw== X-Gm-Message-State: AC+VfDxyTutLD/azQ8GzxeXfJs9eoG58aIw5XTTCEgSkq6blFtb/yjkr fycoUvnPIfeA9CGai8brP0ywZQRVJdQ= X-Google-Smtp-Source: ACHHUZ4ssYmiFA9SdT2ZITVgF5uptIvcvZS+sRSqQ01+o+c5lvnE6p8tsvzl2OU+DIL5RzYOBwc38w== X-Received: by 2002:a05:622a:46:b0:3e4:903:4edf with SMTP id y6-20020a05622a004600b003e409034edfmr14867450qtw.28.1682788932245; Sat, 29 Apr 2023 10:22:12 -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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:11 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:46 -0400 Message-Id: <9425ba1d3c110df4e840b334ce70c9e71af9d03c.1682788743.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . Quoting a MPD developer, regarding MPD's feature to switch user itself: "that's legacy for the dark ages when proper service managers did not exist" :-). * gnu/services/audio.scm (mpd-serialize-user-account) (mpd-serialize-user-group): Delete procedures. * gnu/services/audio.scm (mpd-configuration) [user]: Do not serialize. [group]: Likewise. (mpd-shepherd-service): Provide the #:user, #:group and #:supplementary-groups arguments. (mympd-shepherd-service): Likewise, and remove the '--user' argument. * doc/guix.texi (Audio Services): Update doc. (mympd-configuration) [port]: Change default value to 8080. [ssl-port]: Change default value to 443. * gnu/tests/audio.scm (run-mympd-test): Adjust accordingly. --- doc/guix.texi | 12 +++++----- gnu/services/audio.scm | 52 +++++++++++++++++++++++++----------------- gnu/tests/audio.scm | 4 ++-- 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e558e5bb18..e4dc4fdd17 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33569,7 +33569,7 @@ Audio Services The MPD package. @item @code{user} (type: user-account) -The user to run mpd as. +The user to run @command{mpd} as. @item @code{group} (default: @code{#f}) (type: boolean) Obsolete. Do not use. @@ -33613,7 +33613,7 @@ Audio Services The location of the sticker database. @item @code{default-port} (default: @code{6600}) (type: maybe-port) -The default port to run mpd on. +The default port to run @command{mpd} on. @item @code{endpoints} (type: maybe-list-of-strings) The addresses that mpd will bind to. A port different from @@ -33798,13 +33798,13 @@ Audio Services @uref{https://jcorporation.github.io/myMPD/, myMPD} is a web server frontend for MPD that provides a mobile friendly web client for MPD. -The following example shows a myMPD instance listening on port 80, +The following example shows a myMPD instance listening on port 8080, with album cover caching disabled. @lisp (service mympd-service-type (mympd-configuration - (port 80) + (port 8080) (covercache-ttl 0))) @end lisp @@ -33848,7 +33848,7 @@ Audio Services @item @code{host} (default: @code{"[::]"}) (type: string) Host name to listen on. -@item @code{port} (default: @code{80}) (type: maybe-port) +@item @code{port} (default: @code{8080}) (type: maybe-port) HTTP port to listen on. @item @code{log-level} (default: @code{5}) (type: integer) @@ -33874,7 +33874,7 @@ Audio Services @item @code{ssl?} (default: @code{#f}) (type: boolean) SSL/TLS support. -@item @code{ssl-port} (default: @code{443}) (type: maybe-port) +@item @code{ssl-port} (default: @code{4443}) (type: maybe-port) Port to listen for HTTPS. @item @code{ssl-cert} (type: maybe-string) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 7fb4b8ccf7..f470ca20e0 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2020 Ludovic Courtès ;;; Copyright © 2022⁠–⁠2023 Bruno Victal +;;; Copyright © 2023 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -165,9 +166,6 @@ (define mpd-serialize-boolean mpd-serialize-field) (define (mpd-serialize-list-of-strings field-name value) #~(string-append #$@(map (cut mpd-serialize-string field-name <>) value))) -(define (mpd-serialize-user-account field-name value) - (mpd-serialize-string field-name (user-account-name value))) - (define-maybe string (prefix mpd-)) (define-maybe list-of-strings (prefix mpd-)) (define-maybe boolean (prefix mpd-)) @@ -390,10 +388,14 @@ (define-configuration mpd-configuration "The MPD package." empty-serializer) + ;; Note: The user and its group are not serialized, otherwise MPD would + ;; attempt to switch the user/group itself. The task of switching the + ;; user/group is left to Shepherd instead. (user (user-account %mpd-user) - "The user to run mpd as." - (sanitizer mpd-user-sanitizer)) + "The user to run @command{mpd} as." + (sanitizer mpd-user-sanitizer) + empty-serializer) (group (boolean #f) @@ -458,7 +460,7 @@ (define-configuration mpd-configuration (default-port (maybe-port 6600) - "The default port to run mpd on.") + "The default port to run @command{mpd} on.") (endpoints maybe-list-of-strings @@ -611,7 +613,11 @@ (define (mpd-shepherd-service config) (make-forkexec-constructor (list #$(file-append package "/bin/mpd") "--no-daemon" #$config-file) - #:environment-variables '#$environment-variables)))) + #:environment-variables '#$environment-variables + #:user #$username + #:group #$(user-account-group user) + #:supplementary-groups + '#$(user-account-supplementary-groups user))))) (stop #~(make-kill-destructor)) (actions (list (shepherd-configuration-action config-file) @@ -654,7 +660,7 @@ (define mpd-service-type (service-extension account-service-type mpd-accounts) (service-extension rottlog-service-type - (compose list mpd-log-rotation)))) + mpd-log-rotation))) (default-value (mpd-configuration)))) @@ -770,7 +776,7 @@ (define-configuration/no-serialization mympd-configuration "Host name to listen on.") (port - (maybe-port 80) + (maybe-port 8080) "HTTP port to listen on.") (log-level @@ -805,7 +811,7 @@ (define-configuration/no-serialization mympd-configuration "SSL/TLS support.") (ssl-port - (maybe-port 443) + (maybe-port 4443) "Port to listen for HTTPS.") (ssl-cert @@ -901,17 +907,21 @@ (define (mympd-shepherd-service config) '#$(map dirname (filter-map maybe-value (list log-to work-directory - cache-directory))))) - - (make-forkexec-constructor - `(#$(file-append package "/bin/mympd") - "--user" #$username - #$@(if (eq? log-to 'syslog) '("--syslog") '()) - "--workdir" #$work-directory - "--cachedir" #$cache-directory) - #:environment-variables - (list #$(format #f "MYMPD_LOGLEVEL=~a" log-level)) - #:log-file #$(maybe-value log-to))))))))) + cache-directory)))) + + (make-forkexec-constructor + `(#$(file-append package "/bin/mympd") + "--user" #$username + #$@(if (eq? log-to 'syslog) '("--syslog") '()) + "--workdir" #$work-directory + "--cachedir" #$cache-directory) + #:environment-variables + (list #$(format #f "MYMPD_LOGLEVEL=~a" log-level)) + #:log-file #$(maybe-value log-to) + #:user #$username + #:group #$(user-account-group user) + #:supplementary-groups + '#$(user-account-supplementary-groups user)))))))))) (define (mympd-accounts config) (match-record config diff --git a/gnu/tests/audio.scm b/gnu/tests/audio.scm index acb91293e8..efa07b5ba9 100644 --- a/gnu/tests/audio.scm +++ b/gnu/tests/audio.scm @@ -89,7 +89,7 @@ (define (run-mympd-test) (define vm (virtual-machine (operating-system os) - (port-forwardings '((8080 . 80))))) + (port-forwardings '((8080 . 8080))))) (define test (with-imported-modules '((gnu build marionette)) @@ -113,7 +113,7 @@ (define (run-mympd-test) marionette)) (test-assert "HTTP port ready" - (wait-for-tcp-port 80 marionette)) + (wait-for-tcp-port 8080 marionette)) (test-equal "http-head" 200 -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 10/16] system: accounts: Export . Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23:06 +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.1682788959341 (code B ref 63082); Sat, 29 Apr 2023 17:23:06 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:39 +0000 Received: from localhost ([127.0.0.1]:36577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoHO-00005G-Oy for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:39 -0400 Received: from mail-qt1-f180.google.com ([209.85.160.180]:60921) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoH5-0008UW-3H for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:19 -0400 Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-3ef35d44612so11928661cf.1 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788933; x=1685380933; 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=85aHwTtrAZsvDTtM0VKoidEaKkvUE2p2WOxWRNJlN7s=; b=JKRHZaXUxmGaeqSBHn6j1ZMOtlUz7YiqFq5RMZWdpIjPcXwQTuHs1BSIS3Ni1DEQCe idr0DFZiU4H6vY+YtC6z7GAiuEe3LMccNM0qNdYAxa5K2xjUtnaD8lRn1bizIDJLO/WB YZgHfdGLoJFD3HEbLz/xHMhq+MdHwuCdyR04Vk7R+NeQFa9UzYsYnUi4A1aACzxdTjcM M0r73jftCEUyT4ZZ8VnJu7Ms+q+gEMeBkE3+5dWXR7P/FKc9geRnwlSvy5L0vVv2u/Si oNNjpQlEKnlArfcOFaRPq9INOMHYR0rI3KQoJb3ADssk6UsNxuZie4U0w6UnsdOK92w7 G80Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788933; x=1685380933; 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=85aHwTtrAZsvDTtM0VKoidEaKkvUE2p2WOxWRNJlN7s=; b=J4YJAws7kg3GKr/De/a5PL/gp1ziVAdLcCkxtGGj5bRa5Bwd3oyDkBqBWnPgUQOmZa 2f1xThAnroHHO1CBMVUV3TocMcBz3n3kCf3M0nsVKILqubFFZrFjs4/YemBMSdKHPjkP PHKZPvUPPo3447oJOb6EYqW9GzB0rCQXKYqRwNI4wb0DkqrcP3lVhrSjat9Lwh8hOBAm sK0keqXPwqFrSP2QqcFaqOXTeW4f3ZkgCVqdDLHF7az9F2GBGf+SeZWNbqRXEsBWk9gc lzjj6pID6earFZoQqVK/3oDN8PtWYcUHekZDC1BPkyzi+Vy1xW9OpbGnCCOpNoTHYKwI lYoQ== X-Gm-Message-State: AC+VfDxVA+iHJyoX3OQPSIcbjoEQJQEfdPZTBTZezhCAVapKqtBct0cd coN7tmdHaglt0JvzJHp8vXBov1wpV8M= X-Google-Smtp-Source: ACHHUZ49ZBr/BXw1r/9AY9g0kmoG+EzeNiGVHFLRhEt1dPFLb/DdXBp5iMYT8WdfZWanOturm0rkdg== X-Received: by 2002:ac8:5e53:0:b0:3ef:3880:9db6 with SMTP id i19-20020ac85e53000000b003ef38809db6mr14689146qtx.6.1682788933462; Sat, 29 Apr 2023 10:22:13 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:13 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:47 -0400 Message-Id: <2fee0a05b81ff2925fd82788ca2a8d8c3c920f58.1682788743.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --- gnu/system/accounts.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/system/accounts.scm b/gnu/system/accounts.scm index 586cff1842..e37b733c6d 100644 --- a/gnu/system/accounts.scm +++ b/gnu/system/accounts.scm @@ -19,7 +19,8 @@ (define-module (gnu system accounts) #:use-module (guix records) #:use-module (ice-9 match) - #:export (user-account + #:export ( + user-account user-account? user-account-name user-account-password -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 12/16] services: mpd: Auto-detect mpd-output mixer type by default. 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.1682788959348 (code B ref 63082); Sat, 29 Apr 2023 17:23:07 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:39 +0000 Received: from localhost ([127.0.0.1]:36579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoHP-00005S-4W for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:39 -0400 Received: from mail-qk1-f172.google.com ([209.85.222.172]:58665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoH7-0008Up-Px for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:22 -0400 Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-74e462a540aso45892685a.1 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788936; x=1685380936; 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=a8XlwRoiZCSCDVHCBuiialg7yBqsVRCBxTDRmVUpNtg=; b=EMHzKG5IRa1r2Km0oKGGEAqtSKp1gyu01K99RDyt8Tp4Ft+OO8jOCMCXryTiGGL8xG +ULlPbzFWQr3sx1ExRYWgECWNUJMUwceQ9R+NlgZ+Unyvy6MAxMws9tkUrzTOV+lbi9T EKNMbs6PU3iWGloCOcJs5mFEYCaGl+qCcXFgiaB1e3oohfnUYm5kMEZs9jhLspBwgwha DlZzHm4uIQr+1q82IuPs6ENfK/OFp2wgOP3pWZzqW5PClbWKiuWvnq/A6HBkQWvXrEKe azlNwzIxb2tfmZwwnpyhcOiCYDPxKCZl2MRSW6T41l+vxUB4xMtn1bfGTn39/G626kd2 O0GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788936; x=1685380936; 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=a8XlwRoiZCSCDVHCBuiialg7yBqsVRCBxTDRmVUpNtg=; b=Jb9mGCcs9r4wTAhdQxMTdKIat/CEFZz21OOWx14eRsKcICipXQwoez9bZUKASINlSd hENszUhjPHUq+ga5BTo+exZK54L5+nUc1wvAPuWb7VnWoEb7icc9Am9h2x5r/NmiFjjL NrBqeNkaGnn1MGxkdChmfcQPYN1p7wWckjSb79qMIM/heKHKxCrNc6D7KrRy1VeMJ93W rXyiIOKxw3y3vFJKa5MGZMblr2ciCgEumNYS8+qIdZP/Xetr/BZKoG1QuI6AB/C0XPe4 Phifi7V/P8XfN8ZYqn2mtDm9154tNml+Jh5snllhZHMYZbGDL5q6Y3srSs7inJAE7NEY 5eJg== X-Gm-Message-State: AC+VfDx/d297McYx1tY8p2+qT2G3CKMU2zNr4sZwEDckcaXvcKq4zt/S 3SfLDMiVSXm6HBWOsV76lW9WoTc07pM= X-Google-Smtp-Source: ACHHUZ7ZjyMLhzBgdGFq35dNLCNQCWuvlmu7YnQ6EjTZxilWsIMJt5+yb4VL1Oj3CP6WQgLV17fcXA== X-Received: by 2002:ac8:598e:0:b0:3ef:58ac:82f4 with SMTP id e14-20020ac8598e000000b003ef58ac82f4mr16394976qte.38.1682788936071; Sat, 29 Apr 2023 10:22:16 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:15 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:49 -0400 Message-Id: <0a9f1f82c009e7c9b53217b040c0a4c510338ba9.1682788743.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . * gnu/services/audio.scm (mpd-output) [mixer-type]: Change default value from "none" to unspecified. * doc/guix.texi (Audio Services): Regenerate doc. --- doc/guix.texi | 11 +++++++---- gnu/services/audio.scm | 15 +++++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e4dc4fdd17..3de7405318 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33710,8 +33710,9 @@ Audio Services @end table @end deftp +@c %start of fragment @deftp {Data Type} mpd-output -Data type representing a @command{mpd} audio output. +Available @code{mpd-output} fields are: @table @asis @item @code{name} (default: @code{"MPD"}) (type: string) @@ -33738,15 +33739,16 @@ Audio Services @item @code{always-on?} (default: @code{#f}) (type: boolean) If set to @code{#t}, then MPD attempts to keep this audio output always -open. This may be useful for streaming servers, when you don?t want to +open. This may be useful for streaming servers, when you don’t want to disconnect all listeners even when playback is accidentally stopped. -@item @code{mixer-type} (default: @code{"none"}) (type: string) +@item @code{mixer-type} (type: maybe-string) This field accepts a string that specifies which mixer should be used for this audio output: the @code{hardware} mixer, the @code{software} mixer, the @code{null} mixer (allows setting the volume, but with no effect; this can be used as a trick to implement an external mixer -External Mixer) or no mixer (@code{none}). +External Mixer) or no mixer (@code{none}). When left unspecified, a +@code{hardware} mixer is used for devices that support it. @item @code{replay-gain-handler} (type: maybe-string) This field accepts a string that specifies how @@ -33761,6 +33763,7 @@ Audio Services @end table @end deftp +@c %end of fragment The following example shows a configuration of @command{mpd} that configures some of its plugins and provides a HTTP audio streaming output. diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 7040a63ecd..1e0a8b7f9e 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -346,15 +346,18 @@ (define-configuration mpd-output disconnect all listeners even when playback is accidentally stopped.") (mixer-type - (string "none") - "This field accepts a string that specifies which mixer should be used -for this audio output: the @code{hardware} mixer, the @code{software} -mixer, the @code{null} mixer (allows setting the volume, but with no -effect; this can be used as a trick to implement an external mixer -External Mixer) or no mixer (@code{none})." + maybe-string + "This field accepts a string that specifies which mixer should be used for +this audio output: the @code{hardware} mixer, the @code{software} mixer, the +@code{null} mixer (allows setting the volume, but with no effect; this can be +used as a trick to implement an external mixer External Mixer) or no +mixer (@code{none}). When left unspecified, a @code{hardware} mixer is used +for devices that support it." (sanitizer (lambda (x) ; TODO: deprecated, remove me later. (cond + ((eq? %unset-value x) + x) ((symbol? x) (warning (G_ "symbol value for 'mixer-type' is deprecated, \ use string instead~%")) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 14/16] services: mpd: Provision a default cache directory and set HOME. 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.1682788960363 (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]:36583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoHP-00005g-WF for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:40 -0400 Received: from mail-qk1-f173.google.com ([209.85.222.173]:62854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoHA-0008VM-Jh for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:25 -0400 Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-75131c2997bso959295385a.1 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788939; x=1685380939; 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=XAGn1odtsvcG4FzVbUqlE8Dfg5ejkTEVHTwH2Z7A3jw=; b=PUN2/CMsmEZ01972TxGDdcmGzxQyHOcC1taBFl3+XEsgMQVfOs3skwkDDbdL2OH8wS CY2a5/9We9REXqsQoaLz0NpQqdw4DZearhmp780wbSQ8pCEmNlqliRReNy8qgYpC/DzZ 5U4DBZZ3ZsK9AK9mjsJO2pc2/XYx3Tj6NVCjSBp4yjBdKcVJNmbkttIey9Fl0uhGYunR MDOHqyXO+sQFL1+u0uxoj2LZc1SLWCxtz6HfQjDe3ubxVNGHKEMdv1ELgfY8TilimzQo 6cj5qB20tcA7o9WskWNhPFpxUpTmuxigx7CAM5dy727yryr5nUNB877lsRiWzdpM/C1f hpCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788939; x=1685380939; 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=XAGn1odtsvcG4FzVbUqlE8Dfg5ejkTEVHTwH2Z7A3jw=; b=MDsu25Y322BkYjpCPcKnWA362GdzQWF4kgplV8DgVhfCGjr55Plju7dRvvU7mtl3Fe thMc2GMiXWbDQ1yWpX/lNl8raSStPul2+D0cOWdCuqdAvRTkq5I+kikk4HfMHBE7Bm0v zc21OUiMv2yjU3vFT65pYHLiqjqMQ5tUPWsy4/T5tOoZqfQwIh3Ipq7BXBK8AmmsfU94 rKTxD08whe7IdXuDogN+E1qNxVIV7Ew9bTuMJbHh0O4ZO+fLH7YbTC5Bx4a/uaF7jCtf l5N7UOwL1yTi2R6JUnqZK0JaWZjvfagx++NGsOg20U6JNePWmPtluafaJKVqXAAweDnH vcfw== X-Gm-Message-State: AC+VfDyeNRRKgll+AwM6EzIsxVnfzgjJGqbOkGDv3p0owkmn+GNIbl/3 L2t9jzG5agqQxdAHfojhnowO1iuauWc= X-Google-Smtp-Source: ACHHUZ6lxriI+YaQhphv+CfoxIlfiicf4krC2wHbmXyxfjPOeJzQgVSwXaEdOySYpxxEhuU4wHj3+g== X-Received: by 2002:a05:6214:4105:b0:5df:d35d:2108 with SMTP id kc5-20020a056214410500b005dfd35d2108mr19263196qvb.25.1682788938959; Sat, 29 Apr 2023 10:22:18 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:18 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:51 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . * gnu/services/audio.scm (mpd-shepherd-service): Create a default .cache directory. Use mkdir-p/perms and refactor loop. Set the HOME environment variables. --- doc/guix.texi | 3 +- gnu/services/audio.scm | 68 ++++++++++++++++++++++++------------------ 2 files changed, 41 insertions(+), 30 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 148ca88633..abfbbdb2fc 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33604,7 +33604,8 @@ Audio Services The directory to store playlists. @item @code{db-file} (type: maybe-string) -The location of the music database. +The location of the music database. When left unspecified, +@file{~/.cache/db} is used. @item @code{state-file} (type: maybe-string) The location of the file that stores current MPD's state. diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index dca2e8e5f6..0e90d72462 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -465,7 +465,8 @@ (define-configuration mpd-configuration (db-file maybe-string - "The location of the music database.") + "The location of the music database. When left unspecified, +@file{~/.cache/db} is used.") (state-file maybe-string @@ -609,35 +610,44 @@ (define (mpd-shepherd-service config) #~(begin (use-modules (gnu build activation)) - (let ((user (getpw #$username))) - - (define (init-directory directory) - (unless (file-exists? directory) - (mkdir-p/perms directory user #o755))) + (let ((home #$(user-account-home-directory user))) + (let ((user (getpw #$username)) + (default-cache-dir (string-append home "/.cache"))) + + (define (init-directory directory) + (unless (file-exists? directory) + (mkdir-p/perms directory user #o755))) + + ;; Define a cache location that can be automatically used + ;; for the database file, in case it hasn't been explicitly + ;; specified. + (for-each + init-directory + (cons default-cache-dir + '#$(map dirname + ;; XXX: Delete the potential "syslog" + ;; log-file value, which is not a directory. + (delete "syslog" + (filter-map maybe-value + (list db-file + log-file + state-file + sticker-file))))))) - (for-each - init-directory - '#$(map dirname - ;; XXX: Delete the potential "syslog" - ;; log-file value, which is not a directory. - (delete "syslog" - (filter-map maybe-value - (list db-file - log-file - state-file - sticker-file)))))) - - (make-forkexec-constructor - (list #$(file-append package "/bin/mpd") "--no-daemon" - #$config-file) - #: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 - '#$(user-account-supplementary-groups user))))) + (make-forkexec-constructor + (list #$(file-append package "/bin/mpd") "--no-daemon" + #$config-file) + #:environment-variables + ;; Use the system-configured pulse configuration. Set HOME + ;; so MPD can infer default paths, such as for the database + ;; file. + (list (string-append "HOME=" home) + "PULSE_CLIENTCONFIG=/etc/pulse/client.conf" + "PULSE_CONFIG=/etc/pulse/daemon.conf") + #:user #$username + #:group #$(user-account-group user) + #:supplementary-groups + '#$(user-account-supplementary-groups user)))))) (stop #~(make-kill-destructor)) (actions (list (shepherd-configuration-action config-file) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 15/16] services: mpd: Update basic example. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23:08 +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.1682788960371 (code B ref 63082); Sat, 29 Apr 2023 17:23:08 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:40 +0000 Received: from localhost ([127.0.0.1]:36585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoHQ-00005o-Er for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:40 -0400 Received: from mail-qt1-f179.google.com ([209.85.160.179]:54694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoHC-0008Vo-2y for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:26 -0400 Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-3f1f1a7ecb7so10013511cf.1 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788940; x=1685380940; 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=MKizpeAvPv9hDeVEEfjBets07omPsniIDPGVowCkjs0=; b=pVGNoApBR5G/KrAp4xl5vDW9JBo5wLsyFA5ClWJxUFf6c8eHNJqrHjPkkWox2eJUQb weXwybnlR/dNEoHZaE3TmG1KSTdDZAiKypoCHLE0TQKKQ7di6+/53EZgHh2Y4NYL7Qbb WTq70LM5qt1OL0y4wOv0rXVazh8U3ebBuJIvSj7863lj2AmJDWanwlJQ24NC6joxu5dh gJaLBzFJ8vWS/q8mX/Ss1ALTCO5Y1D1v89uPYWn9XElVJoM3hJ0s8Dck5hDoxwaqv84J XL0mpFnNBLB84FdpSYdYNZi/bmlNPW2O7Os2+J9fxkercp0NMOgfnUfQlHM9B9UMca47 +Njg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788940; x=1685380940; 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=MKizpeAvPv9hDeVEEfjBets07omPsniIDPGVowCkjs0=; b=AhRKggKksU8mx+UyAt8eVRJ62oKPndYVHXIkbgxJtaEZSomb1CEkiQws750egeRlS4 i2O3Dgidb63W7iyafIBUj51drg9zQSPSsSjv6/NYj4ZljChCxYuuIM60pjiGBZGUsMEv 914U3yW6r4Q2yWE7kX44V2VnDfAnuns6LYbrtqDJEyrcNyR4EB2aAubFOvBI2Hb38Ksy NgadTB6MjiFW1NB8e5+qOcCsTxQ7BGLuiDIpKDxqiBowUMikwyiDLo+kE+vJpEcS9kTF G1AUx3uIq9fGIA8JIwFJpNqzOJO/6YSV9NkvfxRS+G2lvsct5/gGFy6aSDIxabP5JY6s 2y2Q== X-Gm-Message-State: AC+VfDx/5HAx+SgZf5hpeTYpKDiiADeS5Y2JlwXt0kVJv82dSb5vEF5x 6xfYwuknnFhjfAn6JbGxjdZYpgOy2QA= X-Google-Smtp-Source: ACHHUZ7nrdafRjZqnntw0kv9gOabbaVx7odO1yvV9W3b0ULZO5s25hUIIwaH0pEpUkex9tAf06M3jg== X-Received: by 2002:a05:622a:207:b0:3f0:a426:5f36 with SMTP id b7-20020a05622a020700b003f0a4265f36mr14864528qtx.49.1682788940467; Sat, 29 Apr 2023 10:22:20 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:20 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:52 -0400 Message-Id: <79f92734cf4cef16b07609c3fb3043b4cb5569c0.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . * doc/guix.texi (Audio Services): Do not use a deprecated user form; keep the default one. Remove port. Specify a music-directory. Mention the importance of permissions on the music directory. --- doc/guix.texi | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index abfbbdb2fc..a26c46ff61 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33536,16 +33536,27 @@ Audio Services being controlled from the local machine or over the network by a variety of clients. -The following example shows how one might run @code{mpd} as user -@code{"bob"} on port @code{6666}. It uses pulseaudio for output. +The following example shows the simplest configuration to locally +expose, via PulseAudio, a music collection kept at @file{/srv/music}, +with @command{mpd} running as the default @samp{mpd} user. This user +will spawn its own PulseAudio daemon, which may compete for the sound +card access with that of your own user. In this configuration, you may +have to stop the playback of your user audio applications to hear MPD's +output and vice-versa. @lisp (service mpd-service-type (mpd-configuration - (user "bob") - (port "6666"))) + (music-directory "/srv/music"))) @end lisp +@quotation Important +The music directory must be readable to the MPD user, by default, +@samp{mpd}. Permission problems will be reported via @samp{Permission +denied} errors in the MPD logs, which appear in @file{/var/log/messages} +by default. +@end quotation + Most MPD clients will trigger a database update upon connecting, but you can also use the @code{update} action do to so: -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 16/16] services: Avoid 'delete' overrides warning in audio module. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:23:08 +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.1682788961378 (code B ref 63082); Sat, 29 Apr 2023 17:23:08 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:22:41 +0000 Received: from localhost ([127.0.0.1]:36587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoHQ-00005v-Qz for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:41 -0400 Received: from mail-qv1-f51.google.com ([209.85.219.51]:46416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoHD-0008W6-A1 for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:22:27 -0400 Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-5ef59b5a1d2so5900766d6.1 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 10:22:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682788942; x=1685380942; 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=dPxsSp8xr1kXwEoNVIZac0MM9Kvq6VKYo8NvRqbN4Fc=; b=X3SLTZaNv59SCzQlecsg3UXT4CUrtAvH9N8q1VXY7+7HJF7KdzKmjClEy/kkbw5dPz L2cCxWYLLQ3cqgWg9+Po+eJNF5jblqTZ2//QP2JrsLq1XkzGQnoeRlzjA3mzF6Irkh3G P7OT1XPTXJw0XStBqiMTGEuGyiGNQxkTsk/fm8ZFOiAbHvnVfwPknzjAtXbmItbNQi29 1U3/pbM3JoMmbXwSxtdM765YLyB/NmXAzOeq9HPQf9VMXUvi71+fQVV3RGinUfnuH+gd Wm7witbnB4lQ2YyhXjoQ02uNIrLZ7LilWbKXy8qNVsZnGQvsHLoiRQ6wXmTYyxqQh1R1 HHrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682788942; x=1685380942; 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=dPxsSp8xr1kXwEoNVIZac0MM9Kvq6VKYo8NvRqbN4Fc=; b=OcTeDHGc9pdheECXIFwNMQFBtv6jp2MJPtbjgOla8lGdzHlczmn/7vyVJ7whdh3Tke WpWM+60Hqlvk5+Mi1JTCMGAFjKZLZ2g4fkrjw+9fQmRl9LaZp9/TJiQ/IYvpzbqaKt1V AMpBuVa4DhOx5XgFPjtgRcGNaU8vDVdIleK082ISQtx9yjWg0VMxzvuwR5WyE0gblzfF fmdF1uxgF7tOvPouMb0mrTByRFaPS+BEgRnrOI1TlDoceCpCb1TJA7QU7AIduMMTcWK7 /y122VuMc4v/iLqZ/NBBN/fYiVPvPGUDIjMCZkmj+IhdNkOy3oMRC/ngc8nMylwvNSmA 5vcw== X-Gm-Message-State: AC+VfDzFNV4RWWWYIx4lX1uIgWyX7Xiog+hLb7aZYgDP1vOMFL5Op3qK uIZrcqq1rXQjIKXHy+0uiWZQ177wHiI= X-Google-Smtp-Source: ACHHUZ49gFvwhYr9/lGkmoRWClJFWmt9J1Fxs64tB8n5NFlsdfH07BGAzTDrrIamg8iNRDUgLejvjw== X-Received: by 2002:a05:6214:21a5:b0:5fd:7701:88c5 with SMTP id t5-20020a05621421a500b005fd770188c5mr13327195qvc.6.1682788941750; Sat, 29 Apr 2023 10:22:21 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 10:22:21 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Apr 2023 13:21:53 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm: Hide 'delete' on (gnu services) import. --- gnu/services/audio.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 0e90d72462..9fc113ed32 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -26,7 +26,7 @@ (define-module (gnu services audio) #:use-module (guix diagnostics) #:use-module (guix i18n) #:use-module (guix modules) - #:use-module (gnu services) + #:use-module ((gnu services) #:hide (delete)) #:use-module (gnu services admin) #:use-module (gnu services configuration) #:use-module (gnu services shepherd) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 14/17] services: mpd: Obsolete 'environment-variables' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 17:24:01 +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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.1682789021626 (code B ref 63082); Sat, 29 Apr 2023 17:24:01 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 17:23:41 +0000 Received: from localhost ([127.0.0.1]:36609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoIP-0000A2-BY for submit@debbugs.gnu.org; Sat, 29 Apr 2023 13:23:41 -0400 Received: from smtpmciv1.myservices.hosting ([185.26.107.237]:57034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psoIN-00009t-LM for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 13:23:40 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv1.myservices.hosting (Postfix) with ESMTP id 4312320987; Sat, 29 Apr 2023 19:23:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id F040D80097; Sat, 29 Apr 2023 19:23:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0SPTacBK25m2; Sat, 29 Apr 2023 19:23:34 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 841FE80060; Sat, 29 Apr 2023 19:23:34 +0200 (CEST) Message-ID: <2e5d3ddb-5948-de11-4fa5-da02e848a8e6@makinata.eu> Date: Sat, 29 Apr 2023 18:23:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: <16e06b4b2a932a7c48696fcc1b89c5a454dc9d2b.1682690696.git.maxim.cournoyer@gmail.com> <2fabf610-5256-dad1-0e62-449fbcc738f0@makinata.eu> <874joyaad3.fsf@gmail.com> From: Bruno Victal In-Reply-To: <874joyaad3.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 2023-04-29 18:04, Maxim Cournoyer wrote: > Hi Bruno, > > Bruno Victal writes: > >> On 2023-04-28 15:27, Maxim Cournoyer wrote: >>> 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. >>> --- >> >> This field shouldn't be deprecated as one of it's primary purposes is to allow for >> the pulseaudio daemon configuration to be set to another one. >> What you're doing here is effectively hardcoding the pulseaudio configuration. > > Our only means to declare a pulseaudio configuration > (pulseaudio-service-type) places it at this location, so it seems > reasonable to hard code it. What use case do you have for a custom > pulseaudio configuration that pulseaudio-service-type could not cater > to? This prevents users defining another environment variable and > forgetting to replace these, then wondering why the default pulse > configuration doesn't work, and it felt out of place to me (an > implementation detail better encapsulated). Indeed but note that there's a small subtlety to pulseaudio-service-type, chiefly that the service is not your typical ¿monodaemonic? process that is used throughout the system, rather it simply provides you a default config for the pulseaudio daemon. The fact that multiple pulseaudio daemons can be launched alongside is a strong indicator that perhaps you will want for some of them to use different configurations, which is done via the environment variables. Right now this would be mainly achieved using local-file, text-file or specifying a path but in theory the procedures for pulseaudio-service-type could be reused for serializing configurations to be used outside of the service. Regarding the users forgetting the variables, it looks obvious that if you omit the default values there then the behavior will also change accordingly. If you strongly feel that this is very pitfall prone (IMO it's no worse than forgetting to add %base-services at the end of the services field) then perhaps documenting it would suffice? > >> I'd consider this field to be within the same category as >> 'shepherd-requirement', it's for flexibility > > I like the idea of more flexibility, but I don't like that these fields > need to be duplicated for each service, somewhat encumbering the view. > Perhaps we need to devise some 'always nice to have' set that would be > configurable for any service without having to expose these fields as > part of their main configuration? > Right, it's not optimal but these are fields with legitimate uses, instituting rigidity here will simply make the services overly opinionated to some particular kind of setup, which drastically reduces their value. Regarding their duplication, perhaps an improvement for define-record-type* would be better? SRFI-136 seems something that would address these concerns. From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Apr 2023 22:08:01 +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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168280605832078 (code B ref 63082); Sat, 29 Apr 2023 22:08:01 +0000 Received: (at 63082) by debbugs.gnu.org; 29 Apr 2023 22:07:38 +0000 Received: from localhost ([127.0.0.1]:36805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pssjB-0008LK-OF for submit@debbugs.gnu.org; Sat, 29 Apr 2023 18:07:37 -0400 Received: from mail-ej1-f67.google.com ([209.85.218.67]:47580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pssj7-0008L5-Tg for 63082@debbugs.gnu.org; Sat, 29 Apr 2023 18:07:36 -0400 Received: by mail-ej1-f67.google.com with SMTP id a640c23a62f3a-953343581a4so172955366b.3 for <63082@debbugs.gnu.org>; Sat, 29 Apr 2023 15:07:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682806048; x=1685398048; 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=+6AwIzHZamAQhXcgHnvaARIbUvzQa0WZzQqo+fR10x4=; b=XIeIYNOHDmEpkpZ+j8MOWuyKTeQR/5etrB+trNm7QTpcAO3P+j/wTyVQ9Bm9/3TU9h zdfWfBruX5k3eR7RYvW+XzRqowTT/3kLVSYo7nG/gIfNLZurAdc97ukpIq/VrmBzN70Z DWkBNFedP7OSgohzLD4ba2tDWMTNt7/uSwNY9WnmlN18iHQbYP97r0aO0tOWt0a3AsMa +iKy3Yzy9a45v6H5jEX6opuk9grIQTlQChW60nc7kTydvbjQjEqj0BhrMRmedA3JO7vk etOl3zbiOLNSEad6ytrxFOFhRIrQQ/sqNjHFmHdRTSjcrH9feLRVoeYrHSHlr32TVzRc AUrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682806048; x=1685398048; 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=+6AwIzHZamAQhXcgHnvaARIbUvzQa0WZzQqo+fR10x4=; b=bGlgzd96cWKmwC0gT+9oi/NcWinV7F0M4HY/M4GYU3vRoG8UYTh0NWmfwXHZtXgK8z 6OgCYEGNarkRCESEAmejB6p4c0xCcPS+ZGeG86b9/Lax+HN2oHTsBdwXaYzhsZ1CuS2V WSV1/RxKPWgt9hH5sBQxC2KB1rs6zRaLE6I0b9s7jqI6OSaoLxsSEH6RUdNw9cSUdIWe aFxhNvXxSyUwygpVZF4xrzHWTGGmxTnXRI6EIEPDwDR4D1XnBnJj+C2tKo1o7UY2k62V nXeQbjubgV1zqhwrPv/fm6CZOPNs7fH3nfEL1hlM2oFIlagUzucJS8hU6PPAYKrKnpuX ALLA== X-Gm-Message-State: AC+VfDzk9i6dWw3K25I2doahUsLe9cq2bDrfntzMyvmm138/2Rfftm58 ZZb0iZICEo254q2aaVH9wHk= X-Google-Smtp-Source: ACHHUZ6Hw5o7JzUsprEj3/Kndos0e9jsjde91A1+5VadFfSJaXrq62rbre755c/Ic67zvm7YcF3AOw== X-Received: by 2002:a17:907:6e90:b0:94f:5079:ade2 with SMTP id sh16-20020a1709076e9000b0094f5079ade2mr10988715ejc.62.1682806047905; Sat, 29 Apr 2023 15:07:27 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id e24-20020a17090681d800b0094f54c032e3sm12881736ejx.103.2023.04.29.15.07.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 15:07:27 -0700 (PDT) Message-ID: <652275711a94ce83399f8e79d545fbbe230ee824.camel@gmail.com> From: Liliana Marie Prikler Date: Sun, 30 Apr 2023 00:07:26 +0200 In-Reply-To: <87ilde8v7v.fsf@gmail.com> References: <172f246e91445b431fb289b6cb346d37a8da1c08.camel@gmail.com> <87ilde8v7v.fsf@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Samstag, dem 29.04.2023 um 13:16 -0400 schrieb Maxim Cournoyer: > This means we do not have to expose user-accounts at the > , which is not the right place for that anyway; > it's already exposed via the users/groups fields of the system> record. >=20 > That's much easier to reason with, for both humans and the code, in > my opinion. We have the tools to make this meaningful with user-accounts already =E2=80= =93 we've had them for some while in fact. (operating-system ... (users (cons* alice bob mpd %base-user-accounts)) (services (cons* (mpd-service (user (find mpd-user? users))) %base-services)) ...) is a perfectly fine configuration given concrete values for alice, bob, and mpd with mpd-user? matching the MPD user account by name. The point in providing user-accounts in the MPD service is so that the right thing is done w.r.t. account creation regardless of whether the user exists in users or not. In the former case, it is checked that definitions match (using pointer identity), in the latter the user is automatically added. "I will assume that a user by this name exists even if it does not" is a recipe for shooting oneself in the knee. Cheers From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 01 May 2023 01:08:01 +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: Liliana Marie Prikler Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168290327321250 (code B ref 63082); Mon, 01 May 2023 01:08:01 +0000 Received: (at 63082) by debbugs.gnu.org; 1 May 2023 01:07:53 +0000 Received: from localhost ([127.0.0.1]:38577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptI1B-0005Wg-DA for submit@debbugs.gnu.org; Sun, 30 Apr 2023 21:07:53 -0400 Received: from mail-qt1-f174.google.com ([209.85.160.174]:54484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptI16-0005WR-Un for 63082@debbugs.gnu.org; Sun, 30 Apr 2023 21:07:51 -0400 Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-3ef112cab37so19599451cf.0 for <63082@debbugs.gnu.org>; Sun, 30 Apr 2023 18:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682903263; x=1685495263; 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=FXLbPTVjzWoc4V1qHcq5ndyE//yG9ipIuwLUdHV60fs=; b=lKJCxfhak78fow289UT9KrfVJ/qIHESItF1rWI+Up9YPzPPbzCEjueOOuzZbYhgMV6 mjy6G02EnfTBcPcOvtz1OdjniTLN1wZDC9vdP70QwYEMFyx8DXb97C0Dr2XnHwNzuglH lAyZQusxXIH/zpe2NmxyhkhGsjnecln1IXBA1vtzzkQf/eJo+wo1sSfDrtqQTVY/H5Rv poUBntjOPtg1F8MpcWg46c51WWsRq+cL+Mv1cIw+WIr80XnR/VFL8lpuoPNng1FL1BKE 5Nx6phJQSsW+9uLH3UrGJC4iT12OW2ttodzhwJfMMuHjK2pA9mXCPMgPEb42eS9hEGAn yJkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682903263; x=1685495263; 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=FXLbPTVjzWoc4V1qHcq5ndyE//yG9ipIuwLUdHV60fs=; b=kqwNyOMU70ezdNvfwEfdpWHNFYp97xZUwBM0MRLVbHqOT5TEqonQiwUivI2M04KDY4 gT+wAZ1ESVDe5owPjsIbOO58AvyeN+LqW5Pb19euan61Hkq8vrgnt3jOdD1Aq+3QKMSA QcPnPo5uqyRgG/0Uh5l5eadBtq5pH5oJNOau5Q0vhsC8QdbGCXoZrvsn0NpkpFeawmk5 El36thB6BzgLTo2YablDvdu9d5xfnqaj9ZmvsXG8A44aEg2WMvD+OWRNS88i39EZBg6h 5WgBWmDEMurZ+V40ogiLlPq5l/FIwxVc11d/3WSEDL1UUhhLdkIc8VLwupsB40dgvN+K 6wxA== X-Gm-Message-State: AC+VfDxYHzNL9huc1I9jQOjF51Am2xIsho+YlgtWjIEyAkuiEF/iwhKz tO/NrQfv6M3XHhmyh0NhA1mgxP5ml1Q= X-Google-Smtp-Source: ACHHUZ5MO31n3dzl2X6pV9kmTYhJCKnxA1hwVyaedlx6Qff9TJfHyoJf6pPSqO+cQVEXewm00WgnyA== X-Received: by 2002:a05:622a:14e:b0:3ef:64d9:f0ca with SMTP id v14-20020a05622a014e00b003ef64d9f0camr20043771qtw.40.1682903263079; Sun, 30 Apr 2023 18:07:43 -0700 (PDT) Received: from hurd (dsl-155-245.b2b2c.ca. [66.158.155.245]) by smtp.gmail.com with ESMTPSA id w24-20020a05622a191800b003ef59e2b9a6sm8476721qtc.78.2023.04.30.18.07.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Apr 2023 18:07:42 -0700 (PDT) From: Maxim Cournoyer References: <172f246e91445b431fb289b6cb346d37a8da1c08.camel@gmail.com> <87ilde8v7v.fsf@gmail.com> <652275711a94ce83399f8e79d545fbbe230ee824.camel@gmail.com> Date: Sun, 30 Apr 2023 21:07:41 -0400 In-Reply-To: <652275711a94ce83399f8e79d545fbbe230ee824.camel@gmail.com> (Liliana Marie Prikler's message of "Sun, 30 Apr 2023 00:07:26 +0200") Message-ID: <87zg6o7tb6.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Liliana, Liliana Marie Prikler writes: > Am Samstag, dem 29.04.2023 um 13:16 -0400 schrieb Maxim Cournoyer: >> This means we do not have to expose user-accounts at the >> , which is not the right place for that anyway; >> it's already exposed via the users/groups fields of the > system> record. >> >> That's much easier to reason with, for both humans and the code, in >> my opinion. > We have the tools to make this meaningful with user-accounts already =E2= =80=93 > we've had them for some while in fact. > > (operating-system > ... > (users (cons* alice bob mpd %base-user-accounts)) > (services (cons* (mpd-service (user (find mpd-user? users))) > %base-services)) > ...) > > is a perfectly fine configuration given concrete values for alice, bob, > and mpd with mpd-user? matching the MPD user account by name. The > point in providing user-accounts in the MPD service is so that the > right thing is done w.r.t. account creation regardless of whether the > user exists in users or not. In the former case, it is checked that > definitions match (using pointer identity), in the latter the user is > automatically added. "I will assume that a user by this name exists > even if it does not" is a recipe for shooting oneself in the knee. I agree looks nice "on paper", but in practice, I was confronted with the following problem, which is enough annoying to make me want to go back to the simpler string contract: A record encodes a lossy version of a as a string, as its 'group' field. This way of specifying a group implies it already exist, since it doesn't capture all the details, e.g.: is it a system group or not? In the current mpd-configuration, to use my own user, I must also provide the matching group as a record, even if e.g. 'users' is something I've never created myself and don't really have a clue as to how it was defined without looking at the source, yet it's important that it matches the original definition otherwise I'd have two same-named groups differing only subtly, which would introduce issues probably harder to diagnose than "sorry, no such group!" One way that seems like it'd solve it is to make the group field of a accept a ; then the user object would be self-contained as far as extending user-accounts goes; the API becomes a bit more obtuse though, especially when you simply want to specify a group known to exist ('users', 'audio', 'netdev', etc.). We'd probably now need to export %users-group, %audio-group, etc. to make this API a bit more manageable/convenient. --=20 Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 01 May 2023 06:14: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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168292160423344 (code B ref 63082); Mon, 01 May 2023 06:14:02 +0000 Received: (at 63082) by debbugs.gnu.org; 1 May 2023 06:13:24 +0000 Received: from localhost ([127.0.0.1]:38802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptMmq-00064S-8f for submit@debbugs.gnu.org; Mon, 01 May 2023 02:13:24 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:53492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptMmo-00064E-A0 for 63082@debbugs.gnu.org; Mon, 01 May 2023 02:13:22 -0400 Received: by mail-ed1-f66.google.com with SMTP id 4fb4d7f45d1cf-50bc394919cso1495600a12.2 for <63082@debbugs.gnu.org>; Sun, 30 Apr 2023 23:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682921596; x=1685513596; 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=31l38dnjx1mhNzyuYfP/JAfJ3RdhpKOGqYpqCFLdTKk=; b=gieLKMv5dp1TZbEaV4fqQBhuMpaG38RNB9q78cf3zC92fGxeSiCOrjpvjGx0o+fN4X snnJCn2JJo2kpzQgPsZM2zK6lpTlqM3sCCUimTjUDzvRt99nkqvsYmvEW8GaPVASSAYK qWtw6FH+ILubemkexPyHBBmQu3fBzegkqfB8OS7yoKXpkeCvZD5ur6mYQH1DizuN0m06 2173YnRrC6bIO0h7yUZt+Yn4MW055eMIz5YnOn+Ez4MCesXMWtAmYYUgkYctqt1uw24A SnzsFrMpSkjO80xitu+RUoAYekow9YDF1uvCvYm+kI4b2ntR/CxkJjYUQUH67Cc8iCdv 9q9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682921596; x=1685513596; 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=31l38dnjx1mhNzyuYfP/JAfJ3RdhpKOGqYpqCFLdTKk=; b=hhyslJbgFiFmkJxjvpjN8JPSwrikJCLfFwFSyiirnB6hkatQBVvew1tRSvraT2Wknv YPi6hKiAwCN3jMBv3D08GwsBUOdGYEO9K9heKN2c/F7sGyR2Ea9idxNWn7iU0mK8SQwV yTtGwpf8Gwvyy3cSeGPKxPMMDfQjar1BhLTw8Xblh1rLVaMnBYbi1bIQCmRc8UdAhJW0 swCjlNMBu3qOchFNiP7f6M5hyhDp+VgFalAj432+OTQSlhCHTddQknRtBnrnOu/f5qDE VhbkI+pokYuQS7R8F8JaPVoKpcBzL3uDDyadPjO9ShuNO3gaSw1IChvDMcuXOpz0TWh9 Imgg== X-Gm-Message-State: AC+VfDydq3crjbbcvh0WUG+1H+UQRzGXGGFWRWW5xRD/2sk8A4c1ms3A 3UCESuLS1zoo8LdbiG5BeWw= X-Google-Smtp-Source: ACHHUZ71+3AwEljHP1OQoZNanlAMWWbKr5SffeCw2oq/xDlkbrle6abTPFuyRjh5Q1HGoAYfu+R82Q== X-Received: by 2002:a17:907:9343:b0:960:ddba:e5c6 with SMTP id bv3-20020a170907934300b00960ddbae5c6mr10613813ejc.22.1682921596143; Sun, 30 Apr 2023 23:13:16 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id l7-20020a1709060e0700b0094ee21fe943sm14384424eji.116.2023.04.30.23.13.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Apr 2023 23:13:15 -0700 (PDT) Message-ID: <78b82d9f5eda10fab81c05ac6159798c39003110.camel@gmail.com> From: Liliana Marie Prikler Date: Mon, 01 May 2023 08:13:15 +0200 In-Reply-To: <87zg6o7tb6.fsf@gmail.com> References: <172f246e91445b431fb289b6cb346d37a8da1c08.camel@gmail.com> <87ilde8v7v.fsf@gmail.com> <652275711a94ce83399f8e79d545fbbe230ee824.camel@gmail.com> <87zg6o7tb6.fsf@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Maxim, Am Sonntag, dem 30.04.2023 um 21:07 -0400 schrieb Maxim Cournoyer: > > In the current mpd-configuration, to use my own user, I must also > > provide the matching group as a record, even if > > e.g. 'users' is something I've never created myself and don't > > really > > have a clue as to how it was defined without looking at the source, > > yet it's important that it matches the original definition > > otherwise > > I'd have two same-named groups differing only subtly, which would > > introduce issues probably harder to diagnose than "sorry, no such > > group!" The "find by name" pattern applies here as well. We could extend the semantics of group field so that if a string is passed, %base-groups is searched for a matching name first instead of constructing a new group. This would allow you to more easily specify (group "users") for example. > > One way that seems like it'd solve it is to make the group field of > > a > > accept a ; then the user object would be > > self-contained as far as extending user-accounts goes; the API > > becomes a bit more obtuse though, especially when you simply want > > to > > specify a group known to exist ('users', 'audio', 'netdev', etc.). Not really. If the allowed for a group, we could drop the group field in the MPD specification. The semantics for string groups would remain unchanged, whereas groups would get added to the accounts service as though they had been specified via the groups mechanic. We'd only have to twiddle with account service there and the change would probably benefit every service that requires an account:group pair. Cheers From unknown Sat Aug 16 17:00:18 2025 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: Wed, 03 May 2023 01:46:01 +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@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168307831120632 (code B ref 63082); Wed, 03 May 2023 01:46:01 +0000 Received: (at 63082) by debbugs.gnu.org; 3 May 2023 01:45:11 +0000 Received: from localhost ([127.0.0.1]:45302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pu1YN-0005Mh-0w for submit@debbugs.gnu.org; Tue, 02 May 2023 21:45:11 -0400 Received: from mail-qv1-f43.google.com ([209.85.219.43]:57363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pu1YJ-0005M9-2v for 63082@debbugs.gnu.org; Tue, 02 May 2023 21:45:09 -0400 Received: by mail-qv1-f43.google.com with SMTP id 6a1803df08f44-5f3da4f91a0so21341586d6.2 for <63082@debbugs.gnu.org>; Tue, 02 May 2023 18:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683078301; x=1685670301; 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=oBAqAZ8FWSwymMRTBOJ34ta5iUCpke+gZ0yVUWjzUFo=; b=IFD5bhneIqqOnIFEuBngrvqdBD+6BvnIKcpXU7nh9sd4BjHWhdblJNte4UYdupsDJy /fbWzh9MTKO+ENzh59649FF8SI36r0kEZmcErb5u2PGoJ5L0pKa+jYntycmrvT4KY+DD LpFOhCZTQ5rScQMHHjp9nqOc3M7VIch49gGWpbQkvW4JOZzhcCa0zbuyD/GcAgwczZZB 4PhvSYThMdEex8TNyZIheqKRsHcndoTWdqsLYPMcrMZmOZ+GGu3KApPoBkZqXFtaMB4S CxplFE+tpNLjYKx6E3n+BsNfNX4jmytFJ9jXbzR/9Z6hXBf1WtVV78kKuPxqEBhGCCaI PM1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683078301; x=1685670301; 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=oBAqAZ8FWSwymMRTBOJ34ta5iUCpke+gZ0yVUWjzUFo=; b=FjO8UfrQIAm4BZYTZokywGkUUy5/eLCTSasiU45AP+2SHSLs/iCIAIYAUiLRTHvLE6 8chaqPpOZ6FvvtMN4iNWYtXgn9Lut9dckw3BiR1t7QcE39wtBZrT09e4i5EGh4A7N9T+ tWAcNS8gBToJIE49nUgD0CvGZR/iy9oBr0J9k5BhvD31H5U8swL+F77s7f2wJuojZRQ3 zsxrsakedBiDeEYOsGOJZVAZnYaKxjqebyQTldggzieIuqxTe+tO8zt2ZPBC8pJ2UNDI 8yc29JDpoBnRw/uHyCvDNx30o3ZdWEEPfGPrv9KEc1F9S21as/QEQyxUOWRcgHUwX8tB oycw== X-Gm-Message-State: AC+VfDxufyceDSy3blDwmKDHL0nfJPpQVUtCq4jCGX2mhOfPVV9vI0Ox j7BOHPQ5wQlgNtuh7lvo8h0m8W11s2jzAw== X-Google-Smtp-Source: ACHHUZ4l8CgLcOz5MC2W7Xe99Az1I4xvV1SjfqZywvTq1vU9FuYtUqt2Q6t2rqPtyHgnGSOaURkwlw== X-Received: by 2002:a05:6214:246a:b0:5ef:59d1:8d14 with SMTP id im10-20020a056214246a00b005ef59d18d14mr8614652qvb.2.1683078301016; Tue, 02 May 2023 18:45:01 -0700 (PDT) Received: from hurd (dsl-157-118.b2b2c.ca. [66.158.157.118]) by smtp.gmail.com with ESMTPSA id b19-20020a05620a089300b0074de92520b1sm10099744qka.83.2023.05.02.18.45.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 18:45:00 -0700 (PDT) From: Maxim Cournoyer References: <16e06b4b2a932a7c48696fcc1b89c5a454dc9d2b.1682690696.git.maxim.cournoyer@gmail.com> <2fabf610-5256-dad1-0e62-449fbcc738f0@makinata.eu> <874joyaad3.fsf@gmail.com> <2e5d3ddb-5948-de11-4fa5-da02e848a8e6@makinata.eu> Date: Tue, 02 May 2023 21:44:59 -0400 In-Reply-To: <2e5d3ddb-5948-de11-4fa5-da02e848a8e6@makinata.eu> (Bruno Victal's message of "Sat, 29 Apr 2023 18:23:34 +0100") Message-ID: <87h6su1944.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Bruno, Bruno Victal writes: > On 2023-04-29 18:04, Maxim Cournoyer wrote: >> Hi Bruno, >>=20 >> Bruno Victal writes: >>=20 >>> On 2023-04-28 15:27, Maxim Cournoyer wrote: >>>> Rationale: Services can be extended via the simple-service mechanism i= nstead >>>> of having to expose fields on service configurations that are not dire= ctly >>>> connected to the service's configuration. >>>> >>>> * gnu/services/audio.scm (mpd-environment-variables-sanitizer): New sa= nitizer. >>>> (mpd-configuration): Use it. >>>> (mpd-shepherd-service): Hard code the useful environment variables ins= ide the >>>> Shepherd service. >>>> --- >>> >>> This field shouldn't be deprecated as one of it's primary purposes is t= o allow for >>> the pulseaudio daemon configuration to be set to another one. >>> What you're doing here is effectively hardcoding the pulseaudio configu= ration. >>=20 >> Our only means to declare a pulseaudio configuration >> (pulseaudio-service-type) places it at this location, so it seems >> reasonable to hard code it. What use case do you have for a custom >> pulseaudio configuration that pulseaudio-service-type could not cater >> to? This prevents users defining another environment variable and >> forgetting to replace these, then wondering why the default pulse >> configuration doesn't work, and it felt out of place to me (an >> implementation detail better encapsulated). > > Indeed but note that there's a small subtlety to pulseaudio-service-type,= chiefly that > the service is not your typical =C2=BFmonodaemonic? process that is used = throughout the system, > rather it simply provides you a default config for the pulseaudio daemon. > The fact that multiple pulseaudio daemons can be launched alongside is a = strong indicator that > perhaps you will want for some of them to use different configurations, w= hich is done via the > environment variables. > > Right now this would be mainly achieved using local-file, text-file or sp= ecifying a path > but in theory the procedures for pulseaudio-service-type could be reused = for serializing > configurations to be used outside of the service. > > Regarding the users forgetting the variables, it looks obvious that if yo= u omit the default > values there then the behavior will also change accordingly. > If you strongly feel that this is very pitfall prone (IMO it's no worse t= han forgetting to add %base-services > at the end of the services field) then perhaps documenting it would suffi= ce? Is this a use case in actual use? It seems a bit of a stretch in my mind, especially considering the service was already difficult to get working in its default configuration; I doubt someone would go out of their way to manage multiple distinctly configured pulseaudio daemons :-). But if it's something in actual use providing value, I don't mind to keep it until we have a better way to extend a common set of basic properties for services in general. >>> I'd consider this field to be within the same category as >>> 'shepherd-requirement', it's for flexibility >>=20 >> I like the idea of more flexibility, but I don't like that these fields >> need to be duplicated for each service, somewhat encumbering the view. >> Perhaps we need to devise some 'always nice to have' set that would be >> configurable for any service without having to expose these fields as >> part of their main configuration? >>=20 > > Right, it's not optimal but these are fields with legitimate uses, instit= uting rigidity here will simply > make the services overly opinionated to some particular kind of setup, wh= ich drastically reduces their value. > > Regarding their duplication, perhaps an improvement for define-record-typ= e* would be better? > SRFI-136 seems something that would address these concerns. I've yet to look carefully into SRFI-136 would provide us with, but it seems an interesting direction, to the sound of it. --=20 Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 03 May 2023 01:54: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: Liliana Marie Prikler Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168307882022106 (code B ref 63082); Wed, 03 May 2023 01:54:02 +0000 Received: (at 63082) by debbugs.gnu.org; 3 May 2023 01:53:40 +0000 Received: from localhost ([127.0.0.1]:45329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pu1ga-0005kU-7f for submit@debbugs.gnu.org; Tue, 02 May 2023 21:53:40 -0400 Received: from mail-qv1-f51.google.com ([209.85.219.51]:54418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pu1gX-0005kG-L2 for 63082@debbugs.gnu.org; Tue, 02 May 2023 21:53:38 -0400 Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-5f45fad3be1so39596146d6.0 for <63082@debbugs.gnu.org>; Tue, 02 May 2023 18:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683078811; x=1685670811; h=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=Qcs7i+5Pz/Zl1Yxu+CVMkPd7zPwNOgmyreMCqN/Sd00=; b=WDZ48xn1TDiCmBJSq87f3eeXo44QdFqtfBurkYMS2TtDmLffJwHyGuXYtoQ0LZANdF 7MWLCqpmfV0mZgNtqnxSaTh6cGlXATlgjXY325W6u6VbNrfmEXvbpCRLRREFjZHVfiSd o7yvoPKFwrqjuPLn5y9PTI6Fa8CzBzt9S+Up+v0mL1AVIu2vIkljy7FhvYdp60WsIAzx lCE10/LGJMIyctN+JN5T/fuBkHHzOcDXe3FrxZt1eHii1JlKCPO3rT5MOumijUtaMOOD B5JaHw2t/2F/Yiqy5PfyV9CduxBofGvsGXHSOCLzSSoRcw5ig1heVv/KjtkuEX23U4b0 7Exw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683078811; x=1685670811; h=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=Qcs7i+5Pz/Zl1Yxu+CVMkPd7zPwNOgmyreMCqN/Sd00=; b=VVPooTL47gYZj82HHa2wh2rcsmM18RKhkLtyupS7/ahdvOfSsxZDVzKSID6p44dSMH gv4/ZTqbQzB0X788CpMQDxMCPIjmoY7uk2zsFtMqOMuJw9/gtiYrP+toMtqA5tzTxUvq G6z5b0xl8oEe0b9aIdYo9gPC4G6IGqHu9Gtgo5SR8MITNqSgDnrTYQHn5nrUjvfn4jyh 1ojo0QQMWFK1B+dITPnx0O/PgXFTemqhD1mqlcBH4RZtaFgMj0B0kjXysLQeJoDV2tD6 qRClZc7A7+wFda4ArGqWQPsmwgI/Ra7fxDNgmhm7ki2aOk1p0Lnkhzd2nv/1svlJaoVL tXCw== X-Gm-Message-State: AC+VfDx8lHNUoeIj7jwTPs+29tdts0ss2MaRFP704qnxQXbfj+xEdYDN knXo91bk/KMKIv5vox0o4xHKpGJJBDRLOQ== X-Google-Smtp-Source: ACHHUZ7AyM64SUs+QCe5j7RL60QslTTqQmVWOKvSf3+S5dKy/dfyJCJc02skw2x91FJOswzpUoAfjg== X-Received: by 2002:a05:6214:407:b0:5f1:6892:743c with SMTP id z7-20020a056214040700b005f16892743cmr9351191qvx.24.1683078811639; Tue, 02 May 2023 18:53:31 -0700 (PDT) Received: from hurd (dsl-157-118.b2b2c.ca. [66.158.157.118]) by smtp.gmail.com with ESMTPSA id cp11-20020a05622a420b00b003f12f8616ecsm6135436qtb.4.2023.05.02.18.53.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 18:53:31 -0700 (PDT) From: Maxim Cournoyer References: <172f246e91445b431fb289b6cb346d37a8da1c08.camel@gmail.com> <87ilde8v7v.fsf@gmail.com> <652275711a94ce83399f8e79d545fbbe230ee824.camel@gmail.com> <87zg6o7tb6.fsf@gmail.com> <78b82d9f5eda10fab81c05ac6159798c39003110.camel@gmail.com> Date: Tue, 02 May 2023 21:53:30 -0400 In-Reply-To: <78b82d9f5eda10fab81c05ac6159798c39003110.camel@gmail.com> (Liliana Marie Prikler's message of "Mon, 01 May 2023 08:13:15 +0200") Message-ID: <87cz3i18px.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Liliana, Liliana Marie Prikler writes: > Hi Maxim, > > Am Sonntag, dem 30.04.2023 um 21:07 -0400 schrieb Maxim Cournoyer: >> > In the current mpd-configuration, to use my own user, I must also >> > provide the matching group as a record, even if >> > e.g. 'users' is something I've never created myself and don't >> > really >> > have a clue as to how it was defined without looking at the source, >> > yet it's important that it matches the original definition >> > otherwise >> > I'd have two same-named groups differing only subtly, which would >> > introduce issues probably harder to diagnose than "sorry, no such >> > group!" > The "find by name" pattern applies here as well. We could extend the > semantics of group field so that if a string is passed, %base-groups is > searched for a matching name first instead of constructing a new group. > This would allow you to more easily specify (group "users") for > example. > >> > One way that seems like it'd solve it is to make the group field of >> > a >> > accept a ; then the user object would be >> > self-contained as far as extending user-accounts goes; the API >> > becomes a bit more obtuse though, especially when you simply want >> > to >> > specify a group known to exist ('users', 'audio', 'netdev', etc.). > Not really. If the allowed for a group, we > could drop the group field in the MPD specification. The semantics for > string groups would remain unchanged, whereas groups would > get added to the accounts service as though they had been specified via > the groups mechanic. We'd only have to twiddle with account service > there and the change would probably benefit every service that requires > an account:group pair. I think I'd favor the second option then (migrating to support both and strings), so that every service could benefit from the change, as you've noted. I don't intend to work on it in the scope of this series, but I think it'd be a welcome improvement! -- Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH 14/17] services: mpd: Obsolete 'environment-variables' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 04 May 2023 16:22: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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.16832172842941 (code B ref 63082); Thu, 04 May 2023 16:22:02 +0000 Received: (at 63082) by debbugs.gnu.org; 4 May 2023 16:21:24 +0000 Received: from localhost ([127.0.0.1]:51927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pubhr-0000lN-HH for submit@debbugs.gnu.org; Thu, 04 May 2023 12:21:23 -0400 Received: from smtpm3.myservices.hosting ([185.26.105.234]:38544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pubhm-0000l9-Ej for 63082@debbugs.gnu.org; Thu, 04 May 2023 12:21:22 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id 450D420F8E; Thu, 4 May 2023 18:21:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id E49278009A; Thu, 4 May 2023 18:21:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id KZtRC0JH2yvw; Thu, 4 May 2023 18:21:10 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 9384480098; Thu, 4 May 2023 18:21:10 +0200 (CEST) Message-ID: Date: Thu, 4 May 2023 17:21:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: <16e06b4b2a932a7c48696fcc1b89c5a454dc9d2b.1682690696.git.maxim.cournoyer@gmail.com> <2fabf610-5256-dad1-0e62-449fbcc738f0@makinata.eu> <874joyaad3.fsf@gmail.com> <2e5d3ddb-5948-de11-4fa5-da02e848a8e6@makinata.eu> <87h6su1944.fsf@gmail.com> From: Bruno Victal In-Reply-To: <87h6su1944.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Hi Maxim, On 2023-05-03 02:44, Maxim Cournoyer wrote: > Hi Bruno, > > Bruno Victal writes: > >> On 2023-04-29 18:04, Maxim Cournoyer wrote: >>> Hi Bruno, >>> >>> Bruno Victal writes: >>> >>>> On 2023-04-28 15:27, Maxim Cournoyer wrote: >>>>> 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. >>>>> --- >>>> >>>> This field shouldn't be deprecated as one of it's primary purposes is to allow for >>>> the pulseaudio daemon configuration to be set to another one. >>>> What you're doing here is effectively hardcoding the pulseaudio configuration. >>> >>> Our only means to declare a pulseaudio configuration >>> (pulseaudio-service-type) places it at this location, so it seems >>> reasonable to hard code it. What use case do you have for a custom >>> pulseaudio configuration that pulseaudio-service-type could not cater >>> to? This prevents users defining another environment variable and >>> forgetting to replace these, then wondering why the default pulse >>> configuration doesn't work, and it felt out of place to me (an >>> implementation detail better encapsulated). >> >> Indeed but note that there's a small subtlety to pulseaudio-service-type, chiefly that >> the service is not your typical ¿monodaemonic? process that is used throughout the system, >> rather it simply provides you a default config for the pulseaudio daemon. >> The fact that multiple pulseaudio daemons can be launched alongside is a strong indicator that >> perhaps you will want for some of them to use different configurations, which is done via the >> environment variables. >> >> Right now this would be mainly achieved using local-file, text-file or specifying a path >> but in theory the procedures for pulseaudio-service-type could be reused for serializing >> configurations to be used outside of the service. >> >> Regarding the users forgetting the variables, it looks obvious that if you omit the default >> values there then the behavior will also change accordingly. >> If you strongly feel that this is very pitfall prone (IMO it's no worse than forgetting to add %base-services >> at the end of the services field) then perhaps documenting it would suffice? > > Is this a use case in actual use? It seems a bit of a stretch in my > mind, especially considering the service was already difficult to get > working in its default configuration; I doubt someone would go out of > their way to manage multiple distinctly configured pulseaudio daemons > :-). But if it's something in actual use providing value, I don't mind > to keep it until we have a better way to extend a common set of basic > properties for services in general. I added this field because while I was refactoring this in #59866 I cleared #:environment-variables from the service constructor as they were setting “wrong variables” (stemming from the abuse of the service as a home service) and since I was mostly interested on the network (http) outputs which didn't require any variables set I didn't notice any issues until I learned about PulseAudio's rtp modules and tried using them. With this, I realized that the environment variables should be adjustable in order for the service to be flexible enough for general usage. (in general I prefer the services to be less opinionated) Though originally thought towards multiple PulseAudio configurations, I should stress that PulseAudio (and PipeWire when we get there) understand a plethora of environment variables: * * Cheers, Bruno From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v2 04/16] services: mpd: Obsolete the 'group' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 00:40: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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.16832471557384 (code B ref 63082); Fri, 05 May 2023 00:40:02 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 00:39:15 +0000 Received: from localhost ([127.0.0.1]:52379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pujTf-0001v0-28 for submit@debbugs.gnu.org; Thu, 04 May 2023 20:39:15 -0400 Received: from smtpm5.myservices.hosting ([185.26.105.236]:57782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pujTc-0001ur-Bq for 63082@debbugs.gnu.org; Thu, 04 May 2023 20:39:14 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm5.myservices.hosting (Postfix) with ESMTP id 7E7EA20D15; Fri, 5 May 2023 02:39:11 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 329248009A; Fri, 5 May 2023 02:38:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 1KAGRnR3aYSE; Fri, 5 May 2023 02:38:36 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id DF34280098; Fri, 5 May 2023 02:38:35 +0200 (CEST) Message-ID: <64f149e2-74b8-7366-8586-908922744b16@makinata.eu> Date: Fri, 5 May 2023 01:38:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: From: Bruno Victal In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Hi Maxim, On 2023-04-29 18:21, Maxim Cournoyer wrote: > @@ -185,20 +174,13 @@ (define-maybe boolean (prefix mpd-)) > (define %mpd-user > (user-account > (name "mpd") > - ;; XXX: This is a place-holder to be lazily substituted in (…-accounts) > - ;; with the value from the 'group' field of . > - (group %lazy-group) > + (group "audio") Perhaps the group should be set to "mpd", with "audio" added to supplementary-groups instead? Cheers, Bruno From unknown Sat Aug 16 17:00:18 2025 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, 05 May 2023 14:45: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@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168329789910470 (code B ref 63082); Fri, 05 May 2023 14:45:02 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 14:44:59 +0000 Received: from localhost ([127.0.0.1]:57233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puwg7-0002io-C7 for submit@debbugs.gnu.org; Fri, 05 May 2023 10:44:59 -0400 Received: from mail-qk1-f173.google.com ([209.85.222.173]:51325) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puwg5-0002iZ-Si for 63082@debbugs.gnu.org; Fri, 05 May 2023 10:44:58 -0400 Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-74e3de79bf2so165837385a.2 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 07:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683297892; x=1685889892; 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=uPzZFecG9yynhTEh/EiFe6rjXEVMwRYt+t5PddjzTX0=; b=A2X57e2Uj6nYGmglO2Pbkq0QB6FkcFTvRilLME/0miq4LOHCY33GjIPugNWdk7BWks AusdE1O1f645JmkCIcCCbB2285UggmyKaSE2T+x4wfF2axuu9pkCSk8lU9aFrzGy7LxK oyIJscLMG7gxxBQVeaW/E5IpnQSLvTpKG9tDCDdv+IZSj3K0iI5G62gESH+fXi2wl5Vi 5Me3Vy21EIXsH8FAQD0HF7btuOd/q8njz1pHGgbt5M6L0/JM46LkszaW88Z3/dxWJCNp Mcpe8sZ6lTLY9stB9rrj35QHaG+HA9rGP1LXj4VUpqKIT+JWIZuON0CtYio0jcOfnYYW SpcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683297892; x=1685889892; 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=uPzZFecG9yynhTEh/EiFe6rjXEVMwRYt+t5PddjzTX0=; b=PLm3PGftDmms5lR7ve1NTuMh7BDPzOCvqAtnjiiDDATtNwEKNGFZfRntYZVtvagCcR o4SNM0laGeIirwVbGVuZuxeyDNVMihGF21AVSvn9LkmOT0zVPiiqRFc6+OWsOPYlV1uj sxmt9+UEzBtPyE2bX6t+C6cYUsuKJhR+jerJu0WkqTM4AZ0odMJxRB8/kV7CUO22EhKf Ijpt7Lu4ZLJES1D6Gm/rrx8oAMkUoSAKUP7UrDoSN5OOzyE/Ve6lpSofRnyO/hIDRzz6 MwbUuhHLhUmlQIhXWHb6LHq9V5uZMDR2KnadwEnN2uHWj6Q+wun5CQZcQXDp4tYi36tJ /L3Q== X-Gm-Message-State: AC+VfDytRvTSDEX5wtV6xlUnSl+8jJfYFRTLIaH0tDbvs5BFMI3n73VA GV/d9LqEHwl+IJZxQqehP5dpvKPF/ug= X-Google-Smtp-Source: ACHHUZ7GpR2VE1wIjPAj2AQoOwjgfnenYRuoHaLuJU0OC5tLJlhjwwPf9SdZ2c6Ss+K5/9Dj0x7O+w== X-Received: by 2002:ac8:5fc1:0:b0:3ef:6577:7f90 with SMTP id k1-20020ac85fc1000000b003ef65777f90mr2576636qta.26.1683297892090; Fri, 05 May 2023 07:44:52 -0700 (PDT) Received: from hurd (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id u2-20020a05622a198200b003e69d6792f6sm665939qtc.45.2023.05.05.07.44.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 07:44:51 -0700 (PDT) From: Maxim Cournoyer References: <16e06b4b2a932a7c48696fcc1b89c5a454dc9d2b.1682690696.git.maxim.cournoyer@gmail.com> <2fabf610-5256-dad1-0e62-449fbcc738f0@makinata.eu> <874joyaad3.fsf@gmail.com> <2e5d3ddb-5948-de11-4fa5-da02e848a8e6@makinata.eu> <87h6su1944.fsf@gmail.com> Date: Fri, 05 May 2023 10:44:50 -0400 In-Reply-To: (Bruno Victal's message of "Thu, 4 May 2023 17:21:10 +0100") Message-ID: <87ild64z31.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Bruno, Bruno Victal writes: > Hi Maxim, > > On 2023-05-03 02:44, Maxim Cournoyer wrote: >> Hi Bruno, >>=20 >> Bruno Victal writes: >>=20 >>> On 2023-04-29 18:04, Maxim Cournoyer wrote: >>>> Hi Bruno, >>>> >>>> Bruno Victal writes: >>>> >>>>> On 2023-04-28 15:27, Maxim Cournoyer wrote: >>>>>> Rationale: Services can be extended via the simple-service mechanism= instead >>>>>> of having to expose fields on service configurations that are not di= rectly >>>>>> 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 i= nside the >>>>>> Shepherd service. >>>>>> --- >>>>> >>>>> This field shouldn't be deprecated as one of it's primary purposes is= to allow for >>>>> the pulseaudio daemon configuration to be set to another one. >>>>> What you're doing here is effectively hardcoding the pulseaudio confi= guration. >>>> >>>> Our only means to declare a pulseaudio configuration >>>> (pulseaudio-service-type) places it at this location, so it seems >>>> reasonable to hard code it. What use case do you have for a custom >>>> pulseaudio configuration that pulseaudio-service-type could not cater >>>> to? This prevents users defining another environment variable and >>>> forgetting to replace these, then wondering why the default pulse >>>> configuration doesn't work, and it felt out of place to me (an >>>> implementation detail better encapsulated). >>> >>> Indeed but note that there's a small subtlety to pulseaudio-service-typ= e, chiefly that >>> the service is not your typical =C2=BFmonodaemonic? process that is use= d throughout the system, >>> rather it simply provides you a default config for the pulseaudio daemo= n. >>> The fact that multiple pulseaudio daemons can be launched alongside is = a strong indicator that >>> perhaps you will want for some of them to use different configurations,= which is done via the >>> environment variables. >>> >>> Right now this would be mainly achieved using local-file, text-file or = specifying a path >>> but in theory the procedures for pulseaudio-service-type could be reuse= d for serializing >>> configurations to be used outside of the service. >>> >>> Regarding the users forgetting the variables, it looks obvious that if = you omit the default >>> values there then the behavior will also change accordingly. >>> If you strongly feel that this is very pitfall prone (IMO it's no >>> worse than forgetting to add %base-services >>> at the end of the services field) then perhaps documenting it would suf= fice? >>=20 >> Is this a use case in actual use? It seems a bit of a stretch in my >> mind, especially considering the service was already difficult to get >> working in its default configuration; I doubt someone would go out of >> their way to manage multiple distinctly configured pulseaudio daemons >> :-). But if it's something in actual use providing value, I don't mind >> to keep it until we have a better way to extend a common set of basic >> properties for services in general. > > I added this field because while I was refactoring this in #59866 I clear= ed #:environment-variables > from the service constructor as they were setting =E2=80=9Cwrong variable= s=E2=80=9D > (stemming from the abuse of the service > as a home service) and since I was mostly interested on the network > (http) outputs which didn't require any > variables set I didn't notice any issues until I learned about > PulseAudio's rtp modules and tried using them. > > With this, I realized that the environment variables should be > adjustable in order for the service to be flexible > enough for general usage. (in general I prefer the services to be less op= inionated) > > Though originally thought towards multiple PulseAudio configurations, I s= hould stress that PulseAudio > (and PipeWire when we get there) understand a plethora of environment var= iables: In general I try to stick to the YAGNI principle (You Ain't Gonna Need It), because adding things without a current real world test often means they'll need to be adjusted in the future when someone really starts using them, and it's then harder because they've been made public and can't easily be changed. This commit mostly meant to open a discussion, which has now been had (thanks!), so I'll drop the commit removing #:environment-variables and push a fresh series. Thanks for your patience! --=20 Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 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: Fri, 05 May 2023 15:10: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@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168329937212899 (code B ref 63082); Fri, 05 May 2023 15:10:02 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 15:09:32 +0000 Received: from localhost ([127.0.0.1]:57256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pux3s-0003Ly-Cq for submit@debbugs.gnu.org; Fri, 05 May 2023 11:09:32 -0400 Received: from mail-qt1-f180.google.com ([209.85.160.180]:61446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pux3q-0003LZ-My for 63082@debbugs.gnu.org; Fri, 05 May 2023 11:09:31 -0400 Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-3ef38864360so19074131cf.2 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 08:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683299365; x=1685891365; 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=Hfp1DJ2/JyNdN8Zkm8cZNiqFC0iDsCcgJyCyFBv9dfU=; b=qmiTcHAy3QJjDW5R4vsFTS4aINT/biFlehlRLfAtuam7g5gyqCfH67InRLtUIRIPU9 6U8Hd4tPff4xvvnmmI7Sp+CPjvJie3E2Iffe9Ll405zmguqRYFsRyYmkNFrL6oDqBESw lCpSBBhGu+apjUXgDDoiuVHSKwU+DHa9mfetWdYA+FvLtXKFFWTtrD72yqeyUshw9fqA 8sBBbQjcyPcvfblmNL+AfnUKcROz9ou6Yu4i3pt4O6UsLnwa5ez2J28HmBFO/HwGMnZa BVfUeqoshgQFejwGOB27+UBTjLGQ+d3iFZZZV5Rr7qL2u1YjnES6A9DdbixhKt3b4Piz YtCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683299365; x=1685891365; 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=Hfp1DJ2/JyNdN8Zkm8cZNiqFC0iDsCcgJyCyFBv9dfU=; b=Jp/9x/lZLg+KGZRZtBy4Xa3HbUpB9cunx9ZajeEw+dzhAJBx3PkYGhUbrHwVDCddaH JE1He7GA4XbbWngAYC0k/AZwNpevPsXKSonp+4WW2O9UU+WM1AdGMtizO5L99T8E7A/w BoqwLI9Fh8Ag/X/UxNX8/1/gkX0GCQcPmQ4tz2h18JAjCyZg7baQwMFEPshKPKvzaPtF BOkuPKsdF6ZCvJChfJm3oNMlf2XRjpQWmZsBRHMxpzSWcbWbFe4e2cuhYo6RnUIHBohZ c60aiNchkI4KIGiNZk1J8dCyNaUmesk4DIQvB2mM4oTlDpm/s4yIOU79ZHtUSiYMviIv hJzQ== X-Gm-Message-State: AC+VfDxxPRTs/FkAM3x7ysjdQHkhlOufpk0zW3lOS8OK4xNVvooPd8mK z5IZs24qDe+McN3mH0P+lpfIb12TdSU= X-Google-Smtp-Source: ACHHUZ6zkWZUP9FRJVwwWUSkiGnVyfSQjBOZ0UDkJncJhQd18i6AL0rDHKkHKIuRCj1bfqr0Tyfu9Q== X-Received: by 2002:ac8:5fcc:0:b0:3ef:4a6c:f9d2 with SMTP id k12-20020ac85fcc000000b003ef4a6cf9d2mr2955154qta.60.1683299364807; Fri, 05 May 2023 08:09:24 -0700 (PDT) Received: from hurd (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id o30-20020ac8429e000000b003ef3bbd242asm682703qtl.32.2023.05.05.08.09.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 08:09:24 -0700 (PDT) From: Maxim Cournoyer References: <64f149e2-74b8-7366-8586-908922744b16@makinata.eu> Date: Fri, 05 May 2023 11:09:23 -0400 In-Reply-To: <64f149e2-74b8-7366-8586-908922744b16@makinata.eu> (Bruno Victal's message of "Fri, 5 May 2023 01:38:35 +0100") Message-ID: <87ednu4xy4.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Bruno, Bruno Victal writes: > Hi Maxim, > > On 2023-04-29 18:21, Maxim Cournoyer wrote: >> @@ -185,20 +174,13 @@ (define-maybe boolean (prefix mpd-)) >> (define %mpd-user >> (user-account >> (name "mpd") >> - ;; XXX: This is a place-holder to be lazily substituted in (=E2=80= =A6-accounts) >> - ;; with the value from the 'group' field of . >> - (group %lazy-group) >> + (group "audio") > > Perhaps the group should be set to "mpd", with "audio" added to supplemen= tary-groups instead? I agree it'd be better, but I'd prefer to defer this change until we get around to supporting objects for the group field of , at which point we won't need to add fragile ad-hoc complications here. Does this sound reasonable? --=20 Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 00/16] Improve out-of-the-box experience with mpd-service-type References: <874jp3nyd3.fsf@gmail.com> In-Reply-To: <874jp3nyd3.fsf@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30: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: 63082@debbugs.gnu.org Cc: Bruno Victal , Liliana Marie Prikler , Maxim Cournoyer Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168331137111880 (code B ref 63082); Fri, 05 May 2023 18:30:02 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:31 +0000 Received: from localhost ([127.0.0.1]:57464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BP-00035Y-EW for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:31 -0400 Received: from mail-qt1-f172.google.com ([209.85.160.172]:53619) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BO-00035I-JZ for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:30 -0400 Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-3ef33f12995so10811791cf.3 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311364; x=1685903364; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IDKgm/P5+oIq7fZc6qvbrV1iNGMS/DmAqxYMN8801Q0=; b=aMRzBQ4lQK3UKzRGchEShVs/E+OwVk2RDaTzqXXMmX9no0reiEwHFk7GEhdl19rU+K 0S0wzVEXNmmwZk6chZWRg0FizLYC+/6OVHoeau+vwQFpcXRXJqrB1jnfQNTTsaewmOhz 2GrQ1WoANwuN/WzOQsM9i+EwoxM/UueOTw0g9NUAOy9/ZO/7sG7mii5XHPuQGLOiPrJk o2IwpxJVzNE8QIxV4PazpVmQLAMMeNdu3Rtt14Rk9WLf/D2/nsziHLyPgZOCp/yAQeNZ CdR15rUzdvVsj4ndE8uRHkbQw4fAS8P9dmVQ3IWCmWj3w/Nvi7ZV9exV/Fap3d4G2X92 naEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311364; x=1685903364; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IDKgm/P5+oIq7fZc6qvbrV1iNGMS/DmAqxYMN8801Q0=; b=CYiOnK+IGGCkY1IsToWUM6m6i4/Sc+KmzJBXj/slR00vvnvic4oYYSVPtsSbNt8ivk mm1yUzVyZ/pEZ6MN838KfZ3v2hryZSeyXOoZAgaWUCtD0bMYOlMQf84e6yC1DN68FgbH C9SCb/91zdnwdiLOHHKzzdlQFZFF+bPt0lI2FaGGK/+K97zq5iNvOtRnE8Nz9ezx7C/i i4SUXJmq/z2RkIY3TH/LTeZiW8HWmpKj4MnKzGoVRQkS0fOn3bv9G6xHtJjuJlqfN2LJ TmT32VQlIRk8pZX++Cc6OCzYKqcxpjSWN7i/hgvXb/4XK68Nb8mstTrl9YMLfHiVG55I eg8A== X-Gm-Message-State: AC+VfDyJ2sF9A/FRGPTbIG0m0kYU5a3zX9h9M1i0ksiqulJVuVZY3sUX q/t44Y91sy/rkDtrZsIxIyD71M3E17M= X-Google-Smtp-Source: ACHHUZ6+41kd87xIb7BCShSZHbp8CIeyldSopzI/YwvbXHzXBCWOSK6LZhq4kw4Vopja71tWsd2g7A== X-Received: by 2002:a05:622a:614:b0:3f2:1c13:b5a8 with SMTP id z20-20020a05622a061400b003f21c13b5a8mr3916988qta.50.1683311364492; Fri, 05 May 2023 11:29:24 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:24 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:28:55 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This series reinstate the ENVIRONMENT-VARIABLES configuration option. The rest is unchanged. Maxim Cournoyer (16): services: mpd: Add auto-update? field to mpd-configuration. services: mpd: Add an 'update' action to trigger a database update. services: mpd: Streamline mpd-user-sanitizer and mympd-user-sanitizer. services: mpd: Rename %set-user-group to set-user-group. services: mpd: Obsolete the 'group' field. services: mpd: List log-level in decreasing verbosity order in doc. services: mpd; Refactor start slot directory initialization. services: mpd: Log to syslog by default. services: mpd: Do not rotate logs when using syslog. services: mpd: Let Shepherd effect the user/group change. system: accounts: Export . services: mpd: Warn when the MPD user is not in the "audio" group. services: mpd: Auto-detect mpd-output mixer type by default. services: mpd: Provision a default cache directory and set HOME. services: mpd: Update basic example. services: Avoid 'delete' overrides warning in audio module. doc/guix.texi | 130 ++++++++----- gnu/services/audio.scm | 394 +++++++++++++++++++++++----------------- gnu/system/accounts.scm | 3 +- gnu/tests/audio.scm | 4 +- 4 files changed, 311 insertions(+), 220 deletions(-) base-commit: 6922069bcbe5c08da09c00e5aad44e390ebd1cc7 -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 01/16] services: mpd: Add auto-update? field to mpd-configuration. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30: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: 63082@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168331137411902 (code B ref 63082); Fri, 05 May 2023 18:30:02 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:34 +0000 Received: from localhost ([127.0.0.1]:57468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BR-00035u-OX for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:34 -0400 Received: from mail-qk1-f177.google.com ([209.85.222.177]:51497) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BP-00035K-Rq for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:32 -0400 Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-74de7635180so193233485a.3 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311366; x=1685903366; 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=swMXXmQe22XzybeXDtARNni+zdrx+zn/mm96idRSNS0=; b=GMO5RlNnPZingRO+MlTDfEwdDm7rsZUx9pc8mP9aFG/HWZi5n0WpEFEqbObpMri0Fg SSJz+vSqfmazyGUm20/3B4wpcGjN1/6RybIl3kBuaPqyKjmJ3ZCQcuakAmzSuNXHo9jF cqgfhj1fWKOfeJJiKRI9MF/qO5tRdYFZoY90n7A8jA8yluxfg1nf35AHt4vpbc7IeKnb mtE0wf3Wao5vjcPIyzhg5US7xePDH1I4llg3Jtsdk55d7yg62WrbGOPhBbzIIkXb+Vzo fpgbUd4jIT3f8XRAHBt3Us6QIuKoFnMfWr9K40NNwUfoIuyCZ5ro5V4AGH72pT80YEAy HKtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311366; x=1685903366; 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=swMXXmQe22XzybeXDtARNni+zdrx+zn/mm96idRSNS0=; b=DfZlD2p00Xv0ldLInf/eM0Z+eyygjM4cq6i1GN6mX5c0x1KJIy2/DfRm9siyWql8Ui vaZhDcvLCgAow4sC7QEOnUe/fWRGP87x6o+4Oe/PNpvlsbjauvyd5EaO7mP9aXabaM48 Uw39U4OgqEd3V5hg3cdUO2bbs4VG+7UL+SgQM24RCY0/bu/kUCmIbvn34RaXwRBF3Jen xAQOBjVWDk++GuUYRF12310I0r0mC4ntR35leO66EJyatfCETxYSjlLryeCIr0zpHVVi qmPC3vNY20L5KHfat1IRRm9e1iC+fPBTPdO1iYxPuokCgfGDcQ6OQowO5+0/8EM3Vgi4 6/1Q== X-Gm-Message-State: AC+VfDyrLYhZwj9057+h7FThQD/MmDaDoLB73oofbaamnSz1Az34uEEf rQuAd/FqrY+JXMXn7UCmzsiKKmA4XRg= X-Google-Smtp-Source: ACHHUZ4xf0qQZ+tt/Fvc3MJdxHIGha97NeagS4pTqa4zH9RmGB8hSt+YCJhJHlifb8CiAtDsoq7jLA== X-Received: by 2002:a05:622a:190c:b0:3e6:3661:7b29 with SMTP id w12-20020a05622a190c00b003e636617b29mr3960269qtc.21.1683311365831; Fri, 05 May 2023 11:29:25 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:25 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:28:56 -0400 Message-Id: <286f7139a07a0e3894dac3ba6dbff95d0603c2dc.1683299528.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm (mpd-configuration) [auto-update?]: New field. * doc/guix.texi (Audio Services): Update doc. --- doc/guix.texi | 39 ++++++++++++++++++++++++++------------- gnu/services/audio.scm | 5 +++++ 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 55221a10c3..66eb44812d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33579,24 +33579,22 @@ Audio Services The service type for @command{mpd} @end defvar +@c %start of fragment @deftp {Data Type} mpd-configuration -Data type representing the configuration of @command{mpd}. +Available @code{mpd-configuration} fields are: @table @asis @item @code{package} (default: @code{mpd}) (type: file-like) The MPD package. -@item @code{user} (default: @code{%mpd-user}) (type: user-account) +@item @code{user} (type: user-account) The user to run mpd as. -The default @code{%mpd-user} is a system user with the name ``mpd'', -who is a part of the group @var{group} (see below). -@item @code{group} (default: @code{%mpd-group}) (type: user-group) +@item @code{group} (type: user-group) The group to run mpd as. -The default @code{%mpd-group} is a system group with name ``mpd''. @item @code{shepherd-requirement} (default: @code{()}) (type: list-of-symbol) -A list of symbols naming Shepherd services that this service +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) @@ -33615,9 +33613,15 @@ Audio Services @item @code{music-directory} (type: maybe-string) The directory to scan for music files. +@item @code{music-dir} (type: maybe-string) +The directory to scan for music files. + @item @code{playlist-directory} (type: maybe-string) The directory to store playlists. +@item @code{playlist-dir} (type: maybe-string) +The directory to store playlists. + @item @code{db-file} (type: maybe-string) The location of the music database. @@ -33627,15 +33631,19 @@ Audio Services @item @code{sticker-file} (type: maybe-string) The location of the sticker database. -@item @code{default-port} (default: @code{6600}) (type: maybe-integer) +@item @code{default-port} (default: @code{6600}) (type: maybe-port) The default port to run mpd on. @item @code{endpoints} (type: maybe-list-of-strings) -The addresses that mpd will bind to. A port different from @var{default-port} -may be specified, e.g. @code{localhost:6602} and IPv6 addresses must be -enclosed in square brackets when a different port is used. -To use a Unix domain socket, an absolute path or a path starting with @code{~} -can be specified here. +The addresses that mpd will bind to. A port different from +@var{default-port} may be specified, e.g. @code{localhost:6602} and +IPv6 addresses must be enclosed in square brackets when a different port +is used. To use a Unix domain socket, an absolute path or a path +starting with @code{~} can be specified here. + +@item @code{address} (type: maybe-string) +The address that mpd will bind to. To use a Unix domain socket, an +absolute path can be specified here. @item @code{database} (type: maybe-mpd-plugin) MPD database plugin configuration. @@ -33652,6 +33660,10 @@ Audio Services @item @code{archive-plugins} (default: @code{()}) (type: list-of-mpd-plugin) List of MPD archive plugin configurations. +@item @code{auto-update?} (type: maybe-boolean) +Whether to automatically update the music database when files are +changed in the @var{music-directory}. + @item @code{input-cache-size} (type: maybe-string) MPD input cache size. @@ -33677,6 +33689,7 @@ Audio Services @end table @end deftp +@c %end of fragment @deftp {Data Type} mpd-plugin Data type representing a @command{mpd} plugin. diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 690409b7a1..8c061da47f 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -514,6 +514,11 @@ (define-configuration mpd-configuration (serializer (lambda (_ x) (mpd-serialize-list-of-mpd-plugin "archive_plugin" x)))) + (auto-update? + maybe-boolean + "Whether to automatically update the music database when files are changed +in the @var{music-directory}.") + (input-cache-size maybe-string "MPD input cache size." -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 02/16] services: mpd: Add an 'update' action to trigger a database update. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30: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: 63082@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168331137611924 (code B ref 63082); Fri, 05 May 2023 18:30:02 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:36 +0000 Received: from localhost ([127.0.0.1]:57472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BU-00036F-7n for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:36 -0400 Received: from mail-qt1-f170.google.com ([209.85.160.170]:59852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BR-00035M-20 for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:33 -0400 Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-3f0596e2c00so10046841cf.3 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311367; x=1685903367; 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=aF8Y+2+ZyVx5UW/zOLlL+v0Sh0dgY6Sxnn88k3JrNQo=; b=fPTUc/ph0jy8hExDidcuV+Z3WugnKJPm0gReZ+YKFkReYl0PK19rmm8l23Uv9K2rJA HaeTBG1U9sZQNLg/lfcpxf4LfxME9GzF85VnhC13JXEiY0s//tbFXGNCCcfKFqZZhkrj 9gIe57n1MoBAtirdQ0xFzJT1TcsnvRslQFtSCEeJY2Cb08J80409aiOqD/k6oj/IelmR e7gtR30accX/rlWKc86vkvyIy2xUBl6g+zBbVZvIuYDwlJJIUWS2CnCVR122hkumhAiW F2tF+NhYKjxr08Fv8TOlNjOSGlOvWRRccaTeEalXoyMkbHQgKbbZkCZxVmUZX51xzNKc w0kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311367; x=1685903367; 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=aF8Y+2+ZyVx5UW/zOLlL+v0Sh0dgY6Sxnn88k3JrNQo=; b=kA0j2voMMxFzO6zCi2GAzG1tK3ev5upHsGsjWoauKXsshMH2MiOi+MmKzF+oyYOf/i 6bhTEfKoT18a1UFUI6k1fRpN5nPHPfhx4lMHT0vhfiGwj9CPTpRaGnOf5NV3Qm1yhztO 9KPThHtn0aatcJxJxSX/bKTlveDhKfJXLGF/LQhURb2dYBRMzsUVtZWfYBLDCN8Sm0IR 6/CxzIV/basIYIQZBdK3L9tHR2t6M/KN3QrubqS6KYoQgdXzg4kB0k+Fcx1w8ZtEsxd9 GH3RCgxkTFe1IRG0oacytrVqTohx0y9RK2ejv0vUrZjrRX0duy4bpMO2lb407FZ/OaIh RP0w== X-Gm-Message-State: AC+VfDwIxbB7LQ+8dl9LPZNj4pQcromq+Ieg6FQKQjYuFBvgMHtnQ4QS q7qQu1ryoh4btzRo18uZurIK/qz5lSw= X-Google-Smtp-Source: ACHHUZ7vvtiJRitMkA2QfvImw8oIWUuFAd3WrdwHCAWO0FWL4q5YmhSF0RUlJ/jXu8gs/7wfK2s4rg== X-Received: by 2002:ac8:7f47:0:b0:3ee:8baf:29bf with SMTP id g7-20020ac87f47000000b003ee8baf29bfmr4366852qtk.42.1683311367361; Fri, 05 May 2023 11:29:27 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:26 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:28:57 -0400 Message-Id: <685ac37d86b0e8eb135c5e40aa1f89240c2b4934.1683299529.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * 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(+) diff --git a/doc/guix.texi b/doc/guix.texi index 66eb44812d..d68d7dd7eb 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33575,6 +33575,16 @@ Audio Services (port "6666"))) @end lisp +Most MPD clients will trigger a database update upon connecting, but you +can also use the @code{update} action do to so: + +@example +herd update mpd +@end example + +All the MPD configuration fields are documented below, and a more +complex example follows. + @defvar mpd-service-type The service type for @command{mpd} @end defvar diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 8c061da47f..6e4ce3f9fb 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -620,6 +620,17 @@ (define (mpd-shepherd-service config) (format #t "Issued SIGHUP to Service MPD (PID ~a)." pid)) + (format #t "Service MPD is not running."))))) + (shepherd-action + (name 'update) + (documentation "Request MPD to update its music database.") + (procedure + #~(lambda (pid) + (if pid + (begin + (invoke #$(file-append mpd-mpc "/bin/mpc") "update") + (format #t "Database update requested for service \ +MPD (PID ~a)." pid)) (format #t "Service MPD is not running."))))))))))) (define (mpd-accounts config) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 03/16] services: mpd: Streamline mpd-user-sanitizer and mympd-user-sanitizer. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30:03 +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.168331137711933 (code B ref 63082); Fri, 05 May 2023 18:30:03 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:37 +0000 Received: from localhost ([127.0.0.1]:57474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BU-00036H-IK for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:36 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:47424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BS-00035P-AP for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:34 -0400 Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-74fbf99adc2so101670185a.3 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311368; x=1685903368; 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=E907hWJp1Rcb9drxhnCJiM7IicvT0X0UX/hd/jgk/vk=; b=ZFvaOI9mIDCKIpzR+/P7qF+Fr6IMAUf52X9QD4XNZrrETeaLbLa04pGVHF9HILEQtw x5uF72PociC1vgvLTbsWJb7/gYnC+6nZG0sz5UbAHTtAkAaonKL+E8Pm+kQv+XuYAhvb ukYj0VTTCVg+oV6ozLkDMpCirgQlY7WLj2GxyjYWf98jCuXnwCY/aU/lMBG74ambCZl8 rKhO2qvo6JV2RKyhIQSAy4WyKM4C1JDiIxPLl3zswiobPvIy6icz/c4vzgG+6bWTT+Db bnGZU1RsWaejmlWlSA+OrqnjbfufVmLL0stTWAYWtFpQfX+0CFtELHi1n9DS5vMhDKB+ OPkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311368; x=1685903368; 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=E907hWJp1Rcb9drxhnCJiM7IicvT0X0UX/hd/jgk/vk=; b=AiPg5scoRZypRAlZnje5iE82bOzZoWlJv1EubnO6IYp9scqKvKVqdTrxy6R8vmfZs1 VhSc0CVC3M6+/XXsnLTvHNcT5GG2wq1d8+bwityG9/wXLvfvrsnpJjWu7qpTvOA4l8In 9inS9ZbYZHGRTPCWiSix7VJ8Sf+fYU4zE9N9Jnk0UVWrfAkDK+aoVktdFmcfBF0fhYJS RrNdS+ej+YMuSnopke/EOefs8UTaVUcdEuO8/+vrzqRx1YKY5Z7gLjgLS+oKQ0yhveLQ CpgMj5AzxdfioSdkhntIOc0DKj/hEKqURloIp7pS2juDEyAzmQFgGoyA0jZHVZ4aqQVX sAow== X-Gm-Message-State: AC+VfDymedjbiUI78n9+/TIZGEMBzwobVgGVc99forEzUN7rUftin4TY Qpe6EVBzJhXD3Odeqjhu7EjTb9QISEw= X-Google-Smtp-Source: ACHHUZ5d2Kyb3HfyH3jiJ2wHnWSN+KuaY6XsObDhw9oWOpY0gJxbxP0sOxcxUfWLzOdoSmAZzTHVHg== X-Received: by 2002:ac8:5711:0:b0:3f2:1ee8:9805 with SMTP id 17-20020ac85711000000b003f21ee89805mr4545508qtw.7.1683311368643; Fri, 05 May 2023 11:29:28 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:28 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:28:58 -0400 Message-Id: <13ac0212f8011cb9fdf7d3ccc56170a3600e3b4a.1683299529.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm (mpd-user-sanitizer, %mympd-user): Remove extraneous group field, already inherited. (%mpd-user, %mympd-user): Clarify %lazy-group explanatory comment. Fix indentation. --- gnu/services/audio.scm | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 6e4ce3f9fb..dc83479e40 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -184,13 +184,15 @@ (define-maybe boolean (prefix mpd-)) (define %mpd-user (user-account - (name "mpd") - (group %lazy-group) - (system? #t) - (comment "Music Player Daemon (MPD) user") - ;; MPD can use $HOME (or $XDG_CONFIG_HOME) to place its data - (home-directory "/var/lib/mpd") - (shell (file-append shadow "/sbin/nologin")))) + (name "mpd") + ;; XXX: This is a place-holder to be lazily substituted in (…-accounts) + ;; with the value from the 'group' field of . + (group %lazy-group) + (system? #t) + (comment "Music Player Daemon (MPD) user") + ;; MPD can use $HOME (or $XDG_CONFIG_HOME) to place its data. + (home-directory "/var/lib/mpd") + (shell (file-append shadow "/sbin/nologin")))) (define %mpd-group (user-group @@ -235,10 +237,7 @@ (define (mpd-user-sanitizer value) user-account instead~%")) (user-account (inherit %mpd-user) - (name value) - ;; XXX: This is to be lazily substituted in (…-accounts) - ;; with the value from 'group'. - (group %lazy-group))) + (name value))) (else (configuration-field-error #f 'user value)))) @@ -676,12 +675,14 @@ (define-maybe/no-serialization mympd-ip-acl) (define %mympd-user (user-account - (name "mympd") - (group %lazy-group) - (system? #t) - (comment "myMPD user") - (home-directory "/var/empty") - (shell (file-append shadow "/sbin/nologin")))) + (name "mympd") + ;; XXX: This is a place-holder to be lazily substituted in 'mympd-accounts' + ;; with the value from the 'group' field of . + (group %lazy-group) + (system? #t) + (comment "myMPD user") + (home-directory "/var/empty") + (shell (file-append shadow "/sbin/nologin")))) (define %mympd-group (user-group @@ -696,10 +697,7 @@ (define (mympd-user-sanitizer value) user-account instead~%")) (user-account (inherit %mympd-user) - (name value) - ;; XXX: this is to be lazily substituted in (…-accounts) - ;; with the value from 'group'. - (group %lazy-group))) + (name value))) (else (configuration-field-error #f 'user value)))) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 04/16] services: mpd: Rename %set-user-group to set-user-group. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30:03 +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.168331137711939 (code B ref 63082); Fri, 05 May 2023 18:30:03 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:37 +0000 Received: from localhost ([127.0.0.1]:57477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BV-00036Q-13 for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:37 -0400 Received: from mail-qt1-f170.google.com ([209.85.160.170]:44159) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BT-00035R-Dj for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:35 -0400 Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-3ef3887e3c0so9474371cf.0 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311370; x=1685903370; 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=tifie4UXBeiflyejnrNW3Mfmy2natxq8FBP0x9+4ywY=; b=Za+O5MCyZmbFCGHHBpJzf/GOOxLqy1tYGMsEK1cZxUTAIi/t1GPbywtww29Fyfc7Ys 61eSVCzsw5Y/Xppiy8JRIx9YSJ2pqTd4TkufHbXO2eKx5u0YXX3I+VfTPgnbxd2CyHDs 1hvr5Fagj1RDDSfpgseCIE375v9hnHqHg2EwNCDz+3uxe5hA/aiNd0LGluh2fbJRUVUy 1HyiJ1h4W+OSTTwIMOXX2REwJUBWoPD5/lWCurbOmemBhv0rYr3tJzIoctXMtii91cXz RmTIeogh/graY1GW5w/O/aaishXkKIL7V32wGji3iLRXarxb5Xcp27tvb4SCwvqBsH6p EvXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311370; x=1685903370; 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=tifie4UXBeiflyejnrNW3Mfmy2natxq8FBP0x9+4ywY=; b=RMqulpJQkAZjA1PVHWnfjw5y/rmV5saVFz33VxyE8qq5opXHmn2gblgbHw6y1xcXFW BRlJM5mgJMP3wZT8b1Gnw8RKD4ykOO5kMKkqfzqk7lFhyMQ7WI7fcfkPVvRzGRECvR6P EmOCpAcso6Mozjix4Mbyl2VcxADxo9Qbcv85BD545Z//zrK7r38uLQnTJppqOzulZBg2 9flFDmGlWtexcb/q9x1rOBLleIrDT3MBVIWo6UdnOQuk1PY0ydgqD5T92wCWTRdemPT7 5n8yy59KLtwngjjgb+hrubMUXp1BkH594eqymRpEkYQPF6P5IDAcAVx35H1yIb+lzdDM mgIA== X-Gm-Message-State: AC+VfDyRES6oYlHOkrjzUWNOv8Q8kjNrcbIT0TMwng7nyMG50L6SMfrc aspyAyvbBl82JcFDyX6e8XFCKiGalQk= X-Google-Smtp-Source: ACHHUZ7tG9EpzIhdwITzR9L9+zgbP3HCsLdvHh+bfEEIuyc1pYN1vn9RGKjvVqBDcQlp/TabCaUV+w== X-Received: by 2002:a05:622a:1186:b0:3ec:45c7:33be with SMTP id m6-20020a05622a118600b003ec45c733bemr4123487qtk.42.1683311369871; Fri, 05 May 2023 11:29:29 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:29 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:28:59 -0400 Message-Id: <0957a706f8e236b6c44c88e29a7ab8b5dd3ce378.1683299529.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) The convention to use % as a prefix is for "special" variables rather than procedures. * gnu/services/audio.scm ((%set-user-group): Rename to... (set-user-group): ... this. --- gnu/services/audio.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index dc83479e40..7874539810 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -143,7 +143,7 @@ (define list-of-symbol? ;; Helpers for deprecated field types, to be removed later. (define %lazy-group (make-symbol "%lazy-group")) -(define (%set-user-group user group) +(define (set-user-group user group) (user-account (inherit user) (group (user-group-name group)))) @@ -636,7 +636,7 @@ (define (mpd-accounts config) (match-record config (user group) ;; TODO: Deprecation code, to be removed. (let ((user (if (eq? (user-account-group user) %lazy-group) - (%set-user-group user group) + (set-user-group user group) user))) (list user group)))) @@ -907,7 +907,7 @@ (define (mympd-accounts config) (match-record config (user group) ;; TODO: Deprecation code, to be removed. (let ((user (if (eq? (user-account-group user) %lazy-group) - (%set-user-group user group) + (set-user-group user group) user))) (list user group)))) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 05/16] services: mpd: Obsolete the 'group' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30:04 +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.168331138111968 (code B ref 63082); Fri, 05 May 2023 18:30:04 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:41 +0000 Received: from localhost ([127.0.0.1]:57481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BY-00036w-Ez for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:41 -0400 Received: from mail-qk1-f171.google.com ([209.85.222.171]:46423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BU-00035e-V4 for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:37 -0400 Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-75178b082a5so102331385a.1 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311371; x=1685903371; 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=smNiu6hbqDJPi3XLa5hXepfqyuKntQny/LT1qjEXZJ8=; b=LiJKylV3XA7Iei045PKVCcrNMn4lVQ9HeWeW0IW7wGlDt5i8SygupYUUAngTw+7BaQ LeqvcgIPa+jXaZ2p+24w0x+GHCtSvYfl33Z7x2KK5BpI9hmC5eWifsh47/7b2X9P9hid iZCO8WgKnhrzF/oYHkHMGgIvIwBrkkcpUDwDb49gk65YEv7fBrOU6YT/wfSGNfHhwY5Y afmIOGozA5XJvZBDFiUm/PBEKqRUPDJ+HXmlq9BV6xxW8ZKOyCf83awFNqrELOkZP4iJ 9RUGFZHQICsVhnbPkuT6VFfhF6mbQFR44STTWaF2dNdFNx7H5i546NnHM72bb2n7Goic jvcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311371; x=1685903371; 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=smNiu6hbqDJPi3XLa5hXepfqyuKntQny/LT1qjEXZJ8=; b=BsXuoVArICIKtt4REiTyceRZENXt/UxlOIaVaWKUTZZYEVxwaUwMnBW0q7G4vmNe8J gOABGXQKuFpN3i+QWnCUKrSH0oNUw2om5Ts8vOnSg7UcByavO6aul5U9pTqMN+v+jE8Y vC43M8pZ3evJHU1Qsp1uVXYzXWAZ9hctsU51SbQUtZK2yGevveQsqSQqQm7FIElkUX21 55S9xtXW0Q5yKXc1syEiHbT8AwCIMSKGPgX5iQfdsktrKUFIucPLeH/pC30DbNeooShB IPFxypT5JZARmG99p5CbdWkddL/dW/LC51pI1f5FS8MSyvsHpBXS01Idt6etAYyHKaWI sQ6w== X-Gm-Message-State: AC+VfDwUrbAr+re89p7Lg+dGUxkXwBaYXAL3e7aEtGu9Nc3U9gYqFxxY VDsWGqrE72wpKP5ETJAlGWMNAameOoA= X-Google-Smtp-Source: ACHHUZ55EcIkYHAYqOnXh0psFb6vSqJut6NrMBC+pKmah63hlgR8A2/7qVbkjbCsRopIUz78pJB/Cw== X-Received: by 2002:a05:622a:287:b0:3e6:3b1d:f922 with SMTP id z7-20020a05622a028700b003e63b1df922mr3827341qtw.50.1683311371185; Fri, 05 May 2023 11:29:31 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:30 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:29:00 -0400 Message-Id: <40db40a2bbfe5e0586d8b8c9694607bc0d66e340.1683299529.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Prior to this change, there was a discrepancy where a user could have disagreeing groups between the group and user fields (the user field being a record, which includes its primary group as a string). This could have caused problems because the USER's group was being used to set the file permissions, while the GROUP name was serialized to MPD's configuration, and MPD would use it to set the group of its running process. Synchronizing both is not practical, as it can easily lead to slightly different objects conflicting, again causing problems. The compromise is to obsolete the 'group' field. A group can still be configured via the 'user' field, which accepts a object, with the limitation that the group should already exist. * gnu/services/audio.scm (%lazy-group): Delete variable. (%set-user-group): Delete procedure. (mpd-serialize-user-group): Likewise. (%mpd-user) [group]: Default to "audio". (%mpd-group): Delete variable. (mpd-group-sanitizer, mympd-group-sanitizer): Adjust sanitizers. (mpd-configuration, mympd-configuration) [group]: Default to #f. Update doc. (mpd-accounts, mympd-accounts): Remove group. (%mympd-user) [group]: Default to "nogroup". (%mympd-group): Delete variable. * doc/guix.texi: Regenerate doc. --- doc/guix.texi | 15 +++----- gnu/services/audio.scm | 83 +++++++++++------------------------------- 2 files changed, 27 insertions(+), 71 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index d68d7dd7eb..db8f275bf2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33600,8 +33600,8 @@ Audio Services @item @code{user} (type: user-account) The user to run mpd as. -@item @code{group} (type: user-group) -The group to run mpd as. +@item @code{group} (default: @code{#f}) (type: boolean) +Obsolete. Do not use. @item @code{shepherd-requirement} (default: @code{()}) (type: list-of-symbol) This is a list of symbols naming Shepherd services that this service @@ -33853,15 +33853,12 @@ Audio Services This is a list of symbols naming Shepherd services that this service will depend on. -@item @code{user} (default: @code{%mympd-user}) (type: user-account) +@item @code{user} (type: user-account) Owner of the @command{mympd} process. -The default @code{%mympd-user} is a system user with the name ``mympd'', -who is a part of the group @var{group} (see below). -@item @code{group} (default: @code{%mympd-group}) (type: user-group) -Owner group of the @command{mympd} process. +@item @code{group} (default: @code{#f}) (type: boolean) +Obsolete. Do not use. -The default @code{%mympd-group} is a system group with name ``mympd''. @item @code{work-directory} (default: @code{"/var/lib/mympd"}) (type: string) Where myMPD will store its data. @@ -33901,7 +33898,7 @@ Audio Services Override URI to myMPD. See @uref{https://github.com/jcorporation/myMPD/issues/950}. -@item @code{script-acl} (default: @code{(mympd-ip-acl (allow '("127.0.0.1")))}) (type: maybe-mympd-ip-acl) +@item @code{script-acl} (type: maybe-mympd-ip-acl) ACL to access the myMPD script backend. @item @code{ssl?} (default: @code{#f}) (type: boolean) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 7874539810..60387272fc 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -140,14 +140,6 @@ (define (uglify-field-name field-name) (define list-of-symbol? (list-of symbol?)) -;; Helpers for deprecated field types, to be removed later. -(define %lazy-group (make-symbol "%lazy-group")) - -(define (set-user-group user group) - (user-account - (inherit user) - (group (user-group-name group)))) - ;;; ;;; MPD @@ -175,9 +167,6 @@ (define (mpd-serialize-list-of-strings field-name value) (define (mpd-serialize-user-account field-name value) (mpd-serialize-string field-name (user-account-name value))) -(define (mpd-serialize-user-group field-name value) - (mpd-serialize-string field-name (user-group-name value))) - (define-maybe string (prefix mpd-)) (define-maybe list-of-strings (prefix mpd-)) (define-maybe boolean (prefix mpd-)) @@ -185,20 +174,13 @@ (define-maybe boolean (prefix mpd-)) (define %mpd-user (user-account (name "mpd") - ;; XXX: This is a place-holder to be lazily substituted in (…-accounts) - ;; with the value from the 'group' field of . - (group %lazy-group) + (group "audio") (system? #t) (comment "Music Player Daemon (MPD) user") ;; MPD can use $HOME (or $XDG_CONFIG_HOME) to place its data. (home-directory "/var/lib/mpd") (shell (file-append shadow "/sbin/nologin")))) -(define %mpd-group - (user-group - (name "mpd") - (system? #t))) - ;;; TODO: Procedures for deprecated fields, to be removed. (define mpd-deprecated-fields '((music-dir . music-directory) @@ -242,15 +224,9 @@ (define (mpd-user-sanitizer value) (configuration-field-error #f 'user value)))) (define (mpd-group-sanitizer value) - (cond ((user-group? value) value) - ((string? value) - (warning (G_ "string value for 'group' is deprecated, use \ -user-group instead~%")) - (user-group - (inherit %mpd-group) - (name value))) - (else - (configuration-field-error #f 'group value)))) + (when value + (warning (G_ "'group' in is obsolete; ignoring~%"))) + #f) ;;; @@ -407,9 +383,10 @@ (define-configuration mpd-configuration (sanitizer mpd-user-sanitizer)) (group - (user-group %mpd-group) - "The group to run mpd as." - (sanitizer mpd-group-sanitizer)) + (boolean #f) + "Obsolete. Do not use." + (sanitizer mpd-group-sanitizer) + empty-serializer) (shepherd-requirement (list-of-symbol '()) @@ -633,12 +610,9 @@ (define (mpd-shepherd-service config) (format #t "Service MPD is not running."))))))))))) (define (mpd-accounts config) - (match-record config (user group) - ;; TODO: Deprecation code, to be removed. - (let ((user (if (eq? (user-account-group user) %lazy-group) - (set-user-group user group) - user))) - (list user group)))) + (match-record config + (user) + (list user))) (define mpd-service-type (service-type @@ -676,19 +650,12 @@ (define-maybe/no-serialization mympd-ip-acl) (define %mympd-user (user-account (name "mympd") - ;; XXX: This is a place-holder to be lazily substituted in 'mympd-accounts' - ;; with the value from the 'group' field of . - (group %lazy-group) + (group "nogroup") (system? #t) (comment "myMPD user") (home-directory "/var/empty") (shell (file-append shadow "/sbin/nologin")))) -(define %mympd-group - (user-group - (name "mympd") - (system? #t))) - ;;; TODO: Procedures for unsupported value types, to be removed. (define (mympd-user-sanitizer value) (cond ((user-account? value) value) @@ -702,15 +669,10 @@ (define (mympd-user-sanitizer value) (configuration-field-error #f 'user value)))) (define (mympd-group-sanitizer value) - (cond ((user-group? value) value) - ((string? value) - (warning (G_ "string value for 'group' is not supported, use \ -user-group instead~%")) - (user-group - (inherit %mympd-group) - (name value))) - (else - (configuration-field-error #f 'group value)))) + (when value + (warning (G_ "'group' in is obsolete; ignoring~%"))) + #f) + ;;; @@ -737,8 +699,8 @@ (define-configuration/no-serialization mympd-configuration empty-serializer) (group - (user-group %mympd-group) - "Owner group of the @command{mympd} process." + (boolean #f) + "Obsolete. Do not use." (sanitizer mympd-group-sanitizer) empty-serializer) @@ -904,12 +866,9 @@ (define (mympd-shepherd-service config) (stop #~(make-kill-destructor)))))) (define (mympd-accounts config) - (match-record config (user group) - ;; TODO: Deprecation code, to be removed. - (let ((user (if (eq? (user-account-group user) %lazy-group) - (set-user-group user group) - user))) - (list user group)))) + (match-record config + (user) + (list user))) (define (mympd-log-rotation config) (match-record config (log-to) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 06/16] services: mpd: List log-level in decreasing verbosity order in doc. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30:04 +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.168331138111976 (code B ref 63082); Fri, 05 May 2023 18:30:04 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:41 +0000 Received: from localhost ([127.0.0.1]:57483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BZ-00036z-1o for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:41 -0400 Received: from mail-qk1-f177.google.com ([209.85.222.177]:59558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BW-00035n-5v for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:38 -0400 Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-7512da2d994so109954585a.2 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311372; x=1685903372; 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=7BHTMwKmPQ0NZQefG0T/eUija+ph/V+8jnB5f+3Vnc4=; b=a+D4AjaLt6lqYxCeR5gI0x8/jSsrg7O7ZslyLbwJ/BhcY2app3alczW+yvP1DR/67J 9guvRJYwFutxaCSP1IpMLe8bcjaKH6RU4BQbFY12OwG9c61yOMQfwvuWw8iawS/HhcXO upPv7brag42Gg/20wU25IZvbZ3wTNKYBVbOaDui2THXJPE4SNgGij4uwJL7rvKYlrrm2 OIef1Cc/d45FwIAFEaQBxGR+aFmK/aTnGOl5mkWNbeaS4ctYHKZbkn67S5MTLB2MdpcK H0dRIPmnsbeHRTg7Gu6dnjHGbGSbD2QnX1gpMGLJH5sB8nsoMaUVIEPAhdMCVFBPAWU4 3Iug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311372; x=1685903372; 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=7BHTMwKmPQ0NZQefG0T/eUija+ph/V+8jnB5f+3Vnc4=; b=NiCb58qSHRKvm/D6OABZZtxYkNKWBgIWvRcG4wdxR222QN9aOTA3wVewHOg2ath82f rEZK+//BRC13qLOcedml2Tw+FbJWkBrGzjbFGgu+0QL59uME9ju3r26sEgybxj7me2YH BTuhSQJ4YzrFP6jSDPCr5GKn2PKuJJGMIicSJKn6/wQbPGzDc3YahjDib/mT6O9dd9u0 iB3lQaovwMdAlu/chjcoc1iZI8LUDFzAzeRb+xUOP6y1ceWOXg9RcC/pMwFLbt6ZTGCB SJJjCEySYj81rdhme+RqOqV9/oHnXImUWXHVIYoRwFIsAaKXcLiCtvGq1cIcd1HwAqtv lK/A== X-Gm-Message-State: AC+VfDyx6ADgl3+IHm7KyG/CnjCn9h7JzzAOKAMPBDiZlknM5Rn+kH/i fiqdqRGc15rUTbzuecmvUxw0u8bCX1Y= X-Google-Smtp-Source: ACHHUZ5dKqd3sHAUAgEiSMQv22dM+/wTS+yy2RNF18LteDBns4GZLe94Idk+DRkaWp1IyqtT7gOjKg== X-Received: by 2002:a05:622a:a:b0:3ba:2203:6c92 with SMTP id x10-20020a05622a000a00b003ba22036c92mr4412034qtw.10.1683311372518; Fri, 05 May 2023 11:29:32 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:32 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:29:01 -0400 Message-Id: <760043ec8cb9347911a094fc125917d0b38005a8.1683299529.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm (mpd-configuration) [log-level]: List log-level in decreasing verbosity order in doc. * doc/guix.texi (Audio Services): Update doc. --- doc/guix.texi | 6 +++--- gnu/services/audio.scm | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index db8f275bf2..200f6d019c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33616,9 +33616,9 @@ Audio Services configuration file. @item @code{log-level} (type: maybe-string) -Supress any messages below this threshold. Available values: -@code{notice}, @code{info}, @code{verbose}, @code{warning} and -@code{error}. +Supress any messages below this threshold. The available values, in +decreasing order of verbosity, are: @code{verbose}, @code{info}, +@code{notice}, @code{warning} and @code{error}. @item @code{music-directory} (type: maybe-string) The directory to scan for music files. diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 60387272fc..ead4cb8d90 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -409,8 +409,8 @@ (define-configuration mpd-configuration (log-level maybe-string "Supress any messages below this threshold. -Available values: @code{notice}, @code{info}, @code{verbose}, -@code{warning} and @code{error}.") +The available values, in decreasing order of verbosity, are: @code{verbose}, +@code{info}, @code{notice}, @code{warning} and @code{error}.") (music-directory maybe-string -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 07/16] services: mpd; Refactor start slot directory initialization. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30:05 +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.168331138411998 (code B ref 63082); Fri, 05 May 2023 18:30:05 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:44 +0000 Received: from localhost ([127.0.0.1]:57487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bb-00037R-It for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:44 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:54608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BX-000361-IZ for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:40 -0400 Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-7516ac80c6cso174195485a.1 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311374; x=1685903374; 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=FzkFOQ95JVWNZbu2arG+dwpzWOEStFiVEZ/u1Hr8YAI=; b=LuSsBvExb6Qvv41VshYKK82F90RGKndvWgkGZK51v0ZgqsZvQDiwNhNtFuZ/OWWWdU dJgwfdkvE2XzMvrrZuGJw3hWFork10NJDpbrWYewch1YqJwV0UWz1kxTBnN+yQSqQYgY DcYYBOvlYRzmQ4crCLe03cNDwN6MTxox+U2gWU0YqeTNSVSLm+JMriNDbPVPD/MHrmzJ Du6loNUd0QbFtdmlFkZT/SAk8dLMHAg4p3m6ghHWubgf3heCYfLfgE1MbRne6+iOi50L OMVeHEcT8iN5whKWUNIhXsllUij/pY8SMluIjEqxBmSEmB4aifphLQB/d8RdtzRfYIk8 xTow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311374; x=1685903374; 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=FzkFOQ95JVWNZbu2arG+dwpzWOEStFiVEZ/u1Hr8YAI=; b=ULgaz4mIgBZJPNEo5OyWexdVmpKjgvWhMAN9Bupb+dg8/9huB3Tmylszh0UWfcjMOx PRRkj+N7Wmfkjfl/RwWVuQ1lIzz2IVRbzMG+VyUfKxpy826y/huFX1xXNxmNQtjapMDo /okBbzwTSrxRXye68WYc3C+nLQLbMKgeTyQ8r17pRJ7Ok1nhpcJuQ7wgyc3nOiq8746F CJTF9OtUdzjvSYdI85VCH1DtcP2qO208+UYu6HQa9J7OzQJB3CohZJ3MrSTLx+qvgKgk AVnRjYVLbfvcb7oku1T7jP28vdVJrtygSwdOVBrQjaMMLFV6nh/Q8QauLquwF867yca3 JHkQ== X-Gm-Message-State: AC+VfDxNBA6PyNPOv0DsnzR2/1r2dzu2H1t/qnCCmso6chhtHu/ZG2kM sxWrjY6kcRejVJVbfqqqVRtdeMVZM4c= X-Google-Smtp-Source: ACHHUZ4/uwNBSR4nSHpDvEB+a+Q4c2tYtayEqJJ3qQV/wjLsMX99eercspkQ0MU4ZejAJatEIDkYaw== X-Received: by 2002:ac8:5745:0:b0:3f0:a755:61ef with SMTP id 5-20020ac85745000000b003f0a75561efmr4162232qtx.0.1683311373914; Fri, 05 May 2023 11:29:33 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:33 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:29:02 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm (mpd-shepherd-service): Standardize the way the log file parent and other directories are initialized in the start slot. (mympd-shepherd-service): Likewise. --- gnu/services/audio.scm | 132 ++++++++++++++++++++++++----------------- 1 file changed, 77 insertions(+), 55 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index ead4cb8d90..6e57bf5cba 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -24,6 +24,7 @@ (define-module (gnu services audio) #:use-module (guix deprecation) #:use-module (guix diagnostics) #:use-module (guix i18n) + #:use-module (guix modules) #:use-module (gnu services) #:use-module (gnu services admin) #:use-module (gnu services configuration) @@ -552,36 +553,45 @@ (define (mpd-log-rotation config) (with-shepherd-action 'mpd ('reopen) #f)))))) (define (mpd-shepherd-service config) - (match-record config (user package shepherd-requirement - log-file playlist-directory - db-file state-file sticker-file - environment-variables) + (match-record config + (user package shepherd-requirement + log-file playlist-directory + db-file state-file sticker-file + environment-variables) (let ((config-file (mpd-serialize-configuration config)) (username (user-account-name user))) (shepherd-service (documentation "Run the MPD (Music Player Daemon)") (requirement `(user-processes loopback ,@shepherd-requirement)) (provision '(mpd)) - (start #~(begin - (and=> #$(maybe-value log-file) - (compose mkdir-p dirname)) - - (let ((user (getpw #$username))) - (for-each - (lambda (x) - (when (and x (not (file-exists? x))) - (mkdir-p x) - (chown x (passwd:uid user) (passwd:gid user)))) - (list #$(maybe-value playlist-directory) - (and=> #$(maybe-value db-file) dirname) - (and=> #$(maybe-value state-file) dirname) - (and=> #$(maybe-value sticker-file) dirname)))) - - (make-forkexec-constructor - (list #$(file-append package "/bin/mpd") - "--no-daemon" - #$config-file) - #:environment-variables '#$environment-variables))) + (start + (with-imported-modules (source-module-closure + '((gnu build activation))) + #~(begin + (use-modules (gnu build activation)) + + (let ((user (getpw #$username))) + + (define (init-directory directory) + (unless (file-exists? directory) + (mkdir-p/perms directory user #o755))) + + (for-each + init-directory + '#$(map dirname + ;; XXX: Delete the potential "syslog" + ;; log-file value, which is not a directory. + (delete "syslog" + (filter-map maybe-value + (list db-file + log-file + state-file + sticker-file)))))) + + (make-forkexec-constructor + (list #$(file-append package "/bin/mpd") "--no-daemon" + #$config-file) + #:environment-variables '#$environment-variables)))) (stop #~(make-kill-destructor)) (actions (list (shepherd-configuration-action config-file) @@ -833,37 +843,49 @@ (define (mympd-serialize-configuration config) filename-to-field))))) (define (mympd-shepherd-service config) - (match-record config (package shepherd-requirement - user work-directory - cache-directory log-level log-to) - (let ((log-level* (format #f "MYMPD_LOGLEVEL=~a" log-level)) - (username (user-account-name user))) - (shepherd-service - (documentation "Run the myMPD daemon.") - (requirement `(loopback user-processes - ,@(if (eq? log-to 'syslog) - '(syslog) - '()) - ,@shepherd-requirement)) - (provision '(mympd)) - (start #~(begin - (let* ((pw (getpwnam #$username)) - (uid (passwd:uid pw)) - (gid (passwd:gid pw))) - (for-each (lambda (dir) - (mkdir-p dir) - (chown dir uid gid)) - (list #$work-directory #$cache-directory))) - - (make-forkexec-constructor - `(#$(file-append package "/bin/mympd") - "--user" #$username - #$@(if (eq? log-to 'syslog) '("--syslog") '()) - "--workdir" #$work-directory - "--cachedir" #$cache-directory) - #:environment-variables (list #$log-level*) - #:log-file #$(if (string? log-to) log-to #f)))) - (stop #~(make-kill-destructor)))))) + (match-record config + (package shepherd-requirement user work-directory cache-directory + log-level log-to) + (shepherd-service + (documentation "Run the myMPD daemon.") + (requirement `(loopback user-processes + ,@(if (eq? log-to 'syslog) + '(syslog) + '()) + ,@shepherd-requirement)) + (provision '(mympd)) + (start + (let ((username (user-account-name user))) + (with-imported-modules (source-module-closure + '((gnu build activation))) + #~(begin + (use-modules (gnu build activation)) + + (let ((user (getpw #$username))) + + (define (init-directory directory) + (unless (file-exists? directory) + (mkdir-p/perms directory user #o755))) + + (for-each + init-directory + '#$(map dirname + ;; XXX: Delete the potential 'syslog log-file value, + ;; which is not a directory. + (delete 'syslog + (filter-map maybe-value + (list log-to + work-directory + cache-directory)))))) + (make-forkexec-constructor + `(#$(file-append package "/bin/mympd") + "--user" #$username + #$@(if (eq? log-to 'syslog) '("--syslog") '()) + "--workdir" #$work-directory + "--cachedir" #$cache-directory) + #:environment-variables + (list #$(format #f "MYMPD_LOGLEVEL=~a" log-level)) + #:log-file #$(if (string? log-to) log-to #f))))))))) (define (mympd-accounts config) (match-record config -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 08/16] services: mpd: Log to syslog by default. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30:05 +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.168331138512014 (code B ref 63082); Fri, 05 May 2023 18:30:05 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:45 +0000 Received: from localhost ([127.0.0.1]:57490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bc-00037T-Ds for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:45 -0400 Received: from mail-qk1-f182.google.com ([209.85.222.182]:49307) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BZ-00036E-31 for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:41 -0400 Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-74e0180b7d3so106171085a.2 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311375; x=1685903375; 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=SYOyLx5I9AwcCCLA/vHuBkk6D+m+Rx3g9rzMFJBD/Yk=; b=M2bimNBPlzsyGLrG+U5MhRWdoM67xparv2swgHR53+9pD0Di9HyxmuQur94oNh8alS Ao8LJTmfvwAHIRa+fzH+KUy9l9EkSDF4tF4ZTcGxpjwI1uZE90JqE2FoGfFKfXRoCqJR CBFAPD04EHAlzbUsgtaOTNbC7JtaGyPUVnniDbf2RWdkWTJNsStbFI/ijfFtirCTnHyc nGsCDc0M0UoMFm2r8UwHJa3vWzwSOl1/oQMTxW2bAALC5rXFOcYL4nT1tiaV9euY5y3J TzoXDORfddgNxROdCq1nrTHCD7mdWNRnVwEncNZE1S+qeReKmzO1nVzF41ouRPWgjNo1 mFmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311375; x=1685903375; 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=SYOyLx5I9AwcCCLA/vHuBkk6D+m+Rx3g9rzMFJBD/Yk=; b=CoFC0eR2n2foFd57wzePfOu5oD1MJQZHtENBswFxMDmWawzGR0y+GJ+3WLZeq4eFa2 fmOeUiQ5BYCVetq+iHHmaZ3bMg4a+ZSLhX8yi3hD+ls75uKMbKRn1AoQBiwJNKMPxZTl Z2HW2yRUiXcSpcjUK7ZUm1oVaaPZ8m256vLG9qD5XUxKbNd1u9PouiCSFEt5ADuAor4J f5YwZIUC0BH9xOuq9G13l9j3PuoLigQT/hHexatd7v7dA+vKQqc/pCGJOSgCzMViYZLd DrRS2vQZV/72xF51J6suxbIukcZbPTTTbCmxVvb9RZKlEW9tw4K9Ugny+/SMuOZaj4pY Npzg== X-Gm-Message-State: AC+VfDwjDrOWfquP6VuxySIj7ikfFXFtr103vZJJ0H0i1FD/wwB8Uel5 yxWRWzpCxKGGaUs5GPD5HzT/DloogTg= X-Google-Smtp-Source: ACHHUZ5oVX/yNG/qbJItacyxRbYyXaEcvP+FOsfZKLNvwzvCW3JaJrm92sPA23j4nll7082MPsBH8g== X-Received: by 2002:ac8:7f4b:0:b0:3d9:b59f:1ba9 with SMTP id g11-20020ac87f4b000000b003d9b59f1ba9mr4288329qtk.12.1683311375264; Fri, 05 May 2023 11:29:35 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:34 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:29:03 -0400 Message-Id: <6f7567fe5433abc84119626c93a6504ba581bdf7.1683299529.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Rationale: the tristate value was awkward to deal with, the default log file name was odd (/var/log/mpd/log) and it required special attention to create the 'mpd' parent directory as root and chowning it to the MPD user. It also didn't match the default behavior of MPD, which is to log to systemd or syslog unless a log file is specified. * gnu/services/audio.scm (mpd-log-file-sanitizer): New procedure. (mpd-configuration) [log-file]: Remove default maybe value. Add sanitizer. (mpd-shepherd-service): Validate the log file parent directory exists and has the right permissions. Conditionally add syslogd to requirements. (mympd-log-to-sanitizer): New procedure. (mympd-configuration) [log-to]: Change type to maybe-string. Update doc and add sanitizer. (mympd-shepherd-service) [requirement]: Fix to use syslogd. Adjust accordingly. [start] Adjust accordingly. (mympd-log-rotation): Check log-to via maybe-value-set?. * doc/guix.texi (Audio Services): Update doc. --- doc/guix.texi | 17 +++++----- gnu/services/audio.scm | 74 ++++++++++++++++++++++++++++-------------- 2 files changed, 57 insertions(+), 34 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 200f6d019c..253b8f113b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33610,10 +33610,10 @@ Audio Services @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{log-file} (default: @code{"/var/log/mpd/log"}) (type: maybe-string) -The location of the log file. Set to @code{syslog} to use the local -syslog daemon or @code{%unset-value} to omit this directive from the -configuration file. +@item @code{log-file} (type: maybe-string) +The location of the log file. Unless specified, logs are sent to the +local syslog daemon. Alternatively, a log file name can be specified, +for example @file{/var/log/mpd.log}. @item @code{log-level} (type: maybe-string) Supress any messages below this threshold. The available values, in @@ -33884,11 +33884,10 @@ Audio Services How much detail to include in logs, possible values: @code{0} to @code{7}. -@item @code{log-to} (default: @code{"/var/log/mympd/log"}) (type: string-or-symbol) -Where to send logs. By default, the service logs to -@file{/var/log/mympd.log}. The alternative is @code{'syslog}, which -sends output to the running syslog service under the @samp{daemon} -facility. +@item @code{log-to} (type: maybe-string) +Where to send logs. Unless specified, the service logs to the local +syslog service under the @samp{daemon} facility. Alternatively, a log +file name can be specified, for example @file{/var/log/mympd.log}. @item @code{lualibs} (default: @code{"all"}) (type: maybe-string) See diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 6e57bf5cba..c1295837b6 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -229,6 +229,18 @@ (define (mpd-group-sanitizer value) (warning (G_ "'group' in is obsolete; ignoring~%"))) #f) +(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)))) + ;;; ;; Generic MPD plugin record, lists only the most prevalent fields. @@ -402,10 +414,11 @@ (define-configuration mpd-configuration empty-serializer) (log-file - (maybe-string "/var/log/mpd/log") - "The location of the log file. Set to @code{syslog} to use the -local syslog daemon or @code{%unset-value} to omit this directive -from the configuration file.") + maybe-string + "The location of the log file. Unless specified, logs are sent to the +local syslog daemon. Alternatively, a log file name can be specified, for +example @file{/var/log/mpd.log}." + (sanitizer mpd-log-file-sanitizer)) (log-level maybe-string @@ -562,7 +575,11 @@ (define (mpd-shepherd-service config) (username (user-account-name user))) (shepherd-service (documentation "Run the MPD (Music Player Daemon)") - (requirement `(user-processes loopback ,@shepherd-requirement)) + (requirement `(user-processes loopback + ,@(if (string=? "syslog" log-file) + '(syslogd) + '()) + ,@shepherd-requirement)) (provision '(mpd)) (start (with-imported-modules (source-module-closure @@ -683,6 +700,15 @@ (define (mympd-group-sanitizer value) (warning (G_ "'group' in is obsolete; ignoring~%"))) #f) +(define (mympd-log-to-sanitizer value) + (match value + ('syslog + (warning (G_ "syslog symbol value for 'log-to' is deprecated~%")) + %unset-value) + ((or %unset-value (? string?)) + value) + (_ (configuration-field-error #f 'log-to value)))) + ;;; @@ -749,10 +775,11 @@ (define-configuration/no-serialization mympd-configuration "How much detail to include in logs, possible values: @code{0} to @code{7}.") (log-to - (string-or-symbol "/var/log/mympd/log") - "Where to send logs. By default, the service logs to -@file{/var/log/mympd.log}. The alternative is @code{'syslog}, which -sends output to the running syslog service under the @samp{daemon} facility." + maybe-string + "Where to send logs. Unless specified, the service logs to the local +syslog service under the @samp{daemon} facility. Alternatively, a log file +name can be specified, for example @file{/var/log/mympd.log}." + (sanitizer mympd-log-to-sanitizer) empty-serializer) (lualibs @@ -849,9 +876,9 @@ (define (mympd-shepherd-service config) (shepherd-service (documentation "Run the myMPD daemon.") (requirement `(loopback user-processes - ,@(if (eq? log-to 'syslog) - '(syslog) - '()) + ,@(if (maybe-value-set? log-to) + '() + '(syslogd)) ,@shepherd-requirement)) (provision '(mympd)) (start @@ -867,16 +894,12 @@ (define (mympd-shepherd-service config) (unless (file-exists? directory) (mkdir-p/perms directory user #o755))) - (for-each - init-directory - '#$(map dirname - ;; XXX: Delete the potential 'syslog log-file value, - ;; which is not a directory. - (delete 'syslog - (filter-map maybe-value - (list log-to - work-directory - cache-directory)))))) + (for-each init-directory + '#$(map dirname (filter-map maybe-value + (list log-to + work-directory + cache-directory))))) + (make-forkexec-constructor `(#$(file-append package "/bin/mympd") "--user" #$username @@ -885,7 +908,7 @@ (define (mympd-shepherd-service config) "--cachedir" #$cache-directory) #:environment-variables (list #$(format #f "MYMPD_LOGLEVEL=~a" log-level)) - #:log-file #$(if (string? log-to) log-to #f))))))))) + #:log-file #$(maybe-value log-to))))))))) (define (mympd-accounts config) (match-record config @@ -893,8 +916,9 @@ (define (mympd-accounts config) (list user))) (define (mympd-log-rotation config) - (match-record config (log-to) - (if (string? log-to) + (match-record config + (log-to) + (if (maybe-value-set? log-to) (list (log-rotation (files (list log-to)))) '()))) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 09/16] services: mpd: Do not rotate logs when using syslog. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30:05 +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.168331138512025 (code B ref 63082); Fri, 05 May 2023 18:30:05 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:45 +0000 Received: from localhost ([127.0.0.1]:57492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bd-00037j-64 for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:45 -0400 Received: from mail-qk1-f181.google.com ([209.85.222.181]:62874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Ba-00036P-3j for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:42 -0400 Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-75131c2997bso1075054585a.1 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311376; x=1685903376; 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=VRLJQ2UELRV3IoSgFwgpQCJTIshUesj0ylHqCs4qFfs=; b=HnDV98htbG3+HiEH7lRPYJryr5/lwvBsKSvHiAyj8xEN7jmxF/kA8vCoiQEkTZbv1t Ln6DBUTqc1vMeQYh3WSlzpbVIBGzSpCtjgfANiwsBuXxopY7Lmn6eqENaSGZov1hGax0 zCc0irjTUGIplwmVaJMhBYhaUHyCkmkvJNbcmgB+VWn4CYzFm+gBg3YWm9YNbXG0T+mM FPyE0GtKZqQQjQ+5DU0RCK+lx2skNAvGj0xO16MGbsXfWzQeUfJLx/vVC4wZOoy71uCn SLoI0294RwU32LqpnT2cbVrYOcPbBWLtuIsPdrAmDuGj9b9I5a5waHiUwtjQ+96/BV9S IhwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311376; x=1685903376; 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=VRLJQ2UELRV3IoSgFwgpQCJTIshUesj0ylHqCs4qFfs=; b=QTpsUZicDGXLxkF4BhBKMdh3uDFwtO+7K5XPhm0+1EY8Drtw+GS+WBOQmKlYzC0tiH +4UUrHZ4LjijiCA2LfiZf46uLI++IVT6kOIpiCNCW1MRoDiOJS4Qrf9/PEXPRziVTluO JgJXGpsqbAVoO1y/rPniw1tL5AXWl6IorNaGiOG1EXA1AwngJ1Qnr0JvQzWjFdtPNJ/G ulZwah2r4UUwzl7key/yg4Hcltear2U8RO2/2FbCit5NA5RXmv3ljo8jpBdko6DIBLf8 svdc15qHU2DgzDddbIFZtdpiLsIyfYHNvPxW/7qi8LkMU7WFhWZldFY/0/q6UofPtC2l dciw== X-Gm-Message-State: AC+VfDzjBgygFjDv+1POvDGLvWLdiB9e/vjl8yCW5Gcz23x2JvCp7cJo eYKrcrpJdDxUpDVAldGA43rE+5qNTuQ= X-Google-Smtp-Source: ACHHUZ5fky8z3NO2YkNWlOPDGsHa+tghwdXme1zClC6OeQQhMCifWaqYNePPpaYhVKqzLPuRBUPmEA== X-Received: by 2002:ac8:7dcc:0:b0:3ef:5c5a:8932 with SMTP id c12-20020ac87dcc000000b003ef5c5a8932mr3865410qte.18.1683311376443; Fri, 05 May 2023 11:29:36 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:36 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:29:04 -0400 Message-Id: <8e7d04f8a82652d9db8fd6813f05f574b9232d85.1683299529.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm (mpd-log-rotation): Conditionlize based on the value of LOG-FILE. --- gnu/services/audio.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index c1295837b6..7fb4b8ccf7 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -558,12 +558,15 @@ (define (mpd-serialize-configuration configuration) (serialize-configuration configuration mpd-configuration-fields))) (define (mpd-log-rotation config) - (match-record config (log-file) - (log-rotation - (files (list log-file)) - (post-rotate #~(begin - (use-modules (gnu services herd)) - (with-shepherd-action 'mpd ('reopen) #f)))))) + (match-record config + (log-file) + (if (string=? "syslog" log-file) + '() ;nothing to do + (list (log-rotation + (files (list log-file)) + (post-rotate #~(begin + (use-modules (gnu services herd)) + (with-shepherd-action 'mpd ('reopen) #f)))))))) (define (mpd-shepherd-service config) (match-record config -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 10/16] services: mpd: Let Shepherd effect the user/group change. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30:06 +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.168331138712042 (code B ref 63082); Fri, 05 May 2023 18:30:06 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:47 +0000 Received: from localhost ([127.0.0.1]:57496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Be-000388-RC for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:47 -0400 Received: from mail-qt1-f172.google.com ([209.85.160.172]:47575) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bb-00036n-JF for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:44 -0400 Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-3eef63eff7eso10574911cf.3 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311378; x=1685903378; 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=jhZei39fokEgi8P9CjvAuGJB2a6CjG3QCZtl9A0F+2U=; b=XGmPOXsk7rq38bmjnLtJI1aXdRTarcu0+g6tFOv4zNuM4c3LuEaNqS+HnEyaGfEm6H S1CJOrO8T9tZanmQJYTUz8e+U9BUD0xJSt700Ul2Rc1Hir5o6aYzTLoIaoVGnjJLm5Ss Lf3A0XmDgsD1UOVsk7aPQp4kZR8/Y8yfwNDBjlrGFB2BO7N4auiAlHj9novoQILTmQZs VT7+3cXIN+JREKnH1JFBlY22/F5yFmSO46qr5asZyYV0iD+eVTBfmLyEZ3ecKomt3SjA brWEmQo9Dl87SfaXmMoaKEfKm8GJFvolOu9z4bG+owLT7uVYNJP4u1gAxdTCah+Yhhkr z9Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311378; x=1685903378; 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=jhZei39fokEgi8P9CjvAuGJB2a6CjG3QCZtl9A0F+2U=; b=OJI5Y/2n7RyClk1bMs0iLoxfvY7iFiaDm4z3vVxUsWUBrFQeuf4NjEOSfQt/EcEzSR TH7SG9kz/tLygB8aDekzMhok+k03pdLvpJwZGqv+7nrlhaFb1mM/aSI5ddrSxLv7i+fq ObFM2Jw1Sz1m5M87ZkvBBJd3EtftwBpXOjoA0de1c/JGIEbA+LdtjU07rP2T0vVu3Kvj 2R2h2spwZdVGkpKW3Rn5J8BXrrWfwhpnDNKaPA1/GVnBv4Wcd9T3wG+2tn/NMMlYGmai Sws9Z+5/lfiLeWnVzYdKWPQcKZ9D/o6oBVj/sw/9AntEO490DWa8cF37lO4U1FKO5bfo +XIA== X-Gm-Message-State: AC+VfDzMsPX7QeM9PV0GchVl3vgKB0MVjLyDKNaIjr7uqAXJCjpIV2Bx nkNr9VL/IsmLj+9f4GQbrhhhr/fV5c0= X-Google-Smtp-Source: ACHHUZ4P/FYK5Rd4soNwYJ5frdS4l7MqN65Q4czUmywT+KqBH14+FljKBhVg426OND4Dlrd3AZZ8iA== X-Received: by 2002:ac8:5745:0:b0:3ef:3960:a1b4 with SMTP id 5-20020ac85745000000b003ef3960a1b4mr4046063qtx.10.1683311377826; Fri, 05 May 2023 11:29:37 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:37 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:29:05 -0400 Message-Id: <5c6d38ec1621cf031175df6e05c027285d0acaae.1683299529.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . Quoting a MPD developer, regarding MPD's feature to switch user itself: "that's legacy for the dark ages when proper service managers did not exist" :-). * gnu/services/audio.scm (mpd-serialize-user-account) (mpd-serialize-user-group): Delete procedures. * gnu/services/audio.scm (mpd-configuration) [user]: Do not serialize. [group]: Likewise. (mpd-shepherd-service): Provide the #:user, #:group and #:supplementary-groups arguments. (mympd-shepherd-service): Likewise, and remove the '--user' argument. * doc/guix.texi (Audio Services): Update doc. (mympd-configuration) [port]: Change default value to 8080. [ssl-port]: Change default value to 443. * gnu/tests/audio.scm (run-mympd-test): Adjust accordingly. --- doc/guix.texi | 12 +++++----- gnu/services/audio.scm | 52 +++++++++++++++++++++++++----------------- gnu/tests/audio.scm | 4 ++-- 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 253b8f113b..cdc1f4dedc 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33598,7 +33598,7 @@ Audio Services The MPD package. @item @code{user} (type: user-account) -The user to run mpd as. +The user to run @command{mpd} as. @item @code{group} (default: @code{#f}) (type: boolean) Obsolete. Do not use. @@ -33642,7 +33642,7 @@ Audio Services The location of the sticker database. @item @code{default-port} (default: @code{6600}) (type: maybe-port) -The default port to run mpd on. +The default port to run @command{mpd} on. @item @code{endpoints} (type: maybe-list-of-strings) The addresses that mpd will bind to. A port different from @@ -33827,13 +33827,13 @@ Audio Services @uref{https://jcorporation.github.io/myMPD/, myMPD} is a web server frontend for MPD that provides a mobile friendly web client for MPD. -The following example shows a myMPD instance listening on port 80, +The following example shows a myMPD instance listening on port 8080, with album cover caching disabled. @lisp (service mympd-service-type (mympd-configuration - (port 80) + (port 8080) (covercache-ttl 0))) @end lisp @@ -33877,7 +33877,7 @@ Audio Services @item @code{host} (default: @code{"[::]"}) (type: string) Host name to listen on. -@item @code{port} (default: @code{80}) (type: maybe-port) +@item @code{port} (default: @code{8080}) (type: maybe-port) HTTP port to listen on. @item @code{log-level} (default: @code{5}) (type: integer) @@ -33903,7 +33903,7 @@ Audio Services @item @code{ssl?} (default: @code{#f}) (type: boolean) SSL/TLS support. -@item @code{ssl-port} (default: @code{443}) (type: maybe-port) +@item @code{ssl-port} (default: @code{4443}) (type: maybe-port) Port to listen for HTTPS. @item @code{ssl-cert} (type: maybe-string) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 7fb4b8ccf7..f470ca20e0 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2020 Ludovic Courtès ;;; Copyright © 2022⁠–⁠2023 Bruno Victal +;;; Copyright © 2023 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -165,9 +166,6 @@ (define mpd-serialize-boolean mpd-serialize-field) (define (mpd-serialize-list-of-strings field-name value) #~(string-append #$@(map (cut mpd-serialize-string field-name <>) value))) -(define (mpd-serialize-user-account field-name value) - (mpd-serialize-string field-name (user-account-name value))) - (define-maybe string (prefix mpd-)) (define-maybe list-of-strings (prefix mpd-)) (define-maybe boolean (prefix mpd-)) @@ -390,10 +388,14 @@ (define-configuration mpd-configuration "The MPD package." empty-serializer) + ;; Note: The user and its group are not serialized, otherwise MPD would + ;; attempt to switch the user/group itself. The task of switching the + ;; user/group is left to Shepherd instead. (user (user-account %mpd-user) - "The user to run mpd as." - (sanitizer mpd-user-sanitizer)) + "The user to run @command{mpd} as." + (sanitizer mpd-user-sanitizer) + empty-serializer) (group (boolean #f) @@ -458,7 +460,7 @@ (define-configuration mpd-configuration (default-port (maybe-port 6600) - "The default port to run mpd on.") + "The default port to run @command{mpd} on.") (endpoints maybe-list-of-strings @@ -611,7 +613,11 @@ (define (mpd-shepherd-service config) (make-forkexec-constructor (list #$(file-append package "/bin/mpd") "--no-daemon" #$config-file) - #:environment-variables '#$environment-variables)))) + #:environment-variables '#$environment-variables + #:user #$username + #:group #$(user-account-group user) + #:supplementary-groups + '#$(user-account-supplementary-groups user))))) (stop #~(make-kill-destructor)) (actions (list (shepherd-configuration-action config-file) @@ -654,7 +660,7 @@ (define mpd-service-type (service-extension account-service-type mpd-accounts) (service-extension rottlog-service-type - (compose list mpd-log-rotation)))) + mpd-log-rotation))) (default-value (mpd-configuration)))) @@ -770,7 +776,7 @@ (define-configuration/no-serialization mympd-configuration "Host name to listen on.") (port - (maybe-port 80) + (maybe-port 8080) "HTTP port to listen on.") (log-level @@ -805,7 +811,7 @@ (define-configuration/no-serialization mympd-configuration "SSL/TLS support.") (ssl-port - (maybe-port 443) + (maybe-port 4443) "Port to listen for HTTPS.") (ssl-cert @@ -901,17 +907,21 @@ (define (mympd-shepherd-service config) '#$(map dirname (filter-map maybe-value (list log-to work-directory - cache-directory))))) - - (make-forkexec-constructor - `(#$(file-append package "/bin/mympd") - "--user" #$username - #$@(if (eq? log-to 'syslog) '("--syslog") '()) - "--workdir" #$work-directory - "--cachedir" #$cache-directory) - #:environment-variables - (list #$(format #f "MYMPD_LOGLEVEL=~a" log-level)) - #:log-file #$(maybe-value log-to))))))))) + cache-directory)))) + + (make-forkexec-constructor + `(#$(file-append package "/bin/mympd") + "--user" #$username + #$@(if (eq? log-to 'syslog) '("--syslog") '()) + "--workdir" #$work-directory + "--cachedir" #$cache-directory) + #:environment-variables + (list #$(format #f "MYMPD_LOGLEVEL=~a" log-level)) + #:log-file #$(maybe-value log-to) + #:user #$username + #:group #$(user-account-group user) + #:supplementary-groups + '#$(user-account-supplementary-groups user)))))))))) (define (mympd-accounts config) (match-record config diff --git a/gnu/tests/audio.scm b/gnu/tests/audio.scm index acb91293e8..efa07b5ba9 100644 --- a/gnu/tests/audio.scm +++ b/gnu/tests/audio.scm @@ -89,7 +89,7 @@ (define (run-mympd-test) (define vm (virtual-machine (operating-system os) - (port-forwardings '((8080 . 80))))) + (port-forwardings '((8080 . 8080))))) (define test (with-imported-modules '((gnu build marionette)) @@ -113,7 +113,7 @@ (define (run-mympd-test) marionette)) (test-assert "HTTP port ready" - (wait-for-tcp-port 80 marionette)) + (wait-for-tcp-port 8080 marionette)) (test-equal "http-head" 200 -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 11/16] system: accounts: Export . Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30:06 +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.168331138812051 (code B ref 63082); Fri, 05 May 2023 18:30:06 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:48 +0000 Received: from localhost ([127.0.0.1]:57499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bf-00038B-K4 for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:47 -0400 Received: from mail-qt1-f176.google.com ([209.85.160.176]:45197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bd-00036p-68 for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:45 -0400 Received: by mail-qt1-f176.google.com with SMTP id d75a77b69052e-3ef3ce7085bso9430031cf.2 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311379; x=1685903379; 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=85aHwTtrAZsvDTtM0VKoidEaKkvUE2p2WOxWRNJlN7s=; b=OkEVg+MIpq75nMjxnsDxMHbdDCFrStjzDrF6i8hNRvabtqfIA+j7Cq1ccyyvUYjMSN NDxXbLHiBw/Lo5OMXazrrU2WJcfcDZS61X8PeOutyGcmNLMqCHDP9Hpz+Vs6FiPGBlrv T4tZh8YjtK1RfvSPaC05iTEThw9SUtuEeMXT2g8ZLc+2JyHVkQApKJuHG+I4R33kDAmH b6HlA5Kph+3Vs4U9mEa/q5yLBozFCyjjSOmwIb1jS1QB2z5oyMWngv3vy88ENh5MePm9 s9Zrb++C4/0Bl8x8+r6nRNVGOt5qQNUWemVfnLJ8uqf8J2tEKSl/HT7VSRiLf7qMs/ix 2srA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311379; x=1685903379; 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=85aHwTtrAZsvDTtM0VKoidEaKkvUE2p2WOxWRNJlN7s=; b=IObbMWCVTb1WgjeXnBbFvE/kLPTHhlBil2Eu+vabMPKkUO+5prWopF9sZvOyCwLWdb JyEBYjsLABATRnT9JJeondmk7xdyOf+NbI5FebVeH3GkxAfNkiEiZL0gRVihu7U6SVjV H1+6cTOLnngLwryScEmkTXkrXZw77WQff4E1qtBWCEZf/dm/2KbRaAwN2iJxRIxhga+w vC7WhdiNlLCAnCxWK//Vec7hytRBlW9sdNkwejl7VYvlBI+ttckbiPct+9vYQXoFvGUw GStJqLty+J0jtOD9+JyHh6JO7FpfartcaGklQuG3jT4X7idt9Rn7w9UPzrYQLmJPJHOt gXTQ== X-Gm-Message-State: AC+VfDwJCi4I94hxsOYLsQtETw0JEU26GqpKZwi2lUyW/KXfwikRGogK 7ENLeSYdWc0aiPYKDsHWTg3h56ZdFeI= X-Google-Smtp-Source: ACHHUZ6+EPLAXsLOPcBLF/EDbLgtSuTg5Vvc0YgQ1I/C25a8LsH/pTydKWRYvzUoCscEG2/u0+zM3A== X-Received: by 2002:a05:622a:1449:b0:3ef:4d4f:4cce with SMTP id v9-20020a05622a144900b003ef4d4f4ccemr4197430qtx.40.1683311379113; Fri, 05 May 2023 11:29:39 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:38 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:29:06 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --- gnu/system/accounts.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/system/accounts.scm b/gnu/system/accounts.scm index 586cff1842..e37b733c6d 100644 --- a/gnu/system/accounts.scm +++ b/gnu/system/accounts.scm @@ -19,7 +19,8 @@ (define-module (gnu system accounts) #:use-module (guix records) #:use-module (ice-9 match) - #:export (user-account + #:export ( + user-account user-account? user-account-name user-account-password -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 12/16] services: mpd: Warn when the MPD user is not in the "audio" group. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30: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.168331139012075 (code B ref 63082); Fri, 05 May 2023 18:30:07 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:50 +0000 Received: from localhost ([127.0.0.1]:57503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bi-00038a-2f for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:50 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:58659) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Be-00036x-0o for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:46 -0400 Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-3ef33a83ff1so10077321cf.1 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311380; x=1685903380; 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=9LFeL7l7LE5J2ndqbCbw5hKIGzSWVdt45VK5TRc55k4=; b=rUzGGfw1u9+tPV6eOPqvGR7B3CE/5iIA8xeAkOy4z6M8Ufsh5Co36Y1SKhXCI+EVMg 7KTdRPZNXmTus0Kzq2RwIXwJjhPWC52/G0MMuQkSwoWSsZHT7XSkVuHZeGhSeNWzcunj a63fuRBrF+uEr7BAGLMQWO9jygRuZepFihUkVDmrnPSVfOJlpJa21IkYFpOAsxc8NqCz o6lmMEAdqChFz5ZE0vrgIR26lYr5kNR0yBCYY58184S9cw7cZwV66GxOJlOL/VnaQDmr f/bbkC7Id+4kpzDz7QE1zl61UBQkewZeFAZb5tVQclLqAXjDHKwjfW1IOGaBcEgeai2Q NWGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311380; x=1685903380; 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=9LFeL7l7LE5J2ndqbCbw5hKIGzSWVdt45VK5TRc55k4=; b=XRSDtsnwZ+3oG3TD91gOIJBj3jb/DyOxY3TN4Gl0kfV9oldFRhFMfbsPa51OR1FbC1 y1cfm2GaK/Nno0bwjONhTFzlp99WsmMTZE6eqLgiqpXZk2M5/GWbCMOEYq3oGkGdSZI1 kx2TPz41nX+ER62EqHrfE/NRsa2wC74bMOAjGtM9tDgea9uQJg2XzLePpU/vYfwjJbru aihWDMZhNbNvTtiYt9MKZmDmFKzfzKGoWK5uZxrdwWUYxGbPm3A9Je9chtMpLxfiLA1L FNmOPrHZA6o/HyfS7R6vzIVm1PTvGRyzhtXr9a8RxPI3CAbKJJ5w1cvg4QRZkNKBkdFh 8ASQ== X-Gm-Message-State: AC+VfDz6dk8w1NVzU9TuahIb9KrNOlcyv2kI99TeI3oyco7lKstow1RO 5YTZweau1QxToAVpZ84HC8QYLSEbqP0= X-Google-Smtp-Source: ACHHUZ52MyhudsKfO2QIsiCTMxBwx/ImzuBYJ9fpmtA4hzSCfrNKO358+SP+FyK/l3P15PFL58R4SQ== X-Received: by 2002:a05:622a:93:b0:3ef:4a1d:4b99 with SMTP id o19-20020a05622a009300b003ef4a1d4b99mr4502021qtw.33.1683311380397; Fri, 05 May 2023 11:29:40 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:40 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:29:07 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . * gnu/services/audio.scm (%mpd-user) [group]: Add comment. (mpd-user-sanitizer): Warn if the MPD user is not in the audio group. --- gnu/services/audio.scm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index f470ca20e0..7040a63ecd 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -31,6 +31,7 @@ (define-module (gnu services audio) #:use-module (gnu services configuration) #:use-module (gnu services shepherd) #:use-module (gnu services admin) + #:use-module (gnu system accounts) #:use-module (gnu system shadow) #:use-module (gnu packages admin) #:use-module (gnu packages mpd) @@ -173,6 +174,8 @@ (define-maybe boolean (prefix mpd-)) (define %mpd-user (user-account (name "mpd") + ;; Being in the audio group ensures that PulseAudio can access sound + ;; devices. (group "audio") (system? #t) (comment "Music Player Daemon (MPD) user") @@ -209,10 +212,17 @@ (define (mpd-serialize-port field-name value) (define-maybe port (prefix mpd-)) -;;; Procedures for unsupported value types, to be removed. - +;;; Sanitizer procedures. (define (mpd-user-sanitizer value) - (cond ((user-account? value) value) + (cond ((user-account? value) + (match-record value + (group supplementary-groups) + (unless (or (string=? "audio" group) + (member "audio" supplementary-groups)) + ;; Being in the "audio" group is necessary for access to the + ;; sound devices. + (warning (G_ "mpd user not member of \"audio\" group~%")))) + value) ((string? value) (warning (G_ "string value for 'user' is deprecated, use \ user-account instead~%")) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 13/16] services: mpd: Auto-detect mpd-output mixer type by default. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30: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.168331139112082 (code B ref 63082); Fri, 05 May 2023 18:30:07 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:51 +0000 Received: from localhost ([127.0.0.1]:57505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bi-00038j-LH for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:51 -0400 Received: from mail-qt1-f176.google.com ([209.85.160.176]:56326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bf-00037I-AU for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:48 -0400 Received: by mail-qt1-f176.google.com with SMTP id d75a77b69052e-3f364b1149eso10369541cf.0 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311382; x=1685903382; 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=QoxS5dW/em2ldx7JT7TBgH36bYnOCk3lZyWskDOH/PU=; b=e6Q+NXLFZ95PjWKszZyltbjvdNbnxHR7/6Q9NKi98uHW61UgPSY27r0uPQtw4NYnZ6 Bm7IrayoKFcdHSCox8YZQSeJts1p4vubbF4lbdE+Kc5Mw7GPp2Nw6/zXI5gblqh63kh/ /1U8bXW/BJSRW1Sfgj11kRj7XpA3ESvM0sEiNc7UmkvkfiNxokvituz1Y9MVfkrYjQ6x Uz0yYd8VEixbhrIBywH72gm7/j6AATNew5H+FFn6aRprfBCKZvvz04NdEAZNKAMlicMb m0EJkpXHAY5L7ZaukiDBpCJNw7nyyua+1GzW8cLMO4j6rcPpFFx2Py11HVYeebEY4o/O z4cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311382; x=1685903382; 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=QoxS5dW/em2ldx7JT7TBgH36bYnOCk3lZyWskDOH/PU=; b=iIcfLA1xEuTJ/Q78wIzGxjPBm5hJLvHrwa/g18OqBLbcyNR819u9oOSq8X75WH3oAl LiIQJZvYnMWsIDFehEEjKNMlAlbD0vaPLTuj2OiFfRkgj6KVPy2k6Uk1eYsnhMWMek7p Mk5O0iSBunWb2slbHbK4rf6ZhAuhcCszzrT4qIuIxYpF+cLGvmV1GXQxnR6zkAjKgUiF 8AzNpHiFkmJvq3VMTQGuil76ynydK7K4jik/ZTgO2SifA9rWZrCN/hA+WKESUZ/bJqYQ ry08CAvwMvWYVAYTXMjOPDlrlqj9bj01YYgvc7ZzgB2Rp4if2nXqOfItgInGnQMMnyIM 4BOA== X-Gm-Message-State: AC+VfDyjgw4daLtv0feiaIiTt2R+txIA0j7B4uJfAwjkeBgiUrmujvoG Rdt0In/vXlVo8HZzswxczJpYjRNZxcQ= X-Google-Smtp-Source: ACHHUZ6lsDpMA15XYzhkCsaidAhsshlOdbyJMWf1gd+ACQNK1kRIxpMMO5TC1SrBw1nkYDMbGT1zKQ== X-Received: by 2002:a05:622a:510:b0:3ec:d85d:2afe with SMTP id l16-20020a05622a051000b003ecd85d2afemr4583364qtx.2.1683311381735; Fri, 05 May 2023 11:29:41 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:41 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:29:08 -0400 Message-Id: <726c25b0e7a28b095dfde163952f9d8711bbe219.1683299529.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . * gnu/services/audio.scm (mpd-output) [mixer-type]: Change default value from "none" to unspecified. * doc/guix.texi (Audio Services): Regenerate doc. --- doc/guix.texi | 11 +++++++---- gnu/services/audio.scm | 15 +++++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index cdc1f4dedc..0981aa1568 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33739,8 +33739,9 @@ Audio Services @end table @end deftp +@c %start of fragment @deftp {Data Type} mpd-output -Data type representing a @command{mpd} audio output. +Available @code{mpd-output} fields are: @table @asis @item @code{name} (default: @code{"MPD"}) (type: string) @@ -33767,15 +33768,16 @@ Audio Services @item @code{always-on?} (default: @code{#f}) (type: boolean) If set to @code{#t}, then MPD attempts to keep this audio output always -open. This may be useful for streaming servers, when you don?t want to +open. This may be useful for streaming servers, when you don’t want to disconnect all listeners even when playback is accidentally stopped. -@item @code{mixer-type} (default: @code{"none"}) (type: string) +@item @code{mixer-type} (type: maybe-string) This field accepts a string that specifies which mixer should be used for this audio output: the @code{hardware} mixer, the @code{software} mixer, the @code{null} mixer (allows setting the volume, but with no effect; this can be used as a trick to implement an external mixer -External Mixer) or no mixer (@code{none}). +External Mixer) or no mixer (@code{none}). When left unspecified, a +@code{hardware} mixer is used for devices that support it. @item @code{replay-gain-handler} (type: maybe-string) This field accepts a string that specifies how @@ -33790,6 +33792,7 @@ Audio Services @end table @end deftp +@c %end of fragment The following example shows a configuration of @command{mpd} that configures some of its plugins and provides a HTTP audio streaming output. diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 7040a63ecd..1e0a8b7f9e 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -346,15 +346,18 @@ (define-configuration mpd-output disconnect all listeners even when playback is accidentally stopped.") (mixer-type - (string "none") - "This field accepts a string that specifies which mixer should be used -for this audio output: the @code{hardware} mixer, the @code{software} -mixer, the @code{null} mixer (allows setting the volume, but with no -effect; this can be used as a trick to implement an external mixer -External Mixer) or no mixer (@code{none})." + maybe-string + "This field accepts a string that specifies which mixer should be used for +this audio output: the @code{hardware} mixer, the @code{software} mixer, the +@code{null} mixer (allows setting the volume, but with no effect; this can be +used as a trick to implement an external mixer External Mixer) or no +mixer (@code{none}). When left unspecified, a @code{hardware} mixer is used +for devices that support it." (sanitizer (lambda (x) ; TODO: deprecated, remove me later. (cond + ((eq? %unset-value x) + x) ((symbol? x) (warning (G_ "symbol value for 'mixer-type' is deprecated, \ use string instead~%")) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 14/16] services: mpd: Provision a default cache directory and set HOME. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30: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.168331139212097 (code B ref 63082); Fri, 05 May 2023 18:30:07 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:52 +0000 Received: from localhost ([127.0.0.1]:57508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bj-00038p-3u for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:51 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:45200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bg-00037P-FL for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:48 -0400 Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-3ef3ce7085bso9430781cf.2 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311383; x=1685903383; 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=PlCVUb+LXCPSVLdyUVzBoMZuuUfoq++1L5oZS4gLL38=; b=BzbDB+puQXeTzpuCnZgRjJGd8BXwHNWKjKBoWMRhli1JC5Qbc5Zo3BNjH4J9QOSFHJ u3dOrczrVmjHYnoocUkJjlKnqtvHDw3w8/nzCWf+DClxcf2q8kkgEBH2fPwBBf5R7Y4h tosZWnLMVZPtQLaRZC3nPoscExgENooNitYxTnoCBjlj8guaCGXri+xFxw4fX4neBZMV opqQfQhucnCL9K6BbhWXCzm7R3okaLZ4BDBRFxTfiYMBWnpO5fbg54RbXOeJXae2+WO7 QXDGXcTWQrHHbWCukuV9Nzn8AOutP3mmUFFN+GU4euJs3tO1sN09q3cOeHuwcrG1I4+1 L1KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311383; x=1685903383; 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=PlCVUb+LXCPSVLdyUVzBoMZuuUfoq++1L5oZS4gLL38=; b=KcH9uGeRSn7qFQ6vpOE27yWDBJuLw4mDGACneD6J1q5ezBVTwBC3SgWKDt1FGWQmky xrpNfiNoKEyHL422U+Jjp9yd05csNIz4tDjZW+i+T+vbKJhajT94vJ/Vfot25jTPrJbA bBSyIMrsOKlEylUr4033qg5boKXT5rxym1cEX01Cnp+t2+OprX7RKS23UxagxmTbzriZ hT9ONdWGyK3JLzuVsV9WH0c5/Eyp7U71rlKtv4hMbOcHLGgRWjjgm+Rn9em3JXvKpmBi R4L8K2duLdTcOYKKrWS9x6GvIdsXXDoZq0Svw0JxYQzK01dtfv+z8P2qvVRwuAFHz6NQ oUUQ== X-Gm-Message-State: AC+VfDwwunBP2h2qjBjN0WKbyMf3Dpolbc4YeTrvCFP9K0Clv4ax4eYq HNEbc+wIy9BqAE7pbAAymhyMm1iZk98= X-Google-Smtp-Source: ACHHUZ7fBvWhptQ3pisBDtNJUoBAcNARve+G1RT/Kk2pWGkVAgQGsaYljxqpHSzkVSwauujhLKA7rg== X-Received: by 2002:a05:622a:c5:b0:3ef:380a:d7bc with SMTP id p5-20020a05622a00c500b003ef380ad7bcmr4234060qtw.54.1683311382926; Fri, 05 May 2023 11:29:42 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:42 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:29:09 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . * gnu/services/audio.scm (mpd-shepherd-service): Create a default .cache directory. Use mkdir-p/perms and refactor loop. Set the HOME environment variables. --- doc/guix.texi | 3 +- gnu/services/audio.scm | 63 +++++++++++++++++++++++++----------------- 2 files changed, 39 insertions(+), 27 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 0981aa1568..04744498dd 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33633,7 +33633,8 @@ Audio Services The directory to store playlists. @item @code{db-file} (type: maybe-string) -The location of the music database. +The location of the music database. When left unspecified, +@file{~/.cache/db} is used. @item @code{state-file} (type: maybe-string) The location of the file that stores current MPD's state. diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 1e0a8b7f9e..e242f48ba0 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -461,7 +461,8 @@ (define-configuration mpd-configuration (db-file maybe-string - "The location of the music database.") + "The location of the music database. When left unspecified, +@file{~/.cache/db} is used.") (state-file maybe-string @@ -605,32 +606,42 @@ (define (mpd-shepherd-service config) #~(begin (use-modules (gnu build activation)) - (let ((user (getpw #$username))) - - (define (init-directory directory) - (unless (file-exists? directory) - (mkdir-p/perms directory user #o755))) + (let ((home #$(user-account-home-directory user))) + (let ((user (getpw #$username)) + (default-cache-dir (string-append home "/.cache"))) + + (define (init-directory directory) + (unless (file-exists? directory) + (mkdir-p/perms directory user #o755))) + + ;; Define a cache location that can be automatically used + ;; for the database file, in case it hasn't been explicitly + ;; specified. + (for-each + init-directory + (cons default-cache-dir + '#$(map dirname + ;; XXX: Delete the potential "syslog" + ;; log-file value, which is not a directory. + (delete "syslog" + (filter-map maybe-value + (list db-file + log-file + state-file + sticker-file))))))) - (for-each - init-directory - '#$(map dirname - ;; XXX: Delete the potential "syslog" - ;; log-file value, which is not a directory. - (delete "syslog" - (filter-map maybe-value - (list db-file - log-file - state-file - sticker-file)))))) - - (make-forkexec-constructor - (list #$(file-append package "/bin/mpd") "--no-daemon" - #$config-file) - #:environment-variables '#$environment-variables - #:user #$username - #:group #$(user-account-group user) - #:supplementary-groups - '#$(user-account-supplementary-groups user))))) + (make-forkexec-constructor + (list #$(file-append package "/bin/mpd") "--no-daemon" + #$config-file) + #:environment-variables + ;; Set HOME so MPD can infer default paths, such as + ;; for the database file. + (cons (string-append "HOME=" home) + '#$environment-variables) + #:user #$username + #:group #$(user-account-group user) + #:supplementary-groups + '#$(user-account-supplementary-groups user)))))) (stop #~(make-kill-destructor)) (actions (list (shepherd-configuration-action config-file) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 15/16] services: mpd: Update basic example. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30:08 +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.168331139412109 (code B ref 63082); Fri, 05 May 2023 18:30:08 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:54 +0000 Received: from localhost ([127.0.0.1]:57510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bl-00039E-SX for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:54 -0400 Received: from mail-qt1-f175.google.com ([209.85.160.175]:55332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bh-00037c-To for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:50 -0400 Received: by mail-qt1-f175.google.com with SMTP id d75a77b69052e-3ef31b7b868so17138741cf.2 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311384; x=1685903384; 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=7ZLzJQueLWII9pEY2I9WFHMclYhMI77moLC5p8rFAAk=; b=hb4+XNmSgJSFkC7WfD9ZBVBZngNBzZhUPmD2TPiG7+wiwr65/GKvJxfw5/lOcT9UgA eKpv/m2TbKdCr9lloR/qiwy5164U1zHte+NDnUIRXh8ef+jHTvnBHCsVgmP9L1HK6raN jDY+ap27PLtHg9mvV3z9HmH3CWgpCVxJ9AqmN9X64wpdGLfDCW7UzVOM/L7nCIuR4FLT ywyS5GhHXOE25yrxVK3doFgIheGGv5yHiDYhCBdvZHHfEdiESjEe0FgdbUC2vG8RztLN B5vK5ORfmkMwIQHpsQs87MePCkfdpToKnH5oIBhmkkQee9zMuREHM3M2n5IQ6Yh16QFR a5+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311384; x=1685903384; 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=7ZLzJQueLWII9pEY2I9WFHMclYhMI77moLC5p8rFAAk=; b=a0Fs7t01WepK4ax1Z0a6lvpVgji7Y7iRELLrkRs6LMsEoxpkGzDIWsQ6zvETbOPbRJ hiuxAOk5jBX9xs6mJl23+mrGV+LtTEK8ziUNwAX28f+dJgMZdcHcUBFeDfYRuGZ4eIvM Hi5mmPYmEfLh6cOU+yDv3SAYFd4XKH6BuLaHokSJgnWJFCPNwkU8rGHOsX3ILBaQplDR LYZRD16AL6jcpj8tYAdQg6PNx64mjsAY4Tki7ARaG+qBZjUg1yMYmxQwfSBs38Bj1EzC 0oHq0qYzoktmARA5HY4q9cjxYp2sZEU85vs1rH77JM8nBiJJaUgIumcl0mIbNKIafJVU MzJA== X-Gm-Message-State: AC+VfDx3QObBT66juL8YRuZd1i6rZB846biy923+G1P9kL3kG0G6sUrX 2VG9GDY1KG5tEifbkHJhFz7S/I1ELss= X-Google-Smtp-Source: ACHHUZ5rY2uY2OgIyqbRTfKAJbJOduoKXNGN0tC66OEW8aU6Z9kpdkJAp2yqSrg3L7mhPvrZu4L5kg== X-Received: by 2002:ac8:5a05:0:b0:3f1:f38e:a848 with SMTP id n5-20020ac85a05000000b003f1f38ea848mr3976253qta.58.1683311384217; Fri, 05 May 2023 11:29:44 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:43 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:29:10 -0400 Message-Id: <83a6d2fab0f25d7d469d202940785c8c05e47299.1683299529.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Relates to . * doc/guix.texi (Audio Services): Do not use a deprecated user form; keep the default one. Remove port. Specify a music-directory. Mention the importance of permissions on the music directory. --- doc/guix.texi | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 04744498dd..207001c550 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33565,16 +33565,27 @@ Audio Services being controlled from the local machine or over the network by a variety of clients. -The following example shows how one might run @code{mpd} as user -@code{"bob"} on port @code{6666}. It uses pulseaudio for output. +The following example shows the simplest configuration to locally +expose, via PulseAudio, a music collection kept at @file{/srv/music}, +with @command{mpd} running as the default @samp{mpd} user. This user +will spawn its own PulseAudio daemon, which may compete for the sound +card access with that of your own user. In this configuration, you may +have to stop the playback of your user audio applications to hear MPD's +output and vice-versa. @lisp (service mpd-service-type (mpd-configuration - (user "bob") - (port "6666"))) + (music-directory "/srv/music"))) @end lisp +@quotation Important +The music directory must be readable to the MPD user, by default, +@samp{mpd}. Permission problems will be reported via @samp{Permission +denied} errors in the MPD logs, which appear in @file{/var/log/messages} +by default. +@end quotation + Most MPD clients will trigger a database update upon connecting, but you can also use the @code{update} action do to so: -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 16/16] services: Avoid 'delete' overrides warning in audio module. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30:08 +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.168331139412115 (code B ref 63082); Fri, 05 May 2023 18:30:08 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:54 +0000 Received: from localhost ([127.0.0.1]:57512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bm-00039G-9d for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:54 -0400 Received: from mail-qt1-f172.google.com ([209.85.160.172]:52689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0Bi-00037z-T3 for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:51 -0400 Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-3ef4daaf906so10840401cf.1 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311385; x=1685903385; 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=w9101MSZiF3Liw50KOtLKgXBbOkv7rCUZJg43oW0CBA=; b=bZd6EBUrwTAX3DPpdV1qgFLJc0VwHux+DCWWYOaqBX8xE4nXRY/OLymNwuvBi2fIfh VsGi4+nKfx8L9i0rR3fURfvJydoKx21AwhpyKXXZTou9I2/a0s1hai8W4PD5lbTYhBPi S3gFJw3ijmOqAeOudzDD7djWWlOvVfu84DTOe0ru3bZDpvDNycdWBw0sGx50xVbKkYEW j6v0QdQYobUTDSGBDPpC7hOOuHYgRPNXu/19wg84GFZXsJ10K0ic56Jui+BZyEMPuemA 7QMMQn+sAVWpuyETyaxKN8gpoyNZzb4dyJzB3uf4XlSFaxMoShD+vh6DQBwXc491MskW Imow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311385; x=1685903385; 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=w9101MSZiF3Liw50KOtLKgXBbOkv7rCUZJg43oW0CBA=; b=fD6nBSyzD7MhsLz3RqqEzBVAaf7tTKkdzMPGznlh6ktuelye0G7fPO9PvZNK5KaUwR NczDSrndU8ePJKxt01ac77qvrmRAc8jTVXaxI5Yqe1HE9yf1l3MYRihagynXudCltzBH CbyMSwSKVP8u+5Ic+pMDVfSUvzHCIwII3aXU+A283qMJbdvzQJ7fiuUNinrfhn+qdZIe j4qZQxFb8NHrM+9JsfFEJli0/Hpa4vmzvcThczRN/534SXf9KluZWzsV9xgnnqq07LIj Ay2b7o262ZNqBcdaDn8114SRHCxplwTCfDRI+YtZ+Xlcka7O8pMD5FI+8z/1fE9cL7ly VoHQ== X-Gm-Message-State: AC+VfDx20LsHwipxGfsxJjFd1O/7eUJ1Lr1n0e53W2CbalBcR+iNiatw zbPVmqEnuzfvVL2bvyr1hpokG8TcmzU= X-Google-Smtp-Source: ACHHUZ4dDfp+TOwK+jP27p89oXmWJLHlE66608UEXuJhDXWXunhuNSCcyrh2OyilDmlcPYLEP9Wkzg== X-Received: by 2002:ac8:5c10:0:b0:3f1:be88:7178 with SMTP id i16-20020ac85c10000000b003f1be887178mr4410317qti.42.1683311385328; Fri, 05 May 2023 11:29:45 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:45 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:29:11 -0400 Message-Id: <93b7ed10e69acd89e7eaf916c6c3a31f65ccd7e3.1683299529.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/audio.scm: Hide 'delete' on (gnu services) import. --- gnu/services/audio.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index e242f48ba0..146ad89b0d 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -26,7 +26,7 @@ (define-module (gnu services audio) #:use-module (guix diagnostics) #:use-module (guix i18n) #:use-module (guix modules) - #:use-module (gnu services) + #:use-module ((gnu services) #:hide (delete)) #:use-module (gnu services admin) #:use-module (gnu services configuration) #:use-module (gnu services shepherd) -- 2.39.2 From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 04/16] services: mpd: Rename %set-user-group to set-user-group. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 19:43:01 +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: Maxim Cournoyer , 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168331574120086 (code B ref 63082); Fri, 05 May 2023 19:43:01 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 19:42:21 +0000 Received: from localhost ([127.0.0.1]:57577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv1Jt-0005Dt-Hs for submit@debbugs.gnu.org; Fri, 05 May 2023 15:42:21 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:46332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv1Jr-0005De-Hu for 63082@debbugs.gnu.org; Fri, 05 May 2023 15:42:20 -0400 Received: by mail-ed1-f66.google.com with SMTP id 4fb4d7f45d1cf-50b8d2eed3dso3384695a12.0 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 12:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683315732; x=1685907732; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=OPmztEfwiWl1r9+Jpl7CAsqci739JU69vDWW8wkfrSE=; b=KVB08Xls5ijzNJmAjRLU0TMV1TwL1llRd6zaxcS9VkRwv9YfTF5Aofz6tdUWfGFjeB foJRk5lDWNcKE8axx0K0lHCRocs8STaJXG+V6hivWH3A0CWIJynBASI78yjE7mgeXFOP LTBMHmCZjIIQOqruhIvdLcR+PHWQsj5CS0JO1b6IYwZErGb6OVy3hynWJyarOSoPO2Iz yHPpN8pQT2QP352HYDufwIjjZlZ/36ITPmC8eqrIhBYLl/wQknky0/PlvjP91kZABhvY jYkn9rBxSmW9zYdbHKS8SespPQkRlqnsA6T3oVG079TZtwvGgzYsCkzlzX6u6idOy5X8 8RDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683315732; x=1685907732; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=OPmztEfwiWl1r9+Jpl7CAsqci739JU69vDWW8wkfrSE=; b=P55dOXELtAN9RKFXG68L/e86HZiBUauRgo0hx4pa3UtnNBHQvc4iKA/ubU++yb+bD3 Md+p6nnJuN9Ccp/AJgIMkf4Esgn8DcZUQ5X/r7hRdhS733ORSaws2XdEB9vwZnn4vZ2C UzrfPcQ03JS9stV3I6EZGOUvqvZffQawxCTZtDcAigIP5hxQ7X0HH0LGU3s5ilL1oDNb sJ5amRvOVHSxFtlv60w5NSTfSgUhG4v6t4O4y5NURdORq3fXzYWa+iE8OfZde1G6+kPf RUdTuxF2/ruIm0L+soYzdo21uaJLR11JGTk2UGV+fp1ZdMProuPRKjAU36eHudcsstuT f3dg== X-Gm-Message-State: AC+VfDwQwnGxeuQwlXBJgKMi8I8xNqCRea3fNNI+9O9Lodj0zqGwpBbu Cy64/z3GgSoMfEi9J17OdAw= X-Google-Smtp-Source: ACHHUZ4mCT/keUlVfoWXEmugO0tWqcHAd/9x/GcThXY3L6lhvurKOgD1u6YyTMMPqJK0zQHyEb+cKA== X-Received: by 2002:a17:907:934a:b0:958:772e:e926 with SMTP id bv10-20020a170907934a00b00958772ee926mr2111475ejc.24.1683315732135; Fri, 05 May 2023 12:42:12 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id ci17-20020a170907267100b0096609d11c83sm57148ejc.60.2023.05.05.12.42.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 12:42:11 -0700 (PDT) Message-ID: From: Liliana Marie Prikler Date: Fri, 05 May 2023 21:42:10 +0200 In-Reply-To: <0957a706f8e236b6c44c88e29a7ab8b5dd3ce378.1683299529.git.maxim.cournoyer@gmail.com> References: <0957a706f8e236b6c44c88e29a7ab8b5dd3ce378.1683299529.git.maxim.cournoyer@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Freitag, dem 05.05.2023 um 14:28 -0400 schrieb Maxim Cournoyer: > The convention to use % as a prefix is for "special" variables rather > than procedures. Variables are a superset of procedures in Scheme :) That being said, I'm d'accord with the actual change. > * gnu/services/audio.scm ((%set-user-group): Rename to... One parenthesis too much. > (set-user-group): ... this. Cheers From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 05/16] services: mpd: Obsolete the 'group' field. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 19:53:01 +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: Maxim Cournoyer , 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168331632821622 (code B ref 63082); Fri, 05 May 2023 19:53:01 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 19:52:08 +0000 Received: from localhost ([127.0.0.1]:57588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv1TM-0005cg-DE for submit@debbugs.gnu.org; Fri, 05 May 2023 15:52:08 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:52670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv1TK-0005cB-Dm for 63082@debbugs.gnu.org; Fri, 05 May 2023 15:52:07 -0400 Received: by mail-ed1-f67.google.com with SMTP id 4fb4d7f45d1cf-50bc456cc39so3325065a12.1 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 12:52:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683316321; x=1685908321; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=ejJ/MnOXy4Ww/ZGjPQ17fDGHQE3t27RE4BESUqJO+ws=; b=sHNxnHuOl0FEqKs1wGtb7rqRN9IP78RjLwYHEB8uWUWNuuKuY8zlUREN8zV653nIbv ESY5/NVtfKrASH3fJzkcfd8hT4CWuWJ1W83SCQb2pqpmmtVgBFj7q1RnnCw31gLUkyfi 2iaOT9HqyuY6wRn5k9rDI6tmo3Tu1db9ybCHlKLxqXuGwCFvY7PM+MJHCjKL38VmjAmY PIYApsWrd/WjvZZ0RyXZW9kOeqRBy619FbD4VwRhyjyXA26/ClkhSGeMjawDMlmQqbvU 39MdHtxCfb44gkYibevTUQjPKDjg/VZyUW1CdqB+tnvUznLKD9ia0WKxXM2s8kkNSrgL lyaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683316321; x=1685908321; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ejJ/MnOXy4Ww/ZGjPQ17fDGHQE3t27RE4BESUqJO+ws=; b=aPKWYD/iYaMU43LDWw6IRbTnwIhpjnaXJ6YOxih82nq7XQiuX30d7ivHId79wUpicP EmYJaIcIic3+5C7ntdNQ4jxk4OCYQUWkXMGE4vf+TeOr+Vm+lkfoPgXrZ79JqjRf2CKF I7cMXt+x+Pt4I5pwktKuF60oigs96yb83QDh/f2hYo2MyRGjMweY/bC3EHO1+8XrR5UI uC98wm992DLrYu4aZy8FkZ1oP23sRL/a1DhBiii9cBTntuccY4BxF3/f0zlU/jzmXHXF u+O4dCEjGpCfXYjWfYLdgkameApBXQ3DtAPkexZp3SC37X/3qoLf1mjS8cr3NAL5k/jv R5yA== X-Gm-Message-State: AC+VfDzxvcimfFZPQgeySNEXPvuJ7zwt/o/Q6e0Dlwh2DRvqRdMkirUY XDf0sKfVBSIAoRS07jFBrSs= X-Google-Smtp-Source: ACHHUZ7wNF6fwtoEVbD5kTbyvA0TRtiZjOJRbFrvKqPOUuE8kcIYHCoKGIejYXZMAd3hfQF0ow2xnQ== X-Received: by 2002:a17:907:3e83:b0:957:1268:e611 with SMTP id hs3-20020a1709073e8300b009571268e611mr2741029ejc.1.1683316320447; Fri, 05 May 2023 12:52:00 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id gj36-20020a170907742400b00965b5540ad7sm1337535ejc.17.2023.05.05.12.51.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 12:52:00 -0700 (PDT) Message-ID: <7ba0cf980bf4ad3766c6c0ae30b069ed2891128e.camel@gmail.com> From: Liliana Marie Prikler Date: Fri, 05 May 2023 21:51:59 +0200 In-Reply-To: <40db40a2bbfe5e0586d8b8c9694607bc0d66e340.1683299529.git.maxim.cournoyer@gmail.com> References: <40db40a2bbfe5e0586d8b8c9694607bc0d66e340.1683299529.git.maxim.cournoyer@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Freitag, dem 05.05.2023 um 14:29 -0400 schrieb Maxim Cournoyer: > Prior to this change, there was a discrepancy where a user could have > disagreeing groups between the group and user fields (the user field > being a record, which includes its primary group as a > string).=C2=A0 This could have caused problems because the USER's group > was being used to set the file permissions, while the GROUP name was > serialized to MPD's configuration, and MPD would use it to set the > group of its running process.=C2=A0=C2=A0 Didn't we agree in v2 that we want to address this on the account- service level? Unless the rest of this series somehow depends on this patch, I'd rather delay it until we have a proper solution. > Synchronizing both is not practical, as it can easily lead to > slightly different objects conflicting, again causing > problems. It might not be practical to do so inside the service, but note how this has already become an effort in defensive programming. There are easier ways to not make this a problem on the configuration level, namely by specifying the same group for both user and group fields. As far as I see this is even the default state of being if the user is supplied as a string. Cheers From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 04/16] services: mpd: Rename %set-user-group to set-user-group. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 07 May 2023 02:38:01 +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: Liliana Marie Prikler Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.16834270502654 (code B ref 63082); Sun, 07 May 2023 02:38:01 +0000 Received: (at 63082) by debbugs.gnu.org; 7 May 2023 02:37:30 +0000 Received: from localhost ([127.0.0.1]:36083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvUHB-0000gk-OH for submit@debbugs.gnu.org; Sat, 06 May 2023 22:37:29 -0400 Received: from mail-qv1-f46.google.com ([209.85.219.46]:46081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvUH9-0000gW-PQ for 63082@debbugs.gnu.org; Sat, 06 May 2023 22:37:28 -0400 Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-619bebafb65so17087646d6.0 for <63082@debbugs.gnu.org>; Sat, 06 May 2023 19:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683427042; x=1686019042; h=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=UBvvS8McqgmyiWauvuybkTXHuSA7KC7EL5yNHkUyHSM=; b=JXemHkk2tIHVhVTio9uFFf1PE+l0R5y0bdxip6RKUA2UsNGS8BMyfFRhl8vqvtVOEi p0a4Jc7fJpuJdUCRo33twv37N9eHnUBD4iEOuzcOg0idRz7CA3OiwFB4kIp3rVT9T8k8 Eb3gyFuUOdTB4pNMthBP+qfFXgXM7QAOZhZVga0uJNbFqBNpBQUICtWK3IcglQaEih5I SU7GP3b4x7NckCofK8xvstZojDhZUqTCRLwOXyZvQcSedG77uSnJjONRwB7U2KUTAF2+ TTapOBAEg1YChFETT0Tmc7vf6Q8NIJ6wW/zaEkCEuSuRJVEqUmNV6VXronpAko074h64 /Oug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683427042; x=1686019042; h=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=UBvvS8McqgmyiWauvuybkTXHuSA7KC7EL5yNHkUyHSM=; b=agTj6e1vCVJy6qHR12yYrGh/K8umTZVlGudjkc3Ev9S5KJLH6VwxWLp/gkLYOs1Yxr IVBMVmX399cIYGCF2SOZncZS3HROi3CEKGjlhokENFcx6nclkbXOCAwZOm5LHlYQXhnV oEHqMrZ3JjswtTfB2TqS50GrknJidpJZ1h/sV1iRbLxBY0I5qEgjSwph2eaBqGo4KQ6C 20PqriV0NYokVYbjBggO+IC14XPrxH0Q3mCIaoEQOO0hOEFhhZZEz1tHkanlMn5oHXLx aYglC5lcb+XT1qMFafuVow2TXm0HvqDCBK/EMqOoiApTU9S5hAbcG1/5midSzbt6nae4 hFwA== X-Gm-Message-State: AC+VfDypf3KIyomFubg1yu9TVsPkkcPsY0Z0+hkixqSFajnUFrGrTPuZ SV2lYvucYpXt9x+KE2akMxYS6v5RyPA= X-Google-Smtp-Source: ACHHUZ7ef3qGrjETftkydoCgfEHCkg3riiHKlFh6FkbITAgZ5VGRGlz8lysPSf6ki/5FO0bFOB1EXw== X-Received: by 2002:a05:6214:e4d:b0:5af:af15:8d44 with SMTP id o13-20020a0562140e4d00b005afaf158d44mr8081362qvc.45.1683427042012; Sat, 06 May 2023 19:37:22 -0700 (PDT) Received: from hurd (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id e4-20020a0cf344000000b006167758ca0bsm1772763qvm.68.2023.05.06.19.37.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 May 2023 19:37:21 -0700 (PDT) From: Maxim Cournoyer References: <0957a706f8e236b6c44c88e29a7ab8b5dd3ce378.1683299529.git.maxim.cournoyer@gmail.com> Date: Sat, 06 May 2023 22:37:20 -0400 In-Reply-To: (Liliana Marie Prikler's message of "Fri, 05 May 2023 21:42:10 +0200") Message-ID: <87a5yg3lzz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Liliana! Liliana Marie Prikler writes: > Am Freitag, dem 05.05.2023 um 14:28 -0400 schrieb Maxim Cournoyer: >> The convention to use % as a prefix is for "special" variables rather >> than procedures. > Variables are a superset of procedures in Scheme :) > That being said, I'm d'accord with the actual change. Uh, interesting. >> * gnu/services/audio.scm ((%set-user-group): Rename to... > One parenthesis too much. Thanks, fixed locally. -- Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 05/16] services: mpd: Obsolete the 'group' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 07 May 2023 02:56:01 +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: Liliana Marie Prikler Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.16834281174968 (code B ref 63082); Sun, 07 May 2023 02:56:01 +0000 Received: (at 63082) by debbugs.gnu.org; 7 May 2023 02:55:17 +0000 Received: from localhost ([127.0.0.1]:36091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvUYO-0001I1-Qv for submit@debbugs.gnu.org; Sat, 06 May 2023 22:55:17 -0400 Received: from mail-qv1-f54.google.com ([209.85.219.54]:45286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvUYM-0001HG-OV for 63082@debbugs.gnu.org; Sat, 06 May 2023 22:55:15 -0400 Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-61af33bdf1dso16667926d6.2 for <63082@debbugs.gnu.org>; Sat, 06 May 2023 19:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683428109; x=1686020109; 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=+/IY8cJ+w8bIxvdCbtOxEHNoEEv3i6XZL9gqBCjCwWg=; b=T/Mpg1ZL8wD1cGRGYimIzPJM1GD+vdLLBLO24beENT3gatbmQyVDRWkJNqEQNof2mz l/5sZqIECRc0qEKvUHoFqs+k+LqDHs8VFVLB9Z8QS/waehhNppixxf2QyFNoef1xtLcF 6A7ivrhmtguB3MaNiU/SwtJekLaY/u5TGAQlevtzMdP0RMchKbMqJIG9mqGcSpNAg6Gr ldq6LaImlPwr6gFswnxnvYcPI1HDmTrwdKK75yd7SJYfUsgfRZqRXD4a3McQpxNNpyHF W0FNxINfKU3kUuTPqSxS4eBCwC7On58pP9u1lD9pF02yKXyFHIvSsye5/sLf/dx52pmD jCzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683428109; x=1686020109; 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=+/IY8cJ+w8bIxvdCbtOxEHNoEEv3i6XZL9gqBCjCwWg=; b=DwZppROPQL9kZhiKb3YILubur2gYHyLNhSh1a1rF/Hs4YVymti5AujvcHDVaySZBPu JEg6Jnr+JBh08g1RZDcbQufgGhUmiZimiwmjZOYTOL8HHl1uW970HtBWQMs1E4xc3gCa bplgThDgFUYBqAavHNCChoj9/x/KpAFCdfG1Ck0fqt6UsVRhNz4y/Nqfk/mY7htrYTDb QxI+avA+2uGNaUNPJjmzcx/+XN6nNBMBHcODMdu18c+8lPa8ry5kMQWKX6SBuFUbttBv KYapwR9pR5NQumIG2roskBQSeeLrT0Jl+5lhTqD7sOvat3zFkNkRa1NqJXLMmOm9Y4WR nljQ== X-Gm-Message-State: AC+VfDwwFDGnmCo0ByM9AQoetCfNhXR1kSPRjOEnuW6RAZLdmOxBIJDq zYK/+XrhMXHf/ySRFtPdXzD7T6D8gaA= X-Google-Smtp-Source: ACHHUZ6S2SPl0Wy69MgVEXhnrNLt1krmN1DoVLpsLIqP2lohfZdRsUTz2draT7uOQMlN1hl9DOfOSg== X-Received: by 2002:ad4:594b:0:b0:621:78a:dd84 with SMTP id eo11-20020ad4594b000000b00621078add84mr7593363qvb.47.1683428108997; Sat, 06 May 2023 19:55:08 -0700 (PDT) Received: from hurd (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id h10-20020a0cf20a000000b005e9a1409458sm1801457qvk.71.2023.05.06.19.55.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 May 2023 19:55:08 -0700 (PDT) From: Maxim Cournoyer References: <40db40a2bbfe5e0586d8b8c9694607bc0d66e340.1683299529.git.maxim.cournoyer@gmail.com> <7ba0cf980bf4ad3766c6c0ae30b069ed2891128e.camel@gmail.com> Date: Sat, 06 May 2023 22:55:07 -0400 In-Reply-To: <7ba0cf980bf4ad3766c6c0ae30b069ed2891128e.camel@gmail.com> (Liliana Marie Prikler's message of "Fri, 05 May 2023 21:51:59 +0200") Message-ID: <875y943l6c.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi! Liliana Marie Prikler writes: > Am Freitag, dem 05.05.2023 um 14:29 -0400 schrieb Maxim Cournoyer: >> Prior to this change, there was a discrepancy where a user could have >> disagreeing groups between the group and user fields (the user field >> being a record, which includes its primary group as a >> string).=C2=A0 This could have caused problems because the USER's group >> was being used to set the file permissions, while the GROUP name was >> serialized to MPD's configuration, and MPD would use it to set the >> group of its running process.=C2=A0=C2=A0 > Didn't we agree in v2 that we want to address this on the account- > service level? Unless the rest of this series somehow depends on this > patch, I'd rather delay it until we have a proper solution. I think we agreed the idea to have support objects for its group field was a good idea that should be implemented, but I declined doing this new work as part of this series :-). >> Synchronizing both is not practical, as it can easily lead to >> slightly different objects conflicting, again causing >> problems. > It might not be practical to do so inside the service, but note how > this has already become an effort in defensive programming. There are > easier ways to not make this a problem on the configuration level, > namely by specifying the same group for both user and group fields. As > far as I see this is even the default state of being if the user is > supplied as a string. I really don't like the group information being duplicated in both the user and a distinct field; it's an awkward API that raises more questions than it provides answers, in my opinion (non-intuitive). One of the reasons I came think this way is because a can differ by being a system group or not, which would make it easy to introduce unexpected, subtle variants. --=20 Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 05/16] services: mpd: Obsolete the 'group' field. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 07 May 2023 05:36: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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168343773223178 (code B ref 63082); Sun, 07 May 2023 05:36:02 +0000 Received: (at 63082) by debbugs.gnu.org; 7 May 2023 05:35:32 +0000 Received: from localhost ([127.0.0.1]:36196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvX3T-00061l-V9 for submit@debbugs.gnu.org; Sun, 07 May 2023 01:35:32 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:48505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvX3Q-00061Y-S5 for 63082@debbugs.gnu.org; Sun, 07 May 2023 01:35:30 -0400 Received: by mail-ed1-f66.google.com with SMTP id 4fb4d7f45d1cf-50bc0117683so6090725a12.1 for <63082@debbugs.gnu.org>; Sat, 06 May 2023 22:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683437723; x=1686029723; 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=I8/eBTkNRPBIg2Ca/2Y6EwiDAhZ5AcELTLw+0FSQmhw=; b=qYqOlWGusURjSaC+nDHf7MeehPhyPNJDoKuY7op43kGNHKqhQSMi6u9XwqSCyNH0Xl IEfJEkgrLxQ+z0es+7Jkze3NhpvPMVeLVFhAwVpi0LkZZqOM1EmZEVbOm3TWXzZyp+W2 +6CTKST2XBc87AruE0nyTjOClAlQT0nJclyeJLGA65FYP9pxoyB9NUQdaafqDGBxmD+q cJgCsEXV5QJDZZR4rk/1cRp+g/mSNfMXRKq3KslFDhgOfHghh1RRpGe8svKh6aTGJEW0 IembXPLUQjPOHJkKX6eejIXKmb8SCDnNT2k4WTLwb8yegslOOyugJq4EvF6f8WN27BPt tAMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683437723; x=1686029723; 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=I8/eBTkNRPBIg2Ca/2Y6EwiDAhZ5AcELTLw+0FSQmhw=; b=eb2tiTVlxhbuQx5FwoLxm0jwuPrCBl8GlRwxM348dzOucku3LViXxvQCWpKK9YLOoh 57c073C7Qqbm9Sduvkxm2hTnqjWywtnZN0xDyIDZex6OpivoiYphuGNR0mroynA8ALPy B8JNPhYPL0paQP1XdajCsR5YOcVr3p+FgWfFLt2cge4tJmgZvZmrem7A0DUdmnk35Gsg qGL/d87+vVbLkqxCQfSQDodPQcpM6mCkK3TyjA8GBYTqcELEPnLtgCqeSu4RIj0NCT6Y QLkSHh5zCrx4M1v1f3cCGrcm4Solho+XAM3IOW3CVQojF8LNcPKMP/FusSMIt7pJ8H1k SfMw== X-Gm-Message-State: AC+VfDw4u1kibi3oqCOKBYww8zT0LNx1yOYlcf+OiQbnsHjD2wRN53f0 3qHzl7OYfyS71TIbTrOx3Wk= X-Google-Smtp-Source: ACHHUZ6YZ23RLCa2Qk0tvyug7vj99R77dbdkQ/zDWMdMI9XTEgm8uMI6/M9gNkus8dtSUcWR7nZkDw== X-Received: by 2002:a17:906:5d11:b0:95f:7edb:def2 with SMTP id g17-20020a1709065d1100b0095f7edbdef2mr5528357ejt.69.1683437722669; Sat, 06 May 2023 22:35:22 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id t8-20020a1709063e4800b009660df2e6c6sm1818476eji.168.2023.05.06.22.35.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 May 2023 22:35:22 -0700 (PDT) Message-ID: <69a7c685bb22add38026990a91f099db44eb80ec.camel@gmail.com> From: Liliana Marie Prikler Date: Sun, 07 May 2023 07:35:21 +0200 In-Reply-To: <875y943l6c.fsf@gmail.com> References: <40db40a2bbfe5e0586d8b8c9694607bc0d66e340.1683299529.git.maxim.cournoyer@gmail.com> <7ba0cf980bf4ad3766c6c0ae30b069ed2891128e.camel@gmail.com> <875y943l6c.fsf@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Samstag, dem 06.05.2023 um 22:55 -0400 schrieb Maxim Cournoyer: > Hi! >=20 > Liliana Marie Prikler writes: >=20 > > Am Freitag, dem 05.05.2023 um 14:29 -0400 schrieb Maxim Cournoyer: > > Didn't we agree in v2 that we want to address this on the account- > > service level?=C2=A0 Unless the rest of this series somehow depends on > > this patch, I'd rather delay it until we have a proper solution. >=20 > I think we agreed the idea to have support group> objects for its group field was a good idea that should be > implemented, but I declined doing this new work as part of this > series :-). Indeed, that's how I understood it. However, I also thought that addressing this issue in a later series means we can keep the current behaviour until that is done. > > > Synchronizing both is not practical, as it can easily lead to > > > slightly different objects conflicting, again > > > causing problems. > > It might not be practical to do so inside the service, but note how > > this has already become an effort in defensive programming.=C2=A0 There > > are easier ways to not make this a problem on the configuration > > level, namely by specifying the same group for both user and group > > fields.=C2=A0 As far as I see this is even the default state of being i= f > > the user is supplied as a string. >=20 > I really don't like the group information being duplicated in both > the user and a distinct field; it's an awkward API that raises more > questions than it provides answers, in my opinion (non-intuitive). And I agree that it's awkward, but I don't agree that this patch solves the underlying issue. > One of the reasons I came think this way is because a > can differ by being a system group or not, which would make it easy > to introduce unexpected, subtle variants. Is that a serious issue, though? Yes, two configuration files, one with (system? #t) and one without will produce different results in that GIDs are allocated differently, but the same applies to the user as well. The only real issue I can think about here goes back to the handling of duplicate accounts and groups; and again, we both agree that those ought to be hard errors rather than warnings. Cheers From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 05/16] services: mpd: Obsolete the 'group' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 07 May 2023 18:13:01 +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: Liliana Marie Prikler Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168348317729927 (code B ref 63082); Sun, 07 May 2023 18:13:01 +0000 Received: (at 63082) by debbugs.gnu.org; 7 May 2023 18:12:57 +0000 Received: from localhost ([127.0.0.1]:38423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvisS-0007mc-OE for submit@debbugs.gnu.org; Sun, 07 May 2023 14:12:57 -0400 Received: from mail-qt1-f179.google.com ([209.85.160.179]:55773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvisO-0007mN-7A for 63082@debbugs.gnu.org; Sun, 07 May 2023 14:12:56 -0400 Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-3f0b30f240eso32470631cf.3 for <63082@debbugs.gnu.org>; Sun, 07 May 2023 11:12:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683483166; x=1686075166; 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=ZF/hL/VkYlB+NmwNLe6pkLrAknMxg0sIOQz2j77gJz0=; b=fK2El4o75tsAo+15ES6Ic+3P1I+eHQcoMnSD1RL91QMW7vVYppVE5fIb8HCC5Et2Dj ceG1JFM7xR6g3KYClRIaEujSJCNjrdyYYIH3JHROyu9Brz6TSSQ/hywURQ+8CPZQRGmq 0AFdvNfjgBFDZOV1T7MEZ90u1OVEItK7hnTXNOjk7Qv6BJZuBIirZOsREgY22xnccSyh aCv9J1Tz2UslC1m+fkalD+qaJWnar8Xw2UoUzQX+Mm34C84wZQWW+e9H0I0oWGEMaUb1 PKctbh2j+LTp+rjunKt/WRqt4tZFTctJe8cKFyJBJCKc6NiCLtIcU4FdBc9wvg/Ahm64 Ioog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683483166; x=1686075166; 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=ZF/hL/VkYlB+NmwNLe6pkLrAknMxg0sIOQz2j77gJz0=; b=cE2Z6hV0b5ufToI1QwyNSZPFnU9TW6Ap4eZJFYU8I9YIhqLhXUDFj/8zkyhygSzuwK zozg3rwGcMW07qi+9ZL9tZykzC/wgcYkNxQW9qe3GoxOLlaBBzIveuqqcAnIPR8wIr3D hUIo7OIepT8ByltLzT7gv3oxMAo9G7sMmqGDagwrZIv4NKVSmzUlW5NG02ZOOsmtdB9C umoqtRAymkSrHN3CM+t57i0xhFlbJvb189TBchl3Yz3nR8+Bc1zsFUCymK5sux6ymL7n hudps5WFMEc7QI58xXqvZNVAXpOfYHaD8GFu8uvqGrfyIJbYtmqAxF0+PT3NcrzBJEEb eOSw== X-Gm-Message-State: AC+VfDw/MDQkP/bK7GjRBH2CP1kNa9b6ncy3xs34w+lX8Z/NUmVpc64N DcKIxw2qlIO/irtvhYtz6QerKEaMOUSNCQ== X-Google-Smtp-Source: ACHHUZ7EnnzXKBlhq57NrcxR2Jh9pF2aeXR4y+OCvHFlRRsivsl14xRK10MPPjhZk7EQHZNgs/D3OA== X-Received: by 2002:ac8:5b03:0:b0:3ef:2fbd:90cd with SMTP id m3-20020ac85b03000000b003ef2fbd90cdmr10779123qtw.46.1683483166027; Sun, 07 May 2023 11:12:46 -0700 (PDT) Received: from hurd (dsl-10-131-119.b2b2c.ca. [72.10.131.119]) by smtp.gmail.com with ESMTPSA id s29-20020a05620a031d00b0074c438db55asm2050691qkm.74.2023.05.07.11.12.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 May 2023 11:12:45 -0700 (PDT) From: Maxim Cournoyer References: <40db40a2bbfe5e0586d8b8c9694607bc0d66e340.1683299529.git.maxim.cournoyer@gmail.com> <7ba0cf980bf4ad3766c6c0ae30b069ed2891128e.camel@gmail.com> <875y943l6c.fsf@gmail.com> <69a7c685bb22add38026990a91f099db44eb80ec.camel@gmail.com> Date: Sun, 07 May 2023 14:12:44 -0400 In-Reply-To: <69a7c685bb22add38026990a91f099db44eb80ec.camel@gmail.com> (Liliana Marie Prikler's message of "Sun, 07 May 2023 07:35:21 +0200") Message-ID: <87r0rsxb6r.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Liliana, Liliana Marie Prikler writes: > Am Samstag, dem 06.05.2023 um 22:55 -0400 schrieb Maxim Cournoyer: >> Hi! >>=20 >> Liliana Marie Prikler writes: >>=20 >> > Am Freitag, dem 05.05.2023 um 14:29 -0400 schrieb Maxim Cournoyer: >> > Didn't we agree in v2 that we want to address this on the account- >> > service level?=C2=A0 Unless the rest of this series somehow depends on >> > this patch, I'd rather delay it until we have a proper solution. >>=20 >> I think we agreed the idea to have support > group> objects for its group field was a good idea that should be >> implemented, but I declined doing this new work as part of this >> series :-). > Indeed, that's how I understood it. However, I also thought that > addressing this issue in a later series means we can keep the current > behaviour until that is done. My focus on this series was making sure the configuration is easy(er) to reason with and that it works out of the box for the most part. >> > > Synchronizing both is not practical, as it can easily lead to >> > > slightly different objects conflicting, again >> > > causing problems. >> > It might not be practical to do so inside the service, but note how >> > this has already become an effort in defensive programming.=C2=A0 There >> > are easier ways to not make this a problem on the configuration >> > level, namely by specifying the same group for both user and group >> > fields.=C2=A0 As far as I see this is even the default state of being = if >> > the user is supplied as a string. >>=20 >> I really don't like the group information being duplicated in both >> the user and a distinct field; it's an awkward API that raises more >> questions than it provides answers, in my opinion (non-intuitive). > And I agree that it's awkward, but I don't agree that this patch solves > the underlying issue. It puts the issue aside; if you can't configure a mismatched group, you can't shoot yourself in the foot. >> One of the reasons I came think this way is because a >> can differ by being a system group or not, which would make it easy >> to introduce unexpected, subtle variants. > Is that a serious issue, though? Yes, two configuration files, one > with (system? #t) and one without will produce different results in > that GIDs are allocated differently, but the same applies to the user > as well. The only real issue I can think about here goes back to the > handling of duplicate accounts and groups; and again, we both agree > that those ought to be hard errors rather than warnings. I think it's a serious issue because the permissions configured in the start slot may be wrong, and the service could fail to run because of it. --=20 Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 05/16] services: mpd: Obsolete the 'group' field. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 07 May 2023 18:32: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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168348431431814 (code B ref 63082); Sun, 07 May 2023 18:32:02 +0000 Received: (at 63082) by debbugs.gnu.org; 7 May 2023 18:31:54 +0000 Received: from localhost ([127.0.0.1]:38460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvjAo-0008H4-Bm for submit@debbugs.gnu.org; Sun, 07 May 2023 14:31:54 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:62546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvjAm-0008Gj-FE for 63082@debbugs.gnu.org; Sun, 07 May 2023 14:31:53 -0400 Received: by mail-ed1-f65.google.com with SMTP id 4fb4d7f45d1cf-50bd37ca954so42759739a12.0 for <63082@debbugs.gnu.org>; Sun, 07 May 2023 11:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683484306; x=1686076306; 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=Ipt1sTh8qVV1DihX6D3rPbX7PxMg+CXJ8FC/gEXxOiY=; b=W/EgSSKHGU26mWWWJ9U3qa5Apa0u1HVfCYbqP50oPwNReHu6NqjMZMhuCbTbfzxCqP Of/TWwv2vhwaBSPGNcqF5/mkEGa6UBOx1FR4+t2qPRnZJRoQWKb9b6MqGbYLgmADnI/E 6FZX9HwELFerP4OlAlfsHCSeqgkzXpDTWaIEZRo7jC+idTalt7A96g4cv7uUnWaMFQ2Y 4NbqAlnaf1ITbHQ9tRZhimcFTPrbaUehUXWehS1u1cxhBJeriX5i+XNKFoQlGhzOMGNf eJX5U0c8++DN8RihVVKmnX2yaa15c0qmG7I3Rm+hKaLx5/7/mJgTejyRlplg9IKkTG+5 CaJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683484306; x=1686076306; 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=Ipt1sTh8qVV1DihX6D3rPbX7PxMg+CXJ8FC/gEXxOiY=; b=iSlePBlzlLNjFw17xBZ26z5ERkiiLcPCRAZrpAkF7c3t0rmrmtpI8YGXmyMPwgL0Rw cXm+53Rj4OwqONkXbAjzZOz2EXOztJkubtVyH5s8ctTX9QqQy0HzChSt1EYIAU7JOrQF kSRtG4NOjlwFTxRidErxGDtSaQ09QWvauKyO0MBg8B9Dm48Z/3GkInw6gs2VJCnBk/6o cdpQeSZoaxevom80KA1Xi2LsvoWiXqH+mwJpHiRi6utzuQSXT7gaIOjZ/7ulers2ay/b UV8RgklY07v0iL0NE70PV3Ek3AJbkXDRGeGrD1yUrd+lSKepYtf5rnMYta83VSSRIQTB /gFA== X-Gm-Message-State: AC+VfDzXg64NPUbQw34e/N+CDyQRwXsPz2INgFQOLH/VGCNMhYt84GYE SpuGsY8ngkMc1XTQLeaN8wQ= X-Google-Smtp-Source: ACHHUZ7FB3Q+cmoPEQ4LhV1fZhi9qmAHRcgceWOKidfo8OqMqUHFF+iqAxYNykubG1kpKVxIX2AedQ== X-Received: by 2002:a17:907:7e96:b0:966:1ab0:94de with SMTP id qb22-20020a1709077e9600b009661ab094demr4127886ejc.18.1683484306516; Sun, 07 May 2023 11:31:46 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id st8-20020a170907c08800b009660e775691sm2585808ejc.151.2023.05.07.11.31.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 May 2023 11:31:46 -0700 (PDT) Message-ID: <17e566fadba5d61844d0e40b08d072e39baa409c.camel@gmail.com> From: Liliana Marie Prikler Date: Sun, 07 May 2023 20:31:44 +0200 In-Reply-To: <87r0rsxb6r.fsf@gmail.com> References: <40db40a2bbfe5e0586d8b8c9694607bc0d66e340.1683299529.git.maxim.cournoyer@gmail.com> <7ba0cf980bf4ad3766c6c0ae30b069ed2891128e.camel@gmail.com> <875y943l6c.fsf@gmail.com> <69a7c685bb22add38026990a91f099db44eb80ec.camel@gmail.com> <87r0rsxb6r.fsf@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Maxim, Am Sonntag, dem 07.05.2023 um 14:12 -0400 schrieb Maxim Cournoyer: > My focus on this series was making sure the configuration is easy(er) > to reason with and that it works out of the box for the mos [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (liliana.prikler[at]gmail.com) 1.3 RCVD_IN_VALIDITY_RPBL RBL: Relay in Validity RPBL, https://senderscore.org/blocklistlookup/ [209.85.208.65 listed in bl.score.senderscore.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.65 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.65 listed in list.dnswl.org] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) Hi Maxim, Am Sonntag, dem 07.05.2023 um 14:12 -0400 schrieb Maxim Cournoyer: > My focus on this series was making sure the configuration is easy(er) > to reason with and that it works out of the box for the most part. Obsoleting the group field does imho not significantly ease its use.=20 It rather makes its non-ootb use harder, because you now have to edit two operating-system fields, without changing anything for the ootb use. > > > >=20 > It puts the issue aside; if you can't configure a mismatched group, > you can't shoot yourself in the foot. No, it doesn't: Since it pulls in the groups field into "stuff you need to worry about when editing your MPD service", it actually exacerbates the issue. Yes, the API is awkward, but it does help making mpd- service-type self-contained. > >=20 > I think it's a serious issue because the permissions configured in > the start slot may be wrong, and the service could fail to run > because of it. What is "it" here: the fact that you can make a group with (system? #f) or the error in accounts-service-type that has been demoted to a warning? Cheers From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 05/16] services: mpd: Obsolete the 'group' field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 08 May 2023 01:06: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: Liliana Marie Prikler Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168350793820698 (code B ref 63082); Mon, 08 May 2023 01:06:02 +0000 Received: (at 63082) by debbugs.gnu.org; 8 May 2023 01:05:38 +0000 Received: from localhost ([127.0.0.1]:38708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvpJp-0005Nm-JD for submit@debbugs.gnu.org; Sun, 07 May 2023 21:05:37 -0400 Received: from mail-qv1-f46.google.com ([209.85.219.46]:51689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvpJn-0005NW-1K for 63082@debbugs.gnu.org; Sun, 07 May 2023 21:05:35 -0400 Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-61b79b9f45bso39634106d6.3 for <63082@debbugs.gnu.org>; Sun, 07 May 2023 18:05:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683507929; x=1686099929; h=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=eWD4/s8mPfnOYrLpv+AhxnUP6jcvvbR+YydAbFLNpqc=; b=gU+xI5DAKo6qzIjxMy2KWJFdDAv1PiamzQJ0ly7ViiIdkylUP8zHJm90LoB67vqa0R xz8n/i53WfnrgI6tN4IHISWsnQDi/nV0fNQFQ2qUFYnSFu1huiYN4hUMkDxAr+z/JJfv cqgV3I26H07Ci3Iz3rPzwBxM+6JtAy8SqJsm0K5ztdHZnME+WK49JglVZLwJjbObJlYE +BLJgOgPOCfZNC9U+o/uMNZye8BOttt6l4J2+eQe7MNf/CHHziZYSxlCWKS4jo0envBS 16hjc1pzNSCfrL77ehxV97q4nhQtn37PNxySiIgsZTOBQ9odek+iewMGm2Mn1i0rSdMT pmDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683507929; x=1686099929; h=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=eWD4/s8mPfnOYrLpv+AhxnUP6jcvvbR+YydAbFLNpqc=; b=QuBJSJFLPMvZazB9tV/0fMaqBIDMJr0yexF1WodA9Rf6kuUd2vYlTTAq6OtvTTdduk 0ieLmUF5sNi/CF7IAndRi3IOXa7e6oHTbnlMKw60zmk30sJf3IQLETtfr9+x7YzNwpPE TPJPEi3xoFV6a+zU6cTdwwqNQs7FyqauH6tFbbBABX9vW8Km+ybKxN7rCyBMqKmfOc4D z6WGoKK1pXFxE7cyfENG4iz9ABgFCxMbwtKctYP701IRoPx0JBwIvi9njA411RT/cR9t fGAHp554M3KXjgfFitdr+83KNMe62Jf2TBxbm9B8zXOhmMvX/EjkOkA12k5NrBTI317q EpUg== X-Gm-Message-State: AC+VfDzGctnj/+wWtISgujLWtdAehVQ4xPspQGXqNaKFSwd0Mh2vb1JF MrdkHfmSm6PK44AnzVKx1FBG5qiTAUDADQ== X-Google-Smtp-Source: ACHHUZ7x5DUdxIiZaCtH61CRGrZhtjQ8DwwgZQKQPcD+ISTwagf8PhcAjjv0Dzn8VGdUF6PXeAtR6w== X-Received: by 2002:a05:6214:27c9:b0:61b:3557:a695 with SMTP id ge9-20020a05621427c900b0061b3557a695mr11180139qvb.45.1683507929305; Sun, 07 May 2023 18:05:29 -0700 (PDT) Received: from hurd (dsl-10-131-119.b2b2c.ca. [72.10.131.119]) by smtp.gmail.com with ESMTPSA id q8-20020a0cf5c8000000b0061a3240d08asm2401978qvm.29.2023.05.07.18.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 May 2023 18:05:28 -0700 (PDT) From: Maxim Cournoyer References: <40db40a2bbfe5e0586d8b8c9694607bc0d66e340.1683299529.git.maxim.cournoyer@gmail.com> <7ba0cf980bf4ad3766c6c0ae30b069ed2891128e.camel@gmail.com> <875y943l6c.fsf@gmail.com> <69a7c685bb22add38026990a91f099db44eb80ec.camel@gmail.com> <87r0rsxb6r.fsf@gmail.com> <17e566fadba5d61844d0e40b08d072e39baa409c.camel@gmail.com> Date: Sun, 07 May 2023 21:05:27 -0400 In-Reply-To: <17e566fadba5d61844d0e40b08d072e39baa409c.camel@gmail.com> (Liliana Marie Prikler's message of "Sun, 07 May 2023 20:31:44 +0200") Message-ID: <87a5yfy6nc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Liliana, Liliana Marie Prikler writes: > Hi Maxim, > > Am Sonntag, dem 07.05.2023 um 14:12 -0400 schrieb Maxim Cournoyer: >> My focus on this series was making sure the configuration is easy(er) >> to reason with and that it works out of the box for the most part. > Obsoleting the group field does imho not significantly ease its use. > It rather makes its non-ootb use harder, because you now have to edit > two operating-system fields, without changing anything for the ootb > use. If you haven't tried that already, I'd like to give you the following challenge: with the current MPD service, are you able to configure it so that it works as your user, touching the minimum amount of configuration switches (as you'd do if you were a new MPD service user getting started?). With this series I opinionated on the side that less is better, coming from the realization that configuring a working MPD was already quite the challenge (less after this series, if it succeeds at its goal). In my opinion, the main two use cases for configuring the services user/group probably are: 1. you want to run it as an existing user 2. you want it to run as its own user The defaults cover 2, while for 1 you don't have a need to configure a group for it, since an existing user will also already have an existing group (and the captures such group). >> It puts the issue aside; if you can't configure a mismatched group, >> you can't shoot yourself in the foot. > No, it doesn't: Since it pulls in the groups field into "stuff you need > to worry about when editing your MPD service", it actually exacerbates > the issue. Yes, the API is awkward, but it does help making mpd- > service-type self-contained. The thing is that the 'group' field of mpd-service-type has a default, which is easy to forget (because it's duplicated from a object and you may reasonably expect the service to default to the specified user-account's group). But that's not easy to achieve. I tried. >> I think it's a serious issue because the permissions configured in >> the start slot may be wrong, and the service could fail to run >> because of it. > What is "it" here: the fact that you can make a group with (system? #f) > or the error in accounts-service-type that has been demoted to a > warning? I was thinking about the first one, although 2 would have been a nice sanity check to avoid ending in a strange state where your existing user is now in a different group that it ought to, for example. I hope all this text helps furthering our common understanding :-). -- Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 05/16] services: mpd: Obsolete the 'group' field. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 08 May 2023 17:22: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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168356647125439 (code B ref 63082); Mon, 08 May 2023 17:22:02 +0000 Received: (at 63082) by debbugs.gnu.org; 8 May 2023 17:21:11 +0000 Received: from localhost ([127.0.0.1]:41488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw4Xu-0006cF-Vo for submit@debbugs.gnu.org; Mon, 08 May 2023 13:21:11 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:44312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw4Xt-0006c0-Bo for 63082@debbugs.gnu.org; Mon, 08 May 2023 13:21:09 -0400 Received: by mail-ed1-f65.google.com with SMTP id 4fb4d7f45d1cf-50bc37e1525so9383153a12.1 for <63082@debbugs.gnu.org>; Mon, 08 May 2023 10:21:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683566462; x=1686158462; 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=ShxakLvAGe5jpiXVF69R0XTx42BoWAPV4eh4VLvdSUI=; b=bnGsAIvkTLVy9MHyc5tKY3xWUnVupw1gJxRT/2Jfb+ETFJb0rrZMtzoxa+2qt6jHTS NqxcqLW2G8pIh4DUs8ob7ta2oumTi96WovHAneABKjArs3EYtHvZyy0ZxLbkAwA6dzT3 WuXx96AChsQpPFdqRpOzxcCKBb6cprXAYOdByUGmXTT7K6vGlaIFzmQGvL1qOaOl3UJJ gf9bvVbQYle+LwmhZqgXiqT01QSUt/pCi12ex9fvKAkQtXBO1fYEtZTMNyT6D9esvOjR 4HGmTuFBTau0CVAVDJwdcmXhgBw3cNRRV/u2Qr78HkM9Q6TwpYyTCFUPrtTIpbVubQ3X d6pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683566462; x=1686158462; 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=ShxakLvAGe5jpiXVF69R0XTx42BoWAPV4eh4VLvdSUI=; b=EG1RFEeJc+p0N3VVRblo2rf9Vh93hMAKJM+kmebZWhkxX9tow1wDcUXGuiDy/8SIkk 7nQ3bu23ZMSk7VshYNOPZ9fr54wsJs8I8hadhvMhWxnedPHctpDoe9aChQtI6euVme8P WARWY9bGywbjY3r7yGp5B7R4XEjp4PKXxBc/xClsGCCjstB0p9vSMf3aDN0LJGNe3abh yHknyH2IX3PsnDIRr0cwG6YAR5s2IJVKlT8lb0NLSWt4vrk9GLOmYnAqBqo+pE6PW3H7 nQ+dsQ2+W4bEXMT5ibGeWk9HNAfDCajgGxFtXXL2Wsi4KwSKTQlEvV/uH5TFyz0HK/2z LfDA== X-Gm-Message-State: AC+VfDwa2N2n+vPMwMBGIhy4WnP2ZuyoMXRvsVKc8sW1SPbjZ9DTCCeu I81/iWw39+JkvUN5vV5YOpI= X-Google-Smtp-Source: ACHHUZ7I2in1pftJaW2QgsrhB7NOPQVSvssdAL5FHA1fSlDdxcoa+jLVyzyIps6o/gJL/S0wrF8P+A== X-Received: by 2002:a17:907:3f06:b0:966:335a:5b07 with SMTP id hq6-20020a1709073f0600b00966335a5b07mr6310269ejc.62.1683566461911; Mon, 08 May 2023 10:21:01 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id hs32-20020a1709073ea000b009534211cc97sm208165ejc.159.2023.05.08.10.21.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 10:21:01 -0700 (PDT) Message-ID: <55290ced23b1e241074977ee89860fa612e72666.camel@gmail.com> From: Liliana Marie Prikler Date: Mon, 08 May 2023 19:21:00 +0200 In-Reply-To: <87a5yfy6nc.fsf@gmail.com> References: <40db40a2bbfe5e0586d8b8c9694607bc0d66e340.1683299529.git.maxim.cournoyer@gmail.com> <7ba0cf980bf4ad3766c6c0ae30b069ed2891128e.camel@gmail.com> <875y943l6c.fsf@gmail.com> <69a7c685bb22add38026990a91f099db44eb80ec.camel@gmail.com> <87r0rsxb6r.fsf@gmail.com> <17e566fadba5d61844d0e40b08d072e39baa409c.camel@gmail.com> <87a5yfy6nc.fsf@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Am Sonntag, dem 07.05.2023 um 21:05 -0400 schrieb Maxim Cournoyer: > Hi Liliana, > > Liliana Marie Prikler writes: > > > Hi Maxim, > > > > Am Sonntag, dem 07.05.2023 um 14:12 -0400 schrieb Maxim Cou [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (liliana.prikler[at]gmail.com) 1.3 RCVD_IN_VALIDITY_RPBL RBL: Relay in Validity RPBL, https://senderscore.org/blocklistlookup/ [209.85.208.65 listed in bl.score.senderscore.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.65 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.65 listed in list.dnswl.org] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) Am Sonntag, dem 07.05.2023 um 21:05 -0400 schrieb Maxim Cournoyer: > Hi Liliana, >=20 > Liliana Marie Prikler writes: >=20 > > Hi Maxim, > >=20 > > Am Sonntag, dem 07.05.2023 um 14:12 -0400 schrieb Maxim Cournoyer: > > > My focus on this series was making sure the configuration is > > > easy(er) > > > to reason with and that it works out of the box for the most > > > part. > > Obsoleting the group field does imho not significantly ease its > > use. > > It rather makes its non-ootb use harder, because you now have to > > edit > > two operating-system fields, without changing anything for the ootb > > use. >=20 > If you haven't tried that already, I'd like to give you the following > challenge: with the current MPD service, are you able to configure it > so that it works as your user, touching the minimum amount of > configuration switches (as you'd do if you were a new MPD service > user getting started?). I mean, I do have an unfair advantage at this challenge, but: (define* (by proc value #:optional (=3D equal?)) (lambda (record) (=3D (proc record) value))) (service mpd-service-type (mpd-configuration (user (find (by user-account-name my-user-name) users)) (group (find (by user-group-name "users") %base-groups)))) If you want, you can also make that a match-lambda. > With this series I opinionated on the side that less is better, > coming from the realization that configuring a working MPD was > already quite the challenge (less after this series, if it succeeds > at its goal).=C2=A0 In my opinion, the main two use cases for configuring > the services user/group probably are: >=20 > 1. you want to run it as an existing user > 2. you want it to run as its own user >=20 > The defaults cover 2, while for 1 you don't have a need to configure > a group for it, since an existing user will also already have an > existing group (and the captures such group). Seeing how you write about "the main two use cases", I think either there is a third use case not mentioned or you are underselling the extent of the second use case. > > > It puts the issue aside; if you can't configure a mismatched > > > group, you can't shoot yourself in the foot. > > No, it doesn't: Since it pulls in the groups field into "stuff you > > need to worry about when editing your MPD service", it actually > > exacerbates the issue.=C2=A0 Yes, the API is awkward, but it does help > > making mpd-service-type self-contained. >=20 > The thing is that the 'group' field of mpd-service-type has a > default, which is easy to forget (because it's duplicated from a > object and you may reasonably expect the service to > default to the specified user-account's group).=C2=A0 But that's not easy > to achieve.=C2=A0 I tried. I mean, if you want to serialize the user account's group, by all means go ahead, but the group field should stay semantically intact for the case that user:group are provided as strings. Well, as it turns out, you don't need to serialize the user or the group to the config file, so that's not even an issue holding us back. > >=20 Cheers From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 02/16] services: mpd: Add an 'update' action to trigger a database update. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 24 May 2023 16:01: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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168494403024775 (code B ref 63082); Wed, 24 May 2023 16:01:02 +0000 Received: (at 63082) by debbugs.gnu.org; 24 May 2023 16:00:30 +0000 Received: from localhost ([127.0.0.1]:44472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1quc-0006RX-10 for submit@debbugs.gnu.org; Wed, 24 May 2023 12:00:30 -0400 Received: from smtpm1.myservices.hosting ([185.26.105.232]:47974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1quY-0006RN-PV for 63082@debbugs.gnu.org; Wed, 24 May 2023 12:00:29 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm1.myservices.hosting (Postfix) with ESMTP id 4B8D02085D; Wed, 24 May 2023 18:00:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id BCA04800AE; Wed, 24 May 2023 18:00:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id rJVypIfs2TmL; Wed, 24 May 2023 18:00:21 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 4D390800AD; Wed, 24 May 2023 18:00:21 +0200 (CEST) Message-ID: <927eb9f7-17e6-136d-8fbc-ab1e5d5bb87b@makinata.eu> Date: Wed, 24 May 2023 17:00:20 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: <685ac37d86b0e8eb135c5e40aa1f89240c2b4934.1683299529.git.maxim.cournoyer@gmail.com> From: Bruno Victal In-Reply-To: <685ac37d86b0e8eb135c5e40aa1f89240c2b4934.1683299529.git.maxim.cournoyer@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) 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 “logic” 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 “internal-mpc-host” and “internal-mpc-port”, 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) -- Furthermore, I consider that nonfree software must be eradicated. Cheers, Bruno. From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 04/16] services: mpd: Rename %set-user-group to set-user-group. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 24 May 2023 16:18:01 +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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168494502826316 (code B ref 63082); Wed, 24 May 2023 16:18:01 +0000 Received: (at 63082) by debbugs.gnu.org; 24 May 2023 16:17:08 +0000 Received: from localhost ([127.0.0.1]:44485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1rAe-0006qL-K8 for submit@debbugs.gnu.org; Wed, 24 May 2023 12:17:08 -0400 Received: from smtpm2.myservices.hosting ([185.26.105.233]:54996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1rAY-0006pp-Rh for 63082@debbugs.gnu.org; Wed, 24 May 2023 12:17:03 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm2.myservices.hosting (Postfix) with ESMTP id C623D20E15; Wed, 24 May 2023 18:16:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 9231E8009C; Wed, 24 May 2023 18:09:04 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CsKg0xoOjtm3; Wed, 24 May 2023 18:09:03 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 4551A8009B; Wed, 24 May 2023 18:09:03 +0200 (CEST) Message-ID: <36faf01b-e95e-c9b9-0e27-2908e7729b7a@makinata.eu> Date: Wed, 24 May 2023 17:09:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: <0957a706f8e236b6c44c88e29a7ab8b5dd3ce378.1683299529.git.maxim.cournoyer@gmail.com> From: Bruno Victal In-Reply-To: <0957a706f8e236b6c44c88e29a7ab8b5dd3ce378.1683299529.git.maxim.cournoyer@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 2023-05-05 19:28, Maxim Cournoyer wrote: > The convention to use % as a prefix is for "special" variables rather than > procedures. > > * gnu/services/audio.scm ((%set-user-group): Rename to... > (set-user-group): ... this. > --- > gnu/services/audio.scm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Though that's what is stated in , there is precedent within guix to prefix “internal” procedures with % in certain cases like changing the default constructor for the record-type itself. Some commits that show this: 22dd558c70901a336de97187f0470be584571158, 2397f4768091210b0a705ef750f2f38d6946fb89. -- Furthermore, I consider that nonfree software must be eradicated. Cheers, Bruno. From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 07/16] services: mpd; Refactor start slot directory initialization. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 24 May 2023 16:27: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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168494560927229 (code B ref 63082); Wed, 24 May 2023 16:27:02 +0000 Received: (at 63082) by debbugs.gnu.org; 24 May 2023 16:26:49 +0000 Received: from localhost ([127.0.0.1]:44540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1rK4-000757-Kp for submit@debbugs.gnu.org; Wed, 24 May 2023 12:26:48 -0400 Received: from smtpm2.myservices.hosting ([185.26.105.233]:56824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1rK3-00074z-2c for 63082@debbugs.gnu.org; Wed, 24 May 2023 12:26:47 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm2.myservices.hosting (Postfix) with ESMTP id 89C6C20E15; Wed, 24 May 2023 18:26:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id DE35F8009A; Wed, 24 May 2023 18:26:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uGEJj2zPUTqP; Wed, 24 May 2023 18:26:44 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 57AFC80098; Wed, 24 May 2023 18:26:44 +0200 (CEST) Message-ID: <8b2a56f3-266a-94b8-a07d-f8004ab1b401@makinata.eu> Date: Wed, 24 May 2023 17:26:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: From: Bruno Victal In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 2023-05-05 19:29, Maxim Cournoyer wrote: > - (make-forkexec-constructor > - (list #$(file-append package "/bin/mpd") > - "--no-daemon" > - #$config-file) > - #:environment-variables '#$environment-variables))) > + (start > + (with-imported-modules (source-module-closure > + '((gnu build activation))) How about adding '(gnu build activation) into %default-imported-modules (and %default-modules) at gnu/services/shepherd.scm? Services should be using the start field to perform these kinds of tasks anyways. (rather than extend activation-service-type which is incorrect use) > + #~(begin > + (use-modules (gnu build activation)) In general, rather than #~(begin (use-modules ...)), it's preferred to specify additional modules using the 'modules' field e.g. --8<---------------cut here---------------start------------->8--- (modules (cons '(gnu build activation) %default-modules)) --8<---------------cut here---------------end--------------->8--- > + > + (let ((user (getpw #$username))) > + > + (define (init-directory directory) > + (unless (file-exists? directory) > + (mkdir-p/perms directory user #o755))) > + > + (for-each > + init-directory > + '#$(map dirname > + ;; XXX: Delete the potential "syslog" > + ;; log-file value, which is not a directory. > + (delete "syslog" > + (filter-map maybe-value > + (list db-file > + log-file > + state-file > + sticker-file)))))) Perhaps treat “syslog” as a symbol instead? Strings seem more adequate when the value is a path, with a symbol being a sign that the value is to be treated “specially”. (this aligns with how mympd handles this) -- Furthermore, I consider that nonfree software must be eradicated. Cheers, Bruno. From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 10/16] services: mpd: Let Shepherd effect the user/group change. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 24 May 2023 16:42: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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168494649028810 (code B ref 63082); Wed, 24 May 2023 16:42:02 +0000 Received: (at 63082) by debbugs.gnu.org; 24 May 2023 16:41:30 +0000 Received: from localhost ([127.0.0.1]:44772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1rYH-0007Uc-RI for submit@debbugs.gnu.org; Wed, 24 May 2023 12:41:30 -0400 Received: from smtpm4.myservices.hosting ([185.26.105.235]:56030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1rYF-0007US-ID for 63082@debbugs.gnu.org; Wed, 24 May 2023 12:41:28 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm4.myservices.hosting (Postfix) with ESMTP id D3F2B20CC8; Wed, 24 May 2023 18:41:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 395ED8009C; Wed, 24 May 2023 18:41:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id e-UEmlNhXff4; Wed, 24 May 2023 18:41:23 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 962B38009B; Wed, 24 May 2023 18:41:23 +0200 (CEST) Message-ID: Date: Wed, 24 May 2023 17:41:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: <5c6d38ec1621cf031175df6e05c027285d0acaae.1683299529.git.maxim.cournoyer@gmail.com> From: Bruno Victal In-Reply-To: <5c6d38ec1621cf031175df6e05c027285d0acaae.1683299529.git.maxim.cournoyer@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 2023-05-05 19:29, Maxim Cournoyer wrote: > Relates to . > > Quoting a MPD developer, regarding MPD's feature to switch user itself: > "that's legacy for the dark ages when proper service managers did not exist" > :-). > > * gnu/services/audio.scm (mpd-serialize-user-account) > (mpd-serialize-user-group): Delete procedures. > * gnu/services/audio.scm (mpd-configuration) [user]: Do not serialize. > [group]: Likewise. > (mpd-shepherd-service): Provide the #:user, #:group and #:supplementary-groups > arguments. > (mympd-shepherd-service): Likewise, and remove the '--user' argument. > * doc/guix.texi (Audio Services): Update doc. > (mympd-configuration) [port]: Change default value to 8080. > [ssl-port]: Change default value to 443. > * gnu/tests/audio.scm (run-mympd-test): Adjust accordingly. > --- > doc/guix.texi | 12 +++++----- > gnu/services/audio.scm | 52 +++++++++++++++++++++++++----------------- > gnu/tests/audio.scm | 4 ++-- > 3 files changed, 39 insertions(+), 29 deletions(-) This contains a submarine change that isn't easily spotted from the commit message, that mympd is getting its default port changed and that it can no longer bind to privileged ports, since although mympd can start as root in order to bind to possibly privileged ports, it will explicitly refuse to continue running as root afterwards. I think we can have shepherd effect for mympd, but only if (and after) shepherd gets support for POSIX capabilities (CAP_NET_BIND_SERVICE) or a suitable way to specify that “yes, the program invoked by the service should have CAP_NET_BIND_SERVICE” is provided. -- Furthermore, I consider that nonfree software must be eradicated. Cheers, Bruno. From unknown Sat Aug 16 17:00:18 2025 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: Tue, 25 Jul 2023 19:40:01 +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@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.16903139948595 (code B ref 63082); Tue, 25 Jul 2023 19:40:01 +0000 Received: (at 63082) by debbugs.gnu.org; 25 Jul 2023 19:39:54 +0000 Received: from localhost ([127.0.0.1]:47050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qONsw-0002EZ-7o for submit@debbugs.gnu.org; Tue, 25 Jul 2023 15:39:54 -0400 Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]:59490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qONsu-0002EK-5l for 63082@debbugs.gnu.org; Tue, 25 Jul 2023 15:39:52 -0400 Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3a3c78ede4bso4316578b6e.2 for <63082@debbugs.gnu.org>; Tue, 25 Jul 2023 12:39:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690313985; x=1690918785; 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=NgAtwkVP4So0uBDSr/8+Dm50E32bIKbogfafO4In4m4=; b=Foff9PHiKGJLvYJUY1+9qjj9NLOMrQlMtfsYc9qm15XeSwx+jXU5oCD4w4t51ASvgs wDJk1FMlZC34cu8sQyIo3qDURI7v1uCixstyBckYh47U7TsMZ26AuvjEYd1soyL3jI6T AfKBTaV4VD8PINkBnvaJFKLlbMJ3G+YPLpnvXBqdkoW4679z/F/5aV7BX9nZjosZNEOC ehdblwspFPncMOWHVgVVQQ+e78XKEnbbifT4M6cyMaYAloxRuWdNTPZP5mJXoKlBAuxo tnZYZNmQfWHlipA3P+07kKKiuXe8XFVMrOPA6c4tS2vbqvOQTWiib7Im9m6V/ugX1Ask Mvjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690313985; x=1690918785; 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=NgAtwkVP4So0uBDSr/8+Dm50E32bIKbogfafO4In4m4=; b=ZCTPeAAfEVLUNkPLnFoM0cP4putTlanNbre/Xvuf8EvapW02nGSrDW47XTIWL9DmRB f1fCMV989CqzlJazLGt7TfMDwu85A7zpKPCvYG/30mhH94/j7fswgBnYHYZ4B+Z2bmv7 dRKhpvHJbODfs1RjAh2XeiApca04V0n7GchId31D1OnmSswy/0EOqaQFlpFXvWJR41cP mKeZltWfenn2TuQSWe151cO3c3Cj6aQQT7HdSbg2kVN471+/GsxnJ5PrtjZlmaae9whP BLfcgKM6t3LIJldGF+gIFdgTCG5ft9BepvBickdrecvVe7964G6TfDYdS9qGFUQrzl1p pF4g== X-Gm-Message-State: ABy/qLZWDiAWIpdko9En59HO8btagcwtdiCNnZaqjDJDnneHMV+X+t1k uvLAw6TXa0coeWykzUHOfTvOEVozHuY= X-Google-Smtp-Source: APBJJlEddTmdLho7zLuaLmrLZJYNJzG21bmjRXgl17qrIP79BtlPiPsS0XYegXTYclAcpHva+zlVxA== X-Received: by 2002:a05:6358:9197:b0:130:df70:b9cd with SMTP id j23-20020a056358919700b00130df70b9cdmr9672082rwa.12.1690313985206; Tue, 25 Jul 2023 12:39:45 -0700 (PDT) Received: from hurd (dsl-10-141-65.b2b2c.ca. [72.10.141.65]) by smtp.gmail.com with ESMTPSA id m13-20020a0cf18d000000b00635eeb8a4fcsm2566163qvl.114.2023.07.25.12.39.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 12:39:44 -0700 (PDT) From: Maxim Cournoyer References: <5c6d38ec1621cf031175df6e05c027285d0acaae.1683299529.git.maxim.cournoyer@gmail.com> Date: Tue, 25 Jul 2023 15:39:42 -0400 In-Reply-To: (Bruno Victal's message of "Wed, 24 May 2023 17:41:23 +0100") Message-ID: <87lef32329.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-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Bruno, Bruno Victal writes: > On 2023-05-05 19:29, Maxim Cournoyer wrote: >> Relates to . >>=20 >> Quoting a MPD developer, regarding MPD's feature to switch user itself: >> "that's legacy for the dark ages when proper service managers did not ex= ist" >> :-). >>=20 >> * gnu/services/audio.scm (mpd-serialize-user-account) >> (mpd-serialize-user-group): Delete procedures. >> * gnu/services/audio.scm (mpd-configuration) [user]: Do not serialize. >> [group]: Likewise. >> (mpd-shepherd-service): Provide the #:user, #:group and #:supplementary-= groups >> arguments. >> (mympd-shepherd-service): Likewise, and remove the '--user' argument. >> * doc/guix.texi (Audio Services): Update doc. >> (mympd-configuration) [port]: Change default value to 8080. >> [ssl-port]: Change default value to 443. >> * gnu/tests/audio.scm (run-mympd-test): Adjust accordingly. >> --- >> doc/guix.texi | 12 +++++----- >> gnu/services/audio.scm | 52 +++++++++++++++++++++++++----------------- >> gnu/tests/audio.scm | 4 ++-- >> 3 files changed, 39 insertions(+), 29 deletions(-) > > This contains a submarine change that isn't easily spotted from the > commit message, that mympd is getting its default port changed and that > it can no longer bind to privileged ports, since although mympd can > start as root in order to bind to possibly privileged ports, it will > explicitly refuse to continue running as root afterwards. > > I think we can have shepherd effect for mympd, but only if (and after) > shepherd gets support for POSIX capabilities (CAP_NET_BIND_SERVICE) or > a suitable way to specify that =E2=80=9Cyes, the program invoked by the s= ervice > should have CAP_NET_BIND_SERVICE=E2=80=9D is provided. OK. I've dropped the change so as to not block the rest of the series. --=20 Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 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: Tue, 25 Jul 2023 20:08: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@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.169031567611767 (code B ref 63082); Tue, 25 Jul 2023 20:08:02 +0000 Received: (at 63082) by debbugs.gnu.org; 25 Jul 2023 20:07:56 +0000 Received: from localhost ([127.0.0.1]:47111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOOJz-00033d-Iq for submit@debbugs.gnu.org; Tue, 25 Jul 2023 16:07:56 -0400 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]:50485) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOOJu-00033L-8l for 63082@debbugs.gnu.org; Tue, 25 Jul 2023 16:07:50 -0400 Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-6b9b89627c3so4623945a34.1 for <63082@debbugs.gnu.org>; Tue, 25 Jul 2023 13:07:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690315660; x=1690920460; 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=pyzaM8YjO23iMJBdjXb4V4291pXj4QrRArakrx6n9hs=; b=il8gh1/P2cdWgyTcKy/GK7sZ793leQTWRjcSpV3qLo9Se7PEXw2Y3cbcOAZaCfpCEJ gUc4O9YU0rJuifkE7NKIMQd2ZxeAK/Cd8THE+Zn/quNqx5NEf9N0Hwxb7k+7927aGLk2 tXqyTSv4Upk2w+jdC/PE1p88+nE2rFcCnSTQZYIxHWuED/Csw9/FitkAes30x3tktA+C JU9ru12BfO8VU6uwl4bQ5OrJoN0Rj2AOUAihOc9TwbUbEcSQ61AApCaZj1Lw2PsxlJFQ dlecrHmsmixwqIfialk7QH7PoD1CSKJ+KqqJDM3PFxES3tyJ2YuTRZGiSfi7rCXOc+MR TYTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690315660; x=1690920460; 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=pyzaM8YjO23iMJBdjXb4V4291pXj4QrRArakrx6n9hs=; b=cNlOD1yAiCSeohBcbFP6z1D04rQHjHHht1HVO98v+p8kabzJjx0hXdF/R4HKVzGJ+c 1Ijsl3bPT0MGpHvD5lHwq52vMaLudIZWydnmaLnPoFDEejLSq3YQCiv1OyvVi2p9Zwsf vzbyTghzXCBCoMVe6Hw7VUd578LNlbTvQbRsooh6j2mAEeAONG/wBJ5MuTZPMHktsoTr p2Mz0n4mc3DZ9xeI8Zy/t9wAGfCyZDeLk5fnrIy1Az1ufvCI2/3mHf1t1SaP5q/nMus4 qTG+7Cayuj+DS/3eCc+bbjdSoDD4j5z5Cdr0ZN3GaPG6oQ+11j6RhlAGvJipZlSeLU2R /nng== X-Gm-Message-State: ABy/qLbPzbjmiEXIUcOBxKFmOE7Cu1dKclsHG3f3dBTofJ0zGJLqraep sA9ww/JjuNvvXdW4AQ+dcsuyFVTcngc= X-Google-Smtp-Source: APBJJlGml6iz8DBlRQ0EcXBMzwpWzTBjsz0fO+JIFID41oykKao9yDT6HLp0rDS5aQDaqwK+H5Lzow== X-Received: by 2002:a05:6870:1cd:b0:1b7:4521:2f2 with SMTP id n13-20020a05687001cd00b001b7452102f2mr99912oad.32.1690315660081; Tue, 25 Jul 2023 13:07:40 -0700 (PDT) Received: from hurd (dsl-10-141-65.b2b2c.ca. [72.10.141.65]) by smtp.gmail.com with ESMTPSA id 26-20020a05620a079a00b007671cfe8a18sm3896296qka.13.2023.07.25.13.07.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 13:07:39 -0700 (PDT) From: Maxim Cournoyer References: <8b2a56f3-266a-94b8-a07d-f8004ab1b401@makinata.eu> Date: Tue, 25 Jul 2023 16:07:37 -0400 In-Reply-To: <8b2a56f3-266a-94b8-a07d-f8004ab1b401@makinata.eu> (Bruno Victal's message of "Wed, 24 May 2023 17:26:43 +0100") Message-ID: <87h6pr21rq.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-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Bruno Victal writes: > On 2023-05-05 19:29, Maxim Cournoyer wrote: >> - (make-forkexec-constructor >> - (list #$(file-append package "/bin/mpd") >> - "--no-daemon" >> - #$config-file) >> - #:environment-variables '#$environment-variables))) >> + (start >> + (with-imported-modules (source-module-closure >> + '((gnu build activation))) > > How about adding '(gnu build activation) into %default-imported-modules > (and %default-modules) at gnu/services/shepherd.scm? > Services should be using the start field to perform these kinds of tasks > anyways. (rather than extend activation-service-type which is incorrect u= se) I think that's something to discuss outside the scope of this series, which is already a bit unwieldy :-). I think originally they were put there because adding them to (guix build utils) would entail a world rebuild. >> + #~(begin >> + (use-modules (gnu build activation)) > > In general, rather than #~(begin (use-modules ...)), it's preferred to sp= ecify > additional modules using the 'modules' field e.g. I prefer to keep it the way it is, because the use-modules works in tandem with the with-imported-modules. I'd also have to wrap the stop procedure in a second with-imported-modules if I used the 'global' modules field, since it applies to both. > (modules (cons '(gnu build activation) > %default-modules)) > >> + >> + (let ((user (getpw #$username))) >> + >> + (define (init-directory directory) >> + (unless (file-exists? directory) >> + (mkdir-p/perms directory user #o755))) >> + >> + (for-each >> + init-directory >> + '#$(map dirname >> + ;; XXX: Delete the potential "syslog" >> + ;; log-file value, which is not a directory. >> + (delete "syslog" >> + (filter-map maybe-value >> + (list db-file >> + log-file >> + state-file >> + sticker-file)))))) > > Perhaps treat =E2=80=9Csyslog=E2=80=9D as a symbol instead? > Strings seem more adequate when the value is a path, with a symbol > being a sign that the value is to be treated =E2=80=9Cspecially=E2=80=9D. > (this aligns with how mympd handles this) There no longer is a delete "syslog" in the code, reworked in "services: mpd: Log to syslog by default." --=20 Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 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: Tue, 25 Jul 2023 20:49: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@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.169031811116454 (code B ref 63082); Tue, 25 Jul 2023 20:49:02 +0000 Received: (at 63082) by debbugs.gnu.org; 25 Jul 2023 20:48:31 +0000 Received: from localhost ([127.0.0.1]:47124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOOxL-0004HI-83 for submit@debbugs.gnu.org; Tue, 25 Jul 2023 16:48:31 -0400 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]:62540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOOxI-0004Ga-Nj for 63082@debbugs.gnu.org; Tue, 25 Jul 2023 16:48:29 -0400 Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-63cf9eddbc6so1582436d6.0 for <63082@debbugs.gnu.org>; Tue, 25 Jul 2023 13:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690318103; x=1690922903; 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=79H8a9Hm+ydimknUmA/76kUnxbg5oVPIWTrwyyiBheM=; b=GwoJ7g1tLO+cs/GGsRmvgEFt3YQKIXGmyYvNCIbQetXXmAj+6sbw+3NVJAuCSsBfYw W6LGPtxUKaC2hK+atX3E+TEfpMn7HMxVI0jxQKMHyHycN2/ef4lxwtUpY5UBo98Wn3kh 7sD1BEsnlqv51uMQkgKB6oXquUENar+uWHvefmVZQuZ1V8fKCe21M372LPXqHwd4DYv0 GNulxk2MgXAhPA9szMTEbq/z3f/Peyb9f7MAH6i7Tmh60KS3ooQm+iY+Z6eNBqJrlAxW TLD16iiRO8FHedpUfCZxT0y5SFKUwS7Tpg66H/SW8CpwtGkQBVClxKk7ikQl4Ncm0HOZ zdFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690318103; x=1690922903; 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=79H8a9Hm+ydimknUmA/76kUnxbg5oVPIWTrwyyiBheM=; b=XZcMyKiFcGAuubd3IoHlVyW9xb9iPaGiL74w83YoESr4UQQUVckATsOjnWEqWIMmTe JrctuVyFUZQD7XvIr5SzX1T6D5PhGvx6sAYmKhyiQUGo4NTO3v0Bn6HVyavF8YbzWdEz SPawjtLMhP4r8A/VqM+o/mUhuChz3pT4cjCxKwx+r4cfTvDZfNgyLIAHw6sRJywZi0Lc n15VOtGJGMrZpD/o7KZNsAtgA52esAPFubXHFVUJYMJ+9odLoWUP9mOKzJzlyLoEijMr +AuWfcEPB4yM94DP/rD3CLOpygN7ohvZ20iN2QW/ubnxxq3JDZEfFKazj292Xr7CYKqE uHWg== X-Gm-Message-State: ABy/qLb1mg6hHjxngWcdnCp4m2YjAgnquN89EAPGDAqJpS8KYjtXry6R 087yUbr6lKI4F6yZYQdymj4dQB3MXpI= X-Google-Smtp-Source: APBJJlERbJzWBjGz0ltX8ca4tnQOFuOhwe9pK7vMGlBFKY8zbX1Fx/h/XQPGrrux7uFc4ikmNvQ8iw== X-Received: by 2002:ad4:5963:0:b0:63d:580:9c68 with SMTP id eq3-20020ad45963000000b0063d05809c68mr4104076qvb.32.1690318102941; Tue, 25 Jul 2023 13:48:22 -0700 (PDT) Received: from hurd (dsl-10-141-65.b2b2c.ca. [72.10.141.65]) by smtp.gmail.com with ESMTPSA id w2-20020a0ce102000000b0063642bcc5e4sm4617626qvk.9.2023.07.25.13.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 13:48:21 -0700 (PDT) From: Maxim Cournoyer References: <685ac37d86b0e8eb135c5e40aa1f89240c2b4934.1683299529.git.maxim.cournoyer@gmail.com> <927eb9f7-17e6-136d-8fbc-ab1e5d5bb87b@makinata.eu> Date: Tue, 25 Jul 2023 16:48:20 -0400 In-Reply-To: <927eb9f7-17e6-136d-8fbc-ab1e5d5bb87b@makinata.eu> (Bruno Victal's message of "Wed, 24 May 2023 17:00:20 +0100") Message-ID: <87cz0f1zvv.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-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Bruno, Bruno Victal writes: > Hi Maxim, > > On 2023-05-05 19:28, Maxim Cournoyer wrote: >> * gnu/services/audio.scm (mpd-shepherd-service): Register a new update a= ction. >> * doc/guix.texi (Audio Services): Document it. >> --- >> doc/guix.texi | 10 ++++++++++ >> gnu/services/audio.scm | 11 +++++++++++ >> 2 files changed, 21 insertions(+) >>=20 > > 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, p= arsing 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) 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. --=20 Thanks, Maxim From unknown Sat Aug 16 17:00:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63082: mpd defaul configuration does not work ('No database' error) Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 26 Jul 2023 14:03: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: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.16903801504915 (code B ref 63082); Wed, 26 Jul 2023 14:03:02 +0000 Received: (at 63082) by debbugs.gnu.org; 26 Jul 2023 14:02:30 +0000 Received: from localhost ([127.0.0.1]:49698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOf5y-0001HC-7G for submit@debbugs.gnu.org; Wed, 26 Jul 2023 10:02:30 -0400 Received: from smtpm5.myservices.hosting ([185.26.105.236]:40034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOf5w-0001H4-3a for 63082@debbugs.gnu.org; Wed, 26 Jul 2023 10:02:28 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm5.myservices.hosting (Postfix) with ESMTP id 9BFD020C82; Wed, 26 Jul 2023 16:02:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 1AE2D8009D; Wed, 26 Jul 2023 16:02:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id daBITzpdvqLY; Wed, 26 Jul 2023 16:02:22 +0200 (CEST) Received: from [192.168.1.116] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 6F7368009C; Wed, 26 Jul 2023 16:02:22 +0200 (CEST) Message-ID: Date: Wed, 26 Jul 2023 15:02:20 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US References: <685ac37d86b0e8eb135c5e40aa1f89240c2b4934.1683299529.git.maxim.cournoyer@gmail.com> <927eb9f7-17e6-136d-8fbc-ab1e5d5bb87b@makinata.eu> <87cz0f1zvv.fsf_-_@gmail.com> From: Bruno Victal In-Reply-To: <87cz0f1zvv.fsf_-_@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) Hi Maxim, On 2023-07-25 21:48, Maxim Cournoyer wrote: > Hi Bruno, > > Bruno Victal writes: > >> 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 “logic” 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 “internal-mpc-host” and >> “internal-mpc-port”, 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) > > 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. 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 allows 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 “internal” unix socket to be used primarily by shepherd. [1]: -- Furthermore, I consider that nonfree software must be eradicated. Cheers, Bruno. From unknown Sat Aug 16 17:00:18 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Maxim Cournoyer Subject: bug#63082: closed (Re: bug#63082: [PATCH v3 10/16] services: mpd: Let Shepherd effect the user/group change.) Message-ID: References: <87y1j2zn0o.fsf@gmail.com> <874jp3nyd3.fsf@gmail.com> X-Gnu-PR-Message: they-closed 63082 X-Gnu-PR-Package: guix Reply-To: 63082@debbugs.gnu.org Date: Wed, 26 Jul 2023 15:55:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1690386902-17240-1" This is a multi-part message in MIME format... ------------=_1690386902-17240-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #63082: mpd defaul configuration does not work ('No database' error) which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 63082@debbugs.gnu.org. --=20 63082: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D63082 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1690386902-17240-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 63082-done) by debbugs.gnu.org; 26 Jul 2023 15:54:41 +0000 Received: from localhost ([127.0.0.1]:49928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOgqW-0004TT-Lt for submit@debbugs.gnu.org; Wed, 26 Jul 2023 11:54:41 -0400 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]:55693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOgqU-0004TG-Vn for 63082-done@debbugs.gnu.org; Wed, 26 Jul 2023 11:54:39 -0400 Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-4055c143ca6so30633461cf.3 for <63082-done@debbugs.gnu.org>; Wed, 26 Jul 2023 08:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690386873; x=1690991673; 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=RTfy5ngZW8nJfFVptzGvEx370gIvFzJyoNgohmOPyrs=; b=UCFzk6Jbaly8EmqKPbYaS/euEHnPd2J3ZcyJwr6OKlW156hioJR0l1CII3EEz4MRC6 VkAz95cZf/kqK/q8sLKsLRYuxR+DLXWl7XrJQnwLDN0DJKkg0wNJ9JPoIRkts69r9pA8 XM7gLzUjdfeaS3gpl0RggroXn0d8GEfQuHM1pNdNmi4KznSYTqJjFmyUBl/uqtOuk7qx sk3ms+a5JVeCYxZsGU8CZld+yCcmaUGODPGsqrhDCi/IBKGstVyGLmQgCP8diy2iIk+p ymcvCc/mwNBVry8EYVv5KDMbRUozqhqiMZM26O3v1nYC/Lxe0d5dpy2Y/ImfBDY3o1+y yLiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690386873; x=1690991673; 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=RTfy5ngZW8nJfFVptzGvEx370gIvFzJyoNgohmOPyrs=; b=GKBp2U5hGXfX2OLm3hoO4h1aRedtksOmWxtJs/ksp9ArnX+gDOzV3hHAXADAKwXRiG Iwoy9R6uMDno5ZdmBjJw8V6ftHnEVfrLup6Od/Y6zec3baTjrRxY/tJcZ3n28KQu/t95 TkiF94dEl7Y43nq6Ba5ImELY7ZYMHiCqUH6ub9eZ5gb5xsatyz1V6xml/fgKziFq/AEK BeWmvfIBtKMScHJ6mU4LK+myQcJiMTNeyJ6VNiJy05yTp2cMCZ8Ux95ERIJ48Z0TXDq+ bC/pKnV6LhCJHa/Kyr4kkNyemAnr1moGMonNDkbKjm9277XNqihlDLqjbowmq/CTy1dR WeUQ== X-Gm-Message-State: ABy/qLa/NoKHBK9UXJuX8dwCtye6jvzQuV8iUBqm0OIJ5W9i/Wab8apD NIPF50CAkBmCgDTkE6LuHyg= X-Google-Smtp-Source: APBJJlFBsqwJpGFHb7x9rHi2tgWVBohrUsNcNelrwboOfyLsH1XDmGl0obWRjO9u5kHnSRtVbHQmNg== X-Received: by 2002:a05:622a:1793:b0:405:50b8:dc1d with SMTP id s19-20020a05622a179300b0040550b8dc1dmr2652344qtk.48.1690386873209; Wed, 26 Jul 2023 08:54:33 -0700 (PDT) Received: from hurd (dsl-10-141-65.b2b2c.ca. [72.10.141.65]) by smtp.gmail.com with ESMTPSA id ff20-20020a05622a4d9400b00403f1a7be90sm4892006qtb.88.2023.07.26.08.54.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 08:54:32 -0700 (PDT) From: Maxim Cournoyer To: Bruno Victal Subject: Re: bug#63082: [PATCH v3 10/16] services: mpd: Let Shepherd effect the user/group change. References: <5c6d38ec1621cf031175df6e05c027285d0acaae.1683299529.git.maxim.cournoyer@gmail.com> Date: Wed, 26 Jul 2023 11:54:31 -0400 In-Reply-To: (Bruno Victal's message of "Wed, 24 May 2023 17:41:23 +0100") Message-ID: <87y1j2zn0o.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-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63082-done Cc: Liliana Prikler , 63082-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Bruno Victal writes: > On 2023-05-05 19:29, Maxim Cournoyer wrote: >> Relates to . >>=20 >> Quoting a MPD developer, regarding MPD's feature to switch user itself: >> "that's legacy for the dark ages when proper service managers did not ex= ist" >> :-). >>=20 >> * gnu/services/audio.scm (mpd-serialize-user-account) >> (mpd-serialize-user-group): Delete procedures. >> * gnu/services/audio.scm (mpd-configuration) [user]: Do not serialize. >> [group]: Likewise. >> (mpd-shepherd-service): Provide the #:user, #:group and #:supplementary-= groups >> arguments. >> (mympd-shepherd-service): Likewise, and remove the '--user' argument. >> * doc/guix.texi (Audio Services): Update doc. >> (mympd-configuration) [port]: Change default value to 8080. >> [ssl-port]: Change default value to 443. >> * gnu/tests/audio.scm (run-mympd-test): Adjust accordingly. >> --- >> doc/guix.texi | 12 +++++----- >> gnu/services/audio.scm | 52 +++++++++++++++++++++++++----------------- >> gnu/tests/audio.scm | 4 ++-- >> 3 files changed, 39 insertions(+), 29 deletions(-) > > This contains a submarine change that isn't easily spotted from the > commit message, that mympd is getting its default port changed and that > it can no longer bind to privileged ports, since although mympd can > start as root in order to bind to possibly privileged ports, it will > explicitly refuse to continue running as root afterwards. > > I think we can have shepherd effect for mympd, but only if (and after) > shepherd gets support for POSIX capabilities (CAP_NET_BIND_SERVICE) or > a suitable way to specify that =E2=80=9Cyes, the program invoked by the s= ervice > should have CAP_NET_BIND_SERVICE=E2=80=9D is provided. As mentioned before, I've let go of this commit for now (though that means supplementary-groups on a user-account are not honored anymore) and other commits touching the current group mechanism until we've implemented support for POSIX capabilities as mentioned in https://issues.guix.gnu.org/64862. We can thus close this issue for now, keeping on mind that some bits could be salvaged at a later time when 64862 is done. --=20 Thanks, Maxim ------------=_1690386902-17240-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 26 Apr 2023 02:58:26 +0000 Received: from localhost ([127.0.0.1]:53904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prVMQ-0004qb-Go for submit@debbugs.gnu.org; Tue, 25 Apr 2023 22:58:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:58634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prVMM-0004qR-OT for submit@debbugs.gnu.org; Tue, 25 Apr 2023 22:58: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 1prVMM-0006Nl-Do for bug-guix@gnu.org; Tue, 25 Apr 2023 22:58:22 -0400 Received: from mail-qk1-x72a.google.com ([2607:f8b0:4864:20::72a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1prVMK-0006v4-S6 for bug-guix@gnu.org; Tue, 25 Apr 2023 22:58:22 -0400 Received: by mail-qk1-x72a.google.com with SMTP id af79cd13be357-74e462a540aso211075885a.1 for ; Tue, 25 Apr 2023 19:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682477899; x=1685069899; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=X4rK5cvImKkNvqsyWnW2Leh/T1TvG7jjgxdB6J1aEf4=; b=r9qK98/1Yj57Rlhc9O2TvL/gxzlcnbc6W8zoYQbwgsiFCFYvvCpP1GJfeSe72kkTuB ubGt3hlaKoaBHKh/rQQ02RUWFoPg9taQcFNVVFOMRznUBng0Y9x1ALIG9MNiPluR9KXh 9GS+9trg73ADBgbzaJXylsb/AK20LI9aA8ccmBFo16N+vWMhAQNKYFzTo02TnUMuNcCo N9w+Ng5bRpKPuAmUvMa/i6PlTCG5yDCDvFnSaQgyQnhv6BxvCKZXIJ9d5iTHtaHfZ4QS Nq3EY2BXZNH1lARqePhtH+jprRJ+kxZShEl/fElrQplzF1tZfbSocpg5Pgupg8arV+N9 l9kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682477899; x=1685069899; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=X4rK5cvImKkNvqsyWnW2Leh/T1TvG7jjgxdB6J1aEf4=; b=OQifvpHfA69shxrV98jcDpktOsY5SLkcZv91HvdlRmg1RTZ4Y75eqXLxS1Rv9f05DU ndZmQMzJhl9FVTRVojl+lkM/i3CYdMUaxuCOzTJ2Q0wvc1HQ/rdVTIXyx7trNu771jb7 LTFshsoqh9zGO7DoIBIPqZeuhD4dRRR2kFdODbKWHrCyGOyGbrM4egNN620cs7GmPl1m /d0nbMAKy61oSY9UT0cQGwMN7ESCzPLYoAUs7yPsTmo18GF8yHWsyKZXvE58gHFWo2zK PJOMGB2PnLPMrb+lrVDMkV2qbYrhf+gPyQ5edQmExOm0thcXgIKMlmK6yTxq2TbNUV+Y wBPw== X-Gm-Message-State: AAQBX9dsSJHeaHUuopJol0JAfUMsIzanpPOTe96WjUUT96TLetThmCbf wn+kx1YEJEB8LDcmPUl0nj7M8mObNsqyCw== X-Google-Smtp-Source: AKy350ao4NcNvqA0AREzWgPXuyGw72xSVhkTvRPFFzyp4q3lVDXkcfEWjzOwFWGFK62hTaOUuDhReg== X-Received: by 2002:a05:6214:c46:b0:5ef:653e:16a0 with SMTP id r6-20020a0562140c4600b005ef653e16a0mr31465935qvj.43.1682477898845; Tue, 25 Apr 2023 19:58:18 -0700 (PDT) Received: from hurd ([2607:fad8:4:3::1003]) by smtp.gmail.com with ESMTPSA id t6-20020a0cde06000000b005dd8b9345d7sm4528809qvk.111.2023.04.25.19.58.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Apr 2023 19:58:18 -0700 (PDT) From: Maxim Cournoyer To: bug-guix Subject: mpd defaul configuration does not work ('No database' error) Date: Tue, 25 Apr 2023 22:58:16 -0400 Message-ID: <874jp3nyd3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::72a; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x72a.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hello, Our MPD service does not work out of the box. Running under its default 'mpd' user, clients would get the following error attempting to update its database, e.g. by running 'mpc update': --8<---------------cut here---------------start------------->8--- MPD error: database --8<---------------cut here---------------end--------------->8--- This particular problem was solved by adding the following field to my mpd-configuration record (thanks to Bruno): --8<---------------cut here---------------start------------->8--- (database (mpd-plugin (plugin "simple") (extra-options '((path . "/var/lib/mpd/database") (cache-directory . "/var/cache/mpd"))))) --8<---------------cut here---------------end--------------->8--- and running --8<---------------cut here---------------start------------->8--- mkdir /var/cache/mpd && chown mpd:users /var/cache/mpd --8<---------------cut here---------------end--------------->8--- Now the above error is gone, but I do not hear any audio coming out, so there seems to be another problem. I'm opening this ticket so that we can document and resolve all these issues in the configuration, so that hopefully our mpd system service can work out of the box. -- Thanks, Maxim ------------=_1690386902-17240-1-- From unknown Sat Aug 16 17:00:18 2025 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-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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