[PATCH 0/2] Remove ddclient and its service.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Bruno Victal
Owner
unassigned
Submitted by
Bruno Victal
Severity
normal
B
B
Bruno Victal wrote on 16 Jul 2023 20:26
(address . guix-patches@gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
cover.1689531297.git.mirai@makinata.eu
ddclient has been archived by upstream [1] and the service in Guix
has been broken for a while [2]. It's unlikely that either will
receive fixes anytime soon, rather than ship a broken service and a
a package whose days are numbered, remove them.

In an attempt to ensure as little leftovers as possible I used:
git log --author='Oleg Pykhalov' --follow -- gnu/services/dns.scm
to track down which lines could be removed while accounting for the
copyright notice and modules imported.

Bruno Victal (2):
Revert "services: Add ddclient service."
Revert "gnu: Add ddclient."

doc/guix.texi | 107 ---------------------------
gnu/packages/dns.scm | 71 +-----------------
gnu/services/dns.scm | 168 +------------------------------------------
3 files changed, 3 insertions(+), 343 deletions(-)


base-commit: 796c823a0d1d0aec9f4af908eca462e58e5675b5
--
2.40.1
B
B
Bruno Victal wrote on 16 Jul 2023 20:29
[PATCH 1/2] Revert "services: Add ddclient service."
(address . 64669@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
683dc606aeb902eb572cbf7893f54dd7e39da229.1689532167.git.mirai@makinata.eu
ddclient is unmaintained as of 2023-07-04 [1] and this service has been broken
for a while [2]. Remove it rather than shipping a broken service for an
unmaintained program that's unlikely to be fixed.


This reverts commit 8490a8346b5c8207f5798be55bea1de865b0bd42.
---
doc/guix.texi | 107 ---------------------------
gnu/services/dns.scm | 168 +------------------------------------------
2 files changed, 1 insertion(+), 274 deletions(-)

Toggle diff (311 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 9af1b4417b..6467b09ff4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -32383,113 +32383,6 @@ DNS Services
@end table
@end deftp
-@subsubheading ddclient Service
-
-@cindex ddclient
-The ddclient service described below runs the ddclient daemon, which takes
-care of automatically updating DNS entries for service providers such as
-@uref{https://dyn.com/dns/, Dyn}.
-
-The following example show instantiates the service with its default
-configuration:
-
-@lisp
-(service ddclient-service-type)
-@end lisp
-
-Note that ddclient needs to access credentials that are stored in a
-@dfn{secret file}, by default @file{/etc/ddclient/secrets} (see
-@code{secret-file} below). You are expected to create this file manually, in
-an ``out-of-band'' fashion (you @emph{could} make this file part of the
-service configuration, for instance by using @code{plain-file}, but it will be
-world-readable @i{via} @file{/gnu/store}). See the examples in the
-@file{share/ddclient} directory of the @code{ddclient} package.
-
-@c %start of fragment
-
-Available @code{ddclient-configuration} fields are:
-
-@deftypevr {@code{ddclient-configuration} parameter} package ddclient
-The ddclient package.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} integer daemon
-The period after which ddclient will retry to check IP and domain name.
-
-Defaults to @samp{300}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} boolean syslog
-Use syslog for the output.
-
-Defaults to @samp{#t}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} string mail
-Mail to user.
-
-Defaults to @samp{"root"}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} string mail-failure
-Mail failed update to user.
-
-Defaults to @samp{"root"}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} string pid
-The ddclient PID file.
-
-Defaults to @samp{"/var/run/ddclient/ddclient.pid"}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} boolean ssl
-Enable SSL support.
-
-Defaults to @samp{#t}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} string user
-Specifies the user name or ID that is used when running ddclient
-program.
-
-Defaults to @samp{"ddclient"}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} string group
-Group of the user who will run the ddclient program.
-
-Defaults to @samp{"ddclient"}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} string secret-file
-Secret file which will be appended to @file{ddclient.conf} file. This
-file contains credentials for use by ddclient. You are expected to
-create it manually.
-
-Defaults to @samp{"/etc/ddclient/secrets.conf"}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} list extra-options
-Extra options will be appended to @file{ddclient.conf} file.
-
-Defaults to @samp{'()}.
-
-@end deftypevr
-
-
-@c %end of fragment
-
@node VNC Services
@subsection VNC Services
@cindex VNC (virtual network computing)
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm
index f45fc99c69..6608046909 100644
--- a/gnu/services/dns.scm
+++ b/gnu/services/dns.scm
@@ -1,6 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
-;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 Remco van 't Veer <remco@remworks.net>
@@ -53,10 +52,7 @@ (define-module (gnu services dns)
knot-resolver-configuration
dnsmasq-service-type
- dnsmasq-configuration
-
- ddclient-service-type
- ddclient-configuration))
+ dnsmasq-configuration))
;;;
;;; Knot DNS.
@@ -901,165 +897,3 @@ (define dnsmasq-service-type
dnsmasq-activation)))
(default-value (dnsmasq-configuration))
(description "Run the dnsmasq DNS server.")))
-
-
-;;;
-;;; ddclient
-;;;
-
-(define (uglify-field-name field-name)
- (string-delete #\? (symbol->string field-name)))
-
-(define (serialize-field field-name val)
- (when (not (member field-name '(group secret-file user)))
- (format #t "~a=~a\n" (uglify-field-name field-name) val)))
-
-(define (serialize-boolean field-name val)
- (serialize-field field-name (if val "yes" "no")))
-
-(define (serialize-integer field-name val)
- (serialize-field field-name (number->string val)))
-
-(define (serialize-string field-name val)
- (if (and (string? val) (string=? val ""))
- ""
- (serialize-field field-name val)))
-
-(define (serialize-list field-name val)
- (if (null? val) "" (serialize-field field-name (string-join val))))
-
-(define (serialize-extra-options extra-options)
- (string-join extra-options "\n" 'suffix))
-
-(define-configuration ddclient-configuration
- (ddclient
- (file-like ddclient)
- "The ddclient package.")
- (daemon
- (integer 300)
- "The period after which ddclient will retry to check IP and domain name.")
- (syslog
- (boolean #t)
- "Use syslog for the output.")
- (mail
- (string "root")
- "Mail to user.")
- (mail-failure
- (string "root")
- "Mail failed update to user.")
- (pid
- (string "/var/run/ddclient/ddclient.pid")
- "The ddclient PID file.")
- (ssl
- (boolean #t)
- "Enable SSL support.")
- (user
- (string "ddclient")
- "Specifies the user name or ID that is used when running ddclient
-program.")
- (group
- (string "ddclient")
- "Group of the user who will run the ddclient program.")
- (secret-file
- (string "/etc/ddclient/secrets.conf")
- "Secret file which will be appended to @file{ddclient.conf} file. This
-file contains credentials for use by ddclient. You are expected to create it
-manually.")
- (extra-options
- (list '())
- "Extra options will be appended to @file{ddclient.conf} file."))
-
-(define (ddclient-account config)
- "Return the user accounts and user groups for CONFIG."
- (let ((ddclient-user (ddclient-configuration-user config))
- (ddclient-group (ddclient-configuration-group config)))
- (list (user-group
- (name ddclient-group)
- (system? #t))
- (user-account
- (name ddclient-user)
- (system? #t)
- (group ddclient-group)
- (comment "ddclientd privilege separation user")
- (home-directory (string-append "/var/run/" ddclient-user))))))
-
-(define (ddclient-activation config)
- "Return the activation GEXP for CONFIG."
- (with-imported-modules '((guix build utils))
- #~(begin
- (use-modules (guix build utils)
- (ice-9 rdelim))
- (let ((ddclient-user
- (passwd:uid (getpw #$(ddclient-configuration-user config))))
- (ddclient-group
- (passwd:gid (getpw #$(ddclient-configuration-group config))))
- (ddclient-secret-file
- #$(ddclient-configuration-secret-file config)))
- ;; 'ddclient' complains about ddclient.conf file permissions, which
- ;; rules out /gnu/store. Thus we copy the ddclient.conf to /etc.
- (for-each (lambda (dir)
- (mkdir-p dir)
- (chmod dir #o700)
- (chown dir ddclient-user ddclient-group))
- '("/var/cache/ddclient" "/var/run/ddclient"
- "/etc/ddclient"))
- (with-output-to-file "/etc/ddclient/ddclient.conf"
- (lambda ()
- (display
- (string-append
- "# Generated by 'ddclient-service'.\n\n"
- #$(with-output-to-string
- (lambda ()
- (serialize-configuration config
- ddclient-configuration-fields)))
- (if (string-null? ddclient-secret-file)
- ""
- (format #f "\n\n# Appended from '~a'.\n\n~a"
- ddclient-secret-file
- (with-input-from-file ddclient-secret-file
- read-string)))))))
- (chmod "/etc/ddclient/ddclient.conf" #o600)
- (chown "/etc/ddclient/ddclient.conf"
- ddclient-user ddclient-group)))))
-
-(define (ddclient-shepherd-service config)
- "Return a <shepherd-service> for ddclient with CONFIG."
- (let ((ddclient (ddclient-configuration-ddclient config))
- (ddclient-pid (ddclient-configuration-pid config))
- (ddclient-user (ddclient-configuration-user config))
- (ddclient-group (ddclient-configuration-group config)))
- (list (shepherd-service
- (provision '(ddclient))
- (documentation "Run ddclient daemon.")
- (start #~(make-forkexec-constructor
- (list #$(file-append ddclient "/bin/ddclient")
- "-foreground"
- "-file" "/etc/ddclient/ddclient.conf")
- #:pid-file #$ddclient-pid
- #:environment-variables
- (list "SSL_CERT_DIR=/run/current-system/profile\
-/etc/ssl/certs"
- "SSL_CERT_FILE=/run/current-system/profile\
-/etc/ssl/certs/ca-certificates.crt")
- #:user #$ddclient-user
- #:group #$ddclient-group))
- (stop #~(make-kill-destructor))))))
-
-(define ddclient-service-type
- (service-type
- (name 'ddclient)
- (extensions
- (list (service-extension account-service-type
- ddclient-account)
- (service-extension shepherd-root-service-type
- ddclient-shepherd-service)
- (service-extension activation-service-type
- ddclient-activation)))
- (default-value (ddclient-configuration))
- (description "Configure address updating utility for dynamic DNS services,
-ddclient.")))
-
-(define (generate-ddclient-documentation)
- (generate-documentation
- `((ddclient-configuration ,ddclient-configuration-fields))
- 'ddclient-configuration))

base-commit: 796c823a0d1d0aec9f4af908eca462e58e5675b5
--
2.40.1
B
B
Bruno Victal wrote on 16 Jul 2023 20:29
[PATCH 2/2] Revert "gnu: Add ddclient."
(address . 64669@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
f3b8fb6a6a428880f606a0e9ea392f95abcf7b53.1689532167.git.mirai@makinata.eu
ddclient is unmaintained as of 2023-07-04 [1].
This reverts commit 0bc2d3e42b8800e875f24973f999739297f1f502.

---
gnu/packages/dns.scm | 71 ++------------------------------------------
1 file changed, 2 insertions(+), 69 deletions(-)

Toggle diff (98 lines)
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 <mbakke@fastmail.com>
;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
-;;; Copyright © 2018, 2022 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2022 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
@@ -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")
--
2.40.1
B
B
Bruno Victal wrote on 16 Jul 2023 20:47
[PATCH v2 2/2] gnu: ddclient: Remove package.
(address . 64669@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
27ceb1b710fc556ed17d622a9dbb87ab71d1dc86.1689533228.git.mirai@makinata.eu
ddclient is unmaintained as of 2023-07-04 [1].
This reverts changes related to
commit 0bc2d3e42b8800e875f24973f999739297f1f502.


* 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

Toggle diff (152 lines)
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 <mbakke@fastmail.com>
;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
-;;; Copyright © 2018, 2022 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2022 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
@@ -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 <mirai@makinata.eu>
-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
B
B
Bruno Victal wrote on 16 Jul 2023 20:47
[PATCH v2 1/2] Revert "services: Add ddclient service."
(address . 64669@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
683dc606aeb902eb572cbf7893f54dd7e39da229.1689533228.git.mirai@makinata.eu
ddclient is unmaintained as of 2023-07-04 [1] and this service has been broken
for a while [2]. Remove it rather than shipping a broken service for an
unmaintained program that's unlikely to be fixed.


This reverts commit 8490a8346b5c8207f5798be55bea1de865b0bd42.
---
doc/guix.texi | 107 ---------------------------
gnu/services/dns.scm | 168 +------------------------------------------
2 files changed, 1 insertion(+), 274 deletions(-)

Toggle diff (311 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 9af1b4417b..6467b09ff4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -32383,113 +32383,6 @@ DNS Services
@end table
@end deftp
-@subsubheading ddclient Service
-
-@cindex ddclient
-The ddclient service described below runs the ddclient daemon, which takes
-care of automatically updating DNS entries for service providers such as
-@uref{https://dyn.com/dns/, Dyn}.
-
-The following example show instantiates the service with its default
-configuration:
-
-@lisp
-(service ddclient-service-type)
-@end lisp
-
-Note that ddclient needs to access credentials that are stored in a
-@dfn{secret file}, by default @file{/etc/ddclient/secrets} (see
-@code{secret-file} below). You are expected to create this file manually, in
-an ``out-of-band'' fashion (you @emph{could} make this file part of the
-service configuration, for instance by using @code{plain-file}, but it will be
-world-readable @i{via} @file{/gnu/store}). See the examples in the
-@file{share/ddclient} directory of the @code{ddclient} package.
-
-@c %start of fragment
-
-Available @code{ddclient-configuration} fields are:
-
-@deftypevr {@code{ddclient-configuration} parameter} package ddclient
-The ddclient package.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} integer daemon
-The period after which ddclient will retry to check IP and domain name.
-
-Defaults to @samp{300}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} boolean syslog
-Use syslog for the output.
-
-Defaults to @samp{#t}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} string mail
-Mail to user.
-
-Defaults to @samp{"root"}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} string mail-failure
-Mail failed update to user.
-
-Defaults to @samp{"root"}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} string pid
-The ddclient PID file.
-
-Defaults to @samp{"/var/run/ddclient/ddclient.pid"}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} boolean ssl
-Enable SSL support.
-
-Defaults to @samp{#t}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} string user
-Specifies the user name or ID that is used when running ddclient
-program.
-
-Defaults to @samp{"ddclient"}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} string group
-Group of the user who will run the ddclient program.
-
-Defaults to @samp{"ddclient"}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} string secret-file
-Secret file which will be appended to @file{ddclient.conf} file. This
-file contains credentials for use by ddclient. You are expected to
-create it manually.
-
-Defaults to @samp{"/etc/ddclient/secrets.conf"}.
-
-@end deftypevr
-
-@deftypevr {@code{ddclient-configuration} parameter} list extra-options
-Extra options will be appended to @file{ddclient.conf} file.
-
-Defaults to @samp{'()}.
-
-@end deftypevr
-
-
-@c %end of fragment
-
@node VNC Services
@subsection VNC Services
@cindex VNC (virtual network computing)
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm
index f45fc99c69..6608046909 100644
--- a/gnu/services/dns.scm
+++ b/gnu/services/dns.scm
@@ -1,6 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
-;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 Remco van 't Veer <remco@remworks.net>
@@ -53,10 +52,7 @@ (define-module (gnu services dns)
knot-resolver-configuration
dnsmasq-service-type
- dnsmasq-configuration
-
- ddclient-service-type
- ddclient-configuration))
+ dnsmasq-configuration))
;;;
;;; Knot DNS.
@@ -901,165 +897,3 @@ (define dnsmasq-service-type
dnsmasq-activation)))
(default-value (dnsmasq-configuration))
(description "Run the dnsmasq DNS server.")))
-
-
-;;;
-;;; ddclient
-;;;
-
-(define (uglify-field-name field-name)
- (string-delete #\? (symbol->string field-name)))
-
-(define (serialize-field field-name val)
- (when (not (member field-name '(group secret-file user)))
- (format #t "~a=~a\n" (uglify-field-name field-name) val)))
-
-(define (serialize-boolean field-name val)
- (serialize-field field-name (if val "yes" "no")))
-
-(define (serialize-integer field-name val)
- (serialize-field field-name (number->string val)))
-
-(define (serialize-string field-name val)
- (if (and (string? val) (string=? val ""))
- ""
- (serialize-field field-name val)))
-
-(define (serialize-list field-name val)
- (if (null? val) "" (serialize-field field-name (string-join val))))
-
-(define (serialize-extra-options extra-options)
- (string-join extra-options "\n" 'suffix))
-
-(define-configuration ddclient-configuration
- (ddclient
- (file-like ddclient)
- "The ddclient package.")
- (daemon
- (integer 300)
- "The period after which ddclient will retry to check IP and domain name.")
- (syslog
- (boolean #t)
- "Use syslog for the output.")
- (mail
- (string "root")
- "Mail to user.")
- (mail-failure
- (string "root")
- "Mail failed update to user.")
- (pid
- (string "/var/run/ddclient/ddclient.pid")
- "The ddclient PID file.")
- (ssl
- (boolean #t)
- "Enable SSL support.")
- (user
- (string "ddclient")
- "Specifies the user name or ID that is used when running ddclient
-program.")
- (group
- (string "ddclient")
- "Group of the user who will run the ddclient program.")
- (secret-file
- (string "/etc/ddclient/secrets.conf")
- "Secret file which will be appended to @file{ddclient.conf} file. This
-file contains credentials for use by ddclient. You are expected to create it
-manually.")
- (extra-options
- (list '())
- "Extra options will be appended to @file{ddclient.conf} file."))
-
-(define (ddclient-account config)
- "Return the user accounts and user groups for CONFIG."
- (let ((ddclient-user (ddclient-configuration-user config))
- (ddclient-group (ddclient-configuration-group config)))
- (list (user-group
- (name ddclient-group)
- (system? #t))
- (user-account
- (name ddclient-user)
- (system? #t)
- (group ddclient-group)
- (comment "ddclientd privilege separation user")
- (home-directory (string-append "/var/run/" ddclient-user))))))
-
-(define (ddclient-activation config)
- "Return the activation GEXP for CONFIG."
- (with-imported-modules '((guix build utils))
- #~(begin
- (use-modules (guix build utils)
- (ice-9 rdelim))
- (let ((ddclient-user
- (passwd:uid (getpw #$(ddclient-configuration-user config))))
- (ddclient-group
- (passwd:gid (getpw #$(ddclient-configuration-group config))))
- (ddclient-secret-file
- #$(ddclient-configuration-secret-file config)))
- ;; 'ddclient' complains about ddclient.conf file permissions, which
- ;; rules out /gnu/store. Thus we copy the ddclient.conf to /etc.
- (for-each (lambda (dir)
- (mkdir-p dir)
- (chmod dir #o700)
- (chown dir ddclient-user ddclient-group))
- '("/var/cache/ddclient" "/var/run/ddclient"
- "/etc/ddclient"))
- (with-output-to-file "/etc/ddclient/ddclient.conf"
- (lambda ()
- (display
- (string-append
- "# Generated by 'ddclient-service'.\n\n"
- #$(with-output-to-string
- (lambda ()
- (serialize-configuration config
- ddclient-configuration-fields)))
- (if (string-null? ddclient-secret-file)
- ""
- (format #f "\n\n# Appended from '~a'.\n\n~a"
- ddclient-secret-file
- (with-input-from-file ddclient-secret-file
- read-string)))))))
- (chmod "/etc/ddclient/ddclient.conf" #o600)
- (chown "/etc/ddclient/ddclient.conf"
- ddclient-user ddclient-group)))))
-
-(define (ddclient-shepherd-service config)
- "Return a <shepherd-service> for ddclient with CONFIG."
- (let ((ddclient (ddclient-configuration-ddclient config))
- (ddclient-pid (ddclient-configuration-pid config))
- (ddclient-user (ddclient-configuration-user config))
- (ddclient-group (ddclient-configuration-group config)))
- (list (shepherd-service
- (provision '(ddclient))
- (documentation "Run ddclient daemon.")
- (start #~(make-forkexec-constructor
- (list #$(file-append ddclient "/bin/ddclient")
- "-foreground"
- "-file" "/etc/ddclient/ddclient.conf")
- #:pid-file #$ddclient-pid
- #:environment-variables
- (list "SSL_CERT_DIR=/run/current-system/profile\
-/etc/ssl/certs"
- "SSL_CERT_FILE=/run/current-system/profile\
-/etc/ssl/certs/ca-certificates.crt")
- #:user #$ddclient-user
- #:group #$ddclient-group))
- (stop #~(make-kill-destructor))))))
-
-(define ddclient-service-type
- (service-type
- (name 'ddclient)
- (extensions
- (list (service-extension account-service-type
- ddclient-account)
- (service-extension shepherd-root-service-type
- ddclient-shepherd-service)
- (service-extension activation-service-type
- ddclient-activation)))
- (default-value (ddclient-configuration))
- (description "Configure address updating utility for dynamic DNS services,
-ddclient.")))
-
-(define (generate-ddclient-documentation)
- (generate-documentation
- `((ddclient-configuration ,ddclient-configuration-fields))
- 'ddclient-configuration))

base-commit: 796c823a0d1d0aec9f4af908eca462e58e5675b5
--
2.40.1
L
L
Ludovic Courtès wrote on 17 Jul 2023 22:17
Re: bug#64669: [PATCH 0/2] Remove ddclient and its service.
(name . Bruno Victal)(address . mirai@makinata.eu)
87v8einvhf.fsf_-_@gnu.org
Hi Bruno,

(Cc: Oleg.)

Bruno Victal <mirai@makinata.eu> skribis:

Toggle quote (7 lines)
> ddclient is unmaintained as of 2023-07-04 [1] and this service has been broken
> for a while [2]. Remove it rather than shipping a broken service for an
> unmaintained program that's unlikely to be fixed.
>
> [1]: <https://github.com/ddclient/ddclient>
> [2]: <https://issues.guix.gnu.org/52770>

I sympathize with the goal, though I wonder if it would make sense to
give potential users a bit of time to weigh in (and perhaps take over
the project upstream, who knows?).

Oleg, WDYT?

Ludo’.
L
L
Ludovic Courtès wrote on 16 Aug 2023 23:20
(name . Bruno Victal)(address . mirai@makinata.eu)
877cpu3cqy.fsf_-_@gnu.org
Hi Bruno and Oleg,

Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (13 lines)
> Bruno Victal <mirai@makinata.eu> skribis:
>
>> ddclient is unmaintained as of 2023-07-04 [1] and this service has been broken
>> for a while [2]. Remove it rather than shipping a broken service for an
>> unmaintained program that's unlikely to be fixed.
>>
>> [1]: <https://github.com/ddclient/ddclient>
>> [2]: <https://issues.guix.gnu.org/52770>
>
> I sympathize with the goal, though I wonder if it would make sense to
> give potential users a bit of time to weigh in (and perhaps take over
> the project upstream, who knows?).

It’s now been one month, so I went ahead and pushed these as
1bd44b425b79e9da160b33a9b19d01973b44772e.

We discussed this on IRC today and I must say I’m not satisfied with the
process because potential users have no practical way to learn about
pending removals.

One suggestion that was made is to add a deprecation mechanism that,
instead of requiring a replacement for what’s being deprecated, would
take either #f or a (translatable) string explaining why it’s being
deprecated.

I guess we should implement that and document a guideline for removals,
as had already been proposed before. (Cc’ing maintainers for the
discussion.)

Thoughts?

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 64669@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 64669
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch