Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#2216 closed Enhancement (wontfix)

[patch] add support for ip geo localization

Reported by: chantra Owned by: charles
Priority: Normal Milestone: None Set
Component: GTK+ Client Version: 1.71
Severity: Normal Keywords: patch
Cc:

Description

Geo localization of an IP can easily be achieved with the help of libgeoip. This patch let users visualise from which country an IP belongs to through torrent->properties->peers . If libgeoip is no found on the system at compile time, the feature will be disable.

Attachments (4)

country_flags.diff.gz (254.7 KB) - added by chantra 12 years ago.
ip geo localisation patch
Screenshot-Transmission-countryflags.png (60.4 KB) - added by chantra 12 years ago.
screenie
country_flags2.diff.gz (255.4 KB) - added by chantra 12 years ago.
adding preference option
transmission-geoloc-pref.png (42.9 KB) - added by chantra 12 years ago.
preference screenie

Download all attachments as: .zip

Change History (18)

Changed 12 years ago by chantra

ip geo localisation patch

Changed 12 years ago by chantra

screenie

comment:1 follow-up: Changed 12 years ago by charles

  • Milestone changed from Sometime to None Set

Thanks for the patch.

I'm not sure what I think about this.

On the one hand, it's nice eye candy that lots of users have gotten used to in other BitTorrent? clients, and having a clean patch in-hand goes a really long way. ;)

On the other hand, it's a feature that we've turned down before as bloat, and also a feature that caused a dust-up for Fedora less than a month ago. <https://bugzilla.redhat.com/show_bug.cgi?id=479265> In fact, the similar feature in Deluge is cited in their policy as an example of something to not ship in Fedora.

Also I need to do more reading on GeoIP itself. After reading through this thread <http://www.mail-archive.com/debian-legal@lists.debian.org/msg39386.html> I'm baffled at how literally stripping out a legal notice (sed 's/ All Rights Reserved' -i deluge/data/GeoIP.dat) is even permissible, much less seen as a way of attaining dfsg compliance.

comment:2 follow-up: Changed 12 years ago by charles

Another possible problem: it looks like Debian once (and possibly still does) strip the icons from KTorrent because their "obscure license".

Where do the flag icons in this patch come from, and what is their licensing status?

comment:3 follow-up: Changed 12 years ago by mezz

I agree with Fedora's policy and it wastes the bandwidth. The flags can cause serious political problems just like religions.

Keep in my mind for it's my very own opinion: I find this feature to be the most useless. I can't find anything useful with this. I would like this feature to be keep as optional forever if it is going to be included.

comment:4 in reply to: ↑ 1 Changed 12 years ago by chantra

On the other hand, it's a feature that we've turned down before as bloat, and also a feature that caused a dust-up for Fedora less than a month ago. <https://bugzilla.redhat.com/show_bug.cgi?id=479265> In fact, the similar feature in Deluge is cited in their policy as an example of something to not ship in Fedora.

Yeah, I did not consider any political concern/offend on that as to me it is just a way to see where users are more or less located :) On the other hand, I remember while working for a US employer, my IP at work being seen as being from Iran while it was an US IP :p, so I know how accurate this could be. Anyhow, this could be a GUI option that defaults to disabled and can be set by users if they are not offended by it. Leaving the ones that want to see where user are potentially located a way to do it.

Also I need to do more reading on GeoIP itself. After reading through this thread <http://www.mail-archive.com/debian-legal@lists.debian.org/msg39386.html> I'm baffled at how literally stripping out a legal notice (sed 's/ All Rights Reserved' -i deluge/data/GeoIP.dat) is even permissible, much less seen as a way of attaining dfsg compliance.

Hum, this might be a tricky one. The API is LGPL and obviously has to use their DB in the backend. It is still shipped in debian lenny: http://packages.debian.org/lenny/i386/libgeoip1/filelist As of today's ubuntu 9.04 packages, the licensing includes this at the end of GeoIP.dat: GEO-106FREE 20080101 Build 1 Copyright (c) 2007 MaxMind? LLC and /usr/share/doc/libgeoip1/README.Debian-source contains: I removed with the following sed line the non-free copyright statement: $ sed 's/ All Rights Reserved' -i data/GeoIP.dat

