Bug 243665 - Review Request: perl-Geo-IP - Efficient GeoIP bindings for Perl
Summary: Review Request: perl-Geo-IP - Efficient GeoIP bindings for Perl
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review   
(Show other bugs)
Version: rawhide
Hardware: All Linux
Target Milestone: ---
Assignee: Jason Tibbitts
QA Contact: Fedora Package Reviews List
Depends On:
TreeView+ depends on / blocked
Reported: 2007-06-11 11:57 UTC by Michael Fleming
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-13 06:49:07 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
tibbs: fedora-review+
kevin: fedora-cvs+

Attachments (Terms of Use)

Description Michael Fleming 2007-06-11 11:57:12 UTC
Spec URL: http://www.thatfleminggent.com/fedorasubs/perl-Geo-IP.spec
SRPM URL: http://www.thatfleminggent.com/fedorasubs/perl-Geo-IP-1.27-3.fc7.mf.src.rpm
This package contains Perl bindings for the GeoIP IP/hostname to country/location/organization database. This package requires Maxmind's GeoIP libraries but is often faster than other, similar modules.

Comment 1 Jason Tibbitts 2007-06-15 18:24:05 UTC
Heh, you beat me to this.  I just used cpanspec to generate mine.

Some comments:

License is GPL or Artistic, not GPL, at least according to my reading of the
README file.

I referenced the module in the ususl CPAN locations:

URL:            http://search.cpan.org/dist/Geo-IP/

I guess it doesn't really matter either way, but CPAN is usually the canonical
location for Perl modules.

Please remove the "mf" from Release:.

When adding Perl module dependencies, please depend on the perl() symbol and not
the package name: perl(ExtUtils::MakeMaker).  There is no guarantee that the
module will stay in a separate package.

The package has a test suite; any reason for not running it?

Any reason not to package the example directory as documentation?

Comment 2 Michael Fleming 2007-06-17 11:03:52 UTC
I've added the examples directory and the perl(Extutils::MakeMaker) BR, as well
as changed the URLs.

The test suite actually fails (and kills the package build) on one subtest
(which is pretty stupid really - fails to locate yahoo.com in "US" as expected,
even when the GeoIP data does so correctly via the GeoIP packages geoiplookup
tool does the right thing)

However the package itself would operate normally regardless - I've had it
locally for many months (for Awstats usage) without a hiccup. However I can see
a benefit in using the tests and a patch to fix the above bogosity is something
I can easily hack in.

I'll put up a new package once that's done.

Comment 3 Michael Fleming 2007-07-05 12:29:44 UTC
Sorry if this is dragging - I've been ill this week.

I'll patch out the offending bogus test suite failure and release another
version tomorrow or Saturday my time which should clear the remaining issues.

Comment 4 Michael Fleming 2007-07-10 10:21:06 UTC
As it happens there's a new release and it at least builds and tests without
compile errors now. Anyone want to give this a spin?

Spec URL: http://www.thatfleminggent.com/fedorasubs/perl-Geo-IP.spec
SRPM URL: http://www.thatfleminggent.com/fedorasubs/perl-Geo-IP-1.28-1.fc7.src.rpm

Comment 5 Jason Tibbitts 2007-07-10 16:54:53 UTC
Unfortunately the test suite fails for me because it tries to look up yahoo.com,
but mock does not run with a configured DNS server.  I inserted
   perl -pi -e 's/yahoo.com.*//' t/2_namelookup.t
before the "make test" line and it runs to completion.  I guess the test count
should be off but it doesn't seem to bother anything.  You could also just
delete t/2_namelookup.t.

Please make consistent use of macros; don't use both "%{__perl}" and "perl",
just pick one.  But if you want to pick the macro-ized version, you need to use
the macroized versions of rm, make, chmod, etc. as well.

You don't need the manual dependency on GeoIP; rpm finds the libGeoIP dependency
on its own.

