From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id mOJJBDFhd2WDMwEAkFu2QA (envelope-from ) for ; Mon, 11 Dec 2023 20:21:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id AIVSADFhd2W/WwAAqHPOHw (envelope-from ) for ; Mon, 11 Dec 2023 20:21:21 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1702322480; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=qRvaF8S6aCcerb6GTxTkJLpIlVbwhAau0baA9IgcZQU=; b=HrLVjAkm7hQz1ZQKv2UHhDewvcBw608laTi0BeOSD3sXWwQX5QAphxhaqWzzPiTdRbLPY8 fxCTGocjEf+zt/0OU5Hxl/V3IndodG3vgBzt7Iw9cqLnAFOPhHWsvIDkmKL7QYOLvfL4U0 xRYEtsEoyGG4cVEXXEJ7ZNHw0+MxsXAVs44LeZYtPSvylL6Yg5WBMnrrj8aRNgoA9JRCSe cWz941ghZ/IDDPrRnEMQJ/gniS+Odk8xyqV4BphSB/fRzRFqrAXS8uAgG2BFnaN4nms7BJ PAO4ZC843IRl52RLKttX1UpOUhihbGOsHgtRH+/Oey9bT3jAqt9ew6BcVZeQyA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702322480; a=rsa-sha256; cv=none; b=qsSvV7SrfEOphGfygLmJ4vWaLExYhmwk2qixB6oZOya5LI8bSxieIaXdgkaxcCdcguXOEz JWn9XFqEdU0K0QMP/VWnL7BGT8tlMC9S0PnydqLgi/zNO9ZtAxClTMXFCpnd1OA6ps0SsX MbwQtiUUOQ1ziR/ltKWytRJs8p0qGlyekG7QBqnxcirKLdGsiO/FIQNWCQZovBb/x/rfvN LvZdlngiT5eBrBbYiWv/QfaN38EC4GUQSBn56xmAWSm0LxsE9F7bhMlNv4I1KxAirPkeHL Olwpx6gdnd+ZfRPDwbg1H70CYOO27PdptH6JnLObxKK1fc14uoUt03t7jDu8jA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 84D345DE5D for ; Mon, 11 Dec 2023 20:21:20 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rClph-0001Wq-JZ; Mon, 11 Dec 2023 14:20:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rClpf-0001Wi-SV for guix-patches@gnu.org; Mon, 11 Dec 2023 14:20:47 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rClpf-0007Bu-Kf for guix-patches@gnu.org; Mon, 11 Dec 2023 14:20:47 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rClpu-00088d-1w for guix-patches@gnu.org; Mon, 11 Dec 2023 14:21:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61740] [PATCH v4] services: Add rspamd-service-type. (was [bug#61740] [PATCH v3] services: Add rspamd-service-type.) Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 11 Dec 2023 19:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61740 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: moreinfo patch To: Saku Laesvuori Cc: Thomas Ieong , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Felix Lechner , 61740@debbugs.gnu.org Received: via spool by 61740-submit@debbugs.gnu.org id=B61740.170232240831210 (code B ref 61740); Mon, 11 Dec 2023 19:21:02 +0000 Received: (at 61740) by debbugs.gnu.org; 11 Dec 2023 19:20:08 +0000 Received: from localhost ([127.0.0.1]:54665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rClp2-00087K-8Z for submit@debbugs.gnu.org; Mon, 11 Dec 2023 14:20:08 -0500 Received: from smtpmciv1.myservices.hosting ([185.26.107.237]:34370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rClov-00086m-Aw for 61740@debbugs.gnu.org; Mon, 11 Dec 2023 14:20:07 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv1.myservices.hosting (Postfix) with ESMTP id E783220CC6; Mon, 11 Dec 2023 20:19:43 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 4168C80095; Mon, 11 Dec 2023 20:19:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id mBvvahDoex9F; Mon, 11 Dec 2023 20:19:39 +0100 (CET) Received: from [192.168.1.116] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 7675780067; Mon, 11 Dec 2023 20:19:39 +0100 (CET) Message-ID: Date: Mon, 11 Dec 2023 19:19:38 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Bruno Victal References: <87sf7fqi3x.fsf@lease-up.com> <4xf4fec5gensjq534b7iyxpxlfg4foinwyls3mvwigubs3vagj@sujka7hlplro> Content-Language: en-US In-Reply-To: <4xf4fec5gensjq534b7iyxpxlfg4foinwyls3mvwigubs3vagj@sujka7hlplro> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------88T2wO5LZuLoHNkUGT2FVh82" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.27 X-Spam-Score: -8.27 X-Migadu-Queue-Id: 84D345DE5D X-Migadu-Scanner: mx12.migadu.com X-TUID: 2eDqe8q7fTSu This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------88T2wO5LZuLoHNkUGT2FVh82 Content-Type: multipart/mixed; boundary="------------IEbkRgHoBQlJxFJTmRaSzV0g"; protected-headers="v1" From: Bruno Victal To: Saku Laesvuori Cc: Thomas Ieong , =?UTF-8?Q?Ludovic_Court=C3=A8s?= , Felix Lechner , 61740@debbugs.gnu.org Message-ID: Subject: Re: [bug#61740] [PATCH v4] services: Add rspamd-service-type. (was [bug#61740] [PATCH v3] services: Add rspamd-service-type.) References: <87sf7fqi3x.fsf@lease-up.com> <4xf4fec5gensjq534b7iyxpxlfg4foinwyls3mvwigubs3vagj@sujka7hlplro> In-Reply-To: <4xf4fec5gensjq534b7iyxpxlfg4foinwyls3mvwigubs3vagj@sujka7hlplro> --------------IEbkRgHoBQlJxFJTmRaSzV0g Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Saku, On 2023-12-08 08:17, Saku Laesvuori wrote: > On Wed, Dec 06, 2023 at 02:58:19PM +0000, Bruno Victal wrote: >> On 2023-09-16 21:10, Saku Laesvuori wrote: >>> + "--var" (string-append "LOCAL_CONFDIR=3D= " #$local-confdir) >> >> Curiously I don't see this listed in the 'rspamd' manpage although >> it is on the 'rspamadm' one. Can you confirm whether this works >> and if so, report to upstream that their docs are missing this? >=20 > It does work; I've used it since before I submitted this patch. The > `--var` option is listed on `rspamd --help`. Unfortunately, Rspamd > tracks their issues on Github and I'd prefer not registering an account= > there. Forwarded with [1]. >>> + (service-extension profile-service-type >>> + (compose list rspamd-configuration-package))= >> >> What's the motivation for adding the rspamd package to the profile? >=20 > That was also there when I picked up this patch. I assume it is added t= o > the profile so that the `rspamadm` and `rspamc` programs are available > and compatible with the daemon. I don't have strong feelings about this= > in either direction. I think it's better to omit this, users who are interested in the tools can use 'guix shell rspamd'. > +(define (list-of-symbols? x) > + (and (list? x) > + (every symbol? x))) list-of-symbols? is already defined in (gnu services configuration), you can omit this. > + (shepherd-action > + (name 'reopenlog) > + (documentation "Reopen log files.") Missed this in my previous reply, I'd prefer naming this action as 'reopen instead. > +(define %rspamd-os > + (simple-operating-system > + (service dhcp-client-service-type) [=E2=80=A6] > + (service rspamd-service-type > + (rspamd-configuration > + (shepherd-requirements '(networking)) > + (local.d-files `(("worker-controller.inc" > + ,(plain-file > + "rspamd-public-web-controller.conf"= > + "bind_socket =3D \"0.0.0.0:11334\";= ")))))))) I wonder if you could remove dhcp-client-service-type and use the loopback device for this test instead, by binding to '[::1]' or '127.0.0.= 1'. (You don't need to add %loopback-static-networking here since it is alrea= dy included in %base-services.) > +(define (run-rspamd-test) > + "Return a test of an OS running Rspamd service." > + > + (define rspamd-ports > + '((22668 . 11334))) ;; web controller [=E2=80=A6] > + > + (define vm > + (virtual-machine > + (operating-system (marionette-operating-system > + %rspamd-os > + #:imported-modules '((gnu services herd)))) > + (port-forwardings rspamd-ports))) [=E2=80=A6] > + ;; Check that we can access the web ui > + > + (test-equal "http-get" > + 200 > + (response-code (http-get "http://localhost:22668/"))) ; HE= AD is unsupported Actually I've realized that these port-forwards are unnecessary and it would be better to instead do: --8<---------------cut here---------------start------------->8--- ;; Note: remove (web client) and (web response) in the imports above ;; i.e. after the #~(begin (use-modules =E2=80=A6 (test-equal "http-get" 200 (marionette-eval '(begin (use-modules (web client) (web response)) (response-code (http-head "http://localhost:11334/"))) marionette)) --8<---------------cut here---------------end--------------->8--- [1]: --=20 Furthermore, I consider that nonfree software must be eradicated. Cheers, Bruno. --------------IEbkRgHoBQlJxFJTmRaSzV0g-- --------------88T2wO5LZuLoHNkUGT2FVh82 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQTAPCseV0HOaN0YFheobOGDL+spVQUCZXdgygAKCRCobOGDL+sp VQXcAQDIEX5vu6RzZrHpxrOy9MPkh1BLg5xkfXm8pj2kfuR7/QEArqJ8UnYysHHo tVn0C1yDXHuGZijrJ9pMwyFOrsWZMQQ= =WwOB -----END PGP SIGNATURE----- --------------88T2wO5LZuLoHNkUGT2FVh82--