From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yDYzKAifOWLXEAAAgWs5BA (envelope-from ) for ; Tue, 22 Mar 2022 11:03:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 8ONGIQifOWJTYQAAG6o9tA (envelope-from ) for ; Tue, 22 Mar 2022 11:03:52 +0100 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 E7B2612ADA for ; Tue, 22 Mar 2022 11:03:51 +0100 (CET) Received: from localhost ([::1]:53702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWbMl-000358-3v for larch@yhetil.org; Tue, 22 Mar 2022 06:03:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWbLy-00025o-Hx for guix-patches@gnu.org; Tue, 22 Mar 2022 06:03:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45332) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nWbLx-0004iR-Qe for guix-patches@gnu.org; Tue, 22 Mar 2022 06:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nWbLx-0005sR-IH for guix-patches@gnu.org; Tue, 22 Mar 2022 06:03:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54352] [PATCH] services: dnsmasq: Add more options. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 22 Mar 2022 10:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54352 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Remco van 't Veer Cc: 54352@debbugs.gnu.org, Maxime Devos Received: via spool by 54352-submit@debbugs.gnu.org id=B54352.164794337022574 (code B ref 54352); Tue, 22 Mar 2022 10:03:01 +0000 Received: (at 54352) by debbugs.gnu.org; 22 Mar 2022 10:02:50 +0000 Received: from localhost ([127.0.0.1]:39229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWbLm-0005s2-0L for submit@debbugs.gnu.org; Tue, 22 Mar 2022 06:02:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWbLh-0005rj-7K for 54352@debbugs.gnu.org; Tue, 22 Mar 2022 06:02:48 -0400 Received: from [2001:470:142:3::e] (port=33622 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWbLY-0004fr-Um; Tue, 22 Mar 2022 06:02:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=fOBYOAfozZ79k+J9BqeDTpLyWBPvLUgHzKWXs1yVzhM=; b=R6Uy9H7UgX0JJ4+3gDyF U/lumKGY7NMBVAQo8djNnC10hIa2yY9LtxYFIWCvzXea0LP0ZocjE3Sh9siaUIw/NHtKLj0Sp6/j6 izQMlWaiMw03dxK9AmBbG2UVB559vyLmqa69QEvDJKVMtMR29SSed99d5k9oXKza/R/A7YE712VA4 eKfk+PRWxCsKYLwf4nirJGoirqyu0+RvHCfe8T1klqPxgBLLqzby5naQUQTPd6EXgVkh/vAA1bFn2 LwZgkLbFjZf+o8fViYbO6/AD7gDCEKcPW9JsphcyON+4rEhySGwKbOhoZj1Oliltj9sQwja2PYhrR aCEIvFQ9+X3Btw==; Received: from [193.50.110.177] (port=51484 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWbLT-0005f3-FI; Tue, 22 Mar 2022 06:02:35 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220312154813.5538-1-remco@remworks.net> <20220320114405.4702-1-remco@remworks.net> <8735jbjpoj.fsf_-_@gnu.org> <2287729e13ea8689713cefe61e28abba9e817308.camel@telenet.be> <8735jabfqh.fsf@remworks.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 2 Germinal an 230 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: Tue, 22 Mar 2022 11:02:29 +0100 In-Reply-To: <8735jabfqh.fsf@remworks.net> (Remco van t. Veer's message of "Tue, 22 Mar 2022 08:36:54 +0100") Message-ID: <87mthii9u2.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-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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647943432; 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: 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=fOBYOAfozZ79k+J9BqeDTpLyWBPvLUgHzKWXs1yVzhM=; b=oh1gnLMbqZaIgJmSag9wVcBMbOwVJcETYPf0Mx8qh5Zmi+Vos4T3dEghk8RmvkXuUkbDJb aUNzSRQLRKWNHkFgl/bByyPtsB4lHWqNlS7uFDnpOYt68cNqSqXdH25ih8F89C+D4WejZf np/zQc8IuJ5FZGWwFdAATWTlRXuA0QTU6+Qh+CAMzskhuO0RVgn0JqTh8FIPr6dLZdJZjY EGyIQEYw+E7CJEIVYyDAioQotYcZg4+Qin54utaYXoRx5ZSKhmglM21ixHclHm1PiOwysq kyd/4ly8MZJzKSP/+ciocteW/t5HwbKHYb9FWXXjg29IuGGD/5H61Ut2QRYwKg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647943432; a=rsa-sha256; cv=none; b=hHWE12am7aXZtB5T7RPFS3d3IWfLilFnGP66FwR3i7R0gPSssl4bm/sZu1qjvQN9BnFY5W GvpocpvD1LyB+RtHIllDJhDUH5nDWe9hXfi8WLDeFb6dZaZ5Sq0ZlxI9dG/5LMWahote+O ZFj0nogCAy65W9keFhssvMIn18WiHgLstPnP2blOYtDfAv6q9D010ZMpb+PfcVLr9D0UNX R5lrDEJpkTR8EqrwsDes3IA4WMYNoSAERfUYfOetwirkaRrL8TPYmSgp6fjwqBwmT4L3vv gOxAjR6qQI9+dPli86WDEEAFy0W13EqrmJNfOiSIWY7x7fGoulinGPoyxIHqNA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=R6Uy9H7U; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -3.81 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=R6Uy9H7U; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: E7B2612ADA X-Spam-Score: -3.81 X-Migadu-Scanner: scn1.migadu.com X-TUID: H2JE/BwFYKZL Hi, Remco van 't Veer skribis: > 2022/03/21 19:36, Maxime Devos: > >> [[PGP Signed Part:Undecided]] >> Ludovic Court=C3=A8s schreef op ma 21-03-2022 om 16:22 [+0100]: >>> I think this suggestion is beyond the scope of this review: we=E2=80=99= ve never >>> used sanitizers like this before (or almost), and this particular piece >>> of code doesn=E2=80=99t use them. >>> >>> Also, with the recent discussion about the introduction of contracts, >>> I=E2=80=99d rather wait an use contracts everywhere once they=E2=80=99r= e available. >> >> Seems reasonable to me, given that the specifics weren't discussed yet, >> although _everywhere_ (for all procedures, records, ...) seems a bit >> much, unless you meant every field of the dnsmasq record. Sorry, I wasn=E2=80=99t clear. I mean, when we have contracts in Guix, we = can start using them =E2=80=9Ceverywhere=E2=80=9D in Guix, primarily for config= uration records. But we=E2=80=99re not there yet and how exactly we=E2=80=99ll get= there remains to be seen. > I can add something like the following: > > (define (assert-boolean value) > (unless (false-if-exception (boolean? value)) > (error-out (format #f "expected a boolean, got: ~s" value))) > value) > > and use it to do > > (sanitize assert-boolean) My suggestion is to just do nothing for the dnsmasq record; just leave a comment about the expected type next to it and in the manual, as is done for almost every other configuration record. Eventually we=E2=80=99ll turn that into contracts with good error reporting= , I hope, but that=E2=80=99s not something you can do right now. :-) Thanks! Ludo=E2=80=99.