diff mbox series

[bug#55659,2/2] gnu: ddclient: Update to 3.10.0_2 (RC2).

Message ID 20220526131315.30515-2-attila@lendvai.name
State Accepted
Headers show
Series [bug#55659,1/2] services: ddclient: Fix extra-options serialization. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Attila Lendvai May 26, 2022, 1:13 p.m. UTC
---

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(-)

Comments

Attila Lendvai May 27, 2022, 11:40 a.m. UTC | #1
note: this requires https://issues.guix.gnu.org/55656

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“In a democracy, mass opinion creates power. Power diverts funds to the manufacturers of opinion, who manufacture more, etc. […] This feedback loop generates a playing field on which the most competitive ideas are not those which best correspond to reality, but those which produce the strongest feedback.”
	— Mencius Moldbug
Oleg Pykhalov June 17, 2022, 5:38 a.m. UTC | #2
Hi,

Attila Lendvai <attila@lendvai.name> writes:

> note that this seems to work, but is not fully tested. i have
> abandoned the use of ddclient and with that this patchset.

I use it on my system, and could test it.

[…]

>      (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))

Applied on current master 6fc33d91ba6b07beae8a9a38a5b768511bb79ced:
--8<---------------cut here---------------start------------->8---
oleg@guixsd ~/src/guix [env]$ ./pre-inst-env guix build ddclient
gnu/packages/dns.scm:1113:44: In procedure native-inputs:
error: perl-http-daemon-ssl: unbound variable
hint: Did you forget a `use-modules' form?
--8<---------------cut here---------------end--------------->8---

Did you forget to attach a patch adding the perl-http-daemon-ssl?

[…]

Oleg.
Attila Lendvai June 17, 2022, 8:26 a.m. UTC | #3
> Applied on current master 6fc33d91ba6b07beae8a9a38a5b768511bb79ced:
> --8<---------------cut here---------------start------------->8---
>
> oleg@guixsd ~/src/guix [env]$ ./pre-inst-env guix build ddclient
> gnu/packages/dns.scm:1113:44: In procedure native-inputs:
> error: perl-http-daemon-ssl: unbound variable
> hint: Did you forget a `use-modules' form?
> --8<---------------cut here---------------end--------------->8---
>
>
> Did you forget to attach a patch adding the perl-http-daemon-ssl?

forgot to say that this depends on https://issues.guix.gnu.org/55656

i was advised to split patchsets, but i think i really shouldn't have in this case.

sorry for the confusion, and thanks for testing it!

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“Without love the acquisition of knowledge only increases confusion and leads to self-destruction.”
	— Jiddu Krishnamurti (1895–1986)
diff mbox series

Patch

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