all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Attila Lendvai <attila@lendvai.name>
To: 55659@debbugs.gnu.org
Cc: Attila Lendvai <attila@lendvai.name>
Subject: [bug#55659] [PATCH 2/2] gnu: ddclient: Update to 3.10.0_2 (RC2).
Date: Thu, 26 May 2022 15:13:16 +0200	[thread overview]
Message-ID: <20220526131315.30515-2-attila@lendvai.name> (raw)
In-Reply-To: <20220526130912.29483-1-attila@lendvai.name>

---

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
-- 
2.35.1





  reply	other threads:[~2022-05-26 13:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26 13:09 [bug#55659] [PATCH 1/2] services: ddclient: Fix extra-options serialization Attila Lendvai
2022-05-26 13:13 ` Attila Lendvai [this message]
2022-05-27 11:40   ` [bug#55659] [PATCH 2/2] gnu: ddclient: Update to 3.10.0_2 (RC2) Attila Lendvai
2022-06-17  5:38   ` [bug#55659] [PATCH 1/2] services: ddclient: Fix extra-options serialization Oleg Pykhalov
2022-06-17  8:26     ` Attila Lendvai
2022-06-16 21:11 ` Ludovic Courtès
2022-06-17  8:53   ` Attila Lendvai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220526131315.30515-2-attila@lendvai.name \
    --to=attila@lendvai.name \
    --cc=55659@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.