Subject: [bug#64669] [PATCH v2 2/2] gnu: ddclient: Remove package.

From: Bruno Victal <[email-masked]>
Date: Sun, 16 Jul 2023 19:47:48 +0100

ddclient is unmaintained as of 2023-07-04 [1].
This reverts changes related to
commit 0bc2d3e42b8800e875f24973f999739297f1f502.

[1]: <https://github.com/ddclient/ddclient/issues/528>

* gnu/packages/dns.scm (ddclient): Remove variable.
* gnu/packages/patches/ddclient-skip-test.patch: Remove file.
* gnu/local.mk: Unregister it.
---
 gnu/local.mk                                  |  1 -
 gnu/packages/dns.scm                          | 71 +------------------
 gnu/packages/patches/ddclient-skip-test.patch | 43 -----------
 3 files changed, 2 insertions(+), 113 deletions(-)
 delete mode 100644 gnu/packages/patches/ddclient-skip-test.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index b460d3bc91..0e90f05035 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1050,7 +1050,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/dbus-c++-gcc-compat.patch		\
   %D%/packages/patches/dbus-c++-threading-mutex.patch		\
   %D%/packages/patches/dbxfs-remove-sentry-sdk.patch		\
-  %D%/packages/patches/ddclient-skip-test.patch			\
   %D%/packages/patches/debops-constants-for-external-program-names.patch \
   %D%/packages/patches/debops-debops-defaults-fall-back-to-less.patch \
   %D%/packages/patches/dee-vapi.patch			\
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 9879998776..adbb1c9439 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2016, 2020 Marius Bakke <[email-masked]>
 ;;; Copyright © 2017 Vasile Dumitrascu <[email-masked]>
 ;;; Copyright © 2017 Gregor Giesen <[email-masked]>
-;;; Copyright © 2018, 2022 Oleg Pykhalov <[email-masked]>
+;;; Copyright © 2022 Oleg Pykhalov <[email-masked]>
 ;;; Copyright © 2019 Mathieu Othacehe <[email-masked]>
 ;;; Copyright © 2019 Chris Marusich <[email-masked]>
 ;;; Copyright © 2019 Rutger Helling <[email-masked]>
@@ -91,8 +91,7 @@ (define-module (gnu packages dns)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
-  #:use-module (guix build-system meson)
-  #:use-module (guix build-system trivial))
+  #:use-module (guix build-system meson))
 
 (define-public cloudflare-cli
   (let ((commit "2d986d3ec1b0e3158c4bd40e8918947cb74aa392")
@@ -1069,72 +1068,6 @@ (define-public knot-resolver
                    license:cc0
                    license:lgpl2.0))))
 
-(define-public ddclient
-  (package
-    (name "ddclient")
-    (version "3.10.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/ddclient/ddclient")
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "0l87d72apwrg6ipc9gix5gv64d4hr1ykxmss8x4r8d8mgj6j8rf1"))
-       (modules '((guix build utils)))
-       (snippet
-        ;; XXX: erroneous version value, this is fixed in master
-        #~(begin
-            (substitute* "configure.ac"
-              (("3.10.0_2") #$version))))
-       (patches (search-patches "ddclient-skip-test.patch"))))
-    (build-system gnu-build-system)
-    (native-inputs
-     (list autoconf automake libtool
-           perl-test-warnings perl-test-mockmodule))
-    (inputs
-     (list inetutils ; logger
-           net-tools
-           bash-minimal                           ;for 'wrap-program'
-           perl
-           perl-digest-sha1
-           perl-io-socket-ssl
-           perl-io-socket-inet6  ;; XXX: this is likely to be removed in a future ddclient release
-                                 ;; https://github.com/ddclient/ddclient/issues/461
-           perl-json))
-    (arguments
-     (list
-      #:configure-flags #~(list "--localstatedir=/var")
-      #:phases
-      #~(modify-phases %standard-phases
-          (replace 'install
-            (lambda _
-              ;; XXX: Do not create /var
-              (invoke "make" "localstatedir=/tmp/discard" "install")))
-          (add-after 'wrap 'wrap-ddclient
-            (lambda* (#:key inputs #:allow-other-keys)
-              (wrap-program (string-append #$output "/bin/ddclient")
-                `("PERL5LIB" ":" prefix ,(string-split (getenv "PERL5LIB") #\:))
-                `("PATH" prefix ,(map (lambda (x)
-                                        (string-append (assoc-ref inputs x) "/bin"))
-                                      '("inetutils" "net-tools")))))))))
-    (native-search-paths
-     (list $SSL_CERT_DIR $SSL_CERT_FILE))
-    (home-page "https://ddclient.net/")
-    (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.
-
-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+)))
-
 (define-public hnsd
    (package
      (name "hnsd")
diff --git a/gnu/packages/patches/ddclient-skip-test.patch b/gnu/packages/patches/ddclient-skip-test.patch
deleted file mode 100644
index 28d748997b..0000000000
--- a/gnu/packages/patches/ddclient-skip-test.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From e5657802025f238b39581534f3b4d408565c8943 Mon Sep 17 00:00:00 2001
-From: Bruno Victal <[email-masked]>
-Date: Sun, 5 Feb 2023 21:05:00 +0000
-Subject: [PATCH] Disable sandbox incompatible tests.
-
-See: https://github.com/ddclient/ddclient/issues/465
----
- t/get_ip_from_if.pl | 21 ---------------------
- 1 file changed, 21 deletions(-)
-
-diff --git a/t/get_ip_from_if.pl b/t/get_ip_from_if.pl
-index 6f08e5d..d78c3d0 100644
---- a/t/get_ip_from_if.pl
-+++ b/t/get_ip_from_if.pl
-@@ -39,25 +39,4 @@ subtest "get_ip_from_interface tests" => sub {
-     }
- };
- 
--subtest "Get default interface and IP for test system" => sub {
--    my $interface = ddclient::get_default_interface(4);
--    if ($interface) {
--        isnt($interface, "lo", "Check for loopback 'lo'");
--        isnt($interface, "lo0", "Check for loopback 'lo0'");
--        my $ip1 = ddclient::get_ip_from_interface("default", 4);
--        my $ip2 = ddclient::get_ip_from_interface($interface, 4);
--        is($ip1, $ip2, "Check IPv4 from default interface");
--        ok(ddclient::is_ipv4($ip1), "Valid IPv4 from get_ip_from_interface($interface)");
--    }
--    $interface = ddclient::get_default_interface(6);
--    if ($interface) {
--        isnt($interface, "lo", "Check for loopback 'lo'");
--        isnt($interface, "lo0", "Check for loopback 'lo0'");
--        my $ip1 = ddclient::get_ip_from_interface("default", 6);
--        my $ip2 = ddclient::get_ip_from_interface($interface, 6);
--        is($ip1, $ip2, "Check IPv6 from default interface");
--        ok(ddclient::is_ipv6($ip1), "Valid IPv6 from get_ip_from_interface($interface)");
--    }
--};
--
- done_testing();
--- 
-2.38.1
-
-- 
2.40.1