tags 625903 + patch
thanks

Dear Sam Hartman,

I've prepared an NMU for barnowl (versioned as 1.6.2-1.1) to use
Digest::SHA instead of Digest::SHA1. Would it be possible to apply
this if you agree?

Regards.
Salvatore
diff -Nru barnowl-1.6.2/debian/changelog barnowl-1.6.2/debian/changelog
--- barnowl-1.6.2/debian/changelog	2010-08-18 00:48:40.000000000 +0200
+++ barnowl-1.6.2/debian/changelog	2011-08-04 21:05:50.000000000 +0200
@@ -1,3 +1,12 @@
+barnowl (1.6.2-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Add patch use-Digest-SHA.patch to use Digest::SHA from perl core instead
+    of Digest::SHA1. Drop libdigest-sha1-perl Depends in debian/control
+    (Closes: #625903).
+
+ -- Salvatore Bonaccorso <[email protected]>  Thu, 04 Aug 2011 21:05:01 +0200
+
 barnowl (1.6.2-1) unstable; urgency=low
 
   * New Upstream version
diff -Nru barnowl-1.6.2/debian/control barnowl-1.6.2/debian/control
--- barnowl-1.6.2/debian/control	2010-08-18 00:48:40.000000000 +0200
+++ barnowl-1.6.2/debian/control	2011-08-04 21:04:50.000000000 +0200
@@ -10,7 +10,7 @@
 
 Package: barnowl
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, ${perl:Depends}, libnet-dns-perl, libauthen-sasl-perl, libdigest-sha1-perl, libgssapi-perl, 
+Depends: ${misc:Depends}, ${shlibs:Depends}, ${perl:Depends}, libnet-dns-perl, libauthen-sasl-perl, libgssapi-perl, 
      libio-socket-ssl-perl, libpar-perl, libtext-autoformat-perl, libnet-irc-perl,  libclass-accessor-perl
 Provides: barnowl-irc
 Conflicts: barnowl-irc
diff -Nru barnowl-1.6.2/debian/patches/series barnowl-1.6.2/debian/patches/series
--- barnowl-1.6.2/debian/patches/series	2010-08-18 00:48:40.000000000 +0200
+++ barnowl-1.6.2/debian/patches/series	2011-08-04 21:04:24.000000000 +0200
@@ -1 +1,2 @@
 0001-Add-.gbp.conf-and-.gitignore.patch
+use-Digest-SHA.patch
diff -Nru barnowl-1.6.2/debian/patches/use-Digest-SHA.patch barnowl-1.6.2/debian/patches/use-Digest-SHA.patch
--- barnowl-1.6.2/debian/patches/use-Digest-SHA.patch	1970-01-01 01:00:00.000000000 +0100
+++ barnowl-1.6.2/debian/patches/use-Digest-SHA.patch	2011-08-04 21:16:20.000000000 +0200
@@ -0,0 +1,98 @@
+Description: Use Digest::SHA from perl core instead Digest::SHA1
+ allowing to drop libdigest-sha1-perl from Depends.
+ See: http://bugs.debian.org/594273
+Origin: vendor
+Bug: http://bugs.debian.org/625903
+Forwarded: no
+Author: Salvatore Bonaccorso <[email protected]>
+Last-Update: 2011-08-04
+
+--- a/perl/modules/Jabber/lib/Net/Jabber/Key.pm
++++ b/perl/modules/Jabber/lib/Net/Jabber/Key.pm
+@@ -103,14 +103,14 @@
+     
+     $self->{CACHE} = {};
+ 
+-    if (eval "require Digest::SHA1")
++    if (eval "require Digest::SHA")
+     {
+         $self->{DIGEST} = 1;
+-        Digest::SHA1->import(qw(sha1 sha1_hex sha1_base64));
++        Digest::SHA->import(qw(sha1 sha1_hex sha1_base64));
+     }
+     else
+     {
+-        print "ERROR:  You cannot use Key.pm unless you have Digest::SHA1 installed.\n";
++        print "ERROR:  You cannot use Key.pm unless you have Digest::SHA installed.\n";
+         exit(0);
+     }
+ 
+@@ -131,7 +131,7 @@
+     my $self = shift;
+ 
+     my $string = $$.time.rand(1000000);
+-    $string = Digest::SHA1::sha1_hex($string);
++    $string = Digest::SHA::sha1_hex($string);
+     $self->{DEBUG}->Log1("Generate: key($string)");
+     return $string;
+ }
+--- a/perl/modules/Jabber/lib/Net/Jabber/Component.pm
++++ b/perl/modules/Jabber/lib/Net/Jabber/Component.pm
+@@ -219,7 +219,7 @@
+     
+     $self->{STREAM}->SetCallBacks(node=>undef);
+ 
+-    $self->Send("<handshake>".Digest::SHA1::sha1_hex($self->{SESSION}->{id}.$args{secret})."</handshake>");
++    $self->Send("<handshake>".Digest::SHA::sha1_hex($self->{SESSION}->{id}.$args{secret})."</handshake>");
+     my $handshake = $self->Process();
+ 
+     if (!defined($handshake) ||
+--- a/perl/modules/Jabber/lib/Net/XMPP.pm
++++ b/perl/modules/Jabber/lib/Net/XMPP.pm
+@@ -212,7 +212,7 @@
+ use XML::Stream 1.22 qw( Node );
+ use Time::Local;
+ use Carp;
+-use Digest::SHA1;
++use Digest::SHA;
+ use Authen::SASL;
+ use MIME::Base64;
+ use POSIX;
+--- a/perl/modules/Jabber/lib/Net/XMPP/Protocol.pm
++++ b/perl/modules/Jabber/lib/Net/XMPP/Protocol.pm
+@@ -1848,12 +1848,12 @@
+     #--------------------------------------------------------------------------
+     if ($authType eq "zerok")
+     {
+-        my $hashA = Digest::SHA1::sha1_hex($password);
+-        $args{hash} = Digest::SHA1::sha1_hex($hashA.$token);
++        my $hashA = Digest::SHA::sha1_hex($password);
++        $args{hash} = Digest::SHA::sha1_hex($hashA.$token);
+ 
+         for (1..$sequence)
+         {
+-            $args{hash} = Digest::SHA1::sha1_hex($args{hash});
++            $args{hash} = Digest::SHA::sha1_hex($args{hash});
+         }
+     }
+ 
+@@ -1867,7 +1867,7 @@
+     #--------------------------------------------------------------------------
+     if ($authType eq "digest")
+     {
+-        $args{digest} = Digest::SHA1::sha1_hex($self->GetStreamID().$password);
++        $args{digest} = Digest::SHA::sha1_hex($self->GetStreamID().$password);
+     }
+ 
+     #--------------------------------------------------------------------------
+--- a/README
++++ b/README
+@@ -21,7 +21,7 @@
+ Net::DNS
+ Authen::SASL::Perl
+ IO::Socket::SSL
+-Digest::SHA1
++Digest::SHA
+ 
+ (Note that these are all available as Debian packages)
+ We plan to soon add targets to the Makefile to check for and install

Attachment: signature.asc
Description: Digital signature

Reply via email to