Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 231242 (GeoDNS) - Patch for Bind 9.4.x to allow use of Maxmind's free GeoIPCityLite
Summary: Patch for Bind 9.4.x to allow use of Maxmind's free GeoIPCityLite
Status: RESOLVED FIXED
Alias: GeoDNS
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Highest enhancement (vote)
Assignee: BIND Maintainers (DISABLED)
URL: http://www.caraytech.com/geodns/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-08 23:53 UTC by Michael Moody
Modified: 2010-06-17 18:29 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch against Bind 9.4.2 for GeoDNS (bind-9.4.2-geodns-patch.diff,3.78 KB, patch)
2008-07-08 23:54 UTC, Michael Moody
Details | Diff
INSTALL for BIND patch (INSTALL,931 bytes, text/plain)
2008-07-08 23:55 UTC, Michael Moody
Details
README for patch (README,978 bytes, text/plain)
2008-07-08 23:55 UTC, Michael Moody
Details
Patch against 9.4.2-P1 (GeoDNS_Patch-Bind-9.4.2-P1.zip,2.67 KB, application/octet-stream)
2008-07-11 22:31 UTC, Michael Moody
Details
Updated patch for 9.4.3-P1 (bind-9.4.3-P1-geodns.patch,3.80 KB, patch)
2009-01-15 03:27 UTC, Michael Moody
Details | Diff
INSTALL for 9.4.3-P1 (INSTALL-bind-9.4.3-P1,2.23 KB, text/plain)
2009-01-15 03:28 UTC, Michael Moody
Details
README for 9.4.3-P1 (README-bind-9.4.3-P1,981 bytes, text/plain)
2009-01-15 03:28 UTC, Michael Moody
Details
Changelog for 9.4.3-P1 Patch (CHANGELOG-bind-9.4.3-P1,226 bytes, text/plain)
2009-01-15 03:29 UTC, Michael Moody
Details
Updated patch for 9.4.3-P1 (bind-9.4.3-P1-geodns.patch,3.47 KB, patch)
2009-01-15 04:10 UTC, Michael Moody
Details | Diff
patch to bind 9.4.3-P1 for region_* and country_* GeoDNS support (bind-9.4.3_p1-geodns.patch,3.63 KB, patch)
2009-01-21 12:26 UTC, Mike Williams
Details | Diff
Patch to bind-9.4.3_p1.ebuild to add geodns support (geodns-bind-9.4.3_p1.ebuild.patch,2.07 KB, patch)
2009-01-21 12:26 UTC, Mike Williams
Details | Diff
Updated README (geodns-README,1.25 KB, text/plain)
2009-01-21 12:27 UTC, Mike Williams
Details
corrected region_* support (geodns-bind-9.4.3_p1.ebuild.patch,2.07 KB, patch)
2009-01-21 17:49 UTC, Mike Williams
Details | Diff
corrected region_* support (bind-9.4.3_p1-geodns.patch,3.63 KB, patch)
2009-01-22 12:18 UTC, Mike Williams
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Moody 2008-07-08 23:53:52 UTC
I have created a patch based off of http://www.caraytech.com/geodns/ for bind 9.4.2 to allow use of the Maxmind GeoLityCity.dat database. This is useful to allow DNS queries based upon region.

Patch, README, and INSTALL are all included
Comment 1 Michael Moody 2008-07-08 23:54:27 UTC
Created attachment 159917 [details, diff]
Patch against Bind 9.4.2 for GeoDNS
Comment 2 Michael Moody 2008-07-08 23:55:01 UTC
Created attachment 159919 [details]
INSTALL for BIND patch
Comment 3 Michael Moody 2008-07-08 23:55:18 UTC
Created attachment 159921 [details]
README for patch
Comment 4 Walter 2008-07-09 12:03:07 UTC
yes, please add ASAP!
Comment 5 Michael Moody 2008-07-11 22:31:51 UTC
Created attachment 160153 [details]
Patch against 9.4.2-P1

This is a patch against 9.4.2-P1, which is now the latest. I have cleaned up the readme/install instructions, and have added Gentoo-specific instructions.

Someday, it would be great to see this as a USE flag against the bind ebuild.

Michael
Comment 6 Tobias Scherbaum (RETIRED) gentoo-dev 2008-07-23 19:03:35 UTC
(In reply to comment #5)
> Created an attachment (id=160153) [edit]
> Patch against 9.4.2-P1
> 
> This is a patch against 9.4.2-P1, which is now the latest. I have cleaned up
> the readme/install instructions, and have added Gentoo-specific instructions.

Please don't add archives, it's much easier to have a quick look at plaintext files :)
Comment 7 Walter 2008-07-24 00:04:12 UTC
> Please don't add archives, it's much easier to have a quick look at plaintext
> files :)

But not as easy as a working ebuild! :)
Comment 8 Michael Moody 2009-01-15 03:27:57 UTC
Created attachment 178544 [details, diff]
Updated patch for 9.4.3-P1

This is an updated patch for 9.4.3-P1. Nothing changed except clean patching against 9.4.3-P1.

Michael
Comment 9 Michael Moody 2009-01-15 03:28:30 UTC
Created attachment 178547 [details]
INSTALL for 9.4.3-P1

Updated INSTALL with cleaner instructions for 9.4.3-P1
Comment 10 Michael Moody 2009-01-15 03:28:51 UTC
Created attachment 178549 [details]
README for 9.4.3-P1
Comment 11 Michael Moody 2009-01-15 03:29:08 UTC
Created attachment 178551 [details]
Changelog for 9.4.3-P1 Patch
Comment 12 Michael Moody 2009-01-15 03:30:25 UTC
(In reply to comment #8)
> Created an attachment (id=178544) [edit]
> Updated patch for 9.4.3-P1
> 
> This is an updated patch for 9.4.3-P1. Nothing changed except clean patching
> against 9.4.3-P1.
> 
> Michael
> 

I forgot to mention, that the cflags in the instructions have been updated to contain "-g -O2" as well.

Michael
Comment 13 Michael Moody 2009-01-15 04:10:20 UTC
Created attachment 178552 [details, diff]
Updated patch for 9.4.3-P1

Original uploaded 9.4.3-P1 patch had problems with windows/linux newlines.

Michael
Comment 14 Mike Williams 2009-01-21 12:25:08 UTC
Patch, ebuild diff, and readme, for GeoLite Country, and GeoLite City, in bind coming next.
I've been running GeoLite Country now for 2 days, at hundreds of requests per second, with no noticeable performance or load issues.
Comment 15 Mike Williams 2009-01-21 12:26:16 UTC
Created attachment 179167 [details, diff]
patch to bind 9.4.3-P1 for region_* and country_* GeoDNS support
Comment 16 Mike Williams 2009-01-21 12:26:52 UTC
Created attachment 179168 [details, diff]
Patch to bind-9.4.3_p1.ebuild to add geodns support
Comment 17 Mike Williams 2009-01-21 12:27:12 UTC
Created attachment 179170 [details]
Updated README
Comment 18 Michael Moody 2009-01-21 16:49:13 UTC
(In reply to comment #14)
> Patch, ebuild diff, and readme, for GeoLite Country, and GeoLite City, in bind
> coming next.
> I've been running GeoLite Country now for 2 days, at hundreds of requests per
> second, with no noticeable performance or load issues.
> 

Well go ahead and show me up then :)

One question however:

Have you tested region? I see you changed the following - 

+			} else if ((0 == (strncmp("region_", name, 8))) && (10 == strlen(name))) {
+				/* It is a region code */
+				de->type = dns_aclelementtype_ipregion;
+				de->u.region[0] = name[8];
+				de->u.region[1] = name[9];
+				de->u.region[2] = '\0';

used to be - 

+                        } else if ((0 == (strncmp("region_", name, 7))) && (9 == strlen(name))) {
+                                /* It is a region code */
+                                de->type = dns_aclelementtype_ipregion;
+                                de->u.region[0] = name[7];
+                                de->u.region[1] = name[8];
+                                de->u.region[2] = '\0';


Other than that, really, thanks for the ebuild!

Michael
Comment 19 Mike Williams 2009-01-21 17:48:40 UTC
(In reply to comment #18)
> Well go ahead and show me up then :)

Heh, sorry, we've got a large project that hinges around country base Geo distribution :)

> One question however:
> 
> Have you tested region? I see you changed the following - 

You know what. I haven't!
Pretty obvious what I did to mess up your changes too.

> +                       } else if ((0 == (strncmp("region_", name, 8))) && (10

> used to be - 

> +                        } else if ((0 == (strncmp("region_", name, 7))) && (9
> == strlen(name))) {

> Other than that, really, thanks for the ebuild!
> 
> Michael

No probs, I've got 3 more machines to roll this out on to, so the ebuild helps me significantly.

Mike
Comment 20 Mike Williams 2009-01-21 17:49:49 UTC
Created attachment 179186 [details, diff]
corrected region_* support
Comment 21 Michael Moody 2009-01-22 00:15:07 UTC
Mike,

I suspect that you marked as obsolete the wrong patch:

bind-9.4.3_p1-geodns.patch is not corrected, and geodns-bind-9.4.3_p1.ebuild.patch was the most recent upload.

Michael
Comment 22 Mike Williams 2009-01-22 12:17:23 UTC
Comment on attachment 179186 [details, diff]
corrected region_* support

duplicate ebuild patch
Comment 23 Mike Williams 2009-01-22 12:18:32 UTC
Created attachment 179323 [details, diff]
corrected region_* support

Oops, I should have uploaded the updated bind patch to fix region_* acl support, not the ebuild patch again!
Comment 24 Christian Ruppert (idl0r) gentoo-dev 2010-05-12 14:38:19 UTC
bind-9.6.1_p3-r1 got a geoip patch http://code.google.com/p/bind-geoip/
I'll close this bug in case you're ok with it otherwise let me know if and esp. why not.