GNU bug report logs - #32114
[PATCH] gnu: Add ddclient.

Previous Next

Package: guix-patches;

Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>

Date: Tue, 10 Jul 2018 16:31:02 UTC

Severity: normal

Tags: patch

Done: Oleg Pykhalov <go.wigust <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32114 in the body.
You can then email your comments to 32114 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#32114; Package guix-patches. (Tue, 10 Jul 2018 16:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Oleg Pykhalov <go.wigust <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 10 Jul 2018 16:31:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>
Subject: [PATCH] gnu: Add ddclient.
Date: Tue, 10 Jul 2018 19:29:55 +0300
* gnu/packages/dns.scm (ddclient): New variable.
---
 gnu/packages/dns.scm | 85 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 84 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 78479b2d3..b17016909 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2016 Marius Bakke <mbakke <at> fastmail.com>
 ;;; Copyright © 2017 Vasile Dumitrascu <va511e <at> yahoo.com>
 ;;; Copyright © 2017 Gregor Giesen <giesen <at> zaehlwerk.net>
+;;; Copyright © 2018 Oleg Pykhalov <go.wigust <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,7 +30,9 @@
   #:use-module (gnu packages admin)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages databases)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages datastructures)
   #:use-module (gnu packages flex)
@@ -55,7 +58,8 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial))
 
 (define-public dnsmasq
   (package
@@ -576,3 +580,82 @@ synthesis, and on-the-fly re-configuration.")
       license:lgpl2.0+              ; parts of scr/contrib/ucw
       license:public-domain         ; src/contrib/fnv and possibly murmurhash3
       license:gpl3+))))             ; everything else
