Index: head/dns/ddclient/Makefile =================================================================== --- head/dns/ddclient/Makefile (revision 474117) +++ head/dns/ddclient/Makefile (revision 474118) @@ -1,55 +1,57 @@ # Created by: Dirk Froemberg # $FreeBSD$ PORTNAME= ddclient -PORTVERSION= 3.8.3 -PORTREVISION= 3 +DISTVERSIONPREFIX= v +DISTVERSION= 3.8.3-104 +DISTVERSIONSUFFIX= -gec2acfb CATEGORIES= dns -MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} MAINTAINER= mjl@luckie.org.nz COMMENT= Update dynamic DNS entries LICENSE= GPLv2 -NO_BUILD= yes +RUN_DEPENDS= p5-Data-Validate-IP>0:net-mgmt/p5-Data-Validate-IP USES= perl5 tar:bzip2 +USE_GITHUB= yes USE_PERL5= run - USE_RC_SUBR= ${PORTNAME} +NO_ARCH= yes +NO_BUILD= yes SUB_FILES= pkg-message ddclient_force OPTIONS_DEFINE= SSL OPTIONS_DEFAULT=SSL SSL_RUN_DEPENDS=ca_root_nss>0:security/ca_root_nss \ p5-IO-Socket-SSL>0:security/p5-IO-Socket-SSL PORTDOCS= COPYRIGHT ChangeLog README.cisco README.ssl README.md \ sample-etc_cron.d_ddclient sample-etc_dhclient-exit-hooks \ sample-etc_dhcpc_dhcpcd-eth0.exe sample-etc_ppp_ip-up.local PLIST_FILES= "@sample etc/ddclient.conf.sample" etc/periodic/daily/ddclient_force \ sbin/ddclient 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 do-install: (cd ${WRKSRC} && ${INSTALL_DATA} sample-etc_ddclient.conf \ ${STAGEDIR}${PREFIX}/etc/ddclient.conf.sample) (cd ${WRKSRC} && ${INSTALL_SCRIPT} ddclient \ ${STAGEDIR}${PREFIX}/sbin) @${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily (cd ${WRKDIR} && ${INSTALL_SCRIPT} ddclient_force \ ${STAGEDIR}${PREFIX}/etc/periodic/daily/ddclient_force) @${MKDIR} ${STAGEDIR}${DOCSDIR} .for i in ${PORTDOCS} (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR}) .endfor .include Index: head/dns/ddclient/distinfo =================================================================== --- head/dns/ddclient/distinfo (revision 474117) +++ head/dns/ddclient/distinfo (revision 474118) @@ -1,2 +1,3 @@ -SHA256 (ddclient-3.8.3.tar.bz2) = d40e2f1fd3f4bff386d27bbdf4b8645199b1995d27605a886b8c71e44d819591 -SIZE (ddclient-3.8.3.tar.bz2) = 49026 +TIMESTAMP = 1530988927 +SHA256 (ddclient-ddclient-v3.8.3-104-gec2acfb_GH0.tar.gz) = 116d30dee4d6ad9b07b6a7511ab218f9c73c10f807bfdfac2af65e7fddeaeced +SIZE (ddclient-ddclient-v3.8.3-104-gec2acfb_GH0.tar.gz) = 57944 Index: head/dns/ddclient/files/patch-ddclient =================================================================== --- head/dns/ddclient/files/patch-ddclient (revision 474117) +++ head/dns/ddclient/files/patch-ddclient (revision 474118) @@ -1,128 +1,85 @@ ---- ddclient.orig 2015-05-30 21:37:38.000000000 +1200 -+++ ddclient 2017-02-08 11:00:23.812579000 +1300 -@@ -25,6 +25,7 @@ - use Getopt::Long; +--- 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) = q$Revision: 184 $ =~ /(\d+)/; - -@@ -35,9 +36,9 @@ + 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 = ''; -@@ -45,7 +46,7 @@ +@@ -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'}; -@@ -743,6 +744,9 @@ +@@ -792,6 +793,9 @@ if (opt('foreground') || opt('force')) { ; } elsif (opt('daemon')) { $SIG{'CHLD'} = 'IGNORE'; + chdir '/'; + open(STDIN, "/dev/null"); my $pid = fork; if ($pid < 0) { print STDERR "${program}: can not fork ($!)\n"; -@@ -750,10 +754,9 @@ +@@ -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, "new( PeerAddr => $peer, PeerPort => $port, + SSL_ca_file => '%%LOCALBASE%%/share/certs/ca-root-nss.crt', Proto => 'tcp', MultiHomed => 1, Timeout => opt('timeout'), -@@ -4096,9 +4100,9 @@ - - # Strip header - $reply =~ s/^.*?\n\n//s; -- my $response = JSON::Any->jsonToObj($reply); -- if ($response->{result} eq 'error') { -- failed ("%s", $response->{msg}); -+ my $response = eval {decode_json($reply)}; -+ if (!defined $response || !defined $response->{result}) { -+ failed ("invalid json or result."); - next; - } - -@@ -4128,9 +4132,9 @@ - - # Strip header - $reply =~ s/^.*?\n\n//s; -- $response = JSON::Any->jsonToObj($reply); -- if ($response->{result} eq 'error') { -- failed ("%s", $response->{msg}); -+ $response = eval {decode_json($reply)}; -+ if (!defined $response || !defined $response->{result}) { -+ failed ("invalid json or result."); - } else { - success ("%s -- Updated Successfully to %s", $domain, $ip); -