FreeBSD Bugzilla – Attachment 193833 Details for
Bug 228600
dns/ddclient: to track CloudFlare API change (v4), update to the newest revision on GitHub
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
svn diff
ddclient-3.8.3.20180523.diff (text/plain), 4.56 KB, created by
Motomichi Matsuzaki
on 2018-05-30 04:24:21 UTC
(
hide
)
Description:
svn diff
Filename:
MIME Type:
Creator:
Motomichi Matsuzaki
Created:
2018-05-30 04:24:21 UTC
Size:
4.56 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 471115) >+++ Makefile (working copy) >@@ -2,10 +2,9 @@ > # $FreeBSD$ > > PORTNAME= ddclient >-PORTVERSION= 3.8.3 >-PORTREVISION= 3 >+PORTVERSION= 3.8.3.20180523 > CATEGORIES= dns >-MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} >+#MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} > > MAINTAINER= mjl@luckie.org.nz > COMMENT= Update dynamic DNS entries >@@ -12,11 +11,17 @@ > > LICENSE= GPLv2 > >+RUN_DEPENDS= p5-Data-Validate-IP>0:net-mgmt/p5-Data-Validate-IP >+ > NO_BUILD= yes > > USES= perl5 tar:bzip2 > USE_PERL5= run > >+USE_GITHUB= yes >+GH_ACCOUNT= ddclient >+GH_TAGNAME= ec2acfb >+ > USE_RC_SUBR= ${PORTNAME} > > SUB_FILES= pkg-message ddclient_force >Index: distinfo >=================================================================== >--- distinfo (revision 471115) >+++ distinfo (working copy) >@@ -1,2 +1,3 @@ >-SHA256 (ddclient-3.8.3.tar.bz2) = d40e2f1fd3f4bff386d27bbdf4b8645199b1995d27605a886b8c71e44d819591 >-SIZE (ddclient-3.8.3.tar.bz2) = 49026 >+TIMESTAMP = 1527645042 >+SHA256 (ddclient-ddclient-3.8.3.20180523-ec2acfb_GH0.tar.gz) = ac44b2fd15112c1896964bd6cb9b919bf68c2bca81deacc6f082497129fc5bf3 >+SIZE (ddclient-ddclient-3.8.3.20180523-ec2acfb_GH0.tar.gz) = 57924 >Index: files/patch-ddclient >=================================================================== >--- files/patch-ddclient (revision 471115) >+++ files/patch-ddclient (working copy) >@@ -1,14 +1,14 @@ >---- 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(); >@@ -21,7 +21,7 @@ > my $msgs = ''; > my $last_msgs = ''; > >-@@ -45,7 +46,7 @@ >+@@ -43,7 +44,7 @@ use vars qw($file $lineno); > local $file = ''; > local $lineno = ''; > >@@ -30,7 +30,7 @@ > > 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'; >@@ -40,7 +40,7 @@ > 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; > } >@@ -53,7 +53,7 @@ > } > > # write out the pid file if we're daemon'ized >-@@ -1544,17 +1547,17 @@ >+@@ -1595,17 +1598,17 @@ sub pipecmd { > ## execute the command. > local *FD; > if (! open(FD, $cmd)) { >@@ -75,24 +75,7 @@ > > } else { > $ok = 1; >-@@ -1878,13 +1881,13 @@ >- ## load_json_support >- ###################################################################### >- sub load_json_support { >-- my $json_loaded = eval {require JSON::Any}; >-+ my $json_loaded = eval {require JSON::PP}; >- unless ($json_loaded) { >- fatal(<<"EOM"); >--Error loading the Perl module JSON::Any needed for cloudflare update. >-+Error loading the Perl module JSON::PP needed for cloudflare update. >- EOM >- } >-- import JSON::Any; >-+ import JSON::PP (qw/decode_json/); >- } >- ###################################################################### >- ## geturl >-@@ -1957,6 +1960,7 @@ >+@@ -2034,6 +2037,7 @@ sub geturl { > $sd = IO::Socket::SSL->new( > PeerAddr => $peer, > PeerPort => $port, >@@ -100,29 +83,3 @@ > 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); >-
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 228600
: 193833