Subject: Re: [bug#32114] [PATCH] gnu: Add ddclient.

From: Oleg Pykhalov <[email-masked]>
Date: Fri, 13 Jul 2018 18:01:16 +0300

Hello Nils, Leo, all.

Nils Gillmann <[email-masked]> writes:

> Leo Famulari transcribed 1.3K bytes:
>> On Tue, Jul 10, 2018 at 07:29:55PM +0300, Oleg Pykhalov wrote:
>> > * gnu/packages/dns.scm (ddclient): New variable.
>> 
>> Thanks! Overall it seems fine, but can you add a short code comment
>> about why it uses the trival-build-system instead of perl-build-system?
>
> I think I tried to work on this a while back. It simply has no Makefile
> for any build system.

I applied all your suggestions, thank you.

Also, while I wrote ddclient service [1] I did some improvements to
ddclient package.  Pushed as 0bc2d3e42b8800e875f24973f999739297f1f502
with following changes:
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index b17016909..ffa442f4d 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -592,7 +591,7 @@ synthesis, and on-the-fly re-configuration.")
               (sha256
                (base32
                 "1j8zdn7fy7i0bjk3jf0hxnbnshc2yf054vxq64imxdpfd7n5zgfy"))))
-    (build-system trivial-build-system)
+    (build-system trivial-build-system) ; no Makefile.PL
     (native-inputs
      `(("bash" ,bash)
        ("gzip" ,gzip)
@@ -600,6 +599,7 @@ synthesis, and on-the-fly re-configuration.")
        ("tar" ,tar)))
     (inputs
      `(("net-tools" ,net-tools)
+       ("inetutils" ,inetutils) ;logger
        ("perl-io-socket-ssl" ,perl-io-socket-ssl)
        ("perl-digest-sha1" ,perl-digest-sha1)))
     (arguments
@@ -625,7 +625,13 @@ synthesis, and on-the-fly re-configuration.")
                   (bin (string-append out "/bin")))
              (let ((file "ddclient"))
                (substitute* file
-                 (("/usr/bin/perl") (which "perl")))
+                 (("/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" ":" =
@@ -655,7 +661,7 @@ addresses with several dynamic DNS service providers, such as
 This makes it possible to use a fixed hostname (such as myhost.dyndns.org) to
 access a machine with a dynamic IP address.
 
-This client supports both dynamic and (near) static services, as well as MX
+The client supports both dynamic and (near) static services, as well as MX
 record and alternative name management.  It caches the address, and only
 attempts the update when it has changed.")
     (license license:gpl2+)))

[1]  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32141

Oleg.