perl-geo-ip has /usr/share/ within the code

  • Done
  • quality assurance status badge
Details
3 participants
  • Leo Famulari
  • ng0
  • zimoun
Owner
unassigned
Submitted by
ng0
Severity
normal
N
(address . bug-guix@gnu.org)
20171128154158.p3k4jyn3izfimfu5@abyayala
I'm searching for a good solution to analyze some logs. Geo::IP
is good enough. Now the problem is this:

user@abyayala /gnu/store/5mhrli41qbcpns3gg0yf1vv07lvpg8hm-perl-geo-ip-1.51$ egrep -nr "/usr/" lib/perl5/site_perl/5.26.0/
lib/perl5/site_perl/5.26.0/Geo/IP/Record.pod:9: my $gi = Geo::IP->open("/usr/local/share/GeoIP/GeoIPCity.dat", GEOIP_STANDARD);
lib/perl5/site_perl/5.26.0/Geo/IP.pm:5075:# default path /usr/local/share/GeoIP
lib/perl5/site_perl/5.26.0/Geo/IP.pm:5159: my $def_db_file = '/usr/local/share/GeoIP/GeoIP.dat';
lib/perl5/site_perl/5.26.0/Geo/IP.pm:5962: my $gi = Geo::IP->open("/usr/local/share/GeoIP/GeoIPCity.dat", GEOIP_STANDARD);
lib/perl5/site_perl/5.26.0/Geo/IP.pm:5984: my $g = Geo::IP->open('/usr/local/share/GeoIP/GeoIPv6.dat') or die;
lib/perl5/site_perl/5.26.0/Geo/IP.pm:6046:I<datadir>, typically I</usr/local/share/GeoIP/GeoIP.dat>.
lib/perl5/site_perl/5.26.0/Geo/IP.pm:6078:typically I</usr/local/share/GeoIP/GeoIPCity.dat>.
lib/perl5/site_perl/5.26.0/Geo/IP.pm:6226: my $g = Geo::IP->open('/usr/local/share/GeoIP/GeoIPv6.dat') or die;

However this is not really a problem unless you are on GuixSD.
As we do not package the DB of MaxDB (yet) you'll need for this, it's
not a problem. I'm filing this bug to remind myself to fix Geo::IP once
I have revisited the discussion we had about the DB a while back.
--
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlodg8YACgkQ4i+bv+40
hYheDhAAgQp9/HehCakE17tcaRvZ69HN4zMmhckJqaTCK9sgGUqBEYrIJwG7KpiF
SLoPvHJGPIq8cYyR8x96yKm9algA8nJwNZ6ySjjjHwolhcMHZA9F5L5sdynP61Dk
IaLq44UZuVz+vW19ErQ/zwCygnJo/WNxDw3KAIMg8UGkcPQiIAYdaJN5Z80qvmtN
/OvunmHFiDnT/G6wixJumlK7o2Ucgc0dhfEAcTKT/H8zGbGYNVpNjkvALNoiuswy
dphx3zajIgNFkgSxFta778Q5jKDPliJuKA+Muu418UxDDeSPdxgtZV1RotTnBca1
cZ53haY5h1yF9k+93wadk/i4pTzAESWP5efmQhy9lwBt6cEwlLJHP7diCTydzV36
ZN3IST0DebUWTOe2t39p6EOfvVMhxDmq/7SZQVDNXdPS6dFPEp4PWfNCpg8msiNV
M2Z+5Ony5UYz6e6Hhid21SOPFXAcD8JDor9iQg6TD/JmsQf634k7/6xVvfHTkWva
OZECpMGPxu61DwGpLoXfplF7Njuy8xKtfOcAG0XbM5bqBhjK6OXidnbn/iZBz/na
2vc+hOzqjotbAT+WPLNT6qXkuikRH7eSFWjUNmvmk957j9airnd+nsARa8WBEg7i
FGms5XL2H7Kro2SiPgHiWA7GjOSotrxNVD6BRJy0Ca6Ap0kvh4Q=
=kh57
-----END PGP SIGNATURE-----


