about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@gmail.com>2012-11-08 13:57:22 +0100
committerSander van der Burg <svanderburg@gmail.com>2012-11-08 13:57:22 +0100
commit4f7de7b5096fb40d4248c94d1179427173ae00f9 (patch)
tree7a74ad370b7afa8aa2492e0fa483401142536362
parentdec84b2bcdbb4929a822e4dc5fe45ad9571c8d1a (diff)
parent67f478d1ed11191b82ca2a0447230b804976f33a (diff)
downloadnixlib-4f7de7b5096fb40d4248c94d1179427173ae00f9.tar
nixlib-4f7de7b5096fb40d4248c94d1179427173ae00f9.tar.gz
nixlib-4f7de7b5096fb40d4248c94d1179427173ae00f9.tar.bz2
nixlib-4f7de7b5096fb40d4248c94d1179427173ae00f9.tar.lz
nixlib-4f7de7b5096fb40d4248c94d1179427173ae00f9.tar.xz
nixlib-4f7de7b5096fb40d4248c94d1179427173ae00f9.tar.zst
nixlib-4f7de7b5096fb40d4248c94d1179427173ae00f9.zip
Merge branch 'master' of github.com:NixOS/nixpkgs
-rw-r--r--pkgs/tools/networking/ddclient/ddclient-foreground.patch92
-rw-r--r--pkgs/tools/networking/ddclient/default.nix15
2 files changed, 22 insertions, 85 deletions
diff --git a/pkgs/tools/networking/ddclient/ddclient-foreground.patch b/pkgs/tools/networking/ddclient/ddclient-foreground.patch
index 954b3e1132fa..1ae3621f5079 100644
--- a/pkgs/tools/networking/ddclient/ddclient-foreground.patch
+++ b/pkgs/tools/networking/ddclient/ddclient-foreground.patch
@@ -1,80 +1,12 @@
-diff -rc ddclient-3.8.0/ddclient ddclient-3.8.0-new/ddclient
-*** ddclient-3.8.0/ddclient	2009-01-27 20:14:02.000000000 +0100
---- ddclient-3.8.0-new/ddclient	2009-09-16 12:56:43.720654327 +0200
-***************
-*** 307,313 ****
-  my %variables = (
-      'global-defaults'    => {
-  	'daemon'              => setv(T_DELAY, 0, 0, 1, 0,                    interval('60s')),
-! 	'file'                => setv(T_FILE,  0, 0, 1, "$etc$program.conf",  undef),
-  	'cache'               => setv(T_FILE,  0, 0, 1, "$cachedir$program.cache", undef),
-  	'pid'                 => setv(T_FILE,  0, 0, 1, "",                   undef),
-  	'proxy'               => setv(T_FQDNP, 0, 0, 1, '',                   undef),
---- 307,314 ----
-  my %variables = (
-      'global-defaults'    => {
-  	'daemon'              => setv(T_DELAY, 0, 0, 1, 0,                    interval('60s')),
-!         'foreground'          => setv(T_BOOL,  0, 0, 1, 0,                    undef),	
-!         'file'                => setv(T_FILE,  0, 0, 1, "$etc$program.conf",  undef),
-  	'cache'               => setv(T_FILE,  0, 0, 1, "$cachedir$program.cache", undef),
-  	'pid'                 => setv(T_FILE,  0, 0, 1, "",                   undef),
-  	'proxy'               => setv(T_FQDNP, 0, 0, 1, '',                   undef),
-***************
-*** 535,540 ****
---- 536,542 ----
-      "usage: ${program} [options]",
-      "options are:",
-      [ "daemon",      "=s", "-daemon delay         : run as a daemon, specify delay as an interval." ],
-+     [ "foreground",  "!",  "-foreground           : do not fork" ],
-      [ "proxy",       "=s", "-proxy host           : use 'host' as the HTTP proxy" ],
-      [ "server",      "=s", "-server host          : update DNS information on 'host'" ],
-      [ "protocol",    "=s", "-protocol type        : update protocol used" ],
-***************
-*** 623,629 ****
-  $SIG{'HUP'}    = sub { $caught_hup  = 1; };
-  $SIG{'TERM'}   = sub { $caught_term = 1; };
-  $SIG{'KILL'}   = sub { $caught_kill = 1; };
-! if (opt('daemon') && !opt('force')) {
-      $SIG{'CHLD'}   = 'IGNORE';
-      my $pid = fork;
-      if ($pid < 0) {
---- 625,634 ----
-  $SIG{'HUP'}    = sub { $caught_hup  = 1; };
-  $SIG{'TERM'}   = sub { $caught_term = 1; };
-  $SIG{'KILL'}   = sub { $caught_kill = 1; };
-! # don't fork() if foreground or force is on
-! if (opt('foreground') || opt('force')) {
-!     ;
-! } elsif (opt('daemon')) {
-      $SIG{'CHLD'}   = 'IGNORE';
-      my $pid = fork;
-      if ($pid < 0) {
-***************
-*** 633,644 ****
-  	exit 0;
-      }
-      $SIG{'CHLD'}   = 'DEFAULT';
--     $opt{'syslog'} = 1;
-      open(STDOUT, ">/dev/null");
-      open(STDERR, ">/dev/null");
-      open(STDIN,  "</dev/null");
-! 
-!     write_pid();
-  }
-  
-  umask 077;
---- 638,650 ----
-  	exit 0;
-      }
-      $SIG{'CHLD'}   = 'DEFAULT';
-      open(STDOUT, ">/dev/null");
-      open(STDERR, ">/dev/null");
-      open(STDIN,  "</dev/null");
-! }
-! if(opt('daemon')) {
-!      write_pid();
-!     $opt{'syslog'} = 1;
-  }
-  
-  umask 077;
-Only in ddclient-3.8.0-new: ddclient~
+diff -u ddclient-3.8.1/ddclient ddclient-3.8.1.patched/ddclient
+--- ddclient-3.8.1/ddclient	2011-07-11 23:04:21.000000000 +0200
++++ ddclient-3.8.1.patched/ddclient	2012-11-08 11:52:31.930647236 +0100
+@@ -574,7 +574,7 @@
+     "usage: ${program} [options]",
+     "options are:",
+     [ "daemon",      "=s", "-daemon delay         : run as a daemon, specify delay as an interval." ],
+-+     [ "foreground",  "!",  "-foreground           : do not fork" ],
++    [ "foreground",  "!",  "-foreground           : do not fork" ],
+     [ "proxy",       "=s", "-proxy host           : use 'host' as the HTTP proxy" ],
+     [ "server",      "=s", "-server host          : update DNS information on 'host'" ],
+     [ "protocol",    "=s", "-protocol type        : update protocol used" ],
diff --git a/pkgs/tools/networking/ddclient/default.nix b/pkgs/tools/networking/ddclient/default.nix
index e57ba489450f..22539657b1f1 100644
--- a/pkgs/tools/networking/ddclient/default.nix
+++ b/pkgs/tools/networking/ddclient/default.nix
@@ -1,17 +1,23 @@
-{buildPerlPackage, fetchurl, perl}:
+{buildPerlPackage, fetchurl, perlPackages, iproute}:
 
 buildPerlPackage {
-  name = "ddclient-3.8.0";
+  name = "ddclient-3.8.1";
 
   src = fetchurl {
-    url = mirror://sourceforge/ddclient/ddclient-3.8.0.tar.gz ;
-    sha256 = "1cqz6fwx8bcl7zdrvm6irh3bzs8858gkyficww9simyjmz7z3w48";
+    url = mirror://sourceforge/ddclient/ddclient-3.8.1.tar.gz ;
+    sha256 = "f22ac7b0ec78e310d7b88a1cf636e5c00360b2ed9c087f231b3522ef3e6295f2";
   };
 
+  buildInputs = [ perlPackages.IOSocketSSL ];
+
   patches = [ ./ddclient-foreground.patch ];
 
+  # Use iproute2 instead of ifconfig
   preConfigure = '' 
     touch Makefile.PL
+    substituteInPlace ddclient --replace 'in the output of ifconfig' 'in the output of ip addr show'
+    substituteInPlace ddclient --replace 'ifconfig -a' '${iproute}/sbin/ip addr show'
+    substituteInPlace ddclient --replace 'ifconfig $arg' '${iproute}/sbin/ip addr show $arg'
   ''; 
 
   installPhase = ''
@@ -20,5 +26,4 @@ buildPerlPackage {
   '';
 
   doCheck = false;
-
 }