[sqitch] 04/04: Add upstream patch to use Digest::SHA
zeha at debian.org
zeha at debian.org
Tue Jul 22 15:50:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
zeha pushed a commit to branch master
in repository sqitch.
commit a1132fa6a344a8332f9b9a02d5a9df6816c587bb
Author: Christian Hofstaedtler <christian at hofstaedtler.name>
Date: Mon Jul 21 04:20:11 2014 +0200
Add upstream patch to use Digest::SHA
---
debian/changelog | 1 +
debian/control | 4 +-
debian/patches/digest-sha.patch | 187 ++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
4 files changed, 191 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 38272bf..cf74bb2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
sqitch (0.995-1) UNRELEASED; urgency=low
* Initial Release. (Closes: #751740)
+ * Add patch from upstream to use Digest::SHA instead of Digest::SHA1.
-- Christian Hofstaedtler <christian at hofstaedtler.name> Mon, 21 Jul 2014 03:58:53 +0200
diff --git a/debian/control b/debian/control
index c8406e9..f56a4bd 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Build-Depends-Indep: libcapture-tiny-perl (>= 0.12),
libdatetime-perl,
libdbi-perl,
libdevel-stacktrace-perl (>= 1.30),
- libdigest-sha1-perl,
+ libdigest-sha-perl,
libencode-locale-perl,
libfile-homedir-perl,
libhash-merge-perl,
@@ -55,7 +55,7 @@ Depends: libclone-perl,
libdatetime-perl,
libdbi-perl,
libdevel-stacktrace-perl (>= 1.30),
- libdigest-sha1-perl,
+ libdigest-sha-perl,
libencode-locale-perl,
libfile-homedir-perl,
libhash-merge-perl,
diff --git a/debian/patches/digest-sha.patch b/debian/patches/digest-sha.patch
new file mode 100644
index 0000000..7755ce8
--- /dev/null
+++ b/debian/patches/digest-sha.patch
@@ -0,0 +1,187 @@
+From 0571cabf3d7ef9e6e91811ab49f7759f330d314f Mon Sep 17 00:00:00 2001
+From: "David E. Wheeler" <david at justatheory.com>
+Date: Fri, 18 Jul 2014 14:49:48 -0700
+Subject: [PATCH] Switch from Digest::SHA1 to Digest::SHA.
+
+Resolves #176.
+---
+ Changes | 2 ++
+ dist/sqitch.spec | 4 ++--
+ lib/App/Sqitch/Plan/Change.pm | 8 ++++----
+ lib/App/Sqitch/Plan/Tag.pm | 8 ++++----
+ t/change.t | 10 +++++-----
+ t/tag.t | 10 +++++-----
+ 6 files changed, 22 insertions(+), 20 deletions(-)
+
+Index: sqitch/dist/sqitch.spec
+===================================================================
+--- sqitch.orig/dist/sqitch.spec
++++ sqitch/dist/sqitch.spec
+@@ -18,7 +18,7 @@ BuildRequires: perl(constant)
+ BuildRequires: perl(DateTime)
+ BuildRequires: perl(DBI)
+ BuildRequires: perl(Devel::StackTrace) >= 1.30
+-BuildRequires: perl(Digest::SHA1)
++BuildRequires: perl(Digest::SHA)
+ BuildRequires: perl(Encode)
+ BuildRequires: perl(Encode::Locale)
+ BuildRequires: perl(File::Basename)
+@@ -83,7 +83,7 @@ Requires: perl(Config::GitLike) >=
+ Requires: perl(constant)
+ Requires: perl(DateTime)
+ Requires: perl(Devel::StackTrace) >= 1.30
+-Requires: perl(Digest::SHA1)
++Requires: perl(Digest::SHA)
+ Requires: perl(Encode)
+ Requires: perl(Encode::Locale)
+ Requires: perl(File::Basename)
+Index: sqitch/lib/App/Sqitch/Plan/Change.pm
+===================================================================
+--- sqitch.orig/lib/App/Sqitch/Plan/Change.pm
++++ sqitch/lib/App/Sqitch/Plan/Change.pm
+@@ -149,8 +149,8 @@ has id => (
+ lazy => 1,
+ default => sub {
+ my $content = encode_utf8 shift->info;
+- require Digest::SHA1;
+- return Digest::SHA1->new->add(
++ require Digest::SHA;
++ return Digest::SHA->new(1)->add(
+ 'change ' . length($content) . "\0" . $content
+ )->hexdigest;
+ }
+@@ -178,8 +178,8 @@ has old_id => (
+ lazy => 1,
+ default => sub {
+ my $content = encode_utf8 shift->old_info;
+- require Digest::SHA1;
+- return Digest::SHA1->new->add(
++ require Digest::SHA;
++ return Digest::SHA->new(1)->add(
+ 'change ' . length($content) . "\0" . $content
+ )->hexdigest;
+ }
+Index: sqitch/lib/App/Sqitch/Plan/Tag.pm
+===================================================================
+--- sqitch.orig/lib/App/Sqitch/Plan/Tag.pm
++++ sqitch/lib/App/Sqitch/Plan/Tag.pm
+@@ -40,8 +40,8 @@ has id => (
+ lazy => 1,
+ default => sub {
+ my $content = encode_utf8 shift->info;
+- require Digest::SHA1;
+- return Digest::SHA1->new->add(
++ require Digest::SHA;
++ return Digest::SHA->new(1)->add(
+ 'tag ' . length($content) . "\0" . $content
+ )->hexdigest;
+ }
+@@ -72,8 +72,8 @@ has old_id => (
+ lazy => 1,
+ default => sub {
+ my $content = encode_utf8 shift->old_info;
+- require Digest::SHA1;
+- return Digest::SHA1->new->add(
++ require Digest::SHA;
++ return Digest::SHA->new(1)->add(
+ 'tag ' . length($content) . "\0" . $content
+ )->hexdigest;
+ }
+Index: sqitch/t/change.t
+===================================================================
+--- sqitch.orig/t/change.t
++++ sqitch/t/change.t
+@@ -15,7 +15,7 @@ use Locale::TextDomain qw(App-Sqitch);
+ use Test::Exception;
+ use Path::Class;
+ use File::Path qw(make_path remove_tree);
+-use Digest::SHA1;
++use Digest::SHA;
+ use Test::MockModule;
+ use URI;
+
+@@ -160,7 +160,7 @@ is $change->old_info, join("\n",
+ ), 'Old change info should be correct';
+ is $change->old_id, do {
+ my $content = encode_utf8 $change->old_info;
+- Digest::SHA1->new->add(
++ Digest::SHA->new(1)->add(
+ 'change ' . length($content) . "\0" . $content
+ )->hexdigest;
+ },'Old change ID should be correct';
+@@ -173,7 +173,7 @@ is $change->info, join("\n",
+ ), 'Change info should be correct';
+ is $change->id, do {
+ my $content = encode_utf8 $change->info;
+- Digest::SHA1->new->add(
++ Digest::SHA->new(1)->add(
+ 'change ' . length($content) . "\0" . $content
+ )->hexdigest;
+ },'Change ID should be correct';
+@@ -368,7 +368,7 @@ is $change2->old_info, join("\n",
+
+ is $change2->old_id, do {
+ my $content = Encode::encode_utf8 $change2->old_info;
+- Digest::SHA1->new->add(
++ Digest::SHA->new(1)->add(
+ 'change ' . length($content) . "\0" . $content
+ )->hexdigest;
+ },'Old change ID should be hashed from encoded UTF-8';
+@@ -383,7 +383,7 @@ is $change2->info, join("\n",
+
+ is $change2->id, do {
+ my $content = Encode::encode_utf8 $change2->info;
+- Digest::SHA1->new->add(
++ Digest::SHA->new(1)->add(
+ 'change ' . length($content) . "\0" . $content
+ )->hexdigest;
+ },'Change ID should be hashed from encoded UTF-8';
+Index: sqitch/t/tag.t
+===================================================================
+--- sqitch.orig/t/tag.t
++++ sqitch/t/tag.t
+@@ -11,7 +11,7 @@ use Path::Class;
+ use App::Sqitch;
+ use App::Sqitch::Plan;
+ use Test::MockModule;
+-use Digest::SHA1;
++use Digest::SHA;
+ use URI;
+
+ my $CLASS;
+@@ -141,7 +141,7 @@ is $tag->info, join("\n",
+
+ is $tag->id, do {
+ my $content = $tag->info;
+- Digest::SHA1->new->add(
++ Digest::SHA->new(1)->add(
+ 'tag ' . length($content) . "\0" . $content
+ )->hexdigest;
+ },'Tag ID should be correct';
+@@ -157,7 +157,7 @@ is $tag->old_info, join("\n",
+
+ is $tag->old_id, do {
+ my $content = $tag->old_info;
+- Digest::SHA1->new->add(
++ Digest::SHA->new(1)->add(
+ 'tag ' . length($content) . "\0" . $content
+ )->hexdigest;
+ },'Old tag ID should be correct';
+@@ -181,7 +181,7 @@ is $tag->info, join("\n",
+
+ is $tag->id, do {
+ my $content = Encode::encode_utf8 $tag->info;
+- Digest::SHA1->new->add(
++ Digest::SHA->new(1)->add(
+ 'tag ' . length($content) . "\0" . $content
+ )->hexdigest;
+ },'Tag ID should be hahsed from encoded UTF-8';
+@@ -197,7 +197,7 @@ is $tag->old_info, join("\n",
+
+ is $tag->old_id, do {
+ my $content = Encode::encode_utf8 $tag->old_info;
+- Digest::SHA1->new->add(
++ Digest::SHA->new(1)->add(
+ 'tag ' . length($content) . "\0" . $content
+ )->hexdigest;
+ },'Old tag ID should be hahsed from encoded UTF-8';
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..ba2b602
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+digest-sha.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/sqitch.git
More information about the Pkg-perl-cvs-commits
mailing list