From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 01 15:21:43 2021 Received: (at submit) by debbugs.gnu.org; 1 Sep 2021 19:21:43 +0000 Received: from localhost ([127.0.0.1]:39026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLVnm-00009n-Ab for submit@debbugs.gnu.org; Wed, 01 Sep 2021 15:21:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:42112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLVng-00009b-Q6 for submit@debbugs.gnu.org; Wed, 01 Sep 2021 15:21:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLVng-0002n2-K1 for guix-patches@gnu.org; Wed, 01 Sep 2021 15:21:32 -0400 Received: from mx.kolabnow.com ([95.128.36.41]:3406) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLVnY-0004Qy-Gl for guix-patches@gnu.org; Wed, 01 Sep 2021 15:21:31 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTP id 39E50BCD for ; Wed, 1 Sep 2021 21:15:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20160331; t=1630523704; x=1632338105; bh=eaJgfIvgDMKpZrcmL53NtvlZG2CnyERW5cJjeyA0cX4=; b=fQbVPLSEIQtR 695gQjmiFKnU7WZ/Vh4H8TtseNA69WL6cNBaBjJJaPCDZthsW2kXK6PC9KEYV+x5 cPZw3a+yVqSXy631/ItqrMyn1R/OEakkBHuuAKn41O+KuKHxStNQyRJP/2tComd/ EibVl0ygA9whIq9fm+WyPF3o2sbZfBPVqncz/I1t61V2qwisu13DdgArDvLmdlXD 6OBJqh8PjDBnxRpG2if0YUJYYvMtFKMIXmbRfjgAjxp4t6ZPSzI9JrivFBtTuDir 1U2FmyqFg6hr5M48r9/MqjRcFuS8bWzPkTp+qDGqBf2k/6zkIntcxDuJom5JgwI9 5jHqZoCLamtdTs/xCLx+3hmQ3SjJjYbRHaLJ3/IPBe2TLXIRXF4uAnekyDZeicNn LVO6hKQpPeFiHg1TV+4FdSerGaVkME2fJehTM8dm/UiZJ4SCvkAA6gW1DsGDGE9o fWfLR6qc8LuDz589ccO/uH7jxFJWwR3GRufSxAbdOLh5USvTHkICkC2ANbs4N3/4 L/lb7M67/c6BRFN0XMUuw7SY+ZP3krV/kKe2eybQYAy41ihDDISqeUtNNy20IWlG yiYvhfR9PJpeKp0xeswEDf6uBsfhR4uk+BXWDCff9G4oO2iiT/2XwYgNgVytoQwX BVGZFolpUpyqgSZuIylXBXay6vEvQKg= X-Virus-Scanned: amavisd-new at mykolab.com X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id olWNdKwmIE1d for ; Wed, 1 Sep 2021 21:15:04 +0200 (CEST) Received: from int-mx003.mykolab.com (unknown [10.9.13.3]) by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id CC7C8BBA for ; Wed, 1 Sep 2021 21:15:03 +0200 (CEST) Received: from ext-subm002.mykolab.com (unknown [10.9.6.2]) by int-mx003.mykolab.com (Postfix) with ESMTPS id F11FC2E9D; Wed, 1 Sep 2021 21:15:02 +0200 (CEST) From: Thiago Jung Bauermann To: guix-patches@gnu.org Subject: [PATCH cuirass] Add systemd unit file for remote worker service. Date: Wed, 1 Sep 2021 16:14:43 -0300 Message-Id: <20210901191443.59352-1-bauermann@kolabnow.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=95.128.36.41; envelope-from=bauermann@kolabnow.com; helo=mx.kolabnow.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Thiago Jung Bauermann 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.4 (--) * etc/cuirass-remote-worker.service.in: New file. * doc/cuirass.texi: Mention it. * .gitignore: Ignore it. * Makefile.am (noinst_SCRIPTS): Add ‘etc/cuirass-remote-worker.service’. (EXTRA_DIST): Likewise. (etc/cuirass-remote-worker.service): New target. * configure.ac: Check for ‘(guix config)’ module. Set ‘guix_localstatedir’ variable. --- Hello, This patch adds the systemd unit file I installed on guixp9. The configure script finds out Guix’s localstatedir and substitutes it in etc/cuirass-remote-worker.service.in. The service file isn’t installed anywhere and the user is supposed to get it from the build directory if they want to use it. I did it this way because there’s no $PREFIX/doc/examples directory or equivalent where it could be shipped, and I thought that it would be excessive to add it to all Cuirass installations considering that only a few of them would actually have a use for it. But I can send a v2 making this change if people think it would be better. .gitignore | 1 + Makefile.am | 8 +++++++- configure.ac | 4 ++++ doc/cuirass.texi | 13 +++++++++++++ etc/cuirass-remote-worker.service.in | 15 +++++++++++++++ 5 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 etc/cuirass-remote-worker.service.in diff --git a/.gitignore b/.gitignore index 95ed6cb3982c..0807874e9513 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ /config.cache /configure /doc/version.texi +/etc/cuirass-remote-worker.service /src/cuirass/config.scm /tests/cache Makefile diff --git a/Makefile.am b/Makefile.am index 1d754673f450..6c5dab26f105 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,7 +25,9 @@ bin_SCRIPTS = \ bin/cuirass -noinst_SCRIPTS = pre-inst-env +noinst_SCRIPTS = \ + pre-inst-env \ + etc/cuirass-remote-worker.service guilesitedir = $(datarootdir)/guile/site/@GUILE_EFFECTIVE_VERSION@ guileobjectdir = $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache @@ -188,6 +190,7 @@ EXTRA_DIST = \ bootstrap \ build-aux/guix.scm \ src/cuirass/config.scm.in \ + etc/cuirass-remote-worker.service.in \ $(TESTS) dist-hook: gen-ChangeLog @@ -247,6 +250,9 @@ $(bin_SCRIPTS): Makefile $(generate_file); chmod +x $@ src/cuirass/config.scm: $(srcdir)/src/cuirass/config.scm.in Makefile $(generate_file) +etc/cuirass-remote-worker.service: $(srcdir)/etc/cuirass-remote-worker.service.in \ + Makefile + $(generate_file) # Guile modules require 'src/cuirass/config.scm' to exist before their # compilation. diff --git a/configure.ac b/configure.ac index 479e93a1cb8e..af294c16d025 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,7 @@ GUILE_MODULE_REQUIRED([avahi]) GUILE_MODULE_REQUIRED([fibers]) GUILE_MODULE_REQUIRED([guix]) GUILE_MODULE_REQUIRED([guix git]) +GUILE_MODULE_REQUIRED([guix config]) GUILE_MODULE_REQUIRED([git]) GUILE_MODULE_REQUIRED([json]) GUILE_MODULE_REQUIRED([mailutils mailutils]) @@ -58,6 +59,9 @@ GUILE_MODULE_REQUIRED([zlib]) # We depend on new Guile-Git errors. GUILE_MODULE_REQUIRED_EXPORT([(git)], git-error-message) +guix_localstatedir="$($GUILE -c '(import (guix config)) (display %localstatedir)')" +AC_SUBST(guix_localstatedir) + AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in], [chmod +x pre-inst-env]) diff --git a/doc/cuirass.texi b/doc/cuirass.texi index 72b0b5b0913a..e32ab29e5d5d 100644 --- a/doc/cuirass.texi +++ b/doc/cuirass.texi @@ -463,6 +463,19 @@ The easiest way to setup such an infrastructure is to rely on the GNU Guix Cuirass services definitions (@pxref{Continuous Integration, Continuous Integration,, guix, Guix}). +Alternatively, there is a systemd service unit file at +@code{etc/cuirass-remote-worker.service} to launch the +@code{cuirass remote-worker} on systems which use systemd. It can be +installed and enabled as follows: + +@example +sudo install -o root -g root -m 644 \ + $CUIRASS_BUILD_DIR/etc/cuirass-remote-worker.service \ + /etc/systemd/system +sudo systemctl enable cuirass-remote-worker.service +sudo systemctl start cuirass-remote-worker.service +@end example + @c ********************************************************************* @node Invocation @chapter Invocation diff --git a/etc/cuirass-remote-worker.service.in b/etc/cuirass-remote-worker.service.in new file mode 100644 index 000000000000..2c334d74804f --- /dev/null +++ b/etc/cuirass-remote-worker.service.in @@ -0,0 +1,15 @@ +# This is a "service unit file" for the systemd init system to launch +# 'cuirass remote-worker'. Drop it in /etc/systemd/system or similar +# to have 'cuirass remote-worker' automatically started. + +[Unit] +Description=Continuous integration remmote worker for GNU Guix + +[Service] +ExecStart=@guix_localstatedir@/guix/profiles/per-user/root/guix-profile/bin/cuirass \ + remote-worker --workers=2 --server=10.0.0.1:5555 +Environment= LC_ALL=en_US.UTF-8 \ + 'GUIX_LOCPATH=@guix_localstatedir@/guix/profiles/per-user/root/guix-profile/lib/locale' + +[Install] +WantedBy=multi-user.target From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 08 10:01:19 2021 Received: (at 50326) by debbugs.gnu.org; 8 Sep 2021 14:01:19 +0000 Received: from localhost ([127.0.0.1]:33212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNy8d-0006a2-Au for submit@debbugs.gnu.org; Wed, 08 Sep 2021 10:01:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNy8Z-0006Zn-Dd for 50326@debbugs.gnu.org; Wed, 08 Sep 2021 10:01:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43760) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNy8T-0007uc-Vh; Wed, 08 Sep 2021 10:01:09 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35398 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNy8S-0003RA-1f; Wed, 08 Sep 2021 10:01:09 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Thiago Jung Bauermann Subject: Re: bug#50326: [PATCH cuirass] Add systemd unit file for remote worker service. References: <20210901191443.59352-1-bauermann@kolabnow.com> Date: Wed, 08 Sep 2021 16:01:06 +0200 In-Reply-To: <20210901191443.59352-1-bauermann@kolabnow.com> (Thiago Jung Bauermann's message of "Wed, 1 Sep 2021 16:14:43 -0300") Message-ID: <87czpj2ml9.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50326 Cc: 50326@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: -3.3 (---) Hello! Thiago Jung Bauermann skribis: > * etc/cuirass-remote-worker.service.in: New file. > * doc/cuirass.texi: Mention it. > * .gitignore: Ignore it. > * Makefile.am (noinst_SCRIPTS): Add =E2=80=98etc/cuirass-remote-worker.se= rvice=E2=80=99. > (EXTRA_DIST): Likewise. > (etc/cuirass-remote-worker.service): New target. > * configure.ac: Check for =E2=80=98(guix config)=E2=80=99 module. > Set =E2=80=98guix_localstatedir=E2=80=99 variable. > --- > > Hello, > > This patch adds the systemd unit file I installed on guixp9. The > configure script finds out Guix=E2=80=99s localstatedir and substitutes i= t in > etc/cuirass-remote-worker.service.in. The service file isn=E2=80=99t inst= alled > anywhere and the user is supposed to get it from the build directory if > they want to use it. > > I did it this way because there=E2=80=99s no $PREFIX/doc/examples directo= ry > or equivalent where it could be shipped, and I thought that it would > be excessive to add it to all Cuirass installations considering that > only a few of them would actually have a use for it. But I can send a > v2 making this change if people think it would be better. With this approach, the user has to get the source and configure it, which is somewhat annoying. I=E2=80=99d prefer installing it to $sysconfdir, similar to how we do it in Guix. That makes it easier for interested users to locate the right .service and to install it, right after they=E2=80=99ve done =E2=80=98guix = install cuirass=E2=80=99. WDYT? If that=E2=80=99s fine with you, I=E2=80=99ll happily push v2 on your behal= f! Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 08 10:25:21 2021 Received: (at 50326) by debbugs.gnu.org; 8 Sep 2021 14:25:21 +0000 Received: from localhost ([127.0.0.1]:33227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNyVt-00078L-8d for submit@debbugs.gnu.org; Wed, 08 Sep 2021 10:25:21 -0400 Received: from mx.kolabnow.com ([95.128.36.41]:31358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNyVm-00077s-IT for 50326@debbugs.gnu.org; Wed, 08 Sep 2021 10:25:20 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTP id A58DDB08; Wed, 8 Sep 2021 16:25:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1631111107; x=1632925508; bh=NJReM1gElqlH3mf0jnx87wfN47PprAVJcWu oOs266lo=; b=bEdl/2gGtftXSxKXGYCdOHZLsQhkpRf4T5OBlLL4KoPyaKv8tjv o4K0ZNzOkTeL/r8tXEpk1E5yf6NcBJZ5+OoJy63n9Ee4yVQ5EFkY5QFDhMMuLEi0 S9gDqegOJM6b8vfS0fa1Q17/WnKXDbqE5Z6vxATN3VDpDmmZ4N0pJ8GjrNhnwLuE S7t7SI+MdrxolZYx2mKL/yFjW0YvlVJwp7pwPN2Q7YjVXMn1hfRv4e1bi3OX4110 UlcPscRC5MfyqdVUYVYDEKHgqv4Ag5SAYLmdRWOXwTG6CjLh/k3/mJgLDvvpJfAv Z268BviXKYWuaPtEhmhNoyEqXInh/G+v+RU9amJ4Hjv8KH0RDbHJ2wnbYTrVHQU3 o2yBvtyMQeQcG7/1PZa/3Gf2pNiLszFb0bmUQQjxzaJNmhVEAYSt9ZemSpVtC/CQ Hs7H8LzSTamoPR6YGtayI7mn+5jjaYOtRTxd3leBlTopGLSv/Kj24Spqn2nDyKoC 0EvBKnFPZulYuZRTe3tlT85HZr6PdQpLgfeCdMrjy0NnA/whrU+ylmTJtuVIsW/C P8azuoFdesoOdFxo54l0X2ePNRnwOk/4bZjGi2RQjhncbfNEJyTmnT+7o+fUHCrG WW6eIoa/52meJuj5uhf9sWB9Kyn6f3qrY4Yxk1UnrUiOnsxDgx5ZWstA= X-Virus-Scanned: amavisd-new at mykolab.com X-Spam-Flag: NO X-Spam-Score: -1.899 X-Spam-Level: X-Spam-Status: No, score=-1.899 tagged_above=-10 required=5 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TmJlt_W-IIqr; Wed, 8 Sep 2021 16:25:07 +0200 (CEST) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 8BC5C82F; Wed, 8 Sep 2021 16:25:07 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx001.mykolab.com (Postfix) with ESMTPS id C4901BBD; Wed, 8 Sep 2021 16:25:05 +0200 (CEST) From: Thiago Jung Bauermann To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Subject: Re: bug#50326: [PATCH cuirass] Add systemd unit file for remote worker service. Date: Wed, 08 Sep 2021 11:24:58 -0300 Message-ID: <4496487.tbocOU4WJe@popigai> In-Reply-To: <87czpj2ml9.fsf@gnu.org> References: <20210901191443.59352-1-bauermann@kolabnow.com> <87czpj2ml9.fsf@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50326 Cc: 50326@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 Ludo! Em quarta-feira, 8 de setembro de 2021, =C3=A0s 11:01:06 -03, Ludovic Court= =C3=A8s=20 escreveu: > Hello! >=20 > Thiago Jung Bauermann skribis: > > * etc/cuirass-remote-worker.service.in: New file. > > * doc/cuirass.texi: Mention it. > > * .gitignore: Ignore it. > > * Makefile.am (noinst_SCRIPTS): Add > > =E2=80=98etc/cuirass-remote-worker.service=E2=80=99. > > (EXTRA_DIST): Likewise. > > (etc/cuirass-remote-worker.service): New target. > > * configure.ac: Check for =E2=80=98(guix config)=E2=80=99 module. > > Set =E2=80=98guix_localstatedir=E2=80=99 variable. > > --- > >=20 > > Hello, > >=20 > > This patch adds the systemd unit file I installed on guixp9. The > > configure script finds out Guix=E2=80=99s localstatedir and substitutes= it in > > etc/cuirass-remote-worker.service.in. The service file isn=E2=80=99t in= stalled > > anywhere and the user is supposed to get it from the build directory if > > they want to use it. > >=20 > > I did it this way because there=E2=80=99s no $PREFIX/doc/examples direc= tory > > or equivalent where it could be shipped, and I thought that it would > > be excessive to add it to all Cuirass installations considering that > > only a few of them would actually have a use for it. But I can send a > > v2 making this change if people think it would be better. >=20 > With this approach, the user has to get the source and configure it, > which is somewhat annoying. Yes, that is true. > I=E2=80=99d prefer installing it to $sysconfdir, similar to how we do it = in > Guix. That makes it easier for interested users to locate the right > .service and to install it, right after they=E2=80=99ve done =E2=80=98gui= x install > cuirass=E2=80=99. >=20 > WDYT? I think it=E2=80=99s a good idea. > If that=E2=80=99s fine with you, I=E2=80=99ll happily push v2 on your beh= alf! Of course! Feel free to do that. Thank you for the offer, and for reviewing= =20 this patch! =2D-=20 Thanks, Thiago From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 15 22:39:22 2021 Received: (at 50326) by debbugs.gnu.org; 16 Sep 2021 02:39:22 +0000 Received: from localhost ([127.0.0.1]:53541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQhJ0-0001mD-70 for submit@debbugs.gnu.org; Wed, 15 Sep 2021 22:39:22 -0400 Received: from mx.kolabnow.com ([95.128.36.41]:45098 helo=ext-mx-out001.mykolab.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQhIu-0001lw-Uf for 50326@debbugs.gnu.org; Wed, 15 Sep 2021 22:39:16 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTP id C295AE5D; Thu, 16 Sep 2021 04:39:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1631759944; x=1633574345; bh=c55vfKFfUa9+Di3Fjr6++/szHqfulJUVdiF CQRzB+GQ=; b=JMBy7XqwLz9Md9L6h//HRX1cwisQ6jMeEpHvD4Q1tp/eoay0wZk j0Y/vX1Gs5U0GQBzFQvWwt9vhrAPqlZ9dRe84/7Xykzdau9Zf1pRDZO9/81LK9xG 9KyeEDLaMiTmENJkNT+j33V3hTGeHtzAZKgJz83/0ZKnw8DRF1W8ht2TMoF2MJZ1 M+5iJ7OlUlCyIU9wZlvOQfCoegx4NesXbR81gzm00rkXAUkJQjt7ffixupbqTen1 yuc2YYCwSd+1q+dszdKedy1tctxjLdL39ZIQXW2kqKSiz/gXRguv/fCHDchSW9x6 ja9op0IF+pv5i07YZccM/OyPEAV90u9eyQq3iy2qJ92/p7edRu7Lh4mrtd2vYC0f eXWerXZ/k738OhyCpmLd06oGh+LoEPUo3Gox2TYMTPcuZhEzdKaTerKRzvInUe5/ TbURWcgUVAbV6uq+UNF4s+Fp/sQK62UwTgXe0uIfg2pWABc0I90KKssONp+Xb3qR wnNuycjSDda2mSRgboVLHDPEOKRLGgmcQvtzjjFZbJ+SK7bDa03WAO7XAJv6BUHL NgdKIxm6hj8bxGp5d8s0B5O1LnvPMRreJ3AzLyX7POf15mC6hZ9+5FSXSZ0DnG+T BH+8FngiSApJhHQO7P0H8xm46HAbdm4DQYa415mglhbRslE1OKiUGOQo= X-Virus-Scanned: amavisd-new at mykolab.com X-Spam-Flag: NO X-Spam-Score: -1.899 X-Spam-Level: X-Spam-Status: No, score=-1.899 tagged_above=-10 required=5 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Received: from ext-mx-out001.mykolab.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jU4v2befB8vy; Thu, 16 Sep 2021 04:39:04 +0200 (CEST) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 6DD5C364; Thu, 16 Sep 2021 04:39:04 +0200 (CEST) Received: from ext-subm001.mykolab.com (unknown [10.9.6.1]) by int-mx001.mykolab.com (Postfix) with ESMTPS id 0AE2764D; Thu, 16 Sep 2021 04:39:03 +0200 (CEST) From: Thiago Jung Bauermann To: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Subject: [PATCH cuirass v2] Add systemd unit file for remote worker service. Date: Wed, 15 Sep 2021 23:38:44 -0300 Message-Id: <20210916023844.77190-1-bauermann@kolabnow.com> In-Reply-To: <87czpj2ml9.fsf@gnu.org> References: <87czpj2ml9.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50326 Cc: 50326@debbugs.gnu.org, Thiago Jung Bauermann 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 (-) * etc/cuirass-remote-worker.service.in: New file. * doc/cuirass.texi (Build modes): Mention it. * .gitignore: Ignore it. * Makefile.am (systemdservicedir): New variable. (dist_systemdservice_DATA): Likewise. (EXTRA_DIST): Add ‘etc/cuirass-remote-worker.service’. (etc/cuirass-remote-worker.service): New target. * configure.ac: Check for ‘(guix config)’ module. Set and substitute ‘guix_localstatedir’ variable. --- Hello Ludo, I wanted to send the other patch with the new systemd files for ‘guix gc’ (issue 50610), so I took the opportunity to also work on this one. Em quarta-feira, 8 de setembro de 2021, às 11:01:06 -03, Ludovic Courtès escreveu: > I’d prefer installing it to $sysconfdir, similar to how we do it in > Guix. That makes it easier for interested users to locate the right > .service and to install it, right after they’ve done ‘guix install > cuirass’. Guix actually installs its systemd files in $libdir, so I did the same for Cuirass. Feel free to change the patch to install to another place if you prefer. Thanks, Thiago .gitignore | 1 + Makefile.am | 8 ++++++++ configure.ac | 4 ++++ doc/cuirass.texi | 13 +++++++++++++ etc/cuirass-remote-worker.service.in | 15 +++++++++++++++ 5 files changed, 41 insertions(+) create mode 100644 etc/cuirass-remote-worker.service.in diff --git a/.gitignore b/.gitignore index 95ed6cb3982c..0807874e9513 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ /config.cache /configure /doc/version.texi +/etc/cuirass-remote-worker.service /src/cuirass/config.scm /tests/cache Makefile diff --git a/Makefile.am b/Makefile.am index 1d754673f450..6cfa3d70e612 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,6 +45,7 @@ cssdir = $(staticdir)/css fontsdir = $(staticdir)/fonts imagesdir = $(staticdir)/images jsdir = $(staticdir)/js +systemdservicedir = $(libdir)/systemd/system dist_pkgmodule_DATA = \ src/cuirass/base.scm \ @@ -129,6 +130,9 @@ dist_js_DATA = \ src/static/js/jquery-3.3.1.min.js \ src/static/js/popper.min.js +dist_systemdservice_DATA = \ + etc/cuirass-remote-worker.service + TEST_EXTENSIONS = .scm .sh AM_TESTS_ENVIRONMENT = \ env GUILE_AUTO_COMPILE='0' \ @@ -188,6 +192,7 @@ EXTRA_DIST = \ bootstrap \ build-aux/guix.scm \ src/cuirass/config.scm.in \ + etc/cuirass-remote-worker.service.in \ $(TESTS) dist-hook: gen-ChangeLog @@ -247,6 +252,9 @@ $(bin_SCRIPTS): Makefile $(generate_file); chmod +x $@ src/cuirass/config.scm: $(srcdir)/src/cuirass/config.scm.in Makefile $(generate_file) +etc/cuirass-remote-worker.service: $(srcdir)/etc/cuirass-remote-worker.service.in \ + Makefile + $(generate_file) # Guile modules require 'src/cuirass/config.scm' to exist before their # compilation. diff --git a/configure.ac b/configure.ac index 479e93a1cb8e..af294c16d025 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,7 @@ GUILE_MODULE_REQUIRED([avahi]) GUILE_MODULE_REQUIRED([fibers]) GUILE_MODULE_REQUIRED([guix]) GUILE_MODULE_REQUIRED([guix git]) +GUILE_MODULE_REQUIRED([guix config]) GUILE_MODULE_REQUIRED([git]) GUILE_MODULE_REQUIRED([json]) GUILE_MODULE_REQUIRED([mailutils mailutils]) @@ -58,6 +59,9 @@ GUILE_MODULE_REQUIRED([zlib]) # We depend on new Guile-Git errors. GUILE_MODULE_REQUIRED_EXPORT([(git)], git-error-message) +guix_localstatedir="$($GUILE -c '(import (guix config)) (display %localstatedir)')" +AC_SUBST(guix_localstatedir) + AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in], [chmod +x pre-inst-env]) diff --git a/doc/cuirass.texi b/doc/cuirass.texi index 72b0b5b0913a..21d25569339a 100644 --- a/doc/cuirass.texi +++ b/doc/cuirass.texi @@ -463,6 +463,19 @@ The easiest way to setup such an infrastructure is to rely on the GNU Guix Cuirass services definitions (@pxref{Continuous Integration, Continuous Integration,, guix, Guix}). +Alternatively, there is a systemd service unit file installed at +@code{$CUIRASS_PREFIX/lib/systemd/system/cuirass-remote-worker.service} +to launch the @code{cuirass remote-worker} on systems which use +systemd. It can be installed and enabled as follows: + +@example +sudo install -o root -g root -m 644 \ + $CUIRASS_PREFIX/lib/systemd/system/cuirass-remote-worker.service \ + /etc/systemd/system +sudo systemctl enable cuirass-remote-worker.service +sudo systemctl start cuirass-remote-worker.service +@end example + @c ********************************************************************* @node Invocation @chapter Invocation diff --git a/etc/cuirass-remote-worker.service.in b/etc/cuirass-remote-worker.service.in new file mode 100644 index 000000000000..2c334d74804f --- /dev/null +++ b/etc/cuirass-remote-worker.service.in @@ -0,0 +1,15 @@ +# This is a "service unit file" for the systemd init system to launch +# 'cuirass remote-worker'. Drop it in /etc/systemd/system or similar +# to have 'cuirass remote-worker' automatically started. + +[Unit] +Description=Continuous integration remmote worker for GNU Guix + +[Service] +ExecStart=@guix_localstatedir@/guix/profiles/per-user/root/guix-profile/bin/cuirass \ + remote-worker --workers=2 --server=10.0.0.1:5555 +Environment= LC_ALL=en_US.UTF-8 \ + 'GUIX_LOCPATH=@guix_localstatedir@/guix/profiles/per-user/root/guix-profile/lib/locale' + +[Install] +WantedBy=multi-user.target From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 16 16:05:12 2021 Received: (at 50326-done) by debbugs.gnu.org; 16 Sep 2021 20:05:12 +0000 Received: from localhost ([127.0.0.1]:56688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQxdA-0005gK-8G for submit@debbugs.gnu.org; Thu, 16 Sep 2021 16:05:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQxd2-0005fN-Kw for 50326-done@debbugs.gnu.org; Thu, 16 Sep 2021 16:05:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34674) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQxcx-0007ln-7R; Thu, 16 Sep 2021 16:04:59 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35724 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQxcv-00088P-76; Thu, 16 Sep 2021 16:04:58 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Thiago Jung Bauermann Subject: Re: [PATCH cuirass v2] Add systemd unit file for remote worker service. References: <87czpj2ml9.fsf@gnu.org> <20210916023844.77190-1-bauermann@kolabnow.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 30 Fructidor an 229 de la =?utf-8?Q?R=C3=A9volution?= 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: Thu, 16 Sep 2021 22:04:55 +0200 In-Reply-To: <20210916023844.77190-1-bauermann@kolabnow.com> (Thiago Jung Bauermann's message of "Wed, 15 Sep 2021 23:38:44 -0300") Message-ID: <87lf3wz3q0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50326-done Cc: 50326-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: -3.3 (---) Hi Thiago, Thiago Jung Bauermann skribis: > * etc/cuirass-remote-worker.service.in: New file. > * doc/cuirass.texi (Build modes): Mention it. > * .gitignore: Ignore it. > * Makefile.am (systemdservicedir): New variable. > (dist_systemdservice_DATA): Likewise. > (EXTRA_DIST): Add =E2=80=98etc/cuirass-remote-worker.service=E2=80=99. > (etc/cuirass-remote-worker.service): New target. > * configure.ac: Check for =E2=80=98(guix config)=E2=80=99 module. > Set and substitute =E2=80=98guix_localstatedir=E2=80=99 variable. Applied, thanks! > Guix actually installs its systemd files in $libdir, so I did the same for > Cuirass. Feel free to change the patch to install to another place if you > prefer. $libdir is fine with me. Cheers, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 16 16:17:32 2021 Received: (at 50326-done) by debbugs.gnu.org; 16 Sep 2021 20:17:32 +0000 Received: from localhost ([127.0.0.1]:56698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQxp2-00062I-Kf for submit@debbugs.gnu.org; Thu, 16 Sep 2021 16:17:32 -0400 Received: from mx.kolabnow.com ([95.128.36.42]:61930 helo=ext-mx-out002.mykolab.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQxow-00061x-Uc for 50326-done@debbugs.gnu.org; Thu, 16 Sep 2021 16:17:27 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTP id A275B820; Thu, 16 Sep 2021 22:17:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1631823436; x=1633637837; bh=XXtJfHSAQm8u6xdNPwHynEnBO233/7NGrPZ cP+aeBrU=; b=KPWKjDwYSziQztrzmLJDDnoZUAetptKpex/13CvrvniydBBvWCH deWlrPp8QkRzkam3zRFM/B98xYLb5Nq6HazeCJVKmfs5xeCwxKMvAND6A1HEJhKf Q7DyWPOU7zRh3m39CxUl8VHDd2eQVmGS2X5ifqp7y3PtFnIbLHPeyguodKWDZRMK 6Su+QnS/OHJHsFyGMZBuvUuCzLy28uqs3wZlg3mzpE5FN6aF6G4WxUItEvpAkami tmILT+Ydxinx7WgaMIQhi7X9iClStUfiz4er5G1pkPdt2BUhoLR1k2DeCsL7n04L 7NSJdID4EKBnBwTvYrhj8bUjvQtkb8MwfVoZE3AIplq8JhcoyYxQxI5C5cisnyaP XuVvtIpyBFd7erRZMM/ZTOHg1VzNqV1/pyTRufD3Jeb2mNVxngx4CLicaprZecyb aeUgtANdCtNvH/PVS902xtfCQ6IyaTOGRiG7BCzV5YXbqByPbf4uyuK1r/VIJmaX xJ5J7zremlKX1zZHAPMcLerHZjWDBIcSpP+ky+v9A+KMsZVZfgyKovZEYPXDzl13 hJVbWWTmBGoBVn6hGSxPAk4y0KfCqr45zped0fL9XzkN4LPVGkvz0xd7gg9Nki5y HZJcJ9S86iQOrQJlfe+vpzIVlsCnqmYqoJGdAmlDXDtXKCFoBXYVAONM= X-Virus-Scanned: amavisd-new at mykolab.com X-Spam-Flag: NO X-Spam-Score: -1.899 X-Spam-Level: X-Spam-Status: No, score=-1.899 tagged_above=-10 required=5 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Received: from ext-mx-out002.mykolab.com ([127.0.0.1]) by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id e3YF51_Gfz-s; Thu, 16 Sep 2021 22:17:16 +0200 (CEST) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id 08C62614; Thu, 16 Sep 2021 22:17:16 +0200 (CEST) Received: from ext-subm002.mykolab.com (unknown [10.9.6.2]) by int-mx001.mykolab.com (Postfix) with ESMTPS id 62C9E5BA; Thu, 16 Sep 2021 22:17:14 +0200 (CEST) From: Thiago Jung Bauermann To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Subject: Re: [PATCH cuirass v2] Add systemd unit file for remote worker service. Date: Thu, 16 Sep 2021 17:17:06 -0300 Message-ID: <5133807.mT8A62iJFZ@popigai> In-Reply-To: <87lf3wz3q0.fsf@gnu.org> References: <87czpj2ml9.fsf@gnu.org> <20210916023844.77190-1-bauermann@kolabnow.com> <87lf3wz3q0.fsf@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50326-done Cc: 50326-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 Ludo, Em quinta-feira, 16 de setembro de 2021, =C3=A0s 17:04:55 -03, Ludovic Cour= t=C3=A8s=20 escreveu: > Hi Thiago, >=20 > Thiago Jung Bauermann skribis: > > * etc/cuirass-remote-worker.service.in: New file. > > * doc/cuirass.texi (Build modes): Mention it. > > * .gitignore: Ignore it. > > * Makefile.am (systemdservicedir): New variable. > > (dist_systemdservice_DATA): Likewise. > > (EXTRA_DIST): Add =E2=80=98etc/cuirass-remote-worker.service=E2=80=99. > > (etc/cuirass-remote-worker.service): New target. > > * configure.ac: Check for =E2=80=98(guix config)=E2=80=99 module. > > Set and substitute =E2=80=98guix_localstatedir=E2=80=99 variable. >=20 > Applied, thanks! >=20 > > Guix actually installs its systemd files in $libdir, so I did the same > > for Cuirass. Feel free to change the patch to install to another place > > if you prefer. >=20 > $libdir is fine with me. Thanks! =2D-=20 Thanks, Thiago From unknown Tue Jun 17 01:48:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 15 Oct 2021 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator