Use Digest::SHA built into perl rather than external Digest::SHA1 to simplify dependencies. Closes: #591040

master
Joey Hess 2010-07-31 15:54:25 -04:00
parent d1a5d00156
commit fee00fdb7a
10 changed files with 13 additions and 13 deletions

View File

@ -16,7 +16,6 @@ perl -MCPAN -e 'install Bundle::IkiWiki::Extras'
=head1 CONTENTS
Digest::SHA1
Authen::Passphrase
Search::Xapian
RPC::XML

View File

@ -37,10 +37,10 @@ sub render_graph (\%) {
$src .= "}\n";
# Use the sha1 of the graphviz code as part of its filename.
eval q{use Digest::SHA1};
eval q{use Digest::SHA};
error($@) if $@;
my $dest=$params{page}."/graph-".
IkiWiki::possibly_foolish_untaint(Digest::SHA1::sha1_hex($src)).
IkiWiki::possibly_foolish_untaint(Digest::SHA::sha1_hex($src)).
".png";
will_render($params{page}, $dest);

View File

@ -190,15 +190,15 @@ sub pageterm ($) {
# 240 is the number used by omindex to decide when to hash an
# overlong term. This does not use a compatible hash method though.
if (length $page > 240) {
eval q{use Digest::SHA1};
eval q{use Digest::SHA};
if ($@) {
debug("search: ".sprintf(gettext("need Digest::SHA1 to index %s"), $page)) if $@;
debug("search: ".sprintf(gettext("need Digest::SHA to index %s"), $page)) if $@;
return undef;
}
# Note no colon, therefore it's guaranteed to not overlap
# with a page with the same name as the hash..
return "U".lc(Digest::SHA1::sha1_hex($page));
return "U".lc(Digest::SHA::sha1_hex($page));
}
else {
return "U:".$page;

View File

@ -122,10 +122,10 @@ sub preprocess (@) {
# Use the sha1 of the php code that generates the sparkline as
# the base for its filename.
eval q{use Digest::SHA1};
eval q{use Digest::SHA};
error($@) if $@;
my $fn=$params{page}."/sparkline-".
IkiWiki::possibly_foolish_untaint(Digest::SHA1::sha1_hex($php)).
IkiWiki::possibly_foolish_untaint(Digest::SHA::sha1_hex($php)).
".png";
will_render($params{page}, $fn);

2
debian/changelog vendored
View File

@ -8,6 +8,8 @@ ikiwiki (3.20100723) UNRELEASED; urgency=low
* meta: Allow syntax closer to html meta to be used.
* Add new disable hook, allowing plugins to perform cleanup after they
have been disabled.
* Use Digest::SHA built into perl rather than external Digest::SHA1
to simplify dependencies. Closes: #591040
-- Joey Hess <joeyh@debian.org> Fri, 23 Jul 2010 14:00:32 -0400

2
debian/control vendored
View File

@ -34,7 +34,7 @@ Suggests: viewvc | gitweb | viewcvs, libsearch-xapian-perl,
libxml-feed-perl, libmailtools-perl, perlmagick,
libfile-mimeinfo-perl, libcrypt-ssleay-perl,
liblocale-gettext-perl (>= 1.05-1), libtext-typography-perl,
libtext-csv-perl, libdigest-sha1-perl, graphviz, libnet-amazon-s3-perl,
libtext-csv-perl, graphviz, libnet-amazon-s3-perl,
libsparkline-php, texlive, dvipng, libtext-wikicreole-perl,
libsort-naturally-perl, libtext-textile-perl, libhighlight-perl,
po4a (>= 0.35-1), gettext, libyaml-perl

View File

@ -22,4 +22,4 @@ Some example graphs:
[[!graph src="a -- b -- c -- a;" prog="circo" type="graph"]]
"""]]
This plugin uses the [[!cpan Digest::SHA1]] perl module.
This plugin uses the [[!cpan Digest::SHA]] perl module.

View File

@ -4,7 +4,7 @@
This plugin adds full text search to ikiwiki, using the
[xapian](http://xapian.org/) engine, its
[omega](http://xapian.org/docs/omega/overview.html) frontend, and the
[[!cpan Search::Xapian]], [[!cpan Digest::SHA1]], and [[!cpan HTML::Scrubber]]
[[!cpan Search::Xapian]], [[!cpan Digest::SHA]], and [[!cpan HTML::Scrubber]]
perl modules.
The [[ikiwiki/searching]] page describes how to write search queries.

View File

@ -16,7 +16,7 @@ to use the plugin, you will need:
php can find it when `sparkline/Sparkline.php` is required.
* The GD PHP module used by the Sparkline library.
* A "php" program in the path, that can run standalone php programs.
* [[!cpan Digest::SHA1]]
* [[!cpan Digest::SHA]]
On a Debian system, this can be accomplished by installing these packages:
`libsparkline-php` `php5-gd` `php5-cli` `libdigest-sha1-perl`

View File

@ -31,7 +31,6 @@ Requires: perl(HTML::Scrubber)
Requires: perl(XML::Simple)
Requires: perl(CGI::FormBuilder)
Requires: perl(CGI::Session)
Requires: perl(Digest::SHA1)
Requires: python-docutils