Make KTorrent work with current GeoIP files
Needs ReviewPublic

Authored by bero on May 11 2019, 8:55 PM.



KTorrent tries to look up a peer's country using a GeoIP database it tries to download that no longer exists and is no longer published in the same format.
This adapts KTorrent to the GeoIP database's new location as well as format.

BUG: 403054

Test Plan
  • Apply the patch
  • Start KTorrent
  • Go to peers in an active torrent
  • Check if the peer's country is shown correctly

Diff Detail

R473 KTorrent
Lint Skipped
Unit Tests Skipped
bero requested review of this revision.May 11 2019, 8:55 PM
bero created this revision.
wbauer added reviewers: stikonas, trufanov.EditedJun 1 2019, 12:14 PM
wbauer added a subscriber: wbauer.

Adding some reviewers...

Functionality-wise it seems to work fine here.

I noticed some problems though:

  • It fails to build without libmaxminddb:
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: cannot find -lMaxminddb::Maxminddb
collect2: error: ld returned 1 exit status

The lib should only be added to target_link_libraries if it was actually found.

  • The new code uses KArchive, but that's optional. So it should also be disabled (and not added to target_link_libraries) if KArchive was not found.
  • QString::null is deprecated (in Qt4 already, btw), please use QString() instead.

Yes, it looks fine to me too. Please fix those issues that wbauer already mentioned and then you can commit (or ask somebody to commit if for you if you don't have commit access).

This comment was removed by trufanov.

Hmm, regarding license, I guess it will be fine. KTorrent is GPLv2 or later. So GPLv3 would work.

Ping? Any chance to get updated patch with addressed review comments?

bero added a comment.Sep 23 2019, 10:39 AM

Yes, currently busy with something totally different, but that should be finished tomorrow.

gunterk added a subscriber: gunterk.Oct 9 2019, 8:24 AM

A ping days after tomorrow: Done?

any news on this?

wbauer added a comment.Jan 3 2020, 9:18 AM

Unfortunately, this patch won't work as-is anymore because the "new" file is not available for download anymore either:

So it now shows an error message on startup as well:
Unknown host