N
(address . 29485@debbugs.gnu.org)
20171128155337.44rmfg4xirapagvq@abyayala
ng0 transcribed 2.5K bytes:
Toggle quote (22 lines)
> I'm searching for a good solution to analyze some logs. Geo::IP
> is good enough. Now the problem is this:
>
> user@abyayala /gnu/store/5mhrli41qbcpns3gg0yf1vv07lvpg8hm-perl-geo-ip-1.51$ egrep -nr "/usr/" lib/perl5/site_perl/5.26.0/
> lib/perl5/site_perl/5.26.0/Geo/IP/Record.pod:9: my $gi = Geo::IP->open("/usr/local/share/GeoIP/GeoIPCity.dat", GEOIP_STANDARD);
> lib/perl5/site_perl/5.26.0/Geo/IP.pm:5075:# default path /usr/local/share/GeoIP
> lib/perl5/site_perl/5.26.0/Geo/IP.pm:5159: my $def_db_file = '/usr/local/share/GeoIP/GeoIP.dat';
> lib/perl5/site_perl/5.26.0/Geo/IP.pm:5962: my $gi = Geo::IP->open("/usr/local/share/GeoIP/GeoIPCity.dat", GEOIP_STANDARD);
> lib/perl5/site_perl/5.26.0/Geo/IP.pm:5984: my $g = Geo::IP->open('/usr/local/share/GeoIP/GeoIPv6.dat') or die;
> lib/perl5/site_perl/5.26.0/Geo/IP.pm:6046:I<datadir>, typically I</usr/local/share/GeoIP/GeoIP.dat>.
> lib/perl5/site_perl/5.26.0/Geo/IP.pm:6078:typically I</usr/local/share/GeoIP/GeoIPCity.dat>.
> lib/perl5/site_perl/5.26.0/Geo/IP.pm:6226: my $g = Geo::IP->open('/usr/local/share/GeoIP/GeoIPv6.dat') or die;
>
> However this is not really a problem unless you are on GuixSD.
> As we do not package the DB of MaxDB (yet) you'll need for this, it's
> not a problem. I'm filing this bug to remind myself to fix Geo::IP once
> I have revisited the discussion we had about the DB a while back.
> --
> GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
> GnuPG: https://c.n0.is/ng0_pubkeys/tree/keys
> WWW: https://n0.is

They comment this in the file:
# --- unfortunately we do not know the path so we assume the
# default path /usr/local/share/GeoIP
# if thats not true, you can set $Geo::IP::PP_OPEN_TYPE_PATH

But I think we should fix it once we have the data set.
WDYT?
--
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlodhoEACgkQ4i+bv+40
hYhJbw//dC8uFlkWtCUt30dyG7tapwFEw66mpU59+YKxixeC0cc0WEwPXceR+I/h
fWLvdY4p/Ec2aqgGbzRLIyBGskVvuPjiWWzdd1tUuE+NYbvzSAwbhJuWgj2AAnQY
PknlfjYZRukTJv7gtyvIj4rKXuApL3LYK0wV9hS3OR/IDnqp9DUSwekfKiXno8NJ
7ctHAKzfKLKBLLJIV7mzUMqQ1mZRyH+Ya778HGxf50VmCHYZARRqosneto/XmSBc
c5NLWrC7x3veR/U8ICmPeXx3DdxUAoMazR58O8xFj0Hb7mGO4ccyOzg28WqkoViH
j5VMm/d0O4e4ZkwKu9uxLZkqVVxDnGKJ3NJ1rJUuMDtNfkmS7kv4AwPVD+qWlrKH
GZYByBY99FhH9JDDuv7ro1kW4zwT0LfA3ff+xuVvl6NVxs4nv53qfO/Db3cT5HH2
fL0LHXo8weyiBZYvCs2QUx/KKvW6NlFyXcymJaty+j232AEhJmMRnekcxPgHJl9k
EVVjREW0W2UasUCFYDr+GaD4Yz2MSh86KelvCTMeoaS3dLBsLE+exeX+5X1T9wyP
eM4x5Eoj37l2D+UInYQ6thv6fee8iQBsBU/sgcu8Fxw5ELYzxq6/yCndGL+AufQL
Eqr6JO827uiVjQ2XIPdmURnVDE96Qzkovwgh3eVos73IpsgSVYE=
=RPnx
-----END PGP SIGNATURE-----


Z
Z
zimoun wrote on 3 Dec 2020 01:34
bug#29485: perl-geo-ip is broken since ever!
(name . ng0)(address . ng0@n0.is)(address . 29485@debbugs.gnu.org)
86k0tzzq0g.fsf@gmail.com
Hi,

The old bug #29485 is about the hard coded database of the package
perl-geo-ip.

On Tue, 28 Nov 2017 at 15:41, ng0 <ng0@n0.is> wrote:

Toggle quote (10 lines)
> user@abyayala /gnu/store/5mhrli41qbcpns3gg0yf1vv07lvpg8hm-perl-geo-ip-1.51$ egrep -nr "/usr/" lib/perl5/site_perl/5.26.0/
> lib/perl5/site_perl/5.26.0/Geo/IP/Record.pod:9: my $gi = Geo::IP->open("/usr/local/share/GeoIP/GeoIPCity.dat", GEOIP_STANDARD);
> lib/perl5/site_perl/5.26.0/Geo/IP.pm:5075:# default path /usr/local/share/GeoIP
> lib/perl5/site_perl/5.26.0/Geo/IP.pm:5159: my $def_db_file = '/usr/local/share/GeoIP/GeoIP.dat';
> lib/perl5/site_perl/5.26.0/Geo/IP.pm:5962: my $gi = Geo::IP->open("/usr/local/share/GeoIP/GeoIPCity.dat", GEOIP_STANDARD);
> lib/perl5/site_perl/5.26.0/Geo/IP.pm:5984: my $g = Geo::IP->open('/usr/local/share/GeoIP/GeoIPv6.dat') or die;
> lib/perl5/site_perl/5.26.0/Geo/IP.pm:6046:I<datadir>, typically I</usr/local/share/GeoIP/GeoIP.dat>.
> lib/perl5/site_perl/5.26.0/Geo/IP.pm:6078:typically I</usr/local/share/GeoIP/GeoIPCity.dat>.
> lib/perl5/site_perl/5.26.0/Geo/IP.pm:6226: my $g = Geo::IP->open('/usr/local/share/GeoIP/GeoIPv6.dat') or die;

I am reproducing this with the Guix commit f4450e8.


Toggle quote (5 lines)
> However this is not really a problem unless you are on GuixSD.
> As we do not package the DB of MaxDB (yet) you'll need for this, it's
> not a problem. I'm filing this bug to remind myself to fix Geo::IP once
> I have revisited the discussion we had about the DB a while back.

It is a problem and the package is broken. I am assuming this package
is not used so I am proposing to simply remove it. Otherwise, the
database should be also packaged, else it appears to me meaningless.


All the best,
simon
L
L
Leo Famulari wrote on 3 Dec 2020 07:08
(name . zimoun)(address . zimon.toutoune@gmail.com)
X8iA1xbnhBV0mDgz@jasmine.lan
On Thu, Dec 03, 2020 at 01:34:23AM +0100, zimoun wrote:
Toggle quote (4 lines)
> It is a problem and the package is broken. I am assuming this package
> is not used so I am proposing to simply remove it. Otherwise, the
> database should be also packaged, else it appears to me meaningless.

Removal sounds good to me.
Z
Z
zimoun wrote on 22 Dec 2020 18:00
(name . Leo Famulari)(address . leo@famulari.name)
86eejhu66h.fsf@gmail.com
Hi,

On Thu, 03 Dec 2020 at 01:08, Leo Famulari <leo@famulari.name> wrote:
Toggle quote (7 lines)
> On Thu, Dec 03, 2020 at 01:34:23AM +0100, zimoun wrote:
>> It is a problem and the package is broken. I am assuming this package
>> is not used so I am proposing to simply remove it. Otherwise, the
>> database should be also packaged, else it appears to me meaningless.
>
> Removal sounds good to me.

See 45372. Once merged, let close this one.


All the best,
simon
L
L
Leo Famulari wrote on 22 Dec 2020 20:24
(name . zimoun)(address . zimon.toutoune@gmail.com)
X+JH/HcuM1rcIMWO@jasmine.lan
On Tue, Dec 22, 2020 at 06:00:38PM +0100, zimoun wrote:
Toggle quote (12 lines)
> Hi,
>
> On Thu, 03 Dec 2020 at 01:08, Leo Famulari <leo@famulari.name> wrote:
> > On Thu, Dec 03, 2020 at 01:34:23AM +0100, zimoun wrote:
> >> It is a problem and the package is broken. I am assuming this package
> >> is not used so I am proposing to simply remove it. Otherwise, the
> >> database should be also packaged, else it appears to me meaningless.
> >
> > Removal sounds good to me.
>
> See 45372. Once merged, let close this one.

Done with commit 06de9ca75f4bb508cdba3082d8ae80f014dbc38b
Closed
Z
Z
zimoun wrote on 22 Dec 2020 21:07
(name . Leo Famulari)(address . leo@famulari.name)
86v9ctsiyv.fsf@gmail.com
On Tue, 22 Dec 2020 at 14:24, Leo Famulari <leo@famulari.name> wrote:
Toggle quote (15 lines)
> On Tue, Dec 22, 2020 at 06:00:38PM +0100, zimoun wrote:
>> Hi,
>>
>> On Thu, 03 Dec 2020 at 01:08, Leo Famulari <leo@famulari.name> wrote:
>> > On Thu, Dec 03, 2020 at 01:34:23AM +0100, zimoun wrote:
>> >> It is a problem and the package is broken. I am assuming this package
>> >> is not used so I am proposing to simply remove it. Otherwise, the
>> >> database should be also packaged, else it appears to me meaningless.
>> >
>> > Removal sounds good to me.
>>
>> See 45372. Once merged, let close this one.
>
> Done with commit 06de9ca75f4bb508cdba3082d8ae80f014dbc38b

Thanks!
Closed
?