[rt-devel] RTx::Calendar bug and accompanying patch?

Martin Wheldon martin.wheldon at greenhills-it.co.uk
Tue Apr 23 15:18:29 EDT 2013


Hi Thomas,

On 2013-04-23 19:04, Thomas Sibley wrote:
> On 04/23/2013 01:14 AM, Martin Wheldon wrote:
>> Hi,
>>
>> I've just installed RTx::Calendar on a Debian Wheezy box using the
>> Debian packeged Digest::SHA perl module.
>> When I select the preferences link the module complains it is unable 
>> to
>> find the Digest::SHA1 module.
>
> The Makefile.PL for RTx::Calendar specifies a dependency on
> Digest::SHA1. Trying to satisfy it with Digest::SHA and getting a
> failure is not a bug.

Sorry, I haven't made myself clear, applying the patch works around the 
bug from what I can see
and the RTx::Calendar plugin works.

>
> Debian decided to aggressively drop Digest::SHA1 from their packages.
> You'll need to install it from CPAN or continue to use a local patch 
> to
> switch RTx::Calendar to Digest::SHA.  Many Perl packages Debian 
> provides
> are modified by them at install time to s/Digest::SHA1/Digest::SHA/g.
>
> Since Debian is forcing folks' hands on this, the RTx::Calendar dep
> should just get changed to Digest::SHA instead of attempting to load 
> it
> completely undeclared after ::SHA1 fails.

Completely agree. I've just removed the RTx::Calendars dependency on 
Digest::SHA1 please see below.

diff --git a/Makefile.PL b/Makefile.PL
index e2d9432..003724d 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -10,6 +10,7 @@ requires 'DateTime'      => 0;
  requires 'DateTime::Set' => 0;
  requires 'Data::ICal'    => 0;
  requires 'Date::ICal'    => 0;
+requires 'Digest::SHA'   => 0;

  no_index(package => 'RT::Interface::Web::Menu');

diff --git a/html/Prefs/Calendar.html b/html/Prefs/Calendar.html
index 2cf5d92..76ca3b6 100644
--- a/html/Prefs/Calendar.html
+++ b/html/Prefs/Calendar.html
@@ -99,7 +99,7 @@ href="<%$RT::WebPath . '/Search/Build.html'%>">the 
Query Builder</a>
  </&>

  <%INIT>
-use Digest::SHA1;
+use Digest::SHA;
  use RT::SavedSearches;

  my $title = loc("Calendar Prefs");
@@ -118,7 +118,7 @@ if ($HiddenField && $HiddenField eq 'Private') {
  }

  if (defined $ChangeURL) {
-  my @args = $object->SetAttribute(Name => 'ICalURL', Content => 
Digest::SHA1::sha1_base64(time));
+  my @args = $object->SetAttribute(Name => 'ICalURL', Content => 
Digest::SHA::sha1_base64(time));
  } elsif (defined $ResetURL) {
    my @args = $object->DeleteAttribute('ICalURL');
  }



Best Regards

Martin



More information about the rt-devel mailing list