From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id oKLLIwbYS2TbKwAASxT56A (envelope-from ) for ; Fri, 28 Apr 2023 16:28:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id yNmeIwbYS2QqZgAA9RJhRA (envelope-from ) for ; Fri, 28 Apr 2023 16:28:22 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 56F5DC7D7 for ; Fri, 28 Apr 2023 16:28:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psP4u-0007Wt-3P; Fri, 28 Apr 2023 10:28:04 -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 1psP4s-0007WF-Hh for bug-guix@gnu.org; Fri, 28 Apr 2023 10:28:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1psP4s-0005wm-9X for bug-guix@gnu.org; Fri, 28 Apr 2023 10:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1psP4s-000582-4E for bug-guix@gnu.org; Fri, 28 Apr 2023 10:28:02 -0400 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682692102; a=rsa-sha256; cv=none; b=Bp8evoNoxSloG0N1MVLLHzw9CwTDZ/+IAn6fWAVQRWzGjqhjauPyFstITdK8p0U1j4GZmT qQVLLavFMs1FSL20NZ8K/3pAAoIut34ftEdRFslahCifbln2omITGd9c+f0AG+O7M5HUDN iqizyQzJlr6iITWAjNxFKezAu5fBueYX8z3RmxojqWUouEw/yhthOJ+JDjPOYu/d4SBmEs lCPsBpP3gzWAhGbeDgmJOlWGYlw+cOm/NCJi4P5YS1VkMH9GCUyN1/zW/PqPg544I02nMY KnJ7vZRN3I5EumJtlCIoeEQUg03w29f2dHuz7nyz1+Umcna00DCJ/+qfHT/7tA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=Libebs3h; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682692102; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=LCjNcdnqGnMHI8HiaI9YijbTNs2o1xtt8cqovArg8Ng=; b=cVmJYJIrYpIZU78P/WezYbhDFwaEylBav1zMBuVs7CHdEKoDvFL4qrgMjQIu9dmX3nDncz FbWFIh8XGv5l2vNgqwI5yM/2wT1J6SYjZ9tVdqgK9WhUc4V6rn4LgcwVIgAjpvUONvv0wR IFZXlv/SPjni9LBEO3LQu20tESnNjQ/8OVGdmaBx02H7inIlnrV+w8qQzinTpvGLcKHvLN 7FECScFud3AkaMtyAiuS4Y6E2WBYXkg14pmCVwIQ5EnhE4J0SsJIfzFxs6WyUXnWusN1lr iY3D9WBUKInz8WPEoeJTUWqqgF7yDAS7hODFz4iODr47a4eZc1RC8EeK7Md5KQ== X-Migadu-Spam-Score: -2.20 X-Spam-Score: -2.20 X-Migadu-Queue-Id: 56F5DC7D7 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=Libebs3h; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-TUID: LDxBhNZXsx4w * 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