From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Matthieu Moy" <git@matthieu-moy.fr>,
"Petr Baudis" <pasky@ucw.cz>, "Benoit Bourbie" <bbourbie@slb.com>,
"Jeff King" <peff@peff.net>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Jari Aalto" <jari.aalto@cante.net>,
"Giuseppe Bilotta" <giuseppe.bilotta@gmail.com>,
"Todd Zullinger" <tmz@pobox.com>,
"Jonathan Nieder" <jrnieder@gmail.com>,
"Randall S . Becker" <rsbecker@nexbridge.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH v2 04/13] gitweb: hard-depend on the Digest::MD5 5.8 module
Date: Sun, 25 Feb 2018 19:46:28 +0000 [thread overview]
Message-ID: <20180225194637.18630-5-avarab@gmail.com> (raw)
In-Reply-To: <20180225194637.18630-1-avarab@gmail.com>
In-Reply-To: <20180214222146.10655-1-avarab@gmail.com>
Since my d48b284183 ("perl: bump the required Perl version to 5.8 from
5.6.[21]", 2010-09-24), we've depended on 5.8, so there's no reason to
conditionally require Digest::MD5 anymore. It was released with perl
v5.7.3[1]
The initial introduction of the dependency in
e9fdd74e53 ("gitweb: (gr)avatar support", 2009-06-30) says as much,
this also undoes part of the later 2e9c8789b7 ("gitweb: Mention
optional Perl modules in INSTALL", 2011-02-04) since gitweb will
always be run on at least 5.8, so there's no need to mention
Digest::MD5 as a required module in the documentation, let's instead
say that we require perl 5.8.
As with the preceding Net::{SMTP,Domain} change we now unconditionally
"use" the module instead.
1. $ corelist Digest::MD5
Data for 2015-02-14
Digest::MD5 was first released with perl v5.7.3
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
gitweb/INSTALL | 3 +--
gitweb/gitweb.perl | 17 ++++-------------
2 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/gitweb/INSTALL b/gitweb/INSTALL
index 408f2859d3..a58e6b3c44 100644
--- a/gitweb/INSTALL
+++ b/gitweb/INSTALL
@@ -29,12 +29,11 @@ Requirements
------------
- Core git tools
- - Perl
+ - Perl 5.8
- Perl modules: CGI, Encode, Fcntl, File::Find, File::Basename.
- web server
The following optional Perl modules are required for extra features
- - Digest::MD5 - for gravatar support
- CGI::Fast and FCGI - for running gitweb as FastCGI script
- HTML::TagCloud - for fancy tag cloud in project list view
- HTTP::Date or Time::ParseDate - to support If-Modified-Since for feeds
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 2417057f2b..2594a4badb 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -20,6 +20,8 @@ use Fcntl ':mode';
use File::Find qw();
use File::Basename qw(basename);
use Time::HiRes qw(gettimeofday tv_interval);
+use Digest::MD5 qw(md5_hex);
+
binmode STDOUT, ':utf8';
if (!defined($CGI::VERSION) || $CGI::VERSION < 4.08) {
@@ -490,7 +492,6 @@ our %feature = (
# Currently available providers are gravatar and picon.
# If an unknown provider is specified, the feature is disabled.
- # Gravatar depends on Digest::MD5.
# Picon currently relies on the indiana.edu database.
# To enable system wide have in $GITWEB_CONFIG
@@ -1166,18 +1167,8 @@ sub configure_gitweb_features {
our @snapshot_fmts = gitweb_get_feature('snapshot');
@snapshot_fmts = filter_snapshot_fmts(@snapshot_fmts);
- # check that the avatar feature is set to a known provider name,
- # and for each provider check if the dependencies are satisfied.
- # if the provider name is invalid or the dependencies are not met,
- # reset $git_avatar to the empty string.
our ($git_avatar) = gitweb_get_feature('avatar');
- if ($git_avatar eq 'gravatar') {
- $git_avatar = '' unless (eval { require Digest::MD5; 1; });
- } elsif ($git_avatar eq 'picon') {
- # no dependencies
- } else {
- $git_avatar = '';
- }
+ $git_avatar = '' unless $git_avatar =~ /^(?:gravatar|picon)$/s;
our @extra_branch_refs = gitweb_get_feature('extra-branch-refs');
@extra_branch_refs = filter_and_validate_refs (@extra_branch_refs);
@@ -2167,7 +2158,7 @@ sub gravatar_url {
my $size = shift;
$avatar_cache{$email} ||=
"//www.gravatar.com/avatar/" .
- Digest::MD5::md5_hex($email) . "?s=";
+ md5_hex($email) . "?s=";
return $avatar_cache{$email} . $size;
}
--
2.15.1.424.g9478a66081
next prev parent reply other threads:[~2018-02-25 19:47 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 22:21 [PATCH 0/8] various perl fixes Ævar Arnfjörð Bjarmason
2018-02-14 22:21 ` [PATCH 1/8] perl: *.pm files should not have the executable bit Ævar Arnfjörð Bjarmason
2018-02-14 22:41 ` Jonathan Nieder
2018-02-25 19:01 ` Ævar Arnfjörð Bjarmason
2018-02-14 22:21 ` [PATCH 2/8] perl: move CPAN loader wrappers to another namespace Ævar Arnfjörð Bjarmason
2018-02-14 22:43 ` Jonathan Nieder
2018-02-14 22:21 ` [PATCH 3/8] perl: generalize the Git::LoadCPAN facility Ævar Arnfjörð Bjarmason
2018-02-14 22:57 ` Jonathan Nieder
2018-02-15 5:09 ` Todd Zullinger
2018-02-25 18:56 ` Ævar Arnfjörð Bjarmason
2018-02-25 19:05 ` Randall S. Becker
2018-02-15 4:53 ` Todd Zullinger
2018-02-15 20:41 ` Ævar Arnfjörð Bjarmason
2018-02-15 21:23 ` Todd Zullinger
2018-02-16 14:39 ` Ævar Arnfjörð Bjarmason
2018-02-16 17:55 ` Todd Zullinger
2018-02-16 22:03 ` Jonathan Nieder
2018-02-17 0:47 ` Todd Zullinger
2018-02-17 5:40 ` Todd Zullinger
2018-02-14 22:21 ` [PATCH 4/8] perl: update our ancient copy of Error.pm Ævar Arnfjörð Bjarmason
2018-02-14 23:03 ` Jonathan Nieder
2018-02-15 20:46 ` Ævar Arnfjörð Bjarmason
2018-02-14 22:21 ` [PATCH 5/8] perl: update our copy of Mail::Address Ævar Arnfjörð Bjarmason
2018-02-14 23:46 ` Jonathan Nieder
2018-02-15 9:32 ` Matthieu Moy
2018-02-15 20:31 ` Ævar Arnfjörð Bjarmason
2018-02-14 22:21 ` [PATCH 6/8] git-send-email: unconditionally use Net::{SMTP,Domain} Ævar Arnfjörð Bjarmason
2018-02-14 23:49 ` Jonathan Nieder
2018-02-15 20:43 ` Ævar Arnfjörð Bjarmason
2018-02-14 22:21 ` [PATCH 7/8] gitweb: hard-depend on the Digest::MD5 5.8 module Ævar Arnfjörð Bjarmason
2018-02-14 23:52 ` Jonathan Nieder
2018-02-14 22:21 ` [PATCH 8/8] perl: hard-depend on the File::{Temp,Spec} modules Ævar Arnfjörð Bjarmason
2018-02-14 23:54 ` Jonathan Nieder
2018-02-15 20:42 ` Ævar Arnfjörð Bjarmason
2018-02-15 21:33 ` Junio C Hamano
2018-02-25 19:46 ` [PATCH v2 00/13] various perl fixes Ævar Arnfjörð Bjarmason
2018-03-03 15:38 ` [PATCH v3 " Ævar Arnfjörð Bjarmason
2018-03-05 19:01 ` Junio C Hamano
2018-03-03 15:38 ` [PATCH v3 01/13] perl: *.pm files should not have the executable bit Ævar Arnfjörð Bjarmason
2018-03-03 15:38 ` [PATCH v3 02/13] Git.pm: remove redundant "use strict" from sub-package Ævar Arnfjörð Bjarmason
2018-03-03 15:38 ` [PATCH v3 03/13] Git.pm: add the "use warnings" pragma Ævar Arnfjörð Bjarmason
2018-03-03 15:38 ` [PATCH v3 04/13] gitweb: hard-depend on the Digest::MD5 5.8 module Ævar Arnfjörð Bjarmason
2018-03-03 15:38 ` [PATCH v3 05/13] Git.pm: hard-depend on the File::{Temp,Spec} modules Ævar Arnfjörð Bjarmason
2018-03-03 15:38 ` [PATCH v3 06/13] git-send-email: unconditionally use Net::{SMTP,Domain} Ævar Arnfjörð Bjarmason
2018-03-03 15:38 ` [PATCH v3 07/13] perl: update our ancient copy of Error.pm Ævar Arnfjörð Bjarmason
2018-03-03 15:38 ` [PATCH v3 08/13] perl: update our copy of Mail::Address Ævar Arnfjörð Bjarmason
2018-03-03 15:38 ` [PATCH v3 09/13] perl: move CPAN loader wrappers to another namespace Ævar Arnfjörð Bjarmason
2018-03-03 15:38 ` [PATCH v3 10/13] perl: generalize the Git::LoadCPAN facility Ævar Arnfjörð Bjarmason
2018-03-03 15:38 ` [PATCH v3 11/13] perl: move the perl/Git/FromCPAN tree to perl/FromCPAN Ævar Arnfjörð Bjarmason
2018-03-03 15:38 ` [PATCH v3 12/13] Makefile: add NO_PERL_CPAN_FALLBACKS knob Ævar Arnfjörð Bjarmason
2018-03-03 15:38 ` [PATCH v3 13/13] perl Git::LoadCPAN: emit better errors under NO_PERL_CPAN_FALLBACKS Ævar Arnfjörð Bjarmason
2018-02-25 19:46 ` [PATCH v2 01/13] perl: *.pm files should not have the executable bit Ævar Arnfjörð Bjarmason
2018-02-25 19:46 ` [PATCH v2 02/13] Git.pm: remove redundant "use strict" from sub-package Ævar Arnfjörð Bjarmason
2018-02-25 19:46 ` [PATCH v2 03/13] Git.pm: add the "use warnings" pragma Ævar Arnfjörð Bjarmason
2018-02-25 19:46 ` Ævar Arnfjörð Bjarmason [this message]
2018-02-25 20:00 ` [PATCH v2 04/13] gitweb: hard-depend on the Digest::MD5 5.8 module Eric Sunshine
2018-02-25 19:46 ` [PATCH v2 05/13] Git.pm: hard-depend on the File::{Temp,Spec} modules Ævar Arnfjörð Bjarmason
2018-02-25 19:46 ` [PATCH v2 06/13] git-send-email: unconditionally use Net::{SMTP,Domain} Ævar Arnfjörð Bjarmason
2018-02-25 20:03 ` Eric Sunshine
2018-02-25 19:46 ` [PATCH v2 07/13] perl: update our ancient copy of Error.pm Ævar Arnfjörð Bjarmason
2018-02-25 19:46 ` [PATCH v2 08/13] perl: update our copy of Mail::Address Ævar Arnfjörð Bjarmason
2018-02-25 19:46 ` [PATCH v2 09/13] perl: move CPAN loader wrappers to another namespace Ævar Arnfjörð Bjarmason
2018-02-25 19:46 ` [PATCH v2 10/13] perl: generalize the Git::LoadCPAN facility Ævar Arnfjörð Bjarmason
2018-02-25 19:46 ` [PATCH v2 11/13] perl: move the perl/Git/FromCPAN tree to perl/FromCPAN Ævar Arnfjörð Bjarmason
2018-02-25 19:46 ` [PATCH v2 12/13] Makefile: add NO_PERL_CPAN_FALLBACKS knob Ævar Arnfjörð Bjarmason
2018-02-25 19:46 ` [PATCH v2 13/13] perl Git::LoadCPAN: emit better errors under NO_PERL_CPAN_FALLBACKS Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180225194637.18630-5-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=bbourbie@slb.com \
--cc=git@matthieu-moy.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=giuseppe.bilotta@gmail.com \
--cc=jari.aalto@cante.net \
--cc=jrnieder@gmail.com \
--cc=pasky@ucw.cz \
--cc=peff@peff.net \
--cc=rsbecker@nexbridge.com \
--cc=tmz@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).