From patchwork Thu May 26 13:09:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Attila Lendvai X-Patchwork-Id: 39616 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3755A27BBEA; Thu, 26 May 2022 14:12:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id ABE7C27BBE9 for ; Thu, 26 May 2022 14:12:15 +0100 (BST) Received: from localhost ([::1]:38366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuDHi-0006dH-Sj for patchwork@mira.cbaines.net; Thu, 26 May 2022 09:12:14 -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 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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." From patchwork Thu May 26 13:13:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Attila Lendvai X-Patchwork-Id: 39617 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EA61927BBEA; Thu, 26 May 2022 14:18:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6194C27BBE9 for ; Thu, 26 May 2022 14:18:10 +0100 (BST) Received: from localhost ([::1]:40864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuDNR-00016D-J9 for patchwork@mira.cbaines.net; Thu, 26 May 2022 09:18:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuDNK-000161-AD for guix-patches@gnu.org; Thu, 26 May 2022 09:18:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35290) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuDNJ-0006TM-UE for guix-patches@gnu.org; Thu, 26 May 2022 09:18:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nuDNJ-00042o-QB for guix-patches@gnu.org; Thu, 26 May 2022 09:18:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55659] [PATCH 2/2] gnu: ddclient: Update to 3.10.0_2 (RC2). References: <20220526130912.29483-1-attila@lendvai.name> In-Reply-To: <20220526130912.29483-1-attila@lendvai.name> Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 26 May 2022 13:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55659 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55659@debbugs.gnu.org Cc: Attila Lendvai Received: via spool by 55659-submit@debbugs.gnu.org id=B55659.165357102815482 (code B ref 55659); Thu, 26 May 2022 13:18:01 +0000 Received: (at 55659) by debbugs.gnu.org; 26 May 2022 13:17:08 +0000 Received: from localhost ([127.0.0.1]:57420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuDMS-00041e-2l for submit@debbugs.gnu.org; Thu, 26 May 2022 09:17:08 -0400 Received: from mail-ej1-f46.google.com ([209.85.218.46]:34395) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuDMO-00040y-Ij for 55659@debbugs.gnu.org; Thu, 26 May 2022 09:17:07 -0400 Received: by mail-ej1-f46.google.com with SMTP id q21so3013053ejm.1 for <55659@debbugs.gnu.org>; Thu, 26 May 2022 06:17:04 -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=9K6P1TcWjizrx8LKD08gFuuVFQh1PNZzfu/V1pdzh4A=; b=YRiqH/i3XV7z9/fmHXEMxq7x33rNRJQSn55YHRQtw7fMt2n2icK4cZouDX5N/iZyBQ 4ti3OXkHY4h6mBGw8lcQH6M/HVgHr3RQuwI8nNXPiQ7nLDwWrTqWcp+++EfOZ0JC9Own 3OU3vsD83H0cuTX5JulqSDL10Uo3jKfECQVWGeWEvTw7nEG+GSkfci17O8H9qqGNoYAt kpY0JtaS3ElCej5UlTavzXtCw3xEEf4+z8lCI/61/XR5Ex4+eXKK6LlBe4zR4eQio5dL BOowHEDWnhcL8+lJS/UM9D3SXJf6VZAD7Y6odKINhkhPNiF6ZpF7LfVlG1QAWYu+ELE3 DNsg== 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=9K6P1TcWjizrx8LKD08gFuuVFQh1PNZzfu/V1pdzh4A=; b=tIYu4GWUS9j3rSNzpyFWmY7/VRLBlQKYEcs8ZZW5ToQ1aDeqtBDTFc1D+DQy6UBZnw LBsK/vr2nzvxLfoKiXhjqGtwNsX9RwNwfPn1VS2EN1wOiJ1bIc5V48tChsGd0TSWW30k 9Obq24ybcCvb8Li6Ve/evNUn6BNDR1SYSj1EgYVRHb2/kjm2QOLmtFsdx7I1IqunlTQ3 Php8mO2D2CWEU5xlMbktUZz5y6yk6i0HZ054LAWkdabF++GfcrZ0zMziiZnDk78tbkw0 PBdljAh9tkrWVq8qkyUqrbMs2MCbSxEksWw7VlN7crd0F3WlHDsHeTRKF1fO4LQbDPXQ bNoQ== X-Gm-Message-State: AOAM533FnSwS9hKTuyfGuExu2blkEYTVbBQkFCS5a4wlqIy83vnYqLjf sXDpejisCkkSo6YK+iOQARkPPm+adkQ= X-Google-Smtp-Source: ABdhPJwLdqDmooXeGZkaLGnOHcx8YX8DxUyGz6llyn7N9BSiwtL5CaF7FFVP9UBKfgFAYy1XDsfMGQ== X-Received: by 2002:a17:907:3e86:b0:6f5:917:10cc with SMTP id hs6-20020a1709073e8600b006f5091710ccmr32304642ejc.53.1653571018759; Thu, 26 May 2022 06:16:58 -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 o3-20020a170906774300b006f3ef214db7sm523039ejn.29.2022.05.26.06.16.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 06:16:58 -0700 (PDT) From: Attila Lendvai Date: Thu, 26 May 2022 15:13:16 +0200 Message-Id: <20220526131315.30515-2-attila@lendvai.name> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches --- note that this seems to work, but is not fully tested. i have abandoned the use of ddclient and with that this patchset. also note that i'm not sure why the use of wrap-program is needed, but without that it was missing some perl modules at runtime. gnu/packages/dns.scm | 76 ++++++++++++++++---------------------------- 1 file changed, 27 insertions(+), 49 deletions(-) diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index fea255c930..0430415b3f 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -64,6 +64,7 @@ (define-module (gnu packages dns) #:use-module (gnu packages nettle) #:use-module (gnu packages networking) #:use-module (gnu packages perl) + #:use-module (gnu packages perl-check) #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) @@ -1094,7 +1095,7 @@ (define-public knot-resolver (define-public ddclient (package (name "ddclient") - (version "3.9.1") + (version "3.10.0_2") (source (origin (method git-fetch) @@ -1103,62 +1104,39 @@ (define-public ddclient (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0hf377g4j9r9sac75xp17nk2h58mazswz4vkg4g2gl2yyhvzq91w")))) - (build-system trivial-build-system) ; no Makefile.PL + (base32 "0jl658yr867y65hh054wg5gbzxsgpsf57qlc182ni4vwgqkrsrd1")))) + (build-system gnu-build-system) (native-inputs - (list bash perl)) + (list bash autoconf automake + perl + ;; For the tests. + perl-try-tiny perl-test-warnings perl-http-daemon-ssl + perl-io-socket-inet6 perl-test-www-mechanize-psgi + perl-test-mockmodule)) (inputs (list inetutils ; logger net-tools + perl perl-data-validate-ip perl-digest-sha1 perl-io-socket-ssl)) (arguments - `(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils) - (ice-9 match) - (srfi srfi-26)) - (setenv "PATH" (string-append - (assoc-ref %build-inputs "bash") "/bin" ":" - (assoc-ref %build-inputs "perl") "/bin")) - - ;; Copy the (read-only) source into the (writable) build directory. - (copy-recursively (assoc-ref %build-inputs "source") ".") - - ;; Install. - (let* ((out (assoc-ref %outputs "out")) - (bin (string-append out "/bin"))) - (let ((file "ddclient")) - (substitute* file - (("/usr/bin/perl") (which "perl")) - ;; Strictly use ‘/etc/ddclient/ddclient.conf’. - (("\\$\\{program\\}\\.conf") "/etc/ddclient/ddclient.conf") - (("\\$etc\\$program.conf") "/etc/ddclient/ddclient.conf") - ;; Strictly use ‘/var/cache/ddclient/ddclient.cache’ - (("\\$cachedir\\$program\\.cache") - "/var/cache/ddclient/ddclient.cache")) - (install-file file bin) - (wrap-program (string-append bin "/" file) - `("PATH" ":" = - ("$PATH" - ,@(map (lambda (input) - (match input - ((name . store) - (string-append store "/bin")))) - %build-inputs))) - `("PERL5LIB" ":" = - ,(delete - "" - (map (match-lambda - (((? (cut string-prefix? "perl-" <>) name) . dir) - (string-append dir "/lib/perl5/site_perl")) - (_ "")) - %build-inputs))))) - (for-each (cut install-file <> (string-append out - "/share/ddclient")) - (find-files "." "sample.*$")))))) + ;; The tests run mostly clean (6 failures), but I think they depend on + ;; the network config of the machine running them, so I turned them off. + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'change-dependencies + (lambda* (#:key native-inputs target #:allow-other-keys) + (substitute* "configure.ac" + (("HTTP::Daemon=6.12") "HTTP::Daemon=6.14")))) + (add-after 'install 'wrap-ddclient + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (wrap-program (string-append out "/bin/ddclient") + `("PERL5LIB" ":" prefix + (,(getenv "PERL5LIB") + ,(string-append out "/lib/perl5/site_perl")))))))))) (home-page "https://ddclient.net/") (synopsis "Address updating utility for dynamic DNS services") (description "This package provides a client to update dynamic IP