From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id kJ04A9p/JGeeOgEAe85BDQ:P1 (envelope-from ) for ; Fri, 01 Nov 2024 07:14:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id kJ04A9p/JGeeOgEAe85BDQ (envelope-from ) for ; Fri, 01 Nov 2024 08:14:34 +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=ds70EhUr; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=NRcA7giO; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730445274; a=rsa-sha256; cv=none; b=Tp/4E+xIdu9vFtW0vAHw3S5bJs+W7Q6CyVMka+UO9K3ZLKjZV5BAp0FkLh606cnuTBNoFX Ez+M8XvhuYS2IEAv0IRchWqKCiMQkVvx2SUx6rd/DPj5PWodyA3iinuumnPWeQjPbSfy20 Id6FcGgDnZH5cDhh4KQrkwqM9AWyiV3z/ur5Ju08sZrlkrUkb7jmxRdI6kzb+gnyBIV9AG FNEXeRANxSxzrjZ4x5bqN3xf6tF00i1j7RgyjOCKIBXxr+eVH9qruJ/QsWtLExWllW4BYu S2OyuzodUz/Gq67TkVGnwHa/4pzP7LnKQzWZHOw0alkq1ynoxPj2uMhLxAqIzA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=ds70EhUr; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=NRcA7giO; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730445274; 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=KW0q27zQSbK6pSTVSMomMJ1SWeIsUiCfCj6LECvYrUAp9VnXI15puMcoodhx4urGLFz187 AY7pn4j6Q3rsKFVbI/ucqKpSsSXL85SWCm6R1M31zsizEm7+psWS1HCo5i+X5aFDTUZ2Uw rYDzs5haf4i+Rs1FHTjHtNboumdcTc0fgynmkTkuTWmDxWGm5yK5fzxu9ohAM1ZB/qsMP2 nDtlC4t4pibaEQ3Arf5pwJDja56933CaBbHVp2KF/e2B9CP4EbHrZqtxDNiJDXJDQN1Ib5 ncyJBvpUzM8WuUyHypS8Y03/y37yQwTcWOgJXacHTcr7j7vgLK9M+wGSZjLDZQ== 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 7A5327BEC2 for ; Fri, 01 Nov 2024 08:14:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6lrE-0004LC-4z; Fri, 01 Nov 2024 03:14:08 -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 1t6lrA-0004KJ-Bn for guix-patches@gnu.org; Fri, 01 Nov 2024 03:14: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 1t6lr9-0001C3-0u; Fri, 01 Nov 2024 03:14: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=ds70EhUrG7MRRNHjYJkfBAs/LICz5N3pcVQHb3nVlSBGPXBSbtGiSXl+dS9SUPU1Ma89hgrvQUxyoq14z0OggiPTb0rykkQCB3fyzoxH/J5QSCH27yciaYanWKJqq0onqY7lWDONSOqog1cg7foBw/XpBaujj3qsnxbynH417nED+PNWlZ6kF2rl7xZtUp10yFfwYdgNB7H3bCBNUt90DgupbmiimZ5GKT8Mt4Vvr37ZTJf65kNz9i/PKIYUDnS4nolVUMrvNVSMm6It8qhOGa8hlh/pYnwAOrLehrGb97XjC3PCHcaMlTXNw22wzjxzIjl0AnOP8Rqdmpsk8fXKjw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t6lr8-0005Kk-Qk; Fri, 01 Nov 2024 03:14:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#74151] [PATCH 2/7] 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 07:14:02 +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.173044520220402 (code B ref 74151); Fri, 01 Nov 2024 07:14:02 +0000 Received: (at 74151) by debbugs.gnu.org; 1 Nov 2024 07:13:22 +0000 Received: from localhost ([127.0.0.1]:47331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6lqT-0005J0-Jk for submit@debbugs.gnu.org; Fri, 01 Nov 2024 03:13:21 -0400 Received: from mail-qt1-f170.google.com ([209.85.160.170]:61873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6lqR-0005IZ-Sq for 74151@debbugs.gnu.org; Fri, 01 Nov 2024 03:13:20 -0400 Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-4609967ab7eso10812491cf.3 for <74151@debbugs.gnu.org>; Fri, 01 Nov 2024 00:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730445134; x=1731049934; 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=NRcA7giOQoFVw9/K85wfYEN3lbPWTyv+YoOcEw0JDG4MiaG06fICZq1IZ5m4TRDa08 hW4sP3r9h5FMdV0/ZQ96pgz/L/cS0er3FdAKeSj095Sy+F1QAGSTaSmY7dSei28ygPYB hTVinHaLv1NPFk0SCSAieyw0wqujXF9//0JFWZy/LzoIfB2itaSaZQUmSlJIvDcnEbFY mGajvb8HvDHmsCD6ccSBFE9fXPBxO2R3GNgL0TKTLA0SiSiAnzT7BCqCK8VtI2e6hK24 Pf0prFyGhdoNqC9F4ZxTOFbq47VJIuyyBIOrfqo0p1dsxDFVmiVUYq5SyyLzxXqC2H05 T9Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730445134; x=1731049934; 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=VqdMau4ilc0RAV0s7o/p3jQ8+wi4ItlRr5O5lzl7bhVoQSNYyaKJouJjQhureamGuX wvaK9pPyxVNv+qG14w8r2A4ty42lT1agTLzLbz8N7xrZstKGJ9vdlbeC+1nlJvr+Zc7R 2spNFjqQcM5ute5Srg3f86FKrfjtWu/c4v7pLK2LSjHK+KOEoiVTN5Ag4XhqaPh/Gy+H K7dQKKLPIME6hShpUQFkM1xpGTSQ7mgYVkSoYuzW/ihNm2+pShTyGnH5APuaDulcpB9A alsSQ74CZuNNXY88BL5f652fWtp4FcrSmdHXmlZZEmJxtlFbwVABTRcirfM+hPFb88Dj ym1A== X-Gm-Message-State: AOJu0YzVFFbtzyT1bz8numbHE3EgywVzoUfuN5z51SMAHuc8I5ZBHF8C wz3HMaeh/2Dx6Ya4SpaSB8UCMpiHmnGpVSTb5xKaTEExKKIShPF5HCjEc4gt X-Google-Smtp-Source: AGHT+IFochRSRltEQUSgWPUE6ynNryQ/3XyREzqkKI9Dh/6FtN2TEhA4ohUwgKUCqvOJFWCn3gYn7Q== X-Received: by 2002:ac8:549:0:b0:461:43d4:fca3 with SMTP id d75a77b69052e-46143d4fd32mr241920171cf.24.1730445133986; Fri, 01 Nov 2024 00:12:13 -0700 (PDT) Received: from localhost.localdomain (vps-6234970c.vps.ovh.ca. [51.222.13.224]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-462ad1a0f59sm15646821cf.81.2024.11.01.00.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2024 00:12:12 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 1 Nov 2024 16:11:38 +0900 Message-ID: <12708a075e13fc3acfb4f2685d561fd9ee481b87.1730441684.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 1.43 X-Spam-Score: 1.43 X-Migadu-Queue-Id: 7A5327BEC2 X-Migadu-Scanner: mx10.migadu.com X-TUID: pLifS/JD7WFs * 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