Re: [PATCH/RFC] perl: bump the required Perl version to 5.8 from 5.6.[21]
- From
Tom G. Christensen <tgc@statsbiblioteket.dk>
- Date
- Sep 27, 2010, 07:36 UTC
- Message-ID
- <4CA04980.3070300@statsbiblioteket.dk>
- In-Reply-To
- <1285358453-19292-1-git-send-email-avarab@gmail.com>
Ævar Arnfjörð Bjarmason wrote:
Show 14 quoted lines
> Formalize our dependency on perl 5.8, bumped from 5.6.[12]. We already
> used the three-arg form of open() which was introduced in 5.6.1, but
> t/t9700/test.pl explicitly depended on 5.6.2.
>
> However git-add--interactive.pl has been failing on the 5.6 line since
> it was introduced in v1.5.0-rc0~12^2~2 back in 2006 due to this open
> syntax:
>
> sub run_cmd_pipe {
> my $fh = undef;
> open($fh, '-|', @_) or die;
> return <$fh>;
> }
> This issue and possible solutions was previously discussed in-depth here: http://article.gmane.org/gmane.comp.version-control.git/94394
Show 15 quoted lines
> Which when executed dies on "Can't use an undefined value as > filehandle reference". Several of our tests also fail on 5.6 (even > more when compiled with NO_PERL_MAKEMAKER=1): > > t2016-checkout-patch.sh > t3904-stash-patch.sh > t3701-add-interactive.sh > t7105-reset-patch.sh > t7501-commit.sh > t9700-perl-git.sh > > Our code is bitrotting on 5.6 with no-one interested in fixing it, and > pinning us to such an ancient release of Perl is keeping us from using > useful features introduced in the 5.8 release. >
FWIW I build rpms and run git on RHEL 2.1 with perl 5.6.1.
These are the settings I use: NO_CURL=1 (curl 7.8.1 is too old) NO_TCLTK=1 (tcl/tk 8.3 is too old) NO_NSEC=1 NO_EXTERNAL_GREP=1 (GNU grep 2.4.2 is apparently too old) NO_REGEX=1 (glibc regex breaks t7008.11, also needed for el3) NO_PERL_MAKEMAKER=1 (ExtUtils::MakeMaker is too old)
GIT_SKIP_TESTS="t2016 t3701 t3904 t7105 t7501.21"
Additionally to fix NO_PERL_MAKEMAKER I use this patch: http://article.gmane.org/gmane.comp.version-control.git/130159
To build with OpenSSL 0.9.6 I also add this in git-compat-util.h: # if SSLEAY_VERSION_NUMBER < 0x00907000L # define HMAC_CTX_cleanup HMAC_cleanup # endif
With these settings I have zero testsuite failures (just verified with 1.7.3). t9700 is automatically skipped because Test::More is not available in perl 5.6.1. gitweb requires 5.8 and is also skipped automatically. I do not have subversion available on RHEL 2.1 so those tests are also skipped. CVS server/import tests are skipped because I do not have cvsps and perl-SQLite available.
IIRC there has been no change in the functionality with perl 5.6.1 since the last time the 'open syntax' issue was discussed.
Having the specific parts known not to work with perl 5.6.x fail gracefully at runtime would be an improvement.
-tgc