Message ID | 9d4cc9d3ebb05d2aabf8f06e1890efe9b0b9a849.camel@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id AE18A27BBEA; Sun, 17 Apr 2022 11:04:24 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 48A1827BBE9 for <patchwork@mira.cbaines.net>; Sun, 17 Apr 2022 11:04:24 +0100 (BST) Received: from localhost ([::1]:54850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>) id 1ng1lX-0000yd-2A for patchwork@mira.cbaines.net; Sun, 17 Apr 2022 06:04:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ng1lC-0000yH-UN for guix-patches@gnu.org; Sun, 17 Apr 2022 06:04:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41096) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ng1lC-00009d-E2 for guix-patches@gnu.org; Sun, 17 Apr 2022 06:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ng1lC-00006i-A1 for guix-patches@gnu.org; Sun, 17 Apr 2022 06:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54986] [PATCH] gnu: mpd: Add support for socket activation. Resent-From: Liliana Marie Prikler <liliana.prikler@gmail.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 17 Apr 2022 10:04:02 +0000 Resent-Message-ID: <handler.54986.B.1650189840402@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54986 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54986@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1650189840402 (code B ref -1); Sun, 17 Apr 2022 10:04:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Apr 2022 10:04:00 +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 <debbugs-submit-bounces@debbugs.gnu.org>) id 1ng1l9-00006P-NY for submit@debbugs.gnu.org; Sun, 17 Apr 2022 06:03:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:42376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <liliana.prikler@gmail.com>) id 1ng1l8-00006I-4t for submit@debbugs.gnu.org; Sun, 17 Apr 2022 06:03:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <liliana.prikler@gmail.com>) id 1ng1l1-0000xz-2C for guix-patches@gnu.org; Sun, 17 Apr 2022 06:03:53 -0400 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]:36673) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <liliana.prikler@gmail.com>) id 1ng1ky-00007A-HI for guix-patches@gnu.org; Sun, 17 Apr 2022 06:03:49 -0400 Received: by mail-ed1-x541.google.com with SMTP id u18so14652331eda.3 for <guix-patches@gnu.org>; Sun, 17 Apr 2022 03:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:subject:mime-version:to:content-transfer-encoding :message-id; bh=mGiY5r+/zrnr75rG4wVqhLDFOdMCk5a8HGj+r9Jazyc=; b=dxsZCfVdsQ9LWhNsWJGsSMgXp6wJeUNSkPk5ATcGxiKQe0uRRgp3sKeLrictPAtJ/C xDOIsKuxG/YMu4FRbc5QKmG10lsnbYFb3GxBwodC32mmKfB/oACnTrZvaCokV9X1Bzhb VebkjqzCaepiIzMDystHsEXKdY/bm9ziTPUZcpaC0dsC/g/WAVh72XBASRIkyVt610zt ECxOvZIVrSzsjbpClZ+GMy/k7bT9PkPui3YpoGYzGSZYpsTeRYoi4BTxbusz7VgReMd0 B/4RlVt8XUGyvKOJ+BZZn5ENOy/3LAPXhl9moZVKmdI/bGyduYvh00JdlTBOJj5lLm1c RUyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:mime-version:to :content-transfer-encoding:message-id; bh=mGiY5r+/zrnr75rG4wVqhLDFOdMCk5a8HGj+r9Jazyc=; b=iBqU6jg6NtJIEo5+9JGSLt2/Fb5kghBce70xqcFf0dIer9LzBva+2Rs175pHnzJRuV WQCn+p9hIZwprHZSYcu31SNxsEtv2hipGLScv7JalneOv3RIBDoNAb8T3tbkb/6ATElE Jnwc+QQdSX0hjccN3wmLNx2uLhk3SV7A3id9e7n5vckGY4CNQw9CRMgL3nqx74d/1KCN dwlAp0OfN8jdAzVxQ0BtGr4aFnkv1LQ9sl48KOSFdyI0Tix9ftGF0BOlQl7LKmycFnxS PL+GQZlczfkHLYAfIawsez5JBYnQLl5kNzqM/2pZixTfbM6dJW8auSA/Ine+5OR2wOU8 11lw== X-Gm-Message-State: AOAM533yX+U5VV/0Cb2MrkyrcrjsXOgPRkJMWHb5p8LzV5QoMv6mSn1H mgJJi7ttO5z3bO0AqNdlvofZyLJaJj8= X-Google-Smtp-Source: ABdhPJwjroGMd/GfwGRJz9brUckyy3zDr2HfZXid02wgzs0sFNr1iE0yRivXllWLaUi8y3k19aG8hg== X-Received: by 2002:a05:6402:3713:b0:41d:96f6:8a09 with SMTP id ek19-20020a056402371300b0041d96f68a09mr7279448edb.136.1650189825789; Sun, 17 Apr 2022 03:03:45 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id cq24-20020a056402221800b00420ad7d2dd0sm5421086edb.29.2022.04.17.03.03.44 for <guix-patches@gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Apr 2022 03:03:45 -0700 (PDT) From: Liliana Marie Prikler <liliana.prikler@gmail.com> Date: Sun, 17 Apr 2022 12:01:47 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID: <9d4cc9d3ebb05d2aabf8f06e1890efe9b0b9a849.camel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::541; envelope-from=liliana.prikler@gmail.com; helo=mail-ed1-x541.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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#54986] gnu: mpd: Add support for socket activation.
|
|
Commit Message
Liliana Marie Prikler
April 17, 2022, 10:01 a.m. UTC
* gnu/packages/mpd.scm (mpd)[#:configure-flags]: Convert to G-Expression. Add “-Dsystemd=enabled”. [#:phases]: New argument. [inputs]: Add elogind. --- gnu/packages/mpd.scm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
Comments
Hi, Liliana Marie Prikler <liliana.prikler@gmail.com> skribis: > * gnu/packages/mpd.scm (mpd)[#:configure-flags]: Convert to G-Expression. > Add “-Dsystemd=enabled”. > [#:phases]: New argument. > [inputs]: Add elogind. LGTM! Are you planning to update the service as well? Thanks, Ludo’.
Am Sonntag, dem 17.04.2022 um 23:06 +0200 schrieb Ludovic Courtès: > Hi, > > Liliana Marie Prikler <liliana.prikler@gmail.com> skribis: > > > * gnu/packages/mpd.scm (mpd)[#:configure-flags]: Convert to G- > > Expression. > > Add “-Dsystemd=enabled”. > > [#:phases]: New argument. > > [inputs]: Add elogind. > > LGTM! > > Are you planning to update the service as well? I'm not sure if updating the service is a good idea. On the upside, people who report mpd starting too early will be alleviated of one issue. On the downside, it appears as though mpd too easily escapes shepherd's management. My current observations are more or less consistent with what I saw with Emacs: killing the mpd service won't stop playing music, and shepherd won't restart a killed MPD without asked to. IMHO shepherd's socket activation still needs some work before we can make it the default for every service. Cheers
Hi, Liliana Marie Prikler <liliana.prikler@gmail.com> skribis: > I'm not sure if updating the service is a good idea. On the upside, > people who report mpd starting too early will be alleviated of one > issue. On the downside, it appears as though mpd too easily escapes > shepherd's management. My current observations are more or less > consistent with what I saw with Emacs: killing the mpd service won't > stop playing music, Do you mean that ‘herd stop mpd’ doesn’t stop the mpd process? What does /var/log/messages say? > and shepherd won't restart a killed MPD without asked to. Weird. What you describe sounds as if shepherd is not looking at the right process or something. If you have a service definition to reproduce this, I’d be happy to take a look! Thanks, Ludo’.
Am Montag, dem 18.04.2022 um 23:05 +0200 schrieb Ludovic Courtès: > Hi, > > Liliana Marie Prikler <liliana.prikler@gmail.com> skribis: > > > I'm not sure if updating the service is a good idea. On the > > upside, people who report mpd starting too early will be alleviated > > of one issue. On the downside, it appears as though mpd too easily > > escapes shepherd's management. My current observations are more or > > less consistent with what I saw with Emacs: killing the mpd service > > won't stop playing music, > > Do you mean that ‘herd stop mpd’ doesn’t stop the mpd process? Yep. > What does /var/log/messages say? I don't think there's anything meaningful there to inspect, I'm running this as a user service. Shepherd's own logs are rather empty. Interestingly, the running value for the mpd service remains (("unknown" . "#<input-output: socket 17>")) even after MPD started. Should that be the case? > > and shepherd won't restart a killed MPD without asked to. > > Weird. What you describe sounds as if shepherd is not looking at the > right process or something. > > If you have a service definition to reproduce this, I’d be happy to > take a look! The second is probably just me forgetting to set #:respawn? #t. One "bug" down, one more to go.
Hi, Liliana Marie Prikler <liliana.prikler@gmail.com> skribis: [...] >> Do you mean that ‘herd stop mpd’ doesn’t stop the mpd process? > Yep. >> What does /var/log/messages say? > I don't think there's anything meaningful there to inspect, I'm running > this as a user service. Shepherd's own logs are rather empty. Then it’s in ~/.local/state (by default) or ~/.local/var/log/shepherd.log if you’re using Guix Home. > Interestingly, the running value for the mpd service remains > (("unknown" . "#<input-output: socket 17>")) even after MPD started. > Should that be the case? No. >> > and shepherd won't restart a killed MPD without asked to. >> >> Weird. What you describe sounds as if shepherd is not looking at the >> right process or something. >> >> If you have a service definition to reproduce this, I’d be happy to >> take a look! > The second is probably just me forgetting to set #:respawn? #t. One > "bug" down, one more to go. :-) Ludo’.
Am Mittwoch, dem 27.04.2022 um 22:56 +0200 schrieb Ludovic Courtès: > > > Interestingly, the running value for the mpd service remains > > (("unknown" . "#<input-output: socket 17>")) even after MPD > > started. Should that be the case? > > No. It turns out the issue here was that I rewrote the service to put its log into XDG_STATE_HOME as well, but under a directory that did not yet exist. #55080 addresses this. Cheers
diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm index 1ee6806735..40e6a99ad7 100644 --- a/gnu/packages/mpd.scm +++ b/gnu/packages/mpd.scm @@ -47,6 +47,7 @@ (define-module (gnu packages mpd) #:use-module (gnu packages boost) #:use-module (gnu packages cdrom) #:use-module (gnu packages cmake) ;for MPD + #:use-module (gnu packages freedesktop) ;elogind #:use-module (gnu packages gettext) #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) @@ -119,12 +120,28 @@ (define-public mpd "1v969w7h3660ph3h2bdlkrzc05pfz95bmxjqdbzzf7pfwf795ifb")))) (build-system meson-build-system) (arguments - `(#:configure-flags '("-Ddocumentation=enabled"))) + (list + #:configure-flags #~(list "-Ddocumentation=enabled" + "-Dsystemd=enabled") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'enable-elogind + (lambda _ + (substitute* "src/lib/systemd/meson.build" + (("libsystemd") "libelogind")) + ;; XXX: systemd dependency overwritten internally, leads to bad + ;; errors + (substitute* "src/lib/systemd/meson.build" + (("systemd_dep = declare_dependency" all) + (string-append "_" all))) + (substitute* "meson.build" + (("systemd_dep,") "systemd_dep, _systemd_dep,"))))))) (inputs (list ao alsa-lib avahi boost curl + elogind ffmpeg flac fmt