From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aDGBJrR8j2KeZwAAbAwnHQ (envelope-from ) for ; Thu, 26 May 2022 15:12:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id iK9/JbR8j2KFcAAAG6o9tA (envelope-from ) for ; Thu, 26 May 2022 15:12:20 +0200 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 23E52EC21 for ; Thu, 26 May 2022 15:12:20 +0200 (CEST) Received: from localhost ([::1]:38366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuDHn-0006dH-5T for larch@yhetil.org; Thu, 26 May 2022 09:12:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuDHX-0006az-Fa for guix-patches@gnu.org; Thu, 26 May 2022 09:12:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35267) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuDHW-0005L2-OG for guix-patches@gnu.org; Thu, 26 May 2022 09:12:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nuDHW-0003sg-JX for guix-patches@gnu.org; Thu, 26 May 2022 09:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55659] [PATCH 1/2] services: ddclient: Fix extra-options serialization. Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 26 May 2022 13:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55659 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55659@debbugs.gnu.org Cc: Attila Lendvai X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165357069314880 (code B ref -1); Thu, 26 May 2022 13:12:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 May 2022 13:11:33 +0000 Received: from localhost ([127.0.0.1]:57397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuDH3-0003rw-8F for submit@debbugs.gnu.org; Thu, 26 May 2022 09:11:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:45346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuDH1-0003rj-CK for submit@debbugs.gnu.org; Thu, 26 May 2022 09:11:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuDGy-0006A9-13 for guix-patches@gnu.org; Thu, 26 May 2022 09:11:31 -0400 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:44631) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuDGw-0005Hd-DF for guix-patches@gnu.org; Thu, 26 May 2022 09:11:27 -0400 Received: by mail-ed1-x531.google.com with SMTP id q15so1739341edb.11 for ; Thu, 26 May 2022 06:11:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PVK9k6o7iD7ezZV5hNYYBdRbQJxrqn9y1anWpOM6eKw=; b=h93PSr2DChdjzPFsJ6Q4xSTfhotflsx27MUttcMAsHPPCr0jK2azw7byx2LS8drhbg aEo/GLF76jvnDf27l7XTY321bKDN3APhEs9beMrQxFhwyH9pTJnS5L3muy6Wgl/Qt0o0 bWsuD3Q3iOelgYB5yPfhhC6W+zDBBsI2TlrcH28OuBGryXpe1mnjnpyF98E/OWwfv+6C q+8aO4/r2irsicpWPQ6vDdOMVzn7Ky5NqmS7X3BqFsiWBDj9SP4tcuut1xFVPEkTlYXn v2QWXthuaQJgaLB1NDCoaJBJPezgwkd9gXQAgQv16f1te8QaTRc8QKtO5tm6iMoV7aEg fxRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=PVK9k6o7iD7ezZV5hNYYBdRbQJxrqn9y1anWpOM6eKw=; b=MxMhwGulNMvnDjpWnvYLgqv5/xjHPKnFsdt6DL6gd1lZUKQWFHT4k/IkC6MSwrjoju 7LQhKl2hFhlyYku+wBSzjMtrC/xJlDxFlPA7Tgd3SwLzKTYkfdDJjXk6Lo7N8PBnKv7K CViW5+LVTlKnjDOlbwmAh2+o4X+sR0r1orqJdU7+572pR5cwi0Qt4preAxf7bWv+ki5s 3rotQ+WFLTxFyNarEVEedMTQ+1JwrNMlemQN/MYhCJvHfrSyFkvO1oUVqoLuUbXUhf8I 4GKRqHAHtPmiCWso/LVwNLGAVsMGPj+k/No31fcL+czjVOg2kxQyPmwuZpHXqEQOe8AE XRnQ== X-Gm-Message-State: AOAM533ImV3lSfqRhhI2Cfgs5T1Q575BXtSQui8/VmqxKjA5jVEupKsJ dwvzn1DSyv0QpQXd9KJ52V7rNtBmo3E= X-Google-Smtp-Source: ABdhPJwK/VzZ3YHpiAVSzY3J4PGWWHZVKqbkzZfxLeNXjwtYgxroxxUon8fzOQ2y98lqSX9nUQtZjA== X-Received: by 2002:a05:6402:401b:b0:42b:5bbf:4b88 with SMTP id d27-20020a056402401b00b0042b5bbf4b88mr23986643eda.238.1653570684853; Thu, 26 May 2022 06:11:24 -0700 (PDT) Received: from lelap.local (catv-89-132-245-188.catv.fixed.vodafone.hu. [89.132.245.188]) by smtp.gmail.com with ESMTPSA id q29-20020a50aa9d000000b0042aad7448besm790100edc.18.2022.05.26.06.11.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 06:11:24 -0700 (PDT) From: Attila Lendvai Date: Thu, 26 May 2022 15:09:12 +0200 Message-Id: <20220526130912.29483-1-attila@lendvai.name> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=attila.lendvai@gmail.com; helo=mail-ed1-x531.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action 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=1653570740; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=PVK9k6o7iD7ezZV5hNYYBdRbQJxrqn9y1anWpOM6eKw=; b=LfcMDI8Ob8K5Knfc1dwvCl0tWTyU8sisgrlIl1djsEFFZUFp0JP4m7qMadFZilri9WeHdK pRumpUre+h851sWzuaeiz4xIgxdpBg0/7Wpo7rffjIefznbpQDFP0AZKyoCzeH0gzug5fj CnBVfGel+SJz4qUJTOBJ22TbM4+o30P8d9q+GdoeyMFB8v+kCO3inA84FHUhikiDnhWWGL DcrstBNrnMMFn3qSIxSuu/ImJ7jSV74zKnAHQdaHFfA1H5vBZvF6amAJxUYQ7twPc0ykAy FR+EujE1exyBmEe5WHYZJGK72MrjTdS3DQ70qKQVL4lWsmwPTiaZetX8LUZNrw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653570740; a=rsa-sha256; cv=none; b=BUSIs4Z0Om1LfvHFr2aIgodVdtmFvffERpbVx2fBq/OFEaLalJVSJxjIgdJHmU2o6Km8Ja oln+F89vGh+rf2kt+Bs/GgsqQcL8GRZAKQekLXoftCqF92t4G5E02L0fTemfM+q70H6dVY 1wz4Q6rsafA3IF4oWuhAxBWFL7kQ5cvZnX3M+yFRuNyOp7exJb5at0lO2SsIAZMnT37xqE C2oa9+7vNHGFZo3MEPnGoSQHcOJdEBTz4YB61rXvtpD8oyl+w8Fu0ksFzRRK4OqUSZduRk 221LfCapY4UAX4Chbcab3r2iSjYT816wx5GxwQzLl8SBOo38K3GqcgHEnDMEog== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=h93PSr2D; dmarc=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" X-Migadu-Spam-Score: 0.86 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=h93PSr2D; dmarc=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" X-Migadu-Queue-Id: 23E52EC21 X-Spam-Score: 0.86 X-Migadu-Scanner: scn0.migadu.com X-TUID: dVvaHfQsEila Prior to this fix it has serialized "extra-options=..." into the ddclient.conf file. * gnu/services/dns.scm (serialize-field): Special case for extra-options. (serialize-extra-options): Deleted unused function. (ddclient-configuration): Change the type of the extra-options field to be a string, and emit it verbatime into the ddclient.conf file. Change docstring accordingly. --- please note that even though this does fix an issue, i have abandoned further work on ddclient. so, this is an improvement indeed, but i suspect that this does not fully fix ddclient. looks like the conf file format is different than what the current code emits. the next patch updates ddclient to an RC2 of the next version, which will be a major upgrade. gnu/services/dns.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm index 50753b7ab6..c2ede312e8 100644 --- a/gnu/services/dns.scm +++ b/gnu/services/dns.scm @@ -904,8 +904,11 @@ (define (uglify-field-name field-name) (string-delete #\? (symbol->string field-name))) (define (serialize-field field-name val) - (when (not (member field-name '(group secret-file user))) - (format #t "~a=~a\n" (uglify-field-name field-name) val))) + (cond + ((eq? field-name 'extra-options) + (display val)) + ((not (member field-name '(group secret-file user))) + (format #t "~a=~a\n" (uglify-field-name field-name) val)))) (define (serialize-boolean field-name val) (serialize-field field-name (if val "yes" "no"))) @@ -921,9 +924,6 @@ (define (serialize-string field-name val) (define (serialize-list field-name val) (if (null? val) "" (serialize-field field-name (string-join val)))) -(define (serialize-extra-options extra-options) - (string-join extra-options "\n" 'suffix)) - (define-configuration ddclient-configuration (ddclient (file-like ddclient) @@ -959,8 +959,8 @@ (define-configuration ddclient-configuration file contains credentials for use by ddclient. You are expected to create it manually.") (extra-options - (list '()) - "Extra options will be appended to @file{ddclient.conf} file.")) + (string "") + "Extra options will be appended verbatim to the @file{ddclient.conf} file.")) (define (ddclient-account config) "Return the user accounts and user groups for CONFIG." -- 2.35.1