Last Comment Bug 781672 - checksetup.pl fails to check the version of the latest Apache2::SizeLimit release (it throws "Invalid version format (non-numeric data)")
: checksetup.pl fails to check the version of the latest Apache2::SizeLimit rel...
Status: RESOLVED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Installation & Upgrading (show other bugs)
: 4.2.2
: All All
: -- major with 1 vote (vote)
: Bugzilla 4.2
Assigned To: Frédéric Buclin
: default-qa
:
Mentors:
: 917165 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-09 15:11 PDT by Mahesh Ganapathy
Modified: 2014-02-03 08:59 PST (History)
5 users (show)
mail: approval+
mail: approval4.4+
LpSolit: blocking4.4.1+
justdave: approval4.2+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Output of checksetup script. (2.58 KB, text/plain)
2012-08-09 15:11 PDT, Mahesh Ganapathy
no flags Details
patch, v1 (1.06 KB, patch)
2013-07-29 18:08 PDT, Frédéric Buclin
dkl: review+
Details | Diff | Splinter Review

Description Mahesh Ganapathy 2012-08-09 15:11:09 PDT
Created attachment 650693 [details]
Output of checksetup script.

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1
Build ID: 20120713134347

Steps to reproduce:

Was trying to install Bugzilla on Ubuntu 12.04 x64


Actual results:

This is a fresh install of Bugzilla on Ubuntu 12.04. When I try to run the checksetup.pl with or without check-modules flag, I get the error. I tried with the stable version 4.2.2 and the error is on line 677 or Requirements.pm. When I use the development branch, the error is in line 688. The actual code on that line is

 my $vnum = $module->VERSION || -1; 

System info
Perl version is v5.14.2. 
Module::Build::Version is at v0.87
OS: Ubuntu 12.04
Bugzilla: 4.2.2/4.3.2



Expected results:

It should have listed the module dependencies as documented.
Comment 1 Frédéric Buclin 2012-08-09 15:26:45 PDT
Which version of 'version' do you have? To know that, please execute:

perl -Mversion -wE 'say $version::VERSION'

Your bug looks like a duplicate of bug 678772.
Comment 2 Mahesh Ganapathy 2012-08-09 15:34:08 PDT
I have version v0.88 (just updated it from 0.87) and it now works. Will post an update after I get through all the req. modules installed and Bugzilla operational.
Comment 3 Frédéric Buclin 2012-08-09 15:39:12 PDT
OK, so this is a bug in a core Perl module, no a Bugzilla bug. Per http://cpansearch.perl.org/src/FLORA/perl-5.14.2/lib/version.pm, you were supposed to have 0.88 already, not 0.87. Not sure why you had the old 0.87 version.
Comment 4 Fred Kleindenst 2013-07-11 11:43:21 PDT
Checking my version of the perl version.pm, I get 0.9901.  And yet I observe this bug in my attempted fresh installation on ubuntu 12  

Perl version 5.14.2

This dies attempting to check the module after mod_perl.

Also, I tried updating my perl version.pm to the newest version: (.9902 ).  This did not fix the bugzilla install problem.

Please consider reopening this bug.
Comment 5 Frédéric Buclin 2013-07-29 08:45:57 PDT
I know what's going on. Apache2::SizeLimit::Core latest release has version 0.97-rc1, which is an illegal version format:

  perl -wE 'eval "require Apache2::SizeLimit"; say Apache2::SizeLimit->VERSION'
  Invalid version format (non-numeric data) at -e line 1.

All older releases never had the -rc1 appended to the version, which is why this problem started to appear only "recently".

I know how to fix the problem.
Comment 6 Frédéric Buclin 2013-07-29 18:08:32 PDT
Created attachment 782889 [details] [diff] [review]
patch, v1

About Apache2::SizeLimit specifically, I reported the problem upstream:

  https://rt.cpan.org/Public/Bug/Display.html?id=87422
Comment 7 David Lawrence [:dkl] 2013-07-30 13:16:16 PDT
Comment on attachment 782889 [details] [diff] [review]
patch, v1

Review of attachment 782889 [details] [diff] [review]:
-----------------------------------------------------------------

r=dkl
Comment 8 Frédéric Buclin 2013-07-31 18:22:03 PDT
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Install/Requirements.pm
Committed revision 8680.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.4/
modified Bugzilla/Install/Requirements.pm
Committed revision 8586.
Comment 9 Frédéric Buclin 2013-09-17 02:40:53 PDT
*** Bug 917165 has been marked as a duplicate of this bug. ***
Comment 10 Dave Miller [:justdave] (justdave@bugzilla.org) 2013-12-02 07:54:24 PST
Retargeting for 4.2 due to bug 938300.  As long as it applies cleanly, commit when ready.
Comment 11 Frédéric Buclin 2013-12-02 08:01:17 PST
The patch applies cleanly.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.2/
modified Bugzilla/Install/Requirements.pm
Committed revision 8239.
Comment 12 b.cropp 2014-02-03 08:51:50 PST
For me this patch does not work as expected (I guess...).

Upgrading my Bugzilla Installtion from 4.4 to 4.4.2 made the checksetup.pl give me the following error:

* This is Bugzilla 4.4.2 on perl 5.12.4
* Running on Linux 3.2.12-gentoo #1 SMP Fri Jun 15 16:00:34 CEST 2012

Checking perl modules...
Checking for               CGI.pm (v3.51)     ok: found v3.52 
Checking for           Digest-SHA (any)       ok: found v5.47 
Checking for             TimeDate (v2.23)     ok: found v2.24 
Checking for             DateTime (v0.28)     ok: found v1.03 
Invalid version format (non-numeric data) at Bugzilla/Install/Requirements.pm line 707.

