From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 6EUSEP7vCmSGzwAASxT56A (envelope-from ) for ; Fri, 10 Mar 2023 09:53:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GOsQD/7vCmSBIQEAG6o9tA (envelope-from ) for ; Fri, 10 Mar 2023 09:53:18 +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 0E3C61EF9E for ; Fri, 10 Mar 2023 09:53:18 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=sarg.org.ru header.s=google header.b=Ybijpe3C; 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=1678438398; 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: dkim-signature; bh=4egtgVUUWun8OtZUK2Vt3enmJMSJYe4UDTC7Z2ZPkrQ=; b=ZgehUuhslwEIZXp0wmhxA6l/WS8mjFZd9O73O538geHNa4xiyR9xWAV+U+BV/yv9rcHwTM m9gPyFy+gWIsZTyzdHr5RFm8+UA+hTVsFON65GybCb6Gh5Keygtfo9b7AmCixFEixXMnEO OPlqRrbZJPgyPyb1GH9O682ODGS0MePFxZ3Ei37idEkm2iGUNgH+zEczaYGmWwX1oJbztc 2EFPsfUOJC8Tv2etkJCEVwNtiuqPxlrxPV+QD56stmL2uy4H5SXvIPg2FjPxXUiF+4wRfv 0jc/k3qo/VRi7oxHN0kRf+rt4FHesE8ntckW2iCfPYlm0Y5Lz/Muo/4HPCnrLg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678438398; a=rsa-sha256; cv=none; b=ubm9nU9dObybd1v0imtF/pJpWz9RmnOe2W5G3TAaub6OZPi68AtCLsBi3UREA0+IJ8kaD/ bs9529zuj9m2BTRXW6y8n8YHO0zXUlzqUz2LGOW8lk7TpDo6jSnGQBCAND+2yalOUeiV4b BaaGxItlvPyEakbiJ7llgdt0U5I3g0qVZAE8VINWAIriQxj8f0S81ZnsXrAISgPGB4CWvB 49m5XdQedBhbGUTq0KYX5/uWFOVW4UAwpw37vWmP1CTh56082AotT2edXme33dGepsMZMk pgF5M3M2CRgXsOUtiDNEnH2R/5WPF7bVCpWfwaHrh/uYgXKDh43YiAgiuEi6Lw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=sarg.org.ru header.s=google header.b=Ybijpe3C; 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 localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paYUq-0001uw-Pc; Fri, 10 Mar 2023 03:53:05 -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 1paYUo-0001uj-Gb for guix-patches@gnu.org; Fri, 10 Mar 2023 03:53:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1paYUo-0007KD-6j for guix-patches@gnu.org; Fri, 10 Mar 2023 03:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1paYUn-00085L-T3 for guix-patches@gnu.org; Fri, 10 Mar 2023 03:53:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61956] [PATCH v2] services: dns: Extend dnsmasq-configuration. Resent-From: Sergey Trofimov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 10 Mar 2023 08:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61956 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61956@debbugs.gnu.org Cc: Andrew Tropin Received: via spool by 61956-submit@debbugs.gnu.org id=B61956.167843836031049 (code B ref 61956); Fri, 10 Mar 2023 08:53:01 +0000 Received: (at 61956) by debbugs.gnu.org; 10 Mar 2023 08:52:40 +0000 Received: from localhost ([127.0.0.1]:53667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paYUS-00084i-76 for submit@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 ) id 1paYUO-00084U-RO for 61956@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@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@sarg.org.ru> <20230304084030.32117-1-sarg@sarg.org.ru> <87ilf9cb5p.fsf@trop.in> User-agent: mu4e 1.8.13; emacs 29.0.60 From: Sergey Trofimov Date: Fri, 10 Mar 2023 09:38:05 +0100 In-reply-to: <87ilf9cb5p.fsf@trop.in> Message-ID: <87356d2dju.fsf@sarg.org.ru> MIME-Version: 1.0 Content-Type: text/plain; format=flowed 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: X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: 0E3C61EF9E X-Spam-Score: -0.49 X-Migadu-Spam-Score: -0.49 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-TUID: sU1tjPGnufok Andrew Tropin 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 <>/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?