* source files match upstream:
* package meets naming and versioning guidelines.
* specfile is properly named, is cleanly written and uses macros consistently.
X specfile does not use macros consistently.
* summary is OK.
* description is OK.
* dist tag is present.
* build root is OK.
* license field matches the actual license.
* license is open source-compatible.
* license text not included upstream.
* latest version is being packaged.
* BuildRequires are proper.
* compiler flags are appropriate.
* %clean is present.
* package builds in mock (development, x86_64).
* package installs properly
* debuginfo package looks complete.
* rpmlint is silent.
? final provides and requires; see extraneous GeoIP dependency.
   perl(Geo::IP) = 1.28
   perl(Geo::Mirror) = 1.0
   perl-Geo-IP = 1.28-1.fc8
?  GeoIP

X %check is present, but test fail in mock due to missing DNS services:
   # Test 11 got: <UNDEF> (t/2_namelookup.t at line 18 fail #11)
   #    Expected: "US"
   #  t/2_namelookup.t line 18 is:   ok($country, $exp_country);
   FAILED test 11
        Failed 1/11 tests, 90.91% okay
   Failed Test      Stat Wstat Total Fail  Failed  List of Failed
   t/2_namelookup.t               11    1   9.09%  11
   Failed 1/4 test scripts, 75.00% okay. 1/33 subtests failed, 96.97% okay.

* no shared libraries are added to the regular linker search paths.
* owns the directories it creates.
* doesn't own any directories it shouldn't.
* no duplicates in %files.
* file permissions are appropriate.
* no scriptlets present.
* code, not content.
* documentation is small, so no -docs subpackage is necessary.
* %docs are not necessary for the proper functioning of the package.
* no headers.
* no pkgconfig files.
* no static libraries.
* no libtool .la files.

Comment 6 Jason Tibbitts 2007-07-20 00:40:45 UTC

Comment 7 Michael Fleming 2007-07-20 11:13:08 UTC

Patched out that weird namelookup failure 

Spec URL: http://www.thatfleminggent.com/fedorasubs/perl-Geo-IP.spec
SRPM URL: http://www.thatfleminggent.com/fedorasubs/perl-Geo-IP-1.28-2.fc7.src.rpm

Go wild :-)

Comment 8 Jason Tibbitts 2007-07-27 06:58:53 UTC
I'm still getting the same failure.  I don't see anything in the spec which
would mess with the failing test

The package still uses macros inconsistently.  It seems like you just want to
change the single instance of "%{__perl}" to just "perl", unless you want to
change all of the perl, make, rm, and chmod calls to %{__whatever}.

Comment 9 Jason Tibbitts 2007-08-25 17:07:05 UTC
So, anything happening here?  The last package you put up doesn't have anything
which would alter the failing test at all; maybe it's the wrong package?

Comment 10 Michael Fleming 2007-08-26 00:33:54 UTC
Yeah, sorry - been otherwise busy. 

I've found and fixed a braino in my patch so it applies correctly (now that the
spec actually uses it) . I've also updated the License tag, fixed macros and
patched out a bad interpreter in one of the examples.

Locally it builds fine in F6 and F7 (i386 and x86_64) - YMMV, but I hope and
expect not ;-)


Comment 11 Jason Tibbitts 2007-09-02 17:15:59 UTC
OK, now I finally have some time.

This all looks good to me now, except for one thing.  When you apply patch1, the
backup file is left in there and installed:

E: perl-Geo-IP wrong-script-interpreter
/usr/share/doc/perl-Geo-IP-1.28/example/netspeed.pl.netspeed "/usr/local/bin/perl"

It should be trivial to nuke this or to remove the "-b .netspeed" bit. 
Otherwise  everything looks good, and to avoid another round trip I'll just
approve this now and you can fix the issue when you check in.


Comment 12 Michael Fleming 2007-09-13 00:06:22 UTC
New Package CVS Request
Package Name: perl-Geo-IP
Short Description: Efficient Perl bindings for the GeoIP location database
Owners: mfleming
Branches: FC-6 F-7 EL-4 EL-5
Cvsextras Commits: yes

Comment 13 Kevin Fenzi 2007-09-13 03:46:55 UTC
cvs done.

Comment 14 Michael Fleming 2007-09-13 06:49:07 UTC
Imported and building (FC6/devel/EPEL-4 already successful, EPEL 5 and F7 to go..)

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