X-Loop: help-debbugs@HIDDEN Subject: [bug#77585] [PATCH] services: mumi: Add Debbugs rsync as shepherd timer. Resent-From: Arun Isaac <arunisaac@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN Resent-Date: Sun, 06 Apr 2025 19:32:01 +0000 Resent-Message-ID: <handler.77585.B.174396789023266 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 77585 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77585 <at> debbugs.gnu.org Cc: Arun Isaac <arunisaac@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-Debbugs-Original-To: guix-patches@HIDDEN X-Debbugs-Original-Xcc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.174396789023266 (code B ref -1); Sun, 06 Apr 2025 19:32:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Apr 2025 19:31:30 +0000 Received: from localhost ([127.0.0.1]:49785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1ViL-00063B-CA for submit <at> debbugs.gnu.org; Sun, 06 Apr 2025 15:31:29 -0400 Received: from lists.gnu.org ([2001:470:142::17]:56200) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <arunisaac@HIDDEN>) id 1u1ViH-00062R-MC for submit <at> debbugs.gnu.org; Sun, 06 Apr 2025 15:31:26 -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 <arunisaac@HIDDEN>) id 1u1Vi4-0008Vl-LL for guix-patches@HIDDEN; Sun, 06 Apr 2025 15:31:12 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <arunisaac@HIDDEN>) id 1u1Vhz-0007d2-Uh; Sun, 06 Apr 2025 15:31:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=systemreboot.net; s=default; t=1743967848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vveJcJXC7/7PlJkZNcGAv0/D7kGh4o1ufowB6lDbTRQ=; b=lIkaeOk2KWLtQrp0K7JZcNJxrhiNwP1g0xHKU5ewHYZQ5OrhUgySRnPIX9NOCzekRTvOKr oYPpLHLrkrkr7Rr6/Poq+c663bktWMaR2flOlWfYOTUQByuhSKLRVq412jAXBU/aAuIATk cI66gVPPJtLm4wbAm0KeTQgrXfDilDLMLqFkjQfqbsCfOdoW2Pp1JV5dfsOu3YTMG1SSq2 M0pOHwmlbKzi36yu2SZ/Tk0zviKwpfdWCUHtdCGGXtDn5t2TSbMi4hGshxC/Qq756tk6e5 I4HWHIrvDBy1SscNtqvf8SzgKctV11od2I3zdx2de8574mBWWw8UGJ32TIM0jA== Received: from localhost.localdomain (<unknown> [192.168.2.1]) by mugam.systemreboot.net (OpenSMTPD) with ESMTPSA id 2338637a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 6 Apr 2025 19:30:47 +0000 (UTC) From: Arun Isaac <arunisaac@HIDDEN> Date: Sun, 6 Apr 2025 20:30:27 +0100 Message-ID: <4977368b813a68f775050ff3b00a39139cf2b762.1743967795.git.arunisaac@HIDDEN> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=139.59.75.54; envelope-from=arunisaac@HIDDEN; helo=mugam.systemreboot.net 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) * gnu/services/web.scm (<mumi-configuration>)[data-directory, rsync-remote, rsync-flags]: New fields. (%mumi-worker-log): Delete variable. (%mumi-rsync-and-index-log): New variable. (mumi-rsync-and-index-gexp): New function. (mumi-shepherd-services): Remove mumi-worker service. Add mumi-rsync-and-index service. (mumi-service-type): Remove default value. * doc/guix.texi (Web Services)[mumi]: Document data-directory, rsync-remote and rsync-flags fields. Co-authored-by: Maxim Cournoyer <maxim.cournoyer@HIDDEN> --- doc/guix.texi | 9 +++++++ gnu/services/web.scm | 57 ++++++++++++++++++++++++++++++++------------ 2 files changed, 51 insertions(+), 15 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 12f155e912..b6c0e64a53 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33999,6 +33999,15 @@ Web Services @item @code{mumi} (default: @code{mumi}) The Mumi package to use. +@item @code{data-directory} (default: @file{"/var/mumi/data"}) +Data directory to store Debbugs data from upstream Debbugs instance. + +@item @code{rsync-remote} +Remote rsync path from which to download Debbugs data. + +@item @code{rsync-flags} (default: @code{'()}) +Additional flags to pass to @command{rsync}. + @item @code{mailer?} (default: @code{#true}) Whether to enable or disable the mailer component. diff --git a/gnu/services/web.scm b/gnu/services/web.scm index f8cf06fb48..eea9a19426 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2023 Bruno Victal <mirai@HIDDEN> ;;; Copyright © 2023 Miguel Ángel Moreno <mail@HIDDEN> ;;; Copyright © 2024 Leo Nikkilä <hello@HIDDEN> +;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; ;;; This file is part of GNU Guix. ;;; @@ -51,6 +52,7 @@ (define-module (gnu services web) #:use-module (gnu packages php) #:use-module (gnu packages python) #:use-module (gnu packages python-web) + #:use-module (gnu packages rsync) #:use-module (gnu packages gnupg) #:use-module (gnu packages guile) #:use-module (gnu packages logging) @@ -295,6 +297,9 @@ (define-module (gnu services web) mumi-configuration mumi-configuration? mumi-configuration-mumi + mumi-configuration-data-directory + mumi-configuration-rsync-remote + mumi-configuration-rsync-flags mumi-configuration-mailer? mumi-configuration-sender mumi-configuration-smtp @@ -2033,6 +2038,11 @@ (define-record-type* <mumi-configuration> mumi-configuration make-mumi-configuration mumi-configuration? (mumi mumi-configuration-mumi (default mumi)) + (data-directory mumi-configuration-data-directory + (default "/var/mumi/data")) + (rsync-remote mumi-configuration-rsync-remote) + (rsync-flags mumi-configuration-rsync-flags + (default '())) (mailer? mumi-configuration-mailer? (default #t)) (sender mumi-configuration-sender (default #f)) (smtp mumi-configuration-smtp (default #f)) @@ -2080,7 +2090,7 @@ (define %mumi-log "/var/log/mumi.log") (define %mumi-mailer-log "/var/log/mumi.mailer.log") -(define %mumi-worker-log "/var/log/mumi.worker.log") +(define %mumi-rsync-and-index-log "/var/log/mumi.rsync-and-index.log") (define mumi-package-configuration->alist (match-record-lambda <mumi-package-configuration> @@ -2118,6 +2128,23 @@ (define mumi-config-file packages))) <>)))))) +(define (mumi-rsync-and-index-gexp config) + (match-record config <mumi-configuration> + (data-directory rsync-remote rsync-flags) + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + (invoke #$(file-append rsync "/bin/rsync") + "--delete" "--archive" "--verbose" + "--timeout" "120" + #$@rsync-flags + #$rsync-remote + #$data-directory) + (invoke #$(file-append mumi "/bin/mumi") "fetch" + (string-append "--config=" + #$(mumi-config-file config))))))) + (define (mumi-shepherd-services config) (define environment #~(list "LC_ALL=en_US.utf8" @@ -2140,17 +2167,19 @@ (define (mumi-shepherd-services config) #:log-file #$%mumi-log)) (stop #~(make-kill-destructor))) (shepherd-service - (provision '(mumi-worker)) - (documentation "Mumi bug-tracking web interface database worker.") - (requirement '(user-processes networking)) - (start #~(make-forkexec-constructor - `(#$(file-append mumi "/bin/mumi") "worker" - ,(string-append "--config=" - #$(mumi-config-file config))) - #:environment-variables #$environment - #:user "mumi" #:group "mumi" - #:log-file #$%mumi-worker-log)) - (stop #~(make-kill-destructor))) + (provision '(mumi-rsync-and-index)) + (modules '((shepherd service timer))) + (start #~(make-timer-constructor + (calendar-event) + (command + (program-file "mumi-rsync-and-index" + (mumi-rsync-and-index-gexp config))) + #:log-file #$%mumi-rsync-and-index-log + #:max-duration (* 60 60) + #:wait-for-termination? #t)) + (stop #~(make-timer-destructor)) + (actions (list shepherd-trigger-action)) + (documentation "Rsync and index the GNU Debbugs data")) (shepherd-service (provision '(mumi-mailer)) (documentation "Mumi bug-tracking web interface mailer.") @@ -2181,9 +2210,7 @@ (define mumi-service-type (service-extension shepherd-root-service-type mumi-shepherd-services))) (description - "Run Mumi, a Web interface to the Debbugs bug-tracking server.") - (default-value - (mumi-configuration)))) + "Run Mumi, a Web interface to the Debbugs bug-tracking server."))) (define %default-gmnisrv-config-file (plain-file "gmnisrv.ini" " base-commit: ada14197fb465c1c90efbc450308c14f077ff167 -- 2.49.0
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Arun Isaac <arunisaac@HIDDEN> Subject: bug#77585: Acknowledgement ([PATCH] services: mumi: Add Debbugs rsync as shepherd timer.) Message-ID: <handler.77585.B.174396789023266.ack <at> debbugs.gnu.org> References: <4977368b813a68f775050ff3b00a39139cf2b762.1743967795.git.arunisaac@HIDDEN> X-Gnu-PR-Message: ack 77585 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 77585 <at> debbugs.gnu.org Date: Sun, 06 Apr 2025 19:32:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. As you requested using X-Debbugs-CC, your message was also forwarded to Ludovic Court=C3=A8s <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@gma= il.com> (after having been given a bug report number, if it did not have one). Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 77585 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 77585: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77585 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: [bug#77585] [PATCH] services: mumi: Add Debbugs rsync as shepherd timer. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Sun, 06 Apr 2025 20:24:02 +0000 Resent-Message-ID: <handler.77585.B.174397103229378 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 77585 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Arun Isaac <arunisaac@HIDDEN> Cc: maxim.cournoyer@HIDDEN, 77585 <at> debbugs.gnu.org X-Debbugs-Original-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, guix-patches@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.174397103229378 (code B ref -1); Sun, 06 Apr 2025 20:24:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Apr 2025 20:23:52 +0000 Received: from localhost ([127.0.0.1]:49851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1WX1-0007dl-Ou for submit <at> debbugs.gnu.org; Sun, 06 Apr 2025 16:23:52 -0400 Received: from lists.gnu.org ([2001:470:142::17]:32914) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1u1WWz-0007dD-8M for submit <at> debbugs.gnu.org; Sun, 06 Apr 2025 16:23:49 -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 <ludo@HIDDEN>) id 1u1WWt-0008Q6-9c for guix-patches@HIDDEN; Sun, 06 Apr 2025 16:23:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1u1WWr-0004kR-2L; Sun, 06 Apr 2025 16:23:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=mzQyvWv88IZLZ1dUZ15dV6qKcKefzoLrWdAS3eR9W2c=; b=YmV9Npu6rwVDkegVAT8v fWRR8EEmv4ZwGG9VQSEYeXjFbJLQoVEZJbp1MBAfKDOy4V0jbLR1MfuXgUO4gohU+qbQmJs6tpCK2 1JV9o7e5bw5enF2Y4WMpdTrhuMgfJPILXEt4f2XS63KA2e6WwH+/arVPRzPgdDjU2pWQaBayrajks WMkRMoIGUTcEk58WlkP4psv/U+gOxAS8Ho8gTXLI4zFJHv0Z6q+cIOWLknim0BB+yt6t51lEr8jwx qOQdVNk/fCqWtbANJvAJUj4gCcAxDOXIE/U9semGbEl/MrfP9qKF7HkTERGSoDi6Fvhz/Y+Lv+Zcf 8QFwLppwOah6KQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> In-Reply-To: <4977368b813a68f775050ff3b00a39139cf2b762.1743967795.git.arunisaac@HIDDEN> (Arun Isaac's message of "Sun, 6 Apr 2025 20:30:27 +0100") References: <4977368b813a68f775050ff3b00a39139cf2b762.1743967795.git.arunisaac@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Septidi 17 Germinal an 233 de la =?UTF-8?Q?R=C3=A9volution,?= jour du =?UTF-8?Q?M=C3=A9l=C3=A8ze?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 06 Apr 2025 22:23:34 +0200 Message-ID: <87wmbxyr7d.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) 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 <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Arun, Arun Isaac <arunisaac@HIDDEN> skribis: > * gnu/services/web.scm (<mumi-configuration>)[data-directory, rsync-remot= e, > rsync-flags]: New fields. > (%mumi-worker-log): Delete variable. > (%mumi-rsync-and-index-log): New variable. > (mumi-rsync-and-index-gexp): New function. > (mumi-shepherd-services): Remove mumi-worker service. Add mumi-rsync-and-= index > service. > (mumi-service-type): Remove default value. > * doc/guix.texi (Web Services)[mumi]: Document data-directory, rsync-remo= te > and rsync-flags fields. > > Co-authored-by: Maxim Cournoyer <maxim.cournoyer@HIDDEN> [...] > +(define (mumi-rsync-and-index-gexp config) As a matter of style, I would return a program (=E2=80=98mumi-rsync-and-index-program=E2=80=99) rather than a gexp; I find= it clearer and more robust (the gexp leaves it up to the caller to insert it in the right context). > + (start #~(make-timer-constructor > + (calendar-event) You can add a margin comment say =E2=80=9Cevery minute=E2=80=9D, for clarit= y. > + (command > + (program-file "mumi-rsync-and-index" > + (mumi-rsync-and-index-gexp config))) I think you=E2=80=99re missing #$ before (mumi-rsync-and-index-gexp config). > + #:log-file #$%mumi-rsync-and-index-log > + #:max-duration (* 60 60) > + #:wait-for-termination? #t)) Every minute is a lot, especially since it may take several seconds to establish the rsync-over-ssh connection. It=E2=80=99s mitigated by the use= of #:wait-for-termination? but still sounds fairly aggressive to me. (It would be ideal if the Debbugs instance could somehow notify mumi.) Perhaps mention the polling frequency in the manual? Thanks, Ludo=E2=80=99.
X-Loop: help-debbugs@HIDDEN Subject: [bug#77585] [PATCH v2] services: mumi: Add Debbugs rsync as shepherd timer. References: <4977368b813a68f775050ff3b00a39139cf2b762.1743967795.git.arunisaac@HIDDEN> In-Reply-To: <4977368b813a68f775050ff3b00a39139cf2b762.1743967795.git.arunisaac@HIDDEN> Resent-From: Arun Isaac <arunisaac@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: arunisaac@HIDDEN, ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN Resent-Date: Sun, 06 Apr 2025 21:53:01 +0000 Resent-Message-ID: <handler.77585.B77585.174397637623211 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 77585 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77585 <at> debbugs.gnu.org Cc: Arun Isaac <arunisaac@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Arun Isaac <arunisaac@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-Debbugs-Original-Xcc: Arun Isaac <arunisaac@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN> Received: via spool by 77585-submit <at> debbugs.gnu.org id=B77585.174397637623211 (code B ref 77585); Sun, 06 Apr 2025 21:53:01 +0000 Received: (at 77585) by debbugs.gnu.org; 6 Apr 2025 21:52:56 +0000 Received: from localhost ([127.0.0.1]:49973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1XvD-00062H-7q for submit <at> debbugs.gnu.org; Sun, 06 Apr 2025 17:52:55 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:40168) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <arunisaac@HIDDEN>) id 1u1Xv8-00061h-QV for 77585 <at> debbugs.gnu.org; Sun, 06 Apr 2025 17:52:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=systemreboot.net; s=default; t=1743976362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0eqCNLPPg740yMkUhyBqWUKBAqcQZ52HZOekBkj2HwM=; b=aBSWCDWepGbRf73CsvFohLgcImIdzyaB3lAGU1uj+c3BtAiwa0Ber2O4Sjnsze90wO6Ugf +zC/CX07eZVWLchhtFgg/EzlDE2fXlCahzaZGoJvsHRTFLjYM6ZPJZKtOg6jUP0dwoy7Im aBaWOXPSzW44iNBaxS9xOfycI3mOBShnFIF3rO/hdbn4pmqWUmIvKEdftyT9S+iVn/3EeP Phc+PLaIZKIfj/kEdqNHjs6GdZz768TBty2QL0Vb9ohZQlJIOr6YLwuia0NsgWPMx9Ow4Q 7R+ZDl/6iAPRaEAYpoHL6vM3LdOea0v6C7UkXuToBRjs3q7XcrDJcIx+s/VXLQ== Received: from localhost.localdomain (<unknown> [192.168.2.1]) by mugam.systemreboot.net (OpenSMTPD) with ESMTPSA id 8139baf1 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 6 Apr 2025 21:52:42 +0000 (UTC) From: Arun Isaac <arunisaac@HIDDEN> Date: Sun, 6 Apr 2025 22:52:30 +0100 Message-ID: <cda6b6e380b0bddfbfacb7214e74d88b9a13cbbf.1743975912.git.arunisaac@HIDDEN> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * gnu/services/web.scm (<mumi-configuration>)[data-directory, rsync-remote, rsync-flags]: New fields. (%mumi-worker-log): Delete variable. (%mumi-rsync-and-index-log): New variable. (mumi-rsync-and-index): New function. (mumi-shepherd-services): Remove mumi-worker service. Add mumi-rsync-and-index service. (mumi-service-type): Remove default value. * doc/guix.texi (Web Services)[mumi]: Document data-directory, rsync-remote and rsync-flags fields. Co-authored-by: Maxim Cournoyer <maxim.cournoyer@HIDDEN> --- doc/guix.texi | 11 +++++++++ gnu/services/web.scm | 58 ++++++++++++++++++++++++++++++++------------ 2 files changed, 54 insertions(+), 15 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 12f155e912..8aa0b5e3ba 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33999,6 +33999,17 @@ Web Services @item @code{mumi} (default: @code{mumi}) The Mumi package to use. +@item @code{data-directory} (default: @file{"/var/mumi/data"}) +Data directory to store Debbugs data from upstream Debbugs instance. + +@item @code{rsync-remote} +Remote rsync path from which to download Debbugs data. The remote is +polled every 2 minutes, unless a previous instance of rsync is already +running. + +@item @code{rsync-flags} (default: @code{'()}) +Additional flags to pass to @command{rsync}. + @item @code{mailer?} (default: @code{#true}) Whether to enable or disable the mailer component. diff --git a/gnu/services/web.scm b/gnu/services/web.scm index f8cf06fb48..3f0eb8780a 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2023 Bruno Victal <mirai@HIDDEN> ;;; Copyright © 2023 Miguel Ángel Moreno <mail@HIDDEN> ;;; Copyright © 2024 Leo Nikkilä <hello@HIDDEN> +;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; ;;; This file is part of GNU Guix. ;;; @@ -51,6 +52,7 @@ (define-module (gnu services web) #:use-module (gnu packages php) #:use-module (gnu packages python) #:use-module (gnu packages python-web) + #:use-module (gnu packages rsync) #:use-module (gnu packages gnupg) #:use-module (gnu packages guile) #:use-module (gnu packages logging) @@ -295,6 +297,9 @@ (define-module (gnu services web) mumi-configuration mumi-configuration? mumi-configuration-mumi + mumi-configuration-data-directory + mumi-configuration-rsync-remote + mumi-configuration-rsync-flags mumi-configuration-mailer? mumi-configuration-sender mumi-configuration-smtp @@ -2033,6 +2038,11 @@ (define-record-type* <mumi-configuration> mumi-configuration make-mumi-configuration mumi-configuration? (mumi mumi-configuration-mumi (default mumi)) + (data-directory mumi-configuration-data-directory + (default "/var/mumi/data")) + (rsync-remote mumi-configuration-rsync-remote) + (rsync-flags mumi-configuration-rsync-flags + (default '())) (mailer? mumi-configuration-mailer? (default #t)) (sender mumi-configuration-sender (default #f)) (smtp mumi-configuration-smtp (default #f)) @@ -2080,7 +2090,7 @@ (define %mumi-log "/var/log/mumi.log") (define %mumi-mailer-log "/var/log/mumi.mailer.log") -(define %mumi-worker-log "/var/log/mumi.worker.log") +(define %mumi-rsync-and-index-log "/var/log/mumi.rsync-and-index.log") (define mumi-package-configuration->alist (match-record-lambda <mumi-package-configuration> @@ -2118,6 +2128,24 @@ (define mumi-config-file packages))) <>)))))) +(define (mumi-rsync-and-index config) + (match-record config <mumi-configuration> + (data-directory rsync-remote rsync-flags) + (program-file "mumi-rsync-and-index" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + (invoke #$(file-append rsync "/bin/rsync") + "--delete" "--archive" "--verbose" + "--timeout" "120" + #$@rsync-flags + #$rsync-remote + #$data-directory) + (invoke #$(file-append mumi "/bin/mumi") "fetch" + (string-append "--config=" + #$(mumi-config-file config)))))))) + (define (mumi-shepherd-services config) (define environment #~(list "LC_ALL=en_US.utf8" @@ -2140,17 +2168,19 @@ (define (mumi-shepherd-services config) #:log-file #$%mumi-log)) (stop #~(make-kill-destructor))) (shepherd-service - (provision '(mumi-worker)) - (documentation "Mumi bug-tracking web interface database worker.") - (requirement '(user-processes networking)) - (start #~(make-forkexec-constructor - `(#$(file-append mumi "/bin/mumi") "worker" - ,(string-append "--config=" - #$(mumi-config-file config))) - #:environment-variables #$environment - #:user "mumi" #:group "mumi" - #:log-file #$%mumi-worker-log)) - (stop #~(make-kill-destructor))) + (provision '(mumi-rsync-and-index)) + (modules '((shepherd service timer))) + (start #~(make-timer-constructor + ;; Run every 2 minutes, unless an instance of this job + ;; is already running. + (calendar-event #:minutes (iota 30 0 2)) + (command #$(mumi-rsync-and-index config)) + #:log-file #$%mumi-rsync-and-index-log + #:max-duration (* 60 60) + #:wait-for-termination? #t)) + (stop #~(make-timer-destructor)) + (actions (list shepherd-trigger-action)) + (documentation "Rsync and index the GNU Debbugs data")) (shepherd-service (provision '(mumi-mailer)) (documentation "Mumi bug-tracking web interface mailer.") @@ -2181,9 +2211,7 @@ (define mumi-service-type (service-extension shepherd-root-service-type mumi-shepherd-services))) (description - "Run Mumi, a Web interface to the Debbugs bug-tracking server.") - (default-value - (mumi-configuration)))) + "Run Mumi, a Web interface to the Debbugs bug-tracking server."))) (define %default-gmnisrv-config-file (plain-file "gmnisrv.ini" " base-commit: ada14197fb465c1c90efbc450308c14f077ff167 -- 2.49.0
X-Loop: help-debbugs@HIDDEN Subject: [bug#77585] [PATCH] services: mumi: Add Debbugs rsync as shepherd timer. References: <4977368b813a68f775050ff3b00a39139cf2b762.1743967795.git.arunisaac@HIDDEN> Resent-From: Arun Isaac <arunisaac@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Sun, 06 Apr 2025 21:59:02 +0000 Resent-Message-ID: <handler.77585.B77585.174397669924773 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 77585 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77585 <at> debbugs.gnu.org Cc: Arun Isaac <arunisaac@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Received: via spool by 77585-submit <at> debbugs.gnu.org id=B77585.174397669924773 (code B ref 77585); Sun, 06 Apr 2025 21:59:02 +0000 Received: (at 77585) by debbugs.gnu.org; 6 Apr 2025 21:58:19 +0000 Received: from localhost ([127.0.0.1]:49987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1Y0Q-0006RU-OV for submit <at> debbugs.gnu.org; Sun, 06 Apr 2025 17:58:19 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:36148) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <arunisaac@HIDDEN>) id 1u1Y0M-0006Qr-Hj for 77585 <at> debbugs.gnu.org; Sun, 06 Apr 2025 17:58:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=systemreboot.net; s=default; t=1743976688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to; bh=9K1FazHOJwlFuXQpJaqIuLjfVF8+yBRCJWaXo9H1zLY=; b=Ad8ew8K5+CeJ9wd0e7NYd4Vi4sSLMYQLSzY87UqfDQ83kbowDTfsmoS/fDAPpOKeM8ZXNb igqWXVndoFrDfcDWpSaRS9DPpmWt40cvWuvxVwh1C2NcxDZwL4q9uxVF6ybcOY3mVDHU5w EudGLXWo8BC4Gd2ycHvnmn4CxY38wazMlHsdU/INNqbjoW85U6vpGpOe/IEz9fJYQxp2YF eIeXJsqUe2Toy8al61iHDrtB5OO0614z1bCfizHXGwTWtCb3Ze2Xc4PA8tmW7l+N0yyc6Y sZ5sqgan5BTWRJDYtQJ8M8cF8/W0PBHlF4pO6y9BE2a/flzneFdLE7cZcbA5zQ== Received: from localhost (<unknown> [192.168.2.1]) by mugam.systemreboot.net (OpenSMTPD) with ESMTPSA id 4005b337 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 6 Apr 2025 21:58:08 +0000 (UTC) From: Arun Isaac <arunisaac@HIDDEN> In-Reply-To: <87wmbxyr7d.fsf@HIDDEN> Date: Sun, 06 Apr 2025 22:58:02 +0100 Message-ID: <877c3xhs0l.fsf@HIDDEN> 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 <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Ludo, > As a matter of style, I would return a program > (=E2=80=98mumi-rsync-and-index-program=E2=80=99) rather than a gexp; I fi= nd it clearer > and more robust (the gexp leaves it up to the caller to insert it in the > right context). Good point, thanks! I was merely trying to save whitespace in the left. Maybe we should indent program-file differently in the future? But, fixed for now. >> + (command >> + (program-file "mumi-rsync-and-index" >> + (mumi-rsync-and-index-gexp config)= )) > > I think you=E2=80=99re missing #$ before (mumi-rsync-and-index-gexp confi= g). Good catch, thanks! >> + #:log-file #$%mumi-rsync-and-index-log >> + #:max-duration (* 60 60) >> + #:wait-for-termination? #t)) > > Every minute is a lot, especially since it may take several seconds to > establish the rsync-over-ssh connection. It=E2=80=99s mitigated by the u= se of > #:wait-for-termination? but still sounds fairly aggressive to me. > (It would be ideal if the Debbugs instance could somehow notify mumi.) I have switched to a polling frequency of 2 minutes now. Still quite high, but we can cut it down to 5 minutes if it's too much. > Perhaps mention the polling frequency in the manual? Done now. When I deploy this on berlin, how do I get shepherd to pick up the new timer service. Is there a `herd reload' or similar? Or, do I have to reboot? Thanks, Arun
X-Loop: help-debbugs@HIDDEN Subject: [bug#77585] [PATCH v2] services: mumi: Add Debbugs rsync as shepherd timer. Resent-From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Tue, 08 Apr 2025 01:58:02 +0000 Resent-Message-ID: <handler.77585.B77585.174407742732239 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 77585 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Arun Isaac <arunisaac@HIDDEN> Cc: 77585 <at> debbugs.gnu.org Received: via spool by 77585-submit <at> debbugs.gnu.org id=B77585.174407742732239 (code B ref 77585); Tue, 08 Apr 2025 01:58:02 +0000 Received: (at 77585) by debbugs.gnu.org; 8 Apr 2025 01:57:07 +0000 Received: from localhost ([127.0.0.1]:57780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1yD4-0008Nu-Sa for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 21:57:07 -0400 Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]:47444) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1u1yD2-0008NB-Rs for 77585 <at> debbugs.gnu.org; Mon, 07 Apr 2025 21:57:05 -0400 Received: by mail-qk1-x729.google.com with SMTP id af79cd13be357-7c597760323so451812685a.3 for <77585 <at> debbugs.gnu.org>; Mon, 07 Apr 2025 18:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744077418; x=1744682218; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=pzR8WMxgsjF6Fpk4qZ0UNO0DIaAtwx9Y10xW1tjAHI4=; b=OJruTqh4/DBO5vBevsL4OMhcxvHYttxvDXf1y3ibUGdn8P4XGw0FOEnbqzjkYvc1pd uzD+b6ZewO+fUz0cCanaU2rr4SL6e09dCXZZ52z3Ei4ClfZmx74bQaNybUJaklUErP1f 448IPalE/CpwnBCHsFOxfAD9UCwjn67zX9p3UHDmbDvSUugrKfKgUpuwGFKX0ho1lQCV oX6mo5XudFN40qc3uj5shusYGbxVW4dHJsXH4nGZDvRQDl2ifu/RJ8dVGVmPeBtwWsGi 2sUHOVP74l+wNlaCLOrgnNMr5FlrMf6wjub6X9Iuut00wBT0p0MB56L7+1DOFYD5ejuw 75qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744077418; x=1744682218; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pzR8WMxgsjF6Fpk4qZ0UNO0DIaAtwx9Y10xW1tjAHI4=; b=dN/vAad3IuamEp1eQvyHf9nDgD8RXIFrgh11jW5oElrS2CC7Ksxq5FYaENQRHy68J4 GmgsUpM+q/xRXGYUZ7xPTnwOrscHyRarDCqNlfcp2B26WyF+/mWGmPEZA+mvbno9/Kzx LEONLjoviewIEIr3cLXfiehytxgN0rw9GNNBlUgn/irem0S/CevLk/zyLNOOigTmzTT4 piwwU484NW4x+nC2bS78cDiLl7sAVkv8AQHKkPgeaLrbJE9TjqbNWJAhhHJ4gNxRfOd7 Iee5PTrPIiuT35q1OJcmskGFVGPWYcWQjFUS/4KRWniDTCLRtY8sDW7FQgEhkiVVSi2B Y0Tg== X-Gm-Message-State: AOJu0Yx/MKiUAMRi1nksP5l+fN6J+/9KkliUf7JtWWE8UvFt+OOj9nnH HGHEEDeuRogM7G0FjzplUNbvmsGImmPfFSuBRiz+Hwc1cMoUCPngAiuQdqNK X-Gm-Gg: ASbGncuiDNEGnwJSyBrW2nkixlilIVDD6sdemF82oVWtGV2O+FT7MKcwCVEJ387e8X3 0Qp9kFFUhdosKVAXdNZW0kirgdSsVBz3AxzUIm9dn9eVqceyunT0WNFjaKIE3nRNX5IKiit6m+P azxw6jKD2OD8pqIZZnZJoazG4q54Lse4548rJHhLFrhQxKN6T5luWTWkHZ9K2sE9t3wJMBsBDE5 TmqIJfyuJUXaV7qcW27DWVM99IC3pVFlCjBeIAKKSLNe36dK03my2uL901HYouKaDP6ui+wKGkW x/qfPRDfT1LmDRFNIBJdoz0dxmTrPymVuP1+uQO+9fsl8u8CnUuLNB8i70aLnVSmCcOqrlTgfIy a X-Google-Smtp-Source: AGHT+IFnHv2wBAKQ5m0GEf/GDuoi4aAd9SqcsYklAsnkJv3iC8Om0O1b2j+1zvesfUOdMLs3TfVOiQ== X-Received: by 2002:a05:620a:298b:b0:7c5:4caa:21af with SMTP id af79cd13be357-7c77ddde0eamr1888544585a.53.1744077418674; Mon, 07 Apr 2025 18:56:58 -0700 (PDT) Received: from terra (vps-6234970c.vps.ovh.ca. [51.222.13.224]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7c76e96cf01sm682915885a.55.2025.04.07.18.56.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Apr 2025 18:56:58 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> In-Reply-To: <cda6b6e380b0bddfbfacb7214e74d88b9a13cbbf.1743975912.git.arunisaac@HIDDEN> (Arun Isaac's message of "Sun, 6 Apr 2025 22:52:30 +0100") References: <cda6b6e380b0bddfbfacb7214e74d88b9a13cbbf.1743975912.git.arunisaac@HIDDEN> Date: Tue, 08 Apr 2025 10:56:39 +0900 Message-ID: <87tt6zza94.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Arun, Arun Isaac <arunisaac@HIDDEN> writes: > * gnu/services/web.scm (<mumi-configuration>)[data-directory, rsync-remote, > rsync-flags]: New fields. > (%mumi-worker-log): Delete variable. > (%mumi-rsync-and-index-log): New variable. > (mumi-rsync-and-index): New function. > (mumi-shepherd-services): Remove mumi-worker service. Add mumi-rsync-and-index > service. > (mumi-service-type): Remove default value. > * doc/guix.texi (Web Services)[mumi]: Document data-directory, rsync-remote > and rsync-flags fields. > > Co-authored-by: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail> -- Thanks, Maxim
MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: bug#77585: closed ([PATCH] services: mumi: Add Debbugs rsync as shepherd timer.) CC: tracker <at> debbugs.gnu.org Message-ID: <handler.77585.D77585.174537476423993.ackdone <at> debbugs.gnu.org> References: <87ikmvzkki.fsf@HIDDEN> <4977368b813a68f775050ff3b00a39139cf2b762.1743967795.git.arunisaac@HIDDEN> X-Gnu-PR-Message: closed 77585 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Date: Wed, 23 Apr 2025 02:20:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1745374801-24086-0" This is a multi-part message in MIME format... ------------=_1745374801-24086-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Wed, 23 Apr 2025 11:19:09 +0900 with message-id <87ikmvzkki.fsf@HIDDEN> and subject line Re: [bug#77585] [PATCH] services: mumi: Add Debbugs rsync = as shepherd timer. has caused the debbugs.gnu.org bug report #77585, regarding [PATCH] services: mumi: Add Debbugs rsync as shepherd timer. to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs@HIDDEN) --=20 77585: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77585 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems ------------=_1745374801-24086-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 6 Apr 2025 19:31:30 +0000 Received: from localhost ([127.0.0.1]:49785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1ViL-00063B-CA for submit <at> debbugs.gnu.org; Sun, 06 Apr 2025 15:31:29 -0400 Received: from lists.gnu.org ([2001:470:142::17]:56200) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <arunisaac@HIDDEN>) id 1u1ViH-00062R-MC for submit <at> debbugs.gnu.org; Sun, 06 Apr 2025 15:31:26 -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 <arunisaac@HIDDEN>) id 1u1Vi4-0008Vl-LL for guix-patches@HIDDEN; Sun, 06 Apr 2025 15:31:12 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <arunisaac@HIDDEN>) id 1u1Vhz-0007d2-Uh; Sun, 06 Apr 2025 15:31:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=systemreboot.net; s=default; t=1743967848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vveJcJXC7/7PlJkZNcGAv0/D7kGh4o1ufowB6lDbTRQ=; b=lIkaeOk2KWLtQrp0K7JZcNJxrhiNwP1g0xHKU5ewHYZQ5OrhUgySRnPIX9NOCzekRTvOKr oYPpLHLrkrkr7Rr6/Poq+c663bktWMaR2flOlWfYOTUQByuhSKLRVq412jAXBU/aAuIATk cI66gVPPJtLm4wbAm0KeTQgrXfDilDLMLqFkjQfqbsCfOdoW2Pp1JV5dfsOu3YTMG1SSq2 M0pOHwmlbKzi36yu2SZ/Tk0zviKwpfdWCUHtdCGGXtDn5t2TSbMi4hGshxC/Qq756tk6e5 I4HWHIrvDBy1SscNtqvf8SzgKctV11od2I3zdx2de8574mBWWw8UGJ32TIM0jA== Received: from localhost.localdomain (<unknown> [192.168.2.1]) by mugam.systemreboot.net (OpenSMTPD) with ESMTPSA id 2338637a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 6 Apr 2025 19:30:47 +0000 (UTC) From: Arun Isaac <arunisaac@HIDDEN> To: guix-patches@HIDDEN Subject: [PATCH] services: mumi: Add Debbugs rsync as shepherd timer. Date: Sun, 6 Apr 2025 20:30:27 +0100 Message-ID: <4977368b813a68f775050ff3b00a39139cf2b762.1743967795.git.arunisaac@HIDDEN> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=139.59.75.54; envelope-from=arunisaac@HIDDEN; helo=mugam.systemreboot.net 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: Arun Isaac <arunisaac@HIDDEN>, =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) * gnu/services/web.scm (<mumi-configuration>)[data-directory, rsync-remote, rsync-flags]: New fields. (%mumi-worker-log): Delete variable. (%mumi-rsync-and-index-log): New variable. (mumi-rsync-and-index-gexp): New function. (mumi-shepherd-services): Remove mumi-worker service. Add mumi-rsync-and-index service. (mumi-service-type): Remove default value. * doc/guix.texi (Web Services)[mumi]: Document data-directory, rsync-remote and rsync-flags fields. Co-authored-by: Maxim Cournoyer <maxim.cournoyer@HIDDEN> --- doc/guix.texi | 9 +++++++ gnu/services/web.scm | 57 ++++++++++++++++++++++++++++++++------------ 2 files changed, 51 insertions(+), 15 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 12f155e912..b6c0e64a53 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33999,6 +33999,15 @@ Web Services @item @code{mumi} (default: @code{mumi}) The Mumi package to use. +@item @code{data-directory} (default: @file{"/var/mumi/data"}) +Data directory to store Debbugs data from upstream Debbugs instance. + +@item @code{rsync-remote} +Remote rsync path from which to download Debbugs data. + +@item @code{rsync-flags} (default: @code{'()}) +Additional flags to pass to @command{rsync}. + @item @code{mailer?} (default: @code{#true}) Whether to enable or disable the mailer component. diff --git a/gnu/services/web.scm b/gnu/services/web.scm index f8cf06fb48..eea9a19426 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2023 Bruno Victal <mirai@HIDDEN> ;;; Copyright © 2023 Miguel Ángel Moreno <mail@HIDDEN> ;;; Copyright © 2024 Leo Nikkilä <hello@HIDDEN> +;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; ;;; This file is part of GNU Guix. ;;; @@ -51,6 +52,7 @@ (define-module (gnu services web) #:use-module (gnu packages php) #:use-module (gnu packages python) #:use-module (gnu packages python-web) + #:use-module (gnu packages rsync) #:use-module (gnu packages gnupg) #:use-module (gnu packages guile) #:use-module (gnu packages logging) @@ -295,6 +297,9 @@ (define-module (gnu services web) mumi-configuration mumi-configuration? mumi-configuration-mumi + mumi-configuration-data-directory + mumi-configuration-rsync-remote + mumi-configuration-rsync-flags mumi-configuration-mailer? mumi-configuration-sender mumi-configuration-smtp @@ -2033,6 +2038,11 @@ (define-record-type* <mumi-configuration> mumi-configuration make-mumi-configuration mumi-configuration? (mumi mumi-configuration-mumi (default mumi)) + (data-directory mumi-configuration-data-directory + (default "/var/mumi/data")) + (rsync-remote mumi-configuration-rsync-remote) + (rsync-flags mumi-configuration-rsync-flags + (default '())) (mailer? mumi-configuration-mailer? (default #t)) (sender mumi-configuration-sender (default #f)) (smtp mumi-configuration-smtp (default #f)) @@ -2080,7 +2090,7 @@ (define %mumi-log "/var/log/mumi.log") (define %mumi-mailer-log "/var/log/mumi.mailer.log") -(define %mumi-worker-log "/var/log/mumi.worker.log") +(define %mumi-rsync-and-index-log "/var/log/mumi.rsync-and-index.log") (define mumi-package-configuration->alist (match-record-lambda <mumi-package-configuration> @@ -2118,6 +2128,23 @@ (define mumi-config-file packages))) <>)))))) +(define (mumi-rsync-and-index-gexp config) + (match-record config <mumi-configuration> + (data-directory rsync-remote rsync-flags) + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + (invoke #$(file-append rsync "/bin/rsync") + "--delete" "--archive" "--verbose" + "--timeout" "120" + #$@rsync-flags + #$rsync-remote + #$data-directory) + (invoke #$(file-append mumi "/bin/mumi") "fetch" + (string-append "--config=" + #$(mumi-config-file config))))))) + (define (mumi-shepherd-services config) (define environment #~(list "LC_ALL=en_US.utf8" @@ -2140,17 +2167,19 @@ (define (mumi-shepherd-services config) #:log-file #$%mumi-log)) (stop #~(make-kill-destructor))) (shepherd-service - (provision '(mumi-worker)) - (documentation "Mumi bug-tracking web interface database worker.") - (requirement '(user-processes networking)) - (start #~(make-forkexec-constructor - `(#$(file-append mumi "/bin/mumi") "worker" - ,(string-append "--config=" - #$(mumi-config-file config))) - #:environment-variables #$environment - #:user "mumi" #:group "mumi" - #:log-file #$%mumi-worker-log)) - (stop #~(make-kill-destructor))) + (provision '(mumi-rsync-and-index)) + (modules '((shepherd service timer))) + (start #~(make-timer-constructor + (calendar-event) + (command + (program-file "mumi-rsync-and-index" + (mumi-rsync-and-index-gexp config))) + #:log-file #$%mumi-rsync-and-index-log + #:max-duration (* 60 60) + #:wait-for-termination? #t)) + (stop #~(make-timer-destructor)) + (actions (list shepherd-trigger-action)) + (documentation "Rsync and index the GNU Debbugs data")) (shepherd-service (provision '(mumi-mailer)) (documentation "Mumi bug-tracking web interface mailer.") @@ -2181,9 +2210,7 @@ (define mumi-service-type (service-extension shepherd-root-service-type mumi-shepherd-services))) (description - "Run Mumi, a Web interface to the Debbugs bug-tracking server.") - (default-value - (mumi-configuration)))) + "Run Mumi, a Web interface to the Debbugs bug-tracking server."))) (define %default-gmnisrv-config-file (plain-file "gmnisrv.ini" " base-commit: ada14197fb465c1c90efbc450308c14f077ff167 -- 2.49.0 ------------=_1745374801-24086-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 77585-done) by debbugs.gnu.org; 23 Apr 2025 02:19:24 +0000 Received: from localhost ([127.0.0.1]:51127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u7Phs-0006Et-3h for submit <at> debbugs.gnu.org; Tue, 22 Apr 2025 22:19:24 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:52465) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1u7Phm-0006ER-PO for 77585-done <at> debbugs.gnu.org; Tue, 22 Apr 2025 22:19:20 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-227c7e57da2so51405505ad.0 for <77585-done <at> debbugs.gnu.org>; Tue, 22 Apr 2025 19:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745374752; x=1745979552; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=BcUyQBTCJSOVP7zvWyMQIIppIhmjjH5ycgopu8nEH1M=; b=OZ/40nfp2C19A3GAg5jDMf+RjlyI2kUzhvjpO/launsSOzbGSfQxGNC4tYOIBeSZr3 yH+OR8bi+uijCq4/McrqswQnBxDmGnoXX7mOJzQyenfo9F7HhekCZdT4l3CJG6ebUjZu ab8aT8B9zz1eSroxAg8V2vfs67AHuOQ8ve5sFqe54lhn2BNmVc5/wwA57H9EH//6MaT0 1y6hR0N6ntn/C7oZxKUe0pUqfOUZ6pggTfyw98f0YkbjY//sJ2duJG2VeUyRkj/msoTF mHcclI1U1+SfkRtRJ+qbuYn//n/5sdtDCg9aqtlg68sDtG3oDp7nUszj1eR1Ah0U/mOU hhLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745374752; x=1745979552; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=BcUyQBTCJSOVP7zvWyMQIIppIhmjjH5ycgopu8nEH1M=; b=PDBi/q7kMOOGrIBjA+8sXFUCay1DbXi8shnrp3M4SW82q/hM0Ak6MPdtEjXd/zkPiP o5yeicRnnv6Hgu6xPmn3gYgDBNKCZ06IW47gSHfL3JOq7bwNu0dnR0/+nyOdOTBzA4D7 agFgIReVdL/ORS1rVv/UfBRnE6EO/N7adCGVzC/lHPJF8OelZIElP+JjcMDEt9fhdlGW MmoxeNoLEk2dFyT77T1dAsQ0ZqYTTbgUkLuF/kyluo3UdBTbNeFvMPjk7PnDjaJ+ESEE aHXK8xxgT6cK1eGw/0+05JsLjGFzTRmdMN0GkOvE25kM996jdTm37WVFblSackEAD32i 2S7w== X-Gm-Message-State: AOJu0YxQ70qPk3/DTdjpGcktlDBb9Q9QVNLKIJnq8aWs/stwIy4Vsguy jcpQBuIymJJNIkP4tJrOZm0u8dw9IV3OZes1dqpysvKDwWsgexl+ X-Gm-Gg: ASbGncuqBu7zO+hNpo/lyEQhyukguIYZ1tDAcoCwqu/TXw6Q6S+KlPnAb8jeCUklBJo mV+kS4xfUSV6YJP6v99q5/pSocfY89wQC23WOGFETfAcZdAo4U/0BM99An2QPPnwfWh/iLj6XJ2 i+AnFG+2H6DCO3cqD+4x8naS2y4HOHEm9paxdN/uYV9TcUQ7zyqxlr678zGdiPMxQeFwTP+b+ju EIr3Xob5Ay6dBJUjam3rVJEBSe0ByrISK12a+wqHzi8V5vDfRAek7wuEMIJGeG4fz7PNbjMhnBq qj0LLY3hb0DFSSGSj58Y/BhxUtQ1lPE38Fk2jETs2qrV9FJ1Kw== X-Google-Smtp-Source: AGHT+IE0a6Js43PMOYsRNNttHYtWII6H24Ty8WiCYPMfzLouo0e7YXd/Fir8EGqCQVrUoTBzYaUqTA== X-Received: by 2002:a17:902:ce01:b0:223:569d:9a8b with SMTP id d9443c01a7336-22c53580d1dmr220634715ad.18.1745374752093; Tue, 22 Apr 2025 19:19:12 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22c60474848sm73906895ad.125.2025.04.22.19.19.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Apr 2025 19:19:11 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Arun Isaac <arunisaac@HIDDEN> Subject: Re: [bug#77585] [PATCH] services: mumi: Add Debbugs rsync as shepherd timer. In-Reply-To: <877c3xhs0l.fsf@HIDDEN> (Arun Isaac's message of "Sun, 06 Apr 2025 22:58:02 +0100") References: <4977368b813a68f775050ff3b00a39139cf2b762.1743967795.git.arunisaac@HIDDEN> <877c3xhs0l.fsf@HIDDEN> Date: Wed, 23 Apr 2025 11:19:09 +0900 Message-ID: <87ikmvzkki.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77585-done Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 77585-done <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, Arun Isaac <arunisaac@HIDDEN> writes: [...] I think you'll see the new timer in 'herd status', e.g. on my machine: Running timers: + log-cleanup + log-rotation I assume they should be started automatically. I'll close this issue as I'm assuming it's been taken care of already o berlin. Feel free to reopen if there are issues. -- Thanks, Maxim ------------=_1745374801-24086-0--
MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Arun Isaac <arunisaac@HIDDEN> Subject: bug#77585: closed (Re: [bug#77585] [PATCH] services: mumi: Add Debbugs rsync as shepherd timer.) Message-ID: <handler.77585.D77585.174537476423993.notifdone <at> debbugs.gnu.org> References: <87ikmvzkki.fsf@HIDDEN> <4977368b813a68f775050ff3b00a39139cf2b762.1743967795.git.arunisaac@HIDDEN> X-Gnu-PR-Message: they-closed 77585 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 77585 <at> debbugs.gnu.org Date: Wed, 23 Apr 2025 02:20:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1745374801-24086-1" This is a multi-part message in MIME format... ------------=_1745374801-24086-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #77585: [PATCH] services: mumi: Add Debbugs rsync as shepherd timer. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 77585 <at> debbugs.gnu.org. --=20 77585: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77585 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems ------------=_1745374801-24086-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 77585-done) by debbugs.gnu.org; 23 Apr 2025 02:19:24 +0000 Received: from localhost ([127.0.0.1]:51127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u7Phs-0006Et-3h for submit <at> debbugs.gnu.org; Tue, 22 Apr 2025 22:19:24 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:52465) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1u7Phm-0006ER-PO for 77585-done <at> debbugs.gnu.org; Tue, 22 Apr 2025 22:19:20 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-227c7e57da2so51405505ad.0 for <77585-done <at> debbugs.gnu.org>; Tue, 22 Apr 2025 19:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745374752; x=1745979552; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=BcUyQBTCJSOVP7zvWyMQIIppIhmjjH5ycgopu8nEH1M=; b=OZ/40nfp2C19A3GAg5jDMf+RjlyI2kUzhvjpO/launsSOzbGSfQxGNC4tYOIBeSZr3 yH+OR8bi+uijCq4/McrqswQnBxDmGnoXX7mOJzQyenfo9F7HhekCZdT4l3CJG6ebUjZu ab8aT8B9zz1eSroxAg8V2vfs67AHuOQ8ve5sFqe54lhn2BNmVc5/wwA57H9EH//6MaT0 1y6hR0N6ntn/C7oZxKUe0pUqfOUZ6pggTfyw98f0YkbjY//sJ2duJG2VeUyRkj/msoTF mHcclI1U1+SfkRtRJ+qbuYn//n/5sdtDCg9aqtlg68sDtG3oDp7nUszj1eR1Ah0U/mOU hhLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745374752; x=1745979552; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=BcUyQBTCJSOVP7zvWyMQIIppIhmjjH5ycgopu8nEH1M=; b=PDBi/q7kMOOGrIBjA+8sXFUCay1DbXi8shnrp3M4SW82q/hM0Ak6MPdtEjXd/zkPiP o5yeicRnnv6Hgu6xPmn3gYgDBNKCZ06IW47gSHfL3JOq7bwNu0dnR0/+nyOdOTBzA4D7 agFgIReVdL/ORS1rVv/UfBRnE6EO/N7adCGVzC/lHPJF8OelZIElP+JjcMDEt9fhdlGW MmoxeNoLEk2dFyT77T1dAsQ0ZqYTTbgUkLuF/kyluo3UdBTbNeFvMPjk7PnDjaJ+ESEE aHXK8xxgT6cK1eGw/0+05JsLjGFzTRmdMN0GkOvE25kM996jdTm37WVFblSackEAD32i 2S7w== X-Gm-Message-State: AOJu0YxQ70qPk3/DTdjpGcktlDBb9Q9QVNLKIJnq8aWs/stwIy4Vsguy jcpQBuIymJJNIkP4tJrOZm0u8dw9IV3OZes1dqpysvKDwWsgexl+ X-Gm-Gg: ASbGncuqBu7zO+hNpo/lyEQhyukguIYZ1tDAcoCwqu/TXw6Q6S+KlPnAb8jeCUklBJo mV+kS4xfUSV6YJP6v99q5/pSocfY89wQC23WOGFETfAcZdAo4U/0BM99An2QPPnwfWh/iLj6XJ2 i+AnFG+2H6DCO3cqD+4x8naS2y4HOHEm9paxdN/uYV9TcUQ7zyqxlr678zGdiPMxQeFwTP+b+ju EIr3Xob5Ay6dBJUjam3rVJEBSe0ByrISK12a+wqHzi8V5vDfRAek7wuEMIJGeG4fz7PNbjMhnBq qj0LLY3hb0DFSSGSj58Y/BhxUtQ1lPE38Fk2jETs2qrV9FJ1Kw== X-Google-Smtp-Source: AGHT+IE0a6Js43PMOYsRNNttHYtWII6H24Ty8WiCYPMfzLouo0e7YXd/Fir8EGqCQVrUoTBzYaUqTA== X-Received: by 2002:a17:902:ce01:b0:223:569d:9a8b with SMTP id d9443c01a7336-22c53580d1dmr220634715ad.18.1745374752093; Tue, 22 Apr 2025 19:19:12 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22c60474848sm73906895ad.125.2025.04.22.19.19.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Apr 2025 19:19:11 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Arun Isaac <arunisaac@HIDDEN> Subject: Re: [bug#77585] [PATCH] services: mumi: Add Debbugs rsync as shepherd timer. In-Reply-To: <877c3xhs0l.fsf@HIDDEN> (Arun Isaac's message of "Sun, 06 Apr 2025 22:58:02 +0100") References: <4977368b813a68f775050ff3b00a39139cf2b762.1743967795.git.arunisaac@HIDDEN> <877c3xhs0l.fsf@HIDDEN> Date: Wed, 23 Apr 2025 11:19:09 +0900 Message-ID: <87ikmvzkki.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77585-done Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 77585-done <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, Arun Isaac <arunisaac@HIDDEN> writes: [...] I think you'll see the new timer in 'herd status', e.g. on my machine: Running timers: + log-cleanup + log-rotation I assume they should be started automatically. I'll close this issue as I'm assuming it's been taken care of already o berlin. Feel free to reopen if there are issues. -- Thanks, Maxim ------------=_1745374801-24086-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 6 Apr 2025 19:31:30 +0000 Received: from localhost ([127.0.0.1]:49785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1ViL-00063B-CA for submit <at> debbugs.gnu.org; Sun, 06 Apr 2025 15:31:29 -0400 Received: from lists.gnu.org ([2001:470:142::17]:56200) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <arunisaac@HIDDEN>) id 1u1ViH-00062R-MC for submit <at> debbugs.gnu.org; Sun, 06 Apr 2025 15:31:26 -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 <arunisaac@HIDDEN>) id 1u1Vi4-0008Vl-LL for guix-patches@HIDDEN; Sun, 06 Apr 2025 15:31:12 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <arunisaac@HIDDEN>) id 1u1Vhz-0007d2-Uh; Sun, 06 Apr 2025 15:31:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=systemreboot.net; s=default; t=1743967848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vveJcJXC7/7PlJkZNcGAv0/D7kGh4o1ufowB6lDbTRQ=; b=lIkaeOk2KWLtQrp0K7JZcNJxrhiNwP1g0xHKU5ewHYZQ5OrhUgySRnPIX9NOCzekRTvOKr oYPpLHLrkrkr7Rr6/Poq+c663bktWMaR2flOlWfYOTUQByuhSKLRVq412jAXBU/aAuIATk cI66gVPPJtLm4wbAm0KeTQgrXfDilDLMLqFkjQfqbsCfOdoW2Pp1JV5dfsOu3YTMG1SSq2 M0pOHwmlbKzi36yu2SZ/Tk0zviKwpfdWCUHtdCGGXtDn5t2TSbMi4hGshxC/Qq756tk6e5 I4HWHIrvDBy1SscNtqvf8SzgKctV11od2I3zdx2de8574mBWWw8UGJ32TIM0jA== Received: from localhost.localdomain (<unknown> [192.168.2.1]) by mugam.systemreboot.net (OpenSMTPD) with ESMTPSA id 2338637a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 6 Apr 2025 19:30:47 +0000 (UTC) From: Arun Isaac <arunisaac@HIDDEN> To: guix-patches@HIDDEN Subject: [PATCH] services: mumi: Add Debbugs rsync as shepherd timer. Date: Sun, 6 Apr 2025 20:30:27 +0100 Message-ID: <4977368b813a68f775050ff3b00a39139cf2b762.1743967795.git.arunisaac@HIDDEN> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=139.59.75.54; envelope-from=arunisaac@HIDDEN; helo=mugam.systemreboot.net 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: Arun Isaac <arunisaac@HIDDEN>, =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) * gnu/services/web.scm (<mumi-configuration>)[data-directory, rsync-remote, rsync-flags]: New fields. (%mumi-worker-log): Delete variable. (%mumi-rsync-and-index-log): New variable. (mumi-rsync-and-index-gexp): New function. (mumi-shepherd-services): Remove mumi-worker service. Add mumi-rsync-and-index service. (mumi-service-type): Remove default value. * doc/guix.texi (Web Services)[mumi]: Document data-directory, rsync-remote and rsync-flags fields. Co-authored-by: Maxim Cournoyer <maxim.cournoyer@HIDDEN> --- doc/guix.texi | 9 +++++++ gnu/services/web.scm | 57 ++++++++++++++++++++++++++++++++------------ 2 files changed, 51 insertions(+), 15 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 12f155e912..b6c0e64a53 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33999,6 +33999,15 @@ Web Services @item @code{mumi} (default: @code{mumi}) The Mumi package to use. +@item @code{data-directory} (default: @file{"/var/mumi/data"}) +Data directory to store Debbugs data from upstream Debbugs instance. + +@item @code{rsync-remote} +Remote rsync path from which to download Debbugs data. + +@item @code{rsync-flags} (default: @code{'()}) +Additional flags to pass to @command{rsync}. + @item @code{mailer?} (default: @code{#true}) Whether to enable or disable the mailer component. diff --git a/gnu/services/web.scm b/gnu/services/web.scm index f8cf06fb48..eea9a19426 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2023 Bruno Victal <mirai@HIDDEN> ;;; Copyright © 2023 Miguel Ángel Moreno <mail@HIDDEN> ;;; Copyright © 2024 Leo Nikkilä <hello@HIDDEN> +;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; ;;; This file is part of GNU Guix. ;;; @@ -51,6 +52,7 @@ (define-module (gnu services web) #:use-module (gnu packages php) #:use-module (gnu packages python) #:use-module (gnu packages python-web) + #:use-module (gnu packages rsync) #:use-module (gnu packages gnupg) #:use-module (gnu packages guile) #:use-module (gnu packages logging) @@ -295,6 +297,9 @@ (define-module (gnu services web) mumi-configuration mumi-configuration? mumi-configuration-mumi + mumi-configuration-data-directory + mumi-configuration-rsync-remote + mumi-configuration-rsync-flags mumi-configuration-mailer? mumi-configuration-sender mumi-configuration-smtp @@ -2033,6 +2038,11 @@ (define-record-type* <mumi-configuration> mumi-configuration make-mumi-configuration mumi-configuration? (mumi mumi-configuration-mumi (default mumi)) + (data-directory mumi-configuration-data-directory + (default "/var/mumi/data")) + (rsync-remote mumi-configuration-rsync-remote) + (rsync-flags mumi-configuration-rsync-flags + (default '())) (mailer? mumi-configuration-mailer? (default #t)) (sender mumi-configuration-sender (default #f)) (smtp mumi-configuration-smtp (default #f)) @@ -2080,7 +2090,7 @@ (define %mumi-log "/var/log/mumi.log") (define %mumi-mailer-log "/var/log/mumi.mailer.log") -(define %mumi-worker-log "/var/log/mumi.worker.log") +(define %mumi-rsync-and-index-log "/var/log/mumi.rsync-and-index.log") (define mumi-package-configuration->alist (match-record-lambda <mumi-package-configuration> @@ -2118,6 +2128,23 @@ (define mumi-config-file packages))) <>)))))) +(define (mumi-rsync-and-index-gexp config) + (match-record config <mumi-configuration> + (data-directory rsync-remote rsync-flags) + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + (invoke #$(file-append rsync "/bin/rsync") + "--delete" "--archive" "--verbose" + "--timeout" "120" + #$@rsync-flags + #$rsync-remote + #$data-directory) + (invoke #$(file-append mumi "/bin/mumi") "fetch" + (string-append "--config=" + #$(mumi-config-file config))))))) + (define (mumi-shepherd-services config) (define environment #~(list "LC_ALL=en_US.utf8" @@ -2140,17 +2167,19 @@ (define (mumi-shepherd-services config) #:log-file #$%mumi-log)) (stop #~(make-kill-destructor))) (shepherd-service - (provision '(mumi-worker)) - (documentation "Mumi bug-tracking web interface database worker.") - (requirement '(user-processes networking)) - (start #~(make-forkexec-constructor - `(#$(file-append mumi "/bin/mumi") "worker" - ,(string-append "--config=" - #$(mumi-config-file config))) - #:environment-variables #$environment - #:user "mumi" #:group "mumi" - #:log-file #$%mumi-worker-log)) - (stop #~(make-kill-destructor))) + (provision '(mumi-rsync-and-index)) + (modules '((shepherd service timer))) + (start #~(make-timer-constructor + (calendar-event) + (command + (program-file "mumi-rsync-and-index" + (mumi-rsync-and-index-gexp config))) + #:log-file #$%mumi-rsync-and-index-log + #:max-duration (* 60 60) + #:wait-for-termination? #t)) + (stop #~(make-timer-destructor)) + (actions (list shepherd-trigger-action)) + (documentation "Rsync and index the GNU Debbugs data")) (shepherd-service (provision '(mumi-mailer)) (documentation "Mumi bug-tracking web interface mailer.") @@ -2181,9 +2210,7 @@ (define mumi-service-type (service-extension shepherd-root-service-type mumi-shepherd-services))) (description - "Run Mumi, a Web interface to the Debbugs bug-tracking server.") - (default-value - (mumi-configuration)))) + "Run Mumi, a Web interface to the Debbugs bug-tracking server."))) (define %default-gmnisrv-config-file (plain-file "gmnisrv.ini" " base-commit: ada14197fb465c1c90efbc450308c14f077ff167 -- 2.49.0 ------------=_1745374801-24086-1--
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.