From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 0EleLQbNJGcddQEA62LTzQ:P1 (envelope-from ) for ; Fri, 01 Nov 2024 12:43:50 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 0EleLQbNJGcddQEA62LTzQ (envelope-from ) for ; Fri, 01 Nov 2024 13:43:50 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=k2i7TU4J; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="egEEn/Bl"; 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=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730465024; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=qf0r4HKyASTY+q1TBGBbLe6SylysIGgn1w+gMN9zG4o=; b=F3WndEOJqFTX+z2DNCzABDHENAbDOkE2vUxFO31a94cAezmU4lvLHaIGPVX8vLDLEBqKa3 kdaBuZRwORTc2QG1Cabw224Z+gwVU/ALo2B0uOu4K8f8zaAWuk/pJ6u+4mLBIRSrwyaMnx hCrZ/wXOqlJDCG1ys49tXC5KxhBk5I6pLcwyMfap4N0XIIDCR7uZZw0n35eLLgjJIwiHZP 0mE+isjOFR60WHzUgskL41ZtOkSqlSuJlVE6RtVQf4jVzI0e/AXAUssY98i2iCRfdwuB2v PGqDfej7G9lX1wNQ5hBme88u5qyLUq+SjAQtg79s/M/CsNV0oOathoiXrKszgQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730465024; a=rsa-sha256; cv=none; b=gbTeulEhepmN0DmbBNNedhMobgBFAXZ8EfvmT9FSguF3TitA7tpaam/3tU9Z7G2iXbXnCs 9rJ+lL/8yOlxavey0CIx1ymbkpn2NISzkQvnIwr879fp6o63khX7pRAmubiy8HpUEAV4mY oMNm3zeDzlf/qRD3Cg0PMy8zCGVT03m5OaiStYfaLHvE0+isz+o3ZQEh9vbt5mZ6Prt+QF fg2slour5GPXrYlpeOhnemYGqO8/jbYMYbIrvZsTBLwQr+GC2OCeEicFpiOjsNyGiBWS8Q 494Jx14cuPGWeeG4SNzW4F8y6/nTxk88joeG4NPjj9VcXttE2eBI/4ovpRpnCA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=k2i7TU4J; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="egEEn/Bl"; 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=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=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 3EFAC54CC for ; Fri, 01 Nov 2024 13:43:44 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6qzZ-0007fU-JB; Fri, 01 Nov 2024 08:43:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6qzY-0007f3-HD for guix-patches@gnu.org; Fri, 01 Nov 2024 08:43:04 -0400 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 1t6qzX-0000R9-RW; Fri, 01 Nov 2024 08:43:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=qf0r4HKyASTY+q1TBGBbLe6SylysIGgn1w+gMN9zG4o=; b=k2i7TU4J9QD3Xpdnak/4TYg8o2MbhRjFsHP1AMfpHka5W2RMVTADMGvoMfNNQ1M6D9Sm3V2phjWyxQvdNVcTQ4+0KPSNL8Pb5C5jlEYUqF5MNV6G4zx2URyZRDZ1P7urJxCq/HJYdDH5DsxVY/SmidD8CVUW70v1JADoOStkP/wPjv6eK5ZhJjd3ciAoLwNm86rE5qFA6EPCkhrKWJMQBelQETRR/MI90eDXG1sGQKvhifewzy+1tP7BUwf625N6N5o1YdA2G7Wd47HEwaguJ+xMnE7GyPJjjWYOaHINqfBHTIDBykUAY0ZqkpHmB23bq7CaSc2yL4FxftVeOmyGRA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t6qzX-0007vI-Kx; Fri, 01 Nov 2024 08:43:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#74151] [PATCH v2 2/9] services: anonip: Add 'debug?' configuration field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, ludo@gnu.org, guix-patches@gnu.org Resent-Date: Fri, 01 Nov 2024 12:43:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74151 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74151@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer , Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Maxim Cournoyer , Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 74151-submit@debbugs.gnu.org id=B74151.173046493730343 (code B ref 74151); Fri, 01 Nov 2024 12:43:03 +0000 Received: (at 74151) by debbugs.gnu.org; 1 Nov 2024 12:42:17 +0000 Received: from localhost ([127.0.0.1]:49209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6qym-0007tJ-A0 for submit@debbugs.gnu.org; Fri, 01 Nov 2024 08:42:17 -0400 Received: from mail-pj1-f47.google.com ([209.85.216.47]:59642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6qye-0007so-PV for 74151@debbugs.gnu.org; Fri, 01 Nov 2024 08:42:12 -0400 Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-2e30116efc9so1503246a91.2 for <74151@debbugs.gnu.org>; Fri, 01 Nov 2024 05:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730464868; x=1731069668; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qf0r4HKyASTY+q1TBGBbLe6SylysIGgn1w+gMN9zG4o=; b=egEEn/BlrYDUlOvMe9KVnQoUScRplFHikhkn8IKrO6Qw9Zpi1cCslLumX2dMHRFFey qV1VPL1ODfkJElrbXwRTackYLev3fQKMwbvKz3b9KrdM+3vIhip6BK0v2FLZ3LP1MK1H bVljD+JqjYVpRpQeBy5fIxwyio5dC59aUf6Mq7jPzVriifmJuAin7ZfJ3p7jVJhRbdTd oeS3bztCt02uLTsxu4NyfEL5P1BAtgxaFIjfwndEqAc7iIg+jnHGDHRQ3a12WxjuIUtt xa9nLRLsOd7n/GKrIyCMGdVNWcVIl0H4RMKWRC+8jbThtpFBeBUlgaPJmjMoIeqFWVVP l25w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730464868; x=1731069668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qf0r4HKyASTY+q1TBGBbLe6SylysIGgn1w+gMN9zG4o=; b=ImgVp7bIZDb6mAVs/1arBiTv8Obp0g3x+h8JOMC/T5ym4Z796Cw/zEmWs5MnRcEgOi yaAUTlWH0uKs1WqyKrXII2eV3VwD3x8uxSWLA58BIpo6tjTXeDt9H7/aWXhyVXNfPAAe p5ciL47kn9izv2DiK4OsCCASOBZ2WeWwG9MjI9OMqC7DoVXlv/BKlaXozeLuLbK4Cp3X dq3/pQNv0k+N6MUgwCwa33bEDeXiEB+O2ccQcXJF4jnrJfR81W22GSOKUJeIPyqp5bqM Dnvk0SDtrRGHNP0K3XpBDtTwIAm1t4l6aJtCUlFsqUNyR6eQp93FT3KYplOI8tS4no5F EOkA== X-Gm-Message-State: AOJu0YwwMPf6hZVTdwNYFPbmMsdFfWjMYeIoysqJyo4cHSa0m7rekDNs 2xBx8Qg9LF6VCUl2aIQBKRJYLjNFsN7sl/3ftJPmbFuR30z8p4THslKPauIu X-Google-Smtp-Source: AGHT+IGNon5hw67Fa//1UTyfgMCJi8yFph8Q1n9ELTZ6zTItG6ILZrYhkVI4Cs1SDwab7M0vgI1npA== X-Received: by 2002:a17:90a:f0d6:b0:2e2:b8d7:4bd1 with SMTP id 98e67ed59e1d1-2e8f10a6f4fmr26932307a91.30.1730464867574; Fri, 01 Nov 2024 05:41:07 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e92fa0ea9bsm4819463a91.10.2024.11.01.05.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2024 05:41:07 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 1 Nov 2024 21:39:22 +0900 Message-ID: <12708a075e13fc3acfb4f2685d561fd9ee481b87.1730464675.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <281a4773768a6c271ff464f473fdbc333a58c348.1730464675.git.maxim.cournoyer@gmail.com> References: <281a4773768a6c271ff464f473fdbc333a58c348.1730464675.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: 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: 2.18 X-Spam-Score: 2.18 X-Migadu-Queue-Id: 3EFAC54CC X-Migadu-Scanner: mx13.migadu.com X-TUID: cjz2uofRxxDS * gnu/services/web.scm () [debug?]: New field. (anonip-shepherd-service): Honor it. * doc/guix.texi (Log Rotation) : Document it. Change-Id: Iaf57b5992808374b069a55c34a9adfdfe52b046c --- doc/guix.texi | 3 +++ gnu/services/web.scm | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index b519b483fe..51a543d690 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20789,6 +20789,9 @@ Log Rotation The following optional settings may be provided: @table @code +@item debug? +Print debug messages when @code{#true}. + @item skip-private? When @code{#true} do not mask addresses in private ranges. diff --git a/gnu/services/web.scm b/gnu/services/web.scm index cc6f4e6d9b..cf3515bf70 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -220,6 +220,7 @@ (define-module (gnu services web) anonip-configuration-anonip anonip-configuration-input anonip-configuration-output + anonip-configuration-debug? anonip-configuration-skip-private? anonip-configuration-column anonip-configuration-replacement @@ -1448,6 +1449,8 @@ (define-record-type* (default anonip)) (input anonip-configuration-input) ;string (output anonip-configuration-output) ;string + (debug? anonip-configuration-debug? ;boolean + (default #f)) (skip-private? anonip-configuration-skip-private? ;boolean (default #f)) (column anonip-configuration-column ;number @@ -1503,14 +1506,15 @@ (define (anonip-shepherd-service config) "/bin/anonip") (string-append "--input=" #$input) (string-append "--output=" #$output)) + (if #$(anonip-configuration-debug? config) + '("--debug") (list)) (if #$(anonip-configuration-skip-private? config) '("--skip-private") (list)) '#$(optional anonip-configuration-column "--column") '#$(optional anonip-configuration-ipv4mask "--ipv4mask") '#$(optional anonip-configuration-ipv6mask "--ipv6mask") '#$(optional anonip-configuration-increment "--increment") - '#$(optional anonip-configuration-replacement - "--replacement") + '#$(optional anonip-configuration-replacement "--replacement") '#$(optional anonip-configuration-delimiter "--delimiter") '#$(optional anonip-configuration-regex "--regex")) ;; Run in a UTF-8 locale -- 2.46.0