I asked in an email the upstream author for permissions to change this non-free copyright statement, here is the full email conversation with all headers: (file will be attached). So my understanding is that as long as the package is available in your distro, you can use the API as per LGPL, but I have no legal knowledge at all :).

comment:5 in reply to: ↑ 2 Changed 12 years ago by chantra

Replying to charles:

Another possible problem: it looks like Debian once (and possibly still does) strip the icons from KTorrent because their "obscure license".

Where do the flag icons in this patch come from, and what is their licensing status?

I have added a file: gtk/icons/flags/COPYING This directory source was originaly taken from aMule src/pixmaps/flags_xpm/ folder.

Original license seems to be GPLv2 I did not find any official license for this specific folder

comment:6 in reply to: ↑ 3 Changed 12 years ago by chantra

Replying to mezz:

I agree with Fedora's policy and it wastes the bandwidth. The flags can cause serious political problems just like religions.

Bandwith: no, it is a local file. Religion/political... was not in my mind at all, but I can understand that some people might be offended, some others might just like it. Well, this was discussed above.

Keep in my mind for it's my very own opinion: I find this feature to be the most useless. I can't find anything useful with this. I would like this feature to be keep as optional forever if it is going to be included.

option was discussed above, but I did not have time to type fast enough :). the good thing about options is that they can make everybody happy. Likings are so different with 6T people that it is hard to suit everybody :)

In terms of resources, it should only query the db when you are actually checking the property of a torrent.

comment:7 follow-up: Changed 12 years ago by chantra

also, forgot to mention. The feature is disabled if:

  • libgeoip is not available
  • configured with --with-libgeoip=no

comment:8 in reply to: ↑ 7 ; follow-up: Changed 12 years ago by mezz

Replying to chantra:

also, forgot to mention. The feature is disabled if:

  • libgeoip is not available
  • configured with --with-libgeoip=no

--disable-libgeoip or --without-libgeoip would be better, but doesn't matter as long as I can disable it. ;-) Thanks!

Changed 12 years ago by chantra

adding preference option

Changed 12 years ago by chantra

preference screenie

comment:9 in reply to: ↑ 8 Changed 12 years ago by chantra

--disable-libgeoip or --without-libgeoip would be better, but doesn't matter as long as I can disable it. ;-) Thanks!

I just mimicked the config of inotify :p.

ok, new patch uploaded. now: if libgeoip is available and enabled, a new preference is available (client wide). default is disabled and a tooltip is explaining more about geoip (flag in front of ip).

comment:10 Changed 12 years ago by charles

  • Resolution set to wontfix
  • Status changed from new to closed

Pros:

  • The flags are kind of fun.
  • I try to accept good patches in the hope that it encourages their author to make more patches :)

Cons:

  • Is eye-candy only; no operation gain
  • Grows the tarball size yet again
  • Adds a new optional compile-time dependency
  • Possibly grows the preferences dialog
  • Will be removed by Fedora anyway, where we are the default BT client

Even though there are two valid sides to this ticket, I think the best thing is to just close it now as a wontfix instead of waffling around. Also, I hope this doesn't discourage you from submitting future patches.

comment:11 Changed 12 years ago by chantra

not a big deal :) Thanks was mainly a good way to get hands-on back on C in a practical way ;).

comment:12 Changed 12 years ago by User294

# Is eye-candy only; no operation gain

I can see some small gain: it allows to have eye-candy "statistic" of content distribution over various countries. Not critical, and adds bloat but still could be useful in some cases.

comment:13 Changed 12 years ago by Longinus00

Would it be possible to use country codes instead of flags? The wording seems to indicate that it is the flags and not necessarily the countries themselves that are causing concern, although I can see some countries taking offence at the mere existence of other countries (think China and Taiwan).

The Fedora policy page states that the policy is currently not in effect " pending information gathering and crafting a better policy." https://fedoraproject.org/wiki/Package_Maintainers_Flags_Policy

comment:14 Changed 11 years ago by Ozman

Hi, I would very much like to use this patch but I have 2 questions. (1) does it work with Transmission v2.01? (2) How do you install it on Ubuntu 10.04?

Thanks for all replies

Note: See TracTickets for help on using tickets.