----------------------

I could fix it by exchanging the line 707 in Requirements.pm from

    my $vok = ($vnum ne '-1' && version->new($vnum) >= version->new($wanted)) ? 1 : 0;

to

    my $vok = (vers_cmp($vnum,$wanted) > -1);


After this, I got the following checksetup.pl output:

* This is Bugzilla 4.4.2 on perl 5.12.4
* Running on Linux 3.2.12-gentoo #1 SMP Fri Jun 15 16:00:34 CEST 2012

Checking perl modules...
Checking for               CGI.pm (v3.51)     ok: found v3.52 
Checking for           Digest-SHA (any)       ok: found v5.47 
Checking for             TimeDate (v2.23)     ok: found v2.24 
Checking for             DateTime (v0.28)     ok: found v1.03 
Checking for    DateTime-TimeZone (v0.71)     ok: found v1.59 
Checking for                  DBI (v1.54)     ok: found v1.618 
Checking for     Template-Toolkit (v2.22)     ok: found v2.24 
Checking for           Email-Send (v2.04)     ok: found v2.198 
Checking for           Email-MIME (v1.904)    ok: found v1.907 
Checking for                  URI (v1.37)     ok: found v1.59 
Checking for       List-MoreUtils (v0.32)     ok: found v0.33 
Checking for    Math-Random-ISAAC (v1.0.1)    ok: found v1.004 

Checking available perl DBD modules...
Checking for               DBD-Pg (v2.7.0)    not found 
Checking for            DBD-mysql (v4.001)    ok: found v4.017 
Checking for           DBD-SQLite (v1.29)     ok: found v1.37 
Checking for           DBD-Oracle (v1.19)     not found 

The following Perl modules are optional:
Checking for                   GD (v1.20)     ok: found v2.46 
Checking for                Chart (v2.1.0)    ok: found v2.4.1 
Checking for          Template-GD (any)       ok: found v1.56 
Checking for           GDTextUtil (any)       ok: found v0.86 
Checking for              GDGraph (any)       ok: found v1.44 
Checking for           MIME-tools (v5.406)    ok: found v5.427 
Checking for          libwww-perl (any)       ok: found v6.03 
Checking for             XML-Twig (any)       ok: found v3.39 
Checking for          PatchReader (v0.9.6)    ok: found v0.9.6 
Checking for            perl-ldap (any)       ok: found v0.39 
Checking for          Authen-SASL (any)       ok: found v2.12 
Checking for         Net-SMTP-SSL (v1.01)     ok: found v1.01 
Checking for           RadiusPerl (any)       ok: found v0.14 
Checking for            SOAP-Lite (v0.712)    ok: found v0.712 
Checking for          XMLRPC-Lite (v0.712)    ok: found v0.712 
Checking for             JSON-RPC (any)       ok: found v0.96 
Checking for              JSON-XS (v2.0)      ok: found v2.32 
Checking for           Test-Taint (any)       ok: found v1.04 
Checking for          HTML-Parser (v3.40)     ok: found v3.69 
Checking for        HTML-Scrubber (any)       ok: found v0.08 
Checking for               Encode (v2.21)     ok: found v2.40 
Checking for        Encode-Detect (any)       ok: found v1.01 
Checking for          Email-Reply (any)       ok: found v1.202 
Checking for HTML-FormatText-WithLinks (v0.13)     ok: found v0.14 
defined(%hash) is deprecated at lib/Data/ObjectDriver/Driver/DBD.pm line 14, <DATA> line 275.
        (Maybe you should just omit the defined()?)
Checking for          TheSchwartz (v1.07)     ok: found v1.07 
Checking for       Daemon-Generic (any)       ok: found v0.61 
Checking for             mod_perl (v1.999022) ok: found v2.000007 
Checking for     Apache-SizeLimit (v0.96)     ok: found v0.96 
Checking for        File-MimeInfo (any)       ok: found v0.15 
Checking for           IO-stringy (any)       ok: found v2.110 
WARNING: We could not check the configuration of Apache. This sometimes
happens when you are not running checksetup.pl as root. To see the
problem we ran into, run: /usr/sbin/apache2 -t -D DUMP_MODULES

Reading ./localconfig...
Checking for            DBD-mysql (v4.001)    ok: found v4.017 
Checking for                MySQL (v5.0.15)   ok: found v5.1.61-log 

Removing existing compiled templates...
Precompiling templates...done.
Fixing file permissions...
Checking for             GraphViz (any)       ok 
checksetup.pl complete.

------------------------------------

With this, Bugzilla seems to be running fine as expected...

------------------------------------

Some version information of the machine:

~# perl -Mversion -wE 'say $version::VERSION' is
0.94

~# perl -wE 'eval "require Apache2::SizeLimit"; say Apache2::SizeLimit->VERSION'
0.96

~# perl --version
This is perl 5, version 12, subversion 4 (v5.12.4) built for x86_64-linux
Comment 13 Frédéric Buclin 2014-02-03 08:59:18 PST
(In reply to b.cropp from comment #12)

> I could fix it by exchanging the line 707 in Requirements.pm from
> 
>     my $vok = ($vnum ne '-1' && version->new($vnum) >=
> version->new($wanted)) ? 1 : 0;
> 
> to
> 
>     my $vok = (vers_cmp($vnum,$wanted) > -1);

This code is related to bug 938300, not this bug. Anyway, using vers_cmp() is not the right way to go, as described in the other bug.

Note You need to log in before you can comment on or make changes to this bug.