Bug 266415

Summary: dns/ddclient: Update to v3.10 RC2
Product: Ports & Packages Reporter: David Schlachter <fbsd-bugzilla>
Component: Individual Port(s)Assignee: Fernando Apesteguía <fernape>
Status: Closed FIXED    
Severity: Affects Some People CC: diizzy, fernape, franco, j.kelly.hays, ldd, mjl
Priority: --- Flags: bugzilla: maintainer-feedback? (mjl)
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 267323    
Attachments:
Description Flags
Patch to update ddclient to v3.10 RC2
none
Patch for ddclient
none
update ddclient to 3.11.1
none
3.11.2
none
3.11.2 v2
none
3.11.2 with USES/cd removed mjl: maintainer-approval+

Description David Schlachter 2022-09-14 16:45:17 UTC
Created attachment 236556 [details]
Patch to update ddclient to v3.10 RC2

Since v3.9.1 of ddclient was released two years ago, two release candidates for v3.10 have been released. These include many bug fixes and support for new providers (see release notes: https://github.com/ddclient/ddclient/releases).

The attached patch updates the ddclient port to the latest release candidate from May of this year. Notable changes to the port:

- updated PORTVERSION to fit ports conventions for pre-releases (3.10.0.p2)
- updated dependencies (removed p5-Data-Validate-IP, added p5-JSON-PP)
- ddclient is no longer distributed as a simple script, rather, it's built with automake (GNU_CONFIGURE=yes)
- at some point, the project moved the default install path from /sbin to /bin (e.g. see https://github.com/ddclient/ddclient/commit/6b7800380c7f5ab8168e900dbb48f5e46936ebb6) I updated the port to use /bin, but could update it to stay in /sbin on FreeBSD if that makes sense
- I've kept the patches but removed sections that don't make sense anymore (e.g. paths are now set with configure rather than being hard-coded, fetch logic has changed and doesn't need path to certs, etc)

Please let me know if there's anything that needs to be changed before this could be merged.
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2022-09-15 19:44:42 UTC
Created attachment 236575 [details]
Patch for ddclient

Some minor fixups

Remove USES= tar:bzip2
Fix pkg-list
Use direct paths rather than using cd command
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2022-10-06 06:02:54 UTC
diizzy@, are you taking this?
Comment 3 Daniel Engberg freebsd_committer freebsd_triage 2022-10-06 19:52:39 UTC
Still waiting on feedback from either one
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2022-10-07 05:38:05 UTC
(In reply to Daniel Engberg from comment #3)
You can call feedback timeout. It's been more than 2 weeks.
Comment 5 mjl 2022-10-09 06:30:41 UTC
I (maintainer) tried Daniel's patch.  I am not 100% sure that it works.  The first time I ran it I got:

FAILED:   updating [redacted]: unexpected status (14)
Use of uninitialized value $h in hash element at /usr/local/bin/ddclient line 4080.
Use of uninitialized value $_[0] in sprintf at /usr/local/bin/ddclient line 2139.
WARNING:  updating : nochg: No update required; unnecessary attempts to change to the current address are considered abusive
Use of uninitialized value $h in hash element at /usr/local/bin/ddclient line 4089.
Use of uninitialized value $h in hash element at /usr/local/bin/ddclient line 4090.
Use of uninitialized value $h in hash element at /usr/local/bin/ddclient line 4091.
Use of uninitialized value $h in hash element at /usr/local/bin/ddclient line 4080.
Use of uninitialized value $_[0] in sprintf at /usr/local/bin/ddclient line 2139.
FAILED:   updating : unexpected status (0)
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.
Use of uninitialized value in string ne at /usr/local/bin/ddclient line 1133.

Second time:

WARNING:  skipping update of [redacted] from <nothing> to 118.93.169.166.
WARNING:  last updated <never> but last attempt on Sun Oct  9 19:19:31 2022 failed.
WARNING:  Wait at least 5 minutes between update attempts.

And via email 5 minutes later:

FAILED:   updating [redacted]: unexpected status (14)
WARNING:  updating : nochg: No update required; unnecessary attempts to change to the current address are considered abusive
FAILED:   updating : unexpected status (0)
FAILED:    was not updated because protocol <undefined> is not supported.

So I'm not sure that it works.  my dyndns updated two days prior to this.  @David: comments?
Comment 6 David Schlachter 2023-06-02 21:25:07 UTC
I have not tried Daniel's patch. However, today I rebuilt the machine where I was running this version of ddclient. I had been running the version from my original patch for the last year. The patch still applies cleanly and ddclient installed correctly. I just used it to update my IP address with CloudFlare.

When I have some time I may update my patch to the actual release of 3.10, but until then I'll just keep using RC2 personally.
Comment 7 Franco Fichtner 2023-11-15 13:36:47 UTC
3.11.1 is available now. Project picking up pace again and it looks promising.

I have a patch locally, but only if someone is willing do finally advance this.


Cheers,
Franco
Comment 8 Franco Fichtner 2023-11-15 13:38:31 UTC
FWIW, latest ports copy is here https://github.com/opnsense/ports/blob/master/opnsense/ddclient/Makefile
Comment 9 mjl 2023-11-17 04:16:43 UTC
I have tried out ddclient-3.11.1, according to the version in opnsense.  But ddclient is still buggy:

WARNING:  updating <redacted>: nochg: No update required; unnecessary attempts to change to the current address are considered abusive

This experience is not unique to me.  For example, on opnsense's forum:
https://forum.opnsense.org/index.php?topic=33267.0
https://github.com/ddclient/ddclient/issues/544

My previous suggestion in one of these ddclient tickets was for someone to create a ddclient-devel port, so that people who want to use new dynamic dns providers can use that port, without running the risk that other users of ddclient will find themselves blocked through no fault of their own.  I still think that is the correct approach for the time being.  I'll attach the patch I used locally as evidence that I am doing the best I can to maintain this port, but the patch should not be applied to this port (it is not maintainer approved).
Comment 10 mjl 2023-11-17 04:17:43 UTC
Created attachment 246367 [details]
update ddclient to 3.11.1

This patch should not be applied, it is not maintainer approved, even though I (the maintainer) submitted it.
Comment 11 Franco Fichtner 2023-11-22 11:55:15 UTC
Trying to sit this out forever is not going to change the broken code. ddclient had a rough time, ddclient-devel wasn't accepted/committed and blocking further merely based on a bug the maintainer has (without further info on which provider) is not helping.

I'm willing to look at the actual bug, but I'd need an login with the provider to test and fix. Throwing a PR over to ddclient is not an issue.


Cheers,
Franco
Comment 12 Franco Fichtner 2023-11-23 12:57:55 UTC
Created attachment 246514 [details]
3.11.2

Attached is the update to today's 3.11.2.
Comment 13 Fernando Apesteguía freebsd_committer freebsd_triage 2023-11-24 08:58:19 UTC
This one fails in poudriere.

Franco, could you have a look at it?

===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=root UID=0 GID=0
===>  Staging for ddclient-3.11.2
===>   ddclient-3.11.2 depends on package: p5-Data-Validate-IP>0 - found
===>   ddclient-3.11.2 depends on executable: curl - found
===>   ddclient-3.11.2 depends on package: perl5>=5.36<5.37 - found
===>   Generating temporary packing list
(cd /wrkdirs/usr/ports/dns/ddclient/work/ddclient-3.11.2 && install  -m 0644 ddclient.conf  /wrkdirs/usr/ports/dns/ddclient/work/stage/usr/local/etc/ddclient.conf.sample)
install: ddclient.conf: No such file or directory
*** Error code 71
Comment 14 Franco Fichtner 2023-11-24 09:55:08 UTC
Created attachment 246531 [details]
3.11.2 v2

Sorry, my mistake. The NO_BUILD=yes needs to be removed. I tried to reduce the diff between the repos too much.
Comment 15 Fernando Apesteguía freebsd_committer freebsd_triage 2023-11-24 13:54:17 UTC
(In reply to Franco Fichtner from comment #14)
Thanks!

This builds fine in {12.4,13.2}amd64 and current amd64.

Awaiting maintainer approval.
Comment 16 mjl 2023-11-24 18:43:21 UTC
Approved.
Comment 17 Daniel Engberg freebsd_committer freebsd_triage 2023-11-24 18:50:30 UTC
USES= tar:bzip2 is incorrect,
I would also advice to rework do-install section to not use "cd ..."
Comment 18 mjl 2023-11-24 19:08:28 UTC
Created attachment 246549 [details]
3.11.2 with USES/cd removed
Comment 19 Fernando Apesteguía freebsd_committer freebsd_triage 2023-11-24 19:41:13 UTC
Committed,

Thanks!
Comment 20 commit-hook freebsd_committer freebsd_triage 2023-11-24 19:41:27 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e37f7e5ab58f5d9f8f5a1a39b20f4c1bd7c50060

commit e37f7e5ab58f5d9f8f5a1a39b20f4c1bd7c50060
Author:     Franco Fichtner <franco@opnsense.org>
AuthorDate: 2023-11-24 11:30:38 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-11-24 19:40:20 +0000

    dns/ddclient: Update to v3.10 RC2

    PR:             266415
    Reported by:    fbsd-bugzilla@schlachter.ca
    Approved by:    mjl@luckie.org.nz (maintainer)

 dns/ddclient/Makefile                      | 27 ++++------
 dns/ddclient/distinfo                      |  6 +--
 dns/ddclient/files/patch-ddclient (gone)   | 85 ------------------------------
 dns/ddclient/files/patch-ddclient.in (new) | 77 +++++++++++++++++++++++++++
 dns/ddclient/pkg-plist (new)               |  3 ++
 5 files changed, 93 insertions(+), 105 deletions(-)
Comment 21 mjl 2023-11-24 22:21:05 UTC
You ended up committing the second-to-last patch that has the USES=tar:bz2 and cd in the do-install target.

I think 274033 can be closed now.
Comment 22 Fernando Apesteguía freebsd_committer freebsd_triage 2023-11-26 16:27:03 UTC
(In reply to mjl from comment #21)
Yeah, race condition. The previous patch was approved and I didn't notice the new patch.

If needed, could you please open a new PR with the changes that are pending?
Feel free to directly assign it to me.

Thanks!
Comment 23 ldd 2024-01-12 16:58:54 UTC
Comment on attachment 246549 [details]
3.11.2 with USES/cd removed

>diff -uNr ddclient/Makefile ddclient-new/Makefile
>--- ddclient/Makefile	2022-09-08 09:06:12.000000000 +1200
>+++ ddclient-new/Makefile	2023-11-25 08:06:09.934681000 +1300
>@@ -1,6 +1,6 @@
> PORTNAME=	ddclient
> DISTVERSIONPREFIX=	v
>-DISTVERSION=	3.9.1
>+DISTVERSION=	3.11.2
> CATEGORIES=	dns
> 
> MAINTAINER=	mjl@luckie.org.nz
>@@ -10,49 +10,42 @@
> LICENSE=	GPLv2+
> LICENSE_FILE=	${WRKSRC}/COPYING
> 
>-RUN_DEPENDS=	p5-Data-Validate-IP>0:net-mgmt/p5-Data-Validate-IP
>+BUILD_DEPENDS=	curl:ftp/curl
>+RUN_DEPENDS=	p5-Data-Validate-IP>0:net-mgmt/p5-Data-Validate-IP \
>+		curl:ftp/curl
> 
>-USES=		perl5 tar:bzip2
>+USES=		autoreconf gmake perl5
>+GNU_CONFIGURE=	yes
> USE_GITHUB=	yes
> USE_PERL5=	run
> USE_RC_SUBR=	${PORTNAME}
> 
> NO_ARCH=	yes
>-NO_BUILD=	yes
> SUB_FILES=	pkg-message ddclient_force
> 
>-PLIST_FILES=	"@sample(,,600) etc/ddclient.conf.sample" \
>-		etc/periodic/daily/ddclient_force \
>-		sbin/ddclient
>-PORTDOCS=	COPYRIGHT ChangeLog README.cisco README.ssl README.md \
>+PORTDOCS=	COPYRIGHT ChangeLog README.cisco README.md \
> 		sample-etc_cron.d_ddclient sample-etc_dhclient-exit-hooks \
> 		sample-etc_dhcpc_dhcpcd-eth0.exe sample-etc_ppp_ip-up.local
> 
>-OPTIONS_DEFINE=	SSL DOCS
>-OPTIONS_DEFAULT=SSL
>+OPTIONS_DEFINE=	DOCS
> 
>-SSL_RUN_DEPENDS=ca_root_nss>0:security/ca_root_nss \
>-		p5-IO-Socket-SSL>0:security/p5-IO-Socket-SSL
>-
> post-patch:
> 	@${GREP} -lR '/usr' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
> 		's|/usr|${PREFIX}|g'
> 	@${REINPLACE_CMD} -e 's|%%ETCDIR%%|${PREFIX}/etc| ; \
>-		 s|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/ddclient
>-	@${REINPLACE_CMD} -e '/^\#\!\/usr\/local\/local/d' \
>-		${WRKSRC}/ddclient
>+		 s|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/ddclient.in
> 
> do-install:
>-	(cd ${WRKSRC} && ${INSTALL_DATA} sample-etc_ddclient.conf \
>-		${STAGEDIR}${PREFIX}/etc/ddclient.conf.sample)
>-	(cd ${WRKSRC} && ${INSTALL_SCRIPT} ddclient \
>-		${STAGEDIR}${PREFIX}/sbin)
>+	${INSTALL_DATA} ${WRKSRC}/ddclient.conf \
>+		${STAGEDIR}${PREFIX}/etc/ddclient.conf.sample
>+	${INSTALL_SCRIPT} ${WRKSRC}/ddclient \
>+		${STAGEDIR}${PREFIX}/sbin
> 	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily
>-	(cd ${WRKDIR} && ${INSTALL_SCRIPT} ddclient_force \
>-		${STAGEDIR}${PREFIX}/etc/periodic/daily/ddclient_force)
>+	${INSTALL_SCRIPT} ${WRKDIR}/ddclient_force \
>+		${STAGEDIR}${PREFIX}/etc/periodic/daily/ddclient_force
> 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
> .for i in ${PORTDOCS}
>-	(cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR})
>+	${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
> .endfor
> 
> .include <bsd.port.mk>
>diff -uNr ddclient/distinfo ddclient-new/distinfo
>--- ddclient/distinfo	2020-10-28 03:26:24.000000000 +1300
>+++ ddclient-new/distinfo	2023-11-25 07:30:07.389866000 +1300
>@@ -1,3 +1,3 @@
>-TIMESTAMP = 1603527045
>-SHA256 (ddclient-ddclient-v3.9.1_GH0.tar.gz) = e4969e15cc491fc52bdcd649d4c2b0e4b1bf0c9f9dba23471c634871acc52470
>-SIZE (ddclient-ddclient-v3.9.1_GH0.tar.gz) = 63469
>+TIMESTAMP = 1700741617
>+SHA256 (ddclient-ddclient-v3.11.2_GH0.tar.gz) = 243cd832abd3cdd2b49903e1b5ed7f450e2d9c4c0eaf8ce4fe692c244d3afd77
>+SIZE (ddclient-ddclient-v3.11.2_GH0.tar.gz) = 278314
>diff -uNr ddclient/files/patch-ddclient ddclient-new/files/patch-ddclient
>--- ddclient/files/patch-ddclient	2018-07-08 06:54:31.000000000 +1200
>+++ ddclient-new/files/patch-ddclient	1970-01-01 12:00:00.000000000 +1200
>@@ -1,85 +0,0 @@
>---- ddclient.orig	2018-05-23 10:25:05 UTC
>-+++ ddclient
>-@@ -25,6 +25,7 @@ use Getopt::Long;
>- use Sys::Hostname;
>- use IO::Socket;
>- use Data::Validate::IP;
>-+use POSIX 'setsid';
>- 
>- my $version  = "3.8.3";
>- my $programd  = $0; 
>-@@ -33,9 +34,9 @@ my $program   = $programd;
>- $program  =~ s/d$//;
>- my $now       = time;
>- my $hostname  = hostname();
>--my $etc       = ($program =~ /test/i) ? './'   : '/etc/ddclient/';
>--my $cachedir  = ($program =~ /test/i) ? './'   : '/var/cache/ddclient/';
>--my $savedir   = ($program =~ /test/i) ? 'URL/' : '/tmp/';
>-+my $etc       = ($program =~ /test/i) ? './'   : '%%ETCDIR%%/';
>-+my $cachedir  = ($program =~ /test/i) ? './'   : '/var/tmp/';
>-+my $savedir   = ($program =~ /test/i) ? 'URL/' : '/var/tmp/';
>- my $msgs      = '';
>- my $last_msgs = '';
>- 
>-@@ -43,7 +44,7 @@ use vars qw($file $lineno);
>- local $file   = '';
>- local $lineno = '';
>- 
>--$ENV{'PATH'} = (exists($ENV{PATH}) ? "$ENV{PATH}:" : "") . "/sbin:/usr/sbin:/bin:/usr/bin:/etc:/usr/lib:";
>-+$ENV{'PATH'} = (exists($ENV{PATH}) ? "$ENV{PATH}:" : "") . "/sbin:/usr/sbin:/bin:";
>- 
>- sub T_ANY	{'any'};
>- sub T_STRING	{'string'};
>-@@ -792,6 +793,9 @@ if (opt('foreground') || opt('force')) {
>-     ;
>- } elsif (opt('daemon')) {
>-     $SIG{'CHLD'}   = 'IGNORE';
>-+    chdir '/';
>-+    open(STDIN,  "</dev/null");
>-+    open(STDOUT, ">/dev/null");
>-     my $pid = fork;
>-     if ($pid < 0) {
>- 	print STDERR "${program}: can not fork ($!)\n";
>-@@ -799,10 +803,9 @@ if (opt('foreground') || opt('force')) {
>-     } elsif ($pid) {
>- 	exit 0;
>-     }
>-+    setsid;
>-     $SIG{'CHLD'}   = 'DEFAULT';
>--    open(STDOUT, ">/dev/null");
>--    open(STDERR, ">/dev/null");
>--    open(STDIN,  "</dev/null");
>-+    open(STDERR, "&STDOUT");
>- }
>- 
>- # write out the pid file if we're daemon'ized
>-@@ -1595,17 +1598,17 @@ sub pipecmd {
>-     ## execute the command.
>-     local *FD;
>-     if (! open(FD, $cmd)) {
>--	printf STDERR "$program: cannot execute command %s.\n", $cmd;
>-+	warning("$program: cannot execute command %s.\n", $cmd);
>- 
>-     } elsif ($stdin && (! print FD "$stdin\n")) {
>--	printf STDERR "$program: failed writting to %s.\n", $cmd;
>-+	warning("$program: failed writing to %s.\n", $cmd);
>- 	close(FD);
>- 
>-     } elsif (! close(FD)) {
>--	printf STDERR "$program: failed closing %s.($@)\n", $cmd;
>-+	warning("$program: failed closing %s.($@)\n", $cmd);
>- 
>-     } elsif (opt('exec') && $?) {
>--	printf STDERR "$program: failed %s. ($@)\n", $cmd;
>-+	warning("$program: failed %s. ($@)\n", $cmd);
>- 
>-     } else {
>- 	$ok = 1;
>-@@ -2034,6 +2037,7 @@ sub geturl {
>- 	    $sd = IO::Socket::SSL->new(
>-             PeerAddr => $peer,
>-             PeerPort => $port,
>-+            SSL_ca_file => '%%LOCALBASE%%/share/certs/ca-root-nss.crt',
>-             Proto => 'tcp',
>-             MultiHomed => 1,
>-             Timeout => opt('timeout'),
>diff -uNr ddclient/files/patch-ddclient.in ddclient-new/files/patch-ddclient.in
>--- ddclient/files/patch-ddclient.in	1970-01-01 12:00:00.000000000 +1200
>+++ ddclient-new/files/patch-ddclient.in	2023-11-25 07:30:18.761372000 +1300
>@@ -0,0 +1,77 @@
>+--- ddclient.in.orig	2023-10-25 19:22:47 UTC
>++++ ddclient.in
>+@@ -20,6 +20,7 @@ use File::Path qw(make_path);
>+ use File::Temp;
>+ use Getopt::Long;
>+ use Sys::Hostname;
>++use POSIX 'setsid';
>+ 
>+ use version 0.77; our $VERSION = version->declare('3.11.2');
>+ my $version = $VERSION->stringify();
>+@@ -39,9 +40,9 @@ sub subst_var {
>+     return $subst;
>+ }
>+ 
>+-my $etc = subst_var('@sysconfdir@', '/etc/ddclient');
>+-my $cachedir = subst_var('@localstatedir@', '/var') . '/cache/ddclient';
>+-my $savedir = '/tmp';
>++my $etc = subst_var('@sysconfdir@', '/usr/local/etc');
>++my $cachedir = subst_var('@localstatedir@', '/var') . '/tmp';
>++my $savedir = '/var/tmp';
>+ if ($program =~ /test/i) {
>+     $etc = '.';
>+     $cachedir = '.';
>+@@ -59,7 +60,7 @@ use vars qw($file $lineno);
>+ local $file   = '';
>+ local $lineno = '';
>+ 
>+-$ENV{'PATH'} = (exists($ENV{PATH}) ? "$ENV{PATH}:" : "") . "/sbin:/usr/sbin:/bin:/usr/bin:/etc:/usr/lib:";
>++$ENV{'PATH'} = (exists($ENV{PATH}) ? "$ENV{PATH}:" : "") . "/sbin:/usr/local/sbin:/bin:";
>+ 
>+ our %globals;
>+ my ($result, %config, %cache);
>+@@ -1131,6 +1132,9 @@ sub main {
>+         ;
>+     } elsif (opt('daemon')) {
>+         $SIG{'CHLD'} = 'IGNORE';
>++        chdir '/';
>++        open(STDIN,  "</dev/null");
>++        open(STDOUT, ">/dev/null");
>+         my $pid = fork;
>+         if ($pid < 0) {
>+             print STDERR "${program}: can not fork ($!)\n";
>+@@ -1138,10 +1142,9 @@ sub main {
>+         } elsif ($pid) {
>+             exit 0;
>+         }
>++        setsid;
>+         $SIG{'CHLD'} = 'DEFAULT';
>+-        open(STDOUT, ">/dev/null");
>+-        open(STDERR, ">/dev/null");
>+-        open(STDIN,  "</dev/null");
>++        open(STDERR, "&STDOUT");
>+         write_pid();
>+     }
>+ 
>+@@ -2164,17 +2167,17 @@ sub pipecmd {
>+     ## execute the command.
>+     local *FD;
>+     if (!open(FD, $cmd)) {
>+-        printf STDERR "%s: cannot execute command %s.\n", $program, $cmd;
>++	warning("$program: cannot execute command %s.\n", $cmd);
>+ 
>+     } elsif ($stdin && (!print FD "$stdin\n")) {
>+-        printf STDERR "%s: failed writting to %s.\n", $program, $cmd;
>++	warning("$program: failed writing to %s.\n", $cmd);
>+         close(FD);
>+ 
>+     } elsif (!close(FD)) {
>+-        printf STDERR "%s: failed closing %s.(%s)\n", $program, $cmd, $@;
>++	warning("$program: failed closing %s.($@)\n", $cmd);
>+ 
>+     } elsif (opt('exec') && $?) {
>+-        printf STDERR "%s: failed %s. (%s)\n", $program, $cmd, $@;
>++	warning("$program: failed %s. ($@)\n", $cmd);
>+ 
>+     } else {
>+         $ok = 1;
>diff -uNr ddclient/pkg-plist ddclient-new/pkg-plist
>--- ddclient/pkg-plist	1970-01-01 12:00:00.000000000 +1200
>+++ ddclient-new/pkg-plist	2023-11-25 07:30:18.761637000 +1300
>@@ -0,0 +1,3 @@
>+@sample(,,600) etc/ddclient.conf.sample
>+etc/periodic/daily/ddclient_force
>+sbin/ddclient
Comment 24 ldd 2024-01-12 17:00:36 UTC
Sorry about the previous comment, didn't realize it would post in the thread.

Is there going to be another commit that brings in @mjl's latest patch that fixes the USES and cd in do-install?  I also noticed that the patch to ddclient.in declares the wrong version (thats what I tried to change in the previous attachment edit attempt):

$VERSION = version->declare('3.11.1');
Comment 25 mjl 2024-01-14 08:36:46 UTC
Hi ldd@rgnets.com


I've looked at the patch in the port, and ddclient.in in the source distribution, and I can see that you're right -- the version in the committed patch doesn't match what is in the distribution.  But, the patch seems to apply fine.  Can you please let me know if there's a problem with running ddclient related to this problem?

Thanks,

Matthew