Red Hat Bugzilla – Bug 439267
GeoIP should Require: perl-libwww-perl
Last modified: 2008-03-28 19:59:38 EDT
Description of problem:
perl script installed by GeoIP package at /usr/share/doc/GeoIP-1.4.3/fetch-geoipdata.pl produces an
error when run.
Version-Release number of selected component (if applicable):
Try to run the script.
Steps to Reproduce:
1.sudo perl /usr/share/doc/GeoIP-1.4.3/fetch-geoipdata.pl
Error that perl can't find LWP/Simple.pm
Fetching GeoIP.dat from http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz
GeoIP database updated. Old copy is at GeoIP.dat.20080326
The perl script runs correctly if you :
sudo yum install perl-libwww-perl
( which installs several perl modules as dependancies )
This provides the modules needed by the script.
Please do *not* add an (huge) perl dependency to GeoIP. GeoIP works perfectly
without perl and the database can be updated by
| wget http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz
| gunzip ...
Mentioned script does not make more than above and is buggy by writing into
/usr/share (which should be managed by RPM only) and should not be activated hence.
(In reply to comment #1)
> Please do *not* add an (huge) perl dependency to GeoIP. GeoIP works perfectly
> without perl and the database can be updated by
> | wget http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz
> | gunzip ...
I agree that manual download is sufficient.
Then remove the perl script from the RPM. If the perl script is included, the RPM should require the
packages to make it run.
Another alternative is to re-write the script in shell ( or python ) so that the script works without
additional dependancies. The suggested script above would add a Requires : wget to the GeoIP RPM.
> Mentioned script does not make more than above and is buggy by writing into
> /usr/share (which should be managed by RPM only) and should not be activated hence.
Another reason to remove the perl script from the RPM. Or change the location of the database.
One other alternative is to add documentation in /usr/share/GeoIP-* that shows how to use wget to
update the database.
I am not set on one solution to this, but the package seems broken to me in its current state.
(In reply to comment #2)
> I am not set on one solution to this, but the package seems broken to me in its current state.
Sorry, I had one more thought.
Another solution is to split off the database into a separate package "GeoIP-data." That way updates
could be pushed through the regular Fedora update mechanism without using a script. It could include
the city database as well.
Sorry, I don't regard this as a bug.
The scripts are in %doc for a reason - they're something quick for users of the
package to use to update their databases as they need to (a little like
sa-update in the spamassassin package). They're functional but not perfect -
feel free to write your own in shell or whatever language you prefer.
I certainly don't see the utility in adding extra requires (be it libwww-perl or
wget or curl etc.) for what's essentially a demo/helper script.
I've discussed a package split with others, but it'd be more regular work (new
package once a month, not necessarily in sync with the libs) just to update a
single file.. The scripts were intended as a "middle way" for users.