+
+(define-public ddclient
+  (package
+    (name "ddclient")
+    (version "3.8.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/ddclient/ddclient/ddclient-"
+                                  version "/ddclient-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1j8zdn7fy7i0bjk3jf0hxnbnshc2yf054vxq64imxdpfd7n5zgfy"))))
+    (build-system trivial-build-system)
+    (native-inputs
+     `(("bash" ,bash)
+       ("gzip" ,gzip)
+       ("perl" ,perl)
+       ("tar" ,tar)))
+    (inputs
+     `(("net-tools" ,net-tools)
+       ("perl-io-socket-ssl" ,perl-io-socket-ssl)
+       ("perl-digest-sha1" ,perl-digest-sha1)))
+    (arguments
+     `(#:modules ((guix build utils)
+                  (ice-9 match)
+                  (srfi srfi-26))
+       #:builder
+       (begin
+         (use-modules (guix build utils)
+                      (ice-9 match)
+                      (srfi srfi-26))
+         ;; bootstrap
+         (setenv "PATH" (string-append
+                         (assoc-ref %build-inputs "bash") "/bin" ":"
+                         (assoc-ref %build-inputs "tar") "/bin" ":"
+                         (assoc-ref %build-inputs "gzip") "/bin" ":"
+                         (assoc-ref %build-inputs "perl") "/bin"))
+         ;; extract source
+         (invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
+         ;; package
+         (with-directory-excursion (string-append ,name "-" ,version)
+           (let* ((out (assoc-ref %outputs "out"))
+                  (bin (string-append out "/bin")))
+             (let ((file "ddclient"))
+               (substitute* file
+                 (("/usr/bin/perl") (which "perl")))
+               (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.*$")))))))
+    (home-page "https://sourceforge.net/projects/ddclient/")
+    (synopsis "Address updating utility for dynamic DNS services")
+    (description "This package provides a client to update dynamic IP
+addresses with several dynamic DNS service providers, such as
+@uref{https://www.dyndns.com/account/login.html,DynDNS.com}.
+
+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
+record and alternative name management.  It caches the address, and only
+attempts the update when it has changed.")
+    (license license:gpl2+)))
-- 
2.18.0





Information forwarded to guix-patches <at> gnu.org:
bug#32114; Package guix-patches. (Wed, 11 Jul 2018 06:28:02 GMT) Full text and rfc822 format available.

Message #8 received at 32114 <at> debbugs.gnu.org (full text, mbox):

From: Nils Gillmann <ng0 <at> n0.is>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 32114 <at> debbugs.gnu.org
Subject: Re: [bug#32114] [PATCH] gnu: Add ddclient.
Date: Wed, 11 Jul 2018 06:27:58 +0000
Oleg Pykhalov transcribed 4.8K bytes:
> * gnu/packages/dns.scm (ddclient): New variable.
> ---
>  gnu/packages/dns.scm | 85 +++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 84 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
> index 78479b2d3..b17016909 100644
> --- a/gnu/packages/dns.scm
> +++ b/gnu/packages/dns.scm
> @@ -9,6 +9,7 @@
>  ;;; Copyright © 2016 Marius Bakke <mbakke <at> fastmail.com>
>  ;;; Copyright © 2017 Vasile Dumitrascu <va511e <at> yahoo.com>
>  ;;; Copyright © 2017 Gregor Giesen <giesen <at> zaehlwerk.net>
> +;;; Copyright © 2018 Oleg Pykhalov <go.wigust <at> gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -29,7 +30,9 @@
>    #:use-module (gnu packages admin)
>    #:use-module (gnu packages autotools)
>    #:use-module (gnu packages base)
> +  #:use-module (gnu packages bash)
>    #:use-module (gnu packages databases)
> +  #:use-module (gnu packages compression)
>    #:use-module (gnu packages crypto)
>    #:use-module (gnu packages datastructures)
>    #:use-module (gnu packages flex)
> @@ -55,7 +58,8 @@
>    #:use-module (guix packages)
>    #:use-module (guix download)
>    #:use-module (guix utils)
> -  #:use-module (guix build-system gnu))
> +  #:use-module (guix build-system gnu)
> +  #:use-module (guix build-system trivial))
>  
>  (define-public dnsmasq
>    (package
> @@ -576,3 +580,82 @@ synthesis, and on-the-fly re-configuration.")
>        license:lgpl2.0+              ; parts of scr/contrib/ucw
>        license:public-domain         ; src/contrib/fnv and possibly murmurhash3
>        license:gpl3+))))             ; everything else
> +
> +(define-public ddclient
> +  (package
> +    (name "ddclient")
> +    (version "3.8.3")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "mirror://sourceforge/ddclient/ddclient/ddclient-"
> +                                  version "/ddclient-" version ".tar.gz"))
> +              (sha256
> +               (base32
> +                "1j8zdn7fy7i0bjk3jf0hxnbnshc2yf054vxq64imxdpfd7n5zgfy"))))
> +    (build-system trivial-build-system)
> +    (native-inputs
> +     `(("bash" ,bash)
> +       ("gzip" ,gzip)
> +       ("perl" ,perl)
> +       ("tar" ,tar)))
> +    (inputs
> +     `(("net-tools" ,net-tools)
> +       ("perl-io-socket-ssl" ,perl-io-socket-ssl)
> +       ("perl-digest-sha1" ,perl-digest-sha1)))
> +    (arguments
> +     `(#:modules ((guix build utils)
> +                  (ice-9 match)
> +                  (srfi srfi-26))
> +       #:builder
> +       (begin
> +         (use-modules (guix build utils)
> +                      (ice-9 match)
> +                      (srfi srfi-26))
> +         ;; bootstrap
> +         (setenv "PATH" (string-append
> +                         (assoc-ref %build-inputs "bash") "/bin" ":"
> +                         (assoc-ref %build-inputs "tar") "/bin" ":"
> +                         (assoc-ref %build-inputs "gzip") "/bin" ":"
> +                         (assoc-ref %build-inputs "perl") "/bin"))
> +         ;; extract source
> +         (invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
> +         ;; package
> +         (with-directory-excursion (string-append ,name "-" ,version)
> +           (let* ((out (assoc-ref %outputs "out"))
> +                  (bin (string-append out "/bin")))
> +             (let ((file "ddclient"))
> +               (substitute* file
> +                 (("/usr/bin/perl") (which "perl")))
> +               (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.*$")))))))
> +    (home-page "https://sourceforge.net/projects/ddclient/")
> +    (synopsis "Address updating utility for dynamic DNS services")
> +    (description "This package provides a client to update dynamic IP
> +addresses with several dynamic DNS service providers, such as
> +@uref{https://www.dyndns.com/account/login.html,DynDNS.com}.
> +
> +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
> +record and alternative name management.  It caches the address, and only
> +attempts the update when it has changed.")
> +    (license license:gpl2+)))
> -- 
> 2.18.0

Looks good to me. maybe replace the "This" repetition in the description?




Information forwarded to guix-patches <at> gnu.org:
bug#32114; Package guix-patches. (Wed, 11 Jul 2018 19:10:01 GMT) Full text and rfc822 format available.

Message #11 received at 32114 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 32114 <at> debbugs.gnu.org
Subject: Re: [bug#32114] [PATCH] gnu: Add ddclient.
Date: Wed, 11 Jul 2018 15:09:56 -0400
[Message part 1 (text/plain, inline)]
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?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#32114; Package guix-patches. (Thu, 12 Jul 2018 05:13:01 GMT) Full text and rfc822 format available.

Message #14 received at 32114 <at> debbugs.gnu.org (full text, mbox):

From: Nils Gillmann <ng0 <at> n0.is>
To: Leo Famulari <leo <at> famulari.name>
Cc: 32114 <at> debbugs.gnu.org, Oleg Pykhalov <go.wigust <at> gmail.com>
Subject: Re: [bug#32114] [PATCH] gnu: Add ddclient.
Date: Thu, 12 Jul 2018 05:13:38 +0000
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.




Information forwarded to guix-patches <at> gnu.org:
bug#32114; Package guix-patches. (Fri, 13 Jul 2018 15:02:02 GMT) Full text and rfc822 format available.

Message #17 received at 32114 <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Nils Gillmann <ng0 <at> n0.is>, Leo Famulari <leo <at> famulari.name>
Cc: 32114 <at> debbugs.gnu.org, 32114-done <at> debbugs.gnu.org
Subject: Re: [bug#32114] [PATCH] gnu: Add ddclient.
Date: Fri, 13 Jul 2018 18:01:16 +0300
[Message part 1 (text/plain, inline)]
Hello Nils, Leo, all.

Nils Gillmann <ng0 <at> n0.is> 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:
[Message part 2 (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
[1]  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32141

Oleg.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Oleg Pykhalov <go.wigust <at> gmail.com>:
You have taken responsibility. (Fri, 13 Jul 2018 15:02:02 GMT) Full text and rfc822 format available.

Notification sent to Oleg Pykhalov <go.wigust <at> gmail.com>:
bug acknowledged by developer. (Fri, 13 Jul 2018 15:02:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 11 Aug 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 351 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.