Sergey Trofimov <sarg@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 61956) by debbugs.gnu.org; 13 Mar 2023 13:17:52 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 13 09:17:52 2023 Received: from localhost ([127.0.0.1]:33890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pbi3j-0004Ej-L6 for submit <at> debbugs.gnu.org; Mon, 13 Mar 2023 09:17:51 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:37189) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <andrew@HIDDEN>) id 1pbi3g-0004ER-J1 for 61956 <at> debbugs.gnu.org; Mon, 13 Mar 2023 09:17:49 -0400 Received: (Authenticated sender: andrew@HIDDEN) by mail.gandi.net (Postfix) with ESMTPSA id 783651C0009; Mon, 13 Mar 2023 13:17:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1678713462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/PW8ZoZKoxNkHhmHk9/xfOunthGXIXRE53W6Z7ifGKM=; b=hD3FNzma9EaCnNwSOkyrMK3zqyeeE1yOeBQOsFOUMJoVbGDulHXUqVgJYL9cBUtuBknfJc CqAzs3qvbh7BAg7s4/JLtSz/QmOwlpWeK8GYcBt53eNO0U4tRobxnJPQ+4xmm3uSLcDxwy aMtDDkEJ3nZl6oPP63oVK39u/OKf1aQiJsW25Cp8g8Pca6cTIikD2fVw82G57V2vEBJK6S Q7LiXGLSXb7j5gjwxsQW0/c/hM9egP32ZuApiPZydQPTbqpP7cREScRb1vhNGr0m36Siwx 1YUWuhId/RnAYdEO3B32kgt3SnegZcivHZwdrwgX4w1jlDYJ0nqrA+yNKI3rZg== From: Andrew Tropin <andrew@HIDDEN> To: Sergey Trofimov <sarg@HIDDEN>, 61956 <at> debbugs.gnu.org Subject: Re: [bug#61956] [PATCH v5] services: dns: Extend dnsmasq-configuration. In-Reply-To: <20230310150055.3728-1-sarg@HIDDEN> References: <20230304082719.29479-1-sarg@HIDDEN> <20230310150055.3728-1-sarg@HIDDEN> Date: Mon, 13 Mar 2023 17:17:35 +0400 Message-ID: <871qlsbxjk.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 61956 Cc: Sergey Trofimov <sarg@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2023-03-10 16:00, Sergey Trofimov wrote: > * gnu/service/dns.scm: (<dnsmasq-configuration>)[servers-file]: Add. > (<dnsmasq-configuration>)[tftp-secure?]: Fix typo in parameter name. > * doc/guix.texi: Document (<dnsmasq-configuration>)[servers-file]. > --- > doc/guix.texi | 4 ++++ > gnu/services/dns.scm | 11 ++++++++--- > 2 files changed, 12 insertions(+), 3 deletions(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index 6671ba9305..debff95466 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -31502,6 +31502,10 @@ in @var{servers}. > @item @code{servers} (default: @code{'()}) > Specify IP address of upstream servers directly. >=20=20 > +@item @code{servers-file} (default: @code{#f}) > +Specify file containing upstream servers. This file is re-read when dnsm= asq receives SIGHUP. > +Could be either a string or a file-like object. > + > @item @code{addresses} (default: @code{'()}) > For each entry, specify an IP address to return for any host in the > given domains. Queries in the domains are never forwarded and always > diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm > index 32fb8c0664..aaa2b6e47f 100644 > --- a/gnu/services/dns.scm > +++ b/gnu/services/dns.scm > @@ -754,6 +754,8 @@ (define-record-type* <dnsmasq-configuration> > (default #f)) ;boolean > (servers dnsmasq-configuration-servers > (default '())) ;list of string > + (servers-file dnsmasq-configuration-servers-file > + (default #f)) ;string|file-like > (addresses dnsmasq-configuration-addresses > (default '())) ;list of string > (cache-size dnsmasq-configuration-cache-size > @@ -792,7 +794,7 @@ (define (dnsmasq-shepherd-service config) > port local-service? listen-addresses > resolv-file no-resolv? > forward-private-reverse-lookup? query-servers-in-order? > - servers addresses > + servers addresses servers-file > cache-size negative-cache? > cpe-id > tftp-enable? tftp-no-fail? > @@ -805,7 +807,7 @@ (define (dnsmasq-shepherd-service config) > (requirement '(networking)) > (documentation "Run the dnsmasq DNS server.") > (start #~(make-forkexec-constructor > - '(#$(file-append package "/sbin/dnsmasq") > + (list #$(file-append package "/sbin/dnsmasq") > "--keep-in-foreground" > "--pid-file=3D/run/dnsmasq.pid" > #$@(if no-hosts? > @@ -827,6 +829,9 @@ (define (dnsmasq-shepherd-service config) > #$@(if query-servers-in-order? > '("--strict-order") > '()) > + #$@(if servers-file > + (list #~(string-append "--servers-file=3D" #$serv= ers-file)) > + '()) > #$@(map (cut format #f "--server=3D~a" <>) > servers) > #$@(map (cut format #f "--address=3D~a" <>) > @@ -848,7 +853,7 @@ (define (dnsmasq-shepherd-service config) > '("--tftp-single-port") > '()) > #$@(if tftp-secure? > - '("--tftp-secure?") > + '("--tftp-secure") > '()) > #$@(if tftp-max > (list (format #f "--tftp-max=3D~a" tftp-max)) Hi Sergey! Thank you for the patch, applied, realigned make-forkexec-constructor arguments, pushed as d1edb26388ca4dab4b435a686cd059d97c113c3e. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmQPIm8ACgkQIgjSCVjB 3rAqMg/+Na/LQ8zuvs4T2J8cDRSurMxa60RbAspbERXE90k4L3+W7TEL/+0BwSdx FhsghX+Z7cohSFnWd+vUO3aww7m8rnu9h+d2rGlOj18cMxUAO6PFLZeYss8SVIk8 eaxTjPxidjKwCtwTd7+6ZOLGkf2E14wK5DeaTBzyu2H7t1/+EflFTEqaW2A39F+Y 6P/FPGMJpWsJlwu2VcvfQ3tEfKFOglQNHwZDQ9AHABCe/OOX9Q7e/PQvQ8vkVzrS ZyTAerzlAGxE47RNNouZs9hh98o45OFKZux8FgODsseLH5FxKVXWw3lVLuvY5odD wPxrt1HViKiCB/jsFrRv8Sy3wRJ5aEyrL/NR0VJco7YcnL2rrdEeQPU2zfPzUd7W QZGoYrsn8Lb8FKpZ4JV7TtY6e53BaQyYXMXg60AsktM5B8TTAkcS4YY9k76uRC/C 7LUcoAJZ1EiV3/BD0BWHLsumCXxICZjGyrnpCoKAblet67LdbNIgy+D8QHw2XxtA aXg/095KMqwTd7t8nIJwuN3M9yzo8wRJJ032H2PBwlo877/XfckdpvHg3gMwF6SG e/JzMzIc/LYJakaEn3O7uDregi20lxfIfYWVq3/hwqr4Qdy4bGewUkJLKD6Nue+T qhmLKxRo7EpiND5ubxYQpV/N8JHC3L6cfw1IodKAh6GCEt2ymh0= =zvzI -----END PGP SIGNATURE----- --=-=-=--
guix-patches@HIDDEN
:bug#61956
; Package guix-patches
.
Full text available.Received: (at 61956) by debbugs.gnu.org; 10 Mar 2023 15:01:54 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 10 10:01:54 2023 Received: from localhost ([127.0.0.1]:55518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1paeFm-0004ls-G6 for submit <at> debbugs.gnu.org; Fri, 10 Mar 2023 10:01:54 -0500 Received: from mail-ed1-f49.google.com ([209.85.208.49]:46743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1paeFj-0004ld-GH for 61956 <at> debbugs.gnu.org; Fri, 10 Mar 2023 10:01:52 -0500 Received: by mail-ed1-f49.google.com with SMTP id k10so21491585edk.13 for <61956 <at> debbugs.gnu.org>; Fri, 10 Mar 2023 07:01:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1678460505; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=NxgJ2cpLOskgFtbRC0Zwsp2gI0l/aJfNByLz531Az8c=; b=Vmof+ZzsuL59+9H7i9ZZtTAY9IiVQwhTX7Tc3jWg0MlJ1+J+YoBhlePBTaVxdKefMI jcX1+bqdEW3n7TLrfR5aXyl1dtsm6K9bFpgpee0vfSFGUq4cvVvJC46mYVDK/6HyDi7V +MUSiJkSDblbjVAdr1BVfhzVNgZu3jwjdBlik= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678460505; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NxgJ2cpLOskgFtbRC0Zwsp2gI0l/aJfNByLz531Az8c=; b=zI0Uw50PAastWiYAyQoMKb7rPGf5ZBu0TN3ZVOvGWof6TtErv2BEcvlayLsqDRC00J Eii5M4iDqNhtaQP/dr1Oa5QwZbcj+/1JtBJRKvez+BUrCL2569odHvF24it4DkZ15VxV u+kdmphkPYONg0Oh3MRDmmoh0pJOWNZd7y7gVxUGuW4yl40x3etUkKq7SoxMv0p3vGTZ /Ls05Jp4Y5BDwKFv6mYZXjc280NOW28ZzBl751NiZIadpdp5AnhAvUKv7D5gLU3FeO+9 HRt4mwvbZrOHUG05xNDL9ChvEXDlbEAIQovdFX9U7Wdd4VS+xYKyX5SmxjuEEuhURcjD UAIQ== X-Gm-Message-State: AO0yUKVPlVOJBsdVrcOwLJtHqVlTWhFsLccwdnAP+1q+mWXC+O5vYiSA MZoeBgoHP7vBbFygjAZ7/MJ6Pe0DG1ONFsdoaScsrg== X-Google-Smtp-Source: AK7set+x5WmAFSbxfu6l/07kEJJsxNCmukFRCBrH8kalgt36QSE6ul1kkcfQbir1IIS+S+vde/IfbA== X-Received: by 2002:a17:906:5fd7:b0:8e7:672f:23c0 with SMTP id k23-20020a1709065fd700b008e7672f23c0mr2395428ejv.33.1678460504874; Fri, 10 Mar 2023 07:01:44 -0800 (PST) Received: from localhost ([95.168.145.203]) by smtp.gmail.com with ESMTPSA id m9-20020a170906720900b008b133f9b33dsm1036557ejk.169.2023.03.10.07.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 07:01:44 -0800 (PST) From: Sergey Trofimov <sarg@HIDDEN> To: 61956 <at> debbugs.gnu.org Subject: [PATCH v5] services: dns: Extend dnsmasq-configuration. Date: Fri, 10 Mar 2023 16:00:56 +0100 Message-Id: <20230310150055.3728-1-sarg@HIDDEN> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61956 Cc: Sergey Trofimov <sarg@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * gnu/service/dns.scm: (<dnsmasq-configuration>)[servers-file]: Add. (<dnsmasq-configuration>)[tftp-secure?]: Fix typo in parameter name. * doc/guix.texi: Document (<dnsmasq-configuration>)[servers-file]. --- doc/guix.texi | 4 ++++ gnu/services/dns.scm | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 6671ba9305..debff95466 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -31502,6 +31502,10 @@ in @var{servers}. @item @code{servers} (default: @code{'()}) Specify IP address of upstream servers directly. +@item @code{servers-file} (default: @code{#f}) +Specify file containing upstream servers. This file is re-read when dnsmasq receives SIGHUP. +Could be either a string or a file-like object. + @item @code{addresses} (default: @code{'()}) For each entry, specify an IP address to return for any host in the given domains. Queries in the domains are never forwarded and always diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm index 32fb8c0664..aaa2b6e47f 100644 --- a/gnu/services/dns.scm +++ b/gnu/services/dns.scm @@ -754,6 +754,8 @@ (define-record-type* <dnsmasq-configuration> (default #f)) ;boolean (servers dnsmasq-configuration-servers (default '())) ;list of string + (servers-file dnsmasq-configuration-servers-file + (default #f)) ;string|file-like (addresses dnsmasq-configuration-addresses (default '())) ;list of string (cache-size dnsmasq-configuration-cache-size @@ -792,7 +794,7 @@ (define (dnsmasq-shepherd-service config) port local-service? listen-addresses resolv-file no-resolv? forward-private-reverse-lookup? query-servers-in-order? - servers addresses + servers addresses servers-file cache-size negative-cache? cpe-id tftp-enable? tftp-no-fail? @@ -805,7 +807,7 @@ (define (dnsmasq-shepherd-service config) (requirement '(networking)) (documentation "Run the dnsmasq DNS server.") (start #~(make-forkexec-constructor - '(#$(file-append package "/sbin/dnsmasq") + (list #$(file-append package "/sbin/dnsmasq") "--keep-in-foreground" "--pid-file=/run/dnsmasq.pid" #$@(if no-hosts? @@ -827,6 +829,9 @@ (define (dnsmasq-shepherd-service config) #$@(if query-servers-in-order? '("--strict-order") '()) + #$@(if servers-file + (list #~(string-append "--servers-file=" #$servers-file)) + '()) #$@(map (cut format #f "--server=~a" <>) servers) #$@(map (cut format #f "--address=~a" <>) @@ -848,7 +853,7 @@ (define (dnsmasq-shepherd-service config) '("--tftp-single-port") '()) #$@(if tftp-secure? - '("--tftp-secure?") + '("--tftp-secure") '()) #$@(if tftp-max (list (format #f "--tftp-max=~a" tftp-max)) -- 2.39.2
guix-patches@HIDDEN
:bug#61956
; Package guix-patches
.
Full text available.Received: (at 61956) by debbugs.gnu.org; 10 Mar 2023 13:35:47 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 10 08:35:47 2023 Received: from localhost ([127.0.0.1]:54084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pacuQ-0001sj-LS for submit <at> debbugs.gnu.org; Fri, 10 Mar 2023 08:35:46 -0500 Received: from mail-ed1-f43.google.com ([209.85.208.43]:43933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1pacuN-0001sT-4Q for 61956 <at> debbugs.gnu.org; Fri, 10 Mar 2023 08:35:45 -0500 Received: by mail-ed1-f43.google.com with SMTP id x3so20432502edb.10 for <61956 <at> debbugs.gnu.org>; Fri, 10 Mar 2023 05:35:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1678455337; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=hL/J5PzLhwzXz9dLYRKFINwyGUNgAACNiXMokjzd/jw=; b=J9HTW8QLt5Z27PtwLxYRL2FTyW62R7Ua/QlaJm9J37WXYXuURfPz7KnfoNezS4KhcB c5nD47BiSSj76RNrVjLAoy7vLuwQJmr7Xuh7DpdF37+M9BaWif3kMHE7dvkKJ1v1IfOJ ipelIj0F0c6V+qQLzqS632K+PR5bF1kEVuk1U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678455337; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hL/J5PzLhwzXz9dLYRKFINwyGUNgAACNiXMokjzd/jw=; b=iQAhpv9buXL2co40wD5a4pIQhyMTiDvoZT84C72/SORLY4/nRcWvZRU3ojWvr08icd 3zomNREAP2mrApLTaPWJHuAPVNUj53RE9r/odOshRFP6QvEgk9E+MSFO61owGu6+gWpB InbBfNtTDjvC6QwmwRLlyogrQw8zs3kCZrAwhu4dn2WViAsqxwcDBISyYVePk7r5ayr+ wbrleHvR+LWZZC4Exy78oeps6CEqGhBrxIr/CkHTArNRUaFQzuKR0tILY3G1YvapFikF pwiE2+7vuEwvvrrfdQ6QVaD2HS3WRv+imfBwDlm3DAH7WLBnIN0rcXXOyRuekZ8MuTbt tq9Q== X-Gm-Message-State: AO0yUKXIxSCGLyDN0zqheV2CVeqANMtqK3LoZtujvDd1J7Lq23E+Z/Rd 6Nl7hiBI2o6OpqEKBEsE3P4oDlwMvSXTtqFp+Gtjsw== X-Google-Smtp-Source: AK7set/0PXE8UC8DuRk4yhb73f+XQDAqhkt/jIBoBOC36aUpkyJgSW3x1owCUuvBhcQOz4GxJkdZsw== X-Received: by 2002:a17:906:4f94:b0:87b:d400:e1df with SMTP id o20-20020a1709064f9400b0087bd400e1dfmr25346388eju.72.1678455336952; Fri, 10 Mar 2023 05:35:36 -0800 (PST) Received: from localhost ([95.168.145.203]) by smtp.gmail.com with ESMTPSA id x24-20020a1709064bd800b008d269233bd4sm946895ejv.204.2023.03.10.05.35.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 05:35:36 -0800 (PST) From: Sergey Trofimov <sarg@HIDDEN> To: 61956 <at> debbugs.gnu.org Subject: [PATCH v4] services: dns: Extend dnsmasq-configuration. Date: Fri, 10 Mar 2023 14:33:09 +0100 Message-Id: <20230310133308.13048-1-sarg@HIDDEN> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61956 Cc: Sergey Trofimov <sarg@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * gnu/service/dns.scm: (<dnsmasq-configuration>)[servers-file]: Add. (<dnsmasq-configuration>)[tftp-secure?]: Fix typo in parameter name. * doc/guix.texi: Document (<dnsmasq-configuration>)[servers-file]. --- doc/guix.texi | 4 ++++ gnu/services/dns.scm | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 6671ba9305..debff95466 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -31502,6 +31502,10 @@ in @var{servers}. @item @code{servers} (default: @code{'()}) Specify IP address of upstream servers directly. +@item @code{servers-file} (default: @code{#f}) +Specify file containing upstream servers. This file is re-read when dnsmasq receives SIGHUP. +Could be either a string or a file-like object. + @item @code{addresses} (default: @code{'()}) For each entry, specify an IP address to return for any host in the given domains. Queries in the domains are never forwarded and always diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm index 32fb8c0664..21af2b2611 100644 --- a/gnu/services/dns.scm +++ b/gnu/services/dns.scm @@ -754,6 +754,8 @@ (define-record-type* <dnsmasq-configuration> (default #f)) ;boolean (servers dnsmasq-configuration-servers (default '())) ;list of string + (servers-file dnsmasq-configuration-servers-file + (default #f)) ;string|file-like (addresses dnsmasq-configuration-addresses (default '())) ;list of string (cache-size dnsmasq-configuration-cache-size @@ -792,7 +794,7 @@ (define (dnsmasq-shepherd-service config) port local-service? listen-addresses resolv-file no-resolv? forward-private-reverse-lookup? query-servers-in-order? - servers addresses + servers addresses servers-file cache-size negative-cache? cpe-id tftp-enable? tftp-no-fail? @@ -805,7 +807,7 @@ (define (dnsmasq-shepherd-service config) (requirement '(networking)) (documentation "Run the dnsmasq DNS server.") (start #~(make-forkexec-constructor - '(#$(file-append package "/sbin/dnsmasq") + `(#$(file-append package "/sbin/dnsmasq") "--keep-in-foreground" "--pid-file=/run/dnsmasq.pid" #$@(if no-hosts? @@ -827,6 +829,9 @@ (define (dnsmasq-shepherd-service config) #$@(if query-servers-in-order? '("--strict-order") '()) + ,@(if #$servers-file + (list (string-append "--servers-file=" #$servers-file)) + '()) #$@(map (cut format #f "--server=~a" <>) servers) #$@(map (cut format #f "--address=~a" <>) @@ -848,7 +853,7 @@ (define (dnsmasq-shepherd-service config) '("--tftp-single-port") '()) #$@(if tftp-secure? - '("--tftp-secure?") + '("--tftp-secure") '()) #$@(if tftp-max (list (format #f "--tftp-max=~a" tftp-max)) -- 2.39.2
guix-patches@HIDDEN
:bug#61956
; Package guix-patches
.
Full text available.Received: (at 61956) by debbugs.gnu.org; 10 Mar 2023 08:52:40 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 10 03:52:40 2023 Received: from localhost ([127.0.0.1]:53667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1paYUS-00084i-76 for submit <at> debbugs.gnu.org; Fri, 10 Mar 2023 03:52:40 -0500 Received: from mail-ed1-f43.google.com ([209.85.208.43]:44866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1paYUO-00084U-RO for 61956 <at> debbugs.gnu.org; Fri, 10 Mar 2023 03:52:37 -0500 Received: by mail-ed1-f43.google.com with SMTP id ay14so17441260edb.11 for <61956 <at> debbugs.gnu.org>; Fri, 10 Mar 2023 00:52:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1678438351; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=4egtgVUUWun8OtZUK2Vt3enmJMSJYe4UDTC7Z2ZPkrQ=; b=Ybijpe3CMvieT1SLs613l+1RBNYoHDljW6ZoVLj+gb9Yvs/7/LN/+7l5OOPb99KGEs GsI7CkN3AFIId34rB67nN/mJWcyp5fcj7gFmUa5L3NrlbFCvMo3WIzZtIRhCxShp3Vtz U98T5sTQ0TeDiVcmCu+SuThLaaMYt9z0FpsOA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678438351; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4egtgVUUWun8OtZUK2Vt3enmJMSJYe4UDTC7Z2ZPkrQ=; b=oNY+ZJ+omcQKAWxpfSdz0M6u4RXir+vclx17zpHvEXAe5N4im+RYZo1y5+ujF3PoiP wRPbN1Ct2k0s3pArJ+bNtu2ClsOFXEZFaO30M8K16apeB/JxXCJCn4EvxFx82zEXYBVV hgMGk+0Hwu2nPnqVk5A6xOgZFdtXeLcX+ajSZ+WP4PySi6QxAK+oTTWKjv84DXhvtfQX yClpYgLHoSYMFu7QlPFazPABwtYXFO0K1CQUspoFAKxmGShAyr3moKIRM2h2Dhi2LCy0 cnsTerrxp4+tVmgxW782Ngeg06gU+Ryius4XhxCASrqMPMz63pCBafMrkej8vvRNNZnK KF+g== X-Gm-Message-State: AO0yUKUMQxivwzju+L1hMqmow4byH212t1JvsQf5p/SeGWXVq3Ehtb1s P6BfMYft6HfxXry/2p/eAtuezRMM0txwkpSOlLBJZg== X-Google-Smtp-Source: AK7set/QwCnoqTk7dDbO6dmnTahoZaUJIyrvxxIWNwWVKOLxocrFAkKFFwFWYl/u37zWwNXHBMmJNw== X-Received: by 2002:a17:907:a2cf:b0:884:c45f:1c04 with SMTP id re15-20020a170907a2cf00b00884c45f1c04mr25726925ejc.2.1678438350908; Fri, 10 Mar 2023 00:52:30 -0800 (PST) Received: from localhost ([95.168.145.203]) by smtp.gmail.com with ESMTPSA id c12-20020a50f60c000000b004acbdf23cd2sm554761edn.29.2023.03.10.00.52.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 00:52:30 -0800 (PST) References: <20230304082719.29479-1-sarg@HIDDEN> <20230304084030.32117-1-sarg@HIDDEN> <87ilf9cb5p.fsf@HIDDEN> User-agent: mu4e 1.8.13; emacs 29.0.60 From: Sergey Trofimov <sarg@HIDDEN> To: 61956 <at> debbugs.gnu.org Subject: Re: [bug#61956] [PATCH v2] services: dns: Extend dnsmasq-configuration. Date: Fri, 10 Mar 2023 09:38:05 +0100 In-reply-to: <87ilf9cb5p.fsf@HIDDEN> Message-ID: <87356d2dju.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61956 Cc: Andrew Tropin <andrew@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Andrew Tropin <andrew@HIDDEN> writes: > [[PGP Signed Part:Undecided]] > On 2023-03-04 09:40, Sergey Trofimov wrote: > > Hi Sergey! > > Thank you for the patch, please add information to the commit > message > body. Here is an example: > https://git.savannah.gnu.org/cgit/guix.git/commit/?id=8390b47c04 > I have pushed v3 with a proper description. >> (servers dnsmasq-configuration-servers >> (default '())) ;list of string >> + (servers-file dnsmasq-configuration-servers-file >> + (default #f)) ;string > > I would expect it to be a file-like rather than string, so we > are sure > that the configuration file is present. WDYT? > Hmm, my use-case is to generate this file in dhclient's hook, so that dnsmasq knows the domain supplied with the DHCP configuration. Here is how I do that: 1. Define the hook which updates dnsmasq.servers and sends HUP to the daemon (define dhclient-enter-hooks " make_resolv_conf() { touch /etc/dnsmasq.servers sed -i '/#dhcp/,+1d' /etc/dnsmasq.servers cat <<EOF >>/etc/dnsmasq.servers #dhcp server=/${new_domain_name}/${new_domain_name_servers} EOF kill -HUP $(cat /run/dnsmasq.pid) } ") 2. Register the file in operating-system -> services (extra-special-file "/etc/dhclient-enter-hooks" (plain-file "dhclient-enter-hooks" dhclient-enter-hooks)) 3. Add dnsmasq option (servers-file "/etc/dnsmasq.servers") Do you think making `servers-file` either string or file-like would be a way to go?
guix-patches@HIDDEN
:bug#61956
; Package guix-patches
.
Full text available.Received: (at 61956) by debbugs.gnu.org; 10 Mar 2023 08:36:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 10 03:36:30 2023 Received: from localhost ([127.0.0.1]:53654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1paYEo-0007dD-2o for submit <at> debbugs.gnu.org; Fri, 10 Mar 2023 03:36:30 -0500 Received: from mail-ed1-f52.google.com ([209.85.208.52]:36777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1paYEl-0007cy-Gg for 61956 <at> debbugs.gnu.org; Fri, 10 Mar 2023 03:36:28 -0500 Received: by mail-ed1-f52.google.com with SMTP id da10so17441997edb.3 for <61956 <at> debbugs.gnu.org>; Fri, 10 Mar 2023 00:36:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1678437381; 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=xXMd9WXN+zysi1OGio2CKqXfIuGn8zL/QdpXwVEWMiY=; b=jPhdR0SEVMFDefmWa4AOdPLR7wjBWt1yc+3U9dsMG1XQ1hSB2ZQ9qVnNj1CkLbE6tG eGSENKHSPfHFXGrguf7kWwpDpznbEC0uKLaLp8NjZzxogBLmdcE4yelAWKddjwnecUzp GmpVObmbl+Y/cQ07S7NyprY5Hjp3dg5JW/e7E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678437381; 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=xXMd9WXN+zysi1OGio2CKqXfIuGn8zL/QdpXwVEWMiY=; b=LkrU13eUU9FPMyYPMRpL7eyBugPjirqVZNsfzLTA7ucfADuGRKOLbQ7QpTHS53jMXC BuqK1VuTZkLmgSmi57ydFGJ72OZv6NOu/6AuI3T4C715KJkFB3lJkG3OukSMXSbizm5c 5Vx86VKDUEeWNQeya+uK2GzrQ+v1bulqaYTibyD93g8t7aROzJnUBNSXQkNKJWnie0OQ z7m0vXI9AM5Tqfwl+cSftf4b00cj1unQeRY4UorwoBCaKQKCyfMJIwR5jVPou+BPuCPr TTgEPQ/euustdRkWh0BJNzWdsHdHQNIoRw+WKP9kDpqCwaSAh5Qf6lBXpXdXWJxrW/V/ Ahdw== X-Gm-Message-State: AO0yUKXdCGMr3By/2r2VWJJ8K+dFu8nTL50L5TML9DRDAElKZqv20G+O N2TrKpEaJFWBQJcbxmgEqE+JHBC2+MR0K3Y6wWSoZA== X-Google-Smtp-Source: AK7set8jBJ+gNSLM0zxICY6XvPm5yKkK3b819GQlRycHUocCHPb4tbtq/xalrIoKLl2oSQ7fML2VUw== X-Received: by 2002:a17:906:4a5a:b0:87b:bbdc:468 with SMTP id a26-20020a1709064a5a00b0087bbbdc0468mr23613765ejv.70.1678437381028; Fri, 10 Mar 2023 00:36:21 -0800 (PST) Received: from localhost ([95.168.145.203]) by smtp.gmail.com with ESMTPSA id g18-20020a50d0d2000000b004e7ffb7db11sm531012edf.76.2023.03.10.00.36.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 00:36:20 -0800 (PST) From: Sergey Trofimov <sarg@HIDDEN> To: 61956 <at> debbugs.gnu.org Subject: [PATCH v3] services: dns: Extend dnsmasq-configuration. Date: Fri, 10 Mar 2023 09:36:13 +0100 Message-Id: <20230310083612.12020-1-sarg@HIDDEN> X-Mailer: git-send-email 2.39.2 In-Reply-To: <87ilf9cb5p.fsf@HIDDEN> References: <87ilf9cb5p.fsf@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61956 Cc: Sergey Trofimov <sarg@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * gnu/service/dns.scm: (<dnsmasq-configuration>)[servers-file]: Add. * doc/guix.texi: Document (<dnsmasq-configuration>)[servers-file]. --- doc/guix.texi | 3 +++ gnu/services/dns.scm | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 6671ba9305..f62af051ab 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -31502,6 +31502,9 @@ in @var{servers}. @item @code{servers} (default: @code{'()}) Specify IP address of upstream servers directly. +@item @code{servers-file} (default: @code{#f}) +Specify file containing upstream servers. This file is re-read when dnsmasq receives SIGHUP. + @item @code{addresses} (default: @code{'()}) For each entry, specify an IP address to return for any host in the given domains. Queries in the domains are never forwarded and always diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm index 32fb8c0664..7ff34babdc 100644 --- a/gnu/services/dns.scm +++ b/gnu/services/dns.scm @@ -754,6 +754,8 @@ (define-record-type* <dnsmasq-configuration> (default #f)) ;boolean (servers dnsmasq-configuration-servers (default '())) ;list of string + (servers-file dnsmasq-configuration-servers-file + (default #f)) ;string (addresses dnsmasq-configuration-addresses (default '())) ;list of string (cache-size dnsmasq-configuration-cache-size @@ -792,7 +794,7 @@ (define (dnsmasq-shepherd-service config) port local-service? listen-addresses resolv-file no-resolv? forward-private-reverse-lookup? query-servers-in-order? - servers addresses + servers addresses servers-file cache-size negative-cache? cpe-id tftp-enable? tftp-no-fail? @@ -827,6 +829,9 @@ (define (dnsmasq-shepherd-service config) #$@(if query-servers-in-order? '("--strict-order") '()) + #$@(if servers-file + (list (format #f "--servers-file=~a" servers-file)) + '()) #$@(map (cut format #f "--server=~a" <>) servers) #$@(map (cut format #f "--address=~a" <>) @@ -848,7 +853,7 @@ (define (dnsmasq-shepherd-service config) '("--tftp-single-port") '()) #$@(if tftp-secure? - '("--tftp-secure?") + '("--tftp-secure") '()) #$@(if tftp-max (list (format #f "--tftp-max=~a" tftp-max)) -- 2.39.2
guix-patches@HIDDEN
:bug#61956
; Package guix-patches
.
Full text available.Received: (at 61956) by debbugs.gnu.org; 10 Mar 2023 07:34:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 10 02:34:42 2023 Received: from localhost ([127.0.0.1]:53572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1paXGz-00064R-Qq for submit <at> debbugs.gnu.org; Fri, 10 Mar 2023 02:34:42 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:56895) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <andrew@HIDDEN>) id 1paXGx-00064D-R9 for 61956 <at> debbugs.gnu.org; Fri, 10 Mar 2023 02:34:41 -0500 Received: (Authenticated sender: andrew@HIDDEN) by mail.gandi.net (Postfix) with ESMTPSA id 5A609C0009; Fri, 10 Mar 2023 07:34:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1678433673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=enKXeGPBAjYgXU+u5a+4txNrNuT8WzEZRE+ttOsWT6k=; b=ptbLoYWiyz4JvtwZPPQIWZ4z0dOWRa9LoWe8iDmzg7okcpBzgTVAfy3iu3lC0LswrCQ+xL 33vDnJAvk1SV/HJcEBeu89R4X9glPEQW0nLZ8h6N4+79lMoLVPo4saeJK48H3jwQlDA1/T OuJynwaYLqU9FixoQ5mAuPDzxAVhixgc9l20JpP3Q0fgV3bY/VbC1gUmrdRAMNB/Iadrd9 DhWOEyzfdXG16/rZyY2nWqByvWKE2rGnKPtecSifTgTbeS3W/AdFyKCCVNT30P18dk5SSR cm6wyp4RJcdq6sgmcmKnAm8iHcAhkW4NsT+aQ6sh0Mk4y7+LyQNqDwHt7vIQlw== From: Andrew Tropin <andrew@HIDDEN> To: Sergey Trofimov <sarg@HIDDEN>, 61956 <at> debbugs.gnu.org Subject: Re: [bug#61956] [PATCH v2] services: dns: Extend dnsmasq-configuration. In-Reply-To: <20230304084030.32117-1-sarg@HIDDEN> References: <20230304082719.29479-1-sarg@HIDDEN> <20230304084030.32117-1-sarg@HIDDEN> Date: Fri, 10 Mar 2023 11:34:26 +0400 Message-ID: <87ilf9cb5p.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 61956 Cc: Sergey Trofimov <sarg@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2023-03-04 09:40, Sergey Trofimov wrote: Hi Sergey! Thank you for the patch, please add information to the commit message body. Here is an example: https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D8390b47c04 > --- > doc/guix.texi | 3 +++ > gnu/services/dns.scm | 9 +++++++-- > 2 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index 74658dbc86..ca66041d12 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -31502,6 +31502,9 @@ in @var{servers}. > @item @code{servers} (default: @code{'()}) > Specify IP address of upstream servers directly. >=20=20 > +@item @code{servers-file} (default: @code{#f}) > +Specify file containing upstream servers. This file is re-read when dnsm= asq receives SIGHUP. > + > @item @code{addresses} (default: @code{'()}) > For each entry, specify an IP address to return for any host in the > given domains. Queries in the domains are never forwarded and always > diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm > index 50753b7ab6..3a6a005fb7 100644 > --- a/gnu/services/dns.scm > +++ b/gnu/services/dns.scm > @@ -754,6 +754,8 @@ (define-record-type* <dnsmasq-configuration> > (default #f)) ;boolean > (servers dnsmasq-configuration-servers > (default '())) ;list of string > + (servers-file dnsmasq-configuration-servers-file > + (default #f)) ;string I would expect it to be a file-like rather than string, so we are sure that the configuration file is present. WDYT? > (addresses dnsmasq-configuration-addresses > (default '())) ;list of string > (cache-size dnsmasq-configuration-cache-size > @@ -792,7 +794,7 @@ (define (dnsmasq-shepherd-service config) > port local-service? listen-addresses > resolv-file no-resolv? > forward-private-reverse-lookup? query-servers-in-order? > - servers addresses > + servers addresses servers-file > cache-size negative-cache? > cpe-id > tftp-enable? tftp-no-fail? > @@ -827,6 +829,9 @@ (define (dnsmasq-shepherd-service config) > #$@(if query-servers-in-order? > '("--strict-order") > '()) > + #$@(if servers-file > + (list (format #f "--servers-file=3D~a" servers-f= ile)) > + '()) > #$@(map (cut format #f "--server=3D~a" <>) > servers) > #$@(map (cut format #f "--address=3D~a" <>) > @@ -848,7 +853,7 @@ (define (dnsmasq-shepherd-service config) > '("--tftp-single-port") > '()) > #$@(if tftp-secure? > - '("--tftp-secure?") > + '("--tftp-secure") > '()) > #$@(if tftp-max > (list (format #f "--tftp-max=3D~a" tftp-max)) =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmQK3YIACgkQIgjSCVjB 3rC1MA//UsnTdFiLJbFAyCFkdahq3m3f4HMU48Icd0n8IAJYA4s5LJuSHOUbebqQ MV9o5btLpWNVS8BfRCpy/8L7vLNSZXyLI7gbeoTBCzgKzTqq00kgbGL5Dn5h0s4O G44nKYZZyC7ufVovKxPN5HKlqJvmNN61DZAQREhILJII+bQ8YUySsWA0n8swqs1V xfJIj/TjK5fXlYYVttEV12hC5W/3h0vfylbib1DtjHtJ2BPIMDstRu0eFsoYQgXQ KKneH2cKTbd/ecF3gsQoqltmsTP24wdJ+0h3h05cpjzCfijiFU+WaUH1Mc+ZwqrY PSdZae9vS9FP0Y4BM3Jf4SK5rQZ/SM/KSiu+BvOfLhiNoJ3R4eJIakyAh+lc4F7T kyhwePtvgVD8cf9Cek3qd4CdDnX3733Sz6Dsupwp7YdMfUk+++QL3Rq0gpzLu3Ma D70F1kq/2jCR8P/ZaSxkAx11f93pxlmf3pWrEzvWOpIFbWyIN1rwf3P+hXeD0iCn lE/9xWUGgkFRwW7KhSByP0OYheOdsBi+6k0nyvfVApYly71q/0GDCHQ5Tgqm888r 9SzYp2YXwyCKBCVgihzGJ/Mp/EjfSCfihi1Z6WhrkaaG0uhtwACl2qScW4YSxHbn SGyVUZaVYKs1hnI3g4jhgHUoTOizNs0IRtW7vBj1277E2GV5naE= =czgq -----END PGP SIGNATURE----- --=-=-=--
guix-patches@HIDDEN
:bug#61956
; Package guix-patches
.
Full text available.Received: (at 61956) by debbugs.gnu.org; 4 Mar 2023 08:40:19 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 04 03:40:19 2023 Received: from localhost ([127.0.0.1]:35220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pYNRC-00027N-QM for submit <at> debbugs.gnu.org; Sat, 04 Mar 2023 03:40:19 -0500 Received: from mail-ed1-f52.google.com ([209.85.208.52]:44748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1pYNR9-000278-OG for 61956 <at> debbugs.gnu.org; Sat, 04 Mar 2023 03:40:17 -0500 Received: by mail-ed1-f52.google.com with SMTP id ay14so15508585edb.11 for <61956 <at> debbugs.gnu.org>; Sat, 04 Mar 2023 00:40:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1677919209; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xCZCoX0ymBgKZ00bX7jQD/REDWiZkqnM1NKJ6j+1P+Y=; b=Fv3edu/3GIvAJChGeYczbGhAWuMs+NVhfbJQ4JyYHLMJh94DYx7LRzObYu3OgzVpWD S0kggrJGglRpspJM10N3UQbShKy+YTXuMEFbVwtTShEUkz2eN6KWJhbcc1cb1NlbOaBN zzf/60Xa9jp6Uo33WMrjX3i8WLiMEw6ao1OgY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677919209; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xCZCoX0ymBgKZ00bX7jQD/REDWiZkqnM1NKJ6j+1P+Y=; b=aR0H1oGu6P6lfj11P0GRFRIOKGa/lkMkNTxvzp+7B4Div/bJXD5X83vTk7Oi//2Px0 HHvhEee/uY8sFYtW4xSZ4JNYa+ao4B+htPkAU91o7kMjpL03ELdcuSRvEVqfzqn7/KXp ozq+H1PR2VKkTKcy1m6abDeKc7QW/HHUldClN/Mu60+ngROyIwOhWzJnn3AtUebARGJp VCazrI4HCG8SQoY9vgtqiBHcCJ5oTnSUKnU1EVGbo4qtcy/la7Gu6okOmSewX6siV0zf 9i6TAa5AXH7s4aZQFDJO23hD8WRCgd1m8kc4FVEsT5M0EP5SXVYmXlQGOzbcKMrsFge7 z5bg== X-Gm-Message-State: AO0yUKXZqAxES68omoMTUYNiaXAxjB+/6jtgag8eRQog07xXrenHGYvF UnptimY99rnLej/8BRDvV3foAth0E/fhrgAYfmM= X-Google-Smtp-Source: AK7set9rRO3J8ogYz7FG2ilugX2WLeM3ygUaXRaATKqdo0bRsPAtr5JfOrEWtbNmVIy7CDLO0Qv/Og== X-Received: by 2002:a17:907:9b03:b0:8aa:be5c:b7c5 with SMTP id kn3-20020a1709079b0300b008aabe5cb7c5mr4557021ejc.41.1677919209504; Sat, 04 Mar 2023 00:40:09 -0800 (PST) Received: from localhost ([95.168.153.94]) by smtp.gmail.com with ESMTPSA id l6-20020a50d6c6000000b004bdcc480c41sm2144918edj.96.2023.03.04.00.40.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Mar 2023 00:40:09 -0800 (PST) From: Sergey Trofimov <sarg@HIDDEN> To: 61956 <at> debbugs.gnu.org Subject: [PATCH v2] services: dns: Extend dnsmasq-configuration. Date: Sat, 4 Mar 2023 09:40:30 +0100 Message-Id: <20230304084030.32117-1-sarg@HIDDEN> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61956 Cc: Sergey Trofimov <sarg@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --- doc/guix.texi | 3 +++ gnu/services/dns.scm | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 74658dbc86..ca66041d12 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -31502,6 +31502,9 @@ in @var{servers}. @item @code{servers} (default: @code{'()}) Specify IP address of upstream servers directly. +@item @code{servers-file} (default: @code{#f}) +Specify file containing upstream servers. This file is re-read when dnsmasq receives SIGHUP. + @item @code{addresses} (default: @code{'()}) For each entry, specify an IP address to return for any host in the given domains. Queries in the domains are never forwarded and always diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm index 50753b7ab6..3a6a005fb7 100644 --- a/gnu/services/dns.scm +++ b/gnu/services/dns.scm @@ -754,6 +754,8 @@ (define-record-type* <dnsmasq-configuration> (default #f)) ;boolean (servers dnsmasq-configuration-servers (default '())) ;list of string + (servers-file dnsmasq-configuration-servers-file + (default #f)) ;string (addresses dnsmasq-configuration-addresses (default '())) ;list of string (cache-size dnsmasq-configuration-cache-size @@ -792,7 +794,7 @@ (define (dnsmasq-shepherd-service config) port local-service? listen-addresses resolv-file no-resolv? forward-private-reverse-lookup? query-servers-in-order? - servers addresses + servers addresses servers-file cache-size negative-cache? cpe-id tftp-enable? tftp-no-fail? @@ -827,6 +829,9 @@ (define (dnsmasq-shepherd-service config) #$@(if query-servers-in-order? '("--strict-order") '()) + #$@(if servers-file + (list (format #f "--servers-file=~a" servers-file)) + '()) #$@(map (cut format #f "--server=~a" <>) servers) #$@(map (cut format #f "--address=~a" <>) @@ -848,7 +853,7 @@ (define (dnsmasq-shepherd-service config) '("--tftp-single-port") '()) #$@(if tftp-secure? - '("--tftp-secure?") + '("--tftp-secure") '()) #$@(if tftp-max (list (format #f "--tftp-max=~a" tftp-max)) -- 2.39.1
guix-patches@HIDDEN
:bug#61956
; Package guix-patches
.
Full text available.Received: (at submit) by debbugs.gnu.org; 4 Mar 2023 08:27:13 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 04 03:27:13 2023 Received: from localhost ([127.0.0.1]:35214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pYNEX-0001mw-Ad for submit <at> debbugs.gnu.org; Sat, 04 Mar 2023 03:27:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:60096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1pYNEV-0001mm-K1 for submit <at> debbugs.gnu.org; Sat, 04 Mar 2023 03:27:12 -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 <sarg@HIDDEN>) id 1pYNEV-000730-DJ for guix-patches@HIDDEN; Sat, 04 Mar 2023 03:27:11 -0500 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <sarg@HIDDEN>) id 1pYNET-0004uj-Er for guix-patches@HIDDEN; Sat, 04 Mar 2023 03:27:11 -0500 Received: by mail-ed1-x52e.google.com with SMTP id f13so19119771edz.6 for <guix-patches@HIDDEN>; Sat, 04 Mar 2023 00:27:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1677918426; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Z1YHuGu7DuCPJKAyf9ff9SahXA2Se40R6WE06fQt+qA=; b=C1hzxPqE+nqBSg+KHaX2V1iUR85HkmBprVou+QtUNArxJmC5hI18I14/Y2h1A0ma0k TyKrSLBd/pl7WmVMZf2ic8E7wjWqCga/263pnXJSoFUdM/qQBolAk5R4j+nbPHYHzg8s zXvVnM621m263WNV9k1CK5tPXGalBZc2zfulE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677918426; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Z1YHuGu7DuCPJKAyf9ff9SahXA2Se40R6WE06fQt+qA=; b=nV2wBENddWeCs7VgVQndogzYvlPeM/UNbGpGSFcpyu69eltbBeuylgwJocNp2fpteN 4cNs6+ft/t16ksI6fea15t+ijXder4Cd2hYu4GaYGt2JZeKAqhHQskUFWcff0yvIYTHb AP1iTsFoSM2+c3RVmIeLEyobBXD6YXyhr8ujXEMcl1Afg+K48DKT9HAnmGQy9h9pk/iG m7CPfjDQg05OAGfJU/ZmffXwZuQt5V27UHyRql1jfdgTiu6Mxmb+Dt1RfuQ/7diXafB7 MvsdcTHcWA+PHo5oAvvqLmYy3tXkj5SH+lRuw4uaEjjWP2akh4uJ6EfnaSlAZJcMg2cF WQRg== X-Gm-Message-State: AO0yUKW7zDOr97+F6Hp1vfSpySHdQiIL2v/iChYZPvaQqx5O9CS/PCVN 1x2bMMYnEGnwEllOhSBoLJNEf2K2k9GsRd/0MGw= X-Google-Smtp-Source: AK7set+HoO8dwyvLAMKdDHgEVNg7KQBZLfq873yOmh1CcV/Kb2jrzMzsvMWqhE7rFSNcIXVi6+GQYA== X-Received: by 2002:a17:906:6c9:b0:8b1:77bf:5b9f with SMTP id v9-20020a17090606c900b008b177bf5b9fmr4283302ejb.13.1677918425906; Sat, 04 Mar 2023 00:27:05 -0800 (PST) Received: from localhost ([95.168.153.94]) by smtp.gmail.com with ESMTPSA id y13-20020a1709060a8d00b008bbc4f3bceesm1829306ejf.118.2023.03.04.00.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Mar 2023 00:27:05 -0800 (PST) From: Sergey Trofimov <sarg@HIDDEN> To: guix-patches@HIDDEN Subject: [PATCH] services: dns: Extend dnsmasq-configuration. Date: Sat, 4 Mar 2023 09:27:19 +0100 Message-Id: <20230304082719.29479-1-sarg@HIDDEN> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=2a00:1450:4864:20::52e; envelope-from=sarg@HIDDEN; helo=mail-ed1-x52e.google.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Sergey Trofimov <sarg@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) --- gnu/services/dns.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm index 50753b7ab6..3a6a005fb7 100644 --- a/gnu/services/dns.scm +++ b/gnu/services/dns.scm @@ -754,6 +754,8 @@ (define-record-type* <dnsmasq-configuration> (default #f)) ;boolean (servers dnsmasq-configuration-servers (default '())) ;list of string + (servers-file dnsmasq-configuration-servers-file + (default #f)) ;string (addresses dnsmasq-configuration-addresses (default '())) ;list of string (cache-size dnsmasq-configuration-cache-size @@ -792,7 +794,7 @@ (define (dnsmasq-shepherd-service config) port local-service? listen-addresses resolv-file no-resolv? forward-private-reverse-lookup? query-servers-in-order? - servers addresses + servers addresses servers-file cache-size negative-cache? cpe-id tftp-enable? tftp-no-fail? @@ -827,6 +829,9 @@ (define (dnsmasq-shepherd-service config) #$@(if query-servers-in-order? '("--strict-order") '()) + #$@(if servers-file + (list (format #f "--servers-file=~a" servers-file)) + '()) #$@(map (cut format #f "--server=~a" <>) servers) #$@(map (cut format #f "--address=~a" <>) @@ -848,7 +853,7 @@ (define (dnsmasq-shepherd-service config) '("--tftp-single-port") '()) #$@(if tftp-secure? - '("--tftp-secure?") + '("--tftp-secure") '()) #$@(if tftp-max (list (format #f "--tftp-max=~a" tftp-max)) -- 2.39.1
Sergey Trofimov <sarg@HIDDEN>
:guix-patches@HIDDEN
.
Full text available.guix-patches@HIDDEN
:bug#61956
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.