FreeBSD Bugzilla – Attachment 236556 Details for
Bug 266415
dns/ddclient: Update to v3.10 RC2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to update ddclient to v3.10 RC2
ddclient-3.10_2.patch (text/plain), 9.84 KB, created by
David Schlachter
on 2022-09-14 16:45:17 UTC
(
hide
)
Description:
Patch to update ddclient to v3.10 RC2
Filename:
MIME Type:
Creator:
David Schlachter
Created:
2022-09-14 16:45:17 UTC
Size:
9.84 KB
patch
obsolete
>From 1c50dc40c8e4faac5e2a2fe1698ffa6420adddcd Mon Sep 17 00:00:00 2001 >From: David Schlachter <github@schlachter.ca> >Date: Wed, 14 Sep 2022 12:34:21 -0400 >Subject: [PATCH] dns/ddclient: update to 3.10 RC2 > >--- > dns/ddclient/Makefile | 52 ++++++------ > dns/ddclient/distinfo | 6 +- > dns/ddclient/files/ddclient.in | 2 +- > dns/ddclient/files/ddclient_force.in | 3 +- > dns/ddclient/files/patch-ddclient | 114 ++++++++++----------------- > dns/ddclient/files/pkg-message.in | 1 + > dns/ddclient/pkg-plist | 3 + > 7 files changed, 76 insertions(+), 105 deletions(-) > create mode 100644 dns/ddclient/pkg-plist > >diff --git a/dns/ddclient/Makefile b/dns/ddclient/Makefile >index 6e088dad7e35..c1dd404385e4 100644 >--- a/dns/ddclient/Makefile >+++ b/dns/ddclient/Makefile >@@ -1,6 +1,5 @@ > PORTNAME= ddclient >-DISTVERSIONPREFIX= v >-DISTVERSION= 3.9.1 >+PORTVERSION= 3.10.0.p2 > CATEGORIES= dns > > MAINTAINER= mjl@luckie.org.nz >@@ -10,43 +9,37 @@ WWW= https://github.com/ddclient/ddclient > LICENSE= GPLv2+ > LICENSE_FILE= ${WRKSRC}/COPYING > >-RUN_DEPENDS= p5-Data-Validate-IP>0:net-mgmt/p5-Data-Validate-IP >+RUN_DEPENDS= p5-JSON-PP>0:converters/p5-JSON-PP > >-USES= perl5 tar:bzip2 >-USE_GITHUB= yes >-USE_PERL5= run >-USE_RC_SUBR= ${PORTNAME} >+USES= autoreconf perl5 tar:bzip2 >+USE_AUTOCONF_VER= 259 >+USE_PERL5= run >+USE_RC_SUBR= ${PORTNAME} >+USE_GITHUB= yes >+GH_TAGNAME= v3.10.0_2 >+ >+GNU_CONFIGURE= yes > > NO_ARCH= yes >-NO_BUILD= yes >-SUB_FILES= pkg-message ddclient_force >+SUB_FILES= ddclient_force pkg-message > >-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= CONTRIBUTING.md COPYRIGHT ChangeLog.md README.cisco README.md \ >+ README.ssl sample-ddclient-wrapper.sh \ > 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 >+ sample-etc_dhcpc_dhcpcd-eth0.exe sample-etc_ppp_ip-up.local \ >+ sample-etc_rc.d_ddclient.freebsd sample-get-ip-from-fritzbox > >-SSL_RUN_DEPENDS=ca_root_nss>0:security/ca_root_nss \ >- p5-IO-Socket-SSL>0:security/p5-IO-Socket-SSL >+OPTIONS_DEFINE= DOCS SSL >+OPTIONS_DEFAULT= 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 >+SSL_RUN_DEPENDS= ca_root_nss>0:security/ca_root_nss \ >+ p5-IO-Socket-SSL>0:security/p5-IO-Socket-SSL > > do-install: >- (cd ${WRKSRC} && ${INSTALL_DATA} sample-etc_ddclient.conf \ >+ (cd ${WRKSRC} && ${INSTALL_DATA} ddclient.conf \ > ${STAGEDIR}${PREFIX}/etc/ddclient.conf.sample) > (cd ${WRKSRC} && ${INSTALL_SCRIPT} ddclient \ >- ${STAGEDIR}${PREFIX}/sbin) >+ ${STAGEDIR}${PREFIX}/bin) > @${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily > (cd ${WRKDIR} && ${INSTALL_SCRIPT} ddclient_force \ > ${STAGEDIR}${PREFIX}/etc/periodic/daily/ddclient_force) >@@ -55,4 +48,7 @@ do-install: > (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR}) > .endfor > >+post-install: >+ ${MKDIR} ${STAGEDIR}/var/cache/ddclient >+ > .include <bsd.port.mk> >diff --git a/dns/ddclient/distinfo b/dns/ddclient/distinfo >index 49940f28bde9..6b3dce2779a3 100644 >--- a/dns/ddclient/distinfo >+++ b/dns/ddclient/distinfo >@@ -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 = 1662773732 >+SHA256 (ddclient-ddclient-3.10.0.p2-v3.10.0_2_GH0.tar.gz) = 3463ef12d36b421091fd761ac34a62c40fedc9dc7425f77349a052eb49c7dff5 >+SIZE (ddclient-ddclient-3.10.0.p2-v3.10.0_2_GH0.tar.gz) = 274330 >diff --git a/dns/ddclient/files/ddclient.in b/dns/ddclient/files/ddclient.in >index 611579ce68cd..01b2dec23a5a 100644 >--- a/dns/ddclient/files/ddclient.in >+++ b/dns/ddclient/files/ddclient.in >@@ -17,7 +17,7 @@ > name="ddclient" > rcvar=ddclient_enable > >-command="%%PREFIX%%/sbin/${name}" >+command="%%PREFIX%%/bin/${name}" > required_files="%%PREFIX%%/etc/${name}.conf" > > load_rc_config ${name} >diff --git a/dns/ddclient/files/ddclient_force.in b/dns/ddclient/files/ddclient_force.in >index 4564a2f6ac7e..f2440b63a4e7 100644 >--- a/dns/ddclient/files/ddclient_force.in >+++ b/dns/ddclient/files/ddclient_force.in >@@ -22,7 +22,7 @@ case "$daily_ddclient_force_enable" in > sleep `jot -r 1 0 900` > fi > >- %%PREFIX%%/sbin/ddclient -force || rc=3 >+ %%PREFIX%%/bin/ddclient -force || rc=3 > ;; > *) > rc=0 >@@ -30,3 +30,4 @@ case "$daily_ddclient_force_enable" in > esac > > exit $rc >+ >diff --git a/dns/ddclient/files/patch-ddclient b/dns/ddclient/files/patch-ddclient >index 45d08058741a..1d27246b5ad6 100644 >--- a/dns/ddclient/files/patch-ddclient >+++ b/dns/ddclient/files/patch-ddclient >@@ -1,85 +1,55 @@ >---- ddclient.orig 2018-05-23 10:25:05 UTC >-+++ ddclient >-@@ -25,6 +25,7 @@ use Getopt::Long; >+--- ddclient.in.orig 2022-05-15 20:12:34.000000000 -0400 >++++ ddclient.in >+@@ -29,6 +29,7 @@ >+ use IO::Socket::INET; >+ use Socket qw(AF_INET AF_INET6 PF_INET PF_INET6); > 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; >+ use version 0.77; our $VERSION = version->declare('v3.10.0_2'); >+ (my $version = $VERSION->stringify()) =~ s/^v//; >+@@ -1022,6 +1023,9 @@ >+ ; >+ } 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"; >+@@ -1029,10 +1033,9 @@ >+ } 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(); > } >-+ 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 { >+@@ -2011,17 +2014,17 @@ > ## 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); >+ if (!open(FD, $cmd)) { >+- printf STDERR "%s: cannot execute command %s.\n", $program, $cmd; >++ warning("%s: cannot execute command %s.\n", $program, $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 ($stdin && (!print FD "$stdin\n")) { >+- printf STDERR "%s: failed writting to %s.\n", $program, $cmd; >++ warning("%s: failed writting to %s.\n", $program, $cmd); >+ close(FD); > >- } elsif (! close(FD)) { >-- printf STDERR "$program: failed closing %s.($@)\n", $cmd; >-+ warning("$program: failed closing %s.($@)\n", $cmd); >+ } elsif (!close(FD)) { >+- printf STDERR "%s: failed closing %s.(%s)\n", $program, $cmd, $@; >++ warning("%s: failed closing %s.(%s)\n", $program, $cmd, $@); > > } elsif (opt('exec') && $?) { >-- printf STDERR "$program: failed %s. ($@)\n", $cmd; >-+ warning("$program: failed %s. ($@)\n", $cmd); >+- printf STDERR "%s: failed %s. (%s)\n", $program, $cmd, $@; >++ warning("%s: failed %s. (%s)\n", $program, $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'), >+ $ok = 1; >diff --git a/dns/ddclient/files/pkg-message.in b/dns/ddclient/files/pkg-message.in >index 226e65398842..581527bb6002 100644 >--- a/dns/ddclient/files/pkg-message.in >+++ b/dns/ddclient/files/pkg-message.in >@@ -18,3 +18,4 @@ your /etc/periodic.conf > EOM > } > ] >+ >diff --git a/dns/ddclient/pkg-plist b/dns/ddclient/pkg-plist >new file mode 100644 >index 000000000000..b77b5ce03532 >--- /dev/null >+++ b/dns/ddclient/pkg-plist >@@ -0,0 +1,3 @@ >+bin/ddclient >+@dir /var/cache/ddclient >+@sample(,,600) etc/ddclient.conf.sample etc/ddclient.conf >-- >2.37.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 266415
: 236556 |
236575
|
246367
|
246514
|
246531
|
246549