Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net-dns/bind: revbump with GeoIP2 API support #12747

Closed
wants to merge 1 commit into from

Conversation

hsntgm
Copy link
Contributor

@hsntgm hsntgm commented Aug 19, 2019

@Zlogene @idl0r
Old reviewed & closed PR (replaced with this revbump PR) -> #12649

Legacy GeoIP databases were discontinued
on January 2, 2019.

*Updated GeoIP support to new API GeoLite2 from Maxmind.
*Fixed dosym relative path.
*Added keepdir for /var/log/named.

Closes: https://bugs.gentoo.org/692130
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Hasan ÇALIŞIR hasan.calisir@psauxit.com

Diff

--- bind-9.14.4.ebuild	        2019-08-19 19:11:35.649508009 +0300
+++ bind-9.14.4-r1.ebuild	2019-08-19 19:48:05.560057573 +0300
@@ -36,15 +36,16 @@
 
 LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
 SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 # -berkdb by default re bug 602682
-IUSE="-berkdb +caps dlz dnstap doc dnsrps fixed-rrset geoip gost gssapi
+IUSE="-berkdb +caps dlz dnstap doc dnsrps fixed-rrset geoip geoip2 gost gssapi
 json ldap libressl lmdb mysql odbc postgres python selinux ssl static-libs
 urandom xml +zlib"
 # sdb-ldap - patch broken
 # no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
 
 REQUIRED_USE="
+	?? ( geoip geoip2 )
 	postgres? ( dlz )
 	berkdb? ( dlz )
 	mysql? ( dlz )
@@ -65,6 +66,7 @@
 	caps? ( >=sys-libs/libcap-2.1.0 )
 	xml? ( dev-libs/libxml2 )
 	geoip? ( >=dev-libs/geoip-1.4.6 )
+	geoip2? ( dev-libs/libmaxminddb )
 	gssapi? ( virtual/krb5 )
 	json? ( dev-libs/json-c:= )
 	lmdb? ( dev-db/lmdb )
@@ -160,6 +162,7 @@
 	)
 
 	use geoip && myeconfargs+=( --with-geoip )
+	use geoip2 && myeconfargs+=( --with-geoip2 )
 
 	# bug #158664
 #	gcc-specs-ssp && replace-flags -O[23s] -O
@@ -253,10 +256,11 @@
 	# bug 450406
 	dosym named.cache /var/bind/root.cache
 
-	dosym /var/bind/pri /etc/bind/pri
-	dosym /var/bind/sec /etc/bind/sec
-	dosym /var/bind/dyn /etc/bind/dyn
+	dosym "${ED%/}/var/bind/pri" "/etc/bind/pri"
+	dosym "${ED%/}/var/bind/sec" "/etc/bind/sec"
+	dosym "${ED%/}/var/bind/dyn" "/etc/bind/dyn"
 	keepdir /var/bind/{pri,sec,dyn}
+	keepdir /var/log/named
 
 	dodir /var/log/named
 
@@ -375,9 +379,17 @@
 	fi
 
 	if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
-		mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP || die
+	   if use geoip; then
+	        mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP || die
+	   elif use geoip2; then
+		mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP2 || die
+	   fi
 	fi
 
 	elog "You may need to add the following line to your syslog-ng.conf:"
 	elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
+	elog "If you use new geoip2 API, keep in mind that bind now needs"
+	elog "binary databases in /usr/share/GeoIP2 folder"
+	elog "Additional support for GeoIP2 can be get from"
+	optfeature "Automatic updates of GeoIP2 binary databases" net-misc/geoipupdate
 }

Legacy GeoIP databases were discontinued
on January 2, 2019.

*Updated GeoIP support to new API GeoLite2 from Maxmind.
*Fixed dosym relative path.
*Added keepdir for /var/log/named.

Closes: https://bugs.gentoo.org/692130
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Hasan ÇALIŞIR <hasan.calisir@psauxit.com>
@gentoo-bot
Copy link

Copyright policy change

Please note that on 2018-09-15 Trustees have approved new Gentoo copyright policy. All contributions made to Gentoo need to follow this policy. If you include the Signed-off-by line in your commit message, you indicate that you have read the policy and agree to its terms. For more detailed explanation, please see the new Gentoo copyright policy explained article.

Pull Request assignment

Submitter: @hsntgm
Areas affected: ebuilds
Packages affected: net-dns/bind

net-dns/bind: @idl0r, @Zlogene

Linked bugs

Bugs linked: 692130


In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. labels Aug 19, 2019
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2019-08-19 17:40 UTC
Newest commit scanned: f3d6010
Status: ✅ good

No issues found

@hsntgm
Copy link
Contributor Author

hsntgm commented Aug 28, 2019

ping

@hsntgm
Copy link
Contributor Author

hsntgm commented Sep 2, 2019

It is very rude to take the idea here and commit it with your name @Zlogene.
At least why didn't you inform me? This is not an acceptable behaviour in open-source community!

I face this situation twice in gentoo. The last time my big openblas switch script work merged by an other dev. #12576 #11700

So if this is a normal in gentoo community i am done to make time for gentoo.

Special thanks to @juippis @perfinion @orlitzky @monsieurp for their supports. That was a great experience for me guys.

@mgorny i will send 'packages up for grabs' and will close all active PR's when i arrive home.

Best
~Hasan

@hsntgm hsntgm closed this Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR.
Projects
None yet
3 participants