Package: ddclient
Version: 3.8.1-1.1
Severity: normal
Tags: patch
Hi,
sorry for the second bugreport about this but the BTS seems slow today and
I want to send this before I go home.
libdigst-sha1-perl was in squeeze but was then merged into perl as part
of Digest::SHA (not Digest::SHA1). It is also only used in ddclient with
the freedns protocol. The attached patch tries to open Digest::SHA first,
then tries Digest::SHA1 and gives an error message if that also fails.
MfG
Goswin
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash
Versions of packages ddclient depends on:
ii debconf [debconf-2.0] 1.5.49 Debian configuration management sy
ii initscripts 2.88dsf-12 scripts for initializing and shutt
ii lsb-base 4.1+Debian8 Linux Standard Base 4.1 init scrip
ii perl [perl5] 5.14.2-21 Larry Wall's Practical Extraction
Versions of packages ddclient recommends:
ii libio-socket-ssl-perl 1.76-2 Perl module implementing object or
ddclient suggests no packages.
-- debconf information excluded
--- ddclient.old 2014-04-23 17:02:21.000000000 +0200
+++ ddclient 2014-04-23 17:11:24.000000000 +0200
@@ -1783,14 +1783,21 @@
## load_sha1_support
######################################################################
sub load_sha1_support {
- my $sha1_loaded = eval {require Digest::SHA1};
- unless ($sha1_loaded) {
- fatal(<<"EOM");
+ my $sha1_loaded = eval {require Digest::SHA};
+ if ($sha1_loaded) {
+ import Digest::SHA (qw/sha1_hex/);
+ } else {
+ $sha1_loaded = eval {require Digest::SHA1};
+ if ($sha1_loaded) {
+ import Digest::SHA1 (qw/sha1_hex/);
+ } else {
+ fatal(<<"EOM");
Error loading the Perl module Digest::SHA1 needed for freedns update.
-On Debian, the package libdigest-sha1-perl must be installed.
+On Debian Squeeze, the package libdigest-sha1-perl must be installed.
+Newer perl versions provide this as part of Digest:SHA.
EOM
+ }
}
- import Digest::SHA1 (qw/sha1_hex/);
}
######################################################################
## geturl