summaryrefslogtreecommitdiff
path: root/net-dns
diff options
context:
space:
mode:
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/avahi/Manifest24
-rw-r--r--net-dns/avahi/avahi-0.6.31-r10.ebuild252
-rw-r--r--net-dns/avahi/avahi-0.6.31-r11.ebuild247
-rw-r--r--net-dns/avahi/avahi-0.6.32-r1.ebuild232
-rw-r--r--net-dns/avahi/avahi-0.6.32-r2.ebuild233
-rw-r--r--net-dns/avahi/avahi-0.6.32.ebuild229
-rw-r--r--net-dns/avahi/avahi-0.7.ebuild211
-rw-r--r--net-dns/avahi/files/autoipd-openrc.sh32
-rw-r--r--net-dns/avahi/files/autoipd.sh52
-rw-r--r--net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch83
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch27
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch31
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch20
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch85
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch11
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-invalid_packet.patch21
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch30
-rw-r--r--net-dns/avahi/files/avahi-0.6.32-openrc-0.21.7-fix-init-scripts.patch18
-rw-r--r--net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch22
-rw-r--r--net-dns/avahi/metadata.xml24
-rw-r--r--net-dns/bind-dns-keygen/Manifest5
-rw-r--r--net-dns/bind-dns-keygen/bind-dns-keygen-9.3.2.39-r1.ebuild30
-rw-r--r--net-dns/bind-dns-keygen/metadata.xml5
-rw-r--r--net-dns/bind-tools/Manifest11
-rw-r--r--net-dns/bind-tools/bind-tools-9.11.1_p1.ebuild136
-rw-r--r--net-dns/bind-tools/bind-tools-9.11.1_p3.ebuild136
-rw-r--r--net-dns/bind-tools/bind-tools-9.11.2.ebuild133
-rw-r--r--net-dns/bind-tools/files/bind-tools-9.11.0_p5-dyndb-dlopen.patch97
-rw-r--r--net-dns/bind-tools/files/bind-tools-9.5.0_p1-lwconfig.patch63
-rw-r--r--net-dns/bind-tools/metadata.xml14
-rw-r--r--net-dns/bind/Manifest20
-rw-r--r--net-dns/bind/bind-9.11.1_p1.ebuild426
-rw-r--r--net-dns/bind/bind-9.11.1_p3.ebuild426
-rw-r--r--net-dns/bind/bind-9.11.2.ebuild423
-rw-r--r--net-dns/bind/files/10bind.env1
-rw-r--r--net-dns/bind/files/bind-9.11.0_p5-dyndb-dlopen.patch97
-rw-r--r--net-dns/bind/files/generate-rndc-key.sh7
-rw-r--r--net-dns/bind/files/localhost.zone-r311
-rw-r--r--net-dns/bind/files/named.cache-r392
-rw-r--r--net-dns/bind/files/named.conf1
-rw-r--r--net-dns/bind/files/named.conf-r8166
-rw-r--r--net-dns/bind/files/named.confd-r748
-rw-r--r--net-dns/bind/files/named.init-r13252
-rw-r--r--net-dns/bind/files/named.service-r113
-rw-r--r--net-dns/bind/metadata.xml22
-rw-r--r--net-dns/c-ares/Manifest8
-rw-r--r--net-dns/c-ares/c-ares-1.12.0.ebuild42
-rw-r--r--net-dns/c-ares/c-ares-1.13.0.ebuild42
-rw-r--r--net-dns/c-ares/files/c-ares-1.12.0-remove-tests.patch14
-rw-r--r--net-dns/c-ares/metadata.xml11
-rw-r--r--net-dns/cagibi/Manifest5
-rw-r--r--net-dns/cagibi/cagibi-0.2.0.ebuild25
-rw-r--r--net-dns/cagibi/metadata.xml8
-rw-r--r--net-dns/coredns/Manifest4
-rw-r--r--net-dns/coredns/coredns-010.ebuild38
-rw-r--r--net-dns/coredns/metadata.xml11
-rw-r--r--net-dns/ddclient/Manifest16
-rw-r--r--net-dns/ddclient/ddclient-3.8.1-r5.ebuild55
-rw-r--r--net-dns/ddclient/ddclient-3.8.2.ebuild46
-rw-r--r--net-dns/ddclient/ddclient-3.8.3.ebuild49
-rw-r--r--net-dns/ddclient/files/cmd-over-cfg.patch11
-rw-r--r--net-dns/ddclient/files/ddclient.confd2
-rw-r--r--net-dns/ddclient/files/ddclient.confd-r12
-rw-r--r--net-dns/ddclient/files/ddclient.initd-r357
-rw-r--r--net-dns/ddclient/files/ddclient.initd-r435
-rw-r--r--net-dns/ddclient/files/ddclient.service12
-rw-r--r--net-dns/ddclient/files/iproute2.patch30
-rw-r--r--net-dns/ddclient/metadata.xml15
-rw-r--r--net-dns/djbdns/Manifest21
-rw-r--r--net-dns/djbdns/djbdns-1.05-r32.ebuild154
-rw-r--r--net-dns/djbdns/files/1.05-errno-r1.patch11
-rw-r--r--net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25-r1.patch351
-rw-r--r--net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-r1.patch349
-rw-r--r--net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch68
-rw-r--r--net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records.patch70
-rw-r--r--net-dns/djbdns/files/CVE2009-0858_0001-check-response-domain-name-length.patch11
-rw-r--r--net-dns/djbdns/files/CVE2012-1191_0001-ghost-domain-attack.patch22
-rw-r--r--net-dns/djbdns/files/dnsroots.patch20
-rw-r--r--net-dns/djbdns/files/dnstracesort.patch11
-rw-r--r--net-dns/djbdns/files/headtail-r1.patch67
-rw-r--r--net-dns/djbdns/files/increase-cname-recustion-depth.patch43
-rw-r--r--net-dns/djbdns/files/makefile-parallel-test25.patch91
-rw-r--r--net-dns/djbdns/files/srv_record_support.patch180
-rw-r--r--net-dns/djbdns/files/string_length_255.patch11
-rw-r--r--net-dns/djbdns/metadata.xml8
-rw-r--r--net-dns/dnrd/Manifest8
-rw-r--r--net-dns/dnrd/dnrd-2.20.3-r1.ebuild43
-rw-r--r--net-dns/dnrd/files/dnrd23
-rw-r--r--net-dns/dnrd/files/dnrd-2.20.3-docdir.patch21
-rw-r--r--net-dns/dnrd/files/dnrd.conf11
-rw-r--r--net-dns/dnrd/metadata.xml18
-rw-r--r--net-dns/dnscap/Manifest6
-rw-r--r--net-dns/dnscap/dnscap-20130814.ebuild29
-rw-r--r--net-dns/dnscap/files/dnscap-20130814.install.patch22
-rw-r--r--net-dns/dnscap/metadata.xml12
-rw-r--r--net-dns/dnscrypt-proxy/Manifest8
-rw-r--r--net-dns/dnscrypt-proxy/dnscrypt-proxy-1.9.4-r1.ebuild62
-rw-r--r--net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd7
-rw-r--r--net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd47
-rw-r--r--net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service20
-rw-r--r--net-dns/dnscrypt-proxy/metadata.xml17
-rw-r--r--net-dns/dnsdist/Manifest7
-rw-r--r--net-dns/dnsdist/dnsdist-1.1.0-r1.ebuild84
-rw-r--r--net-dns/dnsdist/dnsdist-9999.ebuild86
-rw-r--r--net-dns/dnsdist/files/dnsdist.conf.example19
-rw-r--r--net-dns/dnsdist/files/dnsdist.confd13
-rw-r--r--net-dns/dnsdist/files/dnsdist.initd55
-rw-r--r--net-dns/dnsdist/metadata.xml22
-rw-r--r--net-dns/dnshijacker/Manifest6
-rw-r--r--net-dns/dnshijacker/dnshijacker-1.3-r2.ebuild36
-rw-r--r--net-dns/dnshijacker/files/dnshijacker-1.3-gentoo.patch37
-rw-r--r--net-dns/dnshijacker/metadata.xml5
-rw-r--r--net-dns/dnsimple-dyndns/Manifest5
-rw-r--r--net-dns/dnsimple-dyndns/dnsimple-dyndns-0.1.ebuild32
-rw-r--r--net-dns/dnsimple-dyndns/metadata.xml19
-rw-r--r--net-dns/dnsmasq/Manifest17
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.76-r1.ebuild192
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.76.ebuild188
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.77-r1.ebuild198
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.77.ebuild196
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.78.ebuild198
-rw-r--r--net-dns/dnsmasq/files/dnsmasq-init-dhcp-r129
-rw-r--r--net-dns/dnsmasq/files/dnsmasq-init-dhcp-r229
-rw-r--r--net-dns/dnsmasq/files/dnsmasq-init-r223
-rw-r--r--net-dns/dnsmasq/files/dnsmasq-init-r323
-rw-r--r--net-dns/dnsmasq/files/dnsmasq.confd-r14
-rw-r--r--net-dns/dnsmasq/files/dnsmasq.service-r112
-rw-r--r--net-dns/dnsmasq/metadata.xml22
-rw-r--r--net-dns/dnssec-check/Manifest5
-rw-r--r--net-dns/dnssec-check/dnssec-check-2.2.ebuild35
-rw-r--r--net-dns/dnssec-check/metadata.xml8
-rw-r--r--net-dns/dnssec-lookup/Manifest7
-rw-r--r--net-dns/dnssec-lookup/dnssec-lookup-2.1.ebuild37
-rw-r--r--net-dns/dnssec-lookup/dnssec-lookup-2.2.ebuild37
-rw-r--r--net-dns/dnssec-lookup/metadata.xml14
-rw-r--r--net-dns/dnssec-nodes/Manifest7
-rw-r--r--net-dns/dnssec-nodes/dnssec-nodes-2.1.ebuild32
-rw-r--r--net-dns/dnssec-nodes/dnssec-nodes-2.2.ebuild32
-rw-r--r--net-dns/dnssec-nodes/metadata.xml8
-rw-r--r--net-dns/dnssec-root/Manifest13
-rw-r--r--net-dns/dnssec-root/dnssec-root-20150403.ebuild81
-rw-r--r--net-dns/dnssec-root/files/anchors2ds.xsl32
-rw-r--r--net-dns/dnssec-root/files/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc70
-rw-r--r--net-dns/dnssec-root/metadata.xml9
-rw-r--r--net-dns/dnssec-system-tray/Manifest7
-rw-r--r--net-dns/dnssec-system-tray/dnssec-system-tray-2.1.ebuild33
-rw-r--r--net-dns/dnssec-system-tray/dnssec-system-tray-2.2.ebuild33
-rw-r--r--net-dns/dnssec-system-tray/metadata.xml8
-rw-r--r--net-dns/dnssec-tools/Manifest14
-rw-r--r--net-dns/dnssec-tools/dnssec-tools-2.1.ebuild66
-rw-r--r--net-dns/dnssec-tools/dnssec-tools-2.2.ebuild66
-rw-r--r--net-dns/dnssec-tools/files/dnssec-tools-2.0-dtinitconf.patch24
-rw-r--r--net-dns/dnssec-tools/files/donutsd.confd8
-rw-r--r--net-dns/dnssec-tools/files/donutsd.initd19
-rw-r--r--net-dns/dnssec-tools/files/donutsd.service8
-rw-r--r--net-dns/dnssec-tools/files/rollerd.confd8
-rw-r--r--net-dns/dnssec-tools/files/rollerd.initd16
-rw-r--r--net-dns/dnssec-tools/files/rollerd.service8
-rw-r--r--net-dns/dnssec-tools/metadata.xml8
-rw-r--r--net-dns/dnssec-validator/Manifest8
-rw-r--r--net-dns/dnssec-validator/dnssec-validator-2.1.ebuild46
-rw-r--r--net-dns/dnssec-validator/dnssec-validator-2.2.ebuild46
-rw-r--r--net-dns/dnssec-validator/files/dnssec-validator-2.1-respect-LDFLAGS.patch22
-rw-r--r--net-dns/dnssec-validator/metadata.xml8
-rw-r--r--net-dns/dnstop/Manifest7
-rw-r--r--net-dns/dnstop/dnstop-20140915-r2.ebuild36
-rw-r--r--net-dns/dnstop/dnstop-20140915.ebuild34
-rw-r--r--net-dns/dnstop/files/dnstop-20140915-pkg-config.patch29
-rw-r--r--net-dns/dnstop/metadata.xml20
-rw-r--r--net-dns/dnswalk/Manifest5
-rw-r--r--net-dns/dnswalk/dnswalk-2.0.2.ebuild28
-rw-r--r--net-dns/dnswalk/metadata.xml8
-rw-r--r--net-dns/ez-ipupdate/Manifest12
-rw-r--r--net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r3.ebuild127
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-3322.diff65
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-dnsexit.diff262
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff41
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-linux.diff213
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate.initd93
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate.service12
-rw-r--r--net-dns/ez-ipupdate/metadata.xml10
-rw-r--r--net-dns/fpdns/Manifest6
-rw-r--r--net-dns/fpdns/files/fpdns-0.10.0_pre20130404.ro-header.patch33
-rw-r--r--net-dns/fpdns/fpdns-0.10.0_pre20130404-r1.ebuild33
-rw-r--r--net-dns/fpdns/metadata.xml29
-rw-r--r--net-dns/hash-slinger/Manifest7
-rw-r--r--net-dns/hash-slinger/hash-slinger-2.6-r1.ebuild44
-rw-r--r--net-dns/hash-slinger/hash-slinger-2.7.ebuild44
-rw-r--r--net-dns/hash-slinger/metadata.xml13
-rw-r--r--net-dns/hesiod/Manifest6
-rw-r--r--net-dns/hesiod/hesiod-3.1.0.ebuild35
-rw-r--r--net-dns/hesiod/metadata.xml5
-rw-r--r--net-dns/https_dns_proxy/Manifest2
-rw-r--r--net-dns/https_dns_proxy/https_dns_proxy-9999.ebuild27
-rw-r--r--net-dns/https_dns_proxy/metadata.xml11
-rw-r--r--net-dns/idnkit/Manifest6
-rw-r--r--net-dns/idnkit/files/idnkit-1.0-autotools.patch64
-rw-r--r--net-dns/idnkit/idnkit-1.0-r2.ebuild41
-rw-r--r--net-dns/idnkit/metadata.xml8
-rw-r--r--net-dns/knot/Manifest14
-rw-r--r--net-dns/knot/files/2.5.3-link-with-libatomic.patch117
-rw-r--r--net-dns/knot/files/knot-1.service17
-rw-r--r--net-dns/knot/files/knot.init41
-rw-r--r--net-dns/knot/files/knot.service14
-rw-r--r--net-dns/knot/knot-2.4.5.ebuild78
-rw-r--r--net-dns/knot/knot-2.5.3-r1.ebuild105
-rw-r--r--net-dns/knot/knot-2.5.3.ebuild77
-rw-r--r--net-dns/knot/knot-2.5.4.ebuild101
-rw-r--r--net-dns/knot/metadata.xml56
-rw-r--r--net-dns/ldns-utils/Manifest10
-rw-r--r--net-dns/ldns-utils/files/1.6.12-cflags.patch22
-rw-r--r--net-dns/ldns-utils/ldns-utils-1.6.12.ebuild61
-rw-r--r--net-dns/ldns-utils/ldns-utils-1.6.17.ebuild55
-rw-r--r--net-dns/ldns-utils/ldns-utils-1.7.0.ebuild55
-rw-r--r--net-dns/ldns-utils/metadata.xml19
-rw-r--r--net-dns/libidn/Manifest8
-rw-r--r--net-dns/libidn/files/50libidn-gentoo.el12
-rw-r--r--net-dns/libidn/files/libidn-1.33-CVE-2017-14062.patch32
-rw-r--r--net-dns/libidn/libidn-1.33-r1.ebuild125
-rw-r--r--net-dns/libidn/libidn-1.33.ebuild120
-rw-r--r--net-dns/libidn/metadata.xml8
-rw-r--r--net-dns/libidn2/Manifest14
-rw-r--r--net-dns/libidn2/files/libidn2-0.12-Werror.patch11
-rw-r--r--net-dns/libidn2/files/libidn2-0.12-examples.patch11
-rw-r--r--net-dns/libidn2/files/libidn2-0.16-cross.patch28
-rw-r--r--net-dns/libidn2/files/libidn2-0.16-gengetopt.patch11
-rw-r--r--net-dns/libidn2/files/libidn2-pkgconfig.diff42
-rw-r--r--net-dns/libidn2/libidn2-0.16-r1.ebuild54
-rw-r--r--net-dns/libidn2/libidn2-2.0.2.ebuild50
-rw-r--r--net-dns/libidn2/libidn2-2.0.4.ebuild51
-rw-r--r--net-dns/libidn2/metadata.xml7
-rw-r--r--net-dns/maradns/Manifest12
-rw-r--r--net-dns/maradns/files/deadwood21
-rw-r--r--net-dns/maradns/files/maradns-2.0.06-askmara-tcp.patch251
-rw-r--r--net-dns/maradns/files/maradns-2.0.06-duende-man.patch109
-rw-r--r--net-dns/maradns/files/maradns-2.0.09-build.patch43
-rw-r--r--net-dns/maradns/files/maradns.service.in9
-rw-r--r--net-dns/maradns/files/maradns222
-rw-r--r--net-dns/maradns/files/zoneserver221
-rw-r--r--net-dns/maradns/maradns-2.0.09-r2.ebuild101
-rw-r--r--net-dns/maradns/metadata.xml8
-rw-r--r--net-dns/mdns-repeater/Manifest4
-rw-r--r--net-dns/mdns-repeater/mdns-repeater-20110921.ebuild28
-rw-r--r--net-dns/mdns-repeater/metadata.xml15
-rw-r--r--net-dns/metadata.xml35
-rw-r--r--net-dns/mydns/Manifest9
-rw-r--r--net-dns/mydns/files/mydns-1.2.8.27-m4.patch53
-rw-r--r--net-dns/mydns/files/mydns-1.2.8.31-texinfo.patch30
-rw-r--r--net-dns/mydns/files/mydns.confd4
-rw-r--r--net-dns/mydns/files/mydns.initd35
-rw-r--r--net-dns/mydns/metadata.xml12
-rw-r--r--net-dns/mydns/mydns-1.2.8.31-r1.ebuild84
-rw-r--r--net-dns/ndu/Manifest6
-rw-r--r--net-dns/ndu/files/ndu-0.4-binary-locations.patch14
-rw-r--r--net-dns/ndu/metadata.xml8
-rw-r--r--net-dns/ndu/ndu-0.4-r4.ebuild59
-rw-r--r--net-dns/nsd/Manifest11
-rwxr-xr-xnet-dns/nsd/files/nsd.initd-r159
-rw-r--r--net-dns/nsd/files/nsd.munin-conf2
-rw-r--r--net-dns/nsd/files/nsd.service14
-rw-r--r--net-dns/nsd/files/nsd_munin_.patch17
-rw-r--r--net-dns/nsd/metadata.xml25
-rw-r--r--net-dns/nsd/nsd-4.1.16.ebuild101
-rw-r--r--net-dns/nsd/nsd-4.1.17.ebuild101
-rw-r--r--net-dns/odsclient/Manifest6
-rw-r--r--net-dns/odsclient/files/1.03-gentoo.patch21
-rw-r--r--net-dns/odsclient/metadata.xml5
-rw-r--r--net-dns/odsclient/odsclient-1.03-r1.ebuild34
-rw-r--r--net-dns/opendnssec/Manifest27
-rw-r--r--net-dns/opendnssec/files/opendnssec-1.3.14-drop-privileges.patch43
-rw-r--r--net-dns/opendnssec/files/opendnssec-1.3.14-use-system-trang.patch21
-rw-r--r--net-dns/opendnssec/files/opendnssec-1.3.18-eppclient-curl-CVE-2012-5582.patch12
-rw-r--r--net-dns/opendnssec/files/opendnssec-drop-privileges-2.0.x.patch29
-rw-r--r--net-dns/opendnssec/files/opendnssec-drop-privileges.patch28
-rw-r--r--net-dns/opendnssec/files/opendnssec-fix-localstatedir-2.0.x.patch22
-rw-r--r--net-dns/opendnssec/files/opendnssec-fix-localstatedir.patch32
-rw-r--r--net-dns/opendnssec/files/opendnssec-fix-run-dir-2.0.x.patch24
-rw-r--r--net-dns/opendnssec/files/opendnssec-fix-run-dir.patch26
-rw-r--r--net-dns/opendnssec/files/opendnssec-use-system-trang.patch20
-rw-r--r--net-dns/opendnssec/files/opendnssec.confd11
-rw-r--r--net-dns/opendnssec/files/opendnssec.confd-1.3.x13
-rw-r--r--net-dns/opendnssec/files/opendnssec.initd85
-rw-r--r--net-dns/opendnssec/files/opendnssec.initd-1.3.x123
-rw-r--r--net-dns/opendnssec/metadata.xml15
-rw-r--r--net-dns/opendnssec/opendnssec-1.3.18-r1.ebuild203
-rw-r--r--net-dns/opendnssec/opendnssec-1.4.12-r1.ebuild207
-rw-r--r--net-dns/opendnssec/opendnssec-1.4.8.2.ebuild205
-rw-r--r--net-dns/opendnssec/opendnssec-2.0.1-r1.ebuild239
-rw-r--r--net-dns/opendnssec/opendnssec-2.0.3.ebuild239
-rw-r--r--net-dns/openresolv/Manifest8
-rw-r--r--net-dns/openresolv/files/3.8.1-restore-newline.patch16
-rw-r--r--net-dns/openresolv/metadata.xml10
-rw-r--r--net-dns/openresolv/openresolv-3.8.1.ebuild44
-rw-r--r--net-dns/openresolv/openresolv-3.9.0.ebuild40
-rw-r--r--net-dns/pdns-ldap-backend/Manifest5
-rw-r--r--net-dns/pdns-ldap-backend/metadata.xml9
-rw-r--r--net-dns/pdns-ldap-backend/pdns-ldap-backend-0.2.ebuild39
-rw-r--r--net-dns/pdns-recursor/Manifest14
-rw-r--r--net-dns/pdns-recursor/files/pdns-recursor27
-rw-r--r--net-dns/pdns-recursor/files/pdns-recursor-4.0.3-boost-1.61-fcontext.patch152
-rw-r--r--net-dns/pdns-recursor/files/pdns-recursor-4.0.3-ecdsa.patch29
-rw-r--r--net-dns/pdns-recursor/files/pdns-recursor-r137
-rw-r--r--net-dns/pdns-recursor/metadata.xml22
-rw-r--r--net-dns/pdns-recursor/pdns-recursor-4.0.4-r1.ebuild75
-rw-r--r--net-dns/pdns-recursor/pdns-recursor-4.0.4.ebuild75
-rw-r--r--net-dns/pdns-recursor/pdns-recursor-4.0.5.ebuild75
-rw-r--r--net-dns/pdns-recursor/pdns-recursor-4.0.6.ebuild75
-rw-r--r--net-dns/pdns/Manifest15
-rw-r--r--net-dns/pdns/files/dnsdomain2.schema195
-rw-r--r--net-dns/pdns/files/pdns61
-rw-r--r--net-dns/pdns/files/pdns-r1102
-rw-r--r--net-dns/pdns/metadata.xml24
-rw-r--r--net-dns/pdns/pdns-4.0.2.ebuild153
-rw-r--r--net-dns/pdns/pdns-4.0.3-r3.ebuild153
-rw-r--r--net-dns/pdns/pdns-4.0.3.ebuild153
-rw-r--r--net-dns/pdns/pdns-4.0.4.ebuild153
-rw-r--r--net-dns/pdns/pdns-4.1.0_rc1.ebuild151
-rw-r--r--net-dns/pdnsd/Manifest11
-rw-r--r--net-dns/pdnsd/files/pdnsd.conf.test27
-rw-r--r--net-dns/pdnsd/files/pdnsd.online.233
-rw-r--r--net-dns/pdnsd/files/pdnsd.rc827
-rw-r--r--net-dns/pdnsd/files/pdnsd.resolvconf-r1631
-rw-r--r--net-dns/pdnsd/files/pdnsd.service11
-rw-r--r--net-dns/pdnsd/files/pdnsd.tmpfiles1
-rw-r--r--net-dns/pdnsd/metadata.xml24
-rw-r--r--net-dns/pdnsd/pdnsd-1.2.9a-r1.ebuild131
-rw-r--r--net-dns/rbldnsd/Manifest11
-rw-r--r--net-dns/rbldnsd/files/confd-0.997a35
-rw-r--r--net-dns/rbldnsd/files/initd-0.997a24
-rw-r--r--net-dns/rbldnsd/files/rbldnsd-0.997a-format-security-compile-fix.patch30
-rw-r--r--net-dns/rbldnsd/files/rbldnsd-0.997a-robust-ipv6-test-support.patch329
-rw-r--r--net-dns/rbldnsd/files/rbldnsd-0.998-fix-huge-zone-OOM.patch60
-rw-r--r--net-dns/rbldnsd/metadata.xml30
-rw-r--r--net-dns/rbldnsd/rbldnsd-0.998-r2.ebuild67
-rw-r--r--net-dns/rbldnsd/rbldnsd-0.998.ebuild66
-rw-r--r--net-dns/resolv_wrapper/Manifest6
-rw-r--r--net-dns/resolv_wrapper/metadata.xml12
-rw-r--r--net-dns/resolv_wrapper/resolv_wrapper-1.1.4.ebuild24
-rw-r--r--net-dns/resolv_wrapper/resolv_wrapper-1.1.5.ebuild24
-rw-r--r--net-dns/resolvconf-symlink/Manifest4
-rw-r--r--net-dns/resolvconf-symlink/metadata.xml12
-rw-r--r--net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild52
-rw-r--r--net-dns/s6-dns/Manifest7
-rw-r--r--net-dns/s6-dns/metadata.xml16
-rw-r--r--net-dns/s6-dns/s6-dns-2.1.0.0.ebuild52
-rw-r--r--net-dns/s6-dns/s6-dns-2.2.0.0.ebuild52
-rw-r--r--net-dns/s6-dns/s6-dns-2.2.0.1.ebuild55
-rw-r--r--net-dns/sheerdns/Manifest5
-rw-r--r--net-dns/sheerdns/metadata.xml14
-rw-r--r--net-dns/sheerdns/sheerdns-1.0.3.ebuild32
-rw-r--r--net-dns/tinystats/Manifest5
-rw-r--r--net-dns/tinystats/metadata.xml7
-rw-r--r--net-dns/tinystats/tinystats-1.1.ebuild29
-rw-r--r--net-dns/totd/Manifest7
-rw-r--r--net-dns/totd/files/totd38
-rw-r--r--net-dns/totd/files/totd-1.5.1-no_werror.patch11
-rw-r--r--net-dns/totd/metadata.xml13
-rw-r--r--net-dns/totd/totd-1.5.1.ebuild45
-rw-r--r--net-dns/unbound/Manifest22
-rw-r--r--net-dns/unbound/files/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch72
-rw-r--r--net-dns/unbound/files/unbound-1.4.12-gentoo.patch12
-rw-r--r--net-dns/unbound/files/unbound-1.5.7-trust-anchor-file.patch12
-rw-r--r--net-dns/unbound/files/unbound-anchor.service13
-rw-r--r--net-dns/unbound/files/unbound.confd4
-rw-r--r--net-dns/unbound/files/unbound.initd55
-rw-r--r--net-dns/unbound/files/unbound.service12
-rw-r--r--net-dns/unbound/files/unbound.socket5
-rw-r--r--net-dns/unbound/files/unbound_at.service13
-rw-r--r--net-dns/unbound/metadata.xml34
-rw-r--r--net-dns/unbound/unbound-1.5.1-r2.ebuild122
-rw-r--r--net-dns/unbound/unbound-1.5.10.ebuild124
-rw-r--r--net-dns/unbound/unbound-1.6.3.ebuild130
-rw-r--r--net-dns/unbound/unbound-1.6.4.ebuild130
-rw-r--r--net-dns/unbound/unbound-1.6.6.ebuild130
-rw-r--r--net-dns/updatedd/Manifest10
-rw-r--r--net-dns/updatedd/files/fix-ovh-DYNDNSHOST.patch11
-rw-r--r--net-dns/updatedd/files/respect-docdir.patch33
-rw-r--r--net-dns/updatedd/files/set-socket-timeouts-for-ipserv.patch36
-rw-r--r--net-dns/updatedd/files/updatedd-2.6-options.patch12
-rw-r--r--net-dns/updatedd/metadata.xml5
-rw-r--r--net-dns/updatedd/updatedd-2.6-r5.ebuild28
-rw-r--r--net-dns/updatedd/updatedd-2.6.ebuild26
-rw-r--r--net-dns/validns/Manifest7
-rw-r--r--net-dns/validns/metadata.xml19
-rw-r--r--net-dns/validns/validns-0.7.ebuild25
-rw-r--r--net-dns/validns/validns-0.8.ebuild25
-rw-r--r--net-dns/valtz/Manifest5
-rw-r--r--net-dns/valtz/metadata.xml7
-rw-r--r--net-dns/valtz/valtz-0.7.ebuild18
389 files changed, 20333 insertions, 0 deletions
diff --git a/net-dns/avahi/Manifest b/net-dns/avahi/Manifest
new file mode 100644
index 000000000000..4c6d3c60e9cf
--- /dev/null
+++ b/net-dns/avahi/Manifest
@@ -0,0 +1,24 @@
+AUX autoipd-openrc.sh 700 SHA256 9f9e8d751bc640491397c8a06cbb6f3dcbf9cdf1a083e274f4d802c9c925c6c0 SHA512 a5dbbac4d6d1959db3a07a63acb7569dbeba33d2274a1dd3253dc27687549371611cf08bad3998d89efb3ace63b5541a4d225e484274450e0c82661f5a1dbc32 WHIRLPOOL e6b256655f64f557338ae5f79eaf98ead572d39cf90c76ca270dc54cee4b5edfc087326e5f04166eb2ff232ec2a8a5b87adadc8b3bd8b2ec2e3b6503ca39bee6
+AUX autoipd.sh 1271 SHA256 9582a49d0674fac714f448976065fd4e1f0423c08f645685160ed682a121f8c9 SHA512 0bff9ca7e32212aef0246db5baf10ee4f7e93a987b7c591b21ed9f116a1c662a84be9d784fc919205c1fecb5cd8421b81a0eb590c3cc066c6b1b9265b98f1ea3 WHIRLPOOL b33889de73f571b18da092342be6a47e71d608466aa0d94fa3f0d8d7e373265767a62bdfb82df31059549e4ec0d05aacef89f1778ea561152fd5e1970072584c
+AUX avahi-0.6.30-optional-gtk-utils.patch 2422 SHA256 1233ba93af567117091094921e5ba76f205b1d984fd5a97153c2004f8f0509e3 SHA512 3ea7f7cd0074286bbe474f783ea9638abef7f68d9466d4f5d4d3a0bc6624a43e48bb293f02f2dd08413d5dcf3f99161e0f45537c5f922b1a326375d40b574596 WHIRLPOOL 82a61a4bce9547e15d6370cd856ac020bcdf9ad220f20929d5c64909c0505406e09fa8503aa79c835477811be48e9c72fbcbfc12061c49722431db196c0cbb8c
+AUX avahi-0.6.31-build-client-without-daemon.patch 738 SHA256 d3d1d451886f7bcd7c20cb2c29ec9b5f59ead4ee9567f40d9820ec2275a01a85 SHA512 0d7ab88560eed40bb04360442b4daba6aa58d9f7f7d60b64c0e47b86ff0e6f2fcc8ccc7fbeab9ed87f77eedfde3814d37f82da9ae010223ef0e81e5b64d34b04 WHIRLPOOL caee48616992cfaf71bd5b7b7b90bd0a179a17ab7b2eb60a04026bc099ad2a611f107cf21a634b2cdaf0f15bcbb44523a7eef84cd692e653f537a1bc1501aacc
+AUX avahi-0.6.31-fix-install-avahi-discover.patch 715 SHA256 79da591066f1ddb454f4d7b7ed7163a0d13c332462ac0c2db3e8a6cd130f8441 SHA512 0cdcf41bbd25caea84a62054c4081dfdba1d421cef56babebe33f480a8ba9af1362c7b698803c17132ee78716439ec70cd5d71f7c85b5d49ba9bda471466cb79 WHIRLPOOL 3b5aa85769688a070707e2a03cccbb4861465bad7b03f5d6e34819dbe2dda5934b332934102616d0a0910cddf80150497f15df19d53726850e1a64d0c48e34d9
+AUX avahi-0.6.31-fix-locale-build.patch 866 SHA256 a55f964f9f834e2d864e05bdda00b514650ecca05d8d35dc570c50c51fa616ed SHA512 c970cd5d199024699e3345d59fb03d0966b62c859e9dd2107a1adef4cb7433a2ebcf2cd6331f4726d84a3ec973b45d7e93824fb80a8c8dcf3fcf6a610a67b337 WHIRLPOOL e1878ae2254b1efcf72e4deff94788a389c5e301e70e699007089f06b60163ce8f34790a5b774b42e255e800a2474f8b3a28e1cd0232f9feb16233cdcd7fff64
+AUX avahi-0.6.31-host-name-from-machine-id.patch 3001 SHA256 257685dde4c7dc78b9fbfeab5f213a94121c8bff6ae8fff99a9aae7eeaa34442 SHA512 659d36b06bf721664105bf51a1610186700004dea2af5dc43e29a8d688e903fb0c69416b1b98957de902901fc5ed04fdd252d30e23f680608608e6f633b94b17 WHIRLPOOL e258af6f138ab7b838a8886d74b73f8d44aefea981bd3e876cca41a144081ad4d199f9ba4031fda71c5d78578869fadd1b226a11b101df406fa2d85911d06e81
+AUX avahi-0.6.31-install-exec-hook.patch 507 SHA256 5411262dd719e647ab7781d2e10ff05d051ff1d7218d58e5bf3a3fbe8628a439 SHA512 c25802f78b5c2f6cc15705c6e426b6590dbcdf30d33e239bd919e9592c5e72c7fb244726e74addfeff4b81fa41cc62afb3ddb880232fea66f3cc9470bb5940b1 WHIRLPOOL 864804ca378b2ef83766ba10e08998f0524ed8c2f6c5fe491eefe88dac2184a3b20848258cd7d19af10a50bbbe8567928c3762b00896bb32b18fda6a4d117c19
+AUX avahi-0.6.31-invalid_packet.patch 1073 SHA256 ec8713f734138bc1d8bdeb357da15f08ba41d81e365c4431691f2a0d68f39211 SHA512 1582efd8c3474e7f675d86449974ae29db6ee28bd61642d37ae3efbe3903183e5f005051de400d28c116d791a6be00d90c61f3eb1d74e0650119269ca04dab4d WHIRLPOOL feaff8e9ed26c7f545757e0906f81e6accc56224bcbd6d615907154e201df654d11b2665a0d14a2e97e03b196f13eaf6ecc443b7d193bbebd22e62699f8c23da
+AUX avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch 1265 SHA256 24954a76f0dfdffc9a079072f8f4d50e292f8ae2a2b8e5a49f488519057c51b0 SHA512 f575e3ba1c704ec3bf92ffd8344a104f35026e6738720955caa23549f602f491c5e209188c5c00189b269e79e6120021d02cc07fbdea22a7c99ce7682f017fe7 WHIRLPOOL f0859f44face57b0eefb6858203bbfa73d6c4be2aa684911d3a152eeca93f972eb81650c4c307b96cd5764c1b12ade6624574331c944db259159bc9321092edb
+AUX avahi-0.6.32-openrc-0.21.7-fix-init-scripts.patch 918 SHA256 c4777abe59579227fa6c20fe119689fe8230ce943e54e78b357262dd57a71a7f SHA512 c62167c538af81362abba5a4012336f5d12aa20edc3cbb69f305ba89be90e4c62e1ce1613779d3ad0cbfba99e4ff46b803e4a26fe72cefefd628827a610318a3 WHIRLPOOL d95809c10f2a2bae97c6f03255ece0826c230bd018240c03dd9ac086afbc0c2db5b563e82cc3ba4012fa449e867bd209a1e2478475f85f7871b63a8521c76384
+AUX avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch 633 SHA256 0bd4f2b2f720684b754698d86b6b1f106576473cead815e7b60b1c62171e4cdc SHA512 c2d11b243acdc058cde03b872dccbbbd44a7a584adf168f16016f29c7a5d9d8668095b781f53102feba8b9c80b2cbbd788c9b327d9d1e2e552fbdcf3c2960517 WHIRLPOOL faae601dca07f267ebe6f8254ff2e00d7ff3de3aa4aa92186e9dead9ac49b43c670b3310d0d7671eae8858ef2f046a4c6b27cb1bb23c20413fddb791ad793a67
+DIST avahi-0.6.31.tar.gz 1268686 SHA256 8372719b24e2dd75de6f59bb1315e600db4fd092805bd1201ed0cb651a2dab48 SHA512 53eb00d570a274d841e1e6ad07da077950089ae39b4f7aa21fcd21cc5320b30b506b43e7e57e56198e155cc7bd289b779a48b2b2fc002dc6194a946110451858 WHIRLPOOL a6d97b87dfbb81be359ee03d8f32ebafdbb311bd596d686aeb55a2952ecb6c7c84466b1230e70392ffe23a20a56da7e0a5bd00c8dc1812b2156c0b4a8022144f
+DIST avahi-0.6.32.tar.gz 934004 SHA256 7eb693d878246f0cd05034173fb3ed53447a84dd3b7f01745313cad11071226e SHA512 e6dc788cc8691288ef001007006719b5eb022d484ee6fc84e68a7d227af5993e4d09484b824998155e5b25fc0ffc014beb8961d312982f63b82b10a6e2edee18 WHIRLPOOL e139eca2d1698976a5fca21361c037dd2b1c075654b01674bea3fa22db70067999aba2a61cbfcf69281d5274f5080450e24cf64f9cec1702d142e129fbf03dc7
+DIST avahi-0.7.tar.gz 940047 SHA256 fd45480cef0559b3eab965ea3ad4fe2d7a8f27db32c851a032ee0b487c378329 SHA512 61f656da7614d8cca1862180038f571db3474c84f05db4d3509f614cdbf8b1a1047661b7e24d63682d5b48ed1bfa1b08b3c9e6dbe9222bcd62d99bc168a11abe WHIRLPOOL bb6f2763309f8426bc65e81f41ac2205076d6f5f9e84f1bba6ed998595c5c2db126b30bf376286f5bd6e61605c3b219fbce9ee325585d2e463d3ef43bc6bcc1a
+EBUILD avahi-0.6.31-r10.ebuild 6444 SHA256 8cad44947022e117a28988289299661f330109a161d484d5fb1379ff69f66328 SHA512 231567dcc74fbe09a4d18cc52074430b2f8c552c2e1212207af5879d6234f0067eebef495872c0c589d77f8fad177d05247f9927dc648963ee9f1e792335da81 WHIRLPOOL 9d74e785d2c6071c0778bf01ea4ef50706032fcb80802ef5dc7c3da8a958fd924206cb20f5373d754ca7ecf08f7fac5f18f4a2583e114612e8199aa59129bfb7
+EBUILD avahi-0.6.31-r11.ebuild 6261 SHA256 a95ba9cbf383b4367598ea67ddecebed497d40549b577d50a74743d16c19b72e SHA512 0a0645d1c38fcde7d34dfdd38f21ab177cfac21bbc01def180ec9fb0f311ce0273565f425c096c6ee29ec20651818136da166d4c3b26d29c8d7f8473a0cd4ed1 WHIRLPOOL a7d72dd4d2b2d3e1c686c28b2b00359cece3bfc5a407577b862e9595220045dd49f2cdb31873b020df759d2ff68738b64e2da546404eca184e336bf8ac86a2a1
+EBUILD avahi-0.6.32-r1.ebuild 5732 SHA256 f69aa86fe2d591a9ce8461184a43b334189b9b6d309ed0c60cb3e1714b789ce4 SHA512 d26256a031d5d7ce6cf58ff4c98d5a88ed93498d0383e1a425e88bc9f1de4ee18c0b2ab6e987163b5a27acc807199c8f91276e449dc6d951607c1dfddfaa74c4 WHIRLPOOL bdeeb0d8a5733ccc3c4885747b8c840703ff706720126167fa08835d6f32f03db2649d8293df0394e216e9752cd718cbd509ddda8a787ef0078cacb026f7a1a1
+EBUILD avahi-0.6.32-r2.ebuild 5855 SHA256 83d4f5676138d0545761c046ac0700375254a00b14eb8c7b2ce545365e6d472a SHA512 44aef809779706e5f0e8c5e047b69a795a7d450a59e7fed174c2f7cb5043f6c9d547daff6699ee9e28e9af3ba02caa54a5293ec8ef11219c35bda4b9f3cfdb00 WHIRLPOOL c7558db4af38b6ee799b554f1a4d99921a529725226266c97245fd5806e3e32b8248ba365eedf4edaa3357c2d24496b2d2f37309e0ce8d2f0a069abb00f7f4ab
+EBUILD avahi-0.6.32.ebuild 5584 SHA256 e070550ca49bd56e096a99dcd924d01ed3433f2e46ba61a7a9b93fc819604b52 SHA512 031b6ea7962717de7f984c78a2814312610b86ce391a2474117b34b2e8c542a6de49b75998c99639f866f415b878ed58f807a12ea713d3b1d15ef0657013e4a0 WHIRLPOOL e362983523708a212b840153090ffd3dbcbed1e53965fa805f3c1f8483a9db52951f49161da8a358c94ce81aeba3f648bfd38c2a89c72db94409e83c3c3f9fe5
+EBUILD avahi-0.7.ebuild 5074 SHA256 87423244c19322addee8ed8f980f31b56600f1dd870dacc0dc824ed3c15a45be SHA512 e52a167c7d76257a58062c173765bd5a5f78ecc90e3e5fd254e36ee43db9cf0c63bf530dfe20b7cbf426d1442ca2c2a8851764833a5d876908f18d625637e93c WHIRLPOOL 64c6db3e0cd26e8d2d0602e10beef86b85cba4572183888784abc0ebdc41f3e24987350462d8b222bf32985866e9e91a67f0f74101769cd09ae335fe8441d0be
+MISC ChangeLog 7687 SHA256 7d2b2911ecc315c9260cc93f78e42fcf442e763a11d6716e547bc73e49db5e45 SHA512 7108d7c7b633ba75c491c38790b771b3ca209d42af98a20244ba756e79196dd28f9a299d13692a51445e0b7a8eef3f5088499b9da178f54a24fd34f0723abb43 WHIRLPOOL 4243d9f9824f678127ffedac72ee8129d7487161ae765828176345d5149531477f4288106b909f4150e6bd5b69c8cf1ef74a4ae4988cb1d0a3c601bd41192ca3
+MISC ChangeLog-2015 43278 SHA256 8127499a1ad257734a5b1e8eef76d640a37fffee164a3a7ef7ec4da4e87d3e06 SHA512 4c2d98e3cc9f9cb91ff28c57d20d57d0f1f1ca14b30c25c43d15963363c2681e3f9b22f9385f4f88812adf041b1edef6a86ca663e59b69f0eaf7de0bb67a0a58 WHIRLPOOL 05760ae18c1d39040d59e95e921479a29c9f44e15985f5b5951943dbd2fa49a2e467bb9236afa59a0082b90928233ce59f297ea4afde98b20271402e1b290899
+MISC metadata.xml 970 SHA256 c14f973568f17f33044e5ad40b4a391cf8ac25ee23bb263d6397f121ea43528a SHA512 b9498d4757b6bd793846e4cbdd5c37da601a8e1430cafd1a6039ff54f8ff10576684c58801ebc679061f975cefa5909c94c30976e84354a5fcc7d2a586f7fa8e WHIRLPOOL a4415d64adc216c956610fe85ba239bce8ac5df4c98b34ca25df71708dd4920ff7a18a31287f3aa09804a4df228de84f399a1c01a6b5047a886848b4ff6bb528
diff --git a/net-dns/avahi/avahi-0.6.31-r10.ebuild b/net-dns/avahi/avahi-0.6.31-r10.ebuild
new file mode 100644
index 000000000000..081dddfdab9a
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.31-r10.ebuild
@@ -0,0 +1,252 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env \
+ python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="http://avahi.org/download/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils"
+
+REQUIRED_USE="
+ utils? ( || ( gtk gtk3 ) )
+ python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ gdbm? ( >=sys-libs/gdbm-1.10-r1[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection:= )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ gtk? ( dev-python/pygtk )
+ dbus? ( dev-python/dbus-python )
+ )
+ bookmarks? (
+ dev-python/twisted-core
+ dev-python/twisted-web
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-util/intltool
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ doc? (
+ app-doc/doxygen
+ )
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if use ipv6; then
+ sed -i \
+ -e s/use-ipv6=no/use-ipv6=yes/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ # Make gtk utils optional
+ epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
+
+ # Fix init scripts for >=openrc-0.9.0, bug #383641
+ epatch "${FILESDIR}"/${PN}-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
+
+ # install-exec-local -> install-exec-hook
+ epatch "${FILESDIR}"/${P}-install-exec-hook.patch
+
+ # Backport host-name-from-machine-id patch, bug #466134
+ epatch "${FILESDIR}"/${P}-host-name-from-machine-id.patch
+
+ # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
+ epatch "${FILESDIR}"/${P}-fix-install-avahi-discover.patch
+
+ epatch "${FILESDIR}"/${P}-so_reuseport-may-not-exist-in-running-kernel.patch
+
+ # allow building client without the daemon
+ epatch "${FILESDIR}"/${P}-build-client-without-daemon.patch
+
+ # Fix build under various locales, bug #501664
+ epatch "${FILESDIR}"/${P}-fix-locale-build.patch
+
+ # Fix "Invalid response packet from host", bug #559408.
+ epatch "${FILESDIR}"/${P}-invalid_packet.patch
+
+ # Drop DEPRECATED flags, bug #384743
+ sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED=1::g' avahi-ui/Makefile.am || die
+
+ # Fix references to Lennart's home directory, bug #466210
+ sed -i -e 's/\/home\/lennart\/tmp\/avahi//g' man/* || die
+
+ # Bug #525832
+ epatch_user
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_export_best
+
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
+ unset DISPLAY
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable gtk pygtk)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --disable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ $(multilib_native_use_enable utils gtk-utils) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ $(systemd_with_unitdir) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ # Needed for running on systemd properly, bug #537000
+ if multilib_is_native_abi; then
+ ln -s avahi-daemon.service "${D}$(systemd_get_unitdir)"/dbus-org.freedesktop.Avahi.service || die
+ fi
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/avahi-0.6.31-r11.ebuild b/net-dns/avahi/avahi-0.6.31-r11.ebuild
new file mode 100644
index 000000000000..94f7006549c2
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.31-r11.ebuild
@@ -0,0 +1,247 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env \
+ python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="http://avahi.org/download/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils"
+
+REQUIRED_USE="
+ utils? ( || ( gtk gtk3 ) )
+ python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ gdbm? ( >=sys-libs/gdbm-1.10-r1[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection:= )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ gtk? ( dev-python/pygtk )
+ dbus? ( dev-python/dbus-python )
+ )
+ bookmarks? (
+ dev-python/twisted-core
+ dev-python/twisted-web
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-util/intltool
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ doc? (
+ app-doc/doxygen
+ )
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if use ipv6; then
+ sed -i \
+ -e s/use-ipv6=no/use-ipv6=yes/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ # Make gtk utils optional
+ epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
+
+ # Fix init scripts for >=openrc-0.9.0, bug #383641
+ epatch "${FILESDIR}"/${PN}-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
+
+ # install-exec-local -> install-exec-hook
+ epatch "${FILESDIR}"/${P}-install-exec-hook.patch
+
+ # Backport host-name-from-machine-id patch, bug #466134
+ epatch "${FILESDIR}"/${P}-host-name-from-machine-id.patch
+
+ # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
+ epatch "${FILESDIR}"/${P}-fix-install-avahi-discover.patch
+
+ epatch "${FILESDIR}"/${P}-so_reuseport-may-not-exist-in-running-kernel.patch
+
+ # allow building client without the daemon
+ epatch "${FILESDIR}"/${P}-build-client-without-daemon.patch
+
+ # Fix build under various locales, bug #501664
+ epatch "${FILESDIR}"/${P}-fix-locale-build.patch
+
+ # Fix "Invalid response packet from host", bug #559408.
+ epatch "${FILESDIR}"/${P}-invalid_packet.patch
+
+ # Drop DEPRECATED flags, bug #384743
+ sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED=1::g' avahi-ui/Makefile.am || die
+
+ # Fix references to Lennart's home directory, bug #466210
+ sed -i -e 's/\/home\/lennart\/tmp\/avahi//g' man/* || die
+
+ # Bug #525832
+ epatch_user
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_export_best
+
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
+ unset DISPLAY
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable gtk pygtk)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --disable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ $(multilib_native_use_enable utils gtk-utils) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ $(systemd_with_unitdir) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/avahi-0.6.32-r1.ebuild b/net-dns/avahi/avahi-0.6.32-r1.ebuild
new file mode 100644
index 000000000000..71f6d18d0495
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.32-r1.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="https://github.com/lathiat/avahi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+S="${WORKDIR}/${P}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils"
+
+REQUIRED_USE="
+ utils? ( || ( gtk gtk3 ) )
+ python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ gdbm? ( sys-libs/gdbm[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection:= )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ gtk? ( dev-python/pygtk )
+ dbus? ( dev-python/dbus-python )
+ )
+ bookmarks? (
+ dev-python/twisted-core
+ dev-python/twisted-web
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ doc? ( app-doc/doxygen )
+ app-doc/xmltoman
+ dev-util/intltool
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if ! use ipv6; then
+ sed -i \
+ -e s/use-ipv6=yes/use-ipv6=no/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ # Make gtk utils optional
+ # https://github.com/lathiat/avahi/issues/24
+ epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
+
+ # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
+ # https://github.com/lathiat/avahi/issues/24
+ epatch "${FILESDIR}"/${PN}-0.6.31-fix-install-avahi-discover.patch
+
+ # Fix build under various locales, bug #501664
+ # https://github.com/lathiat/avahi/issues/27
+ epatch "${FILESDIR}"/${PN}-0.6.31-fix-locale-build.patch
+
+ # Update the init scripts for the new openrc, bug #594622
+ epatch "${FILESDIR}"/${PN}-0.6.32-openrc-0.21.7-fix-init-scripts.patch
+
+ # Bug #525832
+ epatch_user
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_export_best
+
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
+ unset DISPLAY
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable gtk pygtk)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --enable-manpages \
+ --enable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ $(multilib_native_use_enable utils gtk-utils) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ $(systemd_with_unitdir) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ # https://github.com/lathiat/avahi/issues/28
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/avahi-0.6.32-r2.ebuild b/net-dns/avahi/avahi-0.6.32-r2.ebuild
new file mode 100644
index 000000000000..92aba59f400c
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.32-r2.ebuild
@@ -0,0 +1,233 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="https://github.com/lathiat/avahi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+S="${WORKDIR}/${P}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils"
+
+REQUIRED_USE="
+ utils? ( || ( gtk gtk3 ) )
+ python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ gdbm? ( sys-libs/gdbm[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection:= )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ gtk? ( dev-python/pygtk[${PYTHON_USEDEP}] )
+ dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
+ )
+ bookmarks? (
+ ${PYTHON_DEPS}
+ >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ doc? ( app-doc/doxygen )
+ app-doc/xmltoman
+ dev-util/intltool
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if ! use ipv6; then
+ sed -i \
+ -e s/use-ipv6=yes/use-ipv6=no/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ # Make gtk utils optional
+ # https://github.com/lathiat/avahi/issues/24
+ epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
+
+ # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
+ # https://github.com/lathiat/avahi/issues/24
+ epatch "${FILESDIR}"/${PN}-0.6.31-fix-install-avahi-discover.patch
+
+ # Fix build under various locales, bug #501664
+ # https://github.com/lathiat/avahi/issues/27
+ epatch "${FILESDIR}"/${PN}-0.6.31-fix-locale-build.patch
+
+ # Update the init scripts for the new openrc, bug #594622
+ epatch "${FILESDIR}"/${PN}-0.6.32-openrc-0.21.7-fix-init-scripts.patch
+
+ # Bug #525832
+ epatch_user
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_export_best
+
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
+ unset DISPLAY
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable gtk pygtk)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --enable-manpages \
+ --enable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ $(multilib_native_use_enable utils gtk-utils) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ $(systemd_with_unitdir) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ # https://github.com/lathiat/avahi/issues/28
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/avahi-0.6.32.ebuild b/net-dns/avahi/avahi-0.6.32.ebuild
new file mode 100644
index 000000000000..dfb6fef26f2b
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.32.ebuild
@@ -0,0 +1,229 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="https://github.com/lathiat/avahi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+S="${WORKDIR}/${P}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils"
+
+REQUIRED_USE="
+ utils? ( || ( gtk gtk3 ) )
+ python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ gdbm? ( sys-libs/gdbm[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection:= )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ gtk? ( dev-python/pygtk )
+ dbus? ( dev-python/dbus-python )
+ )
+ bookmarks? (
+ dev-python/twisted-core
+ dev-python/twisted-web
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ doc? ( app-doc/doxygen )
+ app-doc/xmltoman
+ dev-util/intltool
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if ! use ipv6; then
+ sed -i \
+ -e s/use-ipv6=yes/use-ipv6=no/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ # Make gtk utils optional
+ # https://github.com/lathiat/avahi/issues/24
+ epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
+
+ # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
+ # https://github.com/lathiat/avahi/issues/24
+ epatch "${FILESDIR}"/${PN}-0.6.31-fix-install-avahi-discover.patch
+
+ # Fix build under various locales, bug #501664
+ # https://github.com/lathiat/avahi/issues/27
+ epatch "${FILESDIR}"/${PN}-0.6.31-fix-locale-build.patch
+
+ # Bug #525832
+ epatch_user
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_export_best
+
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
+ unset DISPLAY
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable gtk pygtk)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --enable-manpages \
+ --enable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ $(multilib_native_use_enable utils gtk-utils) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ $(systemd_with_unitdir) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ # https://github.com/lathiat/avahi/issues/28
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/avahi-0.7.ebuild b/net-dns/avahi/avahi-0.7.ebuild
new file mode 100644
index 000000000000..536ccf5311dd
--- /dev/null
+++ b/net-dns/avahi/avahi-0.7.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="https://github.com/lathiat/avahi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+S="${WORKDIR}/${P}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test"
+
+REQUIRED_USE="
+ python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ gdbm? ( sys-libs/gdbm[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection:= )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
+ introspection? ( dev-python/pygobject:3[${PYTHON_USEDEP}] )
+ )
+ bookmarks? (
+ ${PYTHON_DEPS}
+ >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ doc? ( app-doc/doxygen )
+ app-doc/xmltoman
+ dev-util/intltool
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if ! use ipv6; then
+ sed -i \
+ -e s/use-ipv6=yes/use-ipv6=no/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ eapply_user
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_setup
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable introspection pygobject)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --enable-manpages \
+ --enable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ # https://github.com/lathiat/avahi/issues/28
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/files/autoipd-openrc.sh b/net-dns/avahi/files/autoipd-openrc.sh
new file mode 100644
index 000000000000..dec3aa0521c1
--- /dev/null
+++ b/net-dns/avahi/files/autoipd-openrc.sh
@@ -0,0 +1,32 @@
+# Copyright (C) 2004-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Contributed by Sven Wegener (swegener@gentoo.org)
+
+_config_vars="$_config_vars autoipd"
+
+autoipd_depend() {
+ program /usr/sbin/avahi-autoipd
+ after interface
+}
+
+autoipd_start() {
+ _exists true || return 1
+
+ eval args=\$autoipd_${IFVAR}
+
+ ebegin "Starting avahi-autoipd"
+ /usr/sbin/avahi-autoipd --daemonize --syslog --wait ${args} "${IFACE}"
+ eend "${?}" || return 1
+
+ _show_address
+
+ return 0
+}
+
+autoipd_stop() {
+ /usr/sbin/avahi-autoipd --check --syslog "${IFACE}" || return 0
+
+ ebegin "Stopping avahi-autoipd"
+ /usr/sbin/avahi-autoipd --kill --syslog "${IFACE}"
+ eend "${?}"
+}
diff --git a/net-dns/avahi/files/autoipd.sh b/net-dns/avahi/files/autoipd.sh
new file mode 100644
index 000000000000..89d02e338bc3
--- /dev/null
+++ b/net-dns/avahi/files/autoipd.sh
@@ -0,0 +1,52 @@
+# Copyright (c) 2004-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Contributed by Sven Wegener (swegener@gentoo.org)
+
+# void autoipd_depend(void)
+#
+# Sets up the dependencies for the module
+autoipd_depend() {
+ after interface
+}
+
+# void autoipd_expose(void)
+#
+# Expose variables that can be configured
+autoipd_expose() {
+ variables autoipd
+}
+
+# bool autoipd_start(char *iface)
+#
+# Tries to configure the interface via avahi-autoipd
+autoipd_start() {
+ local iface="${1}" ifvar="$(bash_variable "${iface}")" opts="autoipd_${ifvar}" addr=""
+
+ interface_exists "${iface}" true || return 1
+
+ ebegin "Starting avahi-autoipd"
+ if /usr/sbin/avahi-autoipd --daemonize --syslog --wait ${!opts} "${iface}"
+ then
+ eend 0
+ addr="$(interface_get_address "${iface}")"
+ einfo "${iface} received address ${addr}"
+ return 0
+ fi
+
+ eend "${?}" "Failed to get address via avahi-autoipd!"
+}
+
+# bool autoipd_stop(char *iface)
+#
+# Stops a running avahi-autoipd instance
+autoipd_stop() {
+ local iface="${1}"
+
+ /usr/sbin/avahi-autoipd --check --syslog "${iface}" || return 0
+
+ ebegin "Stopping avahi-autoipd"
+ /usr/sbin/avahi-autoipd --kill --syslog "${iface}"
+ eend "${?}" "Failed to stop running avahi-autoipd instance!"
+}
+
+# vim: set ts=4 :
diff --git a/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch b/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch
new file mode 100644
index 000000000000..2c615a2b3a0a
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch
@@ -0,0 +1,83 @@
+--- avahi-discover-standalone/Makefile.am
++++ avahi-discover-standalone/Makefile.am
+@@ -23,7 +23,7 @@
+ # This cool debug trap works on i386/gcc only
+ AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
+-if HAVE_GTK2OR3
++if ENABLE_GTK_UTILS
+ if HAVE_GLIB
+ bin_PROGRAMS = \
+ avahi-discover-standalone
+--- avahi-ui/Makefile.am
++++ avahi-ui/Makefile.am
+@@ -76,6 +76,7 @@
+ libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
+ endif
+
++if ENABLE_GTK_UTILS
+ bin_PROGRAMS = bssh
+ desktop_DATA += bssh.desktop bvnc.desktop
+ @INTLTOOL_DESKTOP_RULE@
+@@ -102,6 +103,7 @@
+ bvnc.desktop.in: bvnc.desktop.in.in
+ $(AM_V_GEN)sed -e 's,@bindir\@,$(bindir),g' $< > $@
+
++endif # ENABLE_GTK_UTILS
+ endif # HAVE_GLIB
+ endif
+ endif
+--- configure.ac
++++ configure.ac
+@@ -564,7 +564,29 @@
+ fi
+ AM_CONDITIONAL(HAVE_GTK3, test "x$HAVE_GTK3" = "xyes")
+
+-AM_CONDITIONAL(HAVE_GTK2OR3, test "x$HAVE_GTK3" = "xyes" -o "x$HAVE_GTK" = "xyes" )
++#
++# Check for GTK+ Utils
++#
++AC_ARG_ENABLE(gtk-utils,
++ AS_HELP_STRING([--disable-gtk-utils],[Disable GTK+ utilities]),
++ [case "${enableval}" in
++ yes) WANT_GTK_UTILS=yes ;;
++ no) WANT_GTK_UTILS=no ;;
++ *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk-utils) ;;
++ esac],
++ [WANT_GTK_UTILS=yes])
++
++ENABLE_GTK_UTILS=no
++HAVE_GTK2OR3=no
++if test "x$HAVE_GTK3" = "xyes" -o "x$HAVE_GTK" = "xyes"; then
++ HAVE_GTK2OR3=yes
++ if test "x$WANT_GTK_UTILS" = "xyes"; then
++ ENABLE_GTK_UTILS=yes
++ fi
++fi
++
++AM_CONDITIONAL(HAVE_GTK2OR3, test "x$HAVE_GTK2OR3" = "xyes")
++AM_CONDITIONAL(ENABLE_GTK_UTILS, test "x$ENABLE_GTK_UTILS" = "xyes")
+
+ #
+ # D-Bus
+@@ -1199,11 +1221,6 @@
+ ENABLE_AUTOIPD="no (You need libdaemon!)"
+ fi
+
+-HAVE_GTK2OR3=no
+-if test "x$HAVE_GTK" = "xyes" -o "x$HAVE_GTK3" = "xyes" ; then
+- HAVE_GTK2OR3=yes
+-fi
+-
+ BUILD_UI="no"
+ if test "x$HAVE_GTK2OR3" = "xyes" -a "x$BUILD_CLIENT" = "xyes" ; then
+ BUILD_UI="yes"
+@@ -1223,7 +1240,7 @@
+ Building avahi-python: ${BUILD_PYTHON}
+ Building libavahi-glib: ${HAVE_GLIB}
+ Building libavahi-gobject: ${BUILD_GOBJECT}
+- Building avahi-discover-standalone: ${HAVE_GTK2OR3}
++ Building avahi-discover-standalone: ${ENABLE_GTK_UTILS}
+ Building libavahi-qt3: ${HAVE_QT3}
+ Building libavahi-qt4: ${HAVE_QT4}
+ Building avahi-sharp: ${HAVE_MONO}
diff --git a/net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch b/net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch
new file mode 100644
index 000000000000..df0c420fa62a
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch
@@ -0,0 +1,27 @@
+From ce3b83de6aa689c0cefe0b1e85c03a627b537099 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 12 May 2014 19:46:22 +0200
+Subject: [PATCH] Allow building client without the daemon.
+
+There's no good reason to disallow that, and that's what we specifically
+want to do for multilib.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0e190ba..c56cf01 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1185,7 +1185,7 @@ fi
+
+ BUILD_CLIENT="no (You need avahi-daemon and D-Bus!)"
+
+-if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" ; then
++if "x$HAVE_DBUS" = "xyes" ; then
+ BUILD_CLIENT=yes
+ fi
+
+--
+1.9.3
+
diff --git a/net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch b/net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch
new file mode 100644
index 000000000000..62ba967c26ff
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch
@@ -0,0 +1,31 @@
+--- avahi-0.6.30.old/avahi-python/avahi-discover/Makefile.am 2010-06-28 23:30:34.000000000 -0400
++++ avahi-0.6.30/avahi-python/avahi-discover/Makefile.am 2012-04-21 18:02:01.642934527 -0400
+@@ -22,6 +22,7 @@
+ avahi-discover.py \
+ avahi-discover.desktop.in.in
+
++if ENABLE_GTK_UTILS
+ if HAVE_PYTHON
+ if HAVE_PYTHON_DBUS
+ if HAVE_PYGTK
+@@ -67,3 +68,4 @@
+ endif
+ endif
+ endif
++endif
+--- avahi-0.6.30.old/man/Makefile.am 2012-04-21 18:10:45.690900742 -0400
++++ avahi-0.6.30/man/Makefile.am 2012-04-21 18:09:15.146906578 -0400
+@@ -65,11 +65,13 @@
+ man_MANS += \
+ avahi-bookmarks.1
+ if HAVE_GTK
++if ENABLE_GTK_UTILS
+ man_MANS += \
+ avahi-discover.1
+ endif
+ endif
+ endif
++endif
+
+ if ENABLE_AUTOIPD
+ if HAVE_LIBDAEMON
diff --git a/net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch b/net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch
new file mode 100644
index 000000000000..b0e47e907462
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch
@@ -0,0 +1,20 @@
+avahi-gobject fails to build under et_EE and possibly other locales.
+
+The regex for a sed in avahi-gobject/Makefile fails under various locales.
+Forcing LC_ALL=C fixes the issue.
+
+X-Gentoo-Bug: 501664
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/501664
+
+diff -Naur avahi-0.6.31.orig/avahi-gobject/Makefile.am avahi-0.6.31/avahi-gobject/Makefile.am
+--- avahi-0.6.31.orig/avahi-gobject/Makefile.am 2010-08-25 20:51:39.007153001 -0400
++++ avahi-0.6.31/avahi-gobject/Makefile.am 2014-09-07 19:00:05.485657990 -0400
+@@ -76,7 +76,7 @@
+
+ signals-marshal.list: $(CORE_SOURCES) Makefile.am
+ $(AM_V_GEN)( cd $(srcdir) && \
+- sed -n -e 's/.*_ga_signals_marshal_\([A-Z]*__[A-Z_]*\).*/\1/p' \
++ LC_ALL=C sed -n -e 's/.*_ga_signals_marshal_\([A-Z]*__[A-Z_]*\).*/\1/p' \
+ $(CORE_SOURCES) ) \
+ | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp && \
+ if cmp -s $@.tmp $@; then \
diff --git a/net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch b/net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch
new file mode 100644
index 000000000000..17ecba52534b
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch
@@ -0,0 +1,85 @@
+From: David Zeuthen <zeuthen@chromium.org>
+Date: Tue, 5 Mar 2013 19:52:38 +0000 (-0800)
+Subject: avahi-daemon: add option "host-name-from-machine-id="
+X-Git-Url: http://git.0pointer.de/?p=avahi.git;a=commitdiff_plain;h=147cdce70b22ae7cee9fb4fe123db40952f31c9e
+
+avahi-daemon: add option "host-name-from-machine-id="
+
+Signed-off-by: David Zeuthen <zeuthen@chromium.org>
+---
+
+diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c
+index d46f40a..8c28fd6 100644
+--- a/avahi-daemon/main.c
++++ b/avahi-daemon/main.c
+@@ -65,6 +65,7 @@
+ #include <avahi-core/publish.h>
+ #include <avahi-core/dns-srv-rr.h>
+ #include <avahi-core/log.h>
++#include <avahi-core/util.h>
+
+ #ifdef ENABLE_CHROOT
+ #include "chroot.h"
+@@ -576,6 +577,29 @@ static int parse_usec(const char *s, AvahiUsec *u) {
+ return 0;
+ }
+
++static char *get_machine_id(void) {
++ int fd;
++ char buf[32];
++
++ fd = open("/etc/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY);
++ if (fd == -1 && errno == ENOENT)
++ fd = open("/var/lib/dbus/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY);
++ if (fd == -1)
++ return NULL;
++
++ /* File is on a filesystem so we never get EINTR or partial reads */
++ if (read(fd, buf, sizeof buf) != sizeof buf) {
++ close(fd);
++ return NULL;
++ }
++ close(fd);
++
++ /* Contents can be lower, upper and even mixed case so normalize */
++ avahi_strdown(buf);
++
++ return avahi_strndup(buf, sizeof buf);
++}
++
+ static int load_config_file(DaemonConfig *c) {
+ int r = -1;
+ AvahiIniFile *f;
+@@ -631,6 +655,15 @@ static int load_config_file(DaemonConfig *c) {
+ c->server_config.use_iff_running = is_yes(p->value);
+ else if (strcasecmp(p->key, "disallow-other-stacks") == 0)
+ c->server_config.disallow_other_stacks = is_yes(p->value);
++ else if (strcasecmp(p->key, "host-name-from-machine-id") == 0) {
++ if (*(p->value) == 'y' || *(p->value) == 'Y') {
++ char *machine_id = get_machine_id();
++ if (machine_id != NULL) {
++ avahi_free(c->server_config.host_name);
++ c->server_config.host_name = machine_id;
++ }
++ }
++ }
+ #ifdef HAVE_DBUS
+ else if (strcasecmp(p->key, "enable-dbus") == 0) {
+
+diff --git a/man/avahi-daemon.conf.5.xml.in b/man/avahi-daemon.conf.5.xml.in
+index bea7ed5..2d15017 100644
+--- a/man/avahi-daemon.conf.5.xml.in
++++ b/man/avahi-daemon.conf.5.xml.in
+@@ -40,6 +40,12 @@
+ </option>
+
+ <option>
++ <p><opt>host-name-from-machine-id=</opt> Takes a boolean
++ value ("yes" or "no"). If set to "yes" avahi-daemon
++ will use the machine-id as name on the LAN.</p>
++ </option>
++
++ <option>
+ <p><opt>domain-name=</opt> Set the default domain name avahi-daemon
+ tries to register its host name and services on the LAN in. If
+ omitted defaults to ".local".</p>
diff --git a/net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch b/net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch
new file mode 100644
index 000000000000..d9a7bc3434c7
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch
@@ -0,0 +1,11 @@
+--- avahi-0.6.31/avahi-utils/Makefile.am
++++ avahi-0.6.31/avahi-utils/Makefile.am
+@@ -53,7 +53,7 @@
+ avahi_set_host_name_CFLAGS = $(AM_CFLAGS)
+ avahi_set_host_name_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la
+
+-install-exec-local:
++install-exec-hook:
+ cd $(DESTDIR)/$(bindir) && \
+ rm -f avahi-resolve-host-name avahi-resolve-address avahi-browse-domains avahi-publish-address avahi-publish-service && \
+ $(LN_S) avahi-resolve avahi-resolve-host-name && \
diff --git a/net-dns/avahi/files/avahi-0.6.31-invalid_packet.patch b/net-dns/avahi/files/avahi-0.6.31-invalid_packet.patch
new file mode 100644
index 000000000000..5cfb4659bee6
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-invalid_packet.patch
@@ -0,0 +1,21 @@
+Fix "Invalid response packet from host". Bug #559408.
+
+See http://pkgs.fedoraproject.org/cgit/avahi.git/plain/avahi-0.6.31-invalid_packet.patch
+
+diff -up avahi-0.6.31/avahi-core/server.c.invalid_packet avahi-0.6.31/avahi-core/server.c
+--- avahi-0.6.31/avahi-core/server.c.invalid_packet 2015-09-22 08:12:58.544588701 -0500
++++ avahi-0.6.31/avahi-core/server.c 2015-09-22 08:13:39.743862403 -0500
+@@ -972,11 +972,9 @@ static void dispatch_packet(AvahiServer
+ return;
+ }
+
+- if (avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_QDCOUNT) != 0 ||
+- avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) == 0 ||
+- avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_NSCOUNT) != 0) {
++ if (avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) == 0) {
+
+- avahi_log_warn("Invalid response packet from host %s.", avahi_address_snprint(t, sizeof(t), src_address));
++ avahi_log_debug("Invalid response packet from host %s.", avahi_address_snprint(t, sizeof(t), src_address));
+ return;
+ }
+
diff --git a/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch b/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch
new file mode 100644
index 000000000000..9c23ca5e4554
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/484212
+
+Description: SO_REUSEPORT may not exist in running kernel
+ When userspace defines SO_REUSEPORT we will attempt to enable socket
+ port number reuse. However if the running kernel does not support
+ this call it will fail preventing daemon startup. If this call is
+ present but fails ENOPROTOOPT then we know that actually the kernel
+ does not support it and we should continue as if we did not have the
+ call at all. (LP: #1228204)
+ .
+ This patch could be removed from the debian package after jessie release.
+Author: Andy Whitcroft <apw@canonical.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1228204
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732009
+Last-Update: 2013-09-20
+
+Index: avahi-0.6.31/avahi-core/socket.c
+===================================================================
+--- avahi-0.6.31.orig/avahi-core/socket.c 2013-09-20 16:36:50.000000000 +0100
++++ avahi-0.6.31/avahi-core/socket.c 2013-09-20 16:38:23.781863644 +0100
+@@ -177,7 +177,8 @@
+ yes = 1;
+ if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)) < 0) {
+ avahi_log_warn("SO_REUSEPORT failed: %s", strerror(errno));
+- return -1;
++ if (errno != ENOPROTOOPT)
++ return -1;
+ }
+ #endif
+
diff --git a/net-dns/avahi/files/avahi-0.6.32-openrc-0.21.7-fix-init-scripts.patch b/net-dns/avahi/files/avahi-0.6.32-openrc-0.21.7-fix-init-scripts.patch
new file mode 100644
index 000000000000..2b91179dd65f
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.32-openrc-0.21.7-fix-init-scripts.patch
@@ -0,0 +1,18 @@
+diff -Naur avahi-0.6.32.orig/initscript/gentoo/avahi-daemon.in avahi-0.6.32/initscript/gentoo/avahi-daemon.in
+--- avahi-0.6.32.orig/initscript/gentoo/avahi-daemon.in 2016-02-15 21:13:45.000000000 -0500
++++ avahi-0.6.32/initscript/gentoo/avahi-daemon.in 2016-09-21 20:58:01.999109439 -0400
+@@ -1,4 +1,4 @@
+-#!/sbin/runscript
++#!/sbin/openrc-run
+ # Copyright 1999-2007 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+
+diff -Naur avahi-0.6.32.orig/initscript/gentoo/avahi-dnsconfd.in avahi-0.6.32/initscript/gentoo/avahi-dnsconfd.in
+--- avahi-0.6.32.orig/initscript/gentoo/avahi-dnsconfd.in 2016-02-15 21:13:45.000000000 -0500
++++ avahi-0.6.32/initscript/gentoo/avahi-dnsconfd.in 2016-09-21 20:58:12.683109618 -0400
+@@ -1,4 +1,4 @@
+-#!/sbin/runscript
++#!/sbin/openrc-run
+ # Copyright 1999-2007 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+
diff --git a/net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch b/net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
new file mode 100644
index 000000000000..394f6d34d0f0
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
@@ -0,0 +1,22 @@
+--- avahi-0.6.30/initscript/gentoo/avahi-daemon.in
++++ avahi-0.6.30/initscript/gentoo/avahi-daemon.in
+@@ -2,7 +2,7 @@
+ # Copyright 1999-2007 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+
+-opts="reload"
++extra_started_commands="reload"
+
+ depend() {
+ before netmount nfsmount
+--- avahi-0.6.30/initscript/gentoo/avahi-dnsconfd.in
++++ avahi-0.6.30/initscript/gentoo/avahi-dnsconfd.in
+@@ -2,7 +2,7 @@
+ # Copyright 1999-2007 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+
+-opts="reload"
++extra_started_commands="reload"
+
+ depend() {
+ need avahi-daemon
diff --git a/net-dns/avahi/metadata.xml b/net-dns/avahi/metadata.xml
new file mode 100644
index 000000000000..046761ce22c0
--- /dev/null
+++ b/net-dns/avahi/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <use>
+ <flag name="autoipd">Build and install the IPv4LL (RFC3927) network address
+ configuration daemon</flag>
+ <flag name="bookmarks">Install the avahi-bookmarks application (requires
+ <pkg>dev-python/twisted-core</pkg> and <pkg>dev-python/twisted-web</pkg>)</flag>
+ <flag name="howl-compat">Enable compat libraries for howl</flag>
+ <flag name="gtk3">Build the avahi-ui-gtk3 library, and use gtk3 for the
+ avahi utilities under USE=utils</flag>
+ <flag name="mdnsresponder-compat">Enable compat libraries for
+ mDNSResponder</flag>
+ <flag name="utils">Install the avahi gtk+ utils avahi-discover, bssh, and
+ bvnc</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">lathiat/avahi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/bind-dns-keygen/Manifest b/net-dns/bind-dns-keygen/Manifest
new file mode 100644
index 000000000000..584d1efdec38
--- /dev/null
+++ b/net-dns/bind-dns-keygen/Manifest
@@ -0,0 +1,5 @@
+DIST bind-9.3.2-39.fc6.src.rpm 5480548 SHA256 8e5b98a2cd2f5003b28ba9c7a9229efe135a6439c64cc1a9b6aa91811258ef21 SHA512 8959274880aca83d0882fcd825627cdf1000536d2c6e08fad83fe6b85aecbbeb404e6bf7fc7f1d718aa17d85465198565adffd3628a615744d828a674a775736 WHIRLPOOL 0854c7223d97ea82ac90ec6c7e792778bd7493f919a0b6e6e344e0c70745e28effabf63a45da9e87b65bd7eaa0b3f146ea78aa21e4cfbe6cde3e7f4f0a3b7bcf
+EBUILD bind-dns-keygen-9.3.2.39-r1.ebuild 679 SHA256 922c24057e9520f62833ff2e105be63073bb3c2a1acf9a9f7423754396e94420 SHA512 18387dddebd54af0504abdfda04cb77ef1c09ee25208e4be3633302449be4f609f34adcd99b2ad7ff2493e57d240c47c3cad878513ce084b0d0c7d151183558c WHIRLPOOL 95239871198a208465ef94f86db68e1b56d613d7001e7d77eaa844bd526ed0221d10b9d8cc4d49e1957b403cbe53d2941116bea9a8ffbcf586e9e3bfa059b111
+MISC ChangeLog 2735 SHA256 5e4c02b4124cbcf4cff751a99af7e8d3a635b49940a712bf78478d27a9ba77cf SHA512 599866a2b1611a83e95d4c5cf0fcc00f9f803e60e04e76a755b524ff6de61e4c1126f259c473fa597974d36ef4362b4ea966f7d8b811cfe4dc2d5bb65e4dc654 WHIRLPOOL b346a8db6825593273aff4d51906f03959d75ea31bd890870370a508657be4c055e5d5104e11af840821623fd96f8339c78cd313304067243ee5ee086220b96b
+MISC ChangeLog-2015 1221 SHA256 5d3f777fe584a3552a2630cc99162dc015aec6c680b7b0e49b57fa1385dfb8f6 SHA512 03ddecc95076202e55a702ef68f09681beae4111c3bbccea6c680268400127bf443d2e01698c840f6cdcbdf4c9b23e852b46e915108d796158c03ff6f675beb5 WHIRLPOOL eda5db4ac69738288404eb276de9140e7559ae5755ddeca690478873a8282e16177258540dcfb1ad490b8233bef64f934634998c0f2d5e7e58d15d472f06d68e
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-dns/bind-dns-keygen/bind-dns-keygen-9.3.2.39-r1.ebuild b/net-dns/bind-dns-keygen/bind-dns-keygen-9.3.2.39-r1.ebuild
new file mode 100644
index 000000000000..8103905bfda9
--- /dev/null
+++ b/net-dns/bind-dns-keygen/bind-dns-keygen-9.3.2.39-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit rpm toolchain-funcs
+
+# Tag for which Fedora Core version it's from
+FCVER="6"
+
+MY_PV="${PV%.*}-${PV##*.}"
+MY_P="${PN%%-*}-${MY_PV}"
+DESCRIPTION="A simple BIND key generator"
+HOMEPAGE="https://fedora.redhat.com/projects/config-tools/"
+SRC_URI="mirror://gentoo/${MY_P}.fc${FCVER}.src.rpm"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+S="${WORKDIR}"
+
+src_compile() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o ${PN#*-} ${PN##*-}.c || die "compile failed"
+}
+
+src_install() {
+ dosbin ${PN#*-} || die "dosbin failed"
+}
diff --git a/net-dns/bind-dns-keygen/metadata.xml b/net-dns/bind-dns-keygen/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-dns/bind-dns-keygen/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-dns/bind-tools/Manifest b/net-dns/bind-tools/Manifest
new file mode 100644
index 000000000000..cde2d04f0d1d
--- /dev/null
+++ b/net-dns/bind-tools/Manifest
@@ -0,0 +1,11 @@
+AUX bind-tools-9.11.0_p5-dyndb-dlopen.patch 2932 SHA256 87a0d02ef647cda2503c4b04f75423036f24cb0c50d9e0ff9b67cf45f0b2973b SHA512 4aef9a107e15953ff81b8354e5e68756650e951ce4e12181d8ac200bd006f6d10c75f0af496a0755d883b921af2aa7984fbe15fdbd5ef8ec47ab6e185027f646 WHIRLPOOL 843a3c327481d1b3e4ece8e52a389b8720e0b8288f99d4396b30b6183c70674d4ab5b2d8244a400b8843380bc648af4fbd738d3d63fc6e36d0c768f1a288651c
+AUX bind-tools-9.5.0_p1-lwconfig.patch 1856 SHA256 5e39cd20da4f2b3bf5ee352d73249c105de1e182c595afb20a15e950f2f88f02 SHA512 f46290cddfb39b077269cd2198d04eef6a7e680b5f0f8dcf471e551a61b4b7a56871a56cdd20afdeaa86edb790513d8c522032fb725a266c18e0e59eee803dcc WHIRLPOOL 01365d359cd7a6e1e2e8015a041df3747c58b3942a0c586c9db6f2cde36351e95ee8650483ba0439b9a748a354e134145945217a44e38e11722fad5f21278972
+DIST bind-9.11.1-P1.tar.gz 9745364 SHA256 6b1b3e88d51b8471bd6aee24a8cea70817e850a5901315dc506f9dde275ca638 SHA512 5683ae7be264e11b5b2a843d216e3ca4959b7de109863d5435090b2e033d6c405689e4ce57385ca787b1c948f4437aea39b8d5164a1d347c167f87337e9fc760 WHIRLPOOL a9dd3cabfe04f16a60ce9d55d3bfdd57d05bddd9fb86996e952756bf40b63dda78d269903d1ae951b499cea899e154e2936117ad2bc6de0e30c0937c8292e45b
+DIST bind-9.11.1-P3.tar.gz 9749095 SHA256 52426e75432e46996dc90f24fca027805a341c38fbbb022b60dc9acd2677ccf4 SHA512 bf92ce1e07e5c84cc42b413bdbd3ad97f37712a6dc330dc10182992d948b7a393d5446efa188379b39020c34d810cebe2a7acccc9b8aa6bb564e1f3e6be42e96 WHIRLPOOL 93c139c979a60f9f3d8e54cf9f23e25a6d64180f7c2be6ba8c41488e9eec985c0bd67ab28e7f502c155c57b643b47b4c12d1ee5877077be37e07138adbd93a56
+DIST bind-9.11.2.tar.gz 9782180 SHA256 7f46ad8620f7c3b0ac375d7a5211b15677708fda84ce25d7aeb7222fe2e3c77a SHA512 c837c0a360049b0077b155eede9b6a71f63d1caca2ddf20a8ab7860a1033a3750e49cd2804dcf8c43b0aef04bcea99422d1302b4eae1646eb69a5ae6d64625b9 WHIRLPOOL e77846ffbe8f70b295f4aeeb110946ba98a3d4a2fd79b059728226d0916429e8a5657b1dea0f545581588153f3f00ba7c99e326359be4bad3f1ed637a75d52ed
+EBUILD bind-tools-9.11.1_p1.ebuild 3176 SHA256 e0bacacbd9250304b4c697b403e559a930cb114f1c35032a1194d9dde0a374f4 SHA512 b292d3062aa5c37800945446ee05b27d918551cde436dee09b92ac19f26e104cbbac1aaf2f486eca9f591fbea89f4f420e3a75c85fcfbaeb243203ca4accf138 WHIRLPOOL ee452c2aefb9eb985643bbd95165c5ed2e4fb71b093f63cb95c6cce62ecc5beaa65801f29aec580d98666327cab087f056b0c63d653c3dd1f9ca0247a6fe4e89
+EBUILD bind-tools-9.11.1_p3.ebuild 3177 SHA256 108219454a6a48e175524900c3661413d48834c86f70c239e7fe7e6c4ced397d SHA512 b12035e8dad9bf6b0a7f1e948d239e171821b5d3e6526052e15572d09444ea10e6aacdf669ffafc367b234083efb6db69801f3fcd39069d907f5258eee53af87 WHIRLPOOL 524277297467388e77f9dc2f3c99caaa0abbed5001c6a3b5c8d51542883aaa09c8bcf4c7933f9e4beaaeee82fbc93ddbb425129e5fc066d1366455e64f42b2b3
+EBUILD bind-tools-9.11.2.ebuild 3109 SHA256 7d8c08a4c96a586dcdfb595c280e79e9d2db26bb314360d43f5dca94f4e6cfd9 SHA512 c5f85c61ece7258929af980566958c7591e67703ea28ffa1b4c8d0bfcf30eace5a88180ceff8957cab23327829ea0eb4864d3d6f5092eb5238d084b713e66d5f WHIRLPOOL fc3beefecc2231f15c8ac9d8eb21c280ad97797ffb6a857a45ba13607eefa3249127efb28d1ca3864245926bed5d29f435ba383d7472b96b52ff73835226a8ac
+MISC ChangeLog 11476 SHA256 360ad4a6cc959a1d6368160f97a8ef7ef1a5cede600e25e6b60ce1ea3c0a7c05 SHA512 0a0125707b350812b5b42e8c8cccd6a343eb6b2ed19cf3dfa536290e5d07591f5256abd4f6ca82dc05e8dc749d09dda129fb07a3b31a28f4678d491428967f69 WHIRLPOOL 49a8cb571bda115062f0bd380d2cdb42d349edcaef1cdaf2e1cfeffb54713b9e8e554d17e67816ddf124ecfe402e9cf7a5fda2b63c4f4395b0be8d4f0e3c50a0
+MISC ChangeLog-2015 42396 SHA256 1f35ddc61ee04e1eb7cb0d99f4c49ff665477d456ba1ea08e039eea4b76bdc77 SHA512 c1b8720a91aa51ad540ac28a86579e3f1d7d40d37d08c9046dce84347baed49e5113c2773d2b438d59331aa0d4cbe7e3fd5bf6cb606bd4f7135f9c6b86a949a0 WHIRLPOOL 7c1c9d016271064542b7a7826453f8d25316bcd3a14de15a3a041d34587ac3063e2f1dcff2149e50f5ac60e7554ef0a76bbd889bf9eb2ade67fc163967086b1e
+MISC metadata.xml 513 SHA256 716f946e0393c863b09fdc054ee67ade9768fc89437c297daa5659e304af0ceb SHA512 5c817f1afce4f096d912de9f0cd82b92e2b97f86db24de5eae8aa1a877c78e1800582b4615666c43f139049e179dbc30134692d7039517f97cf53ba9a2dcbd4d WHIRLPOOL f55a86a31900791eb91072899a2bb5e2117070ec779dcce0be65f04d74f7ba534d407c62c720af6835ee81b2de66b230cce261621416638208f6b704a4403cd6
diff --git a/net-dns/bind-tools/bind-tools-9.11.1_p1.ebuild b/net-dns/bind-tools/bind-tools-9.11.1_p1.ebuild
new file mode 100644
index 000000000000..95f347c1a18c
--- /dev/null
+++ b/net-dns/bind-tools/bind-tools-9.11.1_p1.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils autotools flag-o-matic toolchain-funcs
+
+MY_PN=${PN//-tools}
+MY_PV=${PV/_p/-P}
+MY_PV=${MY_PV/_rc/rc}
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="bind tools: dig, nslookup, host, nsupdate, dnssec-keygen"
+HOMEPAGE="http://www.isc.org/software/bind"
+SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~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"
+IUSE="doc gost gssapi idn ipv6 libressl readline seccomp ssl urandom xml"
+# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
+
+REQUIRED_USE="gost? ( !libressl ssl )"
+
+CDEPEND="
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
+ xml? ( dev-libs/libxml2 )
+ idn? ( net-dns/idnkit )
+ gssapi? ( virtual/krb5 )
+ readline? ( sys-libs/readline:0= )
+ seccomp? ( sys-libs/libseccomp )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ !<net-dns/bind-9.10.2"
+
+S="${WORKDIR}/${MY_P}"
+
+# bug 479092, requires networking
+RESTRICT="test"
+
+src_prepare() {
+ # bug 600212
+ epatch "${FILESDIR}"/${PN}-9.11.0_p5-dyndb-dlopen.patch
+
+ epatch "${FILESDIR}"/${PN}-9.5.0_p1-lwconfig.patch #231247
+
+ # Disable tests for now, bug 406399
+ sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
+
+ # bug #220361
+ rm aclocal.m4
+ rm -rf libtool.m4/
+
+ mv configure.in configure.ac || die # configure.in is deprecated
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=
+
+ if use urandom; then
+ myconf="${myconf} --with-randomdev=/dev/urandom"
+ else
+ myconf="${myconf} --with-randomdev=/dev/random"
+ fi
+
+ # bug 344029
+ append-cflags "-DDIG_SIGCHASE"
+
+ # localstatedir for nsupdate -l, bug 395785
+ tc-export BUILD_CC
+ econf \
+ --localstatedir=/var \
+ --without-python \
+ --without-libjson \
+ --without-zlib \
+ --without-lmdb \
+ --disable-openssl-version-check \
+ $(use_enable ipv6) \
+ $(use_with idn) \
+ $(usex idn --with-idnlib=-lidnkit '') \
+ $(use_enable seccomp) \
+ $(use_with ssl openssl) \
+ $(use_with xml libxml2) \
+ $(use_with gssapi) \
+ $(use_with readline) \
+ $(use_with gost) \
+ ${myconf}
+
+ # bug #151839
+ echo '#undef SO_BSDCOMPAT' >> config.h
+}
+
+src_compile() {
+ local AR=$(tc-getAR)
+
+ emake AR="${AR}" -C lib/
+ emake AR="${AR}" -C bin/delv/
+ emake AR="${AR}" -C bin/dig/
+ emake AR="${AR}" -C bin/nsupdate/
+ emake AR="${AR}" -C bin/dnssec/
+}
+
+src_install() {
+ dodoc README CHANGES FAQ
+
+ cd "${S}"/bin/delv
+ dobin delv
+ doman delv.1
+
+ cd "${S}"/bin/dig
+ dobin dig host nslookup
+ doman {dig,host,nslookup}.1
+
+ cd "${S}"/bin/nsupdate
+ dobin nsupdate
+ doman nsupdate.1
+ if use doc; then
+ dohtml nsupdate.html
+ fi
+
+ cd "${S}"/bin/dnssec
+ for tool in dsfromkey importkey keyfromlabel keygen \
+ revoke settime signzone verify; do
+ dobin dnssec-"${tool}"
+ doman dnssec-"${tool}".8
+ if use doc; then
+ dohtml dnssec-"${tool}".html
+ fi
+ done
+}
diff --git a/net-dns/bind-tools/bind-tools-9.11.1_p3.ebuild b/net-dns/bind-tools/bind-tools-9.11.1_p3.ebuild
new file mode 100644
index 000000000000..6d09ec43ca74
--- /dev/null
+++ b/net-dns/bind-tools/bind-tools-9.11.1_p3.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils autotools flag-o-matic toolchain-funcs
+
+MY_PN=${PN//-tools}
+MY_PV=${PV/_p/-P}
+MY_PV=${MY_PV/_rc/rc}
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="bind tools: dig, nslookup, host, nsupdate, dnssec-keygen"
+HOMEPAGE="http://www.isc.org/software/bind"
+SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~m68k ~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"
+IUSE="doc gost gssapi idn ipv6 libressl readline seccomp ssl urandom xml"
+# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
+
+REQUIRED_USE="gost? ( !libressl ssl )"
+
+CDEPEND="
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
+ xml? ( dev-libs/libxml2 )
+ idn? ( net-dns/idnkit )
+ gssapi? ( virtual/krb5 )
+ readline? ( sys-libs/readline:0= )
+ seccomp? ( sys-libs/libseccomp )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ !<net-dns/bind-9.10.2"
+
+S="${WORKDIR}/${MY_P}"
+
+# bug 479092, requires networking
+RESTRICT="test"
+
+src_prepare() {
+ # bug 600212
+ epatch "${FILESDIR}"/${PN}-9.11.0_p5-dyndb-dlopen.patch
+
+ epatch "${FILESDIR}"/${PN}-9.5.0_p1-lwconfig.patch #231247
+
+ # Disable tests for now, bug 406399
+ sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
+
+ # bug #220361
+ rm aclocal.m4
+ rm -rf libtool.m4/
+
+ mv configure.in configure.ac || die # configure.in is deprecated
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=
+
+ if use urandom; then
+ myconf="${myconf} --with-randomdev=/dev/urandom"
+ else
+ myconf="${myconf} --with-randomdev=/dev/random"
+ fi
+
+ # bug 344029
+ append-cflags "-DDIG_SIGCHASE"
+
+ # localstatedir for nsupdate -l, bug 395785
+ tc-export BUILD_CC
+ econf \
+ --localstatedir=/var \
+ --without-python \
+ --without-libjson \
+ --without-zlib \
+ --without-lmdb \
+ --disable-openssl-version-check \
+ $(use_enable ipv6) \
+ $(use_with idn) \
+ $(usex idn --with-idnlib=-lidnkit '') \
+ $(use_enable seccomp) \
+ $(use_with ssl openssl) \
+ $(use_with xml libxml2) \
+ $(use_with gssapi) \
+ $(use_with readline) \
+ $(use_with gost) \
+ ${myconf}
+
+ # bug #151839
+ echo '#undef SO_BSDCOMPAT' >> config.h
+}
+
+src_compile() {
+ local AR=$(tc-getAR)
+
+ emake AR="${AR}" -C lib/
+ emake AR="${AR}" -C bin/delv/
+ emake AR="${AR}" -C bin/dig/
+ emake AR="${AR}" -C bin/nsupdate/
+ emake AR="${AR}" -C bin/dnssec/
+}
+
+src_install() {
+ dodoc README CHANGES FAQ
+
+ cd "${S}"/bin/delv
+ dobin delv
+ doman delv.1
+
+ cd "${S}"/bin/dig
+ dobin dig host nslookup
+ doman {dig,host,nslookup}.1
+
+ cd "${S}"/bin/nsupdate
+ dobin nsupdate
+ doman nsupdate.1
+ if use doc; then
+ dohtml nsupdate.html
+ fi
+
+ cd "${S}"/bin/dnssec
+ for tool in dsfromkey importkey keyfromlabel keygen \
+ revoke settime signzone verify; do
+ dobin dnssec-"${tool}"
+ doman dnssec-"${tool}".8
+ if use doc; then
+ dohtml dnssec-"${tool}".html
+ fi
+ done
+}
diff --git a/net-dns/bind-tools/bind-tools-9.11.2.ebuild b/net-dns/bind-tools/bind-tools-9.11.2.ebuild
new file mode 100644
index 000000000000..a29d483558c5
--- /dev/null
+++ b/net-dns/bind-tools/bind-tools-9.11.2.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils autotools flag-o-matic toolchain-funcs
+
+MY_PN=${PN//-tools}
+MY_PV=${PV/_p/-P}
+MY_PV=${MY_PV/_rc/rc}
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="bind tools: dig, nslookup, host, nsupdate, dnssec-keygen"
+HOMEPAGE="http://www.isc.org/software/bind"
+SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~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"
+IUSE="doc gost gssapi idn ipv6 libressl readline seccomp ssl urandom xml"
+# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
+
+REQUIRED_USE="gost? ( !libressl ssl )"
+
+CDEPEND="
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
+ xml? ( dev-libs/libxml2 )
+ idn? ( net-dns/idnkit )
+ gssapi? ( virtual/krb5 )
+ readline? ( sys-libs/readline:0= )
+ seccomp? ( sys-libs/libseccomp )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ !<net-dns/bind-9.10.2"
+
+S="${WORKDIR}/${MY_P}"
+
+# bug 479092, requires networking
+RESTRICT="test"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-9.5.0_p1-lwconfig.patch #231247
+
+ # Disable tests for now, bug 406399
+ sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
+
+ # bug #220361
+ rm aclocal.m4
+ rm -rf libtool.m4/
+
+ mv configure.in configure.ac || die # configure.in is deprecated
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=
+
+ if use urandom; then
+ myconf="${myconf} --with-randomdev=/dev/urandom"
+ else
+ myconf="${myconf} --with-randomdev=/dev/random"
+ fi
+
+ # bug 344029
+ append-cflags "-DDIG_SIGCHASE"
+
+ # localstatedir for nsupdate -l, bug 395785
+ tc-export BUILD_CC
+ econf \
+ --localstatedir=/var \
+ --without-python \
+ --without-libjson \
+ --without-zlib \
+ --without-lmdb \
+ --disable-openssl-version-check \
+ $(use_enable ipv6) \
+ $(use_with idn) \
+ $(usex idn --with-idnlib=-lidnkit '') \
+ $(use_enable seccomp) \
+ $(use_with ssl openssl) \
+ $(use_with xml libxml2) \
+ $(use_with gssapi) \
+ $(use_with readline) \
+ $(use_with gost) \
+ ${myconf}
+
+ # bug #151839
+ echo '#undef SO_BSDCOMPAT' >> config.h
+}
+
+src_compile() {
+ local AR=$(tc-getAR)
+
+ emake AR="${AR}" -C lib/
+ emake AR="${AR}" -C bin/delv/
+ emake AR="${AR}" -C bin/dig/
+ emake AR="${AR}" -C bin/nsupdate/
+ emake AR="${AR}" -C bin/dnssec/
+}
+
+src_install() {
+ dodoc README CHANGES
+
+ cd "${S}"/bin/delv
+ dobin delv
+ doman delv.1
+
+ cd "${S}"/bin/dig
+ dobin dig host nslookup
+ doman {dig,host,nslookup}.1
+
+ cd "${S}"/bin/nsupdate
+ dobin nsupdate
+ doman nsupdate.1
+ if use doc; then
+ dohtml nsupdate.html
+ fi
+
+ cd "${S}"/bin/dnssec
+ for tool in dsfromkey importkey keyfromlabel keygen \
+ revoke settime signzone verify; do
+ dobin dnssec-"${tool}"
+ doman dnssec-"${tool}".8
+ if use doc; then
+ dohtml dnssec-"${tool}".html
+ fi
+ done
+}
diff --git a/net-dns/bind-tools/files/bind-tools-9.11.0_p5-dyndb-dlopen.patch b/net-dns/bind-tools/files/bind-tools-9.11.0_p5-dyndb-dlopen.patch
new file mode 100644
index 000000000000..5fc8f3c18897
--- /dev/null
+++ b/net-dns/bind-tools/files/bind-tools-9.11.0_p5-dyndb-dlopen.patch
@@ -0,0 +1,97 @@
+From ae903759c205f8a5039458d780c0e0c4442b7291 Mon Sep 17 00:00:00 2001
+From: Mark Andrews <marka@isc.org>
+Date: Tue, 30 May 2017 11:31:34 +1000
+Subject: [PATCH] 4530. [bug] "dyndb" is dependent on dlopen
+ existing / being enabled. [RT #45291]
+
+From aa3a8979bc7eb1596d044eff572b3c35310584fa Mon Sep 17 00:00:00 2001
+From: Mark Andrews <marka@isc.org>
+Date: Tue, 30 May 2017 11:34:37 +1000
+Subject: [PATCH] 4530. [bug] "dyndb" is dependent on dlopen
+ existing / being enabled. [RT #45291]
+
+diff --git a/lib/dns/dyndb.c b/lib/dns/dyndb.c
+index a477508..dec68a7 100644
+--- a/lib/dns/dyndb.c
++++ b/lib/dns/dyndb.c
+@@ -80,7 +80,7 @@ impfind(const char *name) {
+ return (NULL);
+ }
+
+-#if HAVE_DLFCN_H
++#if HAVE_DLFCN_H && HAVE_DLOPEN
+ static isc_result_t
+ load_symbol(void *handle, const char *filename,
+ const char *symbol_name, void **symbolp)
+--- a/bin/named/server.c
++++ b/bin/named/server.c
+@@ -1496,6 +1496,7 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
+ return (result);
+ }
+
++#ifdef HAVE_DLOPEN
+ static isc_result_t
+ configure_dyndb(const cfg_obj_t *dyndb, isc_mem_t *mctx,
+ const dns_dyndbctx_t *dctx)
+@@ -1521,6 +1522,7 @@ configure_dyndb(const cfg_obj_t *dyndb, isc_mem_t *mctx,
+ name, isc_result_totext(result));
+ return (result);
+ }
++#endif
+
+
+ static isc_result_t
+@@ -4669,6 +4671,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
+ else
+ (void)cfg_map_get(config, "dyndb", &dyndb_list);
+
++#ifdef HAVE_DLOPEN
+ for (element = cfg_list_first(dyndb_list);
+ element != NULL;
+ element = cfg_list_next(element))
+@@ -4686,6 +4689,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
+
+ CHECK(configure_dyndb(dyndb, mctx, dctx));
+ }
++#endif
+
+ /*
+ * Setup automatic empty zones. If recursion is off then
+diff --git a/lib/bind9/check.c b/lib/bind9/check.c
+index 097dd96..99b995c 100644
+--- a/lib/bind9/check.c
++++ b/lib/bind9/check.c
+@@ -2988,6 +2988,9 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
+ {
+ const cfg_obj_t *zones = NULL;
+ const cfg_obj_t *keys = NULL;
++#ifndef HAVE_DLOPEN
++ const cfg_obj_t *dyndb = NULL;
++#endif
+ const cfg_listelt_t *element, *element2;
+ isc_symtab_t *symtab = NULL;
+ isc_result_t result = ISC_R_SUCCESS;
+@@ -3041,6 +3044,20 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
+ result = ISC_R_FAILURE;
+ }
+
++#ifndef HAVE_DLOPEN
++ if (voptions != NULL)
++ (void)cfg_map_get(voptions, "dyndb", &dyndb);
++ else
++ (void)cfg_map_get(config, "dyndb", &dyndb);
++
++ if (dyndb != NULL) {
++ cfg_obj_log(dyndb, logctx, ISC_LOG_ERROR,
++ "dynamic loading of databases is not supported");
++ if (tresult != ISC_R_SUCCESS)
++ result = ISC_R_NOTIMPLEMENTED;
++ }
++#endif
++
+ /*
+ * Check that the response-policy and catalog-zones options
+ * refer to zones that exist.
+--
+2.9.0
+
diff --git a/net-dns/bind-tools/files/bind-tools-9.5.0_p1-lwconfig.patch b/net-dns/bind-tools/files/bind-tools-9.5.0_p1-lwconfig.patch
new file mode 100644
index 000000000000..7aa1d16e92cd
--- /dev/null
+++ b/net-dns/bind-tools/files/bind-tools-9.5.0_p1-lwconfig.patch
@@ -0,0 +1,63 @@
+--- lib/lwres/lwconfig.c.old 2007-06-20 01:47:22.000000000 +0200
++++ lib/lwres/lwconfig.c 2008-06-15 02:57:02.000000000 +0200
+@@ -175,13 +175,8 @@
+ REQUIRE(buffer != NULL);
+ REQUIRE(size > 0U);
+
+- *p = '\0';
+-
+ ch = eatwhite(fp);
+
+- if (ch == EOF)
+- return (EOF);
+-
+ do {
+ *p = '\0';
+
+@@ -592,23 +587,37 @@
+ if (strlen(word) == 0U)
+ rval = LWRES_R_SUCCESS;
+ else if (strcmp(word, "nameserver") == 0)
+- rval = lwres_conf_parsenameserver(ctx, fp);
++ rval = (stopchar != '\n')? /* fail instantly if EOL is reached */
++ lwres_conf_parsenameserver(ctx, fp)
++ : LWRES_R_FAILURE;
+ else if (strcmp(word, "lwserver") == 0)
+- rval = lwres_conf_parselwserver(ctx, fp);
++ rval = (stopchar != '\n')?
++ lwres_conf_parselwserver(ctx, fp)
++ : LWRES_R_FAILURE;
+ else if (strcmp(word, "domain") == 0)
+- rval = lwres_conf_parsedomain(ctx, fp);
++ rval = (stopchar != '\n')?
++ lwres_conf_parsedomain(ctx, fp)
++ : LWRES_R_FAILURE;
+ else if (strcmp(word, "search") == 0)
+- rval = lwres_conf_parsesearch(ctx, fp);
++ rval = (stopchar != '\n')?
++ lwres_conf_parsesearch(ctx, fp)
++ : LWRES_R_FAILURE;
+ else if (strcmp(word, "sortlist") == 0)
+- rval = lwres_conf_parsesortlist(ctx, fp);
++ rval = (stopchar != '\n')?
++ lwres_conf_parsesortlist(ctx, fp)
++ : LWRES_R_FAILURE;
+ else if (strcmp(word, "options") == 0)
+- rval = lwres_conf_parseoption(ctx, fp);
++ rval = (stopchar != '\n')?
++ lwres_conf_parseoption(ctx, fp)
++ : LWRES_R_FAILURE;
+ else {
+ /* unrecognised word. Ignore entire line */
+ rval = LWRES_R_SUCCESS;
+- stopchar = eatline(fp);
+- if (stopchar == EOF) {
+- break;
++ if (stopchar != '\n') { /* do not eat the next line */
++ stopchar = eatline(fp);
++ if (stopchar == EOF) {
++ break;
++ }
+ }
+ }
+ if (ret == LWRES_R_SUCCESS && rval != LWRES_R_SUCCESS)
diff --git a/net-dns/bind-tools/metadata.xml b/net-dns/bind-tools/metadata.xml
new file mode 100644
index 000000000000..0db3429195ab
--- /dev/null
+++ b/net-dns/bind-tools/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+ <use>
+ <flag name="urandom">Use /dev/urandom instead of /dev/random</flag>
+ <flag name="gssapi">Enable gssapi support</flag>
+ <flag name="gost">Enables gost OpenSSL engine support</flag>
+ </use>
+ <longdescription>ISC's Bind DNS' server tools</longdescription>
+</pkgmetadata>
diff --git a/net-dns/bind/Manifest b/net-dns/bind/Manifest
new file mode 100644
index 000000000000..acb2017bbac7
--- /dev/null
+++ b/net-dns/bind/Manifest
@@ -0,0 +1,20 @@
+AUX 10bind.env 27 SHA256 5ad6a4402372b43809618051873b63646746f400447bba30dc4dfecd028e3650 SHA512 8ae5326b158b8a3eeaab667c84dd712fefd25d10832598783fa497285183cbdee554796c22d32fec54cd00461469f29ed473a730304a00aacdf06c1bb6c33d55 WHIRLPOOL 8fe00482e9ba95698cd814893784bd502ac0edb318450edac60bff4d2b4810068cd5e1f58cfce1ca5e05d5967d36728bf67cd927ce7d991832d1a07593d27c37
+AUX bind-9.11.0_p5-dyndb-dlopen.patch 2932 SHA256 87a0d02ef647cda2503c4b04f75423036f24cb0c50d9e0ff9b67cf45f0b2973b SHA512 4aef9a107e15953ff81b8354e5e68756650e951ce4e12181d8ac200bd006f6d10c75f0af496a0755d883b921af2aa7984fbe15fdbd5ef8ec47ab6e185027f646 WHIRLPOOL 843a3c327481d1b3e4ece8e52a389b8720e0b8288f99d4396b30b6183c70674d4ab5b2d8244a400b8843380bc648af4fbd738d3d63fc6e36d0c768f1a288651c
+AUX generate-rndc-key.sh 183 SHA256 7d9c010a62db7561770fefdfb557bdae17f18835e62bfb9761680054d851ab44 SHA512 6c611120185c1a61b2b6da228efc28302ebd36c819b97793920543ce2cfff4da84f43ec53ddd072f008b04c7087cc19108c4279cb962d12a7e073b47235d14ee WHIRLPOOL d071d473faa6e1feca55ce6e4dd68d76b566372b8cee2e27fd89b48fd4651fe3cff957ac66ad895dccdba1373f18b75f67daeb9bc292dc9a7bc6f3f6da330f91
+AUX localhost.zone-r3 426 SHA256 3f39e9b5be72435e961cd6f5acdfe396b05640bf370969acf918a939575122bc SHA512 979d8693046033c24490dca536f0d649795bbdf57eed32017b32d07d7d3c51b35197e4edd79d8258074a1bf14b71376472ba6ae749f62ceaf74d7a6a0559fa89 WHIRLPOOL 0b7bba480e8bb8cc61e0c9efe2eaba4288fd05b9ae6aeda5e691ad50fc2741bc19b7669a4de56821de2a792df0fe4501d98ff92287dc79cc0bdf766526d365bd
+AUX named.cache-r3 3316 SHA256 2265e9862c5188841f21e906e67e3d9bd83b5bad1f4305c38b7bcd921c5ec406 SHA512 512ea771b011c8ca25b90a473bf1bd8cd0467853a469e03f1685d35979a772722d704e373eaf640cdda93201ef53d18e38127dcce37ff6138310f9de218dd682 WHIRLPOOL 534552732b0609eec9845a98172ee832f2c6d8ba4bca7f76c356e0689238c61831d7823b331cc156fd0a27be2434c89befba7473fde2ecee89b6972eff3a0f93
+AUX named.conf 32 SHA256 f0423c4ee8495da487e07e9144bec1d25f46a0cd2dfa7cfd7a761ef15bfefc98 SHA512 c344fd4949eb80114d0c157517ece3f4b9505b94e3de00489d4b2b23beb74612f38cf3443f2f3b98fe01d98ad1842f45ff1d1826d67937e72e4629bbdf683a59 WHIRLPOOL 2542b9afcb86d14b516f11a7b32f472b0b0415b29ddb618b9c99385aa3d4a04bbc22f6197443dc2de643791994d9799a00eaef508d8306cc622d18e65bc96c3f
+AUX named.conf-r8 4020 SHA256 c1f93d78f46aa6a562d1530ae1697d16fe9020435b835e192cafcb66ff22d7fc SHA512 60ab117e488604810a6e42a627eae465f6241208e726e763127f84102d05a661cceeddd00bc9d8d92c3da7d73d034ef876ace6744a0516b2bcadbaff1d9c82ad WHIRLPOOL 005f5185451a5a20ab9f7d5e0374b051e051315f6a28245241c74bfc1d6a6f3ca2b742a2a774a8dd6e04cef887c69b07bbef31896db02031bdf3e99569274178
+AUX named.confd-r7 1364 SHA256 3cf1ab72446cb9417de916e4cd732f2056fb74d2c6f03da6741b7bae8c415448 SHA512 68fa7c8963ac59349de3d05972c07aa0123b7bebbe0ba9604463ccfd1b377c2babe01eed4745cbe0f7d3831d1b47c2fa620f8092c67465fb771cae4932b0861a WHIRLPOOL 53ae821e10b8ee9becc265030a1cd7758706c1348ffe857edfde744d3214dbc0d648550d83801f4340fe06884ac8edaddbf2e39b8440d007c36b0895f201609a
+AUX named.init-r13 6202 SHA256 a1a25bd66fa2edac593e77c5469e110466b7d8dc1bfa3f72a49c7117196986a4 SHA512 c675adec65796989dc8524d533868975d4e2c3b2ed5f09aa3cd92ec21b8dfb161582dd5afdf08ab78174873f3e1458e90c2d50958f0b5a303078540a675ec0c9 WHIRLPOOL 7e9065f30634faceb14adcf87afeafd0e038c710e8668024f3cf44980180874a1614247979842b48ca506e5dc8acd7f22540b94d4c8a2cc7126045c248fb96ad
+AUX named.service-r1 327 SHA256 5c57f181cbb153fe6beb9385c56b874ea56afc19cca105ea3c5cadf2138c349d SHA512 1d3dbf9d1de0c23c398a523b05c0fb266b6b699e54d232818b28205f697ca227acae9f2778d6f41309b117a6cd78eee170b745594b786b1c1571d5f66d6c3de4 WHIRLPOOL fbfbb8ec1bd7bf1796be0daa66ec0918b175f3953b0312c492a09097f4e7c9b60d303330f525c03d1aa7b0934c2bc134e90800afb7e40e06f77f865c8710dd66
+DIST bind-9.11.1-P1.tar.gz 9745364 SHA256 6b1b3e88d51b8471bd6aee24a8cea70817e850a5901315dc506f9dde275ca638 SHA512 5683ae7be264e11b5b2a843d216e3ca4959b7de109863d5435090b2e033d6c405689e4ce57385ca787b1c948f4437aea39b8d5164a1d347c167f87337e9fc760 WHIRLPOOL a9dd3cabfe04f16a60ce9d55d3bfdd57d05bddd9fb86996e952756bf40b63dda78d269903d1ae951b499cea899e154e2936117ad2bc6de0e30c0937c8292e45b
+DIST bind-9.11.1-P3.tar.gz 9749095 SHA256 52426e75432e46996dc90f24fca027805a341c38fbbb022b60dc9acd2677ccf4 SHA512 bf92ce1e07e5c84cc42b413bdbd3ad97f37712a6dc330dc10182992d948b7a393d5446efa188379b39020c34d810cebe2a7acccc9b8aa6bb564e1f3e6be42e96 WHIRLPOOL 93c139c979a60f9f3d8e54cf9f23e25a6d64180f7c2be6ba8c41488e9eec985c0bd67ab28e7f502c155c57b643b47b4c12d1ee5877077be37e07138adbd93a56
+DIST bind-9.11.2.tar.gz 9782180 SHA256 7f46ad8620f7c3b0ac375d7a5211b15677708fda84ce25d7aeb7222fe2e3c77a SHA512 c837c0a360049b0077b155eede9b6a71f63d1caca2ddf20a8ab7860a1033a3750e49cd2804dcf8c43b0aef04bcea99422d1302b4eae1646eb69a5ae6d64625b9 WHIRLPOOL e77846ffbe8f70b295f4aeeb110946ba98a3d4a2fd79b059728226d0916429e8a5657b1dea0f545581588153f3f00ba7c99e326359be4bad3f1ed637a75d52ed
+DIST dyndns-samples.tbz2 22866 SHA256 92fb06a92ca99cbbe96b90bcca229ef9c12397db57ae17e199dad9f1218fdbe8 SHA512 83b0bf99f8e9ff709e8e9336d8c5231b98a4b5f0c60c10792f34931e32cc638d261967dfa5a83151ec3740977d94ddd6e21e9ce91267b3e279b88affdbc18cac WHIRLPOOL 08d4e6a817f1d02597631e18152dbd55ea1bc4c82174be150cc77efc9e1f0f03b6471d1cefbe4229cd3161de752ef232a43ca274a07b78e9c974ceb04cfe99a2
+EBUILD bind-9.11.1_p1.ebuild 12498 SHA256 62b9f9ef5ecccaf6be82c58ede7b449cd67d7a9a490a1443a4de45d5fb409ea5 SHA512 d7b3972d58d051007b764b7301ba3edd6102f45cb214f4b41c2f6348eac693d86c31f059ff5898dcb7c662ba79dad329d220db9e090e120f378c51ccd8b38bfa WHIRLPOOL cb9e2fb15a13682afbc698605870dedeccff8d2dad98e82dc4469a86631e96f5f30f66a9c53059d85b7b6b05a8f3371cc489a62b8851a6dd082b078aba30fe18
+EBUILD bind-9.11.1_p3.ebuild 12499 SHA256 0b38e97b60487fcbd9ffabf11f700e7cb90a09c0aabead232f320128eb8ac1e3 SHA512 a8ca80141447d31cb6e13e3735b3811bf626d6ee9db251b4180c517521c5e7f02d06f5f9006490950a8eab222d6f0baca1f6cfb519aa431a283b9b0dd5dff2df WHIRLPOOL ea25f316604fcaf3379b178c779a9692e188384cffc8de16f76aaebd94cba424b686b91a766a2aa55b100779b7aa54efda9a6fc3b0f548acd601ba4280d4c330
+EBUILD bind-9.11.2.ebuild 12431 SHA256 af45ada25adaac0110363d9ee4d400f71e9307c6ce3b26906ce7448f766e82ae SHA512 fe2b99f8d354eeb88f586a256996d4c03f2bd6b29d5cf9780e79ceb09eec0de0a8606415b48a019a357b598b9ef20db76b0e6617231d31350dbf47476dae26e5 WHIRLPOOL 5b0527fcb9ad14c7d92e6e6fce7de73f31d10abc8274057a5dfa93f3c8f403551a74ee57a71e3b139a3bf367be5dae00409c0188019c53cca04aacb426c48a75
+MISC ChangeLog 13297 SHA256 4d0045e6ff541c64902f94168dfd5ff70e05e7d5bc1cf5e817736fadc1785c92 SHA512 2a5f50500efb399be99d1aada968f779e685a1e7edfcf4d9ef56ddbf7cb47bb29556995731a59b3566f4eb20c71bdb170b7e03f97dcf0108d3b1e583a4e68847 WHIRLPOOL 48a57d85327680fcf62dd26edac49844829ea83e0dd094c21bf3226c25a8667af2b7f8d974bf47855e9b964b4a17779a3a1031ed00ca57c435e23abfdbe4af1d
+MISC ChangeLog-2015 85716 SHA256 b34fb291b038caf3fd1bb5f6553fdb05469ca71cc3ad27366df77432a81ab1cc SHA512 d012fe08e05c7c8d45abc92043cd90b1f24bf9faf038ea529da760cf4ad65946887b694250ac82e7683df67e43a77bb85588af4cae79209d1a83b50c1506957c WHIRLPOOL d2a8db6f2ca33a0e16be2c80bc5c364d1e4e2e4edc63a139b0c440da3ce0ea05715eb41401ec59e1175b10fd2db175924409ad5a76a7985683a747b9f2967c70
+MISC metadata.xml 1085 SHA256 8319244c68d6ad3a4f01fbec5f553c24ff721be302e8b2d1958041ce3be6b8d7 SHA512 a04b103703aaebc79738193b378f94df74461e918bf8fa7a99459e42b41b59a1b294113040cf5892d77b4c7c31b1448d9869b53cd2a9fb2f885ab1a1a6ba2f3b WHIRLPOOL 133a74f625c42b8a1c8b09c1387386b7a075bf0dddb78e79a82ff56d407520ff7c5cbbfef6c8153b57abecd609eba79ee79eae0fa474f597220f5449f9e762f4
diff --git a/net-dns/bind/bind-9.11.1_p1.ebuild b/net-dns/bind/bind-9.11.1_p1.ebuild
new file mode 100644
index 000000000000..7fba0854e43c
--- /dev/null
+++ b/net-dns/bind/bind-9.11.1_p1.ebuild
@@ -0,0 +1,426 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re dlz/mysql and threads, needs to be verified..
+# MySQL uses thread local storage in its C api. Thus MySQL
+# requires that each thread of an application execute a MySQL
+# thread initialization to setup the thread local storage.
+# This is impossible to do safely while staying within the DLZ
+# driver API. This is a limitation caused by MySQL, and not the DLZ API.
+# Because of this BIND MUST only run with a single thread when
+# using the MySQL driver.
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd
+
+MY_PV="${PV/_p/-P}"
+MY_PV="${MY_PV/_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+
+SDB_LDAP_VER="1.1.0-fc14"
+
+RRL_PV="${MY_PV}"
+
+NSLINT_DIR="contrib/nslint-3.0a2/"
+
+# SDB-LDAP: http://bind9-ldap.bayour.com/
+
+DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server"
+HOMEPAGE="http://www.isc.org/software/bind"
+SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz
+ doc? ( mirror://gentoo/dyndns-samples.tbz2 )"
+# sdb-ldap? (
+# http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2
+# )"
+
+LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm 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 filter-aaaa fixed-rrset geoip gost gssapi idn ipv6
+json ldap libressl lmdb mysql nslint odbc postgres python rpz seccomp selinux ssl static-libs
++threads urandom xml +zlib"
+# sdb-ldap - patch broken
+# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
+
+REQUIRED_USE="postgres? ( dlz )
+ berkdb? ( dlz )
+ mysql? ( dlz !threads )
+ odbc? ( dlz )
+ ldap? ( dlz )
+ gost? ( !libressl ssl )
+ threads? ( caps )
+ dnstap? ( threads )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+# sdb-ldap? ( dlz )
+
+DEPEND="
+ ssl? (
+ !libressl? ( dev-libs/openssl:0[-bindist] )
+ libressl? ( dev-libs/libressl )
+ )
+ mysql? ( >=virtual/mysql-4.0 )
+ odbc? ( >=dev-db/unixODBC-2.2.6 )
+ ldap? ( net-nds/openldap )
+ idn? ( net-dns/idnkit )
+ postgres? ( dev-db/postgresql:= )
+ caps? ( >=sys-libs/libcap-2.1.0 )
+ xml? ( dev-libs/libxml2 )
+ geoip? ( >=dev-libs/geoip-1.4.6 )
+ gssapi? ( virtual/krb5 )
+ gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
+ seccomp? ( sys-libs/libseccomp )
+ json? ( dev-libs/json-c )
+ lmdb? ( dev-db/lmdb )
+ zlib? ( sys-libs/zlib )
+ dnstap? ( dev-libs/fstrm dev-libs/protobuf-c )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/ply[${PYTHON_USEDEP}]
+ )"
+# sdb-ldap? ( net-nds/openldap )
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-bind )
+ || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )"
+
+S="${WORKDIR}/${MY_P}"
+
+# bug 479092, requires networking
+RESTRICT="test"
+
+pkg_setup() {
+ ebegin "Creating named group and user"
+ enewgroup named 40
+ enewuser named 40 -1 /etc/bind named
+ eend ${?}
+}
+
+src_prepare() {
+ # bug 600212
+ epatch "${FILESDIR}"/${PN}-9.11.0_p5-dyndb-dlopen.patch
+
+ # Adjusting PATHs in manpages
+ for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do
+ sed -i \
+ -e 's:/etc/named.conf:/etc/bind/named.conf:g' \
+ -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
+ -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
+ "${i}" || die "sed failed, ${i} doesn't exist"
+ done
+
+# if use dlz; then
+# # sdb-ldap patch as per bug #160567
+# # Upstream URL: http://bind9-ldap.bayour.com/
+# # New patch take from bug 302735
+# if use sdb-ldap; then
+# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch
+# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/
+# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/
+# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/
+# fi
+# fi
+
+ # should be installed by bind-tools
+ sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die
+
+ # Disable tests for now, bug 406399
+ sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
+
+ if use nslint; then
+ sed -i -e 's:/etc/named.conf:/etc/bind/named.conf:' ${NSLINT_DIR}/nslint.{c,8} || die
+ fi
+
+ # bug #220361
+ rm aclocal.m4
+ rm -rf libtool.m4/
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=""
+
+ if use urandom; then
+ myconf="${myconf} --with-randomdev=/dev/urandom"
+ else
+ myconf="${myconf} --with-randomdev=/dev/random"
+ fi
+
+ use geoip && myconf="${myconf} --with-geoip"
+
+ # bug #158664
+# gcc-specs-ssp && replace-flags -O[23s] -O
+
+ # To include db.h from proper path
+ use berkdb && append-flags "-I$(db_includedir)"
+
+ export BUILD_CC=$(tc-getBUILD_CC)
+ econf \
+ --sysconfdir=/etc/bind \
+ --localstatedir=/var \
+ --with-libtool \
+ --enable-full-report \
+ --without-readline \
+ $(use_enable caps linux-caps) \
+ $(use_enable filter-aaaa) \
+ $(use_enable fixed-rrset) \
+ $(use_enable ipv6) \
+ $(use_enable rpz rpz-nsdname) \
+ $(use_enable rpz rpz-nsip) \
+ $(use_enable seccomp) \
+ $(use_enable threads) \
+ $(use_with berkdb dlz-bdb) \
+ $(use_with dlz dlopen) \
+ $(use_with dlz dlz-filesystem) \
+ $(use_with dlz dlz-stub) \
+ $(use_with gost) \
+ $(use_with gssapi) \
+ $(use_with idn) \
+ $(use_with json libjson) \
+ $(use_with ldap dlz-ldap) \
+ $(use_with mysql dlz-mysql) \
+ $(use_with odbc dlz-odbc) \
+ $(use_with postgres dlz-postgres) \
+ $(use_with lmdb) \
+ $(use_with python) \
+ $(use_with ssl ecdsa) \
+ $(use_with ssl openssl "${EPREFIX}"/usr) \
+ $(use_with xml libxml2) \
+ $(use_with zlib) \
+ ${myconf}
+
+ # $(use_enable static-libs static) \
+
+ # bug #151839
+ echo '#undef SO_BSDCOMPAT' >> config.h
+
+ if use nslint; then
+ cd $NSLINT_DIR
+ econf
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use nslint; then
+ emake -C $NSLINT_DIR CCOPT="${CFLAGS}"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use nslint; then
+ cd $NSLINT_DIR
+ dobin nslint
+ doman nslint.8
+ cd "${S}"
+ fi
+
+ dodoc CHANGES FAQ README
+
+ if use idn; then
+ dodoc contrib/idn/README.idnkit
+ fi
+
+ if use doc; then
+ dodoc doc/arm/Bv9ARM.pdf
+
+ docinto misc
+ dodoc doc/misc/*
+
+ # might a 'html' useflag make sense?
+ docinto html
+ dohtml -r doc/arm/*
+
+ docinto contrib
+ dodoc contrib/scripts/{nanny.pl,named-bootconf.sh}
+
+ # some handy-dandy dynamic dns examples
+ pushd "${D}"/usr/share/doc/${PF} 1>/dev/null
+ tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
+ popd 1>/dev/null
+ fi
+
+ insinto /etc/bind
+ newins "${FILESDIR}"/named.conf-r8 named.conf
+
+ # ftp://ftp.rs.internic.net/domain/named.cache:
+ insinto /var/bind
+ newins "${FILESDIR}"/named.cache-r3 named.cache
+
+ insinto /var/bind/pri
+ newins "${FILESDIR}"/localhost.zone-r3 localhost.zone
+
+ newinitd "${FILESDIR}"/named.init-r13 named
+ newconfd "${FILESDIR}"/named.confd-r7 named
+
+ if use gost; then
+ sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die
+ else
+ sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die
+ fi
+
+ newenvd "${FILESDIR}"/10bind.env 10bind
+
+ # Let's get rid of those tools and their manpages since they're provided by bind-tools
+ rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1*
+ rm -f "${D}"/usr/share/man/man8/nsupdate.8*
+ rm -f "${D}"/usr/bin/{dig,host,nslookup,nsupdate}
+ rm -f "${D}"/usr/sbin/{dig,host,nslookup,nsupdate}
+ for tool in dsfromkey importkey keyfromlabel keygen \
+ revoke settime signzone verify; do
+ rm -f "${D}"/usr/{,s}bin/dnssec-"${tool}"
+ rm -f "${D}"/usr/share/man/man8/dnssec-"${tool}".8*
+ done
+
+ # bug 405251, library archives aren't properly handled by --enable/disable-static
+ if ! use static-libs; then
+ find "${D}" -type f -name '*.a' -delete || die
+ fi
+
+ # bug 405251
+ find "${D}" -type f -name '*.la' -delete || die
+
+ if use python; then
+ install_python_tools() {
+ dosbin bin/python/dnssec-{checkds,coverage}
+ }
+ python_foreach_impl install_python_tools
+
+ python_replicate_script "${D}usr/sbin/dnssec-checkds"
+ python_replicate_script "${D}usr/sbin/dnssec-coverage"
+ fi
+
+ # 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
+ keepdir /var/bind/{pri,sec,dyn}
+
+ dodir /var/log/named
+
+ fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn}
+ fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
+ fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
+ fperms 0750 /etc/bind /var/bind/pri
+ fperms 0770 /var/log/named /var/bind/{,sec,dyn}
+
+ systemd_newunit "${FILESDIR}/named.service-r1" named.service
+ systemd_dotmpfilesd "${FILESDIR}"/named.conf
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/generate-rndc-key.sh"
+}
+
+pkg_postinst() {
+ if [ ! -f '/etc/bind/rndc.key' ]; then
+ if use urandom; then
+ einfo "Using /dev/urandom for generating rndc.key"
+ /usr/sbin/rndc-confgen -r /dev/urandom -a
+ echo
+ else
+ einfo "Using /dev/random for generating rndc.key"
+ /usr/sbin/rndc-confgen -a
+ echo
+ fi
+ chown root:named /etc/bind/rndc.key
+ chmod 0640 /etc/bind/rndc.key
+ fi
+
+ einfo
+ einfo "You can edit /etc/conf.d/named to customize named settings"
+ einfo
+ use mysql || use postgres || use ldap && {
+ elog "If your named depends on MySQL/PostgreSQL or LDAP,"
+ elog "uncomment the specified rc_named_* lines in your"
+ elog "/etc/conf.d/named config to ensure they'll start before bind"
+ einfo
+ }
+ einfo "If you'd like to run bind in a chroot AND this is a new"
+ einfo "install OR your bind doesn't already run in a chroot:"
+ einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named."
+ einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`"
+ einfo
+
+ CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT})
+ if [[ -n ${CHROOT} ]]; then
+ elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
+ elog "To enable the old behaviour (without using mount) uncomment the"
+ elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
+ elog "If you decide to use the new/default method, ensure to make backup"
+ elog "first and merge your existing configs/zones to /etc/bind and"
+ elog "/var/bind because bind will now mount the needed directories into"
+ elog "the chroot dir."
+ fi
+}
+
+pkg_config() {
+ CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
+ CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
+ CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP})
+
+ if [[ -z "${CHROOT}" ]]; then
+ eerror "This config script is designed to automate setting up"
+ eerror "a chrooted bind/named. To do so, please first uncomment"
+ eerror "and set the CHROOT variable in '/etc/conf.d/named'."
+ die "Unset CHROOT"
+ fi
+ if [[ -d "${CHROOT}" ]]; then
+ ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
+ ewarn "To enable the old behaviour (without using mount) uncomment the"
+ ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
+ ewarn
+ ewarn "${CHROOT} already exists... some things might become overridden"
+ ewarn "press CTRL+C if you don't want to continue"
+ sleep 10
+ fi
+
+ echo; einfo "Setting up the chroot directory..."
+
+ mkdir -m 0750 -p ${CHROOT}
+ mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run}
+ mkdir -m 0750 -p ${CHROOT}/etc/bind
+ mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/
+ # As of bind 9.8.0
+ if has_version net-dns/bind[gost]; then
+ if [ "$(get_libdir)" = "lib64" ]; then
+ mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines
+ ln -s lib64 ${CHROOT}/usr/lib
+ else
+ mkdir -m 0755 -p ${CHROOT}/usr/lib/engines
+ fi
+ fi
+ chown root:named ${CHROOT} ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ ${CHROOT}/etc/bind
+
+ mknod ${CHROOT}/dev/null c 1 3
+ chmod 0666 ${CHROOT}/dev/null
+
+ mknod ${CHROOT}/dev/zero c 1 5
+ chmod 0666 ${CHROOT}/dev/zero
+
+ if use urandom; then
+ mknod ${CHROOT}/dev/urandom c 1 9
+ chmod 0666 ${CHROOT}/dev/urandom
+ else
+ mknod ${CHROOT}/dev/random c 1 8
+ chmod 0666 ${CHROOT}/dev/random
+ fi
+
+ if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
+ cp -a /etc/bind ${CHROOT}/etc/
+ cp -a /var/bind ${CHROOT}/var/
+ fi
+
+ if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
+ mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP
+ fi
+
+ elog "You may need to add the following line to your syslog-ng.conf:"
+ elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
+}
diff --git a/net-dns/bind/bind-9.11.1_p3.ebuild b/net-dns/bind/bind-9.11.1_p3.ebuild
new file mode 100644
index 000000000000..dae4b60bd0f8
--- /dev/null
+++ b/net-dns/bind/bind-9.11.1_p3.ebuild
@@ -0,0 +1,426 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re dlz/mysql and threads, needs to be verified..
+# MySQL uses thread local storage in its C api. Thus MySQL
+# requires that each thread of an application execute a MySQL
+# thread initialization to setup the thread local storage.
+# This is impossible to do safely while staying within the DLZ
+# driver API. This is a limitation caused by MySQL, and not the DLZ API.
+# Because of this BIND MUST only run with a single thread when
+# using the MySQL driver.
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd
+
+MY_PV="${PV/_p/-P}"
+MY_PV="${MY_PV/_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+
+SDB_LDAP_VER="1.1.0-fc14"
+
+RRL_PV="${MY_PV}"
+
+NSLINT_DIR="contrib/nslint-3.0a2/"
+
+# SDB-LDAP: http://bind9-ldap.bayour.com/
+
+DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server"
+HOMEPAGE="http://www.isc.org/software/bind"
+SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz
+ doc? ( mirror://gentoo/dyndns-samples.tbz2 )"
+# sdb-ldap? (
+# http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2
+# )"
+
+LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~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 filter-aaaa fixed-rrset geoip gost gssapi idn ipv6
+json ldap libressl lmdb mysql nslint odbc postgres python rpz seccomp selinux ssl static-libs
++threads urandom xml +zlib"
+# sdb-ldap - patch broken
+# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
+
+REQUIRED_USE="postgres? ( dlz )
+ berkdb? ( dlz )
+ mysql? ( dlz !threads )
+ odbc? ( dlz )
+ ldap? ( dlz )
+ gost? ( !libressl ssl )
+ threads? ( caps )
+ dnstap? ( threads )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+# sdb-ldap? ( dlz )
+
+DEPEND="
+ ssl? (
+ !libressl? ( dev-libs/openssl:0[-bindist] )
+ libressl? ( dev-libs/libressl )
+ )
+ mysql? ( >=virtual/mysql-4.0 )
+ odbc? ( >=dev-db/unixODBC-2.2.6 )
+ ldap? ( net-nds/openldap )
+ idn? ( net-dns/idnkit )
+ postgres? ( dev-db/postgresql:= )
+ caps? ( >=sys-libs/libcap-2.1.0 )
+ xml? ( dev-libs/libxml2 )
+ geoip? ( >=dev-libs/geoip-1.4.6 )
+ gssapi? ( virtual/krb5 )
+ gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
+ seccomp? ( sys-libs/libseccomp )
+ json? ( dev-libs/json-c )
+ lmdb? ( dev-db/lmdb )
+ zlib? ( sys-libs/zlib )
+ dnstap? ( dev-libs/fstrm dev-libs/protobuf-c )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/ply[${PYTHON_USEDEP}]
+ )"
+# sdb-ldap? ( net-nds/openldap )
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-bind )
+ || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )"
+
+S="${WORKDIR}/${MY_P}"
+
+# bug 479092, requires networking
+RESTRICT="test"
+
+pkg_setup() {
+ ebegin "Creating named group and user"
+ enewgroup named 40
+ enewuser named 40 -1 /etc/bind named
+ eend ${?}
+}
+
+src_prepare() {
+ # bug 600212
+ epatch "${FILESDIR}"/${PN}-9.11.0_p5-dyndb-dlopen.patch
+
+ # Adjusting PATHs in manpages
+ for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do
+ sed -i \
+ -e 's:/etc/named.conf:/etc/bind/named.conf:g' \
+ -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
+ -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
+ "${i}" || die "sed failed, ${i} doesn't exist"
+ done
+
+# if use dlz; then
+# # sdb-ldap patch as per bug #160567
+# # Upstream URL: http://bind9-ldap.bayour.com/
+# # New patch take from bug 302735
+# if use sdb-ldap; then
+# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch
+# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/
+# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/
+# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/
+# fi
+# fi
+
+ # should be installed by bind-tools
+ sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die
+
+ # Disable tests for now, bug 406399
+ sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
+
+ if use nslint; then
+ sed -i -e 's:/etc/named.conf:/etc/bind/named.conf:' ${NSLINT_DIR}/nslint.{c,8} || die
+ fi
+
+ # bug #220361
+ rm aclocal.m4
+ rm -rf libtool.m4/
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=""
+
+ if use urandom; then
+ myconf="${myconf} --with-randomdev=/dev/urandom"
+ else
+ myconf="${myconf} --with-randomdev=/dev/random"
+ fi
+
+ use geoip && myconf="${myconf} --with-geoip"
+
+ # bug #158664
+# gcc-specs-ssp && replace-flags -O[23s] -O
+
+ # To include db.h from proper path
+ use berkdb && append-flags "-I$(db_includedir)"
+
+ export BUILD_CC=$(tc-getBUILD_CC)
+ econf \
+ --sysconfdir=/etc/bind \
+ --localstatedir=/var \
+ --with-libtool \
+ --enable-full-report \
+ --without-readline \
+ $(use_enable caps linux-caps) \
+ $(use_enable filter-aaaa) \
+ $(use_enable fixed-rrset) \
+ $(use_enable ipv6) \
+ $(use_enable rpz rpz-nsdname) \
+ $(use_enable rpz rpz-nsip) \
+ $(use_enable seccomp) \
+ $(use_enable threads) \
+ $(use_with berkdb dlz-bdb) \
+ $(use_with dlz dlopen) \
+ $(use_with dlz dlz-filesystem) \
+ $(use_with dlz dlz-stub) \
+ $(use_with gost) \
+ $(use_with gssapi) \
+ $(use_with idn) \
+ $(use_with json libjson) \
+ $(use_with ldap dlz-ldap) \
+ $(use_with mysql dlz-mysql) \
+ $(use_with odbc dlz-odbc) \
+ $(use_with postgres dlz-postgres) \
+ $(use_with lmdb) \
+ $(use_with python) \
+ $(use_with ssl ecdsa) \
+ $(use_with ssl openssl "${EPREFIX}"/usr) \
+ $(use_with xml libxml2) \
+ $(use_with zlib) \
+ ${myconf}
+
+ # $(use_enable static-libs static) \
+
+ # bug #151839
+ echo '#undef SO_BSDCOMPAT' >> config.h
+
+ if use nslint; then
+ cd $NSLINT_DIR
+ econf
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use nslint; then
+ emake -C $NSLINT_DIR CCOPT="${CFLAGS}"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use nslint; then
+ cd $NSLINT_DIR
+ dobin nslint
+ doman nslint.8
+ cd "${S}"
+ fi
+
+ dodoc CHANGES FAQ README
+
+ if use idn; then
+ dodoc contrib/idn/README.idnkit
+ fi
+
+ if use doc; then
+ dodoc doc/arm/Bv9ARM.pdf
+
+ docinto misc
+ dodoc doc/misc/*
+
+ # might a 'html' useflag make sense?
+ docinto html
+ dohtml -r doc/arm/*
+
+ docinto contrib
+ dodoc contrib/scripts/{nanny.pl,named-bootconf.sh}
+
+ # some handy-dandy dynamic dns examples
+ pushd "${D}"/usr/share/doc/${PF} 1>/dev/null
+ tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
+ popd 1>/dev/null
+ fi
+
+ insinto /etc/bind
+ newins "${FILESDIR}"/named.conf-r8 named.conf
+
+ # ftp://ftp.rs.internic.net/domain/named.cache:
+ insinto /var/bind
+ newins "${FILESDIR}"/named.cache-r3 named.cache
+
+ insinto /var/bind/pri
+ newins "${FILESDIR}"/localhost.zone-r3 localhost.zone
+
+ newinitd "${FILESDIR}"/named.init-r13 named
+ newconfd "${FILESDIR}"/named.confd-r7 named
+
+ if use gost; then
+ sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die
+ else
+ sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die
+ fi
+
+ newenvd "${FILESDIR}"/10bind.env 10bind
+
+ # Let's get rid of those tools and their manpages since they're provided by bind-tools
+ rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1*
+ rm -f "${D}"/usr/share/man/man8/nsupdate.8*
+ rm -f "${D}"/usr/bin/{dig,host,nslookup,nsupdate}
+ rm -f "${D}"/usr/sbin/{dig,host,nslookup,nsupdate}
+ for tool in dsfromkey importkey keyfromlabel keygen \
+ revoke settime signzone verify; do
+ rm -f "${D}"/usr/{,s}bin/dnssec-"${tool}"
+ rm -f "${D}"/usr/share/man/man8/dnssec-"${tool}".8*
+ done
+
+ # bug 405251, library archives aren't properly handled by --enable/disable-static
+ if ! use static-libs; then
+ find "${D}" -type f -name '*.a' -delete || die
+ fi
+
+ # bug 405251
+ find "${D}" -type f -name '*.la' -delete || die
+
+ if use python; then
+ install_python_tools() {
+ dosbin bin/python/dnssec-{checkds,coverage}
+ }
+ python_foreach_impl install_python_tools
+
+ python_replicate_script "${D}usr/sbin/dnssec-checkds"
+ python_replicate_script "${D}usr/sbin/dnssec-coverage"
+ fi
+
+ # 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
+ keepdir /var/bind/{pri,sec,dyn}
+
+ dodir /var/log/named
+
+ fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn}
+ fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
+ fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
+ fperms 0750 /etc/bind /var/bind/pri
+ fperms 0770 /var/log/named /var/bind/{,sec,dyn}
+
+ systemd_newunit "${FILESDIR}/named.service-r1" named.service
+ systemd_dotmpfilesd "${FILESDIR}"/named.conf
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/generate-rndc-key.sh"
+}
+
+pkg_postinst() {
+ if [ ! -f '/etc/bind/rndc.key' ]; then
+ if use urandom; then
+ einfo "Using /dev/urandom for generating rndc.key"
+ /usr/sbin/rndc-confgen -r /dev/urandom -a
+ echo
+ else
+ einfo "Using /dev/random for generating rndc.key"
+ /usr/sbin/rndc-confgen -a
+ echo
+ fi
+ chown root:named /etc/bind/rndc.key
+ chmod 0640 /etc/bind/rndc.key
+ fi
+
+ einfo
+ einfo "You can edit /etc/conf.d/named to customize named settings"
+ einfo
+ use mysql || use postgres || use ldap && {
+ elog "If your named depends on MySQL/PostgreSQL or LDAP,"
+ elog "uncomment the specified rc_named_* lines in your"
+ elog "/etc/conf.d/named config to ensure they'll start before bind"
+ einfo
+ }
+ einfo "If you'd like to run bind in a chroot AND this is a new"
+ einfo "install OR your bind doesn't already run in a chroot:"
+ einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named."
+ einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`"
+ einfo
+
+ CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT})
+ if [[ -n ${CHROOT} ]]; then
+ elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
+ elog "To enable the old behaviour (without using mount) uncomment the"
+ elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
+ elog "If you decide to use the new/default method, ensure to make backup"
+ elog "first and merge your existing configs/zones to /etc/bind and"
+ elog "/var/bind because bind will now mount the needed directories into"
+ elog "the chroot dir."
+ fi
+}
+
+pkg_config() {
+ CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
+ CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
+ CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP})
+
+ if [[ -z "${CHROOT}" ]]; then
+ eerror "This config script is designed to automate setting up"
+ eerror "a chrooted bind/named. To do so, please first uncomment"
+ eerror "and set the CHROOT variable in '/etc/conf.d/named'."
+ die "Unset CHROOT"
+ fi
+ if [[ -d "${CHROOT}" ]]; then
+ ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
+ ewarn "To enable the old behaviour (without using mount) uncomment the"
+ ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
+ ewarn
+ ewarn "${CHROOT} already exists... some things might become overridden"
+ ewarn "press CTRL+C if you don't want to continue"
+ sleep 10
+ fi
+
+ echo; einfo "Setting up the chroot directory..."
+
+ mkdir -m 0750 -p ${CHROOT}
+ mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run}
+ mkdir -m 0750 -p ${CHROOT}/etc/bind
+ mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/
+ # As of bind 9.8.0
+ if has_version net-dns/bind[gost]; then
+ if [ "$(get_libdir)" = "lib64" ]; then
+ mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines
+ ln -s lib64 ${CHROOT}/usr/lib
+ else
+ mkdir -m 0755 -p ${CHROOT}/usr/lib/engines
+ fi
+ fi
+ chown root:named ${CHROOT} ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ ${CHROOT}/etc/bind
+
+ mknod ${CHROOT}/dev/null c 1 3
+ chmod 0666 ${CHROOT}/dev/null
+
+ mknod ${CHROOT}/dev/zero c 1 5
+ chmod 0666 ${CHROOT}/dev/zero
+
+ if use urandom; then
+ mknod ${CHROOT}/dev/urandom c 1 9
+ chmod 0666 ${CHROOT}/dev/urandom
+ else
+ mknod ${CHROOT}/dev/random c 1 8
+ chmod 0666 ${CHROOT}/dev/random
+ fi
+
+ if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
+ cp -a /etc/bind ${CHROOT}/etc/
+ cp -a /var/bind ${CHROOT}/var/
+ fi
+
+ if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
+ mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP
+ fi
+
+ elog "You may need to add the following line to your syslog-ng.conf:"
+ elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
+}
diff --git a/net-dns/bind/bind-9.11.2.ebuild b/net-dns/bind/bind-9.11.2.ebuild
new file mode 100644
index 000000000000..f7482be23e5b
--- /dev/null
+++ b/net-dns/bind/bind-9.11.2.ebuild
@@ -0,0 +1,423 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re dlz/mysql and threads, needs to be verified..
+# MySQL uses thread local storage in its C api. Thus MySQL
+# requires that each thread of an application execute a MySQL
+# thread initialization to setup the thread local storage.
+# This is impossible to do safely while staying within the DLZ
+# driver API. This is a limitation caused by MySQL, and not the DLZ API.
+# Because of this BIND MUST only run with a single thread when
+# using the MySQL driver.
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd
+
+MY_PV="${PV/_p/-P}"
+MY_PV="${MY_PV/_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+
+SDB_LDAP_VER="1.1.0-fc14"
+
+RRL_PV="${MY_PV}"
+
+NSLINT_DIR="contrib/nslint-3.0a2/"
+
+# SDB-LDAP: http://bind9-ldap.bayour.com/
+
+DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server"
+HOMEPAGE="http://www.isc.org/software/bind"
+SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz
+ doc? ( mirror://gentoo/dyndns-samples.tbz2 )"
+# sdb-ldap? (
+# http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2
+# )"
+
+LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~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 filter-aaaa fixed-rrset geoip gost gssapi idn ipv6
+json ldap libressl lmdb mysql nslint odbc postgres python rpz seccomp selinux ssl static-libs
++threads urandom xml +zlib"
+# sdb-ldap - patch broken
+# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
+
+REQUIRED_USE="postgres? ( dlz )
+ berkdb? ( dlz )
+ mysql? ( dlz !threads )
+ odbc? ( dlz )
+ ldap? ( dlz )
+ gost? ( !libressl ssl )
+ threads? ( caps )
+ dnstap? ( threads )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+# sdb-ldap? ( dlz )
+
+DEPEND="
+ ssl? (
+ !libressl? ( dev-libs/openssl:0[-bindist] )
+ libressl? ( dev-libs/libressl )
+ )
+ mysql? ( >=virtual/mysql-4.0 )
+ odbc? ( >=dev-db/unixODBC-2.2.6 )
+ ldap? ( net-nds/openldap )
+ idn? ( net-dns/idnkit )
+ postgres? ( dev-db/postgresql:= )
+ caps? ( >=sys-libs/libcap-2.1.0 )
+ xml? ( dev-libs/libxml2 )
+ geoip? ( >=dev-libs/geoip-1.4.6 )
+ gssapi? ( virtual/krb5 )
+ gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
+ seccomp? ( sys-libs/libseccomp )
+ json? ( dev-libs/json-c )
+ lmdb? ( dev-db/lmdb )
+ zlib? ( sys-libs/zlib )
+ dnstap? ( dev-libs/fstrm dev-libs/protobuf-c )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/ply[${PYTHON_USEDEP}]
+ )"
+# sdb-ldap? ( net-nds/openldap )
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-bind )
+ || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )"
+
+S="${WORKDIR}/${MY_P}"
+
+# bug 479092, requires networking
+RESTRICT="test"
+
+pkg_setup() {
+ ebegin "Creating named group and user"
+ enewgroup named 40
+ enewuser named 40 -1 /etc/bind named
+ eend ${?}
+}
+
+src_prepare() {
+ # Adjusting PATHs in manpages
+ for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do
+ sed -i \
+ -e 's:/etc/named.conf:/etc/bind/named.conf:g' \
+ -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
+ -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
+ "${i}" || die "sed failed, ${i} doesn't exist"
+ done
+
+# if use dlz; then
+# # sdb-ldap patch as per bug #160567
+# # Upstream URL: http://bind9-ldap.bayour.com/
+# # New patch take from bug 302735
+# if use sdb-ldap; then
+# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch
+# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/
+# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/
+# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/
+# fi
+# fi
+
+ # should be installed by bind-tools
+ sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die
+
+ # Disable tests for now, bug 406399
+ sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
+
+ if use nslint; then
+ sed -i -e 's:/etc/named.conf:/etc/bind/named.conf:' ${NSLINT_DIR}/nslint.{c,8} || die
+ fi
+
+ # bug #220361
+ rm aclocal.m4
+ rm -rf libtool.m4/
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=""
+
+ if use urandom; then
+ myconf="${myconf} --with-randomdev=/dev/urandom"
+ else
+ myconf="${myconf} --with-randomdev=/dev/random"
+ fi
+
+ use geoip && myconf="${myconf} --with-geoip"
+
+ # bug #158664
+# gcc-specs-ssp && replace-flags -O[23s] -O
+
+ # To include db.h from proper path
+ use berkdb && append-flags "-I$(db_includedir)"
+
+ export BUILD_CC=$(tc-getBUILD_CC)
+ econf \
+ --sysconfdir=/etc/bind \
+ --localstatedir=/var \
+ --with-libtool \
+ --enable-full-report \
+ --without-readline \
+ $(use_enable caps linux-caps) \
+ $(use_enable filter-aaaa) \
+ $(use_enable fixed-rrset) \
+ $(use_enable ipv6) \
+ $(use_enable rpz rpz-nsdname) \
+ $(use_enable rpz rpz-nsip) \
+ $(use_enable seccomp) \
+ $(use_enable threads) \
+ $(use_with berkdb dlz-bdb) \
+ $(use_with dlz dlopen) \
+ $(use_with dlz dlz-filesystem) \
+ $(use_with dlz dlz-stub) \
+ $(use_with gost) \
+ $(use_with gssapi) \
+ $(use_with idn) \
+ $(use_with json libjson) \
+ $(use_with ldap dlz-ldap) \
+ $(use_with mysql dlz-mysql) \
+ $(use_with odbc dlz-odbc) \
+ $(use_with postgres dlz-postgres) \
+ $(use_with lmdb) \
+ $(use_with python) \
+ $(use_with ssl ecdsa) \
+ $(use_with ssl openssl "${EPREFIX}"/usr) \
+ $(use_with xml libxml2) \
+ $(use_with zlib) \
+ ${myconf}
+
+ # $(use_enable static-libs static) \
+
+ # bug #151839
+ echo '#undef SO_BSDCOMPAT' >> config.h
+
+ if use nslint; then
+ cd $NSLINT_DIR
+ econf
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use nslint; then
+ emake -C $NSLINT_DIR CCOPT="${CFLAGS}"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use nslint; then
+ cd $NSLINT_DIR
+ dobin nslint
+ doman nslint.8
+ cd "${S}"
+ fi
+
+ dodoc CHANGES README
+
+ if use idn; then
+ dodoc contrib/idn/README.idnkit
+ fi
+
+ if use doc; then
+ dodoc doc/arm/Bv9ARM.pdf
+
+ docinto misc
+ dodoc doc/misc/*
+
+ # might a 'html' useflag make sense?
+ docinto html
+ dohtml -r doc/arm/*
+
+ docinto contrib
+ dodoc contrib/scripts/{nanny.pl,named-bootconf.sh}
+
+ # some handy-dandy dynamic dns examples
+ pushd "${D}"/usr/share/doc/${PF} 1>/dev/null
+ tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die
+ popd 1>/dev/null
+ fi
+
+ insinto /etc/bind
+ newins "${FILESDIR}"/named.conf-r8 named.conf
+
+ # ftp://ftp.rs.internic.net/domain/named.cache:
+ insinto /var/bind
+ newins "${FILESDIR}"/named.cache-r3 named.cache
+
+ insinto /var/bind/pri
+ newins "${FILESDIR}"/localhost.zone-r3 localhost.zone
+
+ newinitd "${FILESDIR}"/named.init-r13 named
+ newconfd "${FILESDIR}"/named.confd-r7 named
+
+ if use gost; then
+ sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die
+ else
+ sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die
+ fi
+
+ newenvd "${FILESDIR}"/10bind.env 10bind
+
+ # Let's get rid of those tools and their manpages since they're provided by bind-tools
+ rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1*
+ rm -f "${D}"/usr/share/man/man8/nsupdate.8*
+ rm -f "${D}"/usr/bin/{dig,host,nslookup,nsupdate}
+ rm -f "${D}"/usr/sbin/{dig,host,nslookup,nsupdate}
+ for tool in dsfromkey importkey keyfromlabel keygen \
+ revoke settime signzone verify; do
+ rm -f "${D}"/usr/{,s}bin/dnssec-"${tool}"
+ rm -f "${D}"/usr/share/man/man8/dnssec-"${tool}".8*
+ done
+
+ # bug 405251, library archives aren't properly handled by --enable/disable-static
+ if ! use static-libs; then
+ find "${D}" -type f -name '*.a' -delete || die
+ fi
+
+ # bug 405251
+ find "${D}" -type f -name '*.la' -delete || die
+
+ if use python; then
+ install_python_tools() {
+ dosbin bin/python/dnssec-{checkds,coverage}
+ }
+ python_foreach_impl install_python_tools
+
+ python_replicate_script "${D}usr/sbin/dnssec-checkds"
+ python_replicate_script "${D}usr/sbin/dnssec-coverage"
+ fi
+
+ # 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
+ keepdir /var/bind/{pri,sec,dyn}
+
+ dodir /var/log/named
+
+ fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn}
+ fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
+ fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf}
+ fperms 0750 /etc/bind /var/bind/pri
+ fperms 0770 /var/log/named /var/bind/{,sec,dyn}
+
+ systemd_newunit "${FILESDIR}/named.service-r1" named.service
+ systemd_dotmpfilesd "${FILESDIR}"/named.conf
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/generate-rndc-key.sh"
+}
+
+pkg_postinst() {
+ if [ ! -f '/etc/bind/rndc.key' ]; then
+ if use urandom; then
+ einfo "Using /dev/urandom for generating rndc.key"
+ /usr/sbin/rndc-confgen -r /dev/urandom -a
+ echo
+ else
+ einfo "Using /dev/random for generating rndc.key"
+ /usr/sbin/rndc-confgen -a
+ echo
+ fi
+ chown root:named /etc/bind/rndc.key
+ chmod 0640 /etc/bind/rndc.key
+ fi
+
+ einfo
+ einfo "You can edit /etc/conf.d/named to customize named settings"
+ einfo
+ use mysql || use postgres || use ldap && {
+ elog "If your named depends on MySQL/PostgreSQL or LDAP,"
+ elog "uncomment the specified rc_named_* lines in your"
+ elog "/etc/conf.d/named config to ensure they'll start before bind"
+ einfo
+ }
+ einfo "If you'd like to run bind in a chroot AND this is a new"
+ einfo "install OR your bind doesn't already run in a chroot:"
+ einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named."
+ einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`"
+ einfo
+
+ CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT})
+ if [[ -n ${CHROOT} ]]; then
+ elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
+ elog "To enable the old behaviour (without using mount) uncomment the"
+ elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
+ elog "If you decide to use the new/default method, ensure to make backup"
+ elog "first and merge your existing configs/zones to /etc/bind and"
+ elog "/var/bind because bind will now mount the needed directories into"
+ elog "the chroot dir."
+ fi
+}
+
+pkg_config() {
+ CHROOT=$(source /etc/conf.d/named; echo ${CHROOT})
+ CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT})
+ CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP})
+
+ if [[ -z "${CHROOT}" ]]; then
+ eerror "This config script is designed to automate setting up"
+ eerror "a chrooted bind/named. To do so, please first uncomment"
+ eerror "and set the CHROOT variable in '/etc/conf.d/named'."
+ die "Unset CHROOT"
+ fi
+ if [[ -d "${CHROOT}" ]]; then
+ ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!"
+ ewarn "To enable the old behaviour (without using mount) uncomment the"
+ ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config."
+ ewarn
+ ewarn "${CHROOT} already exists... some things might become overridden"
+ ewarn "press CTRL+C if you don't want to continue"
+ sleep 10
+ fi
+
+ echo; einfo "Setting up the chroot directory..."
+
+ mkdir -m 0750 -p ${CHROOT}
+ mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run}
+ mkdir -m 0750 -p ${CHROOT}/etc/bind
+ mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/
+ # As of bind 9.8.0
+ if has_version net-dns/bind[gost]; then
+ if [ "$(get_libdir)" = "lib64" ]; then
+ mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines
+ ln -s lib64 ${CHROOT}/usr/lib
+ else
+ mkdir -m 0755 -p ${CHROOT}/usr/lib/engines
+ fi
+ fi
+ chown root:named ${CHROOT} ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ ${CHROOT}/etc/bind
+
+ mknod ${CHROOT}/dev/null c 1 3
+ chmod 0666 ${CHROOT}/dev/null
+
+ mknod ${CHROOT}/dev/zero c 1 5
+ chmod 0666 ${CHROOT}/dev/zero
+
+ if use urandom; then
+ mknod ${CHROOT}/dev/urandom c 1 9
+ chmod 0666 ${CHROOT}/dev/urandom
+ else
+ mknod ${CHROOT}/dev/random c 1 8
+ chmod 0666 ${CHROOT}/dev/random
+ fi
+
+ if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then
+ cp -a /etc/bind ${CHROOT}/etc/
+ cp -a /var/bind ${CHROOT}/var/
+ fi
+
+ if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
+ mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP
+ fi
+
+ elog "You may need to add the following line to your syslog-ng.conf:"
+ elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };"
+}
diff --git a/net-dns/bind/files/10bind.env b/net-dns/bind/files/10bind.env
new file mode 100644
index 000000000000..13c7910b2c61
--- /dev/null
+++ b/net-dns/bind/files/10bind.env
@@ -0,0 +1 @@
+CONFIG_PROTECT="/var/bind"
diff --git a/net-dns/bind/files/bind-9.11.0_p5-dyndb-dlopen.patch b/net-dns/bind/files/bind-9.11.0_p5-dyndb-dlopen.patch
new file mode 100644
index 000000000000..5fc8f3c18897
--- /dev/null
+++ b/net-dns/bind/files/bind-9.11.0_p5-dyndb-dlopen.patch
@@ -0,0 +1,97 @@
+From ae903759c205f8a5039458d780c0e0c4442b7291 Mon Sep 17 00:00:00 2001
+From: Mark Andrews <marka@isc.org>
+Date: Tue, 30 May 2017 11:31:34 +1000
+Subject: [PATCH] 4530. [bug] "dyndb" is dependent on dlopen
+ existing / being enabled. [RT #45291]
+
+From aa3a8979bc7eb1596d044eff572b3c35310584fa Mon Sep 17 00:00:00 2001
+From: Mark Andrews <marka@isc.org>
+Date: Tue, 30 May 2017 11:34:37 +1000
+Subject: [PATCH] 4530. [bug] "dyndb" is dependent on dlopen
+ existing / being enabled. [RT #45291]
+
+diff --git a/lib/dns/dyndb.c b/lib/dns/dyndb.c
+index a477508..dec68a7 100644
+--- a/lib/dns/dyndb.c
++++ b/lib/dns/dyndb.c
+@@ -80,7 +80,7 @@ impfind(const char *name) {
+ return (NULL);
+ }
+
+-#if HAVE_DLFCN_H
++#if HAVE_DLFCN_H && HAVE_DLOPEN
+ static isc_result_t
+ load_symbol(void *handle, const char *filename,
+ const char *symbol_name, void **symbolp)
+--- a/bin/named/server.c
++++ b/bin/named/server.c
+@@ -1496,6 +1496,7 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
+ return (result);
+ }
+
++#ifdef HAVE_DLOPEN
+ static isc_result_t
+ configure_dyndb(const cfg_obj_t *dyndb, isc_mem_t *mctx,
+ const dns_dyndbctx_t *dctx)
+@@ -1521,6 +1522,7 @@ configure_dyndb(const cfg_obj_t *dyndb, isc_mem_t *mctx,
+ name, isc_result_totext(result));
+ return (result);
+ }
++#endif
+
+
+ static isc_result_t
+@@ -4669,6 +4671,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
+ else
+ (void)cfg_map_get(config, "dyndb", &dyndb_list);
+
++#ifdef HAVE_DLOPEN
+ for (element = cfg_list_first(dyndb_list);
+ element != NULL;
+ element = cfg_list_next(element))
+@@ -4686,6 +4689,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
+
+ CHECK(configure_dyndb(dyndb, mctx, dctx));
+ }
++#endif
+
+ /*
+ * Setup automatic empty zones. If recursion is off then
+diff --git a/lib/bind9/check.c b/lib/bind9/check.c
+index 097dd96..99b995c 100644
+--- a/lib/bind9/check.c
++++ b/lib/bind9/check.c
+@@ -2988,6 +2988,9 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
+ {
+ const cfg_obj_t *zones = NULL;
+ const cfg_obj_t *keys = NULL;
++#ifndef HAVE_DLOPEN
++ const cfg_obj_t *dyndb = NULL;
++#endif
+ const cfg_listelt_t *element, *element2;
+ isc_symtab_t *symtab = NULL;
+ isc_result_t result = ISC_R_SUCCESS;
+@@ -3041,6 +3044,20 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
+ result = ISC_R_FAILURE;
+ }
+
++#ifndef HAVE_DLOPEN
++ if (voptions != NULL)
++ (void)cfg_map_get(voptions, "dyndb", &dyndb);
++ else
++ (void)cfg_map_get(config, "dyndb", &dyndb);
++
++ if (dyndb != NULL) {
++ cfg_obj_log(dyndb, logctx, ISC_LOG_ERROR,
++ "dynamic loading of databases is not supported");
++ if (tresult != ISC_R_SUCCESS)
++ result = ISC_R_NOTIMPLEMENTED;
++ }
++#endif
++
+ /*
+ * Check that the response-policy and catalog-zones options
+ * refer to zones that exist.
+--
+2.9.0
+
diff --git a/net-dns/bind/files/generate-rndc-key.sh b/net-dns/bind/files/generate-rndc-key.sh
new file mode 100644
index 000000000000..8314d77cd68c
--- /dev/null
+++ b/net-dns/bind/files/generate-rndc-key.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+if [ ! -s /etc/bind/rndc.key ]; then
+ /usr/sbin/rndc-confgen -a > /dev/null 2>&1 || exit 1
+ chmod 640 /etc/bind/rndc.key
+ chown root.named /etc/bind/rndc.key
+fi
diff --git a/net-dns/bind/files/localhost.zone-r3 b/net-dns/bind/files/localhost.zone-r3
new file mode 100644
index 000000000000..2e7a5912b972
--- /dev/null
+++ b/net-dns/bind/files/localhost.zone-r3
@@ -0,0 +1,11 @@
+$TTL 1W
+@ IN SOA localhost. root.localhost. (
+ 2008122601 ; Serial
+ 28800 ; Refresh
+ 14400 ; Retry
+ 604800 ; Expire - 1 week
+ 86400 ) ; Minimum
+@ IN NS localhost.
+@ IN A 127.0.0.1
+
+@ IN AAAA ::1
diff --git a/net-dns/bind/files/named.cache-r3 b/net-dns/bind/files/named.cache-r3
new file mode 100644
index 000000000000..198d1b39b9b1
--- /dev/null
+++ b/net-dns/bind/files/named.cache-r3
@@ -0,0 +1,92 @@
+; This file holds the information on root name servers needed to
+; initialize cache of Internet domain name servers
+; (e.g. reference this file in the "cache . <file>"
+; configuration file of BIND domain name servers).
+;
+; This file is made available by InterNIC
+; under anonymous FTP as
+; file /domain/named.cache
+; on server FTP.INTERNIC.NET
+; -OR- RS.INTERNIC.NET
+;
+; last update: August 29, 2017
+; related version of root zone: 2017082901
+;
+; FORMERLY NS.INTERNIC.NET
+;
+. 3600000 NS A.ROOT-SERVERS.NET.
+A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
+A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:ba3e::2:30
+;
+; FORMERLY NS1.ISI.EDU
+;
+. 3600000 NS B.ROOT-SERVERS.NET.
+B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
+B.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:200::b
+;
+; FORMERLY C.PSI.NET
+;
+. 3600000 NS C.ROOT-SERVERS.NET.
+C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
+C.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2::c
+;
+; FORMERLY TERP.UMD.EDU
+;
+. 3600000 NS D.ROOT-SERVERS.NET.
+D.ROOT-SERVERS.NET. 3600000 A 199.7.91.13
+D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2d::d
+;
+; FORMERLY NS.NASA.GOV
+;
+. 3600000 NS E.ROOT-SERVERS.NET.
+E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
+E.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:a8::e
+;
+; FORMERLY NS.ISC.ORG
+;
+. 3600000 NS F.ROOT-SERVERS.NET.
+F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
+F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f
+;
+; FORMERLY NS.NIC.DDN.MIL
+;
+. 3600000 NS G.ROOT-SERVERS.NET.
+G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
+G.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:12::d0d
+;
+; FORMERLY AOS.ARL.ARMY.MIL
+;
+. 3600000 NS H.ROOT-SERVERS.NET.
+H.ROOT-SERVERS.NET. 3600000 A 198.97.190.53
+H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::53
+;
+; FORMERLY NIC.NORDU.NET
+;
+. 3600000 NS I.ROOT-SERVERS.NET.
+I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
+I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fe::53
+;
+; OPERATED BY VERISIGN, INC.
+;
+. 3600000 NS J.ROOT-SERVERS.NET.
+J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
+J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:c27::2:30
+;
+; OPERATED BY RIPE NCC
+;
+. 3600000 NS K.ROOT-SERVERS.NET.
+K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
+K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1
+;
+; OPERATED BY ICANN
+;
+. 3600000 NS L.ROOT-SERVERS.NET.
+L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
+L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:9f::42
+;
+; OPERATED BY WIDE
+;
+. 3600000 NS M.ROOT-SERVERS.NET.
+M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
+M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35
+; End of file \ No newline at end of file
diff --git a/net-dns/bind/files/named.conf b/net-dns/bind/files/named.conf
new file mode 100644
index 000000000000..1cfc82d08e79
--- /dev/null
+++ b/net-dns/bind/files/named.conf
@@ -0,0 +1 @@
+d /run/named 0750 named named -
diff --git a/net-dns/bind/files/named.conf-r8 b/net-dns/bind/files/named.conf-r8
new file mode 100644
index 000000000000..39f9be267f37
--- /dev/null
+++ b/net-dns/bind/files/named.conf-r8
@@ -0,0 +1,166 @@
+/*
+ * Refer to the named.conf(5) and named(8) man pages, and the documentation
+ * in /usr/share/doc/bind-* for more details.
+ * Online versions of the documentation can be found here:
+ * https://kb.isc.org/article/AA-01031
+ *
+ * If you are going to set up an authoritative server, make sure you
+ * understand the hairy details of how DNS works. Even with simple mistakes,
+ * you can break connectivity for affected parties, or cause huge amounts of
+ * useless Internet traffic.
+ */
+
+acl "xfer" {
+ /* Deny transfers by default except for the listed hosts.
+ * If we have other name servers, place them here.
+ */
+ none;
+};
+
+/*
+ * You might put in here some ips which are allowed to use the cache or
+ * recursive queries
+ */
+acl "trusted" {
+ 127.0.0.0/8;
+ ::1/128;
+};
+
+options {
+ directory "/var/bind";
+ pid-file "/run/named/named.pid";
+
+ /* https://www.isc.org/solutions/dlv >=bind-9.7.x only */
+ //bindkeys-file "/etc/bind/bind.keys";
+
+ listen-on-v6 { ::1; };
+ listen-on { 127.0.0.1; };
+
+ allow-query {
+ /*
+ * Accept queries from our "trusted" ACL. We will
+ * allow anyone to query our master zones below.
+ * This prevents us from becoming a free DNS server
+ * to the masses.
+ */
+ trusted;
+ };
+
+ allow-query-cache {
+ /* Use the cache for the "trusted" ACL. */
+ trusted;
+ };
+
+ allow-recursion {
+ /* Only trusted addresses are allowed to use recursion. */
+ trusted;
+ };
+
+ allow-transfer {
+ /* Zone tranfers are denied by default. */
+ none;
+ };
+
+ allow-update {
+ /* Don't allow updates, e.g. via nsupdate. */
+ none;
+ };
+
+ /*
+ * If you've got a DNS server around at your upstream provider, enter its
+ * IP address here, and enable the line below. This will make you benefit
+ * from its cache, thus reduce overall DNS traffic in the Internet.
+ *
+ * Uncomment the following lines to turn on DNS forwarding, and change
+ * and/or update the forwarding ip address(es):
+ */
+/*
+ forward first;
+ forwarders {
+ // 123.123.123.123; // Your ISP NS
+ // 124.124.124.124; // Your ISP NS
+ // 4.2.2.1; // Level3 Public DNS
+ // 4.2.2.2; // Level3 Public DNS
+ 8.8.8.8; // Google Open DNS
+ 8.8.4.4; // Google Open DNS
+ };
+
+*/
+
+ dnssec-enable yes;
+ //dnssec-validation yes;
+
+ /*
+ * As of bind 9.8.0:
+ * "If the root key provided has expired,
+ * named will log the expiration and validation will not work."
+ */
+ dnssec-validation auto;
+
+ /* if you have problems and are behind a firewall: */
+ //query-source address * port 53;
+};
+
+/*
+logging {
+ channel default_log {
+ file "/var/log/named/named.log" versions 5 size 50M;
+ print-time yes;
+ print-severity yes;
+ print-category yes;
+ };
+
+ category default { default_log; };
+ category general { default_log; };
+};
+*/
+
+include "/etc/bind/rndc.key";
+controls {
+ inet 127.0.0.1 port 953 allow { 127.0.0.1/32; ::1/128; } keys { "rndc-key"; };
+};
+
+zone "." in {
+ type hint;
+ file "/var/bind/named.cache";
+};
+
+zone "localhost" IN {
+ type master;
+ file "pri/localhost.zone";
+ notify no;
+};
+
+/*
+ * Briefly, a zone which has been declared delegation-only will be effectively
+ * limited to containing NS RRs for subdomains, but no actual data beyond its
+ * own apex (for example, its SOA RR and apex NS RRset). This can be used to
+ * filter out "wildcard" or "synthesized" data from NAT boxes or from
+ * authoritative name servers whose undelegated (in-zone) data is of no
+ * interest.
+ * See http://www.isc.org/software/bind/delegation-only for more info
+ */
+
+//zone "COM" { type delegation-only; };
+//zone "NET" { type delegation-only; };
+
+//zone "YOUR-DOMAIN.TLD" {
+// type master;
+// file "/var/bind/pri/YOUR-DOMAIN.TLD.zone";
+// allow-query { any; };
+// allow-transfer { xfer; };
+//};
+
+//zone "YOUR-SLAVE.TLD" {
+// type slave;
+// file "/var/bind/sec/YOUR-SLAVE.TLD.zone";
+// masters { <MASTER>; };
+
+ /* Anybody is allowed to query but transfer should be controlled by the master. */
+// allow-query { any; };
+// allow-transfer { none; };
+
+ /* The master should be the only one who notifies the slaves, shouldn't it? */
+// allow-notify { <MASTER>; };
+// notify no;
+//};
diff --git a/net-dns/bind/files/named.confd-r7 b/net-dns/bind/files/named.confd-r7
new file mode 100644
index 000000000000..477a4806151d
--- /dev/null
+++ b/net-dns/bind/files/named.confd-r7
@@ -0,0 +1,48 @@
+# Set various named options here.
+#
+#OPTIONS=""
+
+# Set this to the number of processors you want bind to use.
+# Leave this unchanged if you want bind to automatically detect the number
+#CPU="1"
+
+# If you wish to run bind in a chroot:
+# 1) un-comment the CHROOT= assignment, below. You may use
+# a different chroot directory but MAKE SURE it's empty.
+# 2) run: emerge --config =<bind-version>
+#
+#CHROOT="/chroot/dns"
+
+# Uncomment to enable binmount of /usr/share/GeoIP
+#CHROOT_GEOIP="1"
+
+# Uncomment the line below to avoid that the init script mounts the needed paths
+# into the chroot directory.
+# You have to copy all needed config files by hand if you say CHROOT_NOMOUNT="1".
+#CHROOT_NOMOUNT="1"
+
+# Uncomment this option if you have setup your own chroot environment and you
+# don't want/need the chroot consistency check
+#CHROOT_NOCHECK=1
+
+# Default pid file location
+PIDFILE="${CHROOT}/run/named/named.pid"
+
+# Scheduling priority: 19 is the lowest and -20 is the highest.
+# Default: 0
+#NAMED_NICELEVEL="0"
+
+# Uncomment rc_named_use/rc_named_after for the database you need.
+# Its necessary to ensure the database backend will be started before named.
+
+# MySQL
+#rc_named_use="mysql"
+#rc_named_after="mysql"
+
+# PostgreSQL
+#rc_named_use="pg_autovacuum postgresql"
+#rc_named_after="pg_autovacuum postgresql"
+
+# LDAP
+#rc_named_use="ldap"
+#rc_named_after="ldap"
diff --git a/net-dns/bind/files/named.init-r13 b/net-dns/bind/files/named.init-r13
new file mode 100644
index 000000000000..4240a09176b8
--- /dev/null
+++ b/net-dns/bind/files/named.init-r13
@@ -0,0 +1,252 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="checkconfig checkzones"
+extra_started_commands="reload"
+
+depend() {
+ need net
+ use logger
+ provide dns
+}
+
+NAMED_CONF=${CHROOT}/etc/bind/named.conf
+
+OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}
+MOUNT_CHECK_TIMEOUT=${MOUNT_CHECK_TIMEOUT:-60}
+
+_mount() {
+ local from
+ local to
+ local opts
+ local ret=0
+
+ if [ "${#}" -lt 3 ]; then
+ eerror "_mount(): to few arguments"
+ return 1
+ fi
+
+ from=$1
+ to=$2
+ shift 2
+
+ opts="${*}"
+ shift $#
+
+ if [ -z "$(awk "\$2 == \"${to}\" { print \$2 }" /proc/mounts)" ]; then
+ einfo "mounting ${from} to ${to}"
+ mount ${from} ${to} ${opts}
+ ret=$?
+
+ eend $ret
+ return $ret
+ fi
+
+ return 0
+}
+
+_umount() {
+ local dir=$1
+ local ret=0
+
+ if [ -n "$(awk "\$2 == \"${dir}\" { print \$2 }" /proc/mounts)" ]; then
+ ebegin "umounting ${dir}"
+ umount ${dir}
+ ret=$?
+
+ eend $ret
+ return $ret
+ fi
+
+ return 0
+}
+
+_get_pidfile() {
+ # as suggested in bug #107724, bug 335398#c17
+ [ -n "${PIDFILE}" ] || PIDFILE=${CHROOT}$(\
+ /usr/sbin/named-checkconf -p ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} | grep 'pid-file' | cut -d\" -f2)
+ [ -z "${PIDFILE}" ] && PIDFILE=${CHROOT}/run/named/named.pid
+}
+
+check_chroot() {
+ if [ -n "${CHROOT}" ]; then
+ [ ! -d "${CHROOT}" ] && return 1
+ [ ! -d "${CHROOT}/dev" ] || [ ! -d "${CHROOT}/etc" ] || [ ! -d "${CHROOT}/var" ] && return 1
+ [ ! -d "${CHROOT}/run" ] || [ ! -d "${CHROOT}/var/log" ] && return 1
+ [ ! -d "${CHROOT}/etc/bind" ] || [ ! -d "${CHROOT}/var/bind" ] && return 1
+ [ ! -d "${CHROOT}/var/log/named" ] && return 1
+ [ ! -c "${CHROOT}/dev/null" ] || [ ! -c "${CHROOT}/dev/zero" ] && return 1
+ [ ! -c "${CHROOT}/dev/random" ] && [ ! -c "${CHROOT}/dev/urandom" ] && return 1
+ [ "${CHROOT_GEOIP:-0}" -eq 1 ] && [ ! -d "${CHROOT}/usr/share/GeoIP" ] && return 1
+ if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then
+ if [ -d "/usr/lib64" ]; then
+ [ ! -d "${CHROOT}/usr/lib64/engines" ] && return 1
+ elif [ -d "/usr/lib" ]; then
+ [ ! -d "${CHROOT}/usr/lib/engines" ] && return 1
+ fi
+ fi
+ fi
+
+ return 0
+}
+
+checkconfig() {
+ ebegin "Checking named configuration"
+
+ if [ ! -f "${NAMED_CONF}" ] ; then
+ eerror "No ${NAMED_CONF} file exists!"
+ return 1
+ fi
+
+ /usr/sbin/named-checkconf ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} || {
+ eerror "named-checkconf failed! Please fix your config first."
+ return 1
+ }
+
+ eend 0
+ return 0
+}
+
+checkzones() {
+ ebegin "Checking named configuration and zones"
+ /usr/sbin/named-checkconf -z -j ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}}
+ eend $?
+}
+
+start() {
+ local piddir
+
+ ebegin "Starting ${CHROOT:+chrooted }named"
+
+ if [ -n "${CHROOT}" ]; then
+ if [ ${CHROOT_NOCHECK:-0} -eq 0 ]; then
+ check_chroot || {
+ eend 1
+ eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first"
+ return 1
+ }
+ fi
+
+ if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then
+ if [ ! -e /usr/lib/engines/libgost.so ]; then
+ eend 1
+ eerror "Couldn't find /usr/lib/engines/libgost.so but bind has been built with openssl and libgost support"
+ return 1
+ fi
+ cp -Lp /usr/lib/engines/libgost.so "${CHROOT}/usr/lib/engines/libgost.so" || {
+ eend 1
+ eerror "Couldn't copy /usr/lib/engines/libgost.so into '${CHROOT}/usr/lib/engines/'"
+ return 1
+ }
+ fi
+ cp -Lp /etc/localtime "${CHROOT}/etc/localtime"
+
+ if [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then
+ einfo "Mounting chroot dirs"
+ _mount /etc/bind ${CHROOT}/etc/bind -o bind
+ _mount /var/bind ${CHROOT}/var/bind -o bind
+ _mount /var/log/named ${CHROOT}/var/log/named -o bind
+ if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
+ _mount /usr/share/GeoIP ${CHROOT}/usr/share/GeoIP -o bind
+ fi
+ fi
+
+ # On initial startup, if piddir inside the chroot /var/run/named
+ # Then the .../var/run part might not exist yet
+ checkpath -q -d -o root:root -m 0755 "${piddir}/.."
+ fi
+
+ checkconfig || { eend 1; return 1; }
+
+ # create piddir (usually /run/named) if necessary, bug 334535
+ _get_pidfile
+ piddir="${PIDFILE%/*}"
+ checkpath -q -d -o root:named -m 0770 "${piddir}" || {
+ eerror "Failed to create PID directory at $piddir"
+ eend 1
+ return 1
+ }
+
+ # In case someone have $CPU set in /etc/conf.d/named
+ if [ -n "${CPU}" ] && [ "${CPU}" -gt 0 ]; then
+ CPU="-n ${CPU}"
+ fi
+
+ start-stop-daemon --start --pidfile ${PIDFILE} \
+ --nicelevel ${NAMED_NICELEVEL:-0} \
+ --exec /usr/sbin/named \
+ -- -u named ${CPU} ${OPTIONS} ${CHROOT:+-t} ${CHROOT}
+ eend $?
+}
+
+stop() {
+ local reported=0
+
+ ebegin "Stopping ${CHROOT:+chrooted }named"
+
+ # Workaround for now, until openrc's restart has been fixed.
+ # openrc doesn't care about a restart() function in init scripts.
+ if [ "${RC_CMD}" = "restart" ]; then
+ if [ -n "${CHROOT}" -a ${CHROOT_NOCHECK:-0} -eq 0 ]; then
+ check_chroot || {
+ eend 1
+ eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first"
+ return 1
+ }
+ fi
+
+ checkconfig || { eend 1; return 1; }
+ fi
+
+ # -R 10, bug 335398
+ _get_pidfile
+ start-stop-daemon --stop --retry 10 --pidfile $PIDFILE \
+ --exec /usr/sbin/named
+
+ if [ -n "${CHROOT}" ] && [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then
+ ebegin "Umounting chroot dirs"
+
+ # just to be sure everything gets clean
+ while fuser -s ${CHROOT} 2>/dev/null; do
+ if [ "${reported}" -eq 0 ]; then
+ einfo "Waiting until all named processes are stopped (max. ${MOUNT_CHECK_TIMEOUT} seconds)"
+ elif [ "${reported}" -eq "${MOUNT_CHECK_TIMEOUT}" ]; then
+ eerror "Waiting until all named processes are stopped failed!"
+ eend 1
+ break
+ fi
+ sleep 1
+ reported=$((reported+1))
+ done
+
+ [ "${CHROOT_GEOIP:-0}" -eq 1 ] && _umount ${CHROOT}/usr/share/GeoIP
+ _umount ${CHROOT}/etc/bind
+ _umount ${CHROOT}/var/log/named
+ _umount ${CHROOT}/var/bind
+ fi
+
+ eend $?
+}
+
+reload() {
+ local ret
+
+ ebegin "Reloading named.conf and zone files"
+
+ checkconfig || { eend 1; return 1; }
+
+ _get_pidfile
+ if [ -n "${PIDFILE}" ]; then
+ start-stop-daemon --pidfile $PIDFILE --signal HUP
+ ret=$?
+ else
+ ewarn "Unable to determine the pidfile... this is"
+ ewarn "a fallback mode. Please check your installation!"
+
+ $RC_SERVICE restart
+ ret=$?
+ fi
+
+ eend $ret
+}
diff --git a/net-dns/bind/files/named.service-r1 b/net-dns/bind/files/named.service-r1
new file mode 100644
index 000000000000..65fbdb941ca0
--- /dev/null
+++ b/net-dns/bind/files/named.service-r1
@@ -0,0 +1,13 @@
+[Unit]
+Description=Internet domain name server
+After=network.target
+
+[Service]
+ExecStartPre=/usr/libexec/generate-rndc-key.sh
+ExecStartPre=/usr/sbin/named-checkconf -z /etc/bind/named.conf
+ExecStart=/usr/sbin/named -f -u named
+ExecReload=/usr/sbin/rndc reload
+ExecStop=/usr/sbin/rndc stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/bind/metadata.xml b/net-dns/bind/metadata.xml
new file mode 100644
index 000000000000..ce5bde7aab6f
--- /dev/null
+++ b/net-dns/bind/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+ <longdescription>ISC's bind dns server, used the world 'round.</longdescription>
+ <use>
+ <flag name="dnstap">Enables dnstap packet logging</flag>
+ <flag name="dlz">Enables dynamic loaded zones, 3rd party extension</flag>
+ <flag name="filter-aaaa">Enable filtering of AAAA records over IPv4</flag>
+ <flag name="fixed-rrset">Enables fixed rrset-order option</flag>
+ <flag name="gost">Enables gost OpenSSL engine support</flag>
+ <flag name="gssapi">Enable gssapi support</flag>
+ <flag name="json">Enable JSON statistics channel</flag>
+ <flag name="lmdb">Enable LMDB support to store configuration for 'addzone' zones</flag>
+ <flag name="nslint">Build and install the nslint util</flag>
+ <flag name="rpz">Enable response policy rewriting (rpz)</flag>
+ <flag name="urandom">Use /dev/urandom instead of /dev/random</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/c-ares/Manifest b/net-dns/c-ares/Manifest
new file mode 100644
index 000000000000..a4bf4125f9d6
--- /dev/null
+++ b/net-dns/c-ares/Manifest
@@ -0,0 +1,8 @@
+AUX c-ares-1.12.0-remove-tests.patch 422 SHA256 ab4077eb5178836852376a9e252fb8a7ec04cd87d3f33e2c5eed98ec4c53f46f SHA512 53a9c126183c811b1f68c12014e4123d250447925ded472ff1fb6b57d254730206becd4182692ad5958b14ba0b929a2713df6988c0306872b046aa49bd70e743 WHIRLPOOL a57c3593ce256020c1645f4c08540494dc02041d4fd2a44245f8b991dcaa6979a027f23067435bf97ff0dd2790ca85ccdbd5c55c2afb8177a3e75328d837e043
+DIST c-ares-1.12.0.tar.gz 1769879 SHA256 8692f9403cdcdf936130e045c84021665118ee9bfea905d1a76f04d4e6f365fb SHA512 3da0fadb04eccab49b4e6eff3f087a392dd76238d47e74e2ede723883468da688e41f679ee8ca38613fc4f80d3bd7c29e69d3d6c711f988a02fd5d21a3ee1dc6 WHIRLPOOL 69d297213c6ca0988d3b7697d40443dabb3a9b4ceb65c357a3ec99ab2af7c0a7c669f2dc7f75833e0c8a661525ae4003be8109d2d5c1e90887b8349cd63a8d5c
+DIST c-ares-1.13.0.tar.gz 1446797 SHA256 03f708f1b14a26ab26c38abd51137640cb444d3ec72380b21b20f1a8d2861da7 SHA512 4a7942e754673f5b8d55a7471e31b0f390e8324b14c12077580c956147fad4d165c7fe8a3190199b1add95c710ceeb1a7957706d4f0d6299d39c5dddc719bd9d WHIRLPOOL 02a398db6a1256aabb77e445be6131319f2f1f15327146fb3293033f7b6a15e499bead3d8ded022eb38f6509c76dc0981a3ce139e16132373540c21e7a313d89
+EBUILD c-ares-1.12.0.ebuild 979 SHA256 befbe7e0b3093d05f4345dab49d4f8cc5101d01966ae5982c34d8099f519db53 SHA512 d46844d67f77c88338c68f2fe2d7bb147f1f1ed0edc864a119802fbfe15f102beb8c2e0a40ada6fd97cab0e04e944153d6ff7d20433358ae6c5a111464c3588d WHIRLPOOL d7f266d55a774d2dfc09b3fec6d49df9087d60ba182871a2116c639868d0a141ba4df2022ef487bff4981811ac8fadccdfaa634f481e234b59d9c28318298deb
+EBUILD c-ares-1.13.0.ebuild 988 SHA256 4a92b22d6472e0093d842009ae6cb0b93f8847bd49f84da7ac3ad5a1a184846a SHA512 7d38abfe0a9aa4ae7c98d1a39ad1141680f1ca30793fb2d760dd80072f6ad805122b78917a5a7a12a0dfaa22338bbc7f6715ae56688d3f18dd05ab2a4cef48cf WHIRLPOOL 818cf849f397eda516289a6c3a775b971ef973ef623e8cfad708dfa23d6798bbcc43ac56fce35e5632b39286c183a20a96a9c7f0de64fc3fd573616ccd96be11
+MISC ChangeLog 3989 SHA256 31e9cad0d76094a8814d9e5f61b309b400e87b5de2a8e0247817693ec34de483 SHA512 2b83637abea52a8430782237c94ea4511d40f86a2504b2566523428cd04af62c8b86a9b27074fea284a43e452ab5930ff3fb545c5802b47d3f2c202c84a00f11 WHIRLPOOL 3f0ba4398e524a18d5caf0b26ae9a47891d371217589b98ee0bf7d3f186fd6ee19789414accffdf26a7c01674819024bc9655d1cfd78cf30e699fb8f57c681b2
+MISC ChangeLog-2015 11969 SHA256 77a8f577b7ca209f0d0429a43160dfb7988945f6ceecee890b2a429b8dab4cf5 SHA512 6a85f9ae18a01ed89798c9dce6f9987ddd6454c7db494dc03887b38bff4674f947758db2e8398de66524fc57e22c15ba334eb746dc75f30f2672d3740ab1f68e WHIRLPOOL e0ef12f777960e9ff4e90422d85817e30f2aae96e887efe48ca24fcf216c14bbc018051de8d24490b29b63d5129057f045a4dfc8088c21b1e60a3e685717541f
+MISC metadata.xml 339 SHA256 a3a4b7b1a0723a569944e0f764d4edd189a583120b823eb45229eb1e12585de8 SHA512 fb726c9af8f3b9b104f13f5d7f8c1d38659848afdd619fe8c9242e8d2dea24c21a2654baca4bac96a94cadf68a0f649c87346f296e6b5d2aa5d88a4276c41755 WHIRLPOOL 7e4a278b85ab4add27eea80d409cb4f3a66de654bb5a4dbbd0a4e5f9e520ba5aa6261a435086f703b19d25e37bda0849f81e0d2f29baba327cff08be5494aa4d
diff --git a/net-dns/c-ares/c-ares-1.12.0.ebuild b/net-dns/c-ares/c-ares-1.12.0.ebuild
new file mode 100644
index 000000000000..033c46d1b306
--- /dev/null
+++ b/net-dns/c-ares/c-ares-1.12.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils multilib-minimal
+
+DESCRIPTION="C library that resolves names asynchronously"
+HOMEPAGE="http://c-ares.haxx.se/"
+SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz"
+
+LICENSE="MIT"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris"
+IUSE="static-libs"
+
+# Subslot = SONAME of libcares.so.2
+SLOT="0/2"
+
+DOCS=( AUTHORS CHANGES NEWS README.md RELEASE-NOTES TODO )
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/ares_build.h
+)
+
+src_prepare() {
+ eapply "${FILESDIR}"/${P}-remove-tests.patch
+ eapply_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-nonblocking \
+ --enable-symbol-hiding \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --all
+}
diff --git a/net-dns/c-ares/c-ares-1.13.0.ebuild b/net-dns/c-ares/c-ares-1.13.0.ebuild
new file mode 100644
index 000000000000..0b181ed60e36
--- /dev/null
+++ b/net-dns/c-ares/c-ares-1.13.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils multilib-minimal
+
+DESCRIPTION="C library that resolves names asynchronously"
+HOMEPAGE="http://c-ares.haxx.se/"
+SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz"
+
+LICENSE="MIT"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris"
+IUSE="static-libs"
+
+# Subslot = SONAME of libcares.so.2
+SLOT="0/2"
+
+DOCS=( AUTHORS CHANGES NEWS README.md RELEASE-NOTES TODO )
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/ares_build.h
+)
+
+src_prepare() {
+ eapply "${FILESDIR}"/${PN}-1.12.0-remove-tests.patch
+ eapply_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-nonblocking \
+ --enable-symbol-hiding \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --all
+}
diff --git a/net-dns/c-ares/files/c-ares-1.12.0-remove-tests.patch b/net-dns/c-ares/files/c-ares-1.12.0-remove-tests.patch
new file mode 100644
index 000000000000..826eb856de6e
--- /dev/null
+++ b/net-dns/c-ares/files/c-ares-1.12.0-remove-tests.patch
@@ -0,0 +1,14 @@
+diff -Naur c-ares-1.12.0.orig/configure.ac c-ares-1.12.0/configure.ac
+--- c-ares-1.12.0.orig/configure.ac 2016-09-29 07:43:01.000000000 -0400
++++ c-ares-1.12.0/configure.ac 2016-10-14 03:10:36.253342032 -0400
+@@ -837,10 +837,6 @@
+ fi
+ AC_MSG_RESULT([$build_tests])
+
+-if test "x$build_tests" = "xyes" ; then
+- AC_CONFIG_SUBDIRS([test])
+-fi
+-
+ AC_CONFIG_FILES([Makefile libcares.pc])
+ AC_OUTPUT
+ XC_AMEND_DISTCLEAN(['.'])
diff --git a/net-dns/c-ares/metadata.xml b/net-dns/c-ares/metadata.xml
new file mode 100644
index 000000000000..1b514de33c67
--- /dev/null
+++ b/net-dns/c-ares/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+</maintainer>
+<upstream>
+ <remote-id type="cpe">cpe:/a:daniel_stenberg:c-ares</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/net-dns/cagibi/Manifest b/net-dns/cagibi/Manifest
new file mode 100644
index 000000000000..7c6c4e0d05e4
--- /dev/null
+++ b/net-dns/cagibi/Manifest
@@ -0,0 +1,5 @@
+DIST cagibi-0.2.0.tar.bz2 28959 SHA256 77f9ec1eff5a5e0db90708a789a7cb82ff3780069f9e6f21b03a23813258b24b SHA512 e438166b4b09039002d6735c68d73c037727e8a113b0c9118785e9e387b02c1a8d8b97462500f081898ee39d997dcf38e53cf78ad7bd46e259cb5c16c568fd32 WHIRLPOOL ca34a958f0622c52bb7d1565f8ee3f1f206f91e4ca2e65b6118c8e1a2ffc47fc234605acbbb2a06279c79d59e074b3f09fa26b2b800ef4c1631dd661640917f2
+EBUILD cagibi-0.2.0.ebuild 541 SHA256 baae77989ffef2cebd99f905ac101234b3654deeceebabe22e15d850e2d61c7e SHA512 f709c2e9dc168483827984b529adb81bb503f0317cd2c6b46c93899d9847aa32a0a237646473deecbb6cae3076a0fdcaa1c004ade9d9d69b1a2efa260df5d120 WHIRLPOOL a80f2ab1c7091ebc879a05d34866cd97716e60ba766c8617f15dc38df833571bf79d05ff51836c025288bb65493d28a80d6121b9bae21812cd998b28ce76492a
+MISC ChangeLog 2423 SHA256 8ae86c09c983d5ec732d47eca17e94589734c35b51cdafbadaa846dc59d81eec SHA512 e8e40c9b605bc31e4b2224e6b095b1b5dc95e197ce58e05ce5f92d008f33f340d71a24619ac88bc44146d7ddda3e30f770f5adf0fe804a876c05d68f768dc830 WHIRLPOOL a4d04250db90ee6f0a0fee86bd060325e97cbc85a1f29d1e6ac4d3fcbb607c5702e48ea27f8ab27c100805c67b39a745cca4e4d9d05bd92495da5c5832d268bf
+MISC ChangeLog-2015 722 SHA256 bde6d59c03d308b7c1c11a0b21334de87cfedec72021013d4ca646848114240b SHA512 1f3b34474fd5169358ca8bd260e35b0aa3d0b382e61043deb4083e06229cf378a9d10efe90042038b6d1baccb6474f86b6ec20c04afc1dc1d2311d6934d7263a WHIRLPOOL 25c4a407ab29a7b5b260af958e79e7ada57ffa52169e369e718fd666860a23e244c238b68244198b354fa21de71b9b2af6add019c44c86b9d877e30d3435919a
+MISC metadata.xml 249 SHA256 584f1dcf51866dc24a9abf7a89bfba0fad11dde81ae1c1b715da41770d233c99 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3 WHIRLPOOL 200c07a8bf7c55b11b7936d5cd30e991a511684913334e72f59def66c0ced5fed0b4a8754e2d98bffbab631cb90d4e17fcccc59d5dcc5a8e988f69e47c85518c
diff --git a/net-dns/cagibi/cagibi-0.2.0.ebuild b/net-dns/cagibi/cagibi-0.2.0.ebuild
new file mode 100644
index 000000000000..9cf64596af88
--- /dev/null
+++ b/net-dns/cagibi/cagibi-0.2.0.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="Cache/proxy system for the SSDP part of UPnP"
+HOMEPAGE="https://frinring.wordpress.com/2010/08/09/cagibi-0-1-1-released-network-kio-slave-freezes-kded-in-4-5-0/"
+SRC_URI="mirror://kde/stable/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE="debug"
+
+RDEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+"
+DEPEND="${RDEPEND}
+ dev-util/automoc
+"
+
+DOCS=( Changelog README TODO )
diff --git a/net-dns/cagibi/metadata.xml b/net-dns/cagibi/metadata.xml
new file mode 100644
index 000000000000..2fdbf33d963d
--- /dev/null
+++ b/net-dns/cagibi/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>kde@gentoo.org</email>
+ <name>Gentoo KDE Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/coredns/Manifest b/net-dns/coredns/Manifest
new file mode 100644
index 000000000000..24fef0990eb5
--- /dev/null
+++ b/net-dns/coredns/Manifest
@@ -0,0 +1,4 @@
+DIST coredns-010.tar.gz 4945448 SHA256 a4b31a9f95c4bcfbff1742b7896bdaa38d43866bc3cb25dc0034ba60cbfc31ee SHA512 5e01b32b7350e0b7d02e0328bef038975af965f9b120a2c98602d4356546ba4606f48fc305d02e1c216198715a83a81c8803132aa5737c8e3e67b66d1b1b3da5 WHIRLPOOL a0659b8f68cda5572812ff6289f69f368e5f2a1737d1044d879d473ac68b01455bbbba92245af4532a3a2de33c1f9ee26606dfbb542cef72255b299bc4108e77
+DIST github.com-mholt-caddy-bd67ec99f01797931a0787b9c2de0f04fa0e5980.tar.gz 2672724 SHA256 9d81c2e79d78accc89ddc04a630b3602df5299a1621c7b83651f0607630c46c7 SHA512 a6a337da2c83392820fa11d08f3b5be126e95e5999f0eee86ff1de4726f2221d987dd0b645ffd71989ebcfd9ca65feb82924a19af2b6cc15231831fc0ea48c2f WHIRLPOOL 3496fb275cdb2c61db89c61d175466202613ad5b99cfaa4064a0a677eb49e75b55887b1ab50d6821a4a112f85dcf5be3cb4e2a7a74978805af50ce2501504559
+EBUILD coredns-010.ebuild 760 SHA256 4bc75f54b4c75fce30b176d461c4b6431f35812872274273d785581077c7aa92 SHA512 414036ec1585d5a3b2a40e799fdc0975c3a8eb973aa5ad802630bd65b01352c2608626da321ee790195f64462045c77c479c1e88ad0d91d1de6c5ad9654fbb77 WHIRLPOOL b658436f73db82353d0cd53f1b1d7b73539ac281e0f1cb8af1bdb339ae4a3a08ce2a739f9648332cfb80c65b98a94f8a15e4eff15fbe820cb3811da254ab072d
+MISC metadata.xml 335 SHA256 27df438d77f1af6e17ffd325be931b769dd2b11a2d21b550ecab68d692bfda06 SHA512 f520f2f4129fb9ce453cc95527d3ccd30029fdc45411cae376c85bc02870c01b880f593b92ce35cc083e0f65bf8e7a4e0ffc57cfca7cdad84cc41fec995e88ad WHIRLPOOL 9f0550824d8775ddfb16272272f2f5ee1e87aa197891bb54840af32d6778062a1e40e570c196f661c651289137378dbac8c513ee37f49a38825e52859de99ec3
diff --git a/net-dns/coredns/coredns-010.ebuild b/net-dns/coredns/coredns-010.ebuild
new file mode 100644
index 000000000000..2e74aadba5e9
--- /dev/null
+++ b/net-dns/coredns/coredns-010.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGO_VENDOR=( "github.com/mholt/caddy bd67ec99f01797931a0787b9c2de0f04fa0e5980" )
+
+EGO_PN="github.com/${PN}/${PN}"
+
+inherit golang-build golang-vcs-snapshot
+
+EGIT_COMMIT="v${PV}"
+ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="A DNS server that chains middleware"
+HOMEPAGE="https://github.com/coredns/coredns"
+
+SRC_URI="${ARCHIVE_URI}
+ ${EGO_VENDOR_URI}"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+RESTRICT="test"
+
+src_compile() {
+ pushd src/${EGO_PN} || die
+ GOPATH="${S}" go build || die
+ popd || die
+}
+
+src_install() {
+ pushd src/${EGO_PN}
+ dobin ${PN}
+ dodoc README.md
+ popd || die
+}
diff --git a/net-dns/coredns/metadata.xml b/net-dns/coredns/metadata.xml
new file mode 100644
index 000000000000..26261e8d8550
--- /dev/null
+++ b/net-dns/coredns/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mrueg@gentoo.org</email>
+ <name>Manuel Rüger</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">coredns/coredns</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/ddclient/Manifest b/net-dns/ddclient/Manifest
new file mode 100644
index 000000000000..51acea569e37
--- /dev/null
+++ b/net-dns/ddclient/Manifest
@@ -0,0 +1,16 @@
+AUX cmd-over-cfg.patch 488 SHA256 4b384d925abdae2cce0e65baa44ca0356d22aabbb669fe5183bbd652a3e2fc35 SHA512 a22ed7202b29e74ca8d4ffc597c5922cbe39da097c00876ac3e66c8f09eacd836ebb276e75753103f84699888f8e0a57abbfe839579eab0ddd48a2fa119fc70d WHIRLPOOL 0ea326e66c235e90c0c6dfd1011e1a735236ef153bdf74ac8a24ee9e7718b847311e290e41dcc5f1b10e241e81612a152a747c4a6c52b3703ea991bab740f492
+AUX ddclient.confd 97 SHA256 7a05a1c016dcffa2033da00e8a58072d0df33c31bc8b96170929032567cb44ab SHA512 3784fc11ba1b00b863b8a626910f75adb4b73f87f1887620c6ab17d68f36be4c481366ff1a8d91242c7ff62871e397ad1d4544b266405130d0fd8267f5a07f3d WHIRLPOOL ac01d8d8a5aee9a92401c47d97f5e0a556c4f065d16cabe33cde3f55f4046094a3cdc970fb2abad97589b308e005fd2f8802b38ab9a2184f425ff416bd0539b1
+AUX ddclient.confd-r1 98 SHA256 a6b1c281bfa4d963f9556f702cc4e3068e19a25991e9b6baf3547bee24974e82 SHA512 a74a3b0863fc20d740de07bfc37bee0aff6d7316ee72152241929e0a058ec34a5d76bc4429eedd69b03047f081cc0601543988b066ee246d671945a01fa0876d WHIRLPOOL a89921b9f80e0d3fb20d3c3010e59871de6f70df9fc75ee4867e3690b70ba48d7d905d1054542d1d9ddf085f8be6d3322191c9f540bb450402ef6e7eac12b0e9
+AUX ddclient.initd-r3 1312 SHA256 386d56ddae7444a2a7d3c56a2d7055bf456653ce5825b88029794065d57c796d SHA512 388725815c3fea9df57b6cd73ab9a549967aba2add3be9fe5153f57e20635c037985c28b1f1ebcb8a122737cdc6277f0711029375f7d62e03491457959ae8dd1 WHIRLPOOL 0fd42246bedf95b9b5355dc9ef64bf321e0f976b67bad762823a6c24df272bb789307950d38ea5aeb60c92483b3323f5db9909cdc6a71e68805ea2e78186e1ca
+AUX ddclient.initd-r4 856 SHA256 8e63f6d572bb2addd62f38f12e14523d68d2536cd15e0a1057b5da47bb204b94 SHA512 d68e4f01a731826f540243c1123849cc85cbffc41dc5d18c1538d63ccac03a7f535089e99074cc7a06beb6ac48b70575d60f3ad0a3a37c378eaf17c816c0cad3 WHIRLPOOL 3f495099ead40ff88d6cfc64b5a5ac7a726f4073529c14223f335570f5f941f8654c68b84804da4e4861649eac5e5be7f60e3fb762732477c1343a17623e4362
+AUX ddclient.service 234 SHA256 1c647b71c7c035933efd78b850422543c18174dd8a841d0c9b44eb8238092930 SHA512 e3c36148804ca7ea29f2d030128941a5d5a7edc6ce3a223b8e72ea8800d622169d3825d2ede6e69630e9ca57e8c62b6f3af97269e9d671e6f2d2973b4a43602f WHIRLPOOL 4b278a5899fcf3d919eed170e328bcbb0ce93ebf3c294be040ebb423ad38f691228ba78edd0372de8bef3585be74d6712b3ceadf98f8d1bd0b9816ae73fbb14c
+AUX iproute2.patch 1394 SHA256 182a2bde1aa66a79fe38ea08e5fa612a8421c2554ea1bfd179c22628899d9871 SHA512 d802421204cf398b9a0ff679b00b1a9796f4c442e3128b5965169c6153bca9beac580b94bd20ffd5235157b4ad482fdc926d9ac8a56686598aa7a25ecd0f43e0 WHIRLPOOL 54b9dff432ec2355cfbe7c7440702be1ea0fe4f40e3b766764a39b55b0cf14bd4f259e63d3b9a72aa8580d38782c7e58a98b9ecacd08723c2d440b150f849542
+DIST ddclient-3.8.1.tar.gz 48600 SHA256 f22ac7b0ec78e310d7b88a1cf636e5c00360b2ed9c087f231b3522ef3e6295f2 SHA512 d6722582dffe0c5a806176f24bd3d9117bc1210ea0137aa92138390be16e67d47b746777dc431282a664849c91626969a5e267777126bac03304c7aa34a9dad7 WHIRLPOOL 7785e6a9cacc10bfc4a21d01287602f0edf3b45e38c4f5352415160fc9857223c630b9b42f067fcabd1080be1482da549c1dccbcd8f1a5cf860c236326050f45
+DIST ddclient-3.8.2.tar.gz 46059 SHA256 3c335ed456fcd55c1ffefbaec7c75d1b13794626b1c38e6a01cc28ce3a6eac9e SHA512 8f74ce90ce4a31b8d53887b99556661343b96734ae630403434689459eaeb1354159ae26f0404b9db21a0ff4151816d1650746a13c547064748656a8c6e3f13b WHIRLPOOL f7f0c4f28f5c59ad16989813edbb7a94bc99e91a0ed7c6b93d5455abee2a7e80d96ba0d26e6016bf8a4843a44772132918ac1c8555b829f0d4ad53d30f5aa793
+DIST ddclient-3.8.3.tar.gz 54516 SHA256 debd5fec69eeb65e2331b86f5280f382416d97ed103839a65c201eef8e6d1fc9 SHA512 055b6edf91a3b72d9ba80c9dedfbc1d60f62d6879bc722735488a5a1a37fafeb2e97567da98939ccc62fd39b0846438dfad1c022635d602c67bafda178574a76 WHIRLPOOL 30cd1565e9355eaa01124e316957604446d5446f8d91feaf8e3e8172f2d5b31b4f090a98f81ef6552f0ef7b599c9d561ee1d1b06ac895a7c24d99565cfa890f4
+EBUILD ddclient-3.8.1-r5.ebuild 1416 SHA256 38bfdbdfb63712422cc168837b668fe64a03adb70f38a1322a88100cdbf014f8 SHA512 a9215c25bd9c90042267eb9c1f0c2258d86c814ac3d343c8c795ecf8eb7eda6cc3ce7fbf1823f917b60724232d118d5904cb55afa1549f875466fcefb7dfb2bb WHIRLPOOL 316c13d570897909056e813f9dde9edba433afa463ac6c6252c3b24602b9971afca0e758ee93db7daa949ec5d280f14f46ebbee8f053348613c1f3ce8129a691
+EBUILD ddclient-3.8.2.ebuild 1176 SHA256 2dabcd0307a8f3fe91180a7e8a0e696b703b72199554870d55214d6e47544a97 SHA512 b1105c13c16deda9923b1507fe6727905bc92911c3d6f206047ef4f89fc046feb08ed982448ce42743be06bc9f7eea3a5a2fa28f863459930512b5adee51335b WHIRLPOOL 615e3b86464fd44623f32f4889e74b77f132eed8550ba8e7f446aace9f65160eb1de82f8f8a0e392d20822ef9f8b33873d5bf699e689b1fb4ec99a771c20b177
+EBUILD ddclient-3.8.3.ebuild 1190 SHA256 be285957edfe217328f5dbe9c0b0c4303600a5fa6aa6ba78a4291df5c3c68a82 SHA512 584e18a5bdbc165e216e74650a3fa48fdffa1bfde112ae30ce0d7a3c677ee67dc9c988fecc9a7bf059a483dfa54837d075536cfd826a1613169140f32efde3e4 WHIRLPOOL 4a728efb7a1ef4e9a5c9fe0efce66ed53f0cc45690d598c26da88d5018df85bb8600217c35ad984da763cf2dd33a180217ca5d1276e12a9ec02e9b59e0007e4f
+MISC ChangeLog 3081 SHA256 a873900d4554c35b5a40b9ddeccd40520b52683863a2f87ef9018fd826915cab SHA512 e009342f03221e98871cd870f653b6f5226c6e0231bee04f1744f9d90c3eb8f37cb930ec52d92939c69d5768662e5dfd6f4f5385f7c383d67159e3f862c66bdb WHIRLPOOL 32f10cfe00bbc1b04aa9278d725d54b37daedf81a886d3fa4d395a08f3f7a3a8080105ffea56b4f83d0c62e15088857e67357e7b30ccc64953f8e06e46709d1e
+MISC ChangeLog-2015 11285 SHA256 d0ff9c15ab227d910126ea07009b1cdecd4d15f8aac595cf970ebc48ece52dd4 SHA512 e83f8bf3560f663d6db04e30744d443a23fc497821ee3a3339899f017e33bc2cc715f29b7358489eb35df70c7c152717ddd74b4dda71771ee54fffdbc2db1ec0 WHIRLPOOL 8893c6c7104f62e0da2f10057d5d7028f8458e0c7b654637d46b85c709f020d2f8197f3fec968f7c2dadbf214c1a24f58fbeddd4beb2b6a79217953791feeb50
+MISC metadata.xml 535 SHA256 7aee32b3e5f20c20573b4cf313ee0801949a24e06dd70a9e1c5871ea65aab88b SHA512 7803f404d9c75941f563ea91af06d41b2b694713a9484b787a566d5dff5db2be80ed92b01bcccf88c695bd5e83cb52bb71b8b44fa30f13a5dcd564c552aca72d WHIRLPOOL b307494aeeac1d7ed823ecd1a5718c977ffee0929d853fefa29c1fc49eaa88279894e476e5a5971cc99fef2d3f02716b85f8c3f22402fb6a31ddef979cf2f0ca
diff --git a/net-dns/ddclient/ddclient-3.8.1-r5.ebuild b/net-dns/ddclient/ddclient-3.8.1-r5.ebuild
new file mode 100644
index 000000000000..f4c2cb5db010
--- /dev/null
+++ b/net-dns/ddclient/ddclient-3.8.1-r5.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+inherit eutils systemd user
+
+DESCRIPTION="Perl updater client for dynamic DNS services"
+HOMEPAGE="http://ddclient.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="hardened"
+
+RDEPEND=">=dev-lang/perl-5.1
+ dev-perl/Digest-SHA1
+ dev-perl/IO-Socket-SSL
+ hardened? ( sys-apps/iproute2 )
+"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_prepare() {
+ # Remove pid line, because it is specified in /etc/init.d/ddclient
+ ebegin "Removing PID setup from ${PN}.conf"
+ if ! sed '/^pid/d' -i "sample-etc_${PN}.conf"; then
+ eerror "Failed to remove pid from /etc/${PN}/${PN}.conf"
+ fi
+ eend $?
+
+ use hardened && epatch "${FILESDIR}/iproute2.patch"
+
+ epatch "${FILESDIR}/cmd-over-cfg.patch"
+}
+
+src_install() {
+ dosbin ${PN}
+ dodoc Change* COPYRIGHT README* RELEASENOTE sample*
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ keepdir /var/cache/${PN}
+ fowners -R ${PN}:${PN} /var/cache/${PN}
+
+ insinto /etc/${PN}
+ insopts -m 0600 -o ${PN} -g ${PN}
+ newins sample-etc_${PN}.conf ${PN}.conf
+ newins sample-etc_${PN}.conf ${PN}.conf.sample
+ fowners -R ${PN}:${PN} /etc/${PN}
+}
diff --git a/net-dns/ddclient/ddclient-3.8.2.ebuild b/net-dns/ddclient/ddclient-3.8.2.ebuild
new file mode 100644
index 000000000000..512df84b706c
--- /dev/null
+++ b/net-dns/ddclient/ddclient-3.8.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit systemd user
+
+DESCRIPTION="Perl updater client for dynamic DNS services"
+HOMEPAGE="http://ddclient.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="hardened"
+
+RDEPEND=">=dev-lang/perl-5.1
+ virtual/perl-Digest-SHA
+ dev-perl/IO-Socket-SSL
+ hardened? ( sys-apps/iproute2 )
+"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_prepare() {
+ # Remove pid setting because we can't leave it user configurable and
+ # reliably setup the environment for the init script to stop ${PN}
+ ebegin "Removing PID setting from ${PN}.conf"
+ sed '/^pid/d' -i "sample-etc_${PN}.conf"
+ eend $?
+}
+
+src_install() {
+ dosbin ${PN}
+ dodoc Change* COPYRIGHT README* RELEASENOTE sample*
+
+ newinitd "${FILESDIR}/${PN}.initd-r4" ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ insopts -m 0600 -o ${PN} -g ${PN}
+ insinto /etc/${PN}
+ newins sample-etc_${PN}.conf ${PN}.conf
+ newins sample-etc_${PN}.conf ${PN}.conf.sample
+}
diff --git a/net-dns/ddclient/ddclient-3.8.3.ebuild b/net-dns/ddclient/ddclient-3.8.3.ebuild
new file mode 100644
index 000000000000..5ba587c41d29
--- /dev/null
+++ b/net-dns/ddclient/ddclient-3.8.3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit systemd user
+
+DESCRIPTION="Perl updater client for dynamic DNS services"
+HOMEPAGE="http://ddclient.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~x86 ~x86-fbsd"
+IUSE="cloudflare hardened"
+
+RDEPEND=">=dev-lang/perl-5.1
+ virtual/perl-Digest-SHA
+ dev-perl/IO-Socket-SSL
+ cloudflare? ( dev-perl/JSON-Any )
+ hardened? ( sys-apps/iproute2 )
+"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_prepare() {
+ default
+
+ # Remove pid setting because we can't leave it user configurable and
+ # reliably setup the environment for the init script to stop ${PN}
+ ebegin "Removing PID setting from ${PN}.conf"
+ sed '/^pid/d' -i "sample-etc_${PN}.conf" || die
+ eend $?
+}
+
+src_install() {
+ dosbin ${PN}
+ dodoc Change* COPYRIGHT README* RELEASENOTE sample*
+
+ newinitd "${FILESDIR}/${PN}.initd-r4" ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ insopts -m 0600 -o ${PN} -g ${PN}
+ insinto /etc/${PN}
+ newins sample-etc_${PN}.conf ${PN}.conf
+ newins sample-etc_${PN}.conf ${PN}.conf.sample
+}
diff --git a/net-dns/ddclient/files/cmd-over-cfg.patch b/net-dns/ddclient/files/cmd-over-cfg.patch
new file mode 100644
index 000000000000..9033873fde74
--- /dev/null
+++ b/net-dns/ddclient/files/cmd-over-cfg.patch
@@ -0,0 +1,11 @@
+--- ddclient.old 2011-11-13 10:14:59.957846596 -0500
++++ ddclient 2011-11-13 10:18:33.864245944 -0500
+@@ -773,7 +773,7 @@
+ foreach my $h (sort keys %config) {
+ next if $config{$h}{'protocol'} ne lc($s);
+ $examined{$h} = 1;
+- my $use = $config{$h}{'use'} || opt('use');
++ my $use = opt('use') || $config{$h}{'use'};
+ local $opt{$use} = $config{$h}{$use} if $config{$h}{$use};
+ # bug #13: we should only do this once
+ # use isn't enough, we have to save the origin to.
diff --git a/net-dns/ddclient/files/ddclient.confd b/net-dns/ddclient/files/ddclient.confd
new file mode 100644
index 000000000000..2408a40bb6f4
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.confd
@@ -0,0 +1,2 @@
+# No need to specify a pid in /etc/ddclient/ddclient.conf
+PIDFILE=/var/run/ddclient/ddclient.pid
diff --git a/net-dns/ddclient/files/ddclient.confd-r1 b/net-dns/ddclient/files/ddclient.confd-r1
new file mode 100644
index 000000000000..69ad0eeff87d
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.confd-r1
@@ -0,0 +1,2 @@
+# No need to specify a pid in /etc/ddclient/ddclient.conf
+#PIDFILE=/var/run/ddclient/ddclient.pid
diff --git a/net-dns/ddclient/files/ddclient.initd-r3 b/net-dns/ddclient/files/ddclient.initd-r3
new file mode 100644
index 000000000000..e0606a60b11c
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.initd-r3
@@ -0,0 +1,57 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+if [ -d /run ] ; then
+ PIDFILE=${PIDFILE:-/run/ddclient/ddclient.pid}
+else
+ PIDFILE=${PIDFILE:-/var/run/ddclient/ddclient.pid}
+fi
+
+depend() {
+ before cron
+ need net
+ use dns logger squid
+}
+
+checkconfig() {
+ local conf="/etc/ddclient/ddclient.conf"
+
+ if [ -e "${conf}" ] ; then
+ if [ -n "$(find /etc/ddclient -maxdepth 1 -name ddclient.conf -perm +0044)" ] ; then
+ eerror "${conf} must not be world or group readable. Try:"
+ eerror " chmod 600 ${conf}"
+ eerror " chown ddclient:ddclient ${conf}"
+ return 1
+ fi
+ else
+ eerror "${conf} is needed to run ddclient"
+ eerror "There is a sample file in /etc/ddclient/"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ local piddir=$(dirname ${PIDFILE})
+ if [ ! -d ${piddir} ] ; then
+ ebegin "Making ${piddir}"
+ mkdir -p ${piddir}
+ eend $?
+ ebegin "Changing permissions of ${piddir}"
+ chown ddclient:ddclient ${piddir}
+ eend $?
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --user ddclient --exec /usr/sbin/ddclient \
+ --name ddclient --pidfile ${PIDFILE} -- -pid=${PIDFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --signal USR1 --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-dns/ddclient/files/ddclient.initd-r4 b/net-dns/ddclient/files/ddclient.initd-r4
new file mode 100644
index 000000000000..c25f02965196
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.initd-r4
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PIDFILE="/run/ddclient/ddclient.pid"
+
+depend() {
+ before cron
+ need net
+ use dns logger squid
+}
+
+checkconfig() {
+ checkpath -f -m 0600 -o ddclient:ddclient /etc/ddclient/ddclient.conf || return 1
+ checkpath -d -m 0700 -o ddclient:ddclient /run/ddclient || return 1
+ checkpath -d -m 0700 -o ddclient:ddclient /var/cache/ddclient || return 1
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start \
+ --user ddclient \
+ --name ddclient \
+ --pidfile ${PIDFILE} \
+ --exec /usr/sbin/ddclient -- -pid=${PIDFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --signal USR1 --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-dns/ddclient/files/ddclient.service b/net-dns/ddclient/files/ddclient.service
new file mode 100644
index 000000000000..e2d3608d44d4
--- /dev/null
+++ b/net-dns/ddclient/files/ddclient.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Dynamic DNS Update Client
+After=network.target
+ConditionPathExists=/etc/ddclient/ddclient.conf
+
+[Service]
+ExecStart=/usr/sbin/ddclient --foreground
+User=ddclient
+Group=ddclient
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/ddclient/files/iproute2.patch b/net-dns/ddclient/files/iproute2.patch
new file mode 100644
index 000000000000..f81dd8c00d82
--- /dev/null
+++ b/net-dns/ddclient/files/iproute2.patch
@@ -0,0 +1,30 @@
+diff -u a/ddclient b/ddclient
+--- a/ddclient 2011-07-11 17:04:21.000000000 -0400
++++ b/ddclient 2011-08-12 20:13:15.980466303 -0400
+@@ -588,7 +588,7 @@
+ [ "ip", "=s", "-ip address : set the IP address to 'address'" ],
+ "",
+ [ "if", "=s", "-if interface : obtain IP address from 'interface'" ],
+- [ "if-skip", "=s", "-if-skip pattern : skip any IP addresses before 'pattern' in the output of ifconfig {if}" ],
++ [ "if-skip", "=s", "-if-skip pattern : skip any IP addresses before 'pattern' in the output of ip addr show {if}" ],
+ "",
+ [ "web", "=s", "-web provider|url : obtain IP address from provider's IP checking page" ],
+ [ "web-skip", "=s", "-web-skip pattern : skip any IP addresses before 'pattern' on the web provider|url" ],
+@@ -1316,7 +1316,7 @@
+
+ {
+ local $opt{'use'} = 'if';
+- foreach my $if (grep {/^[a-zA-Z]/} `ifconfig -a`) {
++ foreach my $if (grep {/^[a-zA-Z]/} `ip addr show`) {
+ $if =~ s/:?\s.*//is;
+ local $opt{'if'} = $if;
+ printf "use=if, if=%s address is %s\n", opt('if'), define(get_ip('if'), 'NOT FOUND');
+@@ -1937,7 +1937,7 @@
+
+ } elsif ($use eq 'if') {
+ $skip = opt('if-skip', $h) || '';
+- $reply = `ifconfig $arg 2> /dev/null`;
++ $reply = `ip addr show $arg 2> /dev/null`;
+ $reply = '' if $?;
+
+ } elsif ($use eq 'cmd') {
diff --git a/net-dns/ddclient/metadata.xml b/net-dns/ddclient/metadata.xml
new file mode 100644
index 000000000000..e4faff9063ad
--- /dev/null
+++ b/net-dns/ddclient/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>titanofold@gentoo.org</email>
+ <name>Aaron W. Swenson</name>
+ </maintainer>
+ <use>
+ <flag name="cloudflare">Enable support for updating IP address via CloudFlare</flag>
+ <flag name="hardened">Use iproute2 instead of ifconfig to grab an IP address</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ddclient</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/djbdns/Manifest b/net-dns/djbdns/Manifest
new file mode 100644
index 000000000000..d5c08ec96694
--- /dev/null
+++ b/net-dns/djbdns/Manifest
@@ -0,0 +1,21 @@
+AUX 1.05-errno-r1.patch 242 SHA256 0cf77c0386d422dc9ead4af71eb02f76d5a214ccd68e0e2c2cf9f774247cc19c SHA512 086d02600034d486f084fd2500aba9041dfa02110781594cdc3781a3ad7823f61f11c54c053c8c1241f58660527abe536906aba0e7f6c49ed3b8dbd74ba8f2b7 WHIRLPOOL 7aa306a7b1b8cf3db3ebf9318d55d40ea11841a9ce06e8bfc5fbb98d672db50751ad297e011c612c0ab19bdb062fb3b62af6d6f5d92122aab911fd5a751a82df
+AUX CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25-r1.patch 9944 SHA256 5d23fed3571c34b4032a6e5e724041bbe841b28393c5d66763c7108d664d63bf SHA512 6c40018bfe97f9ed2ab1bb4034ceb20089edc93514a4c9931a5e1f09cb6d9a8f221eb9652b3b1485f80df643a1fb1d2c88ff148421e86af7cf7b1485b9c61c30 WHIRLPOOL 481d450d013b7145233849a0cb2100db80668585db32fe3720646c146192dca289675e2796ee1425995f64fede19302ecaffe3115b49ef4a6e561cd4b6dc1db2
+AUX CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-r1.patch 9914 SHA256 9758afe41847938719321669ff41a5d6737f48f1016bd3c6e87e6ef9eac2d3f2 SHA512 59e9aae2fd8e7c1e4d275066afceaade3b1276c6cda78cd58fef1dfbe9749c9e1bb415a80643b3c50a33372166aec055a9b3a6bcb3ed4cfd77e6e6038e069cff WHIRLPOOL 3ac8c6190ad389ef3e797c90612d633873be420a3fdcc6ed6c73da41c782ace7f1d874a91837e09b73bfd8f77767c200c95dc47c29d442cb6555291a9abfb89d
+AUX CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch 3043 SHA256 0e6312ab8408d98bc3e6d1b1cddc36f51a5cd092db14bd3f84a8f47d08070c27 SHA512 f830bfd2fabd4d9b4e2649bcc4061d656d4645b93829415d070b26c6a22e8e17d941666b8e776947bf9a8ef93007f77d8be57fc9911dcc6dc2b7ac607d556ba0 WHIRLPOOL 0cca02943cf7eb95f5d33863144f5c9500bdb5c9928416cf043accf91461bc4baa31dc34b3a320a8a72ca3adcb79806d92e5c81343b719706d2242c825df05f7
+AUX CVE2008-4392_0002-dnscache-cache-soa-records.patch 2944 SHA256 1cd7b848305646d3015d8f2817acdced65894b8ab6e9dacb02077acebc50841b SHA512 f65ca7dfc8e85f469f22d72a1c79126c35243dc077abf4b688eb7d057f19456dc8a3665f558a8a3c1908f96fa1838792aa1bc317d2e89f4953020828c05926e6 WHIRLPOOL 1c7edee4de746283d53517bbcac7936ed69276865e7d78f4d7b2aa6175b534e474005cc3cf2fc85bc956508a6583a527fec5a68221b47c38922b356ae40fb69b
+AUX CVE2009-0858_0001-check-response-domain-name-length.patch 366 SHA256 8ca8bd81fa6fb17576f11de9e97a582f0c30d7f5c6e797defa41a98d33770e33 SHA512 aa5fe75be9db07b25e313145a209a06a05693141c1dd850987e80062e22014056e3055efee4d219475c9a51f25c04a7a46b3d7a2fb3976226e66585cef076f83 WHIRLPOOL 53e607ed9023a16bb96c132b2c237bca542c0d78fdd36c109ba808ca8f3c24f872d8fac48d10c7b7992fc5fa40f7495f64fc96430898a19aacf2a1f0795eebe7
+AUX CVE2012-1191_0001-ghost-domain-attack.patch 642 SHA256 79d5e7371e97dbdcd261e9c18e14102bb53b2031ce447d80612c09a5ada44022 SHA512 44e205b9a19dbbd405cb57b119f307e5bbdba8fa1124187b53848791c1538f7c01dab43cb34b9332d3258756eb3c0606d36e8b18adcff3c814f0f2cff4ec6822 WHIRLPOOL 6b314776968e704e75094ecfa5d4579d7c6d7a740fe485cff8ddbf4346e51089a41d1bf023a7b049cc77326b3f44ac0150a364b85b9017f4abf0f9fb06706c8a
+AUX dnsroots.patch 296 SHA256 9fe0552708f6cacd2ace4dca21e3f393acc01e73ac9e2b622aa4fe3a5874fe48 SHA512 2c745f2545d791ed6646406e749ef8e85c30b4546657ce241c413103e42cf3cfb5001c46481bd2966390563a9cc42e53e44519747350da2b8bb0fdf1d0f5c62e WHIRLPOOL 44ef58d43e35c33cf78439cefe9e5888f4f27f2151b36b7192aea0730eb3f0d5f7f9591dd6831c6aa286b23415f8e0cdc67a498d175a4583701f5f8ab795ac50
+AUX dnstracesort.patch 327 SHA256 f1d83e1365f68571fa4e007d5219720f8d65eb3730040a087fceb0ce2d8806bf SHA512 ae9cd51f24041aed135b5ba88d1efd0310b8095bccd6fb60a986756b460a4f98a93e163c3ddae7c146d56a9d41778d17449f772b91fdc58d9e69523cf6c2a6e9 WHIRLPOOL 4006c47b039623c8bba8718716a442a3d2dc1705936f83cd1556e4b49cc3de0dc7c6e828e908130bc7584809f551fac68f12f466e21cefd666076db8e63d4399
+AUX headtail-r1.patch 1756 SHA256 daec7b45c91e2db2607697eeba8034e13c6d99c7d8d521f462955dc2fce968b2 SHA512 be4c9aea40c737364a56f188ad2276d90deac0dffb73ba4b659490836c0fe92ffb65ccf23c6724b913b2d6354336727004be0cf5b43ebc47abe7004700dfe1e8 WHIRLPOOL a30025b151e9e81796b4c220475049797ed1e9434821d4e2499cd8912479635c6bd820e735f8fac5faae79edeee9abec8e2452aeee7f0e1704cc001cae64ef96
+AUX increase-cname-recustion-depth.patch 1164 SHA256 ba3460f692ca3238ab0afdb0f19cee42bcbd8fcf74bd2564a778a65027681c1e SHA512 a6ff23d44697ebe920bab7be58618f73dbbdd8cde4af4ac3e7455ee2b34a18f94cb2491b4b9ca306525aa5ee43e724f7b0ddddd58ac2702bd3cf75e0bb160431 WHIRLPOOL 2a0d0b6b44476c603a9c6edd7ba9e441618d559135805ed31edb451fd223619fd3f2e4e94004fbd4767ceb8e182e816a3ce046cb7a99608ce611eeeba8aad87f
+AUX makefile-parallel-test25.patch 2828 SHA256 7fb572ac45d089ddc8a69789c857c13cb84f6a51023544e94459b624282a896b SHA512 0bb89b7141f74906f4bebf5ccc46dad5a4f9147048bfebd78f84a10b0d09f20c75ddb5e935d3e26ba9ce4f51c30270140dd635ab9e8d5ffdfb2aed94399cbe71 WHIRLPOOL 025222dc59da657e87fc9522dcec75f9f35ce405b78e0cd38d96c11470ae36732f1c616c617b63132c4b0ef51b0f5d1b8fd85eb12bb776c8f46000180e2bd104
+AUX srv_record_support.patch 5423 SHA256 0dffcfc7947fd37fba0d62a391d620049bd2845ff35573112c4bb60ffd900782 SHA512 2efedc7c7aaa209bb4a9d65ef1b28934d68c216fd428a27a099ba4801e8be04e1417bdbbf0077088264cd8bc3eb2441855c96890189d8d73804243e6ca4d0851 WHIRLPOOL c8ff0eef4bd77c5f4590c01c19b82277d31b0a7d1689d8952f76425a7027a6b8e9f0b26d413aa1f42be05b518692d531034d901ae6e3e29207f0ca560fcfa05e
+AUX string_length_255.patch 299 SHA256 c9b8d0065cfe6d4a9ad460c31c2a75bcce17bfb8001f4448e3464dea07524401 SHA512 b451d23e1a45636dfae7cf69c64e3edde6b655bc0c7407586429e0d8282f17ef6215c6c33a6d238115c39d34fa57fa7699a7a10f146344c677fde10c0e207ac3 WHIRLPOOL 123bdee78c90909936a9af779925cb1da37b83a30e84cad7516f1ca8cf47d9a6445ec39103eb076dc834ec65976004f8bf9aabe63dfffd9604e1b70907c4bcb6
+DIST djbdns-1.05-man.tar.gz 17170 SHA256 ba1c58f14bc928908d8618230f400d73cfe2200ed800a272b63048e3e50be569 SHA512 98af7bd9033a2205fbbc0f23b7eab45b9756f6ceff5199a62952e19c89c9fe3c03495cb6f8621d388f883c40650309a1509095417df3f54af21a71350c4aa183 WHIRLPOOL b611e37e7422a4ae405fa15a4b9ff7eb8d0007d81310d044bc1982fe70dada1e4646cf22832e8e5320bae8d2e328eb87d59eb51c3d390f1089f30548053b839b
+DIST djbdns-1.05-test27.diff.bz2 20695 SHA256 0de38133336016d5a9159d0fe1beaea809e2229820256af114cbf911f04f202a SHA512 e5acf26ff353ae20b6c2186140255bf0ae478a75a9946163d4474a003afbf8c2f47e61a12fc3ed4b9eff17ec8732e9d91bfbb10fb2762310b067180b6d471ba0 WHIRLPOOL 5c89691836a349553531816a8b4c5b6edc18c2c0a1cf8309b67344ad04c9575fbc5f9d79dcf156aeb692ccd7a6fbd2ce2838fb2fd7b85bd6cd0693a9f657e66e
+DIST djbdns-1.05.tar.gz 85648 SHA256 3ccd826a02f3cde39be088e1fc6aed9fd57756b8f970de5dc99fcd2d92536b48 SHA512 20f066402801d7bec183cb710a5bc51e41f1410024741e5803e26f68f2c13567e48eba793f233dfab903459c3335bc169e24b99d66a4c64e617e1f0779732fa9 WHIRLPOOL 0fb67d19fcbf1cf21debcedfd3456d9cb9160079631ae1995e94aa9db3969ae02927f215ee8a5f03b34a6523cb9e3abebabf23e08e95eb1efdb626eb8b10312f
+EBUILD djbdns-1.05-r32.ebuild 4351 SHA256 a3e173a023db38c4f20fde498620219195e98a5ae49f1c2d2adef7b13d6c2ba9 SHA512 03311e521344f266b46fa0e72e319363c22f344d330422343f6f4fb7474017ca97b6361decb7956a5e396b067a00aa11c82769945bec34ae285302a99804fd95 WHIRLPOOL b72d67501240ef743ac79f38950dba5f5204b62c95db8ee44a21f6c27e47d5bb250a11a071ffc701bf168ab953ef90e893cd5c424bf4396f0f54dcf482521778
+MISC ChangeLog 4915 SHA256 8ee980a3b2097262d1e602d87598d1a37bd77cca3c61fe7de97590a070198a87 SHA512 6c25da38ea8965a07bda490c4e086b21ab7694e24ea6b55988ea0321ef1a63ca1d12c035d303e0aec35f3e44d2f802c29f283346f3d1e8d97e840ab349ba4215 WHIRLPOOL 9861dd13436e1fd79681971a17e9cd5202e9cb3384d465c9b36baa5bb9de5cc35a060564ed3f5cd8489e659eeb7972c21963c7b1277e0513292428256ed7006e
+MISC ChangeLog-2015 25660 SHA256 cf7b60a27d04d42e791803f46ce9d83b2e2f2217cdea4283483e70ff80f4fc7c SHA512 f71254675a3eba0663cb87c3ea8c4eb59a2dfbf328419515c2931aeda4a5927b5d8f974989e546ffa51c36fe84b6f2a780742abdd65a0048cf88da34351b9904 WHIRLPOOL cb2bbaee2a13d5b1cabaad029fec6895c4605fa7f60ad8b4ce79187b7c0364ce7d9ca5ad8fcd4585635cbe2a74dbf0c4aabaafde40a90e29c182ba6388009790
+MISC metadata.xml 244 SHA256 e017c9043889441d122efd4c2feecec335282a20ee0e88c87111e264fc71ff8a SHA512 125b00b9e85650a6dcc365871f9f8be44d85cde4b938a66f7d96b6dc0237a1cae68b30be1ee16d7850998fc31be35eaf459df1bb7d9ea169904854b532f37bab WHIRLPOOL b31eaa4e5069201623407695331e0d0cd64ec1199d26474a2e2800b521892db1d6443eb3fd533750a4193c2ce82372b77cd2cad7c77858a398c9d5c72ad62bec
diff --git a/net-dns/djbdns/djbdns-1.05-r32.ebuild b/net-dns/djbdns/djbdns-1.05-r32.ebuild
new file mode 100644
index 000000000000..acfed9c3992d
--- /dev/null
+++ b/net-dns/djbdns/djbdns-1.05-r32.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic readme.gentoo-r1 toolchain-funcs user
+
+DESCRIPTION="Collection of DNS client/server software"
+HOMEPAGE="http://cr.yp.to/djbdns.html"
+IPV6_PATCH="test27"
+
+SRC_URI="http://cr.yp.to/djbdns/${P}.tar.gz
+ http://smarden.org/pape/djb/manpages/${P}-man.tar.gz
+ ipv6? ( http://www.fefe.de/dns/${P}-${IPV6_PATCH}.diff.bz2 )"
+
+SLOT="0"
+LICENSE="public-domain"
+KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86"
+IUSE="ipv6 selinux"
+
+DEPEND=""
+RDEPEND="sys-apps/ucspi-tcp
+ virtual/daemontools
+ selinux? ( sec-policy/selinux-djbdns )"
+
+src_unpack(){
+ # Unpack both djbdns and its man pages to separate directories.
+ default
+
+ # Now move the man pages under ${S} so that user patches can be
+ # applied to them as well in src_prepare().
+ mv "${PN}-man" "${P}/man" || die "failed to transplant man pages"
+}
+
+src_prepare() {
+ eapply \
+ "${FILESDIR}/headtail-r1.patch" \
+ "${FILESDIR}/dnsroots.patch" \
+ "${FILESDIR}/dnstracesort.patch" \
+ "${FILESDIR}/string_length_255.patch" \
+ "${FILESDIR}/srv_record_support.patch" \
+ "${FILESDIR}/increase-cname-recustion-depth.patch"
+
+ # Fix CVE2009-0858
+ eapply "${FILESDIR}/CVE2009-0858_0001-check-response-domain-name-length.patch"
+
+ # Fix CVE2012-1191
+ eapply "${FILESDIR}/CVE2012-1191_0001-ghost-domain-attack.patch"
+
+ if use ipv6; then
+ elog 'At present dnstrace does NOT support IPv6. It will'\
+ 'be compiled without IPv6 support.'
+
+ # Create a separate copy of the source tree for dnstrace.
+ cp -pR "${S}" "${S}-noipv6" || die
+
+ # The big ipv6 patch.
+ eapply "${WORKDIR}/${P}-${IPV6_PATCH}.diff"
+
+ # Fix CVE2008-4392 (ipv6)
+ eapply \
+ "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25-r1.patch" \
+ "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch" \
+ "${FILESDIR}/makefile-parallel-test25.patch"
+
+ cd "${S}-noipv6" || die
+ fi
+
+ # Fix CVE2008-4392 (no ipv6)
+ eapply \
+ "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-r1.patch" \
+ "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records.patch"
+
+ # Later versions of the ipv6 patch include this, but even if
+ # USE=ipv6, we're in the ${S}-noipv6 directory at this point.
+ eapply "${FILESDIR}/${PV}-errno-r1.patch"
+
+ eapply_user
+}
+
+src_compile() {
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die
+ echo "/usr" > conf-home || die
+ emake
+
+ # If djbdns is compiled with IPv6 support, it breaks dnstrace.
+ # Therefore we must compile dnstrace separately without IPv6
+ # support.
+ if use ipv6; then
+ elog 'Compiling dnstrace without ipv6 support'
+ cp conf-cc conf-ld conf-home "${S}-noipv6/" || die
+ cd "${S}-noipv6" || die
+ emake dnstrace
+ fi
+}
+
+src_install() {
+ insinto /etc
+ doins dnsroots.global
+
+ into /usr
+ dobin *-conf dnscache tinydns walldns rbldns pickdns axfrdns \
+ *-get *-data *-edit dnsip dnsipq dnsname dnstxt dnsmx \
+ dnsfilter random-ip dnsqr dnsq dnstrace dnstracesort
+
+ if use ipv6; then
+ dobin dnsip6 dnsip6q "${S}-noipv6/dnstrace"
+ fi
+
+ dodoc CHANGES README
+
+ doman man/*.[158]
+
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ # The nofiles group is no longer provided by baselayout.
+ # Share it with qmail if possible.
+ enewgroup nofiles 200
+
+ enewuser dnscache -1 -1 -1 nofiles
+ enewuser dnslog -1 -1 -1 nofiles
+ enewuser tinydns -1 -1 -1 nofiles
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS='
+To configure djbdns, please follow the instructions at,
+
+ http://cr.yp.to/djbdns.html
+
+Of particular interest are,
+
+ axfrdns : http://cr.yp.to/djbdns/axfrdns-conf.html
+ dnscache: http://cr.yp.to/djbdns/run-cache-x-home.html
+ tinydns : http://cr.yp.to/djbdns/run-server.html
+
+Portage has created users for axfrdns, dnscache, and tinydns; the
+commands to configure these programs are,
+
+ 1. axfrdns-conf tinydns dnslog /var/axfrdns /var/tinydns $ip
+ 2. dnscache-conf dnscache dnslog /var/dnscache $ip
+ 3. tinydns-conf tinydns dnslog /var/tinydns $ip
+
+(replace $ip with the ip address on which the server will run).
+
+If you wish to configure rbldns or walldns, you will need to create
+those users yourself (although you should still use the "dnslog"
+user for the logs):
+
+ 4. rbldns-conf $username dnslog /var/rbldns $ip $base
+ 5. walldns-conf $username dnslog /var/walldns $ip
+'
diff --git a/net-dns/djbdns/files/1.05-errno-r1.patch b/net-dns/djbdns/files/1.05-errno-r1.patch
new file mode 100644
index 000000000000..58f2f4b6c97a
--- /dev/null
+++ b/net-dns/djbdns/files/1.05-errno-r1.patch
@@ -0,0 +1,11 @@
+--- a/error.h 2001-02-11 15:11:45.000000000 -0600
++++ b/error.h 2003-02-26 02:10:21.000000000 -0600
+@@ -1,7 +1,7 @@
+ #ifndef ERROR_H
+ #define ERROR_H
+
+-extern int errno;
++#include <errno.h>
+
+ extern int error_intr;
+ extern int error_nomem;
diff --git a/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25-r1.patch b/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25-r1.patch
new file mode 100644
index 000000000000..1d132d6d4f5e
--- /dev/null
+++ b/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test25-r1.patch
@@ -0,0 +1,351 @@
+diff --git a/Makefile b/Makefile
+index 5ccd647..eee09dd 100644
+--- a/Makefile
++++ b/Makefile
+@@ -346,11 +346,11 @@ stralloc.h iopause.h taia.h tai.h uint64.h taia.h
+ ./compile dns_txt.c
+
+ dnscache: \
+-load dnscache.o droproot.o okclient.o log.o cache.o query.o \
++load dnscache.o droproot.o okclient.o log.o cache.o query.o qmerge.o \
+ response.o dd.o roots.o iopause.o prot.o dns.a env.a alloc.a buffer.a \
+ libtai.a unix.a byte.a socket.lib
+ ./load dnscache droproot.o okclient.o log.o cache.o \
+- query.o response.o dd.o roots.o iopause.o prot.o dns.a \
++ query.o qmerge.o response.o dd.o roots.o iopause.o prot.o dns.a \
+ env.a alloc.a buffer.a libtai.a unix.a byte.a `cat \
+ socket.lib`
+
+@@ -371,7 +371,7 @@ compile dnscache.c env.h exit.h scan.h strerr.h error.h ip4.h \
+ uint16.h uint64.h socket.h uint16.h dns.h stralloc.h gen_alloc.h \
+ iopause.h taia.h tai.h uint64.h taia.h taia.h byte.h roots.h fmt.h \
+ iopause.h query.h dns.h uint32.h alloc.h response.h uint32.h cache.h \
+-uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h
++uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h maxclient.h
+ ./compile dnscache.c
+
+ dnsfilter: \
+@@ -749,11 +749,16 @@ qlog.o: \
+ compile qlog.c buffer.h qlog.h uint16.h
+ ./compile qlog.c
+
++qmerge.o: \
++compile qmerge.c qmerge.h dns.h stralloc.h gen_alloc.h iopause.h \
++taia.h tai.h uint64.h log.h maxclient.h
++ ./compile qmerge.c
++
+ query.o: \
+ compile query.c error.h roots.h log.h uint64.h case.h cache.h \
+ uint32.h uint64.h byte.h dns.h stralloc.h gen_alloc.h iopause.h \
+ taia.h tai.h uint64.h taia.h uint64.h uint32.h uint16.h dd.h alloc.h \
+-response.h uint32.h query.h dns.h uint32.h
++response.h uint32.h query.h dns.h uint32.h qmerge.h
+ ./compile query.c
+
+ random-ip: \
+diff --git a/dnscache.c b/dnscache.c
+index abcba69..c84e4b8 100644
+--- a/dnscache.c
++++ b/dnscache.c
+@@ -23,6 +23,7 @@
+ #include "log.h"
+ #include "okclient.h"
+ #include "droproot.h"
++#include "maxclient.h"
+
+ long interface;
+
+@@ -59,7 +60,6 @@ uint64 numqueries = 0;
+
+ static int udp53;
+
+-#define MAXUDP 200
+ static struct udpclient {
+ struct query q;
+ struct taia start;
+@@ -136,7 +136,6 @@ void u_new(void)
+
+ static int tcp53;
+
+-#define MAXTCP 20
+ struct tcpclient {
+ struct query q;
+ struct taia start;
+diff --git a/log.c b/log.c
+index df465e2..1b0d98c 100644
+--- a/log.c
++++ b/log.c
+@@ -149,6 +149,13 @@ void log_tx(const char *q,const char qtype[2],const char *control,const char ser
+ line();
+ }
+
++void log_tx_piggyback(const char *q, const char qtype[2], const char *control)
++{
++ string("txpb ");
++ logtype(qtype); space(); name(q); space(); name(control);
++ line();
++}
++
+ void log_cachedanswer(const char *q,const char type[2])
+ {
+ string("cached "); logtype(type); space();
+diff --git a/log.h b/log.h
+index fe62fa3..d9a829b 100644
+--- a/log.h
++++ b/log.h
+@@ -18,6 +18,7 @@ extern void log_cachednxdomain(const char *);
+ extern void log_cachedns(const char *,const char *);
+
+ extern void log_tx(const char *,const char *,const char *,const char *,unsigned int);
++extern void log_tx_piggyback(const char *,const char *,const char *);
+
+ extern void log_nxdomain(const char *,const char *,unsigned int);
+ extern void log_nodata(const char *,const char *,const char *,unsigned int);
+diff --git a/maxclient.h b/maxclient.h
+new file mode 100644
+index 0000000..e52fcd1
+--- /dev/null
++++ b/maxclient.h
+@@ -0,0 +1,7 @@
++#ifndef MAXCLIENT_H
++#define MAXCLIENT_H
++
++#define MAXUDP 200
++#define MAXTCP 20
++
++#endif /* MAXCLIENT_H */
+diff --git a/qmerge.c b/qmerge.c
+new file mode 100644
+index 0000000..7c92299
+--- /dev/null
++++ b/qmerge.c
+@@ -0,0 +1,115 @@
++#include "qmerge.h"
++#include "byte.h"
++#include "log.h"
++#include "maxclient.h"
++
++#define QMERGE_MAX (MAXUDP+MAXTCP)
++struct qmerge inprogress[QMERGE_MAX];
++
++static
++int qmerge_key_init(struct qmerge_key *qmk, const char *q, const char qtype[2],
++ const char *control)
++{
++ if (!dns_domain_copy(&qmk->q, q)) return 0;
++ byte_copy(qmk->qtype, 2, qtype);
++ if (!dns_domain_copy(&qmk->control, control)) return 0;
++ return 1;
++}
++
++static
++int qmerge_key_equal(struct qmerge_key *a, struct qmerge_key *b)
++{
++ return
++ byte_equal(a->qtype, 2, b->qtype) &&
++ dns_domain_equal(a->q, b->q) &&
++ dns_domain_equal(a->control, b->control);
++}
++
++static
++void qmerge_key_free(struct qmerge_key *qmk)
++{
++ dns_domain_free(&qmk->q);
++ dns_domain_free(&qmk->control);
++}
++
++void qmerge_free(struct qmerge **x)
++{
++ struct qmerge *qm;
++
++ qm = *x;
++ *x = 0;
++ if (!qm || !qm->active) return;
++
++ qm->active--;
++ if (!qm->active) {
++ qmerge_key_free(&qm->key);
++ dns_transmit_free(&qm->dt);
++ }
++}
++
++int qmerge_start(struct qmerge **qm, const char servers[64], int flagrecursive,
++ const char *q, const char qtype[2], const char localip[4],
++ const char *control)
++{
++ struct qmerge_key k;
++ int i;
++ int r;
++
++ qmerge_free(qm);
++
++ byte_zero(&k, sizeof k);
++ if (!qmerge_key_init(&k, q, qtype, control)) return -1;
++ for (i = 0; i < QMERGE_MAX; i++) {
++ if (!inprogress[i].active) continue;
++ if (!qmerge_key_equal(&k, &inprogress[i].key)) continue;
++ log_tx_piggyback(q, qtype, control);
++ inprogress[i].active++;
++ *qm = &inprogress[i];
++ qmerge_key_free(&k);
++ return 0;
++ }
++
++ for (i = 0; i < QMERGE_MAX; i++)
++ if (!inprogress[i].active)
++ break;
++ if (i == QMERGE_MAX) return -1;
++
++ log_tx(q, qtype, control, servers, 0);
++ r = dns_transmit_start(&inprogress[i].dt, servers, flagrecursive, q, qtype, localip);
++ if (r == -1) { qmerge_key_free(&k); return -1; }
++ inprogress[i].active++;
++ inprogress[i].state = 0;
++ qmerge_key_free(&inprogress[i].key);
++ byte_copy(&inprogress[i].key, sizeof k, &k);
++ *qm = &inprogress[i];
++ return 0;
++}
++
++void qmerge_io(struct qmerge *qm, iopause_fd *io, struct taia *deadline)
++{
++ if (qm->state == 0) {
++ dns_transmit_io(&qm->dt, io, deadline);
++ qm->state = 1;
++ }
++ else {
++ io->fd = -1;
++ io->events = 0;
++ }
++}
++
++int qmerge_get(struct qmerge **x, const iopause_fd *io, const struct taia *when)
++{
++ int r;
++ struct qmerge *qm;
++
++ qm = *x;
++ if (qm->state == -1) return -1; /* previous error */
++ if (qm->state == 0) return 0; /* no packet */
++ if (qm->state == 2) return 1; /* already got packet */
++
++ r = dns_transmit_get(&qm->dt, io, when);
++ if (r == -1) { qm->state = -1; return -1; } /* error */
++ if (r == 0) { qm->state = 0; return 0; } /* must wait for i/o */
++ if (r == 1) { qm->state = 2; return 1; } /* got packet */
++ return -1; /* bug */
++}
+diff --git a/qmerge.h b/qmerge.h
+new file mode 100644
+index 0000000..9a58157
+--- /dev/null
++++ b/qmerge.h
+@@ -0,0 +1,24 @@
++#ifndef QMERGE_H
++#define QMERGE_H
++
++#include "dns.h"
++
++struct qmerge_key {
++ char *q;
++ char qtype[2];
++ char *control;
++};
++
++struct qmerge {
++ int active;
++ struct qmerge_key key;
++ struct dns_transmit dt;
++ int state; /* -1 = error, 0 = need io, 1 = need get, 2 = got packet */
++};
++
++extern int qmerge_start(struct qmerge **,const char *,int,const char *,const char *,const char *,const char *);
++extern void qmerge_io(struct qmerge *,iopause_fd *,struct taia *);
++extern int qmerge_get(struct qmerge **,const iopause_fd *,const struct taia *);
++extern void qmerge_free(struct qmerge **);
++
++#endif /* QMERGE_H */
+diff --git a/query.c b/query.c
+index d61b20c..d9be8b8 100644
+--- a/query.c
++++ b/query.c
+@@ -84,7 +84,7 @@ static void cleanup(struct query *z)
+ int j;
+ int k;
+
+- dns_transmit_free(&z->dt);
++ qmerge_free(&z->qm);
+ for (j = 0;j < QUERY_MAXALIAS;++j)
+ dns_domain_free(&z->alias[j]);
+ for (j = 0;j < QUERY_MAXLEVEL;++j) {
+@@ -624,15 +624,9 @@ static int doit(struct query *z,int state)
+ if (j == 256) goto SERVFAIL;
+
+ dns_sortip6(z->servers[z->level],256);
+- if (z->level) {
+- dtype = z->ipv6[z->level] ? DNS_T_AAAA : DNS_T_A;
+- log_tx(z->name[z->level],dtype,z->control[z->level],z->servers[z->level],z->level);
+- if (dns_transmit_start(&z->dt,z->servers[z->level],flagforwardonly,z->name[z->level],dtype,z->localip) == -1) goto DIE;
+- }
+- else {
+- log_tx(z->name[0],z->type,z->control[0],z->servers[0],0);
+- if (dns_transmit_start(&z->dt,z->servers[0],flagforwardonly,z->name[0],z->type,z->localip) == -1) goto DIE;
+- }
++ dtype = z->level ? (z->ipv6[z->level] ? DNS_T_AAAA : DNS_T_A) : z->type;
++ if (qmerge_start(&z->qm,z->servers[z->level],flagforwardonly,z->name[z->level],dtype,z->localip,z->control[z->level]) == -1) goto DIE;
++
+ return 0;
+
+
+@@ -646,10 +640,10 @@ static int doit(struct query *z,int state)
+
+ HAVEPACKET:
+ if (++z->loop == 200) goto DIE;
+- buf = z->dt.packet;
+- len = z->dt.packetlen;
++ buf = z->qm->dt.packet;
++ len = z->qm->dt.packetlen;
+
+- whichserver = z->dt.servers + 16 * z->dt.curserver;
++ whichserver = z->qm->dt.servers + 16 * z->qm->dt.curserver;
+ control = z->control[z->level];
+ d = z->name[z->level];
+ /* dtype = z->level ? DNS_T_A : z->type; */
+@@ -1071,7 +1065,7 @@ int query_start(struct query *z,char *dn,char type[2],char class[2],char localip
+
+ int query_get(struct query *z,iopause_fd *x,struct taia *stamp)
+ {
+- switch(dns_transmit_get(&z->dt,x,stamp)) {
++ switch(qmerge_get(&z->qm,x,stamp)) {
+ case 1:
+ return doit(z,1);
+ case -1:
+@@ -1082,5 +1076,5 @@ int query_get(struct query *z,iopause_fd *x,struct taia *stamp)
+
+ void query_io(struct query *z,iopause_fd *x,struct taia *deadline)
+ {
+- dns_transmit_io(&z->dt,x,deadline);
++ qmerge_io(z->qm,x,deadline);
+ }
+diff --git a/query.h b/query.h
+index 61812aa..93a322e 100644
+--- a/query.h
++++ b/query.h
+@@ -1,7 +1,7 @@
+ #ifndef QUERY_H
+ #define QUERY_H
+
+-#include "dns.h"
++#include "qmerge.h"
+ #include "uint32.h"
+
+ #define QUERY_MAXLEVEL 5
+@@ -22,7 +22,7 @@ struct query {
+ uint32 scope_id;
+ char type[2];
+ char class[2];
+- struct dns_transmit dt;
++ struct qmerge *qm;
+ } ;
+
+ extern int query_start(struct query *,char *,char *,char *,char *,unsigned int);
diff --git a/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-r1.patch b/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-r1.patch
new file mode 100644
index 000000000000..57e50955e69c
--- /dev/null
+++ b/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-r1.patch
@@ -0,0 +1,349 @@
+diff --git a/Makefile b/Makefile
+index 1429643..bc047c0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -318,11 +318,11 @@ stralloc.h iopause.h taia.h tai.h uint64.h taia.h
+ ./compile dns_txt.c
+
+ dnscache: \
+-load dnscache.o droproot.o okclient.o log.o cache.o query.o \
++load dnscache.o droproot.o okclient.o log.o cache.o query.o qmerge.o \
+ response.o dd.o roots.o iopause.o prot.o dns.a env.a alloc.a buffer.a \
+ libtai.a unix.a byte.a socket.lib
+ ./load dnscache droproot.o okclient.o log.o cache.o \
+- query.o response.o dd.o roots.o iopause.o prot.o dns.a \
++ query.o qmerge.o response.o dd.o roots.o iopause.o prot.o dns.a \
+ env.a alloc.a buffer.a libtai.a unix.a byte.a `cat \
+ socket.lib`
+
+@@ -343,7 +343,7 @@ compile dnscache.c env.h exit.h scan.h strerr.h error.h ip4.h \
+ uint16.h uint64.h socket.h uint16.h dns.h stralloc.h gen_alloc.h \
+ iopause.h taia.h tai.h uint64.h taia.h taia.h byte.h roots.h fmt.h \
+ iopause.h query.h dns.h uint32.h alloc.h response.h uint32.h cache.h \
+-uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h
++uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h maxclient.h
+ ./compile dnscache.c
+
+ dnsfilter: \
+@@ -687,11 +687,16 @@ qlog.o: \
+ compile qlog.c buffer.h qlog.h uint16.h
+ ./compile qlog.c
+
++qmerge.o: \
++compile qmerge.c qmerge.h dns.h stralloc.h gen_alloc.h iopause.h \
++taia.h tai.h uint64.h log.h maxclient.h
++ ./compile qmerge.c
++
+ query.o: \
+ compile query.c error.h roots.h log.h uint64.h case.h cache.h \
+ uint32.h uint64.h byte.h dns.h stralloc.h gen_alloc.h iopause.h \
+ taia.h tai.h uint64.h taia.h uint64.h uint32.h uint16.h dd.h alloc.h \
+-response.h uint32.h query.h dns.h uint32.h
++response.h uint32.h query.h dns.h uint32.h qmerge.h
+ ./compile query.c
+
+ random-ip: \
+diff --git a/dnscache.c b/dnscache.c
+index 8c899a3..5ccb16a 100644
+--- a/dnscache.c
++++ b/dnscache.c
+@@ -22,6 +22,7 @@
+ #include "log.h"
+ #include "okclient.h"
+ #include "droproot.h"
++#include "maxclient.h"
+
+ static int packetquery(char *buf,unsigned int len,char **q,char qtype[2],char qclass[2],char id[2])
+ {
+@@ -54,7 +55,6 @@ uint64 numqueries = 0;
+
+ static int udp53;
+
+-#define MAXUDP 200
+ static struct udpclient {
+ struct query q;
+ struct taia start;
+@@ -131,7 +131,6 @@ void u_new(void)
+
+ static int tcp53;
+
+-#define MAXTCP 20
+ struct tcpclient {
+ struct query q;
+ struct taia start;
+diff --git a/log.c b/log.c
+index c43e8b0..b8cd7ce 100644
+--- a/log.c
++++ b/log.c
+@@ -150,6 +150,13 @@ void log_tx(const char *q,const char qtype[2],const char *control,const char ser
+ line();
+ }
+
++void log_tx_piggyback(const char *q, const char qtype[2], const char *control)
++{
++ string("txpb ");
++ logtype(qtype); space(); name(q); space(); name(control);
++ line();
++}
++
+ void log_cachedanswer(const char *q,const char type[2])
+ {
+ string("cached "); logtype(type); space();
+diff --git a/log.h b/log.h
+index fe62fa3..d9a829b 100644
+--- a/log.h
++++ b/log.h
+@@ -18,6 +18,7 @@ extern void log_cachednxdomain(const char *);
+ extern void log_cachedns(const char *,const char *);
+
+ extern void log_tx(const char *,const char *,const char *,const char *,unsigned int);
++extern void log_tx_piggyback(const char *,const char *,const char *);
+
+ extern void log_nxdomain(const char *,const char *,unsigned int);
+ extern void log_nodata(const char *,const char *,const char *,unsigned int);
+diff --git a/maxclient.h b/maxclient.h
+new file mode 100644
+index 0000000..e52fcd1
+--- /dev/null
++++ b/maxclient.h
+@@ -0,0 +1,7 @@
++#ifndef MAXCLIENT_H
++#define MAXCLIENT_H
++
++#define MAXUDP 200
++#define MAXTCP 20
++
++#endif /* MAXCLIENT_H */
+diff --git a/qmerge.c b/qmerge.c
+new file mode 100644
+index 0000000..7c92299
+--- /dev/null
++++ b/qmerge.c
+@@ -0,0 +1,115 @@
++#include "qmerge.h"
++#include "byte.h"
++#include "log.h"
++#include "maxclient.h"
++
++#define QMERGE_MAX (MAXUDP+MAXTCP)
++struct qmerge inprogress[QMERGE_MAX];
++
++static
++int qmerge_key_init(struct qmerge_key *qmk, const char *q, const char qtype[2],
++ const char *control)
++{
++ if (!dns_domain_copy(&qmk->q, q)) return 0;
++ byte_copy(qmk->qtype, 2, qtype);
++ if (!dns_domain_copy(&qmk->control, control)) return 0;
++ return 1;
++}
++
++static
++int qmerge_key_equal(struct qmerge_key *a, struct qmerge_key *b)
++{
++ return
++ byte_equal(a->qtype, 2, b->qtype) &&
++ dns_domain_equal(a->q, b->q) &&
++ dns_domain_equal(a->control, b->control);
++}
++
++static
++void qmerge_key_free(struct qmerge_key *qmk)
++{
++ dns_domain_free(&qmk->q);
++ dns_domain_free(&qmk->control);
++}
++
++void qmerge_free(struct qmerge **x)
++{
++ struct qmerge *qm;
++
++ qm = *x;
++ *x = 0;
++ if (!qm || !qm->active) return;
++
++ qm->active--;
++ if (!qm->active) {
++ qmerge_key_free(&qm->key);
++ dns_transmit_free(&qm->dt);
++ }
++}
++
++int qmerge_start(struct qmerge **qm, const char servers[64], int flagrecursive,
++ const char *q, const char qtype[2], const char localip[4],
++ const char *control)
++{
++ struct qmerge_key k;
++ int i;
++ int r;
++
++ qmerge_free(qm);
++
++ byte_zero(&k, sizeof k);
++ if (!qmerge_key_init(&k, q, qtype, control)) return -1;
++ for (i = 0; i < QMERGE_MAX; i++) {
++ if (!inprogress[i].active) continue;
++ if (!qmerge_key_equal(&k, &inprogress[i].key)) continue;
++ log_tx_piggyback(q, qtype, control);
++ inprogress[i].active++;
++ *qm = &inprogress[i];
++ qmerge_key_free(&k);
++ return 0;
++ }
++
++ for (i = 0; i < QMERGE_MAX; i++)
++ if (!inprogress[i].active)
++ break;
++ if (i == QMERGE_MAX) return -1;
++
++ log_tx(q, qtype, control, servers, 0);
++ r = dns_transmit_start(&inprogress[i].dt, servers, flagrecursive, q, qtype, localip);
++ if (r == -1) { qmerge_key_free(&k); return -1; }
++ inprogress[i].active++;
++ inprogress[i].state = 0;
++ qmerge_key_free(&inprogress[i].key);
++ byte_copy(&inprogress[i].key, sizeof k, &k);
++ *qm = &inprogress[i];
++ return 0;
++}
++
++void qmerge_io(struct qmerge *qm, iopause_fd *io, struct taia *deadline)
++{
++ if (qm->state == 0) {
++ dns_transmit_io(&qm->dt, io, deadline);
++ qm->state = 1;
++ }
++ else {
++ io->fd = -1;
++ io->events = 0;
++ }
++}
++
++int qmerge_get(struct qmerge **x, const iopause_fd *io, const struct taia *when)
++{
++ int r;
++ struct qmerge *qm;
++
++ qm = *x;
++ if (qm->state == -1) return -1; /* previous error */
++ if (qm->state == 0) return 0; /* no packet */
++ if (qm->state == 2) return 1; /* already got packet */
++
++ r = dns_transmit_get(&qm->dt, io, when);
++ if (r == -1) { qm->state = -1; return -1; } /* error */
++ if (r == 0) { qm->state = 0; return 0; } /* must wait for i/o */
++ if (r == 1) { qm->state = 2; return 1; } /* got packet */
++ return -1; /* bug */
++}
+diff --git a/qmerge.h b/qmerge.h
+new file mode 100644
+index 0000000..9a58157
+--- /dev/null
++++ b/qmerge.h
+@@ -0,0 +1,24 @@
++#ifndef QMERGE_H
++#define QMERGE_H
++
++#include "dns.h"
++
++struct qmerge_key {
++ char *q;
++ char qtype[2];
++ char *control;
++};
++
++struct qmerge {
++ int active;
++ struct qmerge_key key;
++ struct dns_transmit dt;
++ int state; /* -1 = error, 0 = need io, 1 = need get, 2 = got packet */
++};
++
++extern int qmerge_start(struct qmerge **,const char *,int,const char *,const char *,const char *,const char *);
++extern void qmerge_io(struct qmerge *,iopause_fd *,struct taia *);
++extern int qmerge_get(struct qmerge **,const iopause_fd *,const struct taia *);
++extern void qmerge_free(struct qmerge **);
++
++#endif /* QMERGE_H */
+diff --git a/query.c b/query.c
+index 46cdc00..f091fdd 100644
+--- a/query.c
++++ b/query.c
+@@ -81,7 +81,7 @@ static void cleanup(struct query *z)
+ int j;
+ int k;
+
+- dns_transmit_free(&z->dt);
++ qmerge_free(&z->qm);
+ for (j = 0;j < QUERY_MAXALIAS;++j)
+ dns_domain_free(&z->alias[j]);
+ for (j = 0;j < QUERY_MAXLEVEL;++j) {
+@@ -429,14 +429,8 @@ static int doit(struct query *z,int state)
+ if (j == 64) goto SERVFAIL;
+
+ dns_sortip(z->servers[z->level],64);
+- if (z->level) {
+- log_tx(z->name[z->level],DNS_T_A,z->control[z->level],z->servers[z->level],z->level);
+- if (dns_transmit_start(&z->dt,z->servers[z->level],flagforwardonly,z->name[z->level],DNS_T_A,z->localip) == -1) goto DIE;
+- }
+- else {
+- log_tx(z->name[0],z->type,z->control[0],z->servers[0],0);
+- if (dns_transmit_start(&z->dt,z->servers[0],flagforwardonly,z->name[0],z->type,z->localip) == -1) goto DIE;
+- }
++ dtype = z->level ? DNS_T_A : z->type;
++ if (qmerge_start(&z->qm,z->servers[z->level],flagforwardonly,z->name[z->level],dtype,z->localip,z->control[z->level]) == -1) goto DIE;
+ return 0;
+
+
+@@ -450,10 +444,10 @@ static int doit(struct query *z,int state)
+
+ HAVEPACKET:
+ if (++z->loop == 200) goto DIE;
+- buf = z->dt.packet;
+- len = z->dt.packetlen;
++ buf = z->qm->dt.packet;
++ len = z->qm->dt.packetlen;
+
+- whichserver = z->dt.servers + 4 * z->dt.curserver;
++ whichserver = z->qm->dt.servers + 4 * z->qm->dt.curserver;
+ control = z->control[z->level];
+ d = z->name[z->level];
+ dtype = z->level ? DNS_T_A : z->type;
+@@ -836,7 +830,7 @@ int query_start(struct query *z,char *dn,char type[2],char class[2],char localip
+
+ int query_get(struct query *z,iopause_fd *x,struct taia *stamp)
+ {
+- switch(dns_transmit_get(&z->dt,x,stamp)) {
++ switch(qmerge_get(&z->qm,x,stamp)) {
+ case 1:
+ return doit(z,1);
+ case -1:
+@@ -847,5 +841,5 @@ int query_get(struct query *z,iopause_fd *x,struct taia *stamp)
+
+ void query_io(struct query *z,iopause_fd *x,struct taia *deadline)
+ {
+- dns_transmit_io(&z->dt,x,deadline);
++ qmerge_io(z->qm,x,deadline);
+ }
+diff --git a/query.h b/query.h
+index eff68b2..06feab4 100644
+--- a/query.h
++++ b/query.h
+@@ -1,7 +1,7 @@
+ #ifndef QUERY_H
+ #define QUERY_H
+
+-#include "dns.h"
++#include "qmerge.h"
+ #include "uint32.h"
+
+ #define QUERY_MAXLEVEL 5
+@@ -20,7 +20,7 @@ struct query {
+ char localip[4];
+ char type[2];
+ char class[2];
+- struct dns_transmit dt;
++ struct qmerge *qm;
+ } ;
+
+ extern int query_start(struct query *,char *,char *,char *,char *);
diff --git a/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch b/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch
new file mode 100644
index 000000000000..d5b9c10d64d3
--- /dev/null
+++ b/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch
@@ -0,0 +1,68 @@
+diff -urNp a/query.c b/query.c
+--- a/query.c 2009-03-19 11:35:28.452472164 -0700
++++ b/query.c 2009-03-19 11:59:19.798221593 -0700
+@@ -476,6 +476,29 @@ static int doit(struct query *z,int stat
+ }
+ }
+
++ if (typematch(DNS_T_SOA,dtype)) {
++ byte_copy(key,2,DNS_T_SOA);
++ cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
++ if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) {
++ log_cachedanswer(d,DNS_T_SOA);
++ if (!rqa(z)) goto DIE;
++ pos = 0;
++ while (pos = dns_packet_copy(cached,cachedlen,pos,misc,20)) {
++ pos = dns_packet_getname(cached,cachedlen,pos,&t2);
++ if (!pos) break;
++ pos = dns_packet_getname(cached,cachedlen,pos,&t3);
++ if (!pos) break;
++ if (!response_rstart(d,DNS_T_SOA,ttl)) goto DIE;
++ if (!response_addname(t2)) goto DIE;
++ if (!response_addname(t3)) goto DIE;
++ if (!response_addbytes(misc,20)) goto DIE;
++ response_rfinish(RESPONSE_ANSWER);
++ }
++ cleanup(z);
++ return 1;
++ }
++ }
++
+ if (typematch(DNS_T_A,dtype)) {
+ byte_copy(key,2,DNS_T_A);
+ cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
+@@ -541,7 +564,7 @@ static int doit(struct query *z,int stat
+ }
+ }
+
+- if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype) && !typematch(DNS_T_AAAA,dtype)) {
++ if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype) && !typematch(DNS_T_SOA,dtype) && !typematch(DNS_T_AAAA,dtype)) {
+ byte_copy(key,2,dtype);
+ cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
+ if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) {
+@@ -769,15 +792,24 @@ static int doit(struct query *z,int stat
+ else if (byte_equal(type,2,DNS_T_AXFR))
+ ;
+ else if (byte_equal(type,2,DNS_T_SOA)) {
++ int non_authority = 0;
++ save_start();
+ while (i < j) {
+ pos = dns_packet_skipname(buf,len,records[i]); if (!pos) goto DIE;
+ pos = dns_packet_getname(buf,len,pos + 10,&t2); if (!pos) goto DIE;
+ pos = dns_packet_getname(buf,len,pos,&t3); if (!pos) goto DIE;
+ pos = dns_packet_copy(buf,len,pos,misc,20); if (!pos) goto DIE;
+- if (records[i] < posauthority)
++ if (records[i] < posauthority) {
+ log_rrsoa(whichserver,t1,t2,t3,misc,ttl);
++ save_data(misc,20);
++ save_data(t2,dns_domain_length(t2));
++ save_data(t3,dns_domain_length(t3));
++ non_authority++;
++ }
+ ++i;
+ }
++ if (non_authority)
++ save_finish(DNS_T_SOA,t1,ttl);
+ }
+ else if (byte_equal(type,2,DNS_T_CNAME)) {
+ pos = dns_packet_skipname(buf,len,records[j - 1]); if (!pos) goto DIE;
diff --git a/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records.patch b/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records.patch
new file mode 100644
index 000000000000..9230e7583ddd
--- /dev/null
+++ b/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records.patch
@@ -0,0 +1,70 @@
+diff --git a/query.c b/query.c
+index 46cdc00..4574e97 100644
+--- a/query.c
++++ b/query.c
+@@ -319,6 +319,29 @@ static int doit(struct query *z,int state)
+ }
+ }
+
++ if (typematch(DNS_T_SOA,dtype)) {
++ byte_copy(key,2,DNS_T_SOA);
++ cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
++ if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) {
++ log_cachedanswer(d,DNS_T_SOA);
++ if (!rqa(z)) goto DIE;
++ pos = 0;
++ while (pos = dns_packet_copy(cached,cachedlen,pos,misc,20)) {
++ pos = dns_packet_getname(cached,cachedlen,pos,&t2);
++ if (!pos) break;
++ pos = dns_packet_getname(cached,cachedlen,pos,&t3);
++ if (!pos) break;
++ if (!response_rstart(d,DNS_T_SOA,ttl)) goto DIE;
++ if (!response_addname(t2)) goto DIE;
++ if (!response_addname(t3)) goto DIE;
++ if (!response_addbytes(misc,20)) goto DIE;
++ response_rfinish(RESPONSE_ANSWER);
++ }
++ cleanup(z);
++ return 1;
++ }
++ }
++
+ if (typematch(DNS_T_A,dtype)) {
+ byte_copy(key,2,DNS_T_A);
+ cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
+@@ -351,7 +374,7 @@ static int doit(struct query *z,int state)
+ }
+ }
+
+- if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype)) {
++ if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype) && !typematch(DNS_T_SOA,dtype)) {
+ byte_copy(key,2,dtype);
+ cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
+ if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) {
+@@ -585,15 +608,24 @@ static int doit(struct query *z,int state)
+ else if (byte_equal(type,2,DNS_T_AXFR))
+ ;
+ else if (byte_equal(type,2,DNS_T_SOA)) {
++ int non_authority = 0;
++ save_start();
+ while (i < j) {
+ pos = dns_packet_skipname(buf,len,records[i]); if (!pos) goto DIE;
+ pos = dns_packet_getname(buf,len,pos + 10,&t2); if (!pos) goto DIE;
+ pos = dns_packet_getname(buf,len,pos,&t3); if (!pos) goto DIE;
+ pos = dns_packet_copy(buf,len,pos,misc,20); if (!pos) goto DIE;
+- if (records[i] < posauthority)
++ if (records[i] < posauthority) {
+ log_rrsoa(whichserver,t1,t2,t3,misc,ttl);
++ save_data(misc,20);
++ save_data(t2,dns_domain_length(t2));
++ save_data(t3,dns_domain_length(t3));
++ non_authority++;
++ }
+ ++i;
+ }
++ if (non_authority)
++ save_finish(DNS_T_SOA,t1,ttl);
+ }
+ else if (byte_equal(type,2,DNS_T_CNAME)) {
+ pos = dns_packet_skipname(buf,len,records[j - 1]); if (!pos) goto DIE;
+
diff --git a/net-dns/djbdns/files/CVE2009-0858_0001-check-response-domain-name-length.patch b/net-dns/djbdns/files/CVE2009-0858_0001-check-response-domain-name-length.patch
new file mode 100644
index 000000000000..23d8e9f86b12
--- /dev/null
+++ b/net-dns/djbdns/files/CVE2009-0858_0001-check-response-domain-name-length.patch
@@ -0,0 +1,11 @@
+--- a/response.c
++++ b/response.c
+@@ -34,7 +34,7 @@ int response_addname(const char *d)
+ uint16_pack_big(buf,49152 + name_ptr[i]);
+ return response_addbytes(buf,2);
+ }
+- if (dlen <= 128)
++ if ((dlen <= 128) && (response_len < 16384))
+ if (name_num < NAMES) {
+ byte_copy(name[name_num],dlen,d);
+ name_ptr[name_num] = response_len;
diff --git a/net-dns/djbdns/files/CVE2012-1191_0001-ghost-domain-attack.patch b/net-dns/djbdns/files/CVE2012-1191_0001-ghost-domain-attack.patch
new file mode 100644
index 000000000000..8d9b194411f3
--- /dev/null
+++ b/net-dns/djbdns/files/CVE2012-1191_0001-ghost-domain-attack.patch
@@ -0,0 +1,22 @@
+Fix ghost domain attack vulnerability (CVE-2012-1191)
+
+Author: Peter Conrad <conrad@tivano.de>
+Origin: http://marc.info/?l=djbdns&m=134269902121506&w=2
+
+Gentoo-Bug: https://bugs.gentoo.org/404959
+
+--- a/query.c
++++ b/query.c
+@@ -792,6 +792,12 @@ static int doit(struct query *z,int state)
+ }
+
+ if (!dns_domain_suffix(t1,control)) { i = j; continue; }
++
++ if (!flagforwardonly && byte_equal(type,2,DNS_T_NS) && dns_domain_equal(t1,control)) {
++ char dummy[256];
++ if (!roots(dummy,control)) { i = j; continue; }
++ }
++
+ if (!roots_same(t1,control)) { i = j; continue; }
+
+ if (byte_equal(type,2,DNS_T_ANY))
diff --git a/net-dns/djbdns/files/dnsroots.patch b/net-dns/djbdns/files/dnsroots.patch
new file mode 100644
index 000000000000..d2524be5a870
--- /dev/null
+++ b/net-dns/djbdns/files/dnsroots.patch
@@ -0,0 +1,20 @@
+--- a/dnsroots.global
++++ b/dnsroots.global
+@@ -1,13 +1,13 @@
+ 198.41.0.4
+-128.9.0.107
++192.228.79.201
+ 192.33.4.12
+-128.8.10.90
++199.7.91.13
+ 192.203.230.10
+ 192.5.5.241
+ 192.112.36.4
+ 128.63.2.53
+ 192.36.148.17
+-198.41.0.10
++192.58.128.30
+ 193.0.14.129
+-198.32.64.12
++199.7.83.42
+ 202.12.27.33
diff --git a/net-dns/djbdns/files/dnstracesort.patch b/net-dns/djbdns/files/dnstracesort.patch
new file mode 100644
index 000000000000..3bf56f5a1ce6
--- /dev/null
+++ b/net-dns/djbdns/files/dnstracesort.patch
@@ -0,0 +1,11 @@
+--- djbdns-1.05/dnstracesort.sh.orig 2006-04-26 21:52:54.000000000 +0200
++++ djbdns-1.05/dnstracesort.sh 2006-04-26 21:53:02.000000000 +0200
+@@ -12,7 +12,7 @@
+ }
+ print
+ }
+-' | sort -t: +0 -2 +4 +3 -4 +2 -3 | uniq | awk -F: '
++' | sort -t: -k 1,3 -k 5 -k 4,5 -k 3,4 | uniq | awk -F: '
+ {
+ type = $1
+ q = $2
diff --git a/net-dns/djbdns/files/headtail-r1.patch b/net-dns/djbdns/files/headtail-r1.patch
new file mode 100644
index 000000000000..31854803ba89
--- /dev/null
+++ b/net-dns/djbdns/files/headtail-r1.patch
@@ -0,0 +1,67 @@
+diff -Naur /tmp/djbdns-1.05/Makefile djbdns-1.05/Makefile
+--- a/Makefile 2003-11-16 20:33:41.000000000 +0100
++++ b/Makefile 2003-11-16 20:35:15.000000000 +0100
+@@ -31,7 +31,7 @@
+
+ auto_home.c: \
+ auto-str conf-home
+- ./auto-str auto_home `head -1 conf-home` > auto_home.c
++ ./auto-str auto_home `head -n 1 conf-home` > auto_home.c
+
+ auto_home.o: \
+ compile auto_home.c
+@@ -205,14 +205,14 @@
+ choose: \
+ warn-auto.sh choose.sh conf-home
+ cat warn-auto.sh choose.sh \
+- | sed s}HOME}"`head -1 conf-home`"}g \
++ | sed s}HOME}"`head -n 1 conf-home`"}g \
+ > choose
+ chmod 755 choose
+
+ compile: \
+ warn-auto.sh conf-cc
+ ( cat warn-auto.sh; \
+- echo exec "`head -1 conf-cc`" '-c $${1+"$$@"}' \
++ echo exec "`head -n 1 conf-cc`" '-c $${1+"$$@"}' \
+ ) > compile
+ chmod 755 compile
+
+@@ -449,7 +449,7 @@
+ dnstracesort: \
+ warn-auto.sh dnstracesort.sh conf-home
+ cat warn-auto.sh dnstracesort.sh \
+- | sed s}HOME}"`head -1 conf-home`"}g \
++ | sed s}HOME}"`head -n 1 conf-home`"}g \
+ > dnstracesort
+ chmod 755 dnstracesort
+
+@@ -570,7 +570,7 @@
+ warn-auto.sh conf-ld
+ ( cat warn-auto.sh; \
+ echo 'main="$$1"; shift'; \
+- echo exec "`head -1 conf-ld`" \
++ echo exec "`head -n 1 conf-ld`" \
+ '-o "$$main" "$$main".o $${1+"$$@"}' \
+ ) > load
+ chmod 755 load
+@@ -758,7 +758,7 @@
+ rts: \
+ warn-auto.sh rts.sh conf-home
+ cat warn-auto.sh rts.sh \
+- | sed s}HOME}"`head -1 conf-home`"}g \
++ | sed s}HOME}"`head -n 1 conf-home`"}g \
+ > rts
+ chmod 755 rts
+
+@@ -901,8 +901,8 @@
+ systype: \
+ find-systype.sh conf-cc conf-ld trycpp.c x86cpuid.c
+ ( cat warn-auto.sh; \
+- echo CC=\'`head -1 conf-cc`\'; \
+- echo LD=\'`head -1 conf-ld`\'; \
++ echo CC=\'`head -n 1 conf-cc`\'; \
++ echo LD=\'`head -n 1 conf-ld`\'; \
+ cat find-systype.sh; \
+ ) | sh > systype
+
diff --git a/net-dns/djbdns/files/increase-cname-recustion-depth.patch b/net-dns/djbdns/files/increase-cname-recustion-depth.patch
new file mode 100644
index 000000000000..3415f6567056
--- /dev/null
+++ b/net-dns/djbdns/files/increase-cname-recustion-depth.patch
@@ -0,0 +1,43 @@
+From d8534e8482bdd3f6e4ae1dca8452e65c24dd34f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Aug 2016 09:13:11 -0400
+Subject: [PATCH 1/1] query.c: increase recursion depth to 200.
+
+The recursion loop for CNAME resolution has an upper limit of 100
+iterations by default. This has proven too small in some cases where
+large CDNs are concerned. This commit increases the limit to 200.
+
+The patch was based on the OpenWrt fix, supplied by user ylxu.
+
+Gentoo-Bug: 590548
+OpenWrt-Bug: 5881
+SMEServer-Bug: 8362
+---
+ query.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/query.c b/query.c
+index 46cdc00..61fe708 100644
+--- a/query.c
++++ b/query.c
+@@ -203,7 +203,7 @@ static int doit(struct query *z,int state)
+
+
+ NEWNAME:
+- if (++z->loop == 100) goto DIE;
++ if (++z->loop == 200) goto DIE;
+ d = z->name[z->level];
+ dtype = z->level ? DNS_T_A : z->type;
+ dlen = dns_domain_length(d);
+@@ -449,7 +449,7 @@ static int doit(struct query *z,int state)
+
+
+ HAVEPACKET:
+- if (++z->loop == 100) goto DIE;
++ if (++z->loop == 200) goto DIE;
+ buf = z->dt.packet;
+ len = z->dt.packetlen;
+
+--
+2.7.3
+
diff --git a/net-dns/djbdns/files/makefile-parallel-test25.patch b/net-dns/djbdns/files/makefile-parallel-test25.patch
new file mode 100644
index 000000000000..2754729acb97
--- /dev/null
+++ b/net-dns/djbdns/files/makefile-parallel-test25.patch
@@ -0,0 +1,91 @@
+diff --git a/Makefile b/Makefile
+index 9ebf4c8..fe5ed73 100644
+--- a/Makefile
++++ b/Makefile
+@@ -212,7 +212,7 @@ warn-auto.sh choose.sh conf-home
+ chmod 755 choose
+
+ clientloc.o: \
+-compile clientloc.c open.h byte.h cdb.h ip6.h
++compile clientloc.c open.h byte.h cdb.h uint32.h ip6.h
+ ./compile clientloc.c
+
+ compile: \
+@@ -336,7 +336,7 @@ taia.h tai.h uint64.h taia.h
+
+ dns_transmit.o: \
+ compile dns_transmit.c socket.h uint16.h alloc.h error.h byte.h \
+-uint16.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h \
++uint32.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h \
+ taia.h
+ ./compile dns_transmit.c
+
+@@ -859,15 +859,15 @@ trylsock.c compile load
+ rm -f trylsock.o trylsock
+
+ socket_accept.o: \
+-compile socket_accept.c byte.h socket.h uint16.h
++compile socket_accept.c byte.h socket.h uint16.h uint32.h
+ ./compile socket_accept.c
+
+ socket_accept6.o: \
+-compile socket_accept6.c byte.h socket.h uint16.h
++compile socket_accept6.c byte.h socket.h uint16.h uint32.h
+ ./compile socket_accept6.c
+
+ socket_bind.o: \
+-compile socket_bind.c byte.h socket.h uint16.h
++compile socket_bind.c byte.h socket.h uint16.h uint32.h
+ ./compile socket_bind.c
+
+ socket_bind6.o: \
+@@ -875,7 +875,7 @@ compile socket_bind6.c sockaddr_in6.h haveip6.h byte.h socket.h uint16.h uint32.
+ ./compile socket_bind6.c
+
+ socket_conn.o: \
+-compile socket_conn.c byte.h socket.h uint16.h
++compile socket_conn.c byte.h socket.h uint16.h uint32.h
+ ./compile socket_conn.c
+
+ socket_connect6.o: \
+@@ -883,11 +883,11 @@ compile socket_connect6.c byte.h socket.h uint16.h uint32.h
+ ./compile socket_connect6.c
+
+ socket_listen.o: \
+-compile socket_listen.c socket.h uint16.h
++compile socket_listen.c socket.h uint16.h uint32.h
+ ./compile socket_listen.c
+
+ socket_recv.o: \
+-compile socket_recv.c byte.h socket.h uint16.h
++compile socket_recv.c byte.h socket.h uint16.h uint32.h
+ ./compile socket_recv.c
+
+ socket_recv6.o: \
+@@ -895,7 +895,7 @@ compile socket_recv6.c sockaddr_in6.h haveip6.h byte.h socket.h uint16.h uint32.
+ ./compile socket_recv6.c
+
+ socket_send.o: \
+-compile socket_send.c byte.h socket.h uint16.h
++compile socket_send.c byte.h socket.h uint16.h uint32.h
+ ./compile socket_send.c
+
+ socket_send6.o: \
+@@ -903,7 +903,7 @@ compile socket_send6.c byte.h socket.h uint16.h uint32.h ip6.h haveip6.h error.h
+ ./compile socket_send6.c
+
+ socket_tcp.o: \
+-compile socket_tcp.c ndelay.h socket.h uint16.h
++compile socket_tcp.c ndelay.h socket.h uint16.h uint32.h
+ ./compile socket_tcp.c
+
+ socket_tcp6.o: \
+@@ -911,7 +911,7 @@ compile socket_tcp6.c ndelay.h socket.h uint16.h uint32.h haveip6.h
+ ./compile socket_tcp6.c
+
+ socket_udp.o: \
+-compile socket_udp.c ndelay.h socket.h uint16.h
++compile socket_udp.c ndelay.h socket.h uint16.h uint32.h
+ ./compile socket_udp.c
+
+ socket_udp6.o: \
diff --git a/net-dns/djbdns/files/srv_record_support.patch b/net-dns/djbdns/files/srv_record_support.patch
new file mode 100644
index 000000000000..736884208363
--- /dev/null
+++ b/net-dns/djbdns/files/srv_record_support.patch
@@ -0,0 +1,180 @@
+From: Michael Handler <handler@sub-rosa.com>
+To: dns@list.cr.yp.to
+Subject: tinydns-data SRV & axfr-get SRV/PTR patches
+Date: Thu, 14 Sep 2000 20:37:50 -0400
+
+Here's a combined patch that:
+
+a) adds a native SRV type to tinydns-data
+
+Sfqdn:ip:x:port:weight:priority:ttl:timestamp
+
+Standard rules for ip, x, ttl, and timestamp apply. Port, weight, and
+priority all range from 0-65535. Weight and priority are optional; they
+default to zero if not provided.
+
+Sconsole.zoinks.example.com:1.2.3.4:rack102-con1:2001:69:7:300:
+
+b) makes axfr-get decompose SRV and PTR records and write them out in
+native format, rather than opaque. Again, this is necessary because if the
+DNAME fields in the records reference the same zone as fqdn, they can have
+compression pointers that are bogus outside the context of that specific
+packet, and which can't be correctly loaded into data.cdb by tinydns-data.
+
+--michael
+
+Laurent G. Bercot <ska-djbdns@skarnet.org> updated it for
+djbdns-1.05. Documentation patch by Alex Efros.
+
+diff -rNU3 djbdns-1.05/axfr-get.c djbdns-1.05-srv/axfr-get.c
+--- djbdns-1.05/axfr-get.c Sun Feb 11 22:11:45 2001
++++ djbdns-1.05/axfr-get.c Thu Oct 18 14:46:56 2001
+@@ -209,6 +209,26 @@
+ if (!stralloc_cats(&line,".:")) return 0;
+ if (!stralloc_catulong0(&line,dist,0)) return 0;
+ }
++ else if (byte_equal(data,2,DNS_T_SRV)) {
++ uint16 dist, weight, port;
++ if (!stralloc_copys(&line,"S")) return 0;
++ if (!dns_domain_todot_cat(&line,d1)) return 0;
++ if (!stralloc_cats(&line,"::")) return 0;
++ pos = x_copy(buf,len,pos,data,2);
++ uint16_unpack_big(data,&dist);
++ pos = x_copy(buf,len,pos,data,2);
++ uint16_unpack_big(data,&weight);
++ pos = x_copy(buf,len,pos,data,2);
++ uint16_unpack_big(data,&port);
++ x_getname(buf,len,pos,&d1);
++ if (!dns_domain_todot_cat(&line,d1)) return 0;
++ if (!stralloc_cats(&line,".:")) return 0;
++ if (!stralloc_catulong0(&line,dist,0)) return 0;
++ if (!stralloc_cats(&line,":")) return 0;
++ if (!stralloc_catulong0(&line,weight,0)) return 0;
++ if (!stralloc_cats(&line,":")) return 0;
++ if (!stralloc_catulong0(&line,port,0)) return 0;
++ }
+ else if (byte_equal(data,2,DNS_T_A) && (dlen == 4)) {
+ char ipstr[IP4_FMT];
+ if (!stralloc_copys(&line,"+")) return 0;
+@@ -216,6 +236,14 @@
+ if (!stralloc_cats(&line,":")) return 0;
+ x_copy(buf,len,pos,data,4);
+ if (!stralloc_catb(&line,ipstr,ip4_fmt(ipstr,data))) return 0;
++ }
++ else if (byte_equal(data,2,DNS_T_PTR)) {
++ if (!stralloc_copys(&line,"^")) return 0;
++ if (!dns_domain_todot_cat(&line,d1)) return 0;
++ if (!stralloc_cats(&line,":")) return 0;
++ x_getname(buf,len,pos,&d1);
++ if (!dns_domain_todot_cat(&line,d1)) return 0;
++ if (!stralloc_cats(&line,".")) return 0;
+ }
+ else {
+ unsigned char ch;
+diff -rNU3 djbdns-1.05/dns.h djbdns-1.05-srv/dns.h
+--- djbdns-1.05/dns.h Sun Feb 11 22:11:45 2001
++++ djbdns-1.05/dns.h Thu Oct 18 14:46:56 2001
+@@ -20,6 +20,7 @@
+ #define DNS_T_SIG "\0\30"
+ #define DNS_T_KEY "\0\31"
+ #define DNS_T_AAAA "\0\34"
++#define DNS_T_SRV "\0\41"
+ #define DNS_T_AXFR "\0\374"
+ #define DNS_T_ANY "\0\377"
+
+diff -rNU3 djbdns-1.05/tinydns-data.c djbdns-1.05-srv/tinydns-data.c
+--- djbdns-1.05/tinydns-data.c Sun Feb 11 22:11:45 2001
++++ djbdns-1.05/tinydns-data.c Thu Oct 18 14:50:53 2001
+@@ -196,6 +196,7 @@
+ char type[2];
+ char soa[20];
+ char buf[4];
++ char srv[6];
+
+ umask(022);
+
+@@ -360,6 +361,43 @@
+ rr_start(DNS_T_MX,ttl,ttd,loc);
+ uint16_pack_big(buf,u);
+ rr_add(buf,2);
++ rr_addname(d2);
++ rr_finish(d1);
++
++ if (ip4_scan(f[1].s,ip)) {
++ rr_start(DNS_T_A,ttl,ttd,loc);
++ rr_add(ip,4);
++ rr_finish(d2);
++ }
++ break;
++
++ case 'S':
++ if (!dns_domain_fromdot(&d1,f[0].s,f[0].len)) nomem();
++ if (!stralloc_0(&f[6])) nomem();
++ if (!scan_ulong(f[6].s,&ttl)) ttl = TTL_POSITIVE;
++ ttdparse(&f[7],ttd);
++ locparse(&f[8],loc);
++
++ if (!stralloc_0(&f[1])) nomem();
++
++ if (byte_chr(f[2].s,f[2].len,'.') >= f[2].len) {
++ if (!stralloc_cats(&f[2],".srv.")) nomem();
++ if (!stralloc_catb(&f[2],f[0].s,f[0].len)) nomem();
++ }
++ if (!dns_domain_fromdot(&d2,f[2].s,f[2].len)) nomem();
++
++ if (!stralloc_0(&f[4])) nomem();
++ if (!scan_ulong(f[4].s,&u)) u = 0;
++ uint16_pack_big(srv,u);
++ if (!stralloc_0(&f[5])) nomem();
++ if (!scan_ulong(f[5].s,&u)) u = 0;
++ uint16_pack_big(srv + 2,u);
++ if (!stralloc_0(&f[3])) nomem();
++ if (!scan_ulong(f[3].s,&u)) nomem();
++ uint16_pack_big(srv + 4,u);
++
++ rr_start(DNS_T_SRV,ttl,ttd,loc);
++ rr_add(srv,6);
+ rr_addname(d2);
+ rr_finish(d1);
+
+--- djbdns-1.05/man/tinydns-data.8 2003-10-23 10:47:32.000000000 +0300
++++ djbdns-1.05/man/tinydns-data.8 2014-09-26 02:51:59.861716505 +0300
+@@ -487,6 +487,38 @@
+ .RI \ 072
+ is a colon.
+
++.RI S fqdn\fR:\fIip\fR:\fIx\fR:\fIport\fR:\fIweight\fR:\fIpriority\fR:\fIttl\fR:\fItimestamp\fR:\fIlo\fR
++
++SRV record for
++.IR fqdn .
++
++.B tinydns-data
++creates
++.IP
++an SRV record
++showing
++.IR x\fR.srv.\fIfqdn\fR:\fIport\fR
++as a service for
++.IR fqdn
++with given \fIweight\fR and \fIpriority\fR
++(\fIport\fR, \fIweight\fR and \fIpriority\fR must be in range 0-65535;
++\fIweight\fR and \fIpriority\fR are optional;
++they default to zero if not provided)
++and
++.P
++.IP
++an A record showing
++.I ip
++as the IP address
++of
++.IR x\fR.srv.\fIfqdn .
++.P
++
++If
++.I x
++contains a dot
++then it is treated specially; see above.
++
+ .RI ^ fqdn\fR:\fIp\fR:\fIttl\fR:\fItimestamp\fR:\fIlo\fR
+
+ PTR record for
diff --git a/net-dns/djbdns/files/string_length_255.patch b/net-dns/djbdns/files/string_length_255.patch
new file mode 100644
index 000000000000..ad383b756bf9
--- /dev/null
+++ b/net-dns/djbdns/files/string_length_255.patch
@@ -0,0 +1,11 @@
+--- a/tinydns-data.c 2001-02-11 16:11:45.000000000 -0500
++++ b/tinydns-data.c 2011-04-02 10:41:34.356302891 -0400
+@@ -399,7 +399,7 @@
+ i = 0;
+ while (i < f[1].len) {
+ k = f[1].len - i;
+- if (k > 127) k = 127;
++ if (k > 255) k = 255;
+ ch = k;
+ rr_add(&ch,1);
+ rr_add(f[1].s + i,k);
diff --git a/net-dns/djbdns/metadata.xml b/net-dns/djbdns/metadata.xml
new file mode 100644
index 000000000000..b8c90c07ff33
--- /dev/null
+++ b/net-dns/djbdns/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-dns/dnrd/Manifest b/net-dns/dnrd/Manifest
new file mode 100644
index 000000000000..be6679b82ceb
--- /dev/null
+++ b/net-dns/dnrd/Manifest
@@ -0,0 +1,8 @@
+AUX dnrd 356 SHA256 2b1a8322fd6552dac8721c2d449ed4e6e5936582499e5ca4613ee41a85fa6b0d SHA512 16ac5a0f40206b3dfaa178adba77c605bee57eca7b81e026c4e76b520894876f28ed8cea4281410453cd7a46e5b306f2280b67c80f1c5254f2f16d5489640685 WHIRLPOOL 22f073b50be9548fa81406616ca358ac3baafab1224a0bdfce93cc07e70c656ad7b0e484945349bf30b16f1d3b9b5c776a08f59a1ef24c852046bc02c653a1c5
+AUX dnrd-2.20.3-docdir.patch 711 SHA256 18c2cbea544f29c163e9d74882fc5eb3fa9411e220554e3a1fb5fe690e89ee75 SHA512 0f97a79bcad417cbef90fdedebd116bc89490588065a242b2e0002b10f98ec2ecf45807cfd3333882426ddbde64eedad6ccdc71a149b6c28f6cba03d7b3cabf6 WHIRLPOOL b27f8a218f14d38beb84462e1183e27df3aa2783c7a9c03e300f735b59e66dcde16e60ac82c64824c750debf7aeaa36dfb008cd12e3608d8032d41e2dc0e3e04
+AUX dnrd.conf 250 SHA256 8631def27d95d43b9d445302bc0b20598fa8ca1909dcb35ca61f7b4aa599146b SHA512 461bbebba321b5216a15ea9550342ca9f7374af6446c2f515a3f5ce35bf45480c8f684b60ce8c206ec017e7ca060d4588c0d2da026d2e99162f3f9a6e58f03d2 WHIRLPOOL 7fcec034e90ac546413736c9432b142e96e974b10ec217477882bf7c0c295f4492590196499b9e6c1960cf0e19503f73f419688249a3da91f42aa077c7491551
+DIST dnrd-2.20.3.tar.gz 161887 SHA256 aa46e7f8736b88c1d752cf606b3990041221ce91d014e955c6b02eb2167db015 SHA512 a526ec9c2f82ac36fa7beaf864ab39c56e5956530b10115ad2ca2f79ecb820fe865d9da9edd1dea5f4cb97508afbec88f0606b03f87baba25561c097e7c0ea9b WHIRLPOOL d218a8d51766b0d0d1317d109e250bf9c871b7a9ff7dbfd9e6149d3197c6b93e8eb4311fd921de59de46183134136f6ceefde828bd1527595979a79c00fc3fe1
+EBUILD dnrd-2.20.3-r1.ebuild 794 SHA256 e13f2756287ab0ef208ed6ffc88265791f174ef78e289a03f857e47b6808dd45 SHA512 1bb2a4e4a840da82f7b97cabc6e1e9307ba62871aa1328b8746c6dba1bdcb26b4c6e1ec4643bdaa1558f3bccf0a6228de2eda5c528c20418898bc1e212830df8 WHIRLPOOL 3611523156f507f6853c9454611962b5a978e357d1d2669a0b7d3348d59d571826583c658f5d12470036dba48021efd644581c8bb4405da0d06e910d907ba450
+MISC ChangeLog 2736 SHA256 0fda413240d7d9740dc7e4f4b7fec85684aecccf73e29d6ac3b5cb4be34cf0d1 SHA512 f258e9b5d197fd08686b351d48f6398e5ba2e28f098062bb0041aecd58a56c1fc1ec6abcc4ad276fae22cd08441d0406793c79dbbc287319a836078eee70d29e WHIRLPOOL fe6889bc9db479cf05f2a6239c034554fcbe62cd12e339ff4c3b2aaa72f0edaeb3380299f307c7a481af6e316283d1aa3607d764ed31eb0115c8f610284b2613
+MISC ChangeLog-2015 2929 SHA256 4c3bc39a28c4ca032febd62032d4556ce014936dadd3f6c444b84256d93a16d3 SHA512 36046f94e0f58d344bc349b4f7f807184fd78d77d19b9dd1a36a005972f718c2632b99f5b86ab0a67782a235bf9599d22dbd08f5a53b065b342e30273cb2279e WHIRLPOOL 26a722866216bd28881dd5923a855800df65d73a0fe32d63de4f27fcd113bd258ce7940b09eeb7d4493d96f506526fa78d149c8c91c2d357d42f162a0b9ea9e9
+MISC metadata.xml 657 SHA256 a851115d1507db8c06f7468074793d49779e736597abe9f27e757ac2f7cf458a SHA512 1b241e4719fde34ca85e146e21906a0b82aaacd5e71cdd215365e32bb005d2166f39f90eab12bdcd574d9387175a5870af6d24a676a108470c30e096ff9f53f8 WHIRLPOOL 94fd649f322396393edcfdddd14c30512f69bd60276bea7cde506a6d4df2c8039a0377e2555456b2a138bd915f37775cffa8c405362098e8500e48c60c347df9
diff --git a/net-dns/dnrd/dnrd-2.20.3-r1.ebuild b/net-dns/dnrd/dnrd-2.20.3-r1.ebuild
new file mode 100644
index 000000000000..95fd6237bd1d
--- /dev/null
+++ b/net-dns/dnrd/dnrd-2.20.3-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit autotools eutils user
+
+DESCRIPTION="A caching DNS proxy server"
+HOMEPAGE="http://dnrd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dnrd/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug"
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-docdir.patch
+ eautoreconf
+}
+
+src_compile() {
+ econf \
+ $(use_enable debug) \
+ --disable-dependency-tracking \
+ --docdir=/usr/share/doc/${PF} \
+ || die
+
+ emake || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ keepdir /etc/dnrd
+ doinitd ${FILESDIR}/dnrd
+ newconfd ${FILESDIR}/dnrd.conf dnrd
+}
+
+pkg_postinst() {
+ enewgroup dnrd
+ enewuser dnrd -1 -1 /dev/null dnrd
+}
diff --git a/net-dns/dnrd/files/dnrd b/net-dns/dnrd/files/dnrd
new file mode 100644
index 000000000000..9fb87107b7a8
--- /dev/null
+++ b/net-dns/dnrd/files/dnrd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2003 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+PIDFILE="/var/run/dnrd.pid"
+
+depend() {
+ provide dns
+ need net
+}
+
+start() {
+ ebegin "Starting dnrd"
+ /usr/sbin/dnrd $DNRD_OPTS &> /dev/null &
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dnrd"
+ /usr/sbin/dnrd -k
+ eend $?
+}
+
diff --git a/net-dns/dnrd/files/dnrd-2.20.3-docdir.patch b/net-dns/dnrd/files/dnrd-2.20.3-docdir.patch
new file mode 100644
index 000000000000..a3d1c8002d51
--- /dev/null
+++ b/net-dns/dnrd/files/dnrd-2.20.3-docdir.patch
@@ -0,0 +1,21 @@
+Index: doc/Makefile.am
+===================================================================
+--- doc/Makefile.am (revision 247)
++++ doc/Makefile.am (revision 248)
+@@ -1,5 +1,4 @@
+ PACKAGE = @PACKAGE_TARNAME@
+-docdir = $(datadir)/doc/$(PACKAGE)
+ doc_DATA = README-cache README-master README-cygwin master.sample
+ man_MANS = dnrd.8
+ EXTRA_DIST = $(man_MANS) $(doc_DATA)
+Index: Makefile.am
+===================================================================
+--- Makefile.am (revision 247)
++++ Makefile.am (revision 248)
+@@ -1,6 +1,5 @@
+ PACKAGE = @PACKAGE_TARNAME@
+ SUBDIRS = src doc
+-docdir = $(datadir)/doc/$(PACKAGE)
+ doc_DATA = AUTHORS COPYING ChangeLog README NEWS
+
+ EXTRA_DIST = README cygwin_post_install.sh
diff --git a/net-dns/dnrd/files/dnrd.conf b/net-dns/dnrd/files/dnrd.conf
new file mode 100644
index 000000000000..96eea43a87d4
--- /dev/null
+++ b/net-dns/dnrd/files/dnrd.conf
@@ -0,0 +1,11 @@
+# options to dnrd
+
+# example: 2 default dns servers and dns servers for mydomain.com. The
+# latter are load balanced (-b)
+
+# DNRD_OPTS="
+# -s 213.142.64.170
+# -s 213.142.64.171
+# -b
+# -s 192.168.65.250:mydomain.com
+# -s 192.168.65.254:mydomain.com"
diff --git a/net-dns/dnrd/metadata.xml b/net-dns/dnrd/metadata.xml
new file mode 100644
index 000000000000..349a9bf300f0
--- /dev/null
+++ b/net-dns/dnrd/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>natanael.copa@gmail.com</email>
+ <name>Natanael Copa</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+Domain Name Relay Daemon is a caching, forwarding DNS proxy server. Most useful on vpn or dialup firewalls but it is also a nice DNS cache for minor networks and workstations.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">dnrd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/dnscap/Manifest b/net-dns/dnscap/Manifest
new file mode 100644
index 000000000000..e8292147add8
--- /dev/null
+++ b/net-dns/dnscap/Manifest
@@ -0,0 +1,6 @@
+AUX dnscap-20130814.install.patch 853 SHA256 8934c3f9e55dd42c6e5820e8cba733a8ab15bb9fb47f8944ecc445271df36613 SHA512 03bda20b9034e2a594ae08824306583f1591ddc9b3fe5542d84e4a4534100a8b09f70b34db89a7a3edc97e4b4c9219a6586ca7b0f79878206efa8407bd44d23a WHIRLPOOL 302840ed126173101fc135c068d8137f9b88212008fb35ea4bec0eb936ea896a086e8efb0488edb2710f8571d3f049db1945a0222581f72d52b458e23a05d2c1
+DIST dnscap-20130814.tar.gz 99615 SHA256 17c367e6697d6e93eb4ebf0ac038e10eb6950c75a9890c914ba0f7a0f9c2500e SHA512 1969d8cc47c6206369a02b29064dbb7f663a2187203ab1f49d862082bfb6e44c9fccf90fb63d65a523c7a5cf4d24815a74b9dd18d81267b4447252d7a04f33dd WHIRLPOOL 888d7544525901974b5b501cf4feb842363da95b50ed48dda0276dc5c733de8510c65f9942b72ffb4d9c43ac8f0ca2cf12154525c2fd40561a4fec81a7aee598
+EBUILD dnscap-20130814.ebuild 692 SHA256 35cac095c0c8c2ffd090671c55ccfbb9db7b4a135decd7f8cd15f9321e71c4c4 SHA512 78bad3b0062972efc800b64d4233e3665551d192c444ee94e633a651738a14709ef1ff2dd1ef9716f50452d0ef1322403dc11b3252f9d4cb0cb118e99882c8d4 WHIRLPOOL 0a7b36764bbea9c71fd57d1b0b7db3ccaa4e91d7eeec7714a12a7d00028b24749d28b12feb0d9815320a4d0641ec0cd5c5a9a50398c06b14e5f8d8a78d16a14b
+MISC ChangeLog 2216 SHA256 f3a01c98529b0a9a52fc31964d96851115c0068f52f45de0dd945d638ca54c03 SHA512 696356b50cb8bb2e35548ba633b033d46646ad80c8a8dce8eeadb5c1ad1d405d530d2aac2b9de1908a8ac26514c75531f0c93117a8fe5f5a1971caed0bc0c464 WHIRLPOOL 72b8d20abcc1dd6239e18b8aa843ef15b56489e05f18b9686c58775d46ea36b786b4327c8c3027c90eb9f6c1f230fb14e1827b2888ea5a213fdd6a6e21e43473
+MISC ChangeLog-2015 385 SHA256 bce74382b018359861347ebd044036dd9789a6c5b3b88eb1ec5853f07e122d49 SHA512 730f1fcf5bdbbff81ff4b2fdc208838b272d1ff714485fed8adaba4bec0beb720964dd7be7e5435b6b8a96844d566feaa2c80bd6a073f92ccc303dc6565b0674 WHIRLPOOL 5668eaf39584c358b6f1c35e34e3142f9de897079e49ba12c9284a78da22075752fbaa505bf751bfdc1949e316257584cb57860517b8052411617214909a2055
+MISC metadata.xml 390 SHA256 1fc5a3bc6379dfcb9d98f612f4f5504ad90c0ebe3020fd5c3c61f7ca7828619d SHA512 329493d221be3401b9531df7eed468d4d9d1ebb7f89a561fbad49ab4fb2910bd92a1e8c8b03a0d3b01dba1e39b7e4a9eaf2d857134706c30977eccdbd8bc757c WHIRLPOOL e6991999449a181cd4566c36c778218f2213466cebd8af48c6f0f0510b991d1dfc4b8ab9f402a1f6cbc50a39a12ef5973824a708643eff82f6a5090d871ec2c2
diff --git a/net-dns/dnscap/dnscap-20130814.ebuild b/net-dns/dnscap/dnscap-20130814.ebuild
new file mode 100644
index 000000000000..baed5d542660
--- /dev/null
+++ b/net-dns/dnscap/dnscap-20130814.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="dnscap is a network capture utility designed specifically for DNS traffic"
+HOMEPAGE="http://dnscap.dns-oarc.net/"
+
+## github commit tarball
+MY_GIT_COMMIT="727ed7d5e46625abc2c8d988689a300589e948b6"
+MY_P="verisign-${PN}-${MY_GIT_COMMIT:0:7}"
+SRC_URI="https://github.com/verisign/${PN}/tarball/${MY_GIT_COMMIT} -> ${PF}.tar.gz"
+
+S="${WORKDIR}/${MY_P}"
+
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+LICENSE="ISC"
+IUSE=""
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ ## adds DESTDIR to install target
+ epatch "${FILESDIR}/${P}.install.patch"
+}
diff --git a/net-dns/dnscap/files/dnscap-20130814.install.patch b/net-dns/dnscap/files/dnscap-20130814.install.patch
new file mode 100644
index 000000000000..b09c7cfdbfcf
--- /dev/null
+++ b/net-dns/dnscap/files/dnscap-20130814.install.patch
@@ -0,0 +1,22 @@
+diff -urN verisign-dnscap-727ed7d.orig/Makefile.in verisign-dnscap-727ed7d/Makefile.in
+--- verisign-dnscap-727ed7d.orig/Makefile.in 2013-08-14 01:31:33.000000000 +0200
++++ verisign-dnscap-727ed7d/Makefile.in 2014-04-26 22:04:35.438580361 +0200
+@@ -45,13 +45,11 @@
+ all: ${prog} ${prog}.cat1
+
+ install: all
+- install -d -m 755 ${bindir}
+- if [ -f ${bindir}/${prog} ]; then \
+- mv -f ${bindir}/${prog} ${bindir}/${prog}.old; fi
+- install -m 755 ${prog} ${bindir}/
+- install -d -m 755 ${mandir}
+- install -d -m 755 ${mandir}/cat1
+- install -m 644 ${prog}.cat1 ${mandir}/cat1/${prog}.1
++ install -d -m 755 $(DESTDIR)${bindir}
++ install -m 755 ${prog} $(DESTDIR)${bindir}/
++ install -d -m 755 $(DESTDIR)${mandir}
++ install -d -m 755 $(DESTDIR)${mandir}/cat1
++ install -m 644 ${prog}.cat1 $(DESTDIR)${mandir}/cat1/${prog}.1
+
+ .c.o:
+ ${CC} ${CFLAGS} -c $<
diff --git a/net-dns/dnscap/metadata.xml b/net-dns/dnscap/metadata.xml
new file mode 100644
index 000000000000..b16bf6f9bdeb
--- /dev/null
+++ b/net-dns/dnscap/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>wschlich@gentoo.org</email>
+ <name>Wolfram Schlich</name>
+ <description>Primary maintainer</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">verisign/dnscap</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/dnscrypt-proxy/Manifest b/net-dns/dnscrypt-proxy/Manifest
new file mode 100644
index 000000000000..bc4feecda92c
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/Manifest
@@ -0,0 +1,8 @@
+AUX dnscrypt-proxy.confd 286 SHA256 11d635f9a504899e450e8f742952b3a736a5fc7da61eeff83eba416f3618c304 SHA512 7135d5fccf3b61981a1d085460f256d23cc63a28acf327f3b87ffed2ee3eb55ecad7703c9d4e4825bf5639d7469366933ff120ef0e7914cc756db829ce0f3d9d WHIRLPOOL 5d1938a9fade6a7e5f8dc0993a3dce6c46f47fde27badbc05d5dbda0273aacdfc861d36f5d82c351cb4214670b2d8113c5d70e0add2caa6492f63b3ef4ef19ba
+AUX dnscrypt-proxy.initd 1264 SHA256 48ea1cc31b5c13d3b4fd04cf1b16a8b6a565e5ec60a639a0290459874d3495a9 SHA512 c0aeb6410679ebd277c9c4788f244c8b0a3a8aa04603fb9ccec506fa324c16489cd9d25d8ebfa0aed7324abb018a19f126d8d57fb798cfedc55035dfc45c5d99 WHIRLPOOL fff54ab455eafa04774aa1302fcf2d93858dddc949adafc69c21c658add6158b7831f36f55554662bf71101afbbadd918ef4325ac438c8023e706d176ec526e3
+AUX dnscrypt-proxy.service 662 SHA256 85dc6e5dc60b2da75c891c0ea7670d9067886b9b71c6e310014d7676d7b5b453 SHA512 4e018ec5f586e60ad1b2c16719ad56dc63184122861032dcccbe599f2090869d7193ebe4e0c1845d6005627902a25bf13ab26b5ad0bdf2c3ef8ae7c57a187798 WHIRLPOOL cec5860a2dbed5be9b2c8f33d8094535207c0b93b7f49cbd29e50bf420ab0c6a90db055468ceeb44eb9a0087e304636f7395311b91a1a297a9f7010586076f73
+DIST dnscrypt-proxy-1.9.4.tar.gz 1660333 SHA256 40543efbcd56033ac03a1edf4581305e8c9bed4579ac55e6279644f07c315307 SHA512 b19103dc39655f199c85ec69daab949d07adc12e64411d2323308afb398e6ac6563bbc17f2e317bfe1e6c95c810487d8d62da3f4c7f7257bdcf837cd0390bfb0 WHIRLPOOL 4e9494c2765ecf9d625f7b44c0f58c40e491e1334a58552111730ecd3b95cba10667b2bfa2b29e291ccfa97a5678bbbc398dd14e888914bfddc6f7e61bac4a3a
+EBUILD dnscrypt-proxy-1.9.4-r1.ebuild 1449 SHA256 839d603cc0d1901169d5d64413d73537fdc513fdbf87f5c131b5741231b927e2 SHA512 c17b1b23bd87deb1d6167ca01920d3cd5f9b804a70606af0dc23060e7e9b568b9539fe6d06a92efbf6665b8d4cbbd485827c2ccc3ba82b93e6e944c26f190aa7 WHIRLPOOL bdbc4ebd9346210cce61cdc935ff4b16238d348f90ac9b31e7895718b0b5d43e3a3f7b37067fb43b5ac283dbc459a775149a5cd93425725a92c4ba673c63a7af
+MISC ChangeLog 4892 SHA256 a8bcfebf1b7b7a44dfeaeef7f9b72549c95c8161ade6eb5cc9926739177344b0 SHA512 2a2f487e3caffccfed8474d0ebcb743a67c05d1c014156c53dd30db8d46f9717c2f68d22e28abf456f37caa7326e76a7d0b9366a5edba7eee46e6acc41ddc174 WHIRLPOOL 8eed7a6671e7d5a96859e310efa37858b7ac96a732d29b4274f32fc3bc3a1530e5eaf062a034db3a70b41117eb089452d12a031b2d908adafa3ab4d46e1fe3c7
+MISC ChangeLog-2015 666 SHA256 2b0c5a63391baf5c07350fc1313eb7e63f1ced626d2a0e8b682a9d013639dba5 SHA512 c3f372befcfb26fd816fedf422e3d56237e4c3a0a4c21aac865fc170683c994b4d53092cb15cc1e136ecd556d7dca35301636758f27b59854857ba58c1a05bbd WHIRLPOOL c5ee0cb599a1cc2fb40dea031b2858a506cdd5ba40d4929a599e78e2b423ad97e9b7579847ce75ab74aa087a5d975bf8763bbe6ca68e356f129787eac60a4012
+MISC metadata.xml 660 SHA256 190935b21a48bd5b8ed03dbc8eaf05503026564b34316eb71d8ed06188859f12 SHA512 e067fbb9bf3872f4f58f42ce389d950e3972bfafcdc22257ebc6b09ce8ed2770a11e1389b0c5885a5f39515f96337bdf1fc3c893e02e51d1cb7c980db7a30b54 WHIRLPOOL 7f1c614a9174bdfdbed48be155c42affc84c624dcb477a62d731c4e6580d3f33bdb458c158b5b938a0a7851711f09f07e72139265b73e426e871e582ae02698d
diff --git a/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.9.4-r1.ebuild b/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.9.4-r1.ebuild
new file mode 100644
index 000000000000..b8069db8ab60
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.9.4-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd user
+
+DESCRIPTION="A tool for securing communications between a client and a DNS resolver"
+HOMEPAGE="https://dnscrypt.org"
+SRC_URI="https://download.dnscrypt.org/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="hardened libressl +plugins ssl systemd"
+
+RDEPEND="
+ dev-libs/libsodium
+ net-libs/ldns
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ systemd? ( sys-apps/systemd )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="AUTHORS ChangeLog NEWS README* THANKS *txt"
+
+pkg_setup() {
+ enewgroup dnscrypt
+ enewuser dnscrypt -1 -1 /var/empty dnscrypt
+}
+
+src_configure() {
+ econf \
+ $(use_enable hardened pie) \
+ $(use_enable plugins) \
+ $(use_enable ssl openssl) \
+ $(use_with systemd)
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
+
+pkg_postinst() {
+ elog "After starting the service you will need to update your"
+ elog "/etc/resolv.conf and replace your current set of resolvers"
+ elog "with:"
+ elog
+ elog "nameserver <DNSCRYPT_LOCALIP>"
+ elog
+ elog "where <DNSCRYPT_LOCALIP> is what you supplied in"
+ elog "/etc/conf.d/dnscrypt-proxy, default is \"127.0.0.1\"."
+ elog
+ elog "Also see https://github.com/jedisct1/dnscrypt-proxy#usage."
+}
diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd
new file mode 100644
index 000000000000..ceedd454b5fb
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd
@@ -0,0 +1,7 @@
+DNSCRYPT_LOCALIP=127.0.0.1
+DNSCRYPT_LOCALPORT=53
+DNSCRYPT_USER=dnscrypt
+DNSCRYPT_PROVIDER_NAME=2.dnscrypt-cert.opendns.com
+DNSCRYPT_PROVIDER_KEY=B735:1140:206F:225D:3E2B:D822:D7FD:691E:A1C3:3CC8:D666:8D0C:BE04:BFAB:CA43:FB79
+DNSCRYPT_RESOLVERIP=208.67.220.220
+DNSCRYPT_RESOLVERPORT=443
diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd
new file mode 100644
index 000000000000..9b07d7d47d82
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd
@@ -0,0 +1,47 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DNSCRYPT_LOGFILE=${DNSCRYPT_LOGFILE:-/var/log/dnscrypt-proxy.log}
+
+rundir=${rundir:-/var/run/dnscrypt-proxy}
+pidfile=${pidfile:-${rundir}/dnscrypt-proxy.pid}
+rundir=${rundir:-/var/run/dnscrypt-proxy}
+runas_user=${runas_user:-dnscrypt}
+runas_group=${runas_user:-dnscrypt}
+
+depend() {
+ use net
+ before dns
+ after logger
+}
+
+start() {
+ if [ ! -d "${rundir}" ]; then
+ mkdir "${rundir}"
+ if [ -n "${runas_user}" ]; then
+ touch "${DNSCRYPT_LOGFILE}"
+ chown ${runas_user}:${runas_group} "${DNSCRYPT_LOGFILE}"
+ chown -R ${runas_user}:${runas_group} "${rundir}"
+ fi
+ fi
+
+ ebegin "Starting dnscrypt-proxy"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/dnscrypt-proxy \
+ -- \
+ --pidfile="${pidfile}" \
+ --logfile="${DNSCRYPT_LOGFILE}" \
+ --daemonize --user=${runas_user} \
+ --local-address=${DNSCRYPT_LOCALIP}:${DNSCRYPT_LOCALPORT} \
+ --resolver-address=${DNSCRYPT_RESOLVERIP}:${DNSCRYPT_RESOLVERPORT} \
+ --provider-name=${DNSCRYPT_PROVIDER_NAME} \
+ --provider-key=${DNSCRYPT_PROVIDER_KEY}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dnscrypt-proxy"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/dnscrypt-proxy
+ eend $?
+}
diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service
new file mode 100644
index 000000000000..4403254280a2
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=A tool for securing communications between a client and a DNS resolver
+
+[Service]
+Type=simple
+PIDFile=/var/run/dnscrypt-proxy.pid
+EnvironmentFile=/etc/conf.d/dnscrypt-proxy
+ExecStartPre=/bin/rm -f /var/run/dnscrypt-proxy.pid
+ExecStart=/usr/sbin/dnscrypt-proxy \
+ --pidfile=/var/run/dnscrypt-proxy.pid \
+ --logfile=/var/log/dnscrypt-proxy.log \
+ --local-address=${DNSCRYPT_LOCALIP}:${DNSCRYPT_LOCALPORT} \
+ --resolver-address=${DNSCRYPT_RESOLVERIP}:${DNSCRYPT_RESOLVERPORT} \
+ --provider-name=${DNSCRYPT_PROVIDER_NAME} \
+ --provider-key=${DNSCRYPT_PROVIDER_KEY} \
+ --user=${DNSCRYPT_USER}
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/dnscrypt-proxy/metadata.xml b/net-dns/dnscrypt-proxy/metadata.xml
new file mode 100644
index 000000000000..c07b954026a6
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ dnscrypt-proxy provides local service which can be used directly as your
+ local resolver or as a DNS forwarder, encrypting and authenticating
+ requests using the DNSCrypt protocol and passing them to an upstream
+ server.
+ </longdescription>
+ <use>
+ <flag name="plugins">Enable plugin support to inspect and modify
+ queries and responses</flag>
+ <flag name="systemd">Use systemd's socket activation instead of
+ creating the sockets itself</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/dnsdist/Manifest b/net-dns/dnsdist/Manifest
new file mode 100644
index 000000000000..faeab3b657a7
--- /dev/null
+++ b/net-dns/dnsdist/Manifest
@@ -0,0 +1,7 @@
+AUX dnsdist.conf.example 524 SHA256 86afac1134df0d054940844e294ef7b673c82646f34ab3285279f82629c6166a SHA512 385bee5725d927feb50fc0f40cd48cd365a495e39c0d947aa53dc454d84b7fe3806cd1d206056c96d111e7251db2cda27570ff8154c70bed145d37bc7d1db01d WHIRLPOOL 61d55b320e214084d8cfbd4ddb507e4b5f9197abaeed0a51c36f95df35e9a19ec0ecfea6c89e2e78c390b5671debbf7bf21365d8f4ac7dc188d873cabbccf39e
+AUX dnsdist.confd 266 SHA256 ead9dcb8204376886ed05a1df3b088088f9927f077ac14c72caf21e68d796fc4 SHA512 935afc768ae56d017f6dee8bed7a3e92615055a0d4d2ae9980afef1b8f353da0e8bd6e20b914602e50b116ad33ef17ba05535b225af8b8da9ad005694edc071f WHIRLPOOL 3a089c0af1cf95120e8ccc4de969311be26e085b92111720287866899d04be4e40bb1b5c5004b26e15b4e0a2d7187638c37e6c3cef94a44782c09629413b13a3
+AUX dnsdist.initd 1340 SHA256 59541ccd5d50469b23e0a557e872d4ead060178c205f940ebddd467766b62d1f SHA512 79b7c06adc469fed15b659aec4d674a50b64c80679c3474c87c03ae9b5b8ea63a493397822b8f4cb9e360745f38cc9f742aaa09c856618dd9f6c0f8978fa9616 WHIRLPOOL 22b6153bf8f654802dca246f70788226611997d2c84168628c34d35719da2e41b2b01e8874d84064dbba607a1442072ba9a6dc67ff2c0ebce44be968acdfdd28
+DIST dnsdist-1.1.0.tar.bz2 874837 SHA256 b4a1e8931b6d05a24494f54224211c0de0eeb1f5ff170f6b9f5665219bfeafc2 SHA512 91da716997c2440e153944f510a39dd86c9cf8ba8093a7f51a9a5d58ab0a1c230bd99ec57fe8ff0721279c8c4429ad576fe797c1fbe4cde2b9fb8f0405025320 WHIRLPOOL 6d88f4159b8155c9600af94e6e8401c426f183102a18b3f35fc066b8a19d781f5800a2aa64d306ab4ee0daadbaaab1d29b2df05c10058a9b99b9d9cf1abf071e
+EBUILD dnsdist-1.1.0-r1.ebuild 1893 SHA256 51eeaeda5ce4bfae0fa4cbc774f2fa8c8034591c591df7f2a8c59aeb37bd181c SHA512 d23ebc47ac748623a4ad57a4a30dacddc27c3425e96f55dd126f376dda5a23f92a0eb437dfc5bcd13f2f83c22ea7184ef7a1b744304310789ea05a02267b0ea7 WHIRLPOOL b34302a37dc967bccb4bdbe1646b326184b1bc45ac423f6a67f36f7d2884da2d87151185380c69a3faea3660852fe6a6b0c0178caaae6028274bc66df05bbd6d
+EBUILD dnsdist-9999.ebuild 1963 SHA256 fd6a88d5ccfde44f596e76ae289508bd489a81f8845d7826d0fd5e5cc148a545 SHA512 578263147111bb441842fe31fcd58b1cc92af228e8c86040bc28390a862dd3f083f4781dbcf8117b141f146ed36c0bc5f0bbf884270fc5116c436310c68cf006 WHIRLPOOL 7720a25cb0fcf5ff36d9bce8f212b6b7a75a44792f6bc69d83e9c1004b29be08f9451a7035f0e49a41ad1123ec9fd148e9a8d202af732e6799d40bd2908857dd
+MISC metadata.xml 1138 SHA256 fb371d32f95840b9ef13fda151caba34e984ca14efd936637958ea6308e3a705 SHA512 28e685c390be1061fe1202174abc467223b7f0589648fcdbe3d6cbb93ead037501b33b4244687e66d431fc1d642d45e61be348ffed3086afd497516dd02d0e79 WHIRLPOOL 1d634e708d94420a2acadc2d2948c8e53e20d9bac9b3397afe245c9d0f16b5d994b6fff43a453a4abd448e923ab1db9081f6aa4f0498d72466084077b749a145
diff --git a/net-dns/dnsdist/dnsdist-1.1.0-r1.ebuild b/net-dns/dnsdist/dnsdist-1.1.0-r1.ebuild
new file mode 100644
index 000000000000..765c8a196631
--- /dev/null
+++ b/net-dns/dnsdist/dnsdist-1.1.0-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://github.com/PowerDNS/pdns.git"
+
+if [[ ${PV} = 9999 ]]; then
+ ADDITIONAL_ECLASSES="autotools git-r3"
+fi
+
+inherit eutils flag-o-matic user ${ADDITIONAL_ECLASSES}
+
+DESCRIPTION="A highly DNS-, DoS- and abuse-aware loadbalancer"
+HOMEPAGE="http://dnsdist.org"
+
+if [[ ${PV} == 9999 ]]; then
+ SRC_URI=""
+ S="${WORKDIR}/${P}/pdns/dnsdistdist"
+else
+ SRC_URI="https://downloads.powerdns.com/releases/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="dnscrypt luajit regex remote-logging +ssl test"
+REQUIRED_USE="dnscrypt? ( ssl )"
+
+DEPEND="
+ >=dev-libs/boost-1.35:=
+ dev-libs/libedit:=
+ luajit? ( dev-lang/luajit:= )
+ !luajit? ( >=dev-lang/lua-5.1:= )
+ remote-logging? ( dev-libs/protobuf:= )
+ regex? ( dev-libs/re2:= )
+ ssl? ( dev-libs/libsodium:= )
+"
+
+RDEPEND="${DEPEND}"
+
+[[ ${PV} == 9999 ]] && DEPEND+="
+ app-text/pandoc
+ dev-util/ragel
+"
+
+src_prepare() {
+ default
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/dnsdist \
+ $(use_enable ssl libsodium) \
+ $(use_with remote-logging protobuf) \
+ $(use_enable regex re2) \
+ $(use_enable dnscrypt) \
+ $(use_with luajit) \
+ $(use_enable test unit-tests)
+}
+
+src_install() {
+ default
+
+ insinto /etc/dnsdist
+ doins "${FILESDIR}"/dnsdist.conf.example
+
+ newconfd "${FILESDIR}"/dnsdist.confd ${PN}
+ newinitd "${FILESDIR}"/dnsdist.initd ${PN}
+}
+
+pkg_preinst() {
+ enewgroup dnsdist
+ enewuser dnsdist -1 -1 -1 dnsdist
+}
+
+pkg_postinst() {
+ elog "dnsdist provides multiple instances support. You can create more instances"
+ elog "by symlinking the dnsdist init script to another name."
+ elog
+ elog "The name must be in the format dnsdist.<suffix> and dnsdist will use the"
+ elog "/etc/dnsdist/dnsdist-<suffix>.conf configuration file instead of the default."
+}
diff --git a/net-dns/dnsdist/dnsdist-9999.ebuild b/net-dns/dnsdist/dnsdist-9999.ebuild
new file mode 100644
index 000000000000..75b3d1113da0
--- /dev/null
+++ b/net-dns/dnsdist/dnsdist-9999.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://github.com/PowerDNS/pdns.git"
+
+if [[ ${PV} = 9999 ]]; then
+ ADDITIONAL_ECLASSES="autotools git-r3"
+fi
+
+inherit eutils flag-o-matic user ${ADDITIONAL_ECLASSES}
+
+DESCRIPTION="A highly DNS-, DoS- and abuse-aware loadbalancer"
+HOMEPAGE="http://dnsdist.org"
+
+if [[ ${PV} == 9999 ]]; then
+ SRC_URI=""
+ S="${WORKDIR}/${P}/pdns/dnsdistdist"
+else
+ SRC_URI="https://downloads.powerdns.com/releases/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="dnscrypt luajit regex remote-logging snmp +ssl test"
+REQUIRED_USE="dnscrypt? ( ssl )"
+
+DEPEND="
+ >=dev-libs/boost-1.35:=
+ dev-libs/libedit:=
+ luajit? ( dev-lang/luajit:= )
+ !luajit? ( >=dev-lang/lua-5.1:= )
+ remote-logging? ( dev-libs/protobuf:= )
+ regex? ( dev-libs/re2:= )
+ snmp? ( net-analyzer/net-snmp:= )
+ ssl? ( dev-libs/libsodium:= )
+"
+
+RDEPEND="${DEPEND}"
+
+[[ ${PV} == 9999 ]] && DEPEND+="
+ app-text/pandoc
+ dev-util/ragel
+"
+
+src_prepare() {
+ default
+ [[ ${PV} == 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/dnsdist \
+ $(use_enable ssl libsodium) \
+ $(use_with remote-logging protobuf) \
+ $(use_enable regex re2) \
+ $(use_enable dnscrypt) \
+ $(use_with luajit) \
+ $(use_enable test unit-tests) \
+ $(use_with snmp net-snmp)
+}
+
+src_install() {
+ default
+
+ insinto /etc/dnsdist
+ doins "${FILESDIR}"/dnsdist.conf.example
+
+ newconfd "${FILESDIR}"/dnsdist.confd ${PN}
+ newinitd "${FILESDIR}"/dnsdist.initd ${PN}
+}
+
+pkg_preinst() {
+ enewgroup dnsdist
+ enewuser dnsdist -1 -1 -1 dnsdist
+}
+
+pkg_postinst() {
+ elog "dnsdist provides multiple instances support. You can create more instances"
+ elog "by symlinking the dnsdist init script to another name."
+ elog
+ elog "The name must be in the format dnsdist.<suffix> and dnsdist will use the"
+ elog "/etc/dnsdist/dnsdist-<suffix>.conf configuration file instead of the default."
+}
diff --git a/net-dns/dnsdist/files/dnsdist.conf.example b/net-dns/dnsdist/files/dnsdist.conf.example
new file mode 100644
index 000000000000..ffcc6060ef0c
--- /dev/null
+++ b/net-dns/dnsdist/files/dnsdist.conf.example
@@ -0,0 +1,19 @@
+--[[
+This is an example dnsdist configuration file.
+Please refer to the dnsdist documentation
+at http://dnsdist.org/README/ for more information.
+]]--
+
+-- Listen on 192.0.2.1 on port 53.
+setLocal("192.0.2.1:53")
+
+-- Add 2001:db8::2:1 to the list of adresses dnsdist should listen on
+addLocal("2001:db8::2:1")
+
+-- Add to the ACL set who can use this server
+addACL("192.0.2.0/24")
+addACL("2001:db8::/32")
+
+-- Instantiate two new downstram server with their default settings
+newServer("198.51.100.1")
+newServer("198.51.100.2")
diff --git a/net-dns/dnsdist/files/dnsdist.confd b/net-dns/dnsdist/files/dnsdist.confd
new file mode 100644
index 000000000000..7151fd0ad7bb
--- /dev/null
+++ b/net-dns/dnsdist/files/dnsdist.confd
@@ -0,0 +1,13 @@
+# /etc/conf.d/dnsdist
+
+# Options to pass on to dnsdist during the start
+DNSDIST_OPTIONS=""
+
+# Run dnsdist as this user
+DNSDIST_USER="dnsdist"
+
+# Run dnsdist in this group
+DNSDIST_GROUP="dnsdist"
+
+# Set the maximum number of open file descriptors
+rc_ulimit="-n 2048"
diff --git a/net-dns/dnsdist/files/dnsdist.initd b/net-dns/dnsdist/files/dnsdist.initd
new file mode 100644
index 000000000000..bfeef82d46f1
--- /dev/null
+++ b/net-dns/dnsdist/files/dnsdist.initd
@@ -0,0 +1,55 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="configcheck"
+#extra_started_commands=""
+
+DNSDIST_INSTANCE="${SVCNAME#dnsdist[.-]}"
+DNSDIST_CONFFILE="/etc/dnsdist/${SVCNAME#dnsdist[.-]}.conf"
+DNSDIST="/usr/bin/dnsdist"
+PIDDIR=/run/dnsdist
+PIDFILE=$PIDDIR/$SVCNAME.pid
+
+
+if [ -n "${DNSDIST_INSTANCE}" ] && [ "${DNSDIST_INSTANCE}" != "dnsdist" ]
+then
+ DNSDIST_INSTANCE="dnsdist-${SVCNAME#dnsdist[.-]}"
+ DNSDIST_CONFFILE="/etc/dnsdist/${DNSDIST_INSTANCE}.conf"
+else
+ DNSDIST_INSTANCE="default"
+fi
+
+depend() {
+ need net
+}
+
+start() {
+ checkpath -q -d ${PIDDIR} -o ${DNSDIST_USER}:${DNSDIST_GROUP}
+
+ configcheck || return 1
+
+ ebegin "Starting dnsdist (${DNSDIST_INSTANCE})"
+ start-stop-daemon --start --exec $DNSDIST --pidfile ${PIDFILE} \
+ -- -d -p ${PIDFILE} -u ${DNSDIST_USER} -g ${DNSDIST_GROUP} \
+ -C $DNSDIST_CONFFILE ${DNSDIST_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dnsdist (${DNSDIST_INSTANCE})"
+ start-stop-daemon --stop --exec $DNSDIST --pidfile ${PIDFILE}
+ eend $?
+}
+
+configcheck() {
+ ebegin "Checking configuration file (${DNSDIST_CONFFILE})"
+ $DNSDIST --check-config -C $DNSDIST_CONFFILE > /dev/null
+
+ if [ $? -ne 0 ]; then
+ $DNSDIST --check-config -C $DNSDIST_CONFFILE
+ fi
+
+ eend $? "failed, please correct errors above"
+}
+
diff --git a/net-dns/dnsdist/metadata.xml b/net-dns/dnsdist/metadata.xml
new file mode 100644
index 000000000000..a9231ab03330
--- /dev/null
+++ b/net-dns/dnsdist/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>bgo@9dt.de</email>
+ <name>Vladimir Datsevich</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its goal in life is to route traffic to the best server, delivering top performance to legitimate users while shunting or blocking abusive traffic.
+ </longdescription>
+ <use>
+ <flag name="dnscrypt">Enable the ability to act as a DNSCrypt server</flag>
+ <flag name="luajit">Use <pkg>dev-lang/luajit</pkg> instead of <pkg>dev-lang/lua</pkg></flag>
+ <flag name="regex">Enable support for regular expression matching via <pkg>dev-libs/re2</pkg></flag>
+ <flag name="remote-logging">Enable support for remote logging via <pkg>dev-libs/protobuf</pkg></flag>
+ <flag name="ssl">Enable support for and encrypted client-server communication via <pkg>dev-libs/libsodium</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/dnshijacker/Manifest b/net-dns/dnshijacker/Manifest
new file mode 100644
index 000000000000..c4edb495a892
--- /dev/null
+++ b/net-dns/dnshijacker/Manifest
@@ -0,0 +1,6 @@
+AUX dnshijacker-1.3-gentoo.patch 1697 SHA256 3d8d58db6043f3ba086c20ec7db0792311203e3066ad6e433629f5bdaad3e646 SHA512 37fb70e9616690b5da2edd111230647787b5e011a564cc34411bf65e7d198225028a7406fdb885aa092f533b64d038c40db412a9979c47eed491a93fa421b339 WHIRLPOOL 571e53d187bc019041a8fe8f553744c0b3983beda70b13c16944136bcc641136b0b968ab3b38f21ee9ba49172233285dab1dd35f98cc4e8f4799ef4226e80673
+DIST dnshijacker-1.3.tar.gz 23569 SHA256 4040cb211860bec4dd43af09e157da25ebd20189d35884c11639d281ef7cd16a SHA512 628d545f1b6345e641254519cbb696ae2a38e218a5129558dae404d0ef374afdabf06c63775d5bc5d2d020de3bf339342c7e1a1b10beed4beadb703ff63c693d WHIRLPOOL 94bfcaa8ecca3d60dc472d1615e49208127d4c9407d1c19bf1d20a31b7c2f2a80114906d06927bfbe775ccd3ee45c4d348bcf9009f0ab26d878a0f1c78102fb3
+EBUILD dnshijacker-1.3-r2.ebuild 670 SHA256 663b34ee2e1dd85dc53c5966ef9430dd97404824923fd80260e7bab3b612ba50 SHA512 c3efcfaf6be8705efeed8e051d71f011972ea79117cf096b40c76a3528b11b0dbabc4484cc9abaca7ae86833283167d03e0a9cbb25304970ecc4bf71259d89fc WHIRLPOOL 27420f122e1c3491fc37f78148fb54d7a0c52dc32d5de477ed2df1da57ac5ff629fad7926d31949ad2089ba45b89d748235eac5b97f8ff83ae2c6da8145c3164
+MISC ChangeLog 2603 SHA256 dd35f59c81b675e3fbbd4f14f33d179855db2aad55d8f928d1bfbdd092024718 SHA512 5b4dcc384aceb686bc23ad0c3bc06374bd99451980155c47e1d04624bd37744c2ea9de7bcb1b9018cdf0ecdc079370b1da98c224c3402c06b9303b34ae8eeb54 WHIRLPOOL 67adaff8e49a8ade7a7700bf77dc0d079b9f36721bf9de719273b3ecd68f054789185362eeda4445eb79ba80ccb4fafdf8959da7d07af420987b7346a3420110
+MISC ChangeLog-2015 2345 SHA256 e56c1c06471f1a3b53a5883a71b31e6707de8b023d0d23c84a9d30dabff78328 SHA512 6e3a2570a422944904816dbc2d0093762b3f8fbd1837c2d0060f0cd02bdf6b1718ca02b2c66ceb6931b1ff01d271cff81c074c21bfdfd4e68da5cc1863ac41bc WHIRLPOOL 7de08fe4b5e0e4b2b9e1488b63d40b22bb8b66f8f7a5e569a6ce6ac7950080d8fbd1a402e19efd85606759508a46a2a922a8ef21201df7aa894a0014c41a2d44
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-dns/dnshijacker/dnshijacker-1.3-r2.ebuild b/net-dns/dnshijacker/dnshijacker-1.3-r2.ebuild
new file mode 100644
index 000000000000..6a23ca9c088c
--- /dev/null
+++ b/net-dns/dnshijacker/dnshijacker-1.3-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="a libnet/libpcap based packet sniffer and spoofer"
+HOMEPAGE="http://pedram.redhive.com/projects.php"
+SRC_URI="http://pedram.redhive.com/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+DEPEND="net-libs/libpcap
+ >=net-libs/libnet-1.0.2a-r3:1.0"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_compile() {
+ emake CC=$(tc-getCC)
+}
+
+src_install() {
+ dosbin dnshijacker ask_dns answer_dns
+
+ insinto /etc/dnshijacker
+ doins ftable
+
+ dodoc README
+}
diff --git a/net-dns/dnshijacker/files/dnshijacker-1.3-gentoo.patch b/net-dns/dnshijacker/files/dnshijacker-1.3-gentoo.patch
new file mode 100644
index 000000000000..9af952067618
--- /dev/null
+++ b/net-dns/dnshijacker/files/dnshijacker-1.3-gentoo.patch
@@ -0,0 +1,37 @@
+--- a/answer_dns.c 2002-10-28 02:58:37.000000000 +0100
++++ b/answer_dns.c 2010-09-19 01:16:28.000000000 +0200
+@@ -5 +5 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/ask_dns.c 2002-10-28 02:58:34.000000000 +0100
++++ b/ask_dns.c 2010-09-19 01:16:28.000000000 +0200
+@@ -5 +5 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/dnshijacker.h 2002-11-18 05:21:48.000000000 +0100
++++ b/dnshijacker.h 2010-09-19 01:16:28.000000000 +0200
+@@ -10 +10 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+@@ -12 +12 @@
+-
++#include <resolv.h>
+--- a/Makefile 2002-12-02 01:51:09.000000000 +0100
++++ b/Makefile 2010-09-19 01:16:28.000000000 +0200
+@@ -4 +4 @@
+- gcc ask_dns.c -lnet `libnet-config --defines` -o ask_dns
++ $(CC) $(CFLAGS) $(LDFLAGS) ask_dns.c -lnet-1.0 `libnet-1.0-config --defines` -o ask_dns
+@@ -7 +7 @@
+- gcc answer_dns.c -lnet `libnet-config --defines` -o answer_dns
++ $(CC) $(CFLAGS) $(LDFLAGS) answer_dns.c -lnet-1.0 `libnet-1.0-config --defines` -o answer_dns
+@@ -10 +10 @@
+- gcc dnshijacker.c -lpcap -lnet -lresolv `libnet-config --defines` -o dnshijacker
++ $(CC) $(CFLAGS) $(LDFLAGS) dnshijacker.c -lpcap -lnet-1.0 -lresolv `libnet-1.0-config --defines` -o dnshijacker
+@@ -13 +13 @@
+- gcc dnshijacker.c -lpcap -lnet -lresolv `libnet-config --defines` -o dnshijacker -DDEBUG -ggdb
++ $(CC) $(CFLAGS) $(LDFLAGS) dnshijacker.c -lpcap -lnet-1.0 -lresolv `libnet-1.0-config --defines` -o dnshijacker -DDEBUG -ggdb
+--- a/README 2002-10-30 06:12:09.000000000 +0100
++++ b/README 2010-09-19 01:16:28.000000000 +0200
+@@ -61 +61 @@
+- gcc dnshijacker.c -lpcap -lnet `libnet-config --defines` -o dnshijacker
++ gcc dnshijacker.c -lpcap -lnet-1.0 `libnet-1.0-config --defines` -o dnshijacker
diff --git a/net-dns/dnshijacker/metadata.xml b/net-dns/dnshijacker/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-dns/dnshijacker/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-dns/dnsimple-dyndns/Manifest b/net-dns/dnsimple-dyndns/Manifest
new file mode 100644
index 000000000000..e3c59370f7f1
--- /dev/null
+++ b/net-dns/dnsimple-dyndns/Manifest
@@ -0,0 +1,5 @@
+DIST dnsimple-dyndns-0.1.tar.gz 4453 SHA256 5290db4354f3f015e78d7d689f5c7fe876bb9f073f9a765ed3adc67aae8243d9 SHA512 1dc7cdb968cd9303b922f0537fb5e63e5f16ed86d53506b47311d11f554f8e8332b989206c4947be75a07d576c98f4766dc9350ffbb30a31fa3581ded8a2b64e WHIRLPOOL 5b82ec54123d78c133aa32e31b7017fd6c1dd11985a3d85c38b83bdbbbb5a6ef4e678a20047f24858086b19312336640309ed580faff6dfe87077f4ffc18453c
+EBUILD dnsimple-dyndns-0.1.ebuild 708 SHA256 d5242140475fbc4c81342af55a0b13dea88e784c9851be47bbbbae29f5793be5 SHA512 fe3706cc4c977f399d27b673927855e4ed8b411385d3ad9577099bfe18ac535ebd324fde864f55a078cc2f0c005e5ebe4dc79e07fb8e630ad245d97c8f59ba67 WHIRLPOOL e1ebd0d5c44072784e9f777591a550db1cdd387a6168e3cc5bbcbaab97716aaf283d93a30b58992d6f148051dac693dcdfddeef18a5e8f86a1c855d9b3a5b02e
+MISC ChangeLog 2195 SHA256 3387268264f9704c4f4f3de342314c9673366e21288da11a7904b83c8fcdfb0f SHA512 878d3b72a1fb8f87dda5854ae74efe5660e5e61b89708d79d14ec9b824b334c2a2cd13605f341c52e08dab33209f9c3aea71d636944b5469988363a68eb61eed WHIRLPOOL 73e8bbb4e724b931f617376b67d468c89dc540591581d7c78dfa1c43362e9148153a42dbe60ba3bc31dd664b56fa8a7f7e5ae483b4485551153d5647f2fb222f
+MISC ChangeLog-2015 735 SHA256 0b5c9a6cb2937353bc519fddd73204f6455888d0842b7b8b3aec0b3bd18554f1 SHA512 55c99368b1f97762ede2655b49e816584e9c1e2e23ee719f81df26699d2e140a22f99bef5bd38e0929c3b6425adf0912c74238a6792c8068330bd0fb12763f6c WHIRLPOOL f42ed73541f72f26e39ae6e31265af8a34888f1aa59db708cf998c3dc73eb4d9b90510afd6dadaafdb72505b396c153b27d75715d3021c3853603d78f92e5ea4
+MISC metadata.xml 635 SHA256 4f50c8a61a085fafde0f52209a83050c392a04de14818603c1b4f656025c9919 SHA512 9c654d8bc5e478794cab70653be29ea03a4df2b4f515e62974a9cb64d45f6db9b004b477b66d66ec1efbb1e425d85de88d7b1ab690d200d19a3957519e4f4df0 WHIRLPOOL c7f7c4c6a0b08b4954c2d3feb11548c0c19c93fbfa7f2345e809bb7acc7f8024a24bb865ae55da9b88156e26775e5fb709d6d841ef56adba4bf8a5ab78213699
diff --git a/net-dns/dnsimple-dyndns/dnsimple-dyndns-0.1.ebuild b/net-dns/dnsimple-dyndns/dnsimple-dyndns-0.1.ebuild
new file mode 100644
index 000000000000..c7a62597feac
--- /dev/null
+++ b/net-dns/dnsimple-dyndns/dnsimple-dyndns-0.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+GIT_ECLASS=
+if [[ ${PV} = *9999* ]]; then
+ GIT_ECLASS="git-r3"
+ EGIT_REPO_URI="https://github.com/rafaelmartins/${PN}.git"
+fi
+
+inherit distutils-r1 ${GIT_ECLASS}
+
+DESCRIPTION="Dynamic DNS implementation, that relies on DNSimple.com"
+HOMEPAGE="https://pypi.python.org/pypi/dnsimple-dyndns
+ https://github.com/rafaelmartins/dnsimple-dyndns"
+
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+KEYWORDS="~amd64 ~x86"
+if [[ ${PV} = *9999* ]]; then
+ SRC_URI=""
+ KEYWORDS=""
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND=">=dev-python/requests-2.0.0"
+RDEPEND="${DEPEND}"
diff --git a/net-dns/dnsimple-dyndns/metadata.xml b/net-dns/dnsimple-dyndns/metadata.xml
new file mode 100644
index 000000000000..db92099ea874
--- /dev/null
+++ b/net-dns/dnsimple-dyndns/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>rafaelmartins@gentoo.org</email>
+ <name>Rafael G. Martins</name>
+ </maintainer>
+ <longdescription lang="en">
+ Dynamic DNS implementation, that relies on DNSimple.com.
+ </longdescription>
+ <upstream>
+ <maintainer status="active">
+ <email>rafaelmartins@gentoo.org</email>
+ <name>Rafael G. Martins</name>
+ </maintainer>
+ <remote-id type="pypi">dnsimple-dyndns</remote-id>
+ <remote-id type="github">rafaelmartins/dnsimple-dyndns</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/dnsmasq/Manifest b/net-dns/dnsmasq/Manifest
new file mode 100644
index 000000000000..bc2d66a37eca
--- /dev/null
+++ b/net-dns/dnsmasq/Manifest
@@ -0,0 +1,17 @@
+AUX dnsmasq-init-dhcp-r1 570 SHA256 f93f49d5894d165c79a3bab7658a5405c8f303afbce6aec99a97b36b2a2b478f SHA512 d0ac774f48aae8a24b9e45c7bcc139fbb3efa0d181bbdd6010e66b62ce546a91deeaee2ca207d367e65748d160c92b54223bf012b26179ae48bd8b3812a0b9d9 WHIRLPOOL bff55ad4e83890689fb18e4e018e056dce9e6af48dad0d6118c8a588534d5bb361935c000d59dd1ca843932c0f55bb9008489f68faf11b4cd8601ee97a9330fc
+AUX dnsmasq-init-dhcp-r2 592 SHA256 ee59c1d6b2e010d07fb2a759827ef6e0cad32dc247423a3ca2572e2ec7fd6e71 SHA512 25620b563a8489a3c1715f17ff4e36695ec08878515c3b2aebab723e8747d38cfbd07c1850f6fef0421653f88032096a839ef6e42fe0c20cc008cfe67bf6c9ea WHIRLPOOL 29a0c1f872c1e5d467cdc8ef22e88482a7b06524b5c80d443a23e5b13aaff94f29ff347a2303de630e251b90005b3766551a35ff3840519eb052aacd3cebb40a
+AUX dnsmasq-init-r2 457 SHA256 8b184410ebc510841f6a4f6f2b622e97cb7d5d697ece8e1f30e34dbcafad21fe SHA512 8cf3092fcc095c307009d12a150883386bd1b0dcdc9cac0c5d1a24df80405bdba89497c88a1e2ac1e1259d3684bc6a6089f477a4f735fb8d0f4edcc29d6e9a06 WHIRLPOOL b7f8ef9cf3e2c99e1d8339a0e0f097ebe92b4443763d8be5af36a2f55466c5f5ad561aaedc49cac5961a35e65756ecae0932bf952658e71b3222f07bd77cf011
+AUX dnsmasq-init-r3 481 SHA256 1c68a33f6039905c3d0e236d091b19b54de58267bf4d848c9f60a4589cfcf191 SHA512 23f292dbf479479ef9d23c0c23ccb2735995f97d37156df3a3818a69ce938ffc2ec7be636771f960038a2e876521f144cc2f2a6fd154de94ff309b50f0cbfa44 WHIRLPOOL 9c35b773b6faa29cd40910e334b780e365a96503b67038227ae6ac881c3a3b7f66af2d8063a58b2f5adfd00264fe0cdae3fc68fcf4bfc467c7a20ff2d1ab844c
+AUX dnsmasq.confd-r1 170 SHA256 51c0672a70d5d6793d295d82db666d372fb081e8627318f67c88e48d08d254b5 SHA512 9a401bfc408bf1638645c61b8ca734bea0a09ef79fb36648ec7ef21666257234254bbe6c73c82cc23aa1779ddcdda0e6baa2c041866f16dfb9c4e0ba9133eab8 WHIRLPOOL 86f364adcb5576bfb2cc84d13dd087bef987cae70eee1ae7816f0febc58ec637a97fea357c506456781eab116e257d06b1e45f7e2bbd81849251c15067a347ab
+AUX dnsmasq.service-r1 278 SHA256 2cca1e7ec70aee80c9d1f59e7f17b515e5fa66b08835ed0fddbe799d2b39db04 SHA512 3571417b23071d9c3cfaf6d00363adb2cb011d04f1ed38631ddecd6eaa2c9ed37e1435a1fd32c40b0de43b0a84dd1ac8691a0a29493b391bafbb843d581bafc1 WHIRLPOOL efbb77d8a3ec69bd030f219ffb975ec0a5680f0d4da8b05bbb896db26c444c861fb47d96dfe8201f21acf5085fb465892ef33263de677390308b2328a8a7e33e
+DIST dnsmasq-2.76.tar.xz 480796 SHA256 4b92698dee19ca0cb2a8f2e48f1d2dffd01a21eb15d1fbed4cf085630c8c9f96 SHA512 8a930f3e7cdc0c291ce89bea8128a4b8438b9aa9e660a2ac037e0baa4c5c74f4482a8f83b0410066a759444b3c4e1cf62a9beb625e38509690227996de10e06a WHIRLPOOL e0710f879fd6f8e27581b8c400704660941601cd2077f32d7c2b3f9791c6be8404469770e74f7e1a03880507a32a30c19b89f6a953a757ad01305f829448f0bc
+DIST dnsmasq-2.77.tar.xz 487244 SHA256 6eac3b1c50ae25170e3ff8c96ddb55236cf45007633fdb8a35b1f3e02f5f8b8a SHA512 6ca98a71a8fdfd606e29c58b34dadfa63148c39f931570cca67a287e044d52c6ec2f8acbf5620ada3312e9db3a2fd63877188d829c070beaa730607e3309e768 WHIRLPOOL 94a4fdc23d81fe38456756d81e53f1258ccd360c4d22952c889f2d5f76d401696587a5362f5aacd1ef86799874ac9eae3c3879d0fe81b66beeafb2f3ce0e01d0
+DIST dnsmasq-2.78.tar.xz 489172 SHA256 89949f438c74b0c7543f06689c319484bd126cc4b1f8c745c742ab397681252b SHA512 9b79b84e5a768d52f90f6335ccef2c404ecd7a13e78e49f4cd0755fffc6cf34d0dc96ad4c72cad1dab3c5743a8d0d789b3e9b6e625b03c5675bb898ca61a698b WHIRLPOOL 3fdde3511c39b5f42a8166936576b60f7114a54388e317136ef9c4b5770c02106706dc0612361b18d25fa16a340e613c98aa78973e2dc038dc93f2a664d27606
+EBUILD dnsmasq-2.76-r1.ebuild 4434 SHA256 dbce5a41e168eadcb76288763c1c92d4eb063a0fbf525c0bcba79d9cb74053e0 SHA512 e6bdf4024337b4a58656e848c0e37ce7e866a452c88ecc4f8b98fa5cdaba6040d839c52654c1604270577dfe23e195ad20bfd0058b18500d591b80c5e14fdf48 WHIRLPOOL df90df04eac87f460efe664e085f2bb1aaaddb8195f45631e79f4f26530f851d11afc12d0105ad49ff7068730f01efea1e159cbd86e989ca37acff55649e05c7
+EBUILD dnsmasq-2.76.ebuild 4313 SHA256 de5cea480d2b30ca4fe36b2701efe91188162f9befbd4d8ea1d0303044fbfc79 SHA512 dbe879468b566b1b12f069b7bae4a9abdab7cdd3677fb4aad0c514ab1b2510a5e17910527b107a137454e6008e0717731f7159a8e91736554ff456bb88c70206 WHIRLPOOL 18173c1b9601f466d5b821bc04880b7549d6c67e80da7e47929a8b8df0dc8f87ab2f2518475b9cdc6cd0d9a7ae38770f8e86b7c1e93fdfaf3eddcf51154962e5
+EBUILD dnsmasq-2.77-r1.ebuild 4586 SHA256 63ea93e59a737c9e4c7a3dd7f3b00bb85484070cbb504f7a85c493f6ab7dfb24 SHA512 f4510d0648c3827231b3eb77e8fb151ab6f770c59d15fbf72134509c7d6292af3d43149b81b00a5353a9d69e356abe401e29982f1e0eb141984c2095188eeca7 WHIRLPOOL 0107a6df9b6aa7f95ebcdbf335e075bddeeda3020dec93a0fa05d2bd1d734430883469b1de05d3eb67d7e500ff6e5b6714b7d00dfca1bebfb435d0bb6b1b65ec
+EBUILD dnsmasq-2.77.ebuild 4554 SHA256 4c11d59e86b721755954e553d22b3d3eb81a8fc35e3ecb6a32b4329589a5416a SHA512 0b470711d65db27c994309dd72c213127b1ae87e506fa0ada259152315a06724f2df786c14903bc6b63a50b01948106e68aebc93a5b81a1a3baab353fe37627a WHIRLPOOL 7112ff2c81f411146b9893b192ff7a84e751bd2a54a2be7cddd8f1703b6d0181bd759eafb3b81978af3ab2b52fd0b36750213eb98ef1e326b2f1ab3ea688f7fb
+EBUILD dnsmasq-2.78.ebuild 4580 SHA256 6283b2ef6141f900b8d416ff68bf57d61de06eaade281735182e22daec5f1d0e SHA512 4dc7961b3b7ba645dd462f3641f5e5836fdddd4c9dd61d0f737cd19cb2503a230462c037d5955e66b2d50931a8782d1fb97520514a8bf540f914fc6dab09a6ff WHIRLPOOL 8c42aeb1866a18db41a46695f22d3767824623f0d39bf958b4d317b9be67bba129de8895371fac5637a11f8201f4178567c38c40bba3adbfb63c164367e2c54d
+MISC ChangeLog 8738 SHA256 241379ae12e786c5cfa51e58455858bab861389383f4577036615c2d59858758 SHA512 c91759c34187dac57d8fe266204a0538d7daf465c9cb4377037474e2ff33071d7018ecc1e008f62ad36df5363abdeb4fa998e0111df4f844fa7675b48d01e4b8 WHIRLPOOL 789019f9c260e216c5f81606c2df3a9e6a39c8953a63a0ceac032ae85b36dff1fa2eecfb527b3683b8e1a60c93efb3dcf5f5441cde5ea5127b096c1f28061af8
+MISC ChangeLog-2015 38329 SHA256 cd8d8df7e7c362a1f284d2ef412c4d9352a472427f25a4ac677b8e3f6a7bfae0 SHA512 80d2755dc22f94c4b35ae57522bab311541c328c703f897dd2427a158d5faccb3d2f55b222129a300f2dbdb53fe899d0d18ae6fd599639f201311ff05028a056 WHIRLPOOL 629bc81f6d6413e1a581cd65a984fadf7f0002ad7cc9862490fdf8d9c4786ce2e71b9b60a8dc0677ad9d483027eac97ac28a7a86483fd870fbae7ee4ea019ee8
+MISC metadata.xml 1149 SHA256 18b445c1b193937f84d229879321ab7c36199a82a4bcb100e087929f73d5f850 SHA512 7fad0bb400a664a67e82173015dcc2fc95644dd6c357e787b8257a193dc14adbee8f5a04cb4422fadefdeec0d3dc5bd986f4f5b44ee420b8a104cb5a8e1b58a6 WHIRLPOOL 8648a3e6f7424dd49e6d483da4559b3be08de89e730466f1515857505e8f5bf4a70347dff2531f900762fabf9480f1165437e970c4ccfcd0ac7af1a3d76cbd2b
diff --git a/net-dns/dnsmasq/dnsmasq-2.76-r1.ebuild b/net-dns/dnsmasq/dnsmasq-2.76-r1.ebuild
new file mode 100644
index 000000000000..27f157cd660e
--- /dev/null
+++ b/net-dns/dnsmasq/dnsmasq-2.76-r1.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs flag-o-matic user systemd
+
+DESCRIPTION="Small forwarding DNS server"
+HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
+SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec idn +inotify ipv6 lua nls script selinux static tftp"
+DM_LINGUAS="de es fi fr id it no pl pt_BR ro"
+for dm_lingua in ${DM_LINGUAS}; do
+ IUSE+=" linguas_${dm_lingua}"
+done
+
+CDEPEND="dbus? ( sys-apps/dbus )
+ idn? ( net-dns/libidn )
+ lua? ( dev-lang/lua:* )
+ conntrack? ( net-libs/libnetfilter_conntrack )
+ nls? (
+ sys-devel/gettext
+ net-dns/libidn
+ )
+"
+
+DEPEND="${CDEPEND}
+ app-arch/xz-utils
+ dnssec? (
+ dev-libs/nettle[gmp]
+ static? (
+ dev-libs/nettle[static-libs(+)]
+ )
+ )
+ virtual/pkgconfig"
+
+RDEPEND="${CDEPEND}
+ dnssec? (
+ !static? (
+ dev-libs/nettle[gmp]
+ )
+ )
+ selinux? ( sec-policy/selinux-dnsmasq )
+"
+
+REQUIRED_USE="dhcp-tools? ( dhcp )
+ lua? ( script )"
+
+use_have() {
+ local useflag no_only uword
+ if [[ $1 == '-n' ]]; then
+ no_only=1
+ shift
+ fi
+ useflag="${1}"
+ shift
+
+ uword="${1:-${useflag}}"
+ shift
+
+ while [[ ${uword} ]]; do
+ uword="${uword^^}"
+
+ if ! use "${useflag}"; then
+ echo -n " -DNO_${uword}"
+ elif [[ -z "${no_only}" ]]; then
+ echo -n " -DHAVE_${uword}"
+ fi
+ uword="${1}"
+ shift
+ done
+}
+
+pkg_pretend() {
+ if use static; then
+ einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
+ use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored."
+ fi
+}
+
+pkg_setup() {
+ enewgroup dnsmasq
+ enewuser dnsmasq -1 -1 /dev/null dnsmasq
+}
+
+src_prepare() {
+ default
+
+ sed -i -r 's:lua5.[0-9]+:lua:' Makefile
+ sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example
+}
+
+src_configure() {
+ COPTS="$(use_have -n auth-dns auth)"
+ COPTS+="$(use_have conntrack)"
+ COPTS+="$(use_have dbus)"
+ COPTS+="$(use_have idn)"
+ COPTS+="$(use_have -n inotify)"
+ COPTS+="$(use_have -n dhcp dhcp dhcp6)"
+ COPTS+="$(use_have -n ipv6 ipv6 dhcp6)"
+ COPTS+="$(use_have lua luascript)"
+ COPTS+="$(use_have -n script)"
+ COPTS+="$(use_have -n tftp)"
+ COPTS+="$(use_have dnssec)"
+ COPTS+="$(use_have static dnssec_static)"
+}
+
+src_compile() {
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ COPTS="${COPTS}" \
+ CONFFILE="/etc/${PN}.conf" \
+ all$(use nls && echo "-i18n")
+
+ use dhcp-tools && emake -C contrib/lease-tools \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ all
+}
+
+src_install() {
+ local lingua puid
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ COPTS="${COPTS}" \
+ DESTDIR="${D}" \
+ install$(use nls && echo "-i18n")
+
+ for lingua in ${DM_LINGUAS}; do
+ use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua}
+ done
+ [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/
+
+ dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
+ dodoc -r logo
+
+ docinto html/
+ dodoc *.html
+
+ newinitd "${FILESDIR}"/dnsmasq-init-r2 ${PN}
+ newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
+
+ insinto /etc
+ newins dnsmasq.conf.example dnsmasq.conf
+
+ insinto /usr/share/dnsmasq
+ doins trust-anchors.conf
+
+ if use dhcp; then
+ dodir /var/lib/misc
+ newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r1 ${PN}
+ fi
+ if use dbus; then
+ insinto /etc/dbus-1/system.d
+ doins dbus/dnsmasq.conf
+ fi
+
+ if use dhcp-tools; then
+ dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time}
+ doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1
+ if use ipv6; then
+ dosbin contrib/lease-tools/dhcp_release6
+ doman contrib/lease-tools/dhcp_release6.1
+ fi
+ fi
+
+ systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+}
+
+pkg_preinst() {
+ # temporary workaround to (hopefully) prevent leases file from being removed
+ [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}"
+}
+
+pkg_postinst() {
+ # temporary workaround to (hopefully) prevent leases file from being removed
+ [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
+}
diff --git a/net-dns/dnsmasq/dnsmasq-2.76.ebuild b/net-dns/dnsmasq/dnsmasq-2.76.ebuild
new file mode 100644
index 000000000000..3b3d54b64eb9
--- /dev/null
+++ b/net-dns/dnsmasq/dnsmasq-2.76.ebuild
@@ -0,0 +1,188 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs flag-o-matic user systemd
+
+DESCRIPTION="Small forwarding DNS server"
+HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
+SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec idn +inotify ipv6 lua nls script selinux static tftp"
+DM_LINGUAS="de es fi fr id it no pl pt_BR ro"
+for dm_lingua in ${DM_LINGUAS}; do
+ IUSE+=" linguas_${dm_lingua}"
+done
+
+CDEPEND="dbus? ( sys-apps/dbus )
+ idn? ( net-dns/libidn )
+ lua? ( dev-lang/lua:* )
+ conntrack? ( net-libs/libnetfilter_conntrack )
+ nls? (
+ sys-devel/gettext
+ net-dns/libidn
+ )
+"
+
+DEPEND="${CDEPEND}
+ app-arch/xz-utils
+ dnssec? (
+ dev-libs/nettle[gmp]
+ static? (
+ dev-libs/nettle[static-libs(+)]
+ )
+ )
+ virtual/pkgconfig"
+
+RDEPEND="${CDEPEND}
+ dnssec? (
+ !static? (
+ dev-libs/nettle[gmp]
+ )
+ )
+ selinux? ( sec-policy/selinux-dnsmasq )
+"
+
+REQUIRED_USE="dhcp-tools? ( dhcp )
+ lua? ( script )"
+
+use_have() {
+ local useflag no_only uword
+ if [[ $1 == '-n' ]]; then
+ no_only=1
+ shift
+ fi
+ useflag="${1}"
+ shift
+
+ uword="${1:-${useflag}}"
+ shift
+
+ while [[ ${uword} ]]; do
+ uword="${uword^^}"
+
+ if ! use "${useflag}"; then
+ echo -n " -DNO_${uword}"
+ elif [[ -z "${no_only}" ]]; then
+ echo -n " -DHAVE_${uword}"
+ fi
+ uword="${1}"
+ shift
+ done
+}
+
+pkg_pretend() {
+ if use static; then
+ einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
+ use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored."
+ fi
+}
+
+pkg_setup() {
+ enewgroup dnsmasq
+ enewuser dnsmasq -1 -1 /dev/null dnsmasq
+}
+
+src_prepare() {
+ default
+
+ sed -i -r 's:lua5.[0-9]+:lua:' Makefile
+ sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example
+}
+
+src_configure() {
+ COPTS="$(use_have -n auth-dns auth)"
+ COPTS+="$(use_have conntrack)"
+ COPTS+="$(use_have dbus)"
+ COPTS+="$(use_have idn)"
+ COPTS+="$(use_have -n inotify)"
+ COPTS+="$(use_have -n dhcp dhcp dhcp6)"
+ COPTS+="$(use_have -n ipv6 ipv6 dhcp6)"
+ COPTS+="$(use_have lua luascript)"
+ COPTS+="$(use_have -n script)"
+ COPTS+="$(use_have -n tftp)"
+ COPTS+="$(use_have dnssec)"
+ COPTS+="$(use_have static dnssec_static)"
+}
+
+src_compile() {
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ COPTS="${COPTS}" \
+ CONFFILE="/etc/${PN}.conf" \
+ all$(use nls && echo "-i18n")
+
+ use dhcp-tools && emake -C contrib/lease-tools \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ all
+}
+
+src_install() {
+ local lingua puid
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ COPTS="${COPTS}" \
+ DESTDIR="${D}" \
+ install$(use nls && echo "-i18n")
+
+ for lingua in ${DM_LINGUAS}; do
+ use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua}
+ done
+ [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/
+
+ dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
+ dodoc -r logo
+
+ docinto html/
+ dodoc *.html
+
+ newinitd "${FILESDIR}"/dnsmasq-init-r2 ${PN}
+ newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
+
+ insinto /etc
+ newins dnsmasq.conf.example dnsmasq.conf
+
+ insinto /usr/share/dnsmasq
+ doins trust-anchors.conf
+
+ if use dhcp; then
+ dodir /var/lib/misc
+ newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r1 ${PN}
+ fi
+ if use dbus; then
+ insinto /etc/dbus-1/system.d
+ doins dbus/dnsmasq.conf
+ fi
+
+ if use dhcp-tools; then
+ dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time}
+ doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1
+ fi
+
+ systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+}
+
+pkg_preinst() {
+ # temporary workaround to (hopefully) prevent leases file from being removed
+ [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}"
+}
+
+pkg_postinst() {
+ # temporary workaround to (hopefully) prevent leases file from being removed
+ [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
+}
diff --git a/net-dns/dnsmasq/dnsmasq-2.77-r1.ebuild b/net-dns/dnsmasq/dnsmasq-2.77-r1.ebuild
new file mode 100644
index 000000000000..754968a7d317
--- /dev/null
+++ b/net-dns/dnsmasq/dnsmasq-2.77-r1.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic user systemd
+
+DESCRIPTION="Small forwarding DNS server"
+HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
+SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+
+IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +id idn libidn2 +inotify"
+IUSE+=" ipv6 lua nls script selinux static tftp"
+
+DM_LINGUAS=(de es fi fr id it no pl pt_BR ro)
+
+for dm_lingua in "${DM_LINGUAS[@]}"; do
+ IUSE+=" linguas_${dm_lingua}"
+done
+
+CDEPEND="dbus? ( sys-apps/dbus )
+ idn? (
+ !libidn2? ( net-dns/libidn )
+ libidn2? ( >=net-dns/libidn2-2.0 )
+ )
+ lua? ( dev-lang/lua:* )
+ conntrack? ( net-libs/libnetfilter_conntrack )
+ nls? ( sys-devel/gettext )
+"
+
+DEPEND="${CDEPEND}
+ app-arch/xz-utils
+ dnssec? (
+ dev-libs/nettle[gmp]
+ static? ( dev-libs/nettle[static-libs(+)] )
+ )
+ virtual/pkgconfig
+"
+
+RDEPEND="${CDEPEND}
+ dnssec? (
+ !static? (
+ dev-libs/nettle[gmp]
+ )
+ )
+ selinux? ( sec-policy/selinux-dnsmasq )
+"
+
+REQUIRED_USE="dhcp-tools? ( dhcp )
+ lua? ( script )
+ libidn2? ( idn )"
+
+use_have() {
+ local useflag no_only uword
+ if [[ $1 == '-n' ]]; then
+ no_only=1
+ shift
+ fi
+ useflag="${1}"
+ shift
+
+ uword="${1:-${useflag}}"
+ shift
+
+ while [[ ${uword} ]]; do
+ uword="${uword^^}"
+
+ if ! use "${useflag}"; then
+ echo -n " -DNO_${uword}"
+ elif [[ -z "${no_only}" ]]; then
+ echo -n " -DHAVE_${uword}"
+ fi
+ uword="${1}"
+ shift
+ done
+}
+
+pkg_pretend() {
+ if use static; then
+ einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
+ use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored."
+ fi
+}
+
+pkg_setup() {
+ enewgroup dnsmasq
+ enewuser dnsmasq -1 -1 /dev/null dnsmasq
+}
+
+src_prepare() {
+ default
+
+ sed -i -r 's:lua5.[0-9]+:lua:' Makefile
+ sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example
+}
+
+src_configure() {
+ COPTS="$(use_have -n auth-dns auth)"
+ COPTS+="$(use_have conntrack)"
+ COPTS+="$(use_have dbus)"
+ COPTS+="$(use libidn2 || use_have idn)"
+ COPTS+="$(use_have libidn2)"
+ COPTS+="$(use_have -n inotify)"
+ COPTS+="$(use_have -n dhcp dhcp dhcp6)"
+ COPTS+="$(use_have -n ipv6 ipv6 dhcp6)"
+ COPTS+="$(use_have -n id id)"
+ COPTS+="$(use_have lua luascript)"
+ COPTS+="$(use_have -n script)"
+ COPTS+="$(use_have -n tftp)"
+ COPTS+="$(use_have dnssec)"
+ COPTS+="$(use_have static dnssec_static)"
+}
+
+src_compile() {
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ COPTS="${COPTS}" \
+ CONFFILE="/etc/${PN}.conf" \
+ all$(use nls && echo "-i18n")
+
+ use dhcp-tools && emake -C contrib/lease-tools \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ all
+}
+
+src_install() {
+ local lingua puid
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ COPTS="${COPTS}" \
+ DESTDIR="${D}" \
+ install$(use nls && echo "-i18n")
+
+ for lingua in "${DM_LINGUAS[@]}"; do
+ use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua}
+ done
+ [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/
+
+ dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
+ dodoc -r logo
+
+ docinto html/
+ dodoc *.html
+
+ newinitd "${FILESDIR}"/dnsmasq-init-r2 ${PN}
+ newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
+
+ insinto /etc
+ newins dnsmasq.conf.example dnsmasq.conf
+
+ insinto /usr/share/dnsmasq
+ doins trust-anchors.conf
+
+ if use dhcp; then
+ dodir /var/lib/misc
+ newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r1 ${PN}
+ fi
+ if use dbus; then
+ insinto /etc/dbus-1/system.d
+ doins dbus/dnsmasq.conf
+ fi
+
+ if use dhcp-tools; then
+ dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time}
+ doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1
+ if use ipv6; then
+ dosbin contrib/lease-tools/dhcp_release6
+ doman contrib/lease-tools/dhcp_release6.1
+ fi
+ fi
+
+ systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+}
+
+pkg_preinst() {
+ # temporary workaround to (hopefully) prevent leases file from being removed
+ [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}"
+}
+
+pkg_postinst() {
+ # temporary workaround to (hopefully) prevent leases file from being removed
+ [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
+}
diff --git a/net-dns/dnsmasq/dnsmasq-2.77.ebuild b/net-dns/dnsmasq/dnsmasq-2.77.ebuild
new file mode 100644
index 000000000000..3b26668c2df5
--- /dev/null
+++ b/net-dns/dnsmasq/dnsmasq-2.77.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic user systemd
+
+DESCRIPTION="Small forwarding DNS server"
+HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
+SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+
+IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +id idn libidn2 +inotify"
+IUSE+=" ipv6 lua nls script selinux static tftp"
+
+DM_LINGUAS=(de es fi fr id it no pl pt_BR ro)
+
+for dm_lingua in "${DM_LINGUAS[@]}"; do
+ IUSE+=" linguas_${dm_lingua}"
+done
+
+CDEPEND="dbus? ( sys-apps/dbus )
+ idn? ( net-dns/libidn )
+ libidn2? ( >=net-dns/libidn2-2.0 )
+ lua? ( dev-lang/lua:* )
+ conntrack? ( net-libs/libnetfilter_conntrack )
+ nls? ( sys-devel/gettext )
+"
+
+DEPEND="${CDEPEND}
+ app-arch/xz-utils
+ dnssec? (
+ dev-libs/nettle[gmp]
+ static? ( dev-libs/nettle[static-libs(+)] )
+ )
+ virtual/pkgconfig
+"
+
+RDEPEND="${CDEPEND}
+ dnssec? (
+ !static? (
+ dev-libs/nettle[gmp]
+ )
+ )
+ selinux? ( sec-policy/selinux-dnsmasq )
+"
+
+REQUIRED_USE="dhcp-tools? ( dhcp )
+ lua? ( script )
+ libidn2? ( !idn )"
+
+use_have() {
+ local useflag no_only uword
+ if [[ $1 == '-n' ]]; then
+ no_only=1
+ shift
+ fi
+ useflag="${1}"
+ shift
+
+ uword="${1:-${useflag}}"
+ shift
+
+ while [[ ${uword} ]]; do
+ uword="${uword^^}"
+
+ if ! use "${useflag}"; then
+ echo -n " -DNO_${uword}"
+ elif [[ -z "${no_only}" ]]; then
+ echo -n " -DHAVE_${uword}"
+ fi
+ uword="${1}"
+ shift
+ done
+}
+
+pkg_pretend() {
+ if use static; then
+ einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
+ use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored."
+ fi
+}
+
+pkg_setup() {
+ enewgroup dnsmasq
+ enewuser dnsmasq -1 -1 /dev/null dnsmasq
+}
+
+src_prepare() {
+ default
+
+ sed -i -r 's:lua5.[0-9]+:lua:' Makefile
+ sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example
+}
+
+src_configure() {
+ COPTS="$(use_have -n auth-dns auth)"
+ COPTS+="$(use_have conntrack)"
+ COPTS+="$(use_have dbus)"
+ COPTS+="$(use_have idn)"
+ COPTS+="$(use_have libidn2)"
+ COPTS+="$(use_have -n inotify)"
+ COPTS+="$(use_have -n dhcp dhcp dhcp6)"
+ COPTS+="$(use_have -n ipv6 ipv6 dhcp6)"
+ COPTS+="$(use_have -n id id)"
+ COPTS+="$(use_have lua luascript)"
+ COPTS+="$(use_have -n script)"
+ COPTS+="$(use_have -n tftp)"
+ COPTS+="$(use_have dnssec)"
+ COPTS+="$(use_have static dnssec_static)"
+}
+
+src_compile() {
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ COPTS="${COPTS}" \
+ CONFFILE="/etc/${PN}.conf" \
+ all$(use nls && echo "-i18n")
+
+ use dhcp-tools && emake -C contrib/lease-tools \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ all
+}
+
+src_install() {
+ local lingua puid
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ COPTS="${COPTS}" \
+ DESTDIR="${D}" \
+ install$(use nls && echo "-i18n")
+
+ for lingua in "${DM_LINGUAS[@]}"; do
+ use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua}
+ done
+ [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/
+
+ dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
+ dodoc -r logo
+
+ docinto html/
+ dodoc *.html
+
+ newinitd "${FILESDIR}"/dnsmasq-init-r2 ${PN}
+ newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
+
+ insinto /etc
+ newins dnsmasq.conf.example dnsmasq.conf
+
+ insinto /usr/share/dnsmasq
+ doins trust-anchors.conf
+
+ if use dhcp; then
+ dodir /var/lib/misc
+ newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r1 ${PN}
+ fi
+ if use dbus; then
+ insinto /etc/dbus-1/system.d
+ doins dbus/dnsmasq.conf
+ fi
+
+ if use dhcp-tools; then
+ dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time}
+ doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1
+ if use ipv6; then
+ dosbin contrib/lease-tools/dhcp_release6
+ doman contrib/lease-tools/dhcp_release6.1
+ fi
+ fi
+
+ systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+}
+
+pkg_preinst() {
+ # temporary workaround to (hopefully) prevent leases file from being removed
+ [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}"
+}
+
+pkg_postinst() {
+ # temporary workaround to (hopefully) prevent leases file from being removed
+ [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
+}
diff --git a/net-dns/dnsmasq/dnsmasq-2.78.ebuild b/net-dns/dnsmasq/dnsmasq-2.78.ebuild
new file mode 100644
index 000000000000..579f6ab2876b
--- /dev/null
+++ b/net-dns/dnsmasq/dnsmasq-2.78.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic user systemd
+
+DESCRIPTION="Small forwarding DNS server"
+HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
+SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+
+IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +id idn libidn2 +inotify"
+IUSE+=" ipv6 lua nls script selinux static tftp"
+
+DM_LINGUAS=(de es fi fr id it no pl pt_BR ro)
+
+for dm_lingua in "${DM_LINGUAS[@]}"; do
+ IUSE+=" linguas_${dm_lingua}"
+done
+
+CDEPEND="dbus? ( sys-apps/dbus )
+ idn? (
+ !libidn2? ( net-dns/libidn )
+ libidn2? ( >=net-dns/libidn2-2.0 )
+ )
+ lua? ( dev-lang/lua:* )
+ conntrack? ( net-libs/libnetfilter_conntrack )
+ nls? ( sys-devel/gettext )
+"
+
+DEPEND="${CDEPEND}
+ app-arch/xz-utils
+ dnssec? (
+ dev-libs/nettle[gmp]
+ static? ( dev-libs/nettle[static-libs(+)] )
+ )
+ virtual/pkgconfig
+"
+
+RDEPEND="${CDEPEND}
+ dnssec? (
+ !static? (
+ dev-libs/nettle[gmp]
+ )
+ )
+ selinux? ( sec-policy/selinux-dnsmasq )
+"
+
+REQUIRED_USE="dhcp-tools? ( dhcp )
+ lua? ( script )
+ libidn2? ( idn )"
+
+use_have() {
+ local useflag no_only uword
+ if [[ $1 == '-n' ]]; then
+ no_only=1
+ shift
+ fi
+ useflag="${1}"
+ shift
+
+ uword="${1:-${useflag}}"
+ shift
+
+ while [[ ${uword} ]]; do
+ uword="${uword^^}"
+
+ if ! use "${useflag}"; then
+ echo -n " -DNO_${uword}"
+ elif [[ -z "${no_only}" ]]; then
+ echo -n " -DHAVE_${uword}"
+ fi
+ uword="${1}"
+ shift
+ done
+}
+
+pkg_pretend() {
+ if use static; then
+ einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
+ use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored."
+ fi
+}
+
+pkg_setup() {
+ enewgroup dnsmasq
+ enewuser dnsmasq -1 -1 /dev/null dnsmasq
+}
+
+src_prepare() {
+ default
+
+ sed -i -r 's:lua5.[0-9]+:lua:' Makefile
+ sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example
+}
+
+src_configure() {
+ COPTS="$(use_have -n auth-dns auth)"
+ COPTS+="$(use_have conntrack)"
+ COPTS+="$(use_have dbus)"
+ COPTS+="$(use libidn2 || use_have idn)"
+ COPTS+="$(use_have libidn2)"
+ COPTS+="$(use_have -n inotify)"
+ COPTS+="$(use_have -n dhcp dhcp dhcp6)"
+ COPTS+="$(use_have -n ipv6 ipv6 dhcp6)"
+ COPTS+="$(use_have -n id id)"
+ COPTS+="$(use_have lua luascript)"
+ COPTS+="$(use_have -n script)"
+ COPTS+="$(use_have -n tftp)"
+ COPTS+="$(use_have dnssec)"
+ COPTS+="$(use_have static dnssec_static)"
+}
+
+src_compile() {
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ COPTS="${COPTS}" \
+ CONFFILE="/etc/${PN}.conf" \
+ all$(use nls && echo "-i18n")
+
+ use dhcp-tools && emake -C contrib/lease-tools \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ all
+}
+
+src_install() {
+ local lingua puid
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ COPTS="${COPTS}" \
+ DESTDIR="${D}" \
+ install$(use nls && echo "-i18n")
+
+ for lingua in "${DM_LINGUAS[@]}"; do
+ use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua}
+ done
+ [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/
+
+ dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
+ dodoc -r logo
+
+ docinto html/
+ dodoc *.html
+
+ newinitd "${FILESDIR}"/dnsmasq-init-r3 ${PN}
+ newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
+
+ insinto /etc
+ newins dnsmasq.conf.example dnsmasq.conf
+
+ insinto /usr/share/dnsmasq
+ doins trust-anchors.conf
+
+ if use dhcp; then
+ dodir /var/lib/misc
+ newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r2 ${PN}
+ fi
+ if use dbus; then
+ insinto /etc/dbus-1/system.d
+ doins dbus/dnsmasq.conf
+ fi
+
+ if use dhcp-tools; then
+ dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time}
+ doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1
+ if use ipv6; then
+ dosbin contrib/lease-tools/dhcp_release6
+ doman contrib/lease-tools/dhcp_release6.1
+ fi
+ fi
+
+ systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+}
+
+pkg_preinst() {
+ # temporary workaround to (hopefully) prevent leases file from being removed
+ [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}"
+}
+
+pkg_postinst() {
+ # temporary workaround to (hopefully) prevent leases file from being removed
+ [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
+}
diff --git a/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1 b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1
new file mode 100644
index 000000000000..b62630f7140b
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload"
+
+pidfile="/var/run/dnsmasq.pid"
+command="/usr/sbin/dnsmasq"
+command_args="-x ${pidfile} ${DNSMASQ_OPTS}"
+retry="TERM/3/TERM/5"
+
+depend() {
+ provide dns
+ need localmount net
+ after bootmisc
+ use logger
+}
+
+start_pre() {
+ checkpath --owner dnsmasq:dnsmasq \
+ --mode 0644 \
+ --file /var/lib/misc/dnsmasq.leases
+}
+
+reload() {
+ ebegin "Reloading ${RC_SVCNAME}"
+ kill -HUP "$(cat "${pidfile}")"
+ eend $?
+}
diff --git a/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2 b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2
new file mode 100644
index 000000000000..610ce7a5d2e1
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload"
+
+pidfile="/var/run/dnsmasq.pid"
+command="/usr/sbin/dnsmasq"
+command_args="-x ${pidfile} ${DNSMASQ_OPTS}"
+retry="TERM/3/TERM/5"
+
+depend() {
+ provide dns
+ need localmount net
+ after bootmisc
+ use logger
+}
+
+start_pre() {
+ checkpath --owner dnsmasq:dnsmasq \
+ --mode 0644 \
+ --file /var/lib/misc/dnsmasq.leases
+}
+
+reload() {
+ ebegin "Reloading ${RC_SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/net-dns/dnsmasq/files/dnsmasq-init-r2 b/net-dns/dnsmasq/files/dnsmasq-init-r2
new file mode 100644
index 000000000000..ed487b9fd1bb
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-init-r2
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload"
+
+pidfile="/var/run/dnsmasq.pid"
+command="/usr/sbin/dnsmasq"
+command_args="-x ${pidfile} ${DNSMASQ_OPTS}"
+retry="TERM/3/TERM/5"
+
+depend() {
+ provide dns
+ need localmount net
+ after bootmisc
+ use logger
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ kill -HUP $(cat "${pidfile}")
+ eend $?
+}
diff --git a/net-dns/dnsmasq/files/dnsmasq-init-r3 b/net-dns/dnsmasq/files/dnsmasq-init-r3
new file mode 100644
index 000000000000..9d58b26fa5ee
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-init-r3
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload"
+
+pidfile="/var/run/dnsmasq.pid"
+command="/usr/sbin/dnsmasq"
+command_args="-x ${pidfile} ${DNSMASQ_OPTS}"
+retry="TERM/3/TERM/5"
+
+depend() {
+ provide dns
+ need localmount net
+ after bootmisc
+ use logger
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/net-dns/dnsmasq/files/dnsmasq.confd-r1 b/net-dns/dnsmasq/files/dnsmasq.confd-r1
new file mode 100644
index 000000000000..0e94463074c9
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq.confd-r1
@@ -0,0 +1,4 @@
+# /etc/conf.d/dnsmasq: config file for /etc/init.d/dnsmasq
+
+# See the dnsmasq(8) man page for possible options to put here.
+DNSMASQ_OPTS="--user=dnsmasq --group=dnsmasq"
diff --git a/net-dns/dnsmasq/files/dnsmasq.service-r1 b/net-dns/dnsmasq/files/dnsmasq.service-r1
new file mode 100644
index 000000000000..8e313bcfd996
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq.service-r1
@@ -0,0 +1,12 @@
+[Unit]
+Description=A lightweight DHCP and caching DNS server
+After=network.target
+
+[Service]
+Type=simple
+ExecStartPre=/usr/sbin/dnsmasq --test
+ExecStart=/usr/sbin/dnsmasq -k --user=dnsmasq --group=dnsmasq
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/dnsmasq/metadata.xml b/net-dns/dnsmasq/metadata.xml
new file mode 100644
index 000000000000..dd1a2a161c68
--- /dev/null
+++ b/net-dns/dnsmasq/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>chutzpah@gentoo.org</email>
+<name>Patrick McLean</name>
+</maintainer>
+<use>
+ <flag name="auth-dns">Add support for acting as an authorative DNS server.</flag>
+ <flag name="conntrack">Add support for Linux conntrack connection marking.</flag>
+ <flag name="dhcp-tools">Install extra command line tools for manually managing DHCP leases.</flag>
+ <flag name="dhcp">Enable support for acting as a DHCP server.</flag>
+ <flag name="dnssec">Enable support DNSSEC validation and caching.</flag>
+ <flag name="id">Whether report *.bind CHAOS info to clients, otherwise forward such requests upstream instead</flag>
+ <flag name="libidn2">Enable support for Internationalized Domain Names, via net-dns/libidn2 rather than net-dns/libidn</flag>
+ <flag name="script">Enable support for calling scripts when leases change.</flag>
+ <flag name="tftp">Enables built in TFTP server for netbooting.</flag>
+</use>
+<upstream>
+ <remote-id type="cpe">cpe:/a:thekelleys:dnsmasq</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/net-dns/dnssec-check/Manifest b/net-dns/dnssec-check/Manifest
new file mode 100644
index 000000000000..fc9f237e81da
--- /dev/null
+++ b/net-dns/dnssec-check/Manifest
@@ -0,0 +1,5 @@
+DIST dnssec-check-2.2.tar.gz 174081 SHA256 17e27a3ef750a1d92edd0b7508793af0e9ac46d132425c57d9d720207c117846 SHA512 8c417d2ee04e4f05b0a8978560ada0167e8d7cd0ae3bc365e83adb4ff06bd0526a25a971c7663651b38b53c4982f4406afddb0310bde10cc8c83dbc8da14aca5 WHIRLPOOL 38550731542d25b9c52304415c9611c62ea1b5331a398b7166b31fb78307318f4048ebdf9c73bbbf04b1a9125306c9228fbc27bdc2344dd0db816ef1b31b8905
+EBUILD dnssec-check-2.2.ebuild 665 SHA256 45a63ed49ead7d612835d2c9c48f25964ff09e6897a1c6d794815a3dc02f4127 SHA512 4dfa070ccb1cc5dd6b0362796b239c8800fd0cf7cb5ce314c517e5a0caf20201b16b81b3456cae30a2a6ec6f15b87598ca398e738e38efc1d0dc2c544240c9c2 WHIRLPOOL afdd87d37c8559946b4f74a456c0979b3c66c11b6f2af8957aa4a372abdfb690f337a97d34cb963dce85774ad71287c6f943de9bbb94fad32fa70f3805748341
+MISC ChangeLog 3281 SHA256 6cf5f95a87f401bfba5e81a2afae62e26d7644ca64f9fb2f57cfef4e88e1845d SHA512 334d3e51d244f759f0e85af99e9785a9552fc49ba9362b0682f127aab8018365caa315f154c914d6a2324df551e4362a0d923e986d22dcb70da237a679709837 WHIRLPOOL 899784e1411687b69771ed8cd43fefa8d85061f89d0e271931ca8711fbcf70e48a686b73bb497f4bf09d7d012e7474c60d560207d024780c4e043252a90183a9
+MISC ChangeLog-2015 1604 SHA256 6066a5a1e818e7879c45be231f498e74cdc60e07d804015b1d745f382d84382a SHA512 17e6f1179c7a54f56d9403547be0bd74025d05160e413d71011dbeb5587efb23e609a294ad8035ab2421ab8fb4823989e03b87dd307ce7bc25a92ff454f3cb69 WHIRLPOOL 58a0062fb67bb1066260bf435cc2206525dc636799c3f81661235bfe254b55e9ab1d88291f88399c9a33adec6814fff51523a1964e334090d571c797a5d94dcd
+MISC metadata.xml 237 SHA256 ffb571839c57797d282263369646d2bba2662601a45f7bb3251bb97f716554a6 SHA512 ae2360aa6b1b00c67e0acea4935c02b64585b9a15e126fec9d5d99637021c542c0a495e5116205f3da287def46fa5b19cb1a7f3042c12c5f7a78d66d92fcb03f WHIRLPOOL 60d6da846c983457e038ea5ba3c0bf48f939c9586610985a14cac9772fd1d45d781a643abc16482f232f3028e44fe99fe1a382deaebf6589602fc244a4460e3f
diff --git a/net-dns/dnssec-check/dnssec-check-2.2.ebuild b/net-dns/dnssec-check/dnssec-check-2.2.ebuild
new file mode 100644
index 000000000000..2c44d414fd5d
--- /dev/null
+++ b/net-dns/dnssec-check/dnssec-check-2.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils qmake-utils
+
+DESCRIPTION="tests local resolver for support of DNSSEC validation"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="net-dns/dnssec-validator[threads]
+ dev-qt/qtdeclarative:5"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -e '/Exec=/s:/opt::' \
+ -i ${PN}.desktop || die
+}
+
+src_configure() {
+ eqmake5 ${PN}.pro
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}usr" install
+
+ doicon ${PN}.png
+ domenu ${PN}.desktop
+}
diff --git a/net-dns/dnssec-check/metadata.xml b/net-dns/dnssec-check/metadata.xml
new file mode 100644
index 000000000000..a535b8852829
--- /dev/null
+++ b/net-dns/dnssec-check/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-dns/dnssec-lookup/Manifest b/net-dns/dnssec-lookup/Manifest
new file mode 100644
index 000000000000..f7d5be3cb777
--- /dev/null
+++ b/net-dns/dnssec-lookup/Manifest
@@ -0,0 +1,7 @@
+DIST dnssec-lookup-2.1.tar.gz 36243 SHA256 b548ef509c2843c09aa32cab700286edac1718bf5583fdaef6e2811eb0a979ab SHA512 c1a90a354411904f5905cd343c30cccca215b60584fcd5ba0cf9643555b56bfb948a8f55a48dc7bc45bf14c1cc945694d308a684d71cc6b5ba8deae8716b7068 WHIRLPOOL 758901e1b992039f7d566a04fa4c510893bd72392c83e800c13bbf4079fc6aac932e04c82ed317fc9b4e2e9015d52ecf705a3e7f6999780a50323b8396d7d147
+DIST dnssec-lookup-2.2.tar.gz 36181 SHA256 5aa093a4623fed2c694d2f01ea1073815c8d7a22b627b46c164966b4b2c2ca46 SHA512 195af13b69681394b6de6ae77b7401f81e6c4005e81e3d95bb97d6821ccdefbd3a119f2c331e7016728fda5b45ce364c9240fffd7623276042c666e5c5d05cba WHIRLPOOL 209f3137255505399c722a67c2618c76fb99f3351f2b3953c1b254b36dd0e3bcc004cae5139f1dce8f5c1c1ab9b3e2a1409d85b17b0ed3aa0ff9f340523f9ea9
+EBUILD dnssec-lookup-2.1.ebuild 766 SHA256 837b9953aa9c9836858d40cc6fd9572daf0738825692a0e6b6f2eb8284d7f600 SHA512 f67ad7b87af5202cde00303d4c312159b6a8e862448c2b9f1f091a5130b681dc5943488eb2d00edb7a612e589a1b78579c1544cbd6908d053c688774b1275fc5 WHIRLPOOL b92f45e0dc5f38aa48f7e0bebce3d45154d5d647d6feb5685435c62bab658932c2098bd52ad546d372d259444941d73255967d23f6515562d78343afa2518a20
+EBUILD dnssec-lookup-2.2.ebuild 766 SHA256 a14cb001b2a944656e7c1198c7c36f7902d157f54083b587a4874ee47a2ba6ab SHA512 3c09776154f010a4f0915b063d5bb5eb045a8cd324d41f14285a62f218d725fbd34ac7e6a0f4fe28294c65072cf7623bf637a7f869b3c81c94e1cbb141dfb0a7 WHIRLPOOL 9c49fe5a58730e045ff1069700b9ea0dd72946e5d20e5fcec38f6c74a1ca2df13f768bd1816d0de11e7a091a2c86fb1aefa1aad906aadb8614e77b3219c3e86c
+MISC ChangeLog 3106 SHA256 6d48070db559912d0c4ef95ac685c8367847e75bd05c5107f639551a7f9414b6 SHA512 2c5935e686c22abb771652a7bbfc820cd4452b6a9c9fa206b0de8c94b5441906a1fbb866ec21f2473f16922f320f6216cd103d2fa961db1d085d886bd2f29711 WHIRLPOOL a6542144d6f4fa3e8ff926f8a2c323921e1271cae30f5a84a33e09fb2dc8330f441b920ebb61e73ac9a8f76c011139aedd451ff048c548315cd383daaeb9169f
+MISC ChangeLog-2015 1218 SHA256 5b82edd5d9c8cbe2f415c7f0f6bb35f8631301aff4bb4560f39ef655b6ee7f81 SHA512 1ded1226d9d9de4d39a37ffa17ce533c85b1cbb907ceb4533ee746b20bb045b1a61cd932c53b287ccf2ae429948981dffd4afce4ee01321b10c6595253583975 WHIRLPOOL d0c5e72c7b1d489b17b57ff747e04a94721271d29add89c2fb3b8c30267107982c85a8f8b2ad84ebfecd79404c92fc92462e1c06d808a35cb507650aa45c6a9a
+MISC metadata.xml 594 SHA256 3f0640a4d01c7e8b7becfb594ff488ee5dc582293a40b9a272ab4b3216e90dc1 SHA512 04df4471ca57b3e9200d8cf46820dca6932db7e1087084add9e2faa5726fa6e4bede034f685d5b0853761be0d441a00823276e82baa8d36b50189da4f81a7c00 WHIRLPOOL c9300d7c0ebfa978ab084b6813ebc73e49793a65dbb5c54694219178b43afc98aa8798534c6fce7b87fcc5f2b9201650341e1eb7704010ae9b04ba7e9d56d7b8
diff --git a/net-dns/dnssec-lookup/dnssec-lookup-2.1.ebuild b/net-dns/dnssec-lookup/dnssec-lookup-2.1.ebuild
new file mode 100644
index 000000000000..152849fa8280
--- /dev/null
+++ b/net-dns/dnssec-lookup/dnssec-lookup-2.1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit qt4-r2
+
+MY_PN=${PN/dnssec-/}
+MY_P=${MY_PN}-${PV}
+DESCRIPTION="DNS lookup utility that supports DNSSEC validation"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${MY_P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="=net-dns/dnssec-validator-${PV}[threads]
+ dev-qt/qtgui:4"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ eqmake4 ${MY_PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ newbin src/build/${MY_PN} ${PN}
+
+ newicon data/64x64/${MY_PN}.png ${PN}.png
+ newicon data/maemo/${MY_PN}.xpm ${PN}.xpm
+ make_desktop_entry ${PN}
+
+ newman man/${MY_PN}.1 ${PN}.1
+}
diff --git a/net-dns/dnssec-lookup/dnssec-lookup-2.2.ebuild b/net-dns/dnssec-lookup/dnssec-lookup-2.2.ebuild
new file mode 100644
index 000000000000..0dc819c75f32
--- /dev/null
+++ b/net-dns/dnssec-lookup/dnssec-lookup-2.2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit qt4-r2
+
+MY_PN=${PN/dnssec-/}
+MY_P=${MY_PN}-${PV}
+DESCRIPTION="DNS lookup utility that supports DNSSEC validation"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${MY_P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="=net-dns/dnssec-validator-${PV}[threads]
+ dev-qt/qtgui:4"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ eqmake4 ${MY_PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ newbin src/build/${MY_PN} ${PN}
+
+ newicon data/64x64/${MY_PN}.png ${PN}.png
+ newicon data/maemo/${MY_PN}.xpm ${PN}.xpm
+ make_desktop_entry ${PN}
+
+ newman man/${MY_PN}.1 ${PN}.1
+}
diff --git a/net-dns/dnssec-lookup/metadata.xml b/net-dns/dnssec-lookup/metadata.xml
new file mode 100644
index 000000000000..3d487ce1757c
--- /dev/null
+++ b/net-dns/dnssec-lookup/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+<longdescription lang="en">
+ Lookup is a simple graphical utility that can be used to query a network for domain name records.
+ The tool understands DNSSEC and color-codes the results based on whether
+ the record has been securely validated (green), is a 'trusted' answer but not validated (yellow),
+ or fails DNSSEC validation (red).
+</longdescription>
+</pkgmetadata>
diff --git a/net-dns/dnssec-nodes/Manifest b/net-dns/dnssec-nodes/Manifest
new file mode 100644
index 000000000000..7f8d391a52df
--- /dev/null
+++ b/net-dns/dnssec-nodes/Manifest
@@ -0,0 +1,7 @@
+DIST dnssec-nodes-2.1.tar.gz 98582 SHA256 a6ba404635527ab519bea2317616b1b7f104eff12eefc41cc578a4e5ae0f66cc SHA512 2c532eccdfaedc2994e0edd529dfb6d550c40721053732e3e64d094c18ba3fd67f803151804996ece978f55dcfd443de08e0577d501074e57543dd630dc33d2c WHIRLPOOL f38ad0168933241614bb1dd4f4c36097f34a2a59798d8eecbba2dd9a9bc0934d8498644eb831110862c5cebc9221001da7ce164f35e8e58e4c3cf90c4bc90d9f
+DIST dnssec-nodes-2.2.tar.gz 98151 SHA256 6d3aabfe050fb8a37081eb3eea36631dd8c59b18c140a40a5c9856d3186491c3 SHA512 14f5ae628ceb59a85820c3d578bd1c36e620a17c1bb0a4f8fe440134ec8449adf181b053ea54a1bb321f4aff72014fa6a55a3a5a4d2542c407a3d35cfe4b9554 WHIRLPOOL 31ae3cae42eab4951315d7ef781fc90345e352a7f3341f6d5342e5bbc3ba45cd9261e5e5e09635c943ab98bfc778d1d32604e49481e7487fc66ea241e7cd7d5e
+EBUILD dnssec-nodes-2.1.ebuild 630 SHA256 d38b2cedd11ffeaccfeb5b57dfddd529c8175b948c98419a60a62e050c188c58 SHA512 77955882a14387a29317b752aeae35adc3d95dc8833a65ec1d5d400cc187b0c00d17950642aa800026b39a076a71fbe42aa2ae918c80eda3a38dfa33c3dc8a6f WHIRLPOOL e51b7c9819512d974761c272b2ff2ae99f391f5c5f3252b24f2ca50e617e0c0737c409d571adb5030cced82e4fc76654bbb4317ce251c17a36d2f8f8299c9bed
+EBUILD dnssec-nodes-2.2.ebuild 630 SHA256 d38b2cedd11ffeaccfeb5b57dfddd529c8175b948c98419a60a62e050c188c58 SHA512 77955882a14387a29317b752aeae35adc3d95dc8833a65ec1d5d400cc187b0c00d17950642aa800026b39a076a71fbe42aa2ae918c80eda3a38dfa33c3dc8a6f WHIRLPOOL e51b7c9819512d974761c272b2ff2ae99f391f5c5f3252b24f2ca50e617e0c0737c409d571adb5030cced82e4fc76654bbb4317ce251c17a36d2f8f8299c9bed
+MISC ChangeLog 3092 SHA256 a977bbc5856dcba3a5b5e5149e2fe1f766f3d42000118cdb253c30e0ec45214d SHA512 ba84b2a4f31680761e268272e45df40677c0dfd46cffc9a63a3f031f1af90ce5d0f7d7e8664c42af8830311f1ae267c4acdaf008df4b36584055f783fb87f1ef WHIRLPOOL e6156fe8f501a4f25bac85cf8493416303098444bdc844b908c236f165fa0272549721bbbb6730342b04e39f2150e0b390c789a374312a788ace8573413482eb
+MISC ChangeLog-2015 1331 SHA256 8c45f69e4c8fa4c9684794670266ec0b09c8ba7e4772975ffe8d364f9287e7c9 SHA512 c9ad496806746f83b411b30894e4ded85e23e356978d3e3577dbde59e2a254d426c129c33c3d9b717b234f5ad4dde027f0ae2077968c3e2ac41683eb047dc632 WHIRLPOOL 418f527a69bd97800368b94963e985b3dc595baeef758399ea5bb94512727291f85fb57ba57180dcedf7d97fac308e9310e6e9f1aeffbac01c6f2e037a1b1a34
+MISC metadata.xml 237 SHA256 ffb571839c57797d282263369646d2bba2662601a45f7bb3251bb97f716554a6 SHA512 ae2360aa6b1b00c67e0acea4935c02b64585b9a15e126fec9d5d99637021c542c0a495e5116205f3da287def46fa5b19cb1a7f3042c12c5f7a78d66d92fcb03f WHIRLPOOL 60d6da846c983457e038ea5ba3c0bf48f939c9586610985a14cac9772fd1d45d781a643abc16482f232f3028e44fe99fe1a382deaebf6589602fc244a4460e3f
diff --git a/net-dns/dnssec-nodes/dnssec-nodes-2.1.ebuild b/net-dns/dnssec-nodes/dnssec-nodes-2.1.ebuild
new file mode 100644
index 000000000000..881be6825646
--- /dev/null
+++ b/net-dns/dnssec-nodes/dnssec-nodes-2.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="graphically depicts the DNSSEC results from a lookup via logfiles"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="=net-dns/dnssec-validator-${PV}[threads]
+ dev-qt/qtcore:4"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake4 ${PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ doicon icons/dnssec-nodes.*
+ make_desktop_entry ${PN}
+
+ doman man/${PN}.1
+}
diff --git a/net-dns/dnssec-nodes/dnssec-nodes-2.2.ebuild b/net-dns/dnssec-nodes/dnssec-nodes-2.2.ebuild
new file mode 100644
index 000000000000..881be6825646
--- /dev/null
+++ b/net-dns/dnssec-nodes/dnssec-nodes-2.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="graphically depicts the DNSSEC results from a lookup via logfiles"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="=net-dns/dnssec-validator-${PV}[threads]
+ dev-qt/qtcore:4"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake4 ${PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ doicon icons/dnssec-nodes.*
+ make_desktop_entry ${PN}
+
+ doman man/${PN}.1
+}
diff --git a/net-dns/dnssec-nodes/metadata.xml b/net-dns/dnssec-nodes/metadata.xml
new file mode 100644
index 000000000000..a535b8852829
--- /dev/null
+++ b/net-dns/dnssec-nodes/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-dns/dnssec-root/Manifest b/net-dns/dnssec-root/Manifest
new file mode 100644
index 000000000000..953b17cdec8d
--- /dev/null
+++ b/net-dns/dnssec-root/Manifest
@@ -0,0 +1,13 @@
+AUX anchors2ds.xsl 855 SHA256 2cc436e29e5bfd39c055390045a4c14dfae517ebdad79002983756a508a15e8f SHA512 5b496d8f7fcb6a1241d889221f539b68485fea356feec13a94329b0807768c543c828c2821567f59d6a56931a6b2ea22827e49a1527582e3dda844d61c28b198 WHIRLPOOL 12d1ae5b78a8eead3976a8041d8a68a590c8b8a64116f6bb29bcc86e0602c34a374034c00ec0d6d600289bddc6f00bc8c1ae7c7897af59e396fc3bef305cb271
+AUX dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc 4784 SHA256 1cfe8848312e3cf2d6b42da9999ddaf078dab7a89c5601f38d9f6059f2408e37 SHA512 a67e08cc16107f3e6984c9bfa33a19ccb8a07ae1e492a4dd92e4273a4544e8be8e116afafe7e8d9077eeccc4f98529ae99c18d74590fdde213053fcaaa029bb6 WHIRLPOOL ac71a8dd4f6123c2ef58ace1ad99cfa3dad2e319baed34a7e303b287f2c0e11a90604a5b6045af2654089957d561522530efde3cc98508a8d176a5d222ddf709
+DIST Kjqmt7v-20100715.csr 765 SHA256 401120c1721ba100b2d9abf2d01332399535ba0f9c71dbd9f97232c5ebd608d2 SHA512 8e47be5054bbb801cb914d94a6f0d1e6b9b2eba387714f011f118bf8af6dacfe24a2dec80525ad005c545fa15fd8413cf90615e6d5c50d7925daa4aefff77112 WHIRLPOOL 26b495b38e6d04baea8f7ee5354fa3b68153cc25baa6657b9b74d04ae52fa43562f422eb8188c2538314a8f7de3bb79b34bf011db542b6cde877bc94501d5377
+DIST Kjqmt7v-20150504.crt 974 SHA256 8b9c12c9e51d8a911d9527a58cc59da2f14286e064688b45ce4b6b74b55dccb9 SHA512 98adfc6a5d37c632eda9f642449ecd6c1bf1d49ebed2750cfe3bd99629b4935f51ecc4aafbd6ea69595b2f2cb15887bd9a1647aa255a564263f5c7b648c7adf1 WHIRLPOOL e22072d6415ae9e9ae0c031b2ed386a0971f92a92bbfe9213fe8b4dca24596c597df7f12d95131e6e4e76cddd350c39f868134d724dccedac4a4bfe21c6d5a3b
+DIST icann-20110715.pgp 3401 SHA256 3e9beaaf9bbd1fe78a0d104230cbc04d544e833a2dc6b982992f74a4860a9ae8 SHA512 5fba8334850f2ae753f4f8a30d1e6c62abc341ece2dc83df4bc0f6db2b91ae68942c0d2a38eab3d33b5b91640cd1cf0970777225c15d5f961884c00077d539a2 WHIRLPOOL d2758930820d90077c8084e8c95e0bacc361d78b68d150d3b271ed32abeb2272f95f9a2d23ed5aaab25a31fe3fba66554622ef5c9a04002b595b5f2e66b732b0
+DIST icannbundle-20150504.pem 17435 SHA256 b405ff8320aa0eecd8eae98edfcdb106eec6077e0470cf5e1c21b1db6b346534 SHA512 f9b9e43ad71608921d1e79f25cd98ca8c712256d4e31b04035a9aac7b46f3ec951089ca23e84500c5901d53afb66991a30818b4cd6f6de6885a107f486f56994 WHIRLPOOL 1f2431a1b65829844e1d864936fc4c0bf1a8bbc22b4344db764772bec4f2d074a37f6f333ded78e9e277c298df7db13201324397cf924f142d039f0433bad105
+DIST root-anchors-20100715.asc 189 SHA256 5bffcac53f810c5fb1e1baf543e2de2f10ec99d7f7cddb5f1e47b1e58cf34cfa SHA512 e9c86b897d7e8edb979cba4bebe353b7c7f21b4061cd6f571c8671b02e73c2ea0b78a980169fa7d40987b9e962a0f1ba17dbb392b5ec6ad14fedce65a139c913 WHIRLPOOL a422b8c473aa4cfa61d6a22ea748b972acc3242da7bb90a5b44b5e291210e24ca16ce4876dcc17b71c3694e9f58da4355a5ec1cb1c2950496d87cbfadc7944c5
+DIST root-anchors-20100715.xml 418 SHA256 dfb281b771dc854c18d1cff9d2eecaf184cf7a9668606aaa33e8f01bf4b4d8e4 SHA512 bca506c852bc83aa9d04ed0b52bef6d0baec745e466292273d52f49fd73cec73db4c6d55a9921fe086c7edc618f3ab21dc03146b6d617644495b3926e262e572 WHIRLPOOL 952aa6ba26495859fc4bc4e9f689b728373cc9e62ae64f833d9b894f8902be858371c88619ed4e10fb2557181442bb5d97781a75c6866a83d7fc8b43899a1b70
+DIST root-anchors-20150504.p7s 5001 SHA256 bd42aa218a6ca09eb6c5f194aeb70dc95c56a0ad051f644b9772da32e65d5a61 SHA512 af188871f2ef7f9efb0d3f4822754e962fb921d62de925823f90a0c7dbe80b7a0188534adbdb324680ae981912968fcfa851eb72fb37694df8701fd749e7ff51 WHIRLPOOL 24cf2be6cf755ac6b5c3ebf267c0de02702a51db490849ec63c4e66ac27d57c0d337375b96e787d6b2a4f1eab5517b1f4ec10b76c42b293d2e529cb10af4cfb6
+EBUILD dnssec-root-20150403.ebuild 2989 SHA256 f38785559ee11ff8f848518f9e57233eca9c4954c8b9b8158fd35aa00194b563 SHA512 bcd282c0096721ff0a0d4cf11be9f6d6206d5bc34e6f3b70a362a17548beba880feb4d6e1ecac10dfae0a7b07b59e141db2981030d0b3c95a7bc3868efdd7581 WHIRLPOOL db337f896e39339900646d079b5c7aef85dd9dc6b2803d8a73ef0bfe54c52ac0a96fd5884ecd2b78a76e0cb1afcbbc7276d4ffdc6e712abf487bdc77cc25c7b2
+MISC ChangeLog 2820 SHA256 e84d69e8a0d14b7c6bcc79276c46c638b219b01f364d492e4ff1f59ea9c43ac6 SHA512 f151f8e88ed7bace2a7c6714dd03aeda5e87deaee1a81c40af6f21425bc096fd60cec81a68b86f2fd34546583e40a2f181f948e0859994adfcd77c1f8ae01cf1 WHIRLPOOL 8844930d915642991a89a1706bd1efab40ece7b71f44a7d6afe3b65b1e84f3c303ad67a451e2b68d6d96749f1cc892a73270f27169e5866f29998de61edbe733
+MISC ChangeLog-2015 2707 SHA256 8330fb4c1edc639846f3a043938af99931f46f5853fb474fbf44b34f0dbdf96e SHA512 6c939a840b093baacf3c2bf86a09833d40d4ff63f61366812fb5fbcbd43cbbd6700bea3c38628fe35133a3e3c49815a9013d90ecc868f3f934d09d69d37d5b40 WHIRLPOOL 826a5ba99e9b17d573f287bae1896b9769596918a3c2bfcbc794cb5cdd673f54101c09d53357506552ee80b0ca78aa900ff8f646f92188e6fdd6229b0785e21b
+MISC metadata.xml 327 SHA256 0b33a29b0d349829e20507e1b757874939cb3b88c7927e28c4959a1d7e23d2c0 SHA512 27361587e570a2f35e178724db7cf89cafc4da8e64984c7fd79971a469f96c128ed488b03e59fc3de4a1d1012664aaa66540dc79f0a85c9f191c19bc864bb1fc WHIRLPOOL 3fb90a915622ed576d70d850f57cb86461cac635bf6ff3800e432ade72cb70810745fbe4e33847b634bc3a8e3caacd33109f4a742d3322af81568c66c8731bbc
diff --git a/net-dns/dnssec-root/dnssec-root-20150403.ebuild b/net-dns/dnssec-root/dnssec-root-20150403.ebuild
new file mode 100644
index 000000000000..658f6733f181
--- /dev/null
+++ b/net-dns/dnssec-root/dnssec-root-20150403.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="The DNSSEC root key(s)"
+HOMEPAGE="https://www.iana.org/dnssec/"
+DATE_ISSUE1=20100715 # Original root-anchor creation date
+DATE_ISSUE2=20110715 # ICANN PGP key updated
+DATE_ISSUE3=20150504 # Subordinate CAs updated
+ICANN_PGP_FINGERPRINT='2FBB91BCAAEE0ABE1F8031C7D1AFBCE00F6C91D2'
+# The naming of the files really needs some improvement upstream:
+# root-anchors.p7s despite it's name, is mostly the the same data as
+# icannbundle.pem
+SRC_URI="http://data.iana.org/root-anchors/root-anchors.xml -> root-anchors-${DATE_ISSUE1}.xml
+ http://data.iana.org/root-anchors/Kjqmt7v.csr -> Kjqmt7v-${DATE_ISSUE1}.csr
+ test? ( http://data.iana.org/root-anchors/Kjqmt7v.crt -> Kjqmt7v-${DATE_ISSUE3}.crt
+ http://data.iana.org/root-anchors/root-anchors.p7s -> root-anchors-${DATE_ISSUE3}.p7s
+ http://data.iana.org/root-anchors/root-anchors.asc -> root-anchors-${DATE_ISSUE1}.asc
+ http://data.iana.org/root-anchors/icannbundle.pem -> icannbundle-${DATE_ISSUE3}.pem
+ http://data.iana.org/root-anchors/icann.pgp -> icann-${DATE_ISSUE2}.pgp
+ )"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x64-macos"
+IUSE="test"
+
+RDEPEND=""
+DEPEND="dev-libs/libxslt
+ test? ( app-crypt/gnupg
+ dev-libs/openssl )"
+
+S="${WORKDIR}"
+
+# xsl and checking as per:
+# http://permalink.gmane.org/gmane.network.dns.unbound.user/1039
+
+src_unpack() {
+ return
+}
+
+src_prepare() {
+ return
+}
+
+src_compile() {
+ xsltproc \
+ -o root-anchors-${DATE_ISSUE1}.txt \
+ "${FILESDIR}"/anchors2ds.xsl \
+ "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.xml \
+ || die 'xsl translation failed'
+}
+
+src_test() {
+ # This is a terrible catch-22 of security, since we get the ICANN key from the
+ # same site! We verify the fingerprint ourselves in case
+ gpg --import "${DISTDIR}"/icann-${DATE_ISSUE2}.pgp || die 'ICANN key import failed'
+ gpg --fingerprint --with-colon --list-keys \
+ | grep '^fpr:' | fgrep ":$ICANN_PGP_FINGERPRINT:" \
+ || die "ICANN key fingerprint mismatch!"
+ #gpg --import \
+ # "${FILESDIR}"/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc || die
+ gpg --verify \
+ "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.asc \
+ "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.xml || die "GPG verify failed"
+ openssl smime -verify \
+ -content "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.xml \
+ -in "${DISTDIR}"/root-anchors-${DATE_ISSUE3}.p7s -inform der \
+ -CAfile "${DISTDIR}"/icannbundle-${DATE_ISSUE3}.pem || die "OpenSSL smime verify failed"
+}
+
+src_install() {
+ insinto /etc/dnssec
+ newins root-anchors-${DATE_ISSUE1}.txt root-anchors.txt
+ newins "${DISTDIR}"/root-anchors-${DATE_ISSUE1}.xml root-anchors.xml
+ # What actually uses the DER-format certificate request out of the box?
+ # Wouldn't icannbundle.pem or Kjqmt7v.crt (converted to PEM format) be more
+ # useful?
+ newins "${DISTDIR}"/Kjqmt7v-${DATE_ISSUE1}.csr Kjqmt7v.csr
+}
diff --git a/net-dns/dnssec-root/files/anchors2ds.xsl b/net-dns/dnssec-root/files/anchors2ds.xsl
new file mode 100644
index 000000000000..3df47e20759d
--- /dev/null
+++ b/net-dns/dnssec-root/files/anchors2ds.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:output method="text"/>
+
+ <xsl:template match="/">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="/TrustAnchor">
+ <xsl:apply-templates select="Zone"/>
+ <xsl:apply-templates select="KeyDigest"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="KeyDigest">
+ <xsl:apply-templates select="KeyTag"/>
+ <xsl:apply-templates select="Algorithm"/>
+ <xsl:apply-templates select="DigestType"/>
+ <xsl:apply-templates select="Digest"/>
+ </xsl:template>
+
+ <xsl:template match="Zone">
+ <xsl:value-of select="text()"/><xsl:text> IN DS </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="*">
+ <xsl:value-of select="text()"/><xsl:text> </xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet> \ No newline at end of file
diff --git a/net-dns/dnssec-root/files/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc b/net-dns/dnssec-root/files/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc
new file mode 100644
index 000000000000..0653a2bb0cf8
--- /dev/null
+++ b/net-dns/dnssec-root/files/dnssec_at_iana.org_1024D_0F6C91D2-20120522.asc
@@ -0,0 +1,70 @@
+Downloaded from http://pgp.mit.edu:11371/pks/lookup?search=dnssec%40iana.org&op=index
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: SKS 1.1.0
+
+mQGiBEdQucgRBACuD4uIRQ9Or2yKfGZtqxSd7/yp20VoZaNafP85OlJfOs9yjgdNv8kSd3+2
+lBXGwJxgOzkssbgZ14O1U3au494WicvR0gF7cLRZBeqpdZetpm7gl5n2/WGRyKifoGCMZqFk
+sFrR7BZerkOSUIqrMhtJMwKUxe5sks0WSgwifRchOwCgoezH1Uo9pdbpsW+8EIDe22HRX4sD
+/ivbf1kX6QPE7VbMYQppM/jF7mRtZO9oXzMhg9hjycK8Ir04FfqpvPCfA1TNG/l8j/dbQaJP
+bHHyI9PQIeikuVAQDuY+acT34GkZQxBcqAyMeRqW17LlZwl1l7u5sDiWwJIR3TzjXhpSjd0q
+1HPTwcGDyHulCHFyuCVw7323qB3iBACLezRPBN4Nrz29AcQu0NQAlMwcr/HLq2QfMevCpDpF
+pM3WuiSV+NtpDt9C/OmxWaYiFFYDEOy8HLuEuVNaMb9Xi5D8QmtWwgAMW54gBuExByt2NwJz
+7kxFf6ve4wdH6/Uzgn8FdJIDaMjZYuY3au4XkkL8nKKI7nFxiu1xAnwy3bQgRE5TU0VDIE1h
+bmFnZXIgPGRuc3NlY0BpYW5hLm9yZz6IRgQQEQIABgUCR2lOYwAKCRDDn1I07Bb/s8jPAJ9G
+L7P+9noZ3ZssEp6Ak6+F5kxaaACdELBwHA9gyzbdopWM6aQWuCpm1vGIRgQQEQIABgUCR2rL
+VQAKCRAEgcOX5y1fMJThAJ9AudOvaZ8socdOVS6WD3udbl7KGwCg6s0bH8eFJZk0JZjcj7w0
+yJ2u59eIRgQQEQIABgUCR9kwrAAKCRC039xrdgkih/h1AJ9PhfT+vlasg1Bg8RiG7QufWYuI
+VQCgwmRRlbblIyWUMopceIuoc5BQtFeIRgQQEQIABgUCSQwilAAKCRDcB4+iybQoSPw2AJ4/
+p9ZbZ0NckpUTUD+kKDwRrOlOIgCfYb9ZgHgntqn2dfNsg9j4WUgBd6GIRgQQEQIABgUCTHt1
+6QAKCRBvVseiT09y3VANAKCCEsh3Aqb76bLM1taqf5E0eikbVgCfQVMCgg5bbSWXK3QDy67x
+hUltejOIRgQQEQIABgUCTRB61QAKCRDTb+kxkMzVxf6XAKCl5Z1NhOUWl0mCKwauwSaip24f
+xQCbBPzeQXzkkgO/CLh0+kVncyeolsCIYAQTEQIAIAIbAwYLCQgHAwIEFQIIAwQWAgMBAh4B
+AheABQJOFzMgAAoJENGvvOAPbJHSEc8AnR2zvLg6Vq2X2GnU/pRMMxo1Z6gcAJ47rxPrKlC2
+5gchV6ON+1pxxVqvSohmBBMRAgAmAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AFAkdQvM0F
+CQJRRfkACgkQ0a+84A9skdJ3VACfehjhB59K5sFj8Td3jK70CrBqitgAn32RtmDQY1XDBB/7
+0JqJqN8jQ6lEiGYEExECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUCSa5MhwUJBh/5
+qQAKCRDRr7zgD2yR0u6cAJwLJY/HHnInhWEs8gthvEFb5HjhMQCfcDlaXb7zq44k08l7F69v
+12N69YOIZgQTEQIAJgIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheABQJLDbx/BQkHf2muAAoJ
+ENGvvOAPbJHSXQ4AniPWf4jcO1BkPy3IODEMLjsRiTROAJ4wjB9pYcOYETm56q7UT82maCvk
+SIkBnAQTAQIABgUCThZ/jAAKCRDnlgTn1butoxbtC/wJltFxMtCH2Wm+SJrpZfhZKLB+0Zrg
+PRiNRHu7Z75lukX0ozpA7qd7N/M31P6cSdnQkWKjvznUc2XPb3Xb+DX4dapKm//9h7fwq3Rm
+h5FmAaorqbWVW3RqK4aO3E6pTdnw0wo/m4/oa2UGoM21g3Is2Kwl+/EeMP8pcqtznEJSEarR
+XUW1vdMFSQ/ZRkNshq5NnS5Auhf8uDGyntua+7kpE5fE0pRqOZzGGf2dhOesq6JcrsxD5U6i
+6rgkM6ZLVflvi9+z4iY78kapuE/dTag8vIlCPPxdcoBsX4aL0Pl++9948kFz5wB9ZFrK2JMj
+hTqRcayDwVKsbRXmh5sJOm07IRRS4QHVEUOM4USBVyi1aFL7CQ2Wx2BDIUzBD8vsMvt8eTwX
+R0HFZM//BM7eOF6HanPBlabQMVbqWg/psBx1LSUo+SbXROd2xlwWMQup+oBhaEtbXoSm9rNG
+Rz4/484U/wlT2PUFfG1M5vdkNdd+EzJ7tf/W/2YTNB6Ni5wN5M2JAhwEEAECAAYFAkw/NtIA
+CgkQUu5GRRsT94z9Og//dPvrI5ykvC6eSj07aAe+QMPapg0UEZpkol34rcS6cdSS1tPQXp36
+tHDmGG0kGZ80l0RTl/wF2iqJpOhunfeT32AUzjo6pnhPIJx4yXurboJ+yGOXb3mSmElhPk5p
+LDWBl4BGvBWJw7H5nFznIl1U6fCy4Aye4hedeyxuKnHY1gW/p6mMnpjg6aiNGpiRRQvGLmSU
+B2RxPvrP9qTTYc15Q0VFeePi3C+5fnPr6WO08sh9h3GVeU+UgIj2dbslUHY+qA/yk5Dcgl71
+wrUKqIBvSQAG5GrkTWdQe8NkN8WYrrzSQnePUtDD/bsQ/YOyFvbEAUNRRMrKcvnEMdA3kQva
++ekq1l3emjqYov3vLuGOdXKA9N0Bwzw083wNDmb8WXwhlyZ6swJ7qbSBHC8UyZLU3MHg9Q7m
+x1HxPQ/6Zz+zMoPv9N0Sh1fdwZNR4vwISKpI6c5REs/ZSbJucAZqHiVYW/VU5I3051KTUFCF
+u9E99WqkBS1ECt/XN+tYVGVtj8I3SHbhpjgkrKWNIs3QQZ1vrerKfkn3V0PiyqSi4zWX6xo/
+RAlYnSjWMfjMgO4Xznd6AhDL5B4oxH7VIfju/EExbXm3rswZaf/6Dyebt1qdJImAWXCSD/Na
+X6gYZA7/dOWcef0yOegitn85EjqDbJphLd/tQE2Ame73IoPBCTC1rAKJAhwEEAECAAYFAkx7
+c7EACgkQqSHyOYuTc5ICDw//Tm8X1gD3vjjukpJXX2JH+k41abPYPK/DWrfSzmIj8v1hF4Fb
+TJoGedk8thAavv3dm/9N1gPlN/HaQtHHe3886b6LgfG9el5eU3HJdt/9SEfi6QiWDxNioiB/
+HYCN6QavUcAkjK9YklptTZ5bNGjGjQFG0/hJQAYcIqATQXlBsxVqaj87Kjspzs5e/0uQOs/v
+dB6iFt2TCo7lmU1/WOOul9FeEfUD7GIugq4DlRmsCqnbq8BgdITRuq25gsNQtocwM+K5YJsm
+uXOr3hvILjs3yIuQUg+womZt2e1HSRgIVT2NCbmHhtt97NaYGzPzGmlkuVEuhK09iLLe9umD
+LSz9QG+F/QuP4w46kHc32NEt3UALDoafK5WJsTx6p5Z8tDoiFs44YNR1ZpE1NV5nU9Bnl5Gc
+7NJD6PJxu+jBWEor0jxCvUAwX1TI3Pd50H2vWuAiYXl5SNxogz/Kv1Kx/Nb/jGupaT4B5O2N
+ysokvd+44zC6gMIbCF69t3cTq5aju6dCw962ZNd+yCEwMwJT1rnwL1len0VIy6aI0E2LSfRf
+lLq3GH4QncuU6u58zsw/gOyMbsBXKT4j0SEfCDhOm10Lj8jl4fqbT/Yej3nG3T/56135/Son
+wV5eQEc4U7MTKsSyP3Li2ANf0O+/GhxpCQQXm9ej/4TwAA6LVrW844WiT3C5Ag0ER1C5yBAI
+AO+lHy/JBdvBMwvF6Xn/75CxeV0ehjJ2XAoGm9w3+h8mEmmpb7CCpHHSjmomz29YLdP5P17F
+rl4ThSEXJ6yWCYbPMA0j3BIhkhb8C56Vwb9SsZUpDSCw60uBw71CkK2DwSht6tCBt8/bNs8q
+QFPwnalKNt6KgU8cNAR5F5RxKKPATUw9icrqmeQKysHUhrneRqM3LO/HpnW1DDKvBk6eEwix
+I4XzGsqcThz3QfBOkCqPSUBBeb42wNjbPpelnAS08KBrVeYgn7xg+WQpdj/Dt+iFqOo/Vi8w
+1FpR5RHy//XF0DPnjEGa/f3Xaz9oaJ5k9XZiYMULf8CoHjtscp86Q0sAAwUIAKO4bNu7OJqP
+5NGwc9pm7IvmkYCeY6cltXzmcciw/LIU9etb+RBQQG6PpoeZNBNAu172L64wPkMsVRJGVUyk
+T35yXVASuBD1V0oOD4n0uVdqS+bij/DKQNVYqVAcwrPtkkrLeJQ8ZcmZhH/mbcmATWuziCnI
+4MROcYL9NLZ1iIT0PX8TvWEgyi9Jn6DVjXQ1UzIIv4oq6kBdsG3Rjd0yadugGKc/pSdYUu0S
+jeCCGDoY8hX67c5Y1jwaJ0+ntThC+kv2ImCSHx9OT5jMwN+JyXCe4MZJd+y5/VDhgd3hTowT
+QtqHQRYK4oTb0LsDLBs5xoE/zuF8AgzabO+JcTQZPOqISQQYEQIACQUCR1C5yAIbDAAKCRDR
+r7zgD2yR0q76AJsHHW4ywmyeZxKsei6V3bvt1OUQugCfStqiEgjFAA6psDMMinAV4VCh3D4=
+=0v7K
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/net-dns/dnssec-root/metadata.xml b/net-dns/dnssec-root/metadata.xml
new file mode 100644
index 000000000000..c6775aa5c0c2
--- /dev/null
+++ b/net-dns/dnssec-root/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+</maintainer>
+<longdescription>This package distributes the ICANN DNSSEC root key</longdescription>
+</pkgmetadata>
diff --git a/net-dns/dnssec-system-tray/Manifest b/net-dns/dnssec-system-tray/Manifest
new file mode 100644
index 000000000000..7e8eec5c164a
--- /dev/null
+++ b/net-dns/dnssec-system-tray/Manifest
@@ -0,0 +1,7 @@
+DIST dnssec-system-tray-2.1.tar.gz 15397 SHA256 331bf4c4c347f269aa768b98a7a744b9fbbc6d34031de5244abd687c3c959ac8 SHA512 bd4a17e8eed65a6d96dc4c19c316746da6da698d1d48a412aad70a8c2db5bebb2bcefc1d3f1b6e39d6c9b275936cc218add75e07acaa87fbd53df35013ea5e60 WHIRLPOOL a0502ece82ac3400c327761d4cecf6889aafd1a783caf841c2a2e9d8944b28a7e8a78726a1d7cb9e676318b419119bd5942fe29ef8471dd7cf8d12a6f4b2a7c3
+DIST dnssec-system-tray-2.2.tar.gz 15309 SHA256 f8c5b35ec1b8bb47833ab1f3d97398e7fe4243ef063dfd3b5dddb1cf72a3fec2 SHA512 1c99abc7029232770b1776b57ff014b6b3c10edd4841952b6f7cabea69ad0252911db3f7aa252d53fca7457e8cba8a38665fbb6c05421daea0946622bb13daf9 WHIRLPOOL 4dea7de37cef82cdca0e5f436ebd086e1b036ce416aa3744e8315b33cc324123d393f1f99fa8db45ebbb10e56ba4fb5afe706d432a4f7f14b32fdb4f5e780c38
+EBUILD dnssec-system-tray-2.1.ebuild 606 SHA256 78735bbbbf0d8150ce65d98bd014536bc6574ab0be974d6c95b75340a41df6c9 SHA512 ce289133bc3fac88b2adbfad23b21ccb66546a142fd685c353afbd5e4471f206043c2a909643e87102ef9552afb4638c7c3068816378a6465b3cb6989b9cacab WHIRLPOOL 037d5f6e4408829b41af90e93d4a76ccae7fb746681b6f21b6dd87375b35ac6c180c9f52c6718c97d0c812a7bc47f52bbfc7ef7d6f9dbf734d31e902186a1f98
+EBUILD dnssec-system-tray-2.2.ebuild 606 SHA256 78735bbbbf0d8150ce65d98bd014536bc6574ab0be974d6c95b75340a41df6c9 SHA512 ce289133bc3fac88b2adbfad23b21ccb66546a142fd685c353afbd5e4471f206043c2a909643e87102ef9552afb4638c7c3068816378a6465b3cb6989b9cacab WHIRLPOOL 037d5f6e4408829b41af90e93d4a76ccae7fb746681b6f21b6dd87375b35ac6c180c9f52c6718c97d0c812a7bc47f52bbfc7ef7d6f9dbf734d31e902186a1f98
+MISC ChangeLog 3178 SHA256 5506d211b00dfbcc9f76de22919b1fa4af5b7ff66e150d0c339dc32f268c7700 SHA512 56b28590bd8f139ad11ebf72624da89fa68b1edf9f10c1a724e8970660943107b605e9af5f113d178239dda61fa6bada39511f2da6ff1b5eb1354c25140f802a WHIRLPOOL 5a424c091a95dcf1a4a4bcae2a223f7b6580a003ba6cf23c9936d6f624370a1160b6af22b3f87f0d8922960e77ef2b8d7c9b1911a92180dfbd44ea8c2616a11a
+MISC ChangeLog-2015 1377 SHA256 b38d97f919037fabba9f151c806a163b274db8a55bf0f1774714937569064f68 SHA512 2c64804ab8e04dc284f75641a8556b73d452336bbccf76a7829ce9eded19f9e1efb20f05a7efbeb7a75f899cf024adb83a79edb06bb57621f2b589aaf2700343 WHIRLPOOL d0c883525a1f7535bc198f853af00444da37b8a039de70312b6c419a22a64f32d79958044195ee247510361fab4df34002c2db3b29629e686f5b84857db37bc4
+MISC metadata.xml 237 SHA256 ffb571839c57797d282263369646d2bba2662601a45f7bb3251bb97f716554a6 SHA512 ae2360aa6b1b00c67e0acea4935c02b64585b9a15e126fec9d5d99637021c542c0a495e5116205f3da287def46fa5b19cb1a7f3042c12c5f7a78d66d92fcb03f WHIRLPOOL 60d6da846c983457e038ea5ba3c0bf48f939c9586610985a14cac9772fd1d45d781a643abc16482f232f3028e44fe99fe1a382deaebf6589602fc244a4460e3f
diff --git a/net-dns/dnssec-system-tray/dnssec-system-tray-2.1.ebuild b/net-dns/dnssec-system-tray/dnssec-system-tray-2.1.ebuild
new file mode 100644
index 000000000000..2e0c9099d4ff
--- /dev/null
+++ b/net-dns/dnssec-system-tray/dnssec-system-tray-2.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="display DNSSEC resolver logs in system tray"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ dev-qt/qtcore:4"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake4 ${PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ newicon images/justlock.png ${PN}.png
+ make_desktop_entry ${PN}
+
+ doman man/${PN}.1
+}
diff --git a/net-dns/dnssec-system-tray/dnssec-system-tray-2.2.ebuild b/net-dns/dnssec-system-tray/dnssec-system-tray-2.2.ebuild
new file mode 100644
index 000000000000..2e0c9099d4ff
--- /dev/null
+++ b/net-dns/dnssec-system-tray/dnssec-system-tray-2.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+DESCRIPTION="display DNSSEC resolver logs in system tray"
+HOMEPAGE="http://www.dnssec-tools.org"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ dev-qt/qtcore:4"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake4 ${PN}.pro PREFIX=/usr
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ newicon images/justlock.png ${PN}.png
+ make_desktop_entry ${PN}
+
+ doman man/${PN}.1
+}
diff --git a/net-dns/dnssec-system-tray/metadata.xml b/net-dns/dnssec-system-tray/metadata.xml
new file mode 100644
index 000000000000..a535b8852829
--- /dev/null
+++ b/net-dns/dnssec-system-tray/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-dns/dnssec-tools/Manifest b/net-dns/dnssec-tools/Manifest
new file mode 100644
index 000000000000..d29450c05124
--- /dev/null
+++ b/net-dns/dnssec-tools/Manifest
@@ -0,0 +1,14 @@
+AUX dnssec-tools-2.0-dtinitconf.patch 614 SHA256 494d95c099f3260f9a5545a8928ff5d5a2dde7f4add33165678f0cf95c42058f SHA512 355bc83235147195c88a9b014aca6137ea9d51a785d615925d8254a14ab7eb962eb51fc6be5877841f81d75e62e2fd4b8b181fd3db483cd01fae988e4575a0c5 WHIRLPOOL 497432a5019a72f84efb204ba79779ea150fc6b623dbef8228de83147cf11fee18d6f9983a434e84a2c3baa8847f07d8c12e64bf808661a2df943d63c89f7ab4
+AUX donutsd.confd 230 SHA256 a577abd6ac404010e5e4c39cee20855b03969521485ef1d825e7fb9c77d23cc2 SHA512 2939e0c1ab099d07e7998b01e3cd51b4dd40a314552ebd89b245367a92417284b14840b10dd5f457b26f720c5330c6678e4ee00a0e2455a5f674f9d33e19c886 WHIRLPOOL bbd16d6ae54d8d6a3d0fc8d91a91a3d5f9e637dca186dc87d97a47e7b181e0fbb78765d4c883eb257dfbdcfb3a955ad36c419bd504a186f10f46166683beb7bf
+AUX donutsd.initd 522 SHA256 f2663511825ae832a398de3484000f5024aba01ea859160b5a0f134634040e79 SHA512 e08f1ff57da8f1be5ab7283d0fd367b28c24630965917f65d3b9aac51f627aee28386d4fb16cd5d3be58be2a998b3d949d7f8eef7e96ee51f2486cbafcbfb776 WHIRLPOOL c291b16ce322d0831ec77ed8045eb558906461876096c9a241bd6413f3cdcfe5afcd7f04a020ba29aac6fe87912a7f8f818a8bcd7d6985d198e7f06eab35b805
+AUX donutsd.service 152 SHA256 263d1b885e01ac4160d4d86764fbde6338f0346ed0974630d0123173b68809eb SHA512 2b55bb89a55d0d563e1ec33df089ede30e3f9508459e6f0a12e3778c281cac53b0e8a8c44925e901a5520d1a79dda3235a627325c067adab2ad16f0d95f6fb57 WHIRLPOOL b2cf1d96ab3baea531bc56e087feb6e69ea616446a7929af34417251669b0f35de7694f6ee62a527600e529b80bde1600adaba07e8c5d062194bbc55b3d6c4ca
+AUX rollerd.confd 234 SHA256 e6d86f7df813de702f6ce4acdf5b6245eb189598feb97b83f97d09901bff4029 SHA512 a368b1f288c382d265a437798ffd0d09adc1898caf00d5eff63487f0551a19d023d3a5dda514b574a8cd723b6fb657ea588f5ca206321535a3e3b99a90af3a65 WHIRLPOOL 06f2fd9f5971a5b0ce516268b298f906d19cb7177440b437b2690cac5582080a0103b82dc869e9966aa10bca1ba827a76ce1f54746cfa15bd19c04a15ae51eea
+AUX rollerd.initd 409 SHA256 f8fca2e81d03ad540fc1a26b8613ce633867ffc66ef230117d099d6b629d3435 SHA512 1d50ea92a5cd63f77bdf3c780cf33f1d540fc5dbcfd0bd5eea5cc1f156a15c872b2f6b3bbfdf57bb72a99527ce0a6d1bded254d153dc28df51bfab8e6dcd4d9d WHIRLPOOL 907031dda58f0121e5f0943c23d40bfabf33c1ad7f2ab65f09fc4070b6fe2e6330767335d4bfd3285b15bee15b046fcbcb70628d362aa15731e0baca637c8d4f
+AUX rollerd.service 202 SHA256 90c86937f89b4adfc48af2f6daffaf08dc32bc7f930247b94e2bad06dd32ed91 SHA512 5eb0786a0fcad3fe88db3d2391a2ec3dd272818aed0c17a664fff7f126da467ef2e47671212c86c7cc27f0e62873c63968cdbdff6c561499639f8a608e93648b WHIRLPOOL f586ae6c4c89a36ab93cfaf065524d4a27027afb5f569e18961ac443e23a33c1569973cc2b588535f14215f3a36e1dd3734c6054debde98d4ba5fec56d342548
+DIST dnssec-tools-2.1.tar.gz 4430320 SHA256 64eebfd1213714b530e501f22b5ff9786db9b982897c432fecba75740ddcda52 SHA512 61119837320bf9a7c2d64a593fc3ed6b84ee7683b7e4ba5de380b0fd1be70e44bf73825ea5395cc1d3ddc729eaef17823a230b44b68fbc5fca988f8fb080f66b WHIRLPOOL 9fb992b0b544c7abf10c78c72bccd5f3d4c8ba6c1c05d48348b9ff6a349f8026f84d35906d7887ba1b74136190c404d224e5e9efee98a05cc755c34c02468ec6
+DIST dnssec-tools-2.2.tar.gz 4430138 SHA256 4f45033a7a27382fe5284de705a1792277dfbe9a149d369b95d787865a44ef66 SHA512 5d0d936a2dabc648033cbd74ff6f1b309ae66bf3f2ab1223c8be5879fa4385bfdfd8cee2b4005b0d0e7ed85eeb1b81a9a4092d300fa725d4b19a84bf2619a280 WHIRLPOOL d73f380365bf39ed43a592d0d5904d78b105d35dcb2cab0e5827d3314fce12fdd473b413f628260eb3ce2449a386f02ced3df3af02736f8548a76a2f49794346
+EBUILD dnssec-tools-2.1.ebuild 1710 SHA256 9122d51cae1fc93fb856911be3b706c27fe49e13f533b09d9b575973145ae35c SHA512 eeda38dcf6cef55c85c1eca35c64e4a98bb8ae012ce86ccc17b8a060aff27680a172c91e94e13ec51c92fe4610136e2cdff3fa4a41bb8710321f446f20fe77bb WHIRLPOOL 19676d305c652ce8db28b46bb01f6ca000417276dbfd436402a1ccac4e75038b2fc769f00b6f77dbde08cf0aa0c420dc65e70ebd2feeb3776dd818f7e3e19433
+EBUILD dnssec-tools-2.2.ebuild 1710 SHA256 9122d51cae1fc93fb856911be3b706c27fe49e13f533b09d9b575973145ae35c SHA512 eeda38dcf6cef55c85c1eca35c64e4a98bb8ae012ce86ccc17b8a060aff27680a172c91e94e13ec51c92fe4610136e2cdff3fa4a41bb8710321f446f20fe77bb WHIRLPOOL 19676d305c652ce8db28b46bb01f6ca000417276dbfd436402a1ccac4e75038b2fc769f00b6f77dbde08cf0aa0c420dc65e70ebd2feeb3776dd818f7e3e19433
+MISC ChangeLog 3948 SHA256 ff205536e801c56b415bd2f8bead93e1f6e077e32613bca3c03c7cccc387c12a SHA512 837283a694d7479c34fa96fc38ba78c7e00387f04743cdc00dbb483a8bba3d07cc218dc38c8d452a02f227030c8e479284585e7eaa6b021ca0d06ce2666e270d WHIRLPOOL 084be7d8620e6485b09d2b89d414dbdfac7a554119e4e9022514c2c96d0148244221bcb56f351b7ac40695287be4f855fd056ad5959516cff7e98220ae4b2444
+MISC ChangeLog-2015 2050 SHA256 508c4a465a56014be4b8fb8a58bf8e0092d22e05215db92e3ff7bf68b4187e2b SHA512 db277e122fcb70380b85ac597b203f05dd5bc00cf9ed157a6f1c0b3477fa91f27cb08b0a101ce42515be6b80e9326498379e53d7cbf1ff44086461795d28cba8 WHIRLPOOL da094d27d7d22bda4178929a42aa13609a22b24dcc3dee928cce6ca0f34e833dddb482694024e055b14a5aab7f73547314013f009f65c7d6415c79b966a04013
+MISC metadata.xml 237 SHA256 ffb571839c57797d282263369646d2bba2662601a45f7bb3251bb97f716554a6 SHA512 ae2360aa6b1b00c67e0acea4935c02b64585b9a15e126fec9d5d99637021c542c0a495e5116205f3da287def46fa5b19cb1a7f3042c12c5f7a78d66d92fcb03f WHIRLPOOL 60d6da846c983457e038ea5ba3c0bf48f939c9586610985a14cac9772fd1d45d781a643abc16482f232f3028e44fe99fe1a382deaebf6589602fc244a4460e3f
diff --git a/net-dns/dnssec-tools/dnssec-tools-2.1.ebuild b/net-dns/dnssec-tools/dnssec-tools-2.1.ebuild
new file mode 100644
index 000000000000..bb63dd7c5455
--- /dev/null
+++ b/net-dns/dnssec-tools/dnssec-tools-2.1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils qt4-r2 systemd readme.gentoo
+
+DESCRIPTION="tools to ease the deployment of DNSSEC related technologies"
+HOMEPAGE="http://www.dnssec-tools.org/"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+RDEPEND="dev-lang/perl
+ dev-perl/Crypt-OpenSSL-Random
+ dev-perl/Getopt-GUI-Long
+ dev-perl/GraphViz
+ dev-perl/MailTools
+ dev-perl/Net-DNS
+ dev-perl/Net-DNS-SEC
+ dev-perl/XML-Simple"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -e '/^maninstall:/,+3s:$(MKPATH) $(mandir)/$(man1dir):$(MKPATH) $(DESTDIR)/$(mandir)/$(man1dir):' \
+ -i Makefile.in || die
+ sed -e 's:/usr/local/etc:/etc:g' \
+ -e 's:/usr/local:/usr:g' \
+ -i tools/donuts/donuts \
+ -i tools/etc/dnssec-tools/dnssec-tools.conf \
+ -i tools/scripts/genkrf || die
+ epatch "${FILESDIR}"/${PN}-2.0-dtinitconf.patch
+}
+
+src_configure() {
+ econf \
+ --disable-bind-checks \
+ --without-validator \
+ --with-perl-build-args=INSTALLDIRS=vendor \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newinitd "${FILESDIR}"/rollerd.initd rollerd
+ newconfd "${FILESDIR}"/rollerd.confd rollerd
+ systemd_dounit "${FILESDIR}"/rollerd.service
+
+ newinitd "${FILESDIR}"/donutsd.initd donutsd
+ newconfd "${FILESDIR}"/donutsd.confd donutsd
+ systemd_dounit "${FILESDIR}"/donutsd.service
+
+ prune_libtool_files
+ readme.gentoo_create_doc
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Please run 'dtinitconf' in order to set up the required
+/etc/dnssec-tools/dnssec-tools.conf file
+
+DNSSEC Validator has been split into net-dns/dnssec-validator
+"
diff --git a/net-dns/dnssec-tools/dnssec-tools-2.2.ebuild b/net-dns/dnssec-tools/dnssec-tools-2.2.ebuild
new file mode 100644
index 000000000000..bb63dd7c5455
--- /dev/null
+++ b/net-dns/dnssec-tools/dnssec-tools-2.2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils qt4-r2 systemd readme.gentoo
+
+DESCRIPTION="tools to ease the deployment of DNSSEC related technologies"
+HOMEPAGE="http://www.dnssec-tools.org/"
+SRC_URI="http://www.dnssec-tools.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+RDEPEND="dev-lang/perl
+ dev-perl/Crypt-OpenSSL-Random
+ dev-perl/Getopt-GUI-Long
+ dev-perl/GraphViz
+ dev-perl/MailTools
+ dev-perl/Net-DNS
+ dev-perl/Net-DNS-SEC
+ dev-perl/XML-Simple"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -e '/^maninstall:/,+3s:$(MKPATH) $(mandir)/$(man1dir):$(MKPATH) $(DESTDIR)/$(mandir)/$(man1dir):' \
+ -i Makefile.in || die
+ sed -e 's:/usr/local/etc:/etc:g' \
+ -e 's:/usr/local:/usr:g' \
+ -i tools/donuts/donuts \
+ -i tools/etc/dnssec-tools/dnssec-tools.conf \
+ -i tools/scripts/genkrf || die
+ epatch "${FILESDIR}"/${PN}-2.0-dtinitconf.patch
+}
+
+src_configure() {
+ econf \
+ --disable-bind-checks \
+ --without-validator \
+ --with-perl-build-args=INSTALLDIRS=vendor \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newinitd "${FILESDIR}"/rollerd.initd rollerd
+ newconfd "${FILESDIR}"/rollerd.confd rollerd
+ systemd_dounit "${FILESDIR}"/rollerd.service
+
+ newinitd "${FILESDIR}"/donutsd.initd donutsd
+ newconfd "${FILESDIR}"/donutsd.confd donutsd
+ systemd_dounit "${FILESDIR}"/donutsd.service
+
+ prune_libtool_files
+ readme.gentoo_create_doc
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Please run 'dtinitconf' in order to set up the required
+/etc/dnssec-tools/dnssec-tools.conf file
+
+DNSSEC Validator has been split into net-dns/dnssec-validator
+"
diff --git a/net-dns/dnssec-tools/files/dnssec-tools-2.0-dtinitconf.patch b/net-dns/dnssec-tools/files/dnssec-tools-2.0-dtinitconf.patch
new file mode 100644
index 000000000000..ee6adf7031d1
--- /dev/null
+++ b/net-dns/dnssec-tools/files/dnssec-tools-2.0-dtinitconf.patch
@@ -0,0 +1,24 @@
+--- dnssec-tools-2.0/tools/scripts/dtinitconf
++++ dnssec-tools-2.0/tools/scripts/dtinitconf
+@@ -58,8 +58,8 @@
+ #
+ my @COMMON_BINDLOCS =
+ (
+- "/usr/local/sbin",
+- "/usr/sbin",
++ "/usr/local/bin",
++ "/usr/bin",
+ );
+
+ #
+@@ -424,8 +424,8 @@
+ $admin = $opts{'admin'} || dnssec_tools_default("admin");
+ $zoneparser = $opts{'zoneparser'} || dnssec_tools_default("zoneparser");
+
+- $binddir = $opts{'binddir'};
+- $dtdir = $opts{'dtdir'};
++ $binddir = $opts{'binddir'} || 'path';
++ $dtdir = $opts{'dtdir'} || 'path';
+
+ $outfile = $opts{'outfile'} || getconffile();
+ $overwrite = $opts{'overwrite'};
diff --git a/net-dns/dnssec-tools/files/donutsd.confd b/net-dns/dnssec-tools/files/donutsd.confd
new file mode 100644
index 000000000000..f6368a6d07ec
--- /dev/null
+++ b/net-dns/dnssec-tools/files/donutsd.confd
@@ -0,0 +1,8 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DONUTSD_CMD="donutsd"
+DONUTSD_CONFPATH="/etc/dnssec-tools/donutsd.db"
+DONUTSD_PID="/var/run/donutsd.pid"
+DONUTSD_OPTS=""
+
diff --git a/net-dns/dnssec-tools/files/donutsd.initd b/net-dns/dnssec-tools/files/donutsd.initd
new file mode 100644
index 000000000000..0d9c87e8fa18
--- /dev/null
+++ b/net-dns/dnssec-tools/files/donutsd.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need mta
+}
+
+start() {
+ ebegin "Starting the DNSSEC monitoring daemon"
+ start-stop-daemon --start --pidfile ${DONUTSD_PIDFILE} --make-pidfile --background --exec ${DONUTSD_CMD} -- -i ${DONUTSD_CONFPATH} ${DONUTSD_OPTS}
+ eend $? "failed to start donutsd"
+}
+
+stop() {
+ ebegin "Stopping donutsd"
+ start-stop-daemon --stop --pidfile ${DONUTSD_PIDFILE}
+ eend $? "Failed to stop donutsd"
+}
diff --git a/net-dns/dnssec-tools/files/donutsd.service b/net-dns/dnssec-tools/files/donutsd.service
new file mode 100644
index 000000000000..b7ddbb8c0f03
--- /dev/null
+++ b/net-dns/dnssec-tools/files/donutsd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=DNSSEC monitoring daemon
+
+[Service]
+ExecStart=/usr/bin/donutsd -i /etc/dnssec-tools/donutsd.db
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/dnssec-tools/files/rollerd.confd b/net-dns/dnssec-tools/files/rollerd.confd
new file mode 100644
index 000000000000..f0530088405b
--- /dev/null
+++ b/net-dns/dnssec-tools/files/rollerd.confd
@@ -0,0 +1,8 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ROLLERD_CMD="rollerd"
+ROLLERD_RRFILE="/etc/dnssec-tools/dnssec-tools.rollrec"
+ROLLERD_KRFDIR="/var/bind/pri"
+ROLLERD_OPTS=""
+
diff --git a/net-dns/dnssec-tools/files/rollerd.initd b/net-dns/dnssec-tools/files/rollerd.initd
new file mode 100644
index 000000000000..1a0daf833f02
--- /dev/null
+++ b/net-dns/dnssec-tools/files/rollerd.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+start() {
+ ebegin "Starting DNSSEC control daemon"
+ "${ROLLERD_CMD}" --rrfile "${ROLLERD_RRFILE}" \
+ -directory "${ROLLERD_KRFDIR}" ${ROLLERD_OPTS}
+ eend $? "failed to start rollerd"
+}
+
+stop() {
+ ebegin "stoping rollerd"
+ /usr/bin/rollctl -halt
+ eend $? "failed to stop rollerd"
+}
diff --git a/net-dns/dnssec-tools/files/rollerd.service b/net-dns/dnssec-tools/files/rollerd.service
new file mode 100644
index 000000000000..2e4aef87b569
--- /dev/null
+++ b/net-dns/dnssec-tools/files/rollerd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=DNSSEC control daemon
+
+[Service]
+ExecStart=/usr/bin/rollerd -foreground --rrfile /etc/dnssec-tools/dnssec-tools.rollrec -directory /var/bind/pri
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/dnssec-tools/metadata.xml b/net-dns/dnssec-tools/metadata.xml
new file mode 100644
index 000000000000..a535b8852829
--- /dev/null
+++ b/net-dns/dnssec-tools/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-dns/dnssec-validator/Manifest b/net-dns/dnssec-validator/Manifest
new file mode 100644
index 000000000000..8b9d87aabbcb
--- /dev/null
+++ b/net-dns/dnssec-validator/Manifest
@@ -0,0 +1,8 @@
+AUX dnssec-validator-2.1-respect-LDFLAGS.patch 529 SHA256 c2cf6c2af3729421dc0fb7699be3e20e09da56c81a3b2eacd8776bfaa50b6d4d SHA512 c6ff47eee87ff5b1add81b80136f58369c3b782d2ebae7328152374e7e6ed565bd116a75d69f5fb8ec8273800c4ebd47707aa4560e7bff8007651e13a8590eb6 WHIRLPOOL 18de340437d56286714172bf796c55ad8045954adbb2beab7d9d2730ef90626338b622cd223cd36c6a3e2f44d9cc32483aebcf65685fed61680144209fbbfa43
+DIST dnsval-2.1.tar.gz 1059451 SHA256 f438e34f52e8e0a02c854bcaff4eb9d1018d203a13fd1094594b015a0da73e50 SHA512 14de6fa86ff30aabcd77d14cbd3e058507f5963f91deadc39dc1a7022f27239010d509f46d392dc7086b6444e068ce66e576f579342ca87a04d7fc776962cd6d WHIRLPOOL 7b1faead29775df288c45006fb170af4f63de45cae58a216f9521ae8ba45eae2fe275646f308b6b6eab7c87bd06e7087cd198cf48bd10b6f6f86ae35b1df4476
+DIST dnsval-2.2.tar.gz 1060434 SHA256 747dfa44d49943ab7172423bd622a5b3304c69195878ed88210b0d04d62cdf8b SHA512 1a01911b08e447d992f4843db8e10bc91041f9e3eaa8a3c050f71f0d7028292145379d1b769e69a837a157443abfa8b0b8ecc289c1b2fa4d33a9234282e9ae05 WHIRLPOOL 086fdb1dd89102653d3c921242d724e7feb3161c4a0582336ccf2673d2584f6c44016ef30fc2c968f891e5de04fc2030c087789cacc4eb97f31d9f93840b5101
+EBUILD dnssec-validator-2.1.ebuild 971 SHA256 c6429399f0383deb55aa7225824ff49af3bed4216c6169a723e55b9dbb598150 SHA512 7adbfcb7b3953d763d70017e7f79455e4e8fdb3d9e4794e6f78c12559e218b61da2bcf436260e5e454c1b14012e318598d6247dfaf6ffdd260d88d86a1833027 WHIRLPOOL 463a25b41bea6a576c07430b586b77217e32ea2b3dc92930954b77a9a78f58779f2fa4cf1446b6a500af389ab971912391186539a62d66f4094f1d38977ea08a
+EBUILD dnssec-validator-2.2.ebuild 976 SHA256 1220fbd7a9d0a5db5ac33b440e3da6c320d9aa06f2ea593d0d30704ed2e56642 SHA512 02affd8004878fccdf629f8c006f06f56776dc42ce0122a2a2ba294d7f5f12936cce5d3b455f5f04a398e659a472fe97f7d4269758b42652496f5341c0601883 WHIRLPOOL 55c589746ed6613b0d72e00dbc9eab54a3eed505278dd8576e479a48dc7d2548d8d2ebc67ff8aa88e369bbcc17d32e5696478a76e94bc13da1cd3e6b075d8bfc
+MISC ChangeLog 3309 SHA256 9536fcf3fd940795ce268378b815913063641b24eab686da7e36220d656a9723 SHA512 a233fd8208729fe6288b0baaa2abc5e6f714904d0ab256de206a53000dd5c7d02fbcb9eede9aba27de283336d26e7617e3463ad207df510d68b367280cb99026 WHIRLPOOL a2286f72efa081fdae0ad0eaf902357efa7299b9588c93f49eea7a3cfb7ae3d314af95ef451272b40032f1cd5e5174607cfe4f6de0c26b23a6da5373cf134025
+MISC ChangeLog-2015 1130 SHA256 4ae21b98d36fb5dc45c33891b8ee4c98f2982de8cc275833e929a2f359b118d1 SHA512 ec8bd1a0f0ea42a212bdbab4e923bc1780bbd77dec699763bf7969fcf2f12a4aa30934905dcdd6fc8fb1de652a0a7c3012adb671e0aee7de3fe4ece55ae82abb WHIRLPOOL 0783ff9950dc1a9f707ba9a7aa19a6863d45480560bba1c875b232b9c2a35d012a02f424383324dc9a1e0a591c5d4f0a27f82855c24e453c107a1ed434932f80
+MISC metadata.xml 237 SHA256 ffb571839c57797d282263369646d2bba2662601a45f7bb3251bb97f716554a6 SHA512 ae2360aa6b1b00c67e0acea4935c02b64585b9a15e126fec9d5d99637021c542c0a495e5116205f3da287def46fa5b19cb1a7f3042c12c5f7a78d66d92fcb03f WHIRLPOOL 60d6da846c983457e038ea5ba3c0bf48f939c9586610985a14cac9772fd1d45d781a643abc16482f232f3028e44fe99fe1a382deaebf6589602fc244a4460e3f
diff --git a/net-dns/dnssec-validator/dnssec-validator-2.1.ebuild b/net-dns/dnssec-validator/dnssec-validator-2.1.ebuild
new file mode 100644
index 000000000000..463f68b8f707
--- /dev/null
+++ b/net-dns/dnssec-validator/dnssec-validator-2.1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="DNSSEC validator (dnsval)"
+HOMEPAGE="http://www.dnssec-tools.org/"
+SRC_URI="http://www.dnssec-tools.org/download/dnsval-${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ipv6 static-libs +threads"
+
+RDEPEND="dev-libs/openssl
+ !<net-dns/dnssec-tools-1.13"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/dnsval-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-respect-LDFLAGS.patch
+}
+
+src_configure() {
+ econf \
+ --with-nsec3 \
+ --with-dlv \
+ $(use_with ipv6) \
+ $(use_with threads)
+}
+
+src_install() {
+ dodir /usr/bin /usr/include/validator
+ default
+
+ insinto /etc/dnssec-tools
+ doins etc/{dnsval.conf,root.hints}
+ elog "Creating /etc/dnssec-tools/resolv.conf as symlink to /etc/resolv.conf"
+ dosym ../resolv.conf /etc/dnssec-tools/resolv.conf
+
+ use static-libs || find "${D}" -name "*.a" -delete
+ prune_libtool_files
+}
diff --git a/net-dns/dnssec-validator/dnssec-validator-2.2.ebuild b/net-dns/dnssec-validator/dnssec-validator-2.2.ebuild
new file mode 100644
index 000000000000..c170b3fb200a
--- /dev/null
+++ b/net-dns/dnssec-validator/dnssec-validator-2.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="DNSSEC validator (dnsval)"
+HOMEPAGE="http://www.dnssec-tools.org/"
+SRC_URI="http://www.dnssec-tools.org/download/dnsval-${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ipv6 static-libs +threads"
+
+RDEPEND="dev-libs/openssl
+ !<net-dns/dnssec-tools-1.13"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/dnsval-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.1-respect-LDFLAGS.patch
+}
+
+src_configure() {
+ econf \
+ --with-nsec3 \
+ --with-dlv \
+ $(use_with ipv6) \
+ $(use_with threads)
+}
+
+src_install() {
+ dodir /usr/bin /usr/include/validator
+ default
+
+ insinto /etc/dnssec-tools
+ doins etc/{dnsval.conf,root.hints}
+ elog "Creating /etc/dnssec-tools/resolv.conf as symlink to /etc/resolv.conf"
+ dosym ../resolv.conf /etc/dnssec-tools/resolv.conf
+
+ use static-libs || find "${D}" -name "*.a" -delete
+ prune_libtool_files
+}
diff --git a/net-dns/dnssec-validator/files/dnssec-validator-2.1-respect-LDFLAGS.patch b/net-dns/dnssec-validator/files/dnssec-validator-2.1-respect-LDFLAGS.patch
new file mode 100644
index 000000000000..05660275de96
--- /dev/null
+++ b/net-dns/dnssec-validator/files/dnssec-validator-2.1-respect-LDFLAGS.patch
@@ -0,0 +1,22 @@
+--- dnsval-2.1/libsres/Makefile.in
++++ dnsval-2.1/libsres/Makefile.in
+@@ -63,7 +63,7 @@
+ $(RM) -rf $(LT_DIR)
+
+ $(LIBRES): $(LOBJ)
+- $(LIBTOOLLD) -o $@ $(LOBJ)
++ $(LIBTOOLLD) -o $@ $(LOBJ) $(LDFLAGS) -lssl
+
+ install:
+ $(MKPATH) $(DESTDIR)$(libdir)
+--- dnsval-2.1/libval/Makefile.in
++++ dnsval-2.1/libval/Makefile.in
+@@ -65,7 +65,7 @@
+ $(RM) -rf $(LT_DIR)
+
+ $(LIBVAL): $(LOBJ)
+- $(LIBTOOLLD) -o $@ $(LOBJ) $(LSRES)
++ $(LIBTOOLLD) -o $@ $(LOBJ) $(LSRES) $(LDFLAGS) -lssl -lpthread
+
+ install:
+ $(MKPATH) $(DESTDIR)$(libdir)
diff --git a/net-dns/dnssec-validator/metadata.xml b/net-dns/dnssec-validator/metadata.xml
new file mode 100644
index 000000000000..a535b8852829
--- /dev/null
+++ b/net-dns/dnssec-validator/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-dns/dnstop/Manifest b/net-dns/dnstop/Manifest
new file mode 100644
index 000000000000..eccfc3236df8
--- /dev/null
+++ b/net-dns/dnstop/Manifest
@@ -0,0 +1,7 @@
+AUX dnstop-20140915-pkg-config.patch 966 SHA256 5bb8e4749b3e86cf6ae4bc838c921f528b8176be8a4b9131e3f7630935bc56e4 SHA512 53181f734dadf5d5e91a69e626ab1a76b36d4a3c91b7360f66c6ef3375296ba67415ef27bc2af4f440511c126a927ae20838788b9b48061c5ceca9c8c3832cbf WHIRLPOOL 3533fb8e0cbe406649c116a2f41771e8657e0081346a4c97c38c2a625317566a7fc1019e2ab827c92a77b3fef683aee3e9cd3f4b944a0e8e8d78865d5fc246c8
+DIST dnstop-20140915.tar.gz 77917 SHA256 b4b03d02005b16e98d923fa79957ea947e3aa6638bb267403102d12290d0c57a SHA512 902cf96f7366983cae4bf684e44fbe12f6e982cee8ff489329e25e1a13de60870d356906a99fee56c6da2258c4a39074a504389549c6c2e239a4ea94d8b9a65d WHIRLPOOL dbdb56039bf9eaa3463edd77f01fc5a500cd3b5d68337491791c63b1e212c0a8eaebcf9cea8d7cbf918f98fbbf92e14c7e1a665715a915f68e84b1b77e48c616
+EBUILD dnstop-20140915-r2.ebuild 653 SHA256 040dbc00259b89d40050986bf4923973a246b4ee86432a0fed8eada4913aa4d6 SHA512 06771a541002736dfaee9722b13670da9ed0051a4adb50b905a78e97de4b9912f1a4becc538c4f694a9f0ad3dd628e04bda1695bef5ba68eae05f92d6bae01cf WHIRLPOOL 31096f35bebe77d7229262cf4fbf682d4acc355115913dc1bd064d39cfc13929a2add190d750de8b5f228fcca31baca05e554b23d1a8ece711e6544d35fd1752
+EBUILD dnstop-20140915.ebuild 601 SHA256 70251ce5f2dddb70a0f6374d1e7f096e8f4b7b413c66d226d4592d9856420be8 SHA512 83f9814532177cb0e1bb55a6a0446bed90655229334a007b673fb8e0f0ec41607092b9cd30e762ceebbfff846a00ce9757fd6f7534fab2be8c44a7a3732b0582 WHIRLPOOL cf8de69a80a5c2b274b3fefcdb33f774901d3bcfc4f114d13df83e3f219391129bdbe471d9f99e631e6e03bf7800d2c047835aef9ac439dd317a2bdf85043551
+MISC ChangeLog 3520 SHA256 d8aea77836ec2b9dca91e8386e4b773684b9fa47a56d934530d6e15d8c09687c SHA512 26252473b82ce75b6a4eae62d719f1e59b19b06309bdc7a8d59a072b9f978140ff5265eb3dd26f06bdb9ae358bf8c012ce3f9340512b65f1d27360a7aa06c9f3 WHIRLPOOL c9027372f9c876d7e588c57716f47637d548edf5d2a10fb19fd8cc10f170fb57d0dd77acfab7b5a2db14ec57d54461cae419b33bb4459aea2007e464d5a4d705
+MISC ChangeLog-2015 6015 SHA256 764648cd16fdcf1651a26c8f63256c8bb86a94e0ca2b5c1a7af552d3963924a7 SHA512 2af2094042439b7006718ba3594b46c36f4e1eda7b974e0fdc3cc6f1b7cc748aff769dafaaee681066cc086c1d7c1b58486e0f0e48ba7d455d78f8f88bfc1923 WHIRLPOOL 1ad11b244122f096ed224bf58245bf7100c9cbd84d497d0dc2aeea5a6ee3c33c8f925f78ee52c89f63a401c31c3db97a8a3820cb6c9f4d5037961e560cf5cdff
+MISC metadata.xml 651 SHA256 78296c101550e85f151a449fff5025ca9db81cb8c78e5fe2c48d08e2ab2529d8 SHA512 ae97fbd5d24ef68a1377bbf67fda439c34bf2c4e32266aa489cec9537e9452afcbfa073a4a522c899ed0a1662fbe4e95a44ec329bf493025fe866bb60d1e1795 WHIRLPOOL 615fe0d1e31775fc9a49bb6e38000393c8b703d7c295a23e6964749431598ead659937dceafe5b5405f5c2d35aee84aa4e5edc20aa4795472d9f64c8c0ab71f4
diff --git a/net-dns/dnstop/dnstop-20140915-r2.ebuild b/net-dns/dnstop/dnstop-20140915-r2.ebuild
new file mode 100644
index 000000000000..0d25543b4a68
--- /dev/null
+++ b/net-dns/dnstop/dnstop-20140915-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="Displays various tables of DNS traffic on your network"
+HOMEPAGE="http://dnstop.measurement-factory.com/"
+SRC_URI="http://dnstop.measurement-factory.com/src/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/ncurses:0
+ net-libs/libpcap"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}"-pkg-config.patch )
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-ipv6
+}
+
+src_install() {
+ dobin dnstop
+ doman dnstop.8
+ dodoc CHANGES
+}
diff --git a/net-dns/dnstop/dnstop-20140915.ebuild b/net-dns/dnstop/dnstop-20140915.ebuild
new file mode 100644
index 000000000000..f15ae772dace
--- /dev/null
+++ b/net-dns/dnstop/dnstop-20140915.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Displays various tables of DNS traffic on your network"
+HOMEPAGE="http://dnstop.measurement-factory.com/"
+SRC_URI="http://dnstop.measurement-factory.com/src/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~hppa ~ppc x86"
+IUSE="ipv6"
+
+RDEPEND="sys-libs/ncurses
+ net-libs/libpcap"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ econf \
+ $(use_enable ipv6)
+}
+
+src_install() {
+ dobin dnstop
+ doman dnstop.8
+ dodoc CHANGES
+}
diff --git a/net-dns/dnstop/files/dnstop-20140915-pkg-config.patch b/net-dns/dnstop/files/dnstop-20140915-pkg-config.patch
new file mode 100644
index 000000000000..5ee18e0a684d
--- /dev/null
+++ b/net-dns/dnstop/files/dnstop-20140915-pkg-config.patch
@@ -0,0 +1,29 @@
+diff -Naur dnstop-20140915-orig/configure.ac dnstop-20140915/configure.ac
+--- dnstop-20140915-orig/configure.ac 2016-09-25 19:36:25.222387686 +0100
++++ dnstop-20140915/configure.ac 2016-09-25 19:32:01.489612302 +0100
+@@ -11,10 +11,7 @@
+ AC_PROG_INSTALL
+
+ # Checks for libraries.
+-AC_CHECK_LIB([ncurses], [initscr])
+-if test "$ac_cv_lib_ncurses_initscr" != "yes" ; then
+-AC_CHECK_LIB([curses], [initscr])
+-fi
++PKG_CHECK_MODULES([ncurses], [ncurses])
+ AC_CHECK_LIB([pcap], [pcap_open_live])
+ AC_CHECK_LIB([socket], [main])
+ AC_CHECK_LIB([nsl], [main])
+diff -Naur dnstop-20140915-orig/Makefile.in dnstop-20140915/Makefile.in
+--- dnstop-20140915-orig/Makefile.in 2016-09-25 19:36:25.221387679 +0100
++++ dnstop-20140915/Makefile.in 2016-09-25 19:37:39.333887436 +0100
+@@ -2,8 +2,8 @@
+
+ OPTFLAGS=@OPTFLAGS@
+ CC=@CC@
+-CFLAGS=@CFLAGS@ ${OPTFLAGS}
+-LIBS=@LIBS@
++CFLAGS=@CFLAGS@ @ncurses_CFLAGS@ ${OPTFLAGS}
++LIBS=@LIBS@ @ncurses_LIBS@
+ LDFLAGS=@LDFLAGS@
+
+ prefix=@prefix@
diff --git a/net-dns/dnstop/metadata.xml b/net-dns/dnstop/metadata.xml
new file mode 100644
index 000000000000..869cb9ae09ae
--- /dev/null
+++ b/net-dns/dnstop/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>hendrik@consetetur.de</email>
+ <name>Hendrik v. Raven</name>
+</maintainer>
+<maintainer type="person">
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+</maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+</maintainer>
+<upstream>
+ <changelog>http://dns.measurement-factory.com/tools/dnstop/src/CHANGES</changelog>
+ <doc>http://dns.measurement-factory.com/tools/dnstop/dnstop.8.html</doc>
+</upstream>
+</pkgmetadata>
diff --git a/net-dns/dnswalk/Manifest b/net-dns/dnswalk/Manifest
new file mode 100644
index 000000000000..f3191d23d580
--- /dev/null
+++ b/net-dns/dnswalk/Manifest
@@ -0,0 +1,5 @@
+DIST dnswalk-2.0.2.tar.gz 27015 SHA256 b49ea147a00e95e80330534d43f8737c2367ae862050e9a8009a607c49f0ea6b SHA512 23e5408149ae65f69dbb6d0ecaf5b10233e2279a502f6e19f0dacde0e270ed4eed0aea72f8c12dd636228e99b0b115a335bb8327a0628ad1f36dae5f5572712c WHIRLPOOL 81a08ac16ebb2876a4b2ec557aee4a87a7699db2366cda2c3a9e3b850489e807ae1511c13d9946d47826a24ce93a231deddc5948074afcf1fbc3efb717d06972
+EBUILD dnswalk-2.0.2.ebuild 653 SHA256 03087c5e172481dbfcdd8d3e1269c63a9bfccf6c24c0318f28bec225cd24d677 SHA512 fe7bebc43f6656ef9cfc7e0f32e59548385a16cf5585c6891bffd80823b1cb81bf37c1893dc300076ff0b79e67fc29616b36c061e64ff328712e6bf0a2efae55 WHIRLPOOL f9c9e7c2607387cf1dac9c32f4d0c0b9f3fc5579982878d66bd3a490713d1388b3b5c034a59869e2368b678a62c96b8b37719273d97b9be9cd450f46a13140f3
+MISC ChangeLog 2633 SHA256 30f99934ef4f3448dea8273f574c8dc7c652c022843169d18a31165969644a2f SHA512 de9a9fdeeae5bb1a2ff9dfb12ac2cde44810443cc3388db7cf399efd2b26417e70efbb2336d8a9511e0160627c4adc5b1f2a8fa3647a6d2ca0086ef87f075841 WHIRLPOOL aa30696e870dc14449a9d16804d11ed6cd702d80c427434fc5ea6b837215ab15b3919ae71cd66baafe0d8e5b21d49bf2c39fdc8b13a5b9c226df6d88040f1eb8
+MISC ChangeLog-2015 1751 SHA256 62b422532baa714adcecb3b40498089d1f43879e2556cc4b90c3ac95458ce30a SHA512 270a62fb701bb4f6cb818a0faaf10399ba0bc79102167daf6370f663920a3fb5532ab4abaa5a141ae59c0342ef5ba42f9d1cd1bc1c0e4267411920a321f386d0 WHIRLPOOL 1c2708f130ace842fe6aa4bfd6b17b82b477f874c745e50d6b15aa40232b6b98c230dbeb9b6906276d6e3e642753c627eca1c90009fa15b0c975b3fd9b0b0384
+MISC metadata.xml 244 SHA256 5c27827d5f5290cd9931f74fee7c4776ffea318a264c663684b6715b02adf7f1 SHA512 9e02e3ec7cc7cdf87fd3970fd60703bc661263fe067e173c782ed6fffd1ddd84f68c55a021a6657d6a8d1f0c2320fa6283d729954f214a8a88c5a725683baab1 WHIRLPOOL 45ff89c9e41f89d3a117c59aac489edd6784e83fd52e6bc0621dd798303eacc77d5ad7d27873f20e0f662897c9f492eec320d049030ce28df3cf59ca8ab45dc1
diff --git a/net-dns/dnswalk/dnswalk-2.0.2.ebuild b/net-dns/dnswalk/dnswalk-2.0.2.ebuild
new file mode 100644
index 000000000000..561f12577ffa
--- /dev/null
+++ b/net-dns/dnswalk/dnswalk-2.0.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+DESCRIPTION="dnswalk is a DNS database debugger"
+HOMEPAGE="https://sourceforge.net/projects/dnswalk/"
+SRC_URI="mirror://sourceforge/dnswalk/${P}.tar.gz"
+
+LICENSE="freedist"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+RDEPEND=">=dev-perl/Net-DNS-0.12"
+
+S=${WORKDIR}
+
+src_prepare() {
+ sed -i 's:#!/usr/contrib/bin/perl:#!'"${EPREFIX}"'/usr/bin/perl:' dnswalk
+}
+
+src_install () {
+ dobin dnswalk
+
+ dodoc CHANGES README TODO \
+ do-dnswalk makereports sendreports rfc1912.txt dnswalk.errors
+ doman dnswalk.1
+}
diff --git a/net-dns/dnswalk/metadata.xml b/net-dns/dnswalk/metadata.xml
new file mode 100644
index 000000000000..b89640a8f597
--- /dev/null
+++ b/net-dns/dnswalk/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">dnswalk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/ez-ipupdate/Manifest b/net-dns/ez-ipupdate/Manifest
new file mode 100644
index 000000000000..287665b9fcd8
--- /dev/null
+++ b/net-dns/ez-ipupdate/Manifest
@@ -0,0 +1,12 @@
+AUX ez-ipupdate-3.0.11.13.3_beta8-3322.diff 1934 SHA256 2fb89b2563c9c240c37b3eeaba4b1797c6a9c20c12dc2122dee02a7feb96e5f4 SHA512 b6a5bf2d7bc46d192d20a25cf9a220703553f3143f6db681366b90815a28be7fb716618b8a13302d0e892924b4803c8ceb535df6026e4f3154118812f1f87647 WHIRLPOOL f252127d84b5dfe890a660b99bedee4d75cef05c2694dc4be23ed8504088f00b2c001ecf0b2268ec4150a5e542742eed4f838a1838a5d13851a0819f13860d11
+AUX ez-ipupdate-3.0.11.13.3_beta8-dnsexit.diff 6770 SHA256 0eae6b193cb5b6b2c11c7dc3339327b05e279d63213ecd8d414c93325df8115a SHA512 e3f14a06383c3a49453b5b4b37e2030d17289ed4d43f15e7a48739e40adced66857820328a2635b814c1003541b3f0ea9bf46d3343c2ffe5fea27b2872a20670 WHIRLPOOL b2a94b2576b2f298504db627ac0856c414e93c906a8ce69f15b0122bf6de3b45d52596a931b02df8b47c621d77be75b6a85acaf2101812069182f5ee4f857ef6
+AUX ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff 767 SHA256 163c0cc4fd92a5b75c0154eead7045fdf5817a58c8ac4af6ad13ad51ce1441fc SHA512 7b62ce5ad610963beac5138ecb797fd2a36643720c25cae4efe94621c92e9b57dd2c73b2320735c56b477f06894e35e9eeb085b8c365729728c05eb6d0d78ae4 WHIRLPOOL 7b06993d219e48a364cc5d100f6e870450ca96b8563817d68df22ce9aa4205cbcad0aaf06a48b76c46de44aca36983f74b17c52a4a71f2d6b51dda8d97cf2b84
+AUX ez-ipupdate-3.0.11.13.3_beta8-linux.diff 5841 SHA256 d406fbd63c8463c7d21aa8bc87471c08d5fcfe42b0d3fbdd5daeb503170a356c SHA512 3cee4b7c0b145344bba892e3a6fbdd07b4e21020005a9094bd96950304fea89d8e16439de9133eebfe581764b0abf240c27f59188762ee209b96159e6d0af168 WHIRLPOOL 243bea4ca1848e7b9c365196a4c7fc84801dbea8baa8d42788c8706ad7cacbe962b3b62372ba1d881e2305112a946ccce1e6c63562f51b1211fb70e7645bdfcd
+AUX ez-ipupdate.initd 2555 SHA256 9301469ef0c058ce574c96c55a66572a1d0c8e9fc860404b179482b1149e0fbf SHA512 31729abd0aae2d225838dcbbbd724ea2402536eced290c71dfcd201fe48dbb1cf176da519d239b380089aee1afbeb66fc488d42bfb1432e14dfe36a484d8f841 WHIRLPOOL 8cf261f050c6efc2a4175629b91f8effc57a0bd36a437ffed910cec1725ddd49e54a7a7e9148bc8cee719e15454ddf8390994a607ef0f0e1b8414800074d1c67
+AUX ez-ipupdate.service 363 SHA256 5f49b86d9fd70260baff42948b5eb5133de2b9c9da47aae2ec09e7ff96510c43 SHA512 d8822278f9c32419fd95a37ee7523ce83bbbd5d0e43dd9869b076ffd837121ca2f5ee07ebd66bb6942ac9a2bf1c07025877781b2ed049945bcaee4e04a039022 WHIRLPOOL 1daa8eebfa54070317e5df7e7c7dcd0a8c02edb24e41501c0d8e6619f6ed270630d980a851fa014ba3bbff48e795e6dfcf7c0d5d06f2fdfce20581ce21f9c79a
+DIST ez-ipupdate_3.0.11b8-13.3.diff.gz 154094 SHA256 2c058941f8b172c8564d841d4413b7fa7a5c4dbd53d7d5574c2ff58f41cf39b3 SHA512 bef3c344a3c16f224cc3c6e662213713bb1123b4e47347d83d01d632c5ca0b09e7f0e5a989b3987655759ac901307c8dd6768fab3056c8878c0adcf78b0d5fb9 WHIRLPOOL f213674b871bdf950fe3f1a1131561954c77f0c79a2e4a70752f8a1a88f86e221ad269d92839c30a49544c636ccad77f9e096687a381209cb86367329eafd4ca
+DIST ez-ipupdate_3.0.11b8.orig.tar.gz 81975 SHA256 bf5b8d11ffe055c5891d0ab64bbfa86e99cbda645d40f346146b939fec8d962d SHA512 85de91cde25d176374ade7128e8932a4e015cd04beb8d5b71bf540e2f59b6c409d1c8bd0ff7c50734b87ecc19a74a7b1da3e646a8c8787badcae4feb9dba7864 WHIRLPOOL ce279c1d8f1ae404c936b959b9273bce1c37404d7ecf0d7262468bb4b71f6aee75797a2448ea7a0191c9f8a01ffef92107f71727e2c7d445469ec61f0be8f162
+EBUILD ez-ipupdate-3.0.11.13.3_beta8-r3.ebuild 3481 SHA256 e65e66855ce7ceacb12c8d2b67235de130d8dd89d94387064ad9d2ad517965b0 SHA512 210e454786bbb443c6b5c24d201d4cd0af048517780b5aac2c9fe57266bbd8431594e5f2b09a5a312831e908a7e02a2bb364bb0c6c8acb4422b5402200936415 WHIRLPOOL 28352ae4573f1b199a05b3370f1e5a641f3337f9d92c9b31c61b488140210b4af540b4abba30d14fa3f041ea834dc6062ce20492a5725f7714caaf6a91e884ed
+MISC ChangeLog 3307 SHA256 ac8c6ca2086963f7b97a758fc2910e17bac7d835257b59c443369ab204aed7dc SHA512 6905bdb4cf7284b9dc3df1d7dd4be27c68014d3209f13ffd159fd9a7eb7376117e2ddf4e5245406743ca1e6edd4816d015083461180f2213f97d0c59b8bd6d2c WHIRLPOOL 7b7e903b468dbd261f00b7ac02e3f0d60b9f97c77d75d9d07c4ca3b2178a802a6e24684494cf43b9bcf39792d362e156b659e7b7c08b42307a890878c06a1043
+MISC ChangeLog-2015 7785 SHA256 9f15c325d9d3915cceb0487b7ab5a518a40c7a2d020516fc27af7ffac23939b8 SHA512 305c8cbf6ee81393ae1547bef84e1809f63746d9033208ec1795253a0ac36fdd9a9f870256ae9f0325a6fe312564bb2b818e01fca0ab6d98768d59018d4a0632 WHIRLPOOL 25bab2031c41d5474c5e28ede68426f150bd3f1dffa1364650a64ee4b7a0c6d6d8a10ce7a4e196f125c7e35ca5937a6b4dcc4063a9f77ffbf7340084cf2fae63
+MISC metadata.xml 404 SHA256 25c8957aee3263e19fd88b60dfaee092b36f626b3d68fe84a2ca8deab24d45aa SHA512 07417b283cb97be8e2d9ff84dc6fd42d89cb1fc48bd356efa7c29498137fbec47fd408960915805d18d9aa7b49a530ec55271a8eb97287b15586678c4fdf5b20 WHIRLPOOL c4b9ef7e136cc5f6cc6aae338924ef446429367860e161d63ccfaf3715e18ea29d989d094f235ab4fa99a6030876bd96177c332320a44f3c13f73ebc85b8816d
diff --git a/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r3.ebuild b/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r3.ebuild
new file mode 100644
index 000000000000..df5841dd2a89
--- /dev/null
+++ b/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r3.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit eutils readme.gentoo systemd user versionator
+
+MY_BETA="$(get_version_component_range 6)"
+MY_PATCH="$(get_version_component_range 4-5)"
+MY_PV="$(get_version_component_range 1-3)${MY_BETA/beta/b}"
+
+DESCRIPTION="Dynamic DNS client for lots of dynamic dns services"
+HOMEPAGE="http://ez-ipupdate.com/"
+SRC_URI="mirror://debian/pool/main/e/ez-ipupdate/${PN}_${MY_PV}.orig.tar.gz
+ mirror://debian/pool/main/e/ez-ipupdate/${PN}_${MY_PV}-${MY_PATCH}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Please create one or more config files in
+/etc/ez-ipupdate/. A bunch of samples can
+be found in the doc directory.
+
+All config files must have a '.conf' extension.
+
+If you are using openRC you need to:
+- Please do not use the 'run-as-user', 'run-as-euser',
+'cache-file' and 'pidfile' options, since these are
+handled internally by the init-script.
+
+-If you want to use ez-ipupdate in daemon mode,
+please add 'daemon' to the config file(s) and
+add the ez-ipupdate init-script to the default runlevel.
+Without the 'daemon' option, you can run the
+init-script with the 'update' parameter inside
+your PPP ip-up script.
+"
+
+src_prepare() {
+ # apply debian patches
+ epatch "${WORKDIR}/${PN}_${MY_PV}-${MY_PATCH}.diff"
+
+ # repair/apply additional debian patches
+ sed -i -e "s|^\(---\s*\)\.\./|\1|g" debian/patches/*.diff
+ EPATCH_SOURCE="${S}/debian/patches" EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch
+
+ # adding members.3322.org support
+ epatch "${FILESDIR}/${P}-3322.diff"
+
+ # adding www.dnsexit.com support
+ epatch "${FILESDIR}/${P}-dnsexit.diff"
+
+ # make ez-ipupdate work with iproute2/dhcpcd under linux (bug #318905)
+ epatch "${FILESDIR}/${P}-linux.diff"
+
+ # allows to set IPv6 via -a option, (bug #432764)
+ epatch "${FILESDIR}/${P}-ipv6.diff"
+
+ # repair format mask issues
+ sed -i -e "s|\(\s*\)\(strlen(putbuf)\)|\1(int)\2|g" ez-ipupdate.c || die
+
+ # comment out obsolete options
+ sed -i -e "s:^\(run-as-user.*\):#\1:g" \
+ -e "s:^\(cache-file.*\):#\1:g" ex*conf || die
+
+ # make 'missing' executable (bug #103480)
+ chmod +x missing
+}
+
+src_configure() {
+ econf --bindir=/usr/sbin
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ newinitd "${FILESDIR}/ez-ipupdate.initd" ez-ipupdate
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ keepdir /etc/ez-ipupdate
+
+ # install docs
+ dodoc README
+ newdoc debian/README.Debian README.debian
+ newdoc debian/changelog ChangeLog.debian
+ newdoc CHANGELOG ChangeLog
+ doman debian/ez-ipupdate.8
+
+ # install example configs
+ docinto examples
+ dodoc ex*conf
+
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ enewgroup ez-ipupd
+ enewuser ez-ipupd -1 -1 /var/cache/ez-ipupdate ez-ipupd
+}
+
+pkg_postinst() {
+ chmod 750 /etc/ez-ipupdate /var/cache/ez-ipupdate
+ chown ez-ipupd:ez-ipupd /etc/ez-ipupdate /var/cache/ez-ipupdate
+
+ readme.gentoo_print_elog
+
+ if [ -f /etc/ez-ipupdate.conf ]; then
+ elog "!!! IMPORTANT UPDATE NOTICE !!!"
+ elog
+ elog "The ez-ipupdate init-script can now handle more"
+ elog "than one config file. New config file location is"
+ elog "/etc/ez-ipupdate/*.conf"
+ elog
+ if [ ! -f /etc/ez-ipupdate/default.conf ]; then
+ mv -f /etc/ez-ipupdate.conf /etc/ez-ipupdate/default.conf
+ elog "Your old configuration has been moved to"
+ elog "/etc/ez-ipupdate/default.conf"
+ elog
+ fi
+ fi
+}
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-3322.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-3322.diff
new file mode 100644
index 000000000000..d6bf0152a098
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-3322.diff
@@ -0,0 +1,65 @@
+diff -Naur ez-ipupdate-3.0.11b8.orig/example-3322.conf ez-ipupdate-3.0.11b8/example-3322.conf
+--- ez-ipupdate-3.0.11b8.orig/example-3322.conf 1970-01-01 01:00:00.000000000 +0100
++++ ez-ipupdate-3.0.11b8/example-3322.conf 2011-01-23 19:30:43.785652588 +0100
+@@ -0,0 +1,19 @@
++#!/usr/local/bin/ez-ipupdate -c
++#
++# example config file for ez-ipupdate
++#
++# this file is actually executable!
++#
++
++service-type=qdns
++#service-type=qdns-static
++user=myuserid:mypassword
++host=mydomain.whatever.com
++interface=eth1
++max-interval=2073600
++
++# uncomment this once you have everything working how you want and you are
++# ready to have ez-ipupdate running in the background all the time. to stop it
++# you can use "killall -QUIT ez-ipupdate" under linux.
++#daemon
++
+diff -Naur ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c ez-ipupdate-3.0.11b8/ez-ipupdate.c
+--- ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c 2011-01-23 19:29:17.698793394 +0100
++++ ez-ipupdate-3.0.11b8/ez-ipupdate.c 2011-01-23 19:29:17.799792055 +0100
+@@ -103,6 +103,11 @@
+ #define HEIPV6TB_DEFAULT_PORT "80"
+ #define HEIPV6TB_REQUEST "/index.cgi"
+
++#define QDNS_DEFAULT_SERVER "members.3322.org"
++#define QDNS_DEFAULT_PORT "80"
++#define QDNS_REQUEST "/dyndns/update"
++#define QDNS_STAT_REQUEST "/dyndns/update"
++
+ #define DEFAULT_TIMEOUT 120
+ #define DEFAULT_UPDATE_PERIOD 120
+ #define DEFAULT_RESOLV_PERIOD 30
+@@ -514,6 +519,26 @@
+ HEIPV6TB_DEFAULT_PORT,
+ HEIPV6TB_REQUEST
+ },
++ { "qdns",
++ { "qdns", 0, 0, },
++ DYNDNS_init,
++ DYNDNS_update_entry,
++ DYNDNS_check_info,
++ DYNDNS_fields_used,
++ QDNS_DEFAULT_SERVER,
++ QDNS_DEFAULT_PORT,
++ QDNS_REQUEST
++ },
++ { "qdns-static",
++ { "qdns-static", "qdns-stat", "statdns", },
++ DYNDNS_init,
++ DYNDNS_update_entry,
++ DYNDNS_check_info,
++ DYNDNS_STAT_fields_used,
++ QDNS_DEFAULT_SERVER,
++ QDNS_DEFAULT_PORT,
++ QDNS_STAT_REQUEST
++ },
+ };
+
+ static struct service_t *service = NULL;
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-dnsexit.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-dnsexit.diff
new file mode 100644
index 000000000000..fd80485f0f4f
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-dnsexit.diff
@@ -0,0 +1,262 @@
+diff -Naur ez-ipupdate-3.0.11b8.orig/example-dnsexit.conf ez-ipupdate-3.0.11b8/example-dnsexit.conf
+--- ez-ipupdate-3.0.11b8.orig/example-dnsexit.conf 1970-01-01 01:00:00.000000000 +0100
++++ ez-ipupdate-3.0.11b8/example-dnsexit.conf 2011-01-23 19:32:53.181937517 +0100
+@@ -0,0 +1,19 @@
++#!/usr/sbin/ez-ipupdate -c
++#
++# example config file for ez-ipupdate
++#
++# this file is actually executable!
++#
++
++service-type=dnsexit
++user=loginname:password
++host=www.yourdomain.com
++interface=eth1
++
++run-as-user=ez-ipupd
++cache-file=/var/cache/ez-ipupdate/default-cache
++
++# uncomment this once you have everything working how you want and you are
++# ready to have ez-ipupdate running in the background all the time. to stop it
++# you can use "killall -QUIT ez-ipupdate" under linux.
++#daemon
+diff -Naur ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c ez-ipupdate-3.0.11b8/ez-ipupdate.c
+--- ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c 2011-01-23 19:32:53.074938936 +0100
++++ ez-ipupdate-3.0.11b8/ez-ipupdate.c 2011-01-23 19:32:53.182937505 +0100
+@@ -103,6 +103,10 @@
+ #define HEIPV6TB_DEFAULT_PORT "80"
+ #define HEIPV6TB_REQUEST "/index.cgi"
+
++#define DNSEXIT_DEFAULT_SERVER "www.dnsexit.com"
++#define DNSEXIT_DEFAULT_PORT "80"
++#define DNSEXIT_REQUEST "/RemoteUpdate.sv"
++
+ #define DEFAULT_TIMEOUT 120
+ #define DEFAULT_UPDATE_PERIOD 120
+ #define DEFAULT_RESOLV_PERIOD 30
+@@ -341,6 +345,11 @@
+ int HEIPV6TB_check_info(void);
+ static char *HEIPV6TB_fields_used[] = { "server", "user", NULL };
+
++int DNSEXIT_update_entry(void);
++int DNSEXIT_check_info(void);
++static char *DNSEXIT_fields_used[] = { "server", "user", "address", "wildcard", "mx", "host", NULL };
++
++
+ struct service_t services[] = {
+ { "NULL",
+ { "null", "NULL", 0, },
+@@ -514,6 +523,16 @@
+ HEIPV6TB_DEFAULT_PORT,
+ HEIPV6TB_REQUEST
+ },
++ { "dnsexit",
++ { "dnsexit", 0, 0, },
++ NULL,
++ DNSEXIT_update_entry,
++ DNSEXIT_check_info,
++ DNSEXIT_fields_used,
++ DNSEXIT_DEFAULT_SERVER,
++ DNSEXIT_DEFAULT_PORT,
++ DNSEXIT_REQUEST
++ },
+ };
+
+ static struct service_t *service = NULL;
+@@ -4241,6 +4260,195 @@
+ }
+ return(UPDATERES_ERROR);
+ break;
++ }
++
++ return(UPDATERES_OK);
++}
++
++int DNSEXIT_check_info(void)
++{
++ char buf[BUFSIZ+1];
++
++ if((host == NULL) || (*host == '\0'))
++ {
++ if(options & OPT_DAEMON)
++ {
++ return(-1);
++ }
++ if(host) { free(host); }
++ printf("host: ");
++ *buf = '\0';
++ fgets(buf, BUFSIZ, stdin);
++ host = strdup(buf);
++ chomp(host);
++ }
++
++ if(interface == NULL && address == NULL)
++ {
++ if(options & OPT_DAEMON)
++ {
++ fprintf(stderr, "you must provide either an interface or an address\n");
++ return(-1);
++ }
++ if(interface) { free(interface); }
++ printf("interface: ");
++ *buf = '\0';
++ fgets(buf, BUFSIZ, stdin);
++ chomp(buf);
++ option_handler(CMD_interface, buf);
++ }
++
++ warn_fields(service->fields_used);
++
++ return 0;
++}
++
++int DNSEXIT_update_entry(void)
++{
++ char buf[BUFFER_SIZE+1];
++ char *bp = buf;
++ int bytes;
++ int btot;
++ int ret;
++
++ buf[BUFFER_SIZE] = '\0';
++
++ if(do_connect((int*)&client_sockfd, server, port) != 0)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ show_message("error connecting to %s:%s\n", server, port);
++ }
++ return(UPDATERES_ERROR);
++ }
++
++ snprintf(buf, BUFFER_SIZE, "GET %s?action=edit&", request);
++ output(buf);
++ if(address != NULL && *address != '\0')
++ {
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "myip", address);
++ output(buf);
++ }
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "wildcard", wildcard ? "ON" : "OFF");
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "mx", mx);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "backmx", *mx == '\0' ? "NO" : "YES");
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "host", host);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "login", user_name);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "%s=%s&", "password", password);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, " HTTP/1.0\015\012");
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "Authorization: Basic %s\015\012", auth);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "User-Agent: %s-%s %s [%s] (%s)\015\012",
++ "ez-update", VERSION, OS, (options & OPT_DAEMON) ? "daemon" : "", "by Angus Mackay");
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "Host: %s\015\012", server);
++ output(buf);
++ snprintf(buf, BUFFER_SIZE, "\015\012");
++ output(buf);
++
++ bp = buf;
++ bytes = 0;
++ btot = 0;
++ while((bytes=read_input(bp, BUFFER_SIZE-btot)) > 0)
++ {
++ bp += bytes;
++ btot += bytes;
++ dprintf((stderr, "btot: %d\n", btot));
++ }
++ close(client_sockfd);
++ buf[btot] = '\0';
++
++ dprintf((stderr, "server output: %s\n", buf));
++
++ if(sscanf(buf, " HTTP/1.%*c %3d", &ret) != 1)
++ {
++ ret = -1;
++ }
++
++ switch(ret)
++ {
++ case -1:
++ if(!(options & OPT_QUIET))
++ {
++ show_message("strange server response, are you connecting to the right server?\n");
++ }
++ return(UPDATERES_ERROR);
++ break;
++
++ case 200:
++
++ if(strstr(buf, "0=Success") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Request successful\n");
++ }
++ }
++ else if(strstr(buf, "1=IP is the same as the IP on the system") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Request successful but the IP is the same as previous update\n");
++ }
++ }
++ else if(strstr(buf, "2=Invalid passwords") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Invalid Password\n");
++ }
++ }
++ else if(strstr(buf, "3=User not found") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Username not found\n");
++ }
++ }
++ else if(strstr(buf, "4=Update too often") != NULL)
++ {
++ if(!(options & OPT_QUIET))
++ {
++ printf("Updatting too often\n");
++ }
++ }
++ else
++ {
++ show_message("Errors return from server\n");
++ if(!(options & OPT_QUIET))
++ {
++ fprintf(stderr, "server output: %s\n", buf);
++ }
++ return(UPDATERES_ERROR);
++ }
++ break;
++
++ case 401:
++ if(!(options & OPT_QUIET))
++ {
++ show_message("authentication failure\n");
++ }
++ return(UPDATERES_SHUTDOWN);
++ break;
++
++ default:
++ if(!(options & OPT_QUIET))
++ {
++ // reuse the auth buffer
++ *auth = '\0';
++ sscanf(buf, " HTTP/1.%*c %*3d %255[^\r\n]", auth);
++ show_message("unknown return code: %d\n", ret);
++ show_message("server response: %s\n", auth);
++ }
++ return(UPDATERES_ERROR);
++ break;
+ }
+
+ return(UPDATERES_OK);
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff
new file mode 100644
index 000000000000..ec41647e066f
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff
@@ -0,0 +1,41 @@
+diff --git a/ez-ipupdate.c b/ez-ipupdate.c
+index ff093a9..eea7624 100644
+--- a/ez-ipupdate.c
++++ b/ez-ipupdate.c
+@@ -849,6 +849,27 @@ int is_dotted_quad(char *addr)
+ return(1);
+ }
+
++int is_ip_addr(char *addr)
++{
++#if HAVE_ARPA_INET_H
++ char dst[16];
++
++ if(inet_pton(AF_INET,addr,dst) == 1)
++ {
++ return(1);
++ }
++
++ if(inet_pton(AF_INET6,addr,dst) == 1)
++ {
++ return(1);
++ }
++
++ return(0);
++#else
++ return is_dotted_quad(addr);
++#endif
++}
++
+ void parse_service(char *str)
+ {
+ int i;
+@@ -1859,7 +1880,7 @@ int DYNDNS_check_info(void)
+ chomp(host);
+ }
+
+- if(address != NULL && !is_dotted_quad(address))
++ if(address != NULL && !is_ip_addr(address))
+ {
+ fprintf(stderr, "the IP address \"%s\" is invalid\n", address);
+ return(-1);
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-linux.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-linux.diff
new file mode 100644
index 000000000000..8a282bb58c34
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-linux.diff
@@ -0,0 +1,213 @@
+diff -Naur ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c ez-ipupdate-3.0.11b8/ez-ipupdate.c
+--- ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c 2011-01-23 19:35:10.885111914 +0100
++++ ez-ipupdate-3.0.11b8/ez-ipupdate.c 2011-01-23 19:35:10.979110667 +0100
+@@ -172,6 +172,17 @@
+ # ifdef HAVE_SYS_SOCKIO_H
+ # include <sys/sockio.h>
+ # endif
++# ifdef __linux__
++/*# include <linux/if.h> */
++# include <linux/netlink.h>
++# include <linux/rtnetlink.h>
++/* Under Linux, we reopen socket in get_if_addr() every time */
++# define socketopen(sock)
++# define socketclose(sock)
++# else
++# define socketopen(sock) sock = socket(AF_INET, SOCK_STREAM, 0)
++# define socketclose(sock) close(sock)
++# endif
+ #endif
+
+ #include <dprintf.h>
+@@ -1605,6 +1616,114 @@
+ int get_if_addr(int sock, char *name, struct sockaddr_in *sin)
+ {
+ #ifdef IF_LOOKUP
++#ifdef __linux__
++ struct {
++ struct nlmsghdr nlmsg_info;
++ struct ifaddrmsg ifaddrmsg_info;
++ char buffer[2048];
++ } req;
++ struct nlmsghdr *curr;
++ int len;
++ char buf[8192];
++
++ /* open a socket and bind it.
++ Under non-linux, the socket can be kept open, but it seems under
++ linux we cannot use the same socket for several requests reliable
++ [although sometimes it works...] */
++ static struct sockaddr_nl local;
++ sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
++ if(sock < 0) {
++ perror("socket");
++ return -1;
++ }
++ local.nl_family = AF_NETLINK;
++ local.nl_pad = 0;
++ local.nl_pid = getpid();
++ local.nl_groups = 0;
++ if(bind(sock, (struct sockaddr*) &local, sizeof(local)) < 0) {
++ perror("bind");
++ close(sock);
++ return -1;
++ }
++
++ memset(&req, 0, sizeof(req));
++ req.nlmsg_info.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg));
++ req.nlmsg_info.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP;
++ req.nlmsg_info.nlmsg_type = RTM_GETADDR;
++ req.nlmsg_info.nlmsg_pid = getpid();
++ req.ifaddrmsg_info.ifa_family = AF_INET;
++ if(send(sock, &req, req.nlmsg_info.nlmsg_len, 0) < 0) {
++ perror("sendmsg(sock)");
++ close(sock);
++ return -1;
++ }
++
++ len = recv(sock, buf, sizeof(buf), 0);
++ close(sock);
++ if(len < 0) {
++ perror("recv");
++ return -1;
++ } else if(len == 0) {
++ dprintf((stderr, "No interfaces found"));
++ return -1;
++ }
++
++ /* Initialize sin except for address */
++ bzero(sin, sizeof(struct sockaddr_in));
++ sin->sin_family = AF_INET;
++
++ /* We take the last non-private IP with matching name */
++ int found = 0;
++ curr = (struct nlmsghdr *) buf;
++ for(; NLMSG_OK(curr, len); curr = NLMSG_NEXT(curr, len)) {
++ struct ifaddrmsg *curraddr = (struct ifaddrmsg *) NLMSG_DATA(curr);
++ struct rtattr *datalist = (struct rtattr *) IFA_RTA(curraddr);
++ int datalen = IFA_PAYLOAD(curr);
++ int mystat = 0;
++ struct in_addr sin_addr;
++ in_addr_t addr;
++ for(; RTA_OK(datalist, datalen); datalist = RTA_NEXT(datalist, datalen)) {
++ switch(datalist->rta_type) {
++ case IFA_LABEL:
++ if(strcmp((char *)RTA_DATA(datalist), name) != 0)
++ mystat = -1;
++ break;
++ case IFA_LOCAL:
++ addr = ((struct in_addr *)RTA_DATA(datalist))->s_addr;
++ /* addr: 192.168.0.0/16 || 172.16.0.0/12 || 10.0.0.0/8 */
++ if(((addr & 0xFFFF) == 0xA8C0)
++ || ((addr & 0xF0FF) == 0x10AC)
++ || ((addr & 0xFF) == 0x0A)) {
++ mystat = -1;
++ }
++ else {
++ /* We must not store yet sin->sin_addr, since name might not match */
++ sin_addr = *((struct in_addr *)RTA_DATA(datalist));
++ mystat = 1;
++ }
++ break;
++ default:
++ break;
++ }
++ if(mystat < 0)
++ break;
++ }
++ if(mystat > 0) {
++ sin->sin_addr = sin_addr;
++ found = 1;
++ /* If you want to take the first non-private IP with matching name
++ uncomment the next break command:
++ break; */
++ }
++ }
++ if(found) {
++ dprintf((stderr, "%s: %s\n", name, inet_ntoa(sin->sin_addr)));
++ return 0;
++ }
++ dprintf((stderr, "%s: %s\n", name, "has no non-private address"));
++ return -1;
++#else
++/* ifndef __linux__ */
+ struct ifreq ifr;
+
+ memset(&ifr, 0, sizeof(ifr));
+@@ -1638,7 +1757,10 @@
+ return -1;
+ }
+ return -1;
++#endif
++/* endif __linux__ */
+ #else
++/* ifndef IF_LOOKUP */
+ return -1;
+ #endif
+ }
+@@ -4490,7 +4612,7 @@
+ #ifdef IF_LOOKUP
+ if(options & OPT_DAEMON)
+ {
+- sock = socket(AF_INET, SOCK_STREAM, 0);
++ socketopen(sock);
+ }
+ #endif
+
+@@ -4745,12 +4867,12 @@
+ struct sockaddr_in sin;
+ int sock;
+
+- sock = socket(AF_INET, SOCK_STREAM, 0);
++ socketopen(sock);
+ if(get_if_addr(sock, interface, &sin) != 0)
+ {
+ exit(1);
+ }
+- close(sock);
++ socketclose(sock);
+ snprintf(ipbuf, sizeof(ipbuf), "%s", inet_ntoa(sin.sin_addr));
+ #else
+ fprintf(stderr, "interface lookup not enabled at compile time\n");
+@@ -4791,7 +4913,7 @@
+ struct sockaddr_in sin;
+ int sock;
+
+- sock = socket(AF_INET, SOCK_STREAM, 0);
++ socketopen(sock);
+ if(get_if_addr(sock, interface, &sin) == 0)
+ {
+ if(address) { free(address); }
+@@ -4802,7 +4924,7 @@
+ show_message("could not resolve ip address for %s.\n", interface);
+ exit(1);
+ }
+- close(sock);
++ socketclose(sock);
+ }
+
+ for(i=0; i<ntrys; i++)
+@@ -4846,12 +4968,12 @@
+ struct sockaddr_in sin;
+ int sock;
+
+- sock = socket(AF_INET, SOCK_STREAM, 0);
++ socketopen(sock);
+ if(get_if_addr(sock, interface, &sin) != 0)
+ {
+ exit(1);
+ }
+- close(sock);
++ socketclose(sock);
+ snprintf(ipbuf, sizeof(ipbuf), "%s", inet_ntoa(sin.sin_addr));
+ #else
+ fprintf(stderr, "interface lookup not enabled at compile time\n");
+@@ -4878,7 +5000,7 @@
+ }
+
+ #ifdef IF_LOOKUP
+- if(sock > 0) { close(sock); }
++ if(sock > 0) { socketclose(sock); }
+ #endif
+
+ if(address) { free(address); }
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate.initd b/net-dns/ez-ipupdate/files/ez-ipupdate.initd
new file mode 100644
index 000000000000..2f531e764059
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate.initd
@@ -0,0 +1,93 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="update"
+
+depend() {
+ need net
+ after rp-pppoe
+}
+
+getconfig() { # 0: no daemon / 1: daemon
+ local CONF NAME LIST=""
+ for CONF in /etc/ez-ipupdate/*.conf; do
+ if [ -f "${CONF}" ]; then
+ # Don't run configurations that are (not) daemons
+ grep -q '^[[:space:]]*daemon' "${CONF}"; [ $? -eq $1 ] && continue
+ # Don't run configurations that run in the foreground
+ grep -q '^[[:space:]]*foreground' "${CONF}" && continue
+ # add config to list
+ NAME="${CONF##*/}"
+ LIST="${LIST} ${NAME%.*}"
+ fi
+ done
+ echo ${LIST}
+}
+
+start() {
+ local NAME LIST=$(getconfig 1)
+
+ if [ -z "${LIST}" ]; then
+ eerror "You need at least one config file in /etc/ez-ipupdate"
+ eerror "containing the 'daemon' keyword and no 'foreground' keyword."
+ return 1
+ fi
+
+ for dir in /var/run/ez-ipupdate /var/cache/ez-ipupdate; do
+ checkpath -q -d -m 0750 -o ez-ipupd:ez-ipupd ${dir}
+ done
+
+ for NAME in ${LIST}; do
+ local CONFIG="/etc/ez-ipupdate/${NAME}.conf"
+ local PIDFILE="/var/run/ez-ipupdate/${NAME}.pid"
+ local CACHEFILE="/var/cache/ez-ipupdate/${NAME}.cache"
+ ebegin "Starting ez-ipupdate (${NAME})"
+ start-stop-daemon -p "${PIDFILE}" --start --quiet --exec /usr/sbin/ez-ipupdate \
+ --user ez-ipupd:ez-ipupd -- -c "${CONFIG}" -F "${PIDFILE}" -b "${CACHEFILE}"
+ eend $?
+ done
+ return 0 # do not fail
+}
+
+stop() {
+ local PIDFILE NAME
+ for PIDFILE in /var/run/ez-ipupdate/*.pid; do
+ if [ -f "${PIDFILE}" ]; then
+ NAME="${PIDFILE##*/}"
+ ebegin "Stopping ez-ipupdate (${NAME%.*})"
+ start-stop-daemon --stop --signal QUIT --quiet --pidfile "${PIDFILE}"
+ eend $? || rm -f "${PIDFILE}"
+ else
+ eerror "No running ez-ipupdate process"
+ fi
+ done
+ return 0 # do not fail
+}
+
+update() {
+ local NAME TEXT LIST=$(getconfig 0)
+
+ if [ -z "${LIST}" ]; then
+ eerror "You need at least one config file in /etc/ez-ipupdate"
+ eerror "containing no 'daemon' and 'foreground' keyword."
+ return 1
+ fi
+
+ for NAME in ${LIST}; do
+ local CONFIG="/etc/ez-ipupdate/${NAME}.conf"
+ local CACHEFILE="/var/cache/ez-ipupdate/${NAME}.cache"
+ ebegin "Running ez-ipupdate (${NAME})"
+ TEXT=$(/usr/sbin/ez-ipupdate -q -R ez-ipupd -c "${CONFIG}" -b "${CACHEFILE}" 2>&1)
+ if eend $?; then
+ if [ -n "${TEXT}" ]; then
+ echo "${TEXT}" | while read line; do einfo " $line"; done
+ fi
+ else
+ if [ -n "${TEXT}" ]; then
+ echo "${TEXT}" | while read line; do eerror " $line"; done
+ fi
+ fi
+ done
+ return 0 # do not fail
+}
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate.service b/net-dns/ez-ipupdate/files/ez-ipupdate.service
new file mode 100644
index 000000000000..2f3d79b13dcd
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=ez-ipupdate: Check and update your IP to dynamic DNS Server
+Requires=network-online.target
+After=network-online.target
+
+[Service]
+ExecStart=/usr/sbin/ez-ipupdate -f -R ez-ipupd -c /etc/ez-ipupdate/defaults.conf -b /var/cache/ez-ipupdate/defaults.cache
+ExecReload=/bin/kill -HUP $MAINPID
+KillSignal=SIGQUIT
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/ez-ipupdate/metadata.xml b/net-dns/ez-ipupdate/metadata.xml
new file mode 100644
index 000000000000..982eb1127e65
--- /dev/null
+++ b/net-dns/ez-ipupdate/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ Ez-ipupdate is a client for the dynamic IP service offered by
+ http://www.ez-ip.net. It has several options and is quite complete.
+ It is written in pure C and supports a daemon mode.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-dns/fpdns/Manifest b/net-dns/fpdns/Manifest
new file mode 100644
index 000000000000..be88db5aaa6a
--- /dev/null
+++ b/net-dns/fpdns/Manifest
@@ -0,0 +1,6 @@
+AUX fpdns-0.10.0_pre20130404.ro-header.patch 1115 SHA256 cc6da9391be7049a05337f43974671101b749270da76a91170d46389ff95cb70 SHA512 e345037a210103f5202c0dd052952bd2d3889ad53393fc4881ec48810f3e6d39b1b7d2220d259ffda0b85e339bcc4ef9f1ae28023cf84b81a00685c66e116923 WHIRLPOOL ad6e5d7c2d72e8ac890d0d333a8d8b293c92b6ce7a1f567ecde06d822bcac49f7cbf30c8eb02f50c5a1eb08c53fe777582f4f50cb809828a6a29034075a12be6
+DIST fpdns-0.10.0_pre20130404.tar.gz 931723 SHA256 fe81de9c5d2d077cd974c9fd862f52a02cc1bb29c58944ea968a21853cc8ea15 SHA512 1a4d9c1cb666efa3f48dcca2b5cd04793e92727359652095572b17479f5343479c57d2937f1fff8070c071a2698eda5c4dff981caf86436f184f0b076b0fa0b3 WHIRLPOOL 09b0588fdba51313787b17e1093a91d948aff1a203880943b3e16cf3c8c2a9296b679f13de24862b75d9f8e3c17b0598b12066932f3c07c2c47d793b84b30827
+EBUILD fpdns-0.10.0_pre20130404-r1.ebuild 685 SHA256 74e82fe11c2608643310e49d95739e03936db5ab1e97600dcce58ae8f759c06a SHA512 828d120d8edbe0dcb76249fbf94f5fe73503e23cb4d9f1cddc7d40798479a81c61ac9bc97671c5dd5e67e1f5f1edd8ce7dd5c9606270400d1c22d840c8bb7403 WHIRLPOOL 8e4f47a1e19c82318de1d0dffd25f2ee7eb0328570dd9ea15d089d340d80575eaa7452d28850540456f7cc9d15b6c501167fcf8a834d01c232becb965f49791b
+MISC ChangeLog 2598 SHA256 3469fee21e9aff0abd798d3b34e686922aed1e7eedad7fdcc51ad97c631159ab SHA512 554894f7ccf5b0092f6155600c1d582603783acb43e56397ddc76ce435617eccb3ced9965290e33d9ad81da147a47cfe6f1a8508de02d91a108035c13f374be9 WHIRLPOOL 4ca98f4dbec4c488f187ccede3414d8a77cd3aee3c89fc22084881cb6be3913505600860131994f1318f7819c7ae5ab157ff775348b3075472f3ce8dec2f4c94
+MISC ChangeLog-2015 1268 SHA256 d10585ef0fa8c31e32e93aa52fc10bca0b54fb926a9ae4a4664ac40038f99621 SHA512 ed648eb409a08ec3ed1aea126d7bf8da792c09e38c7b8ff1bff6f204b10b9476ab8465d94d707c914533e44346a09693085b4c9039d0865883294c12d5b1141a WHIRLPOOL a8ef16e90135eed76480ccd430d630fc53efa8217f35855fe1a3f912a4b5925c47e169ed51de702357ef784155bc16cf43e4968e6776e4b999153c1c8342a5c9
+MISC metadata.xml 1420 SHA256 f0dcc79789303ad82ffe87e67b1f642c07d21ccefee56809b6d5a99116c8c289 SHA512 21fc1c5f7ebfa5b377d3ae3116bfe017319db65e72002305f616b963ddfbc4f879da66fd7798988fd8cfdc38d805038d149f2b416edb2c496f876cb935fac72b WHIRLPOOL 3efd1cd1eb651b55b39f9091c936c754881402d87ad041bf57a45e9fcb755125ea9a346fa6257bb6cbd8f916e7fe8669de4be5fab4cf6faafc83ae384a90b4ea
diff --git a/net-dns/fpdns/files/fpdns-0.10.0_pre20130404.ro-header.patch b/net-dns/fpdns/files/fpdns-0.10.0_pre20130404.ro-header.patch
new file mode 100644
index 000000000000..17eadbe4a139
--- /dev/null
+++ b/net-dns/fpdns/files/fpdns-0.10.0_pre20130404.ro-header.patch
@@ -0,0 +1,33 @@
+From ca0391377ad7150e61ff300cb5195c97a154233b Mon Sep 17 00:00:00 2001
+From: Jakob Schlyter <jakob@kirei.se>
+Date: Wed, 28 Aug 2013 10:24:11 +0200
+Subject: [PATCH] do not set header counters unless changed
+
+---
+ lib/Net/DNS/Fingerprint.pm | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/lib/Net/DNS/Fingerprint.pm b/lib/Net/DNS/Fingerprint.pm
+index d4a2e5a..e096d42 100644
+--- a/lib/Net/DNS/Fingerprint.pm
++++ b/lib/Net/DNS/Fingerprint.pm
+@@ -2171,10 +2171,12 @@ sub fp2header {
+ $header->ad(shift @list);
+ $header->cd(shift @list);
+ $header->rcode(shift @list);
+- $header->qdcount(shift @list);
+- $header->ancount(shift @list);
+- $header->nscount(shift @list);
+- $header->arcount(shift @list);
++
++ my ($qdcount, $ancount, $nscount, $arcount) = @list;
++ $header->qdcount($qdcount) unless $qdcount == $header->qdcount;
++ $header->qdcount($ancount) unless $ancount == $header->ancount;
++ $header->qdcount($nscount) unless $nscount == $header->nscount;
++ $header->qdcount($arcount) unless $arcount == $header->arcount;
+ }
+
+ sub probe {
+--
+1.9.1
+
diff --git a/net-dns/fpdns/fpdns-0.10.0_pre20130404-r1.ebuild b/net-dns/fpdns/fpdns-0.10.0_pre20130404-r1.ebuild
new file mode 100644
index 000000000000..a61983bc150c
--- /dev/null
+++ b/net-dns/fpdns/fpdns-0.10.0_pre20130404-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils perl-module
+
+DESCRIPTION="Fingerprinting DNS servers"
+HOMEPAGE="https://github.com/kirei/fpdns/"
+
+MY_P="${PN}-${PV##*_pre}"
+SRC_URI="https://github.com/kirei/fpdns/archive/20130404.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=dev-perl/Net-DNS-0.74"
+
+S="${WORKDIR}"/"${MY_P}"
+
+src_prepare() {
+ ## fixes https://github.com/kirei/fpdns/issues/6
+ epatch "${FILESDIR}/${P}.ro-header.patch"
+}
+
+src_install() {
+ newbin apps/fpdns fpdns
+ insinto "${VENDOR_LIB}"/Net/DNS/
+ doins lib/Net/DNS/Fingerprint.pm
+}
diff --git a/net-dns/fpdns/metadata.xml b/net-dns/fpdns/metadata.xml
new file mode 100644
index 000000000000..a3876cb8a627
--- /dev/null
+++ b/net-dns/fpdns/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription>
+A nameserver basically responds to a query. Interoperability is an obvious
+requirement here. The standard protocol behaviour of different DNS
+implementations is expected to be the same.
+
+Requirements for protocol behaviour of DNS implementations is widely documented
+in the case of 'common' dns messages. The DNS protocol is over 20 years old and
+since its inception, there have been over 40 independent DNS implementations,
+while some implementations have over 20 versions.
+
+The methodology used to identify individual nameserver implementations is based
+on "borderline" protocol behaviour. The DNS protocol offers a multitude of
+message bits, response types, opcodes, classes, query types and label types in a
+fashion that makes some mutually exclusive while some are not used in a query
+messages at all. Not every implementation offers the full set of features the
+DNS protocol set currently has. Some implementations offer features outside the
+protocol set, and there are implementations that do not conform to standards.
+
+Also, new features added to - or bugs removed allow for differentiations between
+versions of an implementation.
+</longdescription>
+ <upstream>
+ <remote-id type="github">kirei/fpdns</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/hash-slinger/Manifest b/net-dns/hash-slinger/Manifest
new file mode 100644
index 000000000000..693245990b72
--- /dev/null
+++ b/net-dns/hash-slinger/Manifest
@@ -0,0 +1,7 @@
+DIST hash-slinger-2.6.tar.gz 34864 SHA256 121143efea136958ad6a42cb0a8fa80d95b1e4fc45632019d8f07a534d6efab2 SHA512 1e5d67ed2ef8eae910927fbd7419928d87ba31a91ca43a1c163b05f725da96a50d30e1539c4c55a68a22f0e2c9a2f7c7101fbdcfb5fc903e87fe4c22e20f33af WHIRLPOOL 7ff36bad9db31e6d8769a525fc60691cb6af3bd6970b9bbf55d56f7e3c08a6a97a35fd1363dbed012239432b7dfd2594d616dc4d0a80ae47c82b724e17183f41
+DIST hash-slinger-2.7.tar.gz 37684 SHA256 cd888eaee222bbe994d60aab7bc638b6c3417f43b68d0e6a8f1802104f6d7b8d SHA512 b1b3e46c4cdd8b983b55156c9bcc58afc973c2503cde48283e98306e381753547f425bfaee68707ae10b2e31b71d01485b34e4a9841c9ce2048f9551f23d0976 WHIRLPOOL 91e232827c63a1c2ab92e691ce71c4d301b1dc34d410e583b53e58e83a1f77a712cd76627c15f812849b06689258b60305792adcbb779d544bd4f574010f9190
+EBUILD hash-slinger-2.6-r1.ebuild 1080 SHA256 786739f3d799ae19b9ae014277e95a8ac52fc174fb3d0f4b74305465f461778e SHA512 4fd96cd8da7677d285b85d97d10fb405a20e1c9a964c0db2cd6a59ae258c5f3a6b8235b5548983890912bd6f9cffe1686e09051e8e1f61d0692bdc7721d1212f WHIRLPOOL 1c33ec50bb6640fb383822fc3418fcd4ec079cd55f588d86126935e76ebf5b897c6560fce34ca0a9ee9c9d1dad4d1c019cb37870859773c281b29df9173c2f7f
+EBUILD hash-slinger-2.7.ebuild 1080 SHA256 786739f3d799ae19b9ae014277e95a8ac52fc174fb3d0f4b74305465f461778e SHA512 4fd96cd8da7677d285b85d97d10fb405a20e1c9a964c0db2cd6a59ae258c5f3a6b8235b5548983890912bd6f9cffe1686e09051e8e1f61d0692bdc7721d1212f WHIRLPOOL 1c33ec50bb6640fb383822fc3418fcd4ec079cd55f588d86126935e76ebf5b897c6560fce34ca0a9ee9c9d1dad4d1c019cb37870859773c281b29df9173c2f7f
+MISC ChangeLog 2998 SHA256 0a1225e0849c0a9f1369e4b7e55623b8afe0cf10f5e521c7141a02ea35b5e813 SHA512 beaf3d1ccc00bfb41924fbf498914aac23d424c5f6b357617cc6b873b2db9e6568365a3c17209bf7c47424ff1dcfd827ed3a0598ba4440b2c8ffc5c73e01a951 WHIRLPOOL a8a199a794188aee612dae5df52cc6acf37f1f3b9be714778adda0e9ddd5e427b9149d5d4b97eb5cd0fa7b699266ae419ad54c88e80ac5c17781edcc9470ec67
+MISC ChangeLog-2015 377 SHA256 81b2514a6535659e92e30dc44f4c4a08e9386c4013a17b99b4ebd2df29a32305 SHA512 ebfb9b69029c723604118d141e2be623330cc6698ffc43b98a68e7169b70aac261d06003ab07244e62eb1b41fa7b8e943dac996cd9534abef1156c7bf50b05d3 WHIRLPOOL c545a38eb3ffea7d1655199dbc906ec06d4ef5fc38bfbe77d90263d97fca7492606f418ca0d5dc8061dda5ba95dd1ee391162ec6ae518d8fea9b8d221eb2edae
+MISC metadata.xml 488 SHA256 bee62cd93de542b0ce1052ea013be001566fd4f4dfb8bcae9358362c13c666d8 SHA512 d7d812a2e7a32bd659135bddc88f74b3f882237eba39d96d67ef8a5a53656c64090bfa4535a104e0581c82f2d8e6c69357a314cf8750cb4dd1a5fb421cb3251e WHIRLPOOL 3e702c90fc00ac2775438f2d684d74584e0f8fbea9fa0ed6dfd32ab9c1e96ad23040c6d16ba8eb7f33f985887bd227e09c1b2e49282a1dc9779976e18b8f1ce9
diff --git a/net-dns/hash-slinger/hash-slinger-2.6-r1.ebuild b/net-dns/hash-slinger/hash-slinger-2.6-r1.ebuild
new file mode 100644
index 000000000000..a73f7bc1f8d9
--- /dev/null
+++ b/net-dns/hash-slinger/hash-slinger-2.6-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1
+
+DESCRIPTION="Various tools to generate special DNS records like SSHFP, TLSA, OPENPGPKEY, IPSECKEY"
+HOMEPAGE="https://people.redhat.com/pwouters/hash-slinger/"
+SRC_URI="https://people.redhat.com/pwouters/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ipsec +openpgp +ssh"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND=""
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-python/ipaddr[$PYTHON_USEDEP]
+ dev-python/m2crypto[$PYTHON_USEDEP]
+ net-dns/unbound[python,$PYTHON_USEDEP]
+ virtual/python-dnspython[$PYTHON_USEDEP]
+ ipsec? ( net-vpn/libreswan[dnssec] )
+ openpgp? ( dev-python/python-gnupg[$PYTHON_USEDEP] )
+ ssh? ( net-misc/openssh )
+"
+
+src_install() {
+ local tools
+ tools="tlsa"
+ use ssh && tools+=" sshfp"
+ use openpgp && tools+=" openpgpkey"
+ use ipsec && tools+=" ipseckey"
+ for tool in $tools ; do
+ doman ${tool}.1
+ python_foreach_impl python_doscript ${tool}
+ done
+ dodoc BUGS CHANGES README
+}
diff --git a/net-dns/hash-slinger/hash-slinger-2.7.ebuild b/net-dns/hash-slinger/hash-slinger-2.7.ebuild
new file mode 100644
index 000000000000..a73f7bc1f8d9
--- /dev/null
+++ b/net-dns/hash-slinger/hash-slinger-2.7.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1
+
+DESCRIPTION="Various tools to generate special DNS records like SSHFP, TLSA, OPENPGPKEY, IPSECKEY"
+HOMEPAGE="https://people.redhat.com/pwouters/hash-slinger/"
+SRC_URI="https://people.redhat.com/pwouters/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ipsec +openpgp +ssh"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND=""
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-python/ipaddr[$PYTHON_USEDEP]
+ dev-python/m2crypto[$PYTHON_USEDEP]
+ net-dns/unbound[python,$PYTHON_USEDEP]
+ virtual/python-dnspython[$PYTHON_USEDEP]
+ ipsec? ( net-vpn/libreswan[dnssec] )
+ openpgp? ( dev-python/python-gnupg[$PYTHON_USEDEP] )
+ ssh? ( net-misc/openssh )
+"
+
+src_install() {
+ local tools
+ tools="tlsa"
+ use ssh && tools+=" sshfp"
+ use openpgp && tools+=" openpgpkey"
+ use ipsec && tools+=" ipseckey"
+ for tool in $tools ; do
+ doman ${tool}.1
+ python_foreach_impl python_doscript ${tool}
+ done
+ dodoc BUGS CHANGES README
+}
diff --git a/net-dns/hash-slinger/metadata.xml b/net-dns/hash-slinger/metadata.xml
new file mode 100644
index 000000000000..33d872e2ba1e
--- /dev/null
+++ b/net-dns/hash-slinger/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mschiff@gentoo.org</email>
+ <name>Marc Schiffbauer</name>
+ </maintainer>
+ <use>
+ <flag name="ipsec">Enable support for IPSECKEY records (ipseckey)</flag>
+ <flag name="openpgp">Enable support for OPENPGPKEY records (openpgpkey)</flag>
+ <flag name="ssh">Enable support for SSHFP records (sshfp)</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/hesiod/Manifest b/net-dns/hesiod/Manifest
new file mode 100644
index 000000000000..591b678a11a9
--- /dev/null
+++ b/net-dns/hesiod/Manifest
@@ -0,0 +1,6 @@
+DIST hesiod-3.1.0-patches.tgz 2389 SHA256 0b3d1c6854f7ab4394e116beadacbd4d5d2925aa2d364a50d14c605e97aab055 SHA512 e2cc00aa38069f52fe9e38d34c42c8edae8e8e0a25702d3cd4b4a5a4fa96e098c7f62f13be69b8f91b92e1c5d18fc8eaedcd19d1946ce3319554d34e94f7b84c WHIRLPOOL 1686ee3825a2ea256b0b4c9dddf3f0a8d1b9db4c6fa006cedc934342d3f8e380120e12abd8eedd5b64bda2ffa86b4b7a9727ca51bee704bf2f8f54e25e4cca2f
+DIST hesiod-3.1.0.tar.gz 224294 SHA256 57b288ea736614d630677da7b6fa3f46c6b07a0ec7e798860f318e887e2602b6 SHA512 a224702378e950216633b0a54e6299bb04b473a65455eb302a3b8435e9d718ad21aa2de03d2865ca2ef96a1d6aa240b2b5c957f065755a0d1c2ad627385f3f9b WHIRLPOOL 20e884cba82bcce9666e265d83f91a36f39fa35e0e12f33e010f3112d0ee6607355623f3ec8320540172b3b296b96699a0b4f49aa4dd10692523efa8f8eab58a
+EBUILD hesiod-3.1.0.ebuild 1006 SHA256 8912ae9548daa3f0239cc3ea50071b10aa609cf95a5972051dcc3c7d5becb6ae SHA512 ce9959d7d4c976dba4da28ee3130cd3d7c8ca9beaa9c5a41d33ab71ce03478028cebfd98ea85aeb219041a88e5b6b19ebb655e20dc7ab84e3a4faa6fad90ceb8 WHIRLPOOL c182b7bb85ba2f53517ff6c492eaa870b9e2442de6a60e12bc3d6f776cb1399cfbca37f4241a54cfbd4fe4b3f8654a882cc64288913e3d3c2bbf8bb5290b1997
+MISC ChangeLog 2518 SHA256 894f5d2cc4fb7e9244ab3fd3d4d7433b85cb57040daede196c14fdf1c8fad39a SHA512 c4f5002ddf9cbb9d419e8dd2e6e34cf7d0d46678926d80e6085425edec59de0ffc057c488c13dfcf35941108afef193d2c000e5860ebb47c9d218c739da7a6c0 WHIRLPOOL 2e309ac3f9f5b8c30797f2bb56ca157b2598fdf16d907816936f2fafef6b19f3acfe26152a4885fc927e2401b3aa296223c97187f48f1eab947bf7474370b313
+MISC ChangeLog-2015 6263 SHA256 a385019afa3b2803afec581f7090b2193e3af072dc3df9ba90cbabf6c79691de SHA512 9bb96306ce0ba3908ca7212ec33a81067502481dbc79e2a6efb9b720cd75c439a5740d6b16813c108293ae8c1d2c5cb27875aef592d0c272adbe04190cfe0b1f WHIRLPOOL 795527edc7b21c39860c5401d2c735cb361fcb817e0670d6bc23cb30331523c68157e67d1daa7c259343037814c2bd5bcc41b99eb5ba445ea6f6d42bdb77aace
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-dns/hesiod/hesiod-3.1.0.ebuild b/net-dns/hesiod/hesiod-3.1.0.ebuild
new file mode 100644
index 000000000000..25f80626772c
--- /dev/null
+++ b/net-dns/hesiod/hesiod-3.1.0.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+inherit flag-o-matic eutils autotools
+
+DESCRIPTION="DNS functionality to access to DB of information that changes infrequently"
+HOMEPAGE="ftp://athena-dist.mit.edu/pub/ATHENA/hesiod"
+SRC_URI="ftp://athena-dist.mit.edu/pub/ATHENA/${PN}/${P}.tar.gz
+ mirror://gentoo/${P}-patches.tgz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE=""
+
+src_prepare() {
+ # Bug #26332
+ filter-flags -fstack-protector
+
+ # Patches stolen from Fedora hesiod-3.1.0-19.fc14.src.rpm
+ rm -f aclocal.m4 || die "rm failed"
+ EPATCH_SOURCE="${WORKDIR}/files/${PV}" EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+ dodoc NEWS README || die
+}
+
+pkg_postinst() {
+ elog "hesinfo tools are no longer part of hesiod. Use net-dns/hesinfo
+ instead"
+}
diff --git a/net-dns/hesiod/metadata.xml b/net-dns/hesiod/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-dns/hesiod/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-dns/https_dns_proxy/Manifest b/net-dns/https_dns_proxy/Manifest
new file mode 100644
index 000000000000..e65802e641df
--- /dev/null
+++ b/net-dns/https_dns_proxy/Manifest
@@ -0,0 +1,2 @@
+EBUILD https_dns_proxy-9999.ebuild 552 SHA256 ef1716adeeb20e942f2ffb688eecd842eeab44a7bf357b288f240e73f8c19089 SHA512 675c06e8c2fdd4bcedf7cb5cc3878ce7755a78487575d00007fb549f90f5688adf99b10adf01ffadaa192cd960e4d275887fcad4f9b32e44bffcb9989d51268b WHIRLPOOL fb04269d0c642bad779212106e9114f700adb88551eeb5660f0d9fbc547084c2add6927cb7b76f78271bc38b79b3ddd1dfd73f98c15236259fdf264b80ff33e9
+MISC metadata.xml 337 SHA256 573ac7544bd6383db8622cca6cf745541f882e3c15e0d08a9088c0c4eedb87a3 SHA512 ae079152dd3fef075e6880d70295773e03758f7c1b709efd0640672631968706d5c366b4ccde498806491069861d6bc5344b0d3a2c9b7b5f0dacebe19ff4b444 WHIRLPOOL 05fd492516df79f445e34936098814530162572faed49f37d8a23b79d876c79f10c83970597d2fce95aa777b723ca2d4655e5e7999df56379a87cd2800a88945
diff --git a/net-dns/https_dns_proxy/https_dns_proxy-9999.ebuild b/net-dns/https_dns_proxy/https_dns_proxy-9999.ebuild
new file mode 100644
index 000000000000..f409ce890da1
--- /dev/null
+++ b/net-dns/https_dns_proxy/https_dns_proxy-9999.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit git-r3 cmake-utils
+
+DESCRIPTION="A lightweight DNS-over-HTTPS proxy."
+HOMEPAGE="https://github.com/aarond10/https_dns_proxy"
+EGIT_REPO_URI="https://github.com/aarond10/${PN}.git"
+SRC_URI=""
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND="dev-libs/libev
+ net-dns/c-ares
+ >=net-misc/curl-7.53.0[http2,ssl]
+ "
+RDEPEND="${DEPEND}"
+
+src_install(){
+ cmake-utils_src_install
+ exeinto /usr/bin
+ doexe "${S}_build/https_dns_proxy"
+}
diff --git a/net-dns/https_dns_proxy/metadata.xml b/net-dns/https_dns_proxy/metadata.xml
new file mode 100644
index 000000000000..3f5fcedb56b1
--- /dev/null
+++ b/net-dns/https_dns_proxy/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ryao@gentoo.org</email>
+ <name>Richard Yao</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">wrouesnel/dns-over-https-proxy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/idnkit/Manifest b/net-dns/idnkit/Manifest
new file mode 100644
index 000000000000..21247cbd8ceb
--- /dev/null
+++ b/net-dns/idnkit/Manifest
@@ -0,0 +1,6 @@
+AUX idnkit-1.0-autotools.patch 1843 SHA256 50ac6a9a3a7f3e78fed6035b4625bf1e8c947e4af282762d553db994ab4d4e2e SHA512 1c405d1b72d678394284936d9130450b366f7a53bdf586fb6d4331b72c2d6672a19f2322a7f284067259ed0c0dd973865d9b117ae6c15cc8a1d41c734ef0a4ce WHIRLPOOL 50c29a7e9a7dad876a121600bc30ca29da61f8425170f167e1a00f40d6d060f718d17827a449c56db97213b21e05fd66a2504df17217f5537bef6f657a8168d9
+DIST idnkit-1.0-src.tar.gz 432823 SHA256 16cd5fce81a5180d6a2c61cf20572668b3dc59f5c39c272b75fa98edab3391fc SHA512 74f2db007a1991610f62a7a060d534f724f08395a16a7d76fda0824e9017aa47ffe4e251c90d0481218b70534fcd2b32724a66223042f59c1e16c1ff39f3be19 WHIRLPOOL 739206c47acacb32a7858f10665bdf7259b747291769da917a68f92dd200fbd31340eb2af22e281bd55c1b976e1cf264faa7d2110a9ee6b5a3a0ead6d1947dad
+EBUILD idnkit-1.0-r2.ebuild 1000 SHA256 c63b92bea40380a2784f0247da1c34155da919c88a9a598b0d418f1d38f593fa SHA512 36b1fde9ab9b026e168cb5cc1a012404b9c0e408b8fd20073620fd14dc8fa234da14bd8526eff847ca86c2029b576312cf5f23a4f16c36bf1a0cb2e7834b49fe WHIRLPOOL 479edb940c77484771ae906bfdad530de857ddf0d1bd729ce695edcbf57a8e37e7ddf9dee7d6e3ab36fe2cfa40c54587fbf6911da576f8897a5f4d64f4650be7
+MISC ChangeLog 2209 SHA256 3f17b4ad48a8a4733afe3ef43b087f8aaed2eb877a5464d0e291338da967b271 SHA512 967ba4bed5dfedae892418ee5068adf878541281f72b5ed4b15c02358a52b8670c0bcc8487f1dc206a2eaebf4436211a0318dc801ddd9e626080245f77204cbd WHIRLPOOL 503eec67afdf67415d33e24810eb110fb140cdfc43793c0168ef2b5e466f8b0e72ebd611b58dd01afcdba840efcd41ec4f3462c4bdf6d70bd4e2bda4e24b1b55
+MISC ChangeLog-2015 4582 SHA256 02ba887bdb9ca3525d8ba2453c662d3e568d7e37e2691e6c50a6464d76ef74f0 SHA512 56c1e61771903bd8677e12cec7b0a4c18658417aaff99dfcb846050afe605a42a6dcb335967fde6b2f5bfd7bd3d8f881454f401fd7fe7c4673c93f20a5bdadf5 WHIRLPOOL ee3f4810e7b3e9b6d8bf57717a6073a551ccb7c263a0867b15a3320f52947c8f23f02dd710f34562ef3d701c6fcb0cbfc1bdf69cf6b79e1cdbb426d34d646029
+MISC metadata.xml 244 SHA256 a65bfec176330796e1eeb3bb589b78ff60a123b947537decd4705ea71ca4e906 SHA512 1da71f4fae0251c97a8fcfa1e13b0a3f8b95a856fa919ebd30bf4f2f1b8fa900841db09ebc2a0ae9fe0d91f786ac40b63290382668412fcb05bca15b0746f1db WHIRLPOOL 1164de6a99d8931ca3ae60cbb397be80b802eb473943ef777dbe8473d8d665a5f93d8b99175709bf09d8af856b3ea7aaf7c95a87aad37e48b85c06e618431a1f
diff --git a/net-dns/idnkit/files/idnkit-1.0-autotools.patch b/net-dns/idnkit/files/idnkit-1.0-autotools.patch
new file mode 100644
index 000000000000..d0918bc9184a
--- /dev/null
+++ b/net-dns/idnkit/files/idnkit-1.0-autotools.patch
@@ -0,0 +1,64 @@
+--- a/configure.in 2003-03-11 00:53:20.000000000 +0100
++++ b/configure.in 2010-03-12 14:15:24.000000000 +0100
+@@ -629,6 +629,41 @@
+ fi
+ fi
+
++AC_DEFUN(AC_FIND_SYSTEM_SHOBJ,[
++AC_MSG_CHECKING(for $1 shared object)
++shobj_name=$1
++shobj_path=
++case "$host" in
++*-hpux*)
++ SOEXT=sl
++ ;;
++*)
++ SOEXT=so
++ ;;
++esac
++for shobj_libdir in /lib /usr/lib; do
++ if test -f $shobj_libdir/$shobj_name.$SOEXT; then
++ shobj_path=$shobj_libdir/$shobj_name.$SOEXT
++ else
++ shobj_path=`ls -r $shobj_libdir/$shobj_name.$SOEXT* 2>/dev/null | head -1`
++ if test "$shobj_path" != "" -a -f "$shobj_path"; then
++ :
++ else
++ shobj_path=
++ fi
++ fi
++ if test "$shobj_path" != ""; then
++ AC_MSG_RESULT($shobj_path)
++ shobj_pathsymbol=SOPATH_`echo $shobj_name | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
++ AC_DEFINE_UNQUOTED($shobj_pathsymbol, "$shobj_path")
++ break
++ fi
++done
++if test "$shobj_path" = ""; then
++ AC_MSG_RESULT(no)
++fi
++])dnl
++
+ dnl Find system shared object paths.
+ AC_FIND_SYSTEM_SHOBJ(libc)
+ if test "$install_runidn" = yes ; then
+--- a/lib/Makefile.in 2003-03-12 17:14:41.000000000 +0100
++++ b/lib/Makefile.in 2010-03-12 15:54:35.000000000 +0100
+@@ -241,7 +241,7 @@
+
+ install-common:
+ $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
+- $(LIBTOOL) $(INSTALL_DATA) $(LITELIB).la \
++ $(LIBTOOL) --mode=install $(INSTALL_DATA) $(LITELIB).la \
+ $(DESTDIR)$(libdir)/$(LITELIB).la
+ -[ -f $(DESTDIR)$(libdir)/$(LITELIB).a ] \
+ && $(RANLIB) $(DESTDIR)$(libdir)/$(LITELIB).a
+@@ -262,7 +262,7 @@
+
+ install-nolite:
+ $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
+- $(LIBTOOL) $(INSTALL_DATA) $(LIB).la \
++ $(LIBTOOL) --mode=install $(INSTALL_DATA) $(LIB).la \
+ $(DESTDIR)$(libdir)/$(LIB).la
+ -[ -f $(DESTDIR)$(libdir)/$(LIB).a ] \
+ && $(RANLIB) $(DESTDIR)$(libdir)/$(LIB).a
diff --git a/net-dns/idnkit/idnkit-1.0-r2.ebuild b/net-dns/idnkit/idnkit-1.0-r2.ebuild
new file mode 100644
index 000000000000..b6ea6ce3499f
--- /dev/null
+++ b/net-dns/idnkit/idnkit-1.0-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit autotools eutils
+
+DESCRIPTION="Toolkit for Internationalized Domain Names (IDN)"
+HOMEPAGE="http://www.nic.ad.jp/ja/idn/idnkit/download/"
+SRC_URI="http://www.nic.ad.jp/ja/idn/idnkit/download/sources/${P}-src.tar.gz"
+
+LICENSE="JNIC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+IUSE="static-libs"
+
+DEPEND="virtual/libiconv"
+
+S=${WORKDIR}/${P}-src
+
+src_prepare() {
+ # Bug 263135, old broken libtool bundled
+ rm -f aclocal.m4 || die "rm failed"
+ epatch "${FILESDIR}/${P}-autotools.patch"
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=""
+ if has_version dev-libs/libiconv; then
+ myconf="--with-iconv"
+ fi
+ econf $(use_enable static-libs static) ${myconf}
+}
+
+src_install() {
+ default
+ use static-libs || find "${ED}" -name 'lib*.la' -delete
+ dodoc ChangeLog DISTFILES NEWS README README.ja
+}
diff --git a/net-dns/idnkit/metadata.xml b/net-dns/idnkit/metadata.xml
new file mode 100644
index 000000000000..f8bd6f3f34f9
--- /dev/null
+++ b/net-dns/idnkit/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/knot/Manifest b/net-dns/knot/Manifest
new file mode 100644
index 000000000000..8974ddbbc3a5
--- /dev/null
+++ b/net-dns/knot/Manifest
@@ -0,0 +1,14 @@
+AUX 2.5.3-link-with-libatomic.patch 3837 SHA256 a615313865f527af1ef3e1fe8aaf272b77d80b3c33a2500edf7330cffd28f422 SHA512 8e3eac0cce77971a5c2357cc9fc8729f072363fcd160f5dec8ceb1b4b5ed938826bcfbabc7b78f81f21ff4b95aa38dcfc887470242589dd7684e79820a83a01a WHIRLPOOL 82216a015131ee04f21581b5e86afff1b40d44f4fac1f4898d2e0503f39cf81fd88c2a2e34a2da8b2ff98df48f5c717ee32ebcec2b932141d9120a1a90432284
+AUX knot-1.service 337 SHA256 5140fd96b54c3ecf79e9f386ce27159fa5c9d85c60fea11eb3d46a1b98e17b1d SHA512 58c4186e57ebd00b86dae34d5d208ed8801c0376da40cccb23b3d4542a7ee04a1003a12a4b89347b76a384b50eae4a61f96164bf22ec987ce05b1c65691659e7 WHIRLPOOL 03d9fd28f19d7c4a5a17fce6944560e01a4f95dc67a6a6385900f407c638b13c6f2908c619e652a7cfa08cea823bccc39de7cd939c152811a05240b14751192c
+AUX knot.init 861 SHA256 ec5c5aef42aaf7b0e47be6ea7dd94abdb38605f6e64b251184e381e2d490daf3 SHA512 e5faa96cbee618e9042bdfd0628f06c4bc4d23c7295521771e16f6eae715835a240799e8425317b03b1ea162966defb5d6b6592139cb1d9d61b47a24961ec9b9 WHIRLPOOL 5c102cf9ca93757a98be1e41f04027b6072b27e3e5e55d24c26040c94bcf6ac96cf5684ba639d3c65f9f46745a50981ac28a40bd50d432f04f83c5f84217ab60
+AUX knot.service 275 SHA256 3b091f61652f7d91189659e1d297e5ead76c79f4b0515c9eb4c7f054894e6810 SHA512 37c4700320a2781aa93ca92bc2634c3e080c87337b7d632d0e2fa23f6e2e8fa1985d1d8e2516fed02b612da4d340472d5f8d0ae37c5b323ac17bbd61ca243a86 WHIRLPOOL 39623f669bf141e785b630cd5caa71f47e67d6aa923cbfda074a4644faf83f05214484d133618a2c3731342f5bb44ef942d7559f36e7e2cade3c2318e8461dcb
+DIST knot-2.4.5.tar.xz 1111536 SHA256 87ce8ccc83511c5a1f4eadd3f0122f2f5ae86fb68e9b72f0700c6f5340ba95cb SHA512 db4919dbe2dc688f401e6611d784d47e1d40a0f8ec8c8cd6240d89ab9dd2ce7dd1976ac7cb24c712ed8aa074e0026ff0a10e9d6d5e685929d271ae554d9a1cff WHIRLPOOL cdfdf0bc2591df8436f8ab0959581129cb1a4d86138f6bb75b507d83280c7d567eb794e3b76b8374d4087721de53e4afd7566411b8e51fa2655e9e5462357ef4
+DIST knot-2.5.3.tar.xz 1073372 SHA256 d78ae231a68ace264f5738c8e57481923bcad7413f3f440c06fa6cc0aded9d8e SHA512 c93bfdd42c3f1e5b74de7a5bb46841bee75d5153b4c72eb876f11e193a290484620ea8f877bd039c40fc665a9d5d07905a712e8e085c3267da5db5208aa71f08 WHIRLPOOL c6fa2cd7dde2cd0ee54a7fc68fdd441d6af03777c788adaf2534bc944a0a5f8f0445b2cc1f80502c905e1f55baf0f65db37b66a097e46ec9fa0c960767398278
+DIST knot-2.5.4.tar.xz 1071596 SHA256 3fde76e9084b75df374709cb73a8289f77c6a95b7ccff8584d7423566faa24f0 SHA512 8b41a1ef0f9633815c38267130eba8c30c8c543ad6d74e0f63db42975d419938aa9cf4a921a7af966944fbd582f0e1364c6a05c79bc01a19674ed7ce0e66ef30 WHIRLPOOL 2f26b03837c59fb28294d6fabd658fef2527bbe118f6ffd299fde16d8af9d6dbd16209207f912cab51fc3319ba7733eb27594f54006bf534cdfcfaea54664777
+EBUILD knot-2.4.5.ebuild 1531 SHA256 d84eb720f2939a2b18a11d68b53203814407859dfa258e8ac6e5f9188db3a943 SHA512 908ebfce7b6ecd87171efe02b39ac43b8fd91aabf17da072fddd270b8bb10063e161dad188036dcf68d21046b56c8611fc9f443ebea39949747e1d4403a94405 WHIRLPOOL 9fe1f25b139fb3286eca4e9e03dfb6bf321249c2140b088d3abc451baa5a329678a171a534fa3d233a2114411d5d1afd77bfba109d7e1039d0c5a64fcd1b9b68
+EBUILD knot-2.5.3-r1.ebuild 1963 SHA256 d6172203b7b11341ae4a8af0a96000ce1ada597e582f34dcf2ce12d182eec2e0 SHA512 b406018a1e23f33a9a7eac49794feb8df79d8d406fbceddde634bff9b23f2875bd8371a96dc9c6b5d643fdf53468744efaba35aad6662965aba0ae1e599a31b8 WHIRLPOOL 75f53864bf28bfb1d2c340f59c0a46052bfd02a23d7bfaa01de50dd6be16280c2f544e020799da1953a50bb662117c53b22160b5ee13b6f497219b4a504ce07b
+EBUILD knot-2.5.3.ebuild 1538 SHA256 d6fd2bb305cb59c4062a1d24a88c3ea3335d3eb671b9930801da7f81890ea839 SHA512 80617cc5c2ffc5e4cc2397436d6d834b67d5f61a512088fece8706b53574a49854bcc451d3b4b717d94e2b59d62bb9aa750dcde3b92f05d86026e7d7dba00677 WHIRLPOOL 33f649edb555c2873bba78064c91c4a980c1ccb5d8fe84653cb0b9e6938b74f4f19188cb2426d8b4f1c604ae94c3ff90b02db3a515691325c4f8a6488307c9a0
+EBUILD knot-2.5.4.ebuild 1904 SHA256 065f189fd48ab1b9017a7b793a02b26787993c2b4b4f94aedbbd941ecaee1df8 SHA512 e43fa17ceb2199b0eb8bf989ab6b10663b21a5de094dc9fb6aa1b7b2db4e2d4edc8e1c0f2097f357646b8a45f7b65b603dde630ce17496090c348ec427dcbfbe WHIRLPOOL dc7b37a17b06d227fad6c4687715387a770ed2e2be34a84fb49f4987d5718fdafede56704e08b5900aa1784e674770c7880fc1add69a7c7c6ed93103694f6fcb
+MISC ChangeLog 5135 SHA256 9150cf67baa485c42361fd8ca7cecc178aaf19f69c5f5b0633c2fce1f9346631 SHA512 f97db80651483493f902dfd37880e783d9c1a16ce0610a3134c99db2ea257f2453ada405a07359a0c89e17eaed16cdb41b84e7caf61c633febbdd56f4bbdd937 WHIRLPOOL c30e56530e61b1fc1a24c0be9a5f6ade64dee3c6d2b3e25fbaff2cc4f2bacefcd3e099a767ac7231db1dc1ce518a224855e4229adf00da0a11bf75d535564a26
+MISC ChangeLog-2015 6004 SHA256 78cf50c9a8661021396add7cef8436d81ffd773c52a492b2f50c045a07aae84e SHA512 2d591dea2c45fdbb789f325369b2f01ad8c54ff375676342aade271808902c56c7d16409e35e64a754101c305bc400c9a7bc289e49fa4b079dbb1adb98f76a54 WHIRLPOOL 43b175454e358b7a96f56882451f1c5c897e0ac06b59e4562244f6690cfa037cddb28922d84823052f67e90069b459e9a8ecd435ff06aa2ffd03ef52c660e53f
+MISC metadata.xml 1539 SHA256 c17766d9e8d1b7121ba58acf02ade924eb3f14d4aef61b530b6b337ce12a6f30 SHA512 8b39c687fb8b9fb4bf25e0baa8c851ffb4980c0028bf0f64a3c642146139429e292c6ca3fbd01b7bb311ecbbe7bf1df128885b53971b836f541fe97bedf6f056 WHIRLPOOL 54cf2ffe6c96b25698448ea6dfc6a44efcb1e6bfe5f712ad9e43d9847e670c7711c7b4273e649d8284ebcc6a8b9401eb735380f0d13b38f2475372884371a68d
diff --git a/net-dns/knot/files/2.5.3-link-with-libatomic.patch b/net-dns/knot/files/2.5.3-link-with-libatomic.patch
new file mode 100644
index 000000000000..14e5366f7d94
--- /dev/null
+++ b/net-dns/knot/files/2.5.3-link-with-libatomic.patch
@@ -0,0 +1,117 @@
+From 5cf2d1acf87fa0ab18375534ca210f1cabf212b3 Mon Sep 17 00:00:00 2001
+From: Pierre-Olivier Mercier <nemunaire@nemunai.re>
+Date: Wed, 2 Aug 2017 23:16:43 +0200
+Subject: [PATCH] Link with libatomic on architectures that requires it
+
+---
+ configure.ac | 10 +++++++++-
+ src/Makefile.am | 2 +-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2a28214..5bd1798 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -504,8 +504,16 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sched.h>]], [[cpuset_t* set = cpuset
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <stdint.h>]],
+ [[uint64_t val = 0; __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);]])],
+- [AC_DEFINE(HAVE_ATOMIC, 1, [Define to 1 if you have '__atomic' functions.])]
++ [AC_DEFINE(HAVE_ATOMIC, 1, [Define to 1 if you have '__atomic' functions.])
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[#include <stdint.h>]],
++ [[uint64_t val = 0; __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);]])],
++ [atomic_LIBS=""],
++ [atomic_LIBS="-latomic"]
++ )],
++ [atomic_LIBS=""]
+ )
++AC_SUBST([atomic_LIBS])
+
+ # Prepare CFLAG_VISIBILITY to be used where needed
+ gl_VISIBILITY()
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 948912e..bf28013 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -399,7 +399,7 @@ libknotd_la_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAG_VISIBILITY) $(systemd_CFLAGS) \
+ $(liburcu_CFLAGS) -DKNOTD_MOD_STATIC
+ libknotd_la_LDFLAGS = $(AM_LDFLAGS) -export-symbols-regex '^knotd_'
+ libknotd_la_LIBADD = libknot.la zscanner/libzscanner.la $(systemd_LIBS) \
+- $(liburcu_LIBS)
++ $(liburcu_LIBS) $(atomic_LIBS)
+
+ ###################
+ # Knot DNS Daemon #
+--- a/src/Makefile.in 2017-08-05 18:09:14.029882010 +0200
++++ b/src/Makefile.in 2017-08-05 18:12:43.541190937 +0200
+@@ -379,7 +379,7 @@
+ @STATIC_MODULE_dnstap_TRUE@ contrib/dnstap/libdnstap.la
+ libknotd_la_DEPENDENCIES = libknot.la zscanner/libzscanner.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+- $(am__DEPENDENCIES_2)
++ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
+ am__libknotd_la_SOURCES_DIST = knot/conf/base.c knot/conf/base.h \
+ knot/conf/conf.c knot/conf/conf.h knot/conf/confdb.c \
+ knot/conf/confdb.h knot/conf/confio.c knot/conf/confio.h \
+@@ -937,6 +937,7 @@
+ am__quote = @am__quote@
+ am__tar = @am__tar@
+ am__untar = @am__untar@
++atomic_LIBS = @atomic_LIBS@
+ bindir = @bindir@
+ build = @build@
+ build_alias = @build_alias@
+@@ -1275,7 +1276,8 @@
+ $(am__append_11)
+ libknotd_la_LDFLAGS = $(AM_LDFLAGS) -export-symbols-regex '^knotd_'
+ libknotd_la_LIBADD = libknot.la zscanner/libzscanner.la \
+- $(systemd_LIBS) $(liburcu_LIBS) $(am__append_12)
++ $(systemd_LIBS) $(liburcu_LIBS) $(atomic_LIBS) \
++ $(am__append_12)
+ @HAVE_DAEMON_TRUE@sbin_SCRIPTS = utils/pykeymgr/pykeymgr
+ @HAVE_DAEMON_TRUE@CLEAN_FILES = $(sbin_SCRIPTS)
+ @HAVE_DAEMON_TRUE@knotddir = $(includedir)/knot
+--- a/configure 2017-08-05 18:09:14.039882551 +0200
++++ b/configure 2017-08-05 18:12:18.779857706 +0200
+@@ -655,6 +655,7 @@
+ CODE_COVERAGE_ENABLED_TRUE
+ HAVE_VISIBILITY
+ CFLAG_VISIBILITY
++atomic_LIBS
+ libidn_LIBS
+ libidn_CFLAGS
+ libidn2_LIBS
+@@ -16347,10 +16358,32 @@
+
+ $as_echo "#define HAVE_ATOMIC 1" >>confdefs.h
+
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++#include <stdint.h>
++int
++main ()
++{
++uint64_t val = 0; __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ atomic_LIBS=""
++else
++ atomic_LIBS="-latomic"
++
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++else
++ atomic_LIBS=""
+
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
++
+ # Prepare CFLAG_VISIBILITY to be used where needed
+
+
diff --git a/net-dns/knot/files/knot-1.service b/net-dns/knot/files/knot-1.service
new file mode 100644
index 000000000000..14a34a2b211f
--- /dev/null
+++ b/net-dns/knot/files/knot-1.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Knot high-performance DNS Server
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/knotd
+ExecReload=/usr/sbin/knotc reload
+ExecStop=/usr/sbin/knotc stop
+PrivateTmp=true
+User=knot
+Group=knot
+RuntimeDirectory=knot
+RuntimeDirectoryMode=750
+AmbientCapabilities=CAP_NET_BIND_SERVICE
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/knot/files/knot.init b/net-dns/knot/files/knot.init
new file mode 100644
index 000000000000..8dc460c31cd4
--- /dev/null
+++ b/net-dns/knot/files/knot.init
@@ -0,0 +1,41 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/sbin/knotd
+command_args="-d"
+pidfile=/var/run/knot/knot.pid
+required_files=/etc/knot/knot.conf
+extra_started_commands="reload"
+description_reload="Reload configuration and changed zones."
+
+depend() {
+ need net
+}
+
+start() {
+ checkpath -d -m 0750 -o knot:knot /var/run/knot/ /var/lib/knot/
+
+ ebegin "Starting knot"
+ start-stop-daemon --start \
+ --pidfile $pidfile --exec $command -- $command_args
+ eend $?
+}
+
+stop() {
+ ebegin "Stoping knot"
+ /usr/sbin/knotc stop >/dev/null 2>&1
+ # In case remote control is not working
+ if [ "$?" != 0 ]; then
+ if [ -f $pidfile ]; then
+ start-stop-daemon --stop --pidfile $pidfile
+ fi
+ fi
+ ewend $?
+}
+
+reload() {
+ ebegin "Reloading knot"
+ /usr/sbin/knotc reload >/dev/null
+ eend $?
+}
diff --git a/net-dns/knot/files/knot.service b/net-dns/knot/files/knot.service
new file mode 100644
index 000000000000..4684f9c858e2
--- /dev/null
+++ b/net-dns/knot/files/knot.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Knot high-performance DNS Server
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/knotd
+ExecReload=/usr/sbin/knotc reload
+ExecStop=/usr/sbin/knotc stop
+PrivateTmp=true
+RuntimeDirectory=knot
+RuntimeDirectoryMode=750
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/knot/knot-2.4.5.ebuild b/net-dns/knot/knot-2.4.5.ebuild
new file mode 100644
index 000000000000..50af785a49d1
--- /dev/null
+++ b/net-dns/knot/knot-2.4.5.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 eutils systemd user
+
+DESCRIPTION="High-performance authoritative-only DNS server"
+HOMEPAGE="http://www.knot-dns.cz/"
+SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dnstap doc caps +fastparser idn systemd"
+
+RDEPEND="
+ >=net-libs/gnutls-3.3:=
+ >=dev-libs/jansson-2.3
+ >=dev-db/lmdb-0.9.15
+ >=dev-libs/userspace-rcu-0.5.4
+ caps? ( >=sys-libs/libcap-ng-0.6.4 )
+ dnstap? (
+ dev-libs/fstrm
+ dev-libs/protobuf-c
+ )
+ idn? ( net-dns/libidn )
+ dev-libs/libedit
+ systemd? ( sys-apps/systemd )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( dev-python/sphinx )
+"
+
+S="${WORKDIR}/${P/_/-}"
+
+src_configure() {
+ econf \
+ --with-storage="${EPREFIX}/var/lib/${PN}" \
+ --with-rundir="${EPREFIX}/var/run/${PN}" \
+ --with-lmdb \
+ --with-bash-completions="$(get_bashcompdir)" \
+ $(use_enable fastparser) \
+ $(use_enable dnstap) \
+ $(use_enable doc documentation) \
+ $(use_with idn libidn) \
+ --enable-systemd=$(usex systemd)
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ emake -C doc html
+ HTML_DOCS=( doc/_build/html/{*.html,*.js,_sources,_static} )
+ fi
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ default
+
+ keepdir /var/lib/${PN}
+
+ newinitd "${FILESDIR}/knot.init" knot
+ systemd_dounit "${FILESDIR}/knot.service"
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ enewgroup knot 53
+ enewuser knot 53 -1 /var/lib/knot knot
+}
diff --git a/net-dns/knot/knot-2.5.3-r1.ebuild b/net-dns/knot/knot-2.5.3-r1.ebuild
new file mode 100644
index 000000000000..1c8e08233e89
--- /dev/null
+++ b/net-dns/knot/knot-2.5.3-r1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd user
+
+DESCRIPTION="High-performance authoritative-only DNS server"
+HOMEPAGE="http://www.knot-dns.cz/"
+SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+KNOT_MODULES=(
+ "+dnsproxy"
+ "dnstap"
+ "+noudp"
+ "+onlinesign"
+ "rosedb"
+ "+rrl"
+ "+stats"
+ "+synthrecord"
+ "+whoami"
+)
+IUSE="doc caps +fastparser idn libidn2 systemd +utils ${KNOT_MODULES[@]}"
+
+RDEPEND="
+ >=net-libs/gnutls-3.3:=
+ >=dev-db/lmdb-0.9.15
+ dev-python/lmdb
+ >=dev-libs/userspace-rcu-0.5.4
+ caps? ( >=sys-libs/libcap-ng-0.6.4 )
+ dnstap? (
+ dev-libs/fstrm
+ dev-libs/protobuf-c
+ )
+ idn? (
+ !libidn2? ( net-dns/libidn )
+ libidn2? ( >=net-dns/libidn2-2.0.0 )
+ )
+ dev-libs/libedit
+ systemd? ( >=sys-apps/systemd-229 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( dev-python/sphinx )
+"
+
+S="${WORKDIR}/${P/_/-}"
+
+PATCHES=(
+ "${FILESDIR}/${PV}-link-with-libatomic.patch"
+)
+
+src_configure() {
+ local my_conf=()
+ for u in "${KNOT_MODULES[@]#+}"; do
+ my_conf+=("$(use_with $u module-$u)")
+ done
+
+ econf \
+ --with-storage="${EPREFIX}/var/lib/${PN}" \
+ --with-rundir="${EPREFIX}/var/run/${PN}" \
+ $(use_enable fastparser) \
+ $(use_enable dnstap) \
+ $(use_enable doc documentation) \
+ $(use_enable utils utilities) \
+ --enable-systemd=$(usex systemd) \
+ $(use_with idn libidn) \
+ "${my_conf[@]}"
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ emake -C doc html
+ HTML_DOCS=( doc/_build/html/{*.html,*.js,_sources,_static} )
+ fi
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ default
+
+ rmdir "${D}var/run/${PN}" "${D}var/run/" || die
+ keepdir /var/lib/${PN}
+
+ newinitd "${FILESDIR}/knot.init" knot
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/knot-1.service" knot
+ fi
+
+ find "${D}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ enewgroup knot 53
+ enewuser knot 53 -1 /var/lib/knot knot
+}
diff --git a/net-dns/knot/knot-2.5.3.ebuild b/net-dns/knot/knot-2.5.3.ebuild
new file mode 100644
index 000000000000..4644120da23f
--- /dev/null
+++ b/net-dns/knot/knot-2.5.3.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 eutils systemd user
+
+DESCRIPTION="High-performance authoritative-only DNS server"
+HOMEPAGE="http://www.knot-dns.cz/"
+SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dnstap doc caps +fastparser idn systemd"
+
+RDEPEND="
+ >=net-libs/gnutls-3.3:=
+ >=dev-db/lmdb-0.9.15
+ >=dev-libs/userspace-rcu-0.5.4
+ caps? ( >=sys-libs/libcap-ng-0.6.4 )
+ dnstap? (
+ dev-libs/fstrm
+ dev-libs/protobuf-c
+ )
+ idn? ( || ( net-dns/libidn >=net-dns/libidn2-2.0.0 ) )
+ dev-libs/libedit
+ systemd? ( sys-apps/systemd )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( dev-python/sphinx )
+"
+
+S="${WORKDIR}/${P/_/-}"
+
+src_configure() {
+ econf \
+ --with-storage="${EPREFIX}/var/lib/${PN}" \
+ --with-rundir="${EPREFIX}/var/run/${PN}" \
+ --with-lmdb \
+ --with-bash-completions="$(get_bashcompdir)" \
+ $(use_enable fastparser) \
+ $(use_enable dnstap) \
+ $(use_enable doc documentation) \
+ $(use_with idn libidn) \
+ --enable-systemd=$(usex systemd)
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ emake -C doc html
+ HTML_DOCS=( doc/_build/html/{*.html,*.js,_sources,_static} )
+ fi
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ default
+
+ keepdir /var/lib/${PN}
+
+ newinitd "${FILESDIR}/knot.init" knot
+ systemd_dounit "${FILESDIR}/knot.service"
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ enewgroup knot 53
+ enewuser knot 53 -1 /var/lib/knot knot
+}
diff --git a/net-dns/knot/knot-2.5.4.ebuild b/net-dns/knot/knot-2.5.4.ebuild
new file mode 100644
index 000000000000..ce1ab4d0f5d9
--- /dev/null
+++ b/net-dns/knot/knot-2.5.4.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd user
+
+DESCRIPTION="High-performance authoritative-only DNS server"
+HOMEPAGE="https://www.knot-dns.cz/"
+SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+KNOT_MODULES=(
+ "+dnsproxy"
+ "dnstap"
+ "+noudp"
+ "+onlinesign"
+ "rosedb"
+ "+rrl"
+ "+stats"
+ "+synthrecord"
+ "+whoami"
+)
+IUSE="doc caps +fastparser idn libidn2 systemd +utils ${KNOT_MODULES[@]}"
+
+RDEPEND="
+ >=dev-db/lmdb-0.9.15
+ dev-libs/libedit
+ >=dev-libs/userspace-rcu-0.5.4
+ dev-python/lmdb
+ >=net-libs/gnutls-3.3:=
+ caps? ( >=sys-libs/libcap-ng-0.6.4 )
+ dnstap? (
+ dev-libs/fstrm
+ dev-libs/protobuf-c
+ )
+ idn? (
+ !libidn2? ( net-dns/libidn )
+ libidn2? ( >=net-dns/libidn2-2.0.0 )
+ )
+ systemd? ( >=sys-apps/systemd-229 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( dev-python/sphinx )
+"
+
+S="${WORKDIR}/${P/_/-}"
+
+src_configure() {
+ local my_conf=()
+ for u in "${KNOT_MODULES[@]#+}"; do
+ my_conf+=("$(use_with $u module-$u)")
+ done
+
+ econf \
+ --with-storage="${EPREFIX}/var/lib/${PN}" \
+ --with-rundir="${EPREFIX}/var/run/${PN}" \
+ $(use_enable fastparser) \
+ $(use_enable dnstap) \
+ $(use_enable doc documentation) \
+ $(use_enable utils utilities) \
+ --enable-systemd=$(usex systemd) \
+ $(use_with idn libidn) \
+ "${my_conf[@]}"
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ emake -C doc html
+ HTML_DOCS=( doc/_build/html/{*.html,*.js,_sources,_static} )
+ fi
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ default
+
+ rmdir "${D}var/run/${PN}" "${D}var/run/" || die
+ keepdir /var/lib/${PN}
+
+ newinitd "${FILESDIR}/knot.init" knot
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/knot-1.service" knot
+ fi
+
+ find "${D}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ enewgroup knot 53
+ enewuser knot 53 -1 /var/lib/knot knot
+}
diff --git a/net-dns/knot/metadata.xml b/net-dns/knot/metadata.xml
new file mode 100644
index 000000000000..9245494df34e
--- /dev/null
+++ b/net-dns/knot/metadata.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>nemunaire@nemunai.re</email>
+ <name>Pierre-Olivier Mercier</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="dnsproxy">
+ Enable the tiny DNS proxy module
+ </flag>
+ <flag name="dnstap">
+ Include support for the dnstap binary log format
+ (http://dnstap.info/)
+ </flag>
+ <flag name="fastparser">
+ Use a zone file parser that is faster, but requires
+ more memory and CPU time to compile
+ </flag>
+ <flag name="libidn2">
+ If IDN support is enabled, use net-dns/libidn2 instead
+ of net-dns/libidn
+ </flag>
+ <flag name="noudp">
+ Enable the module which can send empty truncated
+ responses to UDP queries
+ </flag>
+ <flag name="onlinesign">
+ Enable the module that sign zones on the fly instead of
+ pre-signing zone
+ </flag>
+ <flag name="rosedb">
+ Enable the module that staticaly override certain
+ responses
+ </flag>
+ <flag name="rrl">
+ Enable the response rate limiting module
+ </flag>
+ <flag name="stats">
+ Enable the server statistics module
+ </flag>
+ <flag name="synthrecord">
+ Enable the automatic forward/reverse records module
+ </flag>
+ <flag name="utils">
+ Install Knot utilities, such as kdig, kzonecheck, ...
+ </flag>
+ <flag name="whoami">
+ Enable the whoami response module
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/ldns-utils/Manifest b/net-dns/ldns-utils/Manifest
new file mode 100644
index 000000000000..07e06efdb13d
--- /dev/null
+++ b/net-dns/ldns-utils/Manifest
@@ -0,0 +1,10 @@
+AUX 1.6.12-cflags.patch 938 SHA256 cf964d5abdd921acf539b6d8185e99def2f43aff47d2d1489b87cd2b342dc8e9 SHA512 bd03ef07cdc407d2ad3714027c91339ada3d79bc3302884b05c4e0ada18d93d232cd718b67a35234b98c29a35f26730df631e0854b8a64399498a7e9f83e6216 WHIRLPOOL a768d441d92aa00194e150d2992a70c83f796228166a315d120273a6677ecf907ad197937aeaa94884285b3686774c95cc76776d7b615006b181db0207c5609e
+DIST ldns-1.6.12.tar.gz 1057607 SHA256 b966787510a169ca0ed78f9a8a5de01fb309909575e721ead92095d4677aa51c SHA512 f928be35a5c0bc2b918f005dd592cc531451f373ed9d77a54d5207a2a80b9d525faabf75bba75483d3476cfeff75a66ad4d9527a84a983216dae4fac30213773 WHIRLPOOL 0e8cf513991850b065144568ec1ea3188ddb6bbf6b3cf08490186552884b2b2dd42ae8ab8995f54c183a989976ab292772411f2582a5bd595d4d54d25e2b4096
+DIST ldns-1.6.17.tar.gz 1315403 SHA256 8b88e059452118e8949a2752a55ce59bc71fa5bc414103e17f5b6b06f9bcc8cd SHA512 5de42b4b8622591db51efb0956735deee9cd5e0bee12249a03b65c5b45d7c51bf9c2edb310ef9d7431af49aef77d968bfa2455a7dedfa80cde3d433436c83785 WHIRLPOOL 08c8a13df3dbeccd5dc5ceeb52730a61ab231e70a85524e826f9275bbcde6e09d6e2fc5234303a6bceb431d2b91f510140ce61a2b59d77afbb2759a0627c7cb7
+DIST ldns-1.7.0.tar.gz 1304424 SHA256 c19f5b1b4fb374cfe34f4845ea11b1e0551ddc67803bd6ddd5d2a20f0997a6cc SHA512 8a4e48bcc2a244b92447a9830b60efbb656fb7955f3559ef2eb6f8e724c4c0208776350c44ccf7dcf1ffe0b7b9d9ccc4cbddc5bc16e8888db494ab4d0bce3bd8 WHIRLPOOL 4450b94dd3e2586230f1691b626947cad7ac2031e343d1e522343570d5b713cfd4bacd52e91713139a88c2fe2406f5f42594d2da0a0474c807f47fd2e98726b1
+EBUILD ldns-utils-1.6.12.ebuild 1351 SHA256 8657865c02ed24a364aafe6c5985832fe6fa50517187cf1b9eedf136dc2993e9 SHA512 74b2120348484901b4736f10cc4fc4f36b4ae728fb3173623c8e5274205c1bbe5b6d535ddf62c20e367fedbcdc0591a870fae871ac99679325267a67721b3829 WHIRLPOOL b1a438f70fa7539f42a86d3367f9966959d54be6684e9707fdb425a52fc8896c440f054f812886ec1d05aa533bd031cf2cac21c18e3b3d20c51bd7324d757418
+EBUILD ldns-utils-1.6.17.ebuild 1138 SHA256 089878fd200a9e18bbf991c970167c4c820c6db6ac62e711b70aca7dbcc3a414 SHA512 3ae6b8549ed43e1957127129094ece798f1e7f64dae5521f83eeb59a37bc72ae7e97963b68fadf3c5446c8c019d3800ce06f7e29acaf2c6e748750aed6db03d0 WHIRLPOOL 91ece1a1c67eb4f2c7a1a550d1dc0c5e96fb11dfe023fd9fccac58a82ac139c280a7348d6f25f1ca76a167287dfc07fd7cdbcc1dccb7e80a1c37de6ceb615ffc
+EBUILD ldns-utils-1.7.0.ebuild 1142 SHA256 edf009ec8928911f5d160a4bf4eae491c1bf4d2c27833fb09b27b0905a3b2df3 SHA512 728a69b608ee8d9388ca6331f1da4e6e0e5932f6380fc788fbc9787aabba5e3acc35bbe6462f10173e08ea9f0cd6cec600e18812aa542ffb0039ca3408d6a1b7 WHIRLPOOL ff7af9b1abd89b69863efba907a0c3c8f646594878a32df49a6f590827781fe6389edb6c681de572c6d71179fbc7f96519af8ba5a32c4f4f660168afc2bb0731
+MISC ChangeLog 2669 SHA256 1b3f8097400ed89fd4e179189283dd0c0c453891e3df046150f51bdc5cd6344a SHA512 5d2f00d4e868d09014db185ae60fd0256d5005617231a99a39f8701273c270f68ad6e4736e811db18159918dc36c8cf4951d9bf80f780b57a988e276c6475170 WHIRLPOOL 41d302cb68644c958e20772e1289c16542b91df8ec69d4e3d389c5380b555004bf9986281cec2b7e2946eb751815fdc3984143d1abcc7826b6e781324391429b
+MISC ChangeLog-2015 5180 SHA256 de2a478ae5c298732ab347a0528bfa3aa3f9dba3719f696ff2cc8777db70dc78 SHA512 4e01764ec1f7397a283c3770d9bf1ba4ba6fdc9414834d4d49cbe381a70af19d0cf17608cc6e632fe9a9bd28b2bcacb90d55f92ad497210d452b6a08cfa20c22 WHIRLPOOL 0beb0100fa1735daca3dabdf497a636cbf4fac5fe4b68540b078a08ddd79d7b6b980efcae44a9d3f35a68e1ad68dc046faa39765d592a007911d4bcc89f336fb
+MISC metadata.xml 742 SHA256 f1d66e5af20604a8f5d75ac742b15890a4364acc95a73f771ac3863af5b9ad19 SHA512 a0c0fc0a7dd05890fa9b2d6bf99c5b96990d76993d27d18a382ab69e1200aa5f472865c5de928575d773f70ef21314519bc46a1d2a138da34d569bf56a7d8748 WHIRLPOOL 490e60171be38bed4b6de3ad645c80f3dea9950441c212744348a541622042995f8d07ddae75949fd1a180a5c36728f8bc2e3b5ab519b54ffebbd34893a3b38a
diff --git a/net-dns/ldns-utils/files/1.6.12-cflags.patch b/net-dns/ldns-utils/files/1.6.12-cflags.patch
new file mode 100644
index 000000000000..5e14a20ad37c
--- /dev/null
+++ b/net-dns/ldns-utils/files/1.6.12-cflags.patch
@@ -0,0 +1,22 @@
+diff -Naur ldns-1.6.12.orig/drill/configure.ac ldns-1.6.12/drill/configure.ac
+--- ldns-1.6.12.orig/drill/configure.ac 2011-11-17 00:48:16.000000000 +0900
++++ ldns-1.6.12/drill/configure.ac 2012-01-12 00:20:51.944503474 +0900
+@@ -33,7 +33,6 @@
+ ACX_CHECK_COMPILER_FLAG(xc99, [C99FLAG="-xc99"])
+
+ AC_TYPE_SIZE_T
+-ACX_CHECK_COMPILER_FLAG(O2, [CFLAGS="$CFLAGS -O2"])
+
+ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600,
+ [
+diff -Naur ldns-1.6.12.orig/examples/configure.ac ldns-1.6.12/examples/configure.ac
+--- ldns-1.6.12.orig/examples/configure.ac 2011-09-29 22:04:19.000000000 +0900
++++ ldns-1.6.12/examples/configure.ac 2012-01-12 00:21:03.191504702 +0900
+@@ -31,7 +31,6 @@
+
+
+ AC_TYPE_SIZE_T
+-ACX_CHECK_COMPILER_FLAG(O2, [CFLAGS="$CFLAGS -O2"])
+
+ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600,
+ [
diff --git a/net-dns/ldns-utils/ldns-utils-1.6.12.ebuild b/net-dns/ldns-utils/ldns-utils-1.6.12.ebuild
new file mode 100644
index 000000000000..6b15334d520a
--- /dev/null
+++ b/net-dns/ldns-utils/ldns-utils-1.6.12.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="3"
+inherit autotools eutils
+
+MY_P="${P/-utils}"
+DESCRIPTION="Set of utilities to simplify various dns(sec) tasks"
+HOMEPAGE="http://www.nlnetlabs.nl/projects/ldns/"
+SRC_URI="http://www.nlnetlabs.nl/downloads/ldns/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="examples gost ssl"
+
+DEPEND=">=net-libs/ldns-${PV}[gost?,ssl?]
+ examples? ( net-libs/libpcap )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ # bug #369339
+ epatch "${FILESDIR}/1.6.12-cflags.patch"
+
+ ( cd drill && eautoreconf )
+ ( cd examples && eautoreconf )
+}
+
+src_configure() {
+ cd "${S}"/drill
+ econf $(use_with ssl) || die
+
+ if use examples; then
+ cd "${S}"/examples
+ econf \
+ $(use_enable gost) \
+ $(use_enable ssl sha2) \
+ $(use_with ssl) || die
+ fi
+}
+
+src_compile() {
+ emake -C drill || die "emake for drill failed"
+ if use examples; then
+ emake -C examples || die "emake for examples failed"
+ fi
+}
+
+src_install() {
+ cd "${S}"/drill
+ emake DESTDIR="${D}" install || die "emake install for drill failed"
+ dodoc ChangeLog.22-nov-2005 README REGRESSIONS || die
+
+ if use examples; then
+ cd "${S}"/examples
+ emake DESTDIR="${D}" install || die "emake install for examples failed"
+ newdoc README README.examples || die
+ fi
+}
diff --git a/net-dns/ldns-utils/ldns-utils-1.6.17.ebuild b/net-dns/ldns-utils/ldns-utils-1.6.17.ebuild
new file mode 100644
index 000000000000..0bee257bbba9
--- /dev/null
+++ b/net-dns/ldns-utils/ldns-utils-1.6.17.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P=${P/-utils}
+
+DESCRIPTION="Set of utilities to simplify various dns(sec) tasks"
+HOMEPAGE="http://www.nlnetlabs.nl/projects/ldns/"
+SRC_URI="http://www.nlnetlabs.nl/downloads/ldns/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 arm hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="dane ecdsa examples gost ssl"
+
+DEPEND=">=net-libs/ldns-${PV}[dane?,ecdsa?,gost?,ssl?]
+ examples? ( net-libs/libpcap )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ cd "${S}"/drill
+ econf $(use_with ssl)
+
+ if use examples; then
+ cd "${S}"/examples
+ econf \
+ $(use_enable dane) \
+ $(use_enable ecdsa) \
+ $(use_enable gost) \
+ $(use_enable ssl sha2) \
+ $(use_with ssl)
+ fi
+}
+
+src_compile() {
+ emake -C drill
+ if use examples; then
+ emake -C examples
+ fi
+}
+
+src_install() {
+ cd "${S}"/drill
+ emake DESTDIR="${D}" install
+ dodoc ChangeLog.22-nov-2005 README REGRESSIONS
+
+ if use examples; then
+ cd "${S}"/examples
+ emake DESTDIR="${D}" install
+ newdoc README README.examples
+ fi
+}
diff --git a/net-dns/ldns-utils/ldns-utils-1.7.0.ebuild b/net-dns/ldns-utils/ldns-utils-1.7.0.ebuild
new file mode 100644
index 000000000000..804bffc870e2
--- /dev/null
+++ b/net-dns/ldns-utils/ldns-utils-1.7.0.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P=${P/-utils}
+
+DESCRIPTION="Set of utilities to simplify various dns(sec) tasks"
+HOMEPAGE="http://www.nlnetlabs.nl/projects/ldns/"
+SRC_URI="http://www.nlnetlabs.nl/downloads/ldns/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="+dane ecdsa examples gost ssl"
+
+DEPEND=">=net-libs/ldns-${PV}[dane?,ecdsa?,gost?,ssl?]
+ examples? ( net-libs/libpcap )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ cd "${S}"/drill
+ econf $(use_with ssl)
+
+ if use examples; then
+ cd "${S}"/examples
+ econf \
+ $(use_enable dane) \
+ $(use_enable ecdsa) \
+ $(use_enable gost) \
+ $(use_enable ssl sha2) \
+ $(use_with ssl)
+ fi
+}
+
+src_compile() {
+ emake -C drill
+ if use examples; then
+ emake -C examples
+ fi
+}
+
+src_install() {
+ cd "${S}"/drill
+ emake DESTDIR="${D}" install
+ dodoc ChangeLog.22-nov-2005 README REGRESSIONS
+
+ if use examples; then
+ cd "${S}"/examples
+ emake DESTDIR="${D}" install
+ newdoc README README.examples
+ fi
+}
diff --git a/net-dns/ldns-utils/metadata.xml b/net-dns/ldns-utils/metadata.xml
new file mode 100644
index 000000000000..03fefe6a973c
--- /dev/null
+++ b/net-dns/ldns-utils/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mschiff@gentoo.org</email>
+ <name>Marc Schiffbauer</name>
+ </maintainer>
+ <longdescription lang="en">
+ ldns is a library with the aim to simplify DNS programing in C. All
+ lowlevel DNS/DNSSEC operations are supported. We also define a higher
+ level API which allows a programmer to (for instance) create or sign
+ packets.
+ </longdescription>
+ <use>
+ <flag name="dane">Enable DNS-based Authentication of Named Entities (DANE) support</flag>
+ <flag name="ecdsa">Enable ECDSA support</flag>
+ <flag name="gost">Enable GOST support</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/libidn/Manifest b/net-dns/libidn/Manifest
new file mode 100644
index 000000000000..cef06f0496fd
--- /dev/null
+++ b/net-dns/libidn/Manifest
@@ -0,0 +1,8 @@
+AUX 50libidn-gentoo.el 455 SHA256 b8b5a7df3ef312b47ef44d7b5c9180e06e9d8b9cbe43fa67b8511296381ff937 SHA512 13bcc7078ae8e088014323707d451c0bfdb53414e550945248a9648afa81681db013cb523eae71116c84f1dcfbb3b87e8743971775b75c4ce6dad914b3b0a501 WHIRLPOOL e2925be57973d4f2d9adebaa63bc9a2d63daa0c4ac571790fd564fe4b7a4d5d8db62a0e342a5043b28e2c506bb62f86e9f967e5a680dd50261fa1dfb4214b260
+AUX libidn-1.33-CVE-2017-14062.patch 938 SHA256 c640ebe93568bd2dc2cae2151fa91fb8f4d8190bf2bb3b353a638282ab44cef1 SHA512 a78a57fe5583cb02239fbff11d33b1ee1f84b91817c5376ed441173be5fa47337019b0b098a5134c19f1f62ab5efac0621dd8fc922ec09de21481b9905638f20 WHIRLPOOL e2c0dc34aee544d0a9a35c8afb7f79ed6f6bb5d81b5223b3cd85ee768a82e44eaee1c263137e853551fc059c60b89d479db3d3c73f5be3173701a3a4133cda06
+DIST libidn-1.33.tar.gz 3501056 SHA256 44a7aab635bb721ceef6beecc4d49dfd19478325e1b47f3196f7d2acc4930e19 SHA512 38dd459eaeda0c9e3cc2d24d967113515a499747550a2a9157f32357def90d71a3a3b52398e96a44a28cd5948dc353b0473c4ff0453a69720191c4cb49cac2c6 WHIRLPOOL 3b0c44742c2515e09eaf8f16f32f30bc37478a6273765d71dd9a9283f501998b6d85583cd38810bbdbd6103855e77831360010d707d29956798e3f5d066b0e82
+EBUILD libidn-1.33-r1.ebuild 2985 SHA256 6e0507865386f1d1afd5a8c518692003dd945c16ab2efb6e76f84a347c89695f SHA512 45744c90319efb5316a99f93322c28e9a5076fbcf6b76e7e5bcc7b169539811f4f5d6f15436d0294d5fcf4efa2a098dbf81e3623c00de1ba2b8e08dd860b8993 WHIRLPOOL 06d346aece8930d6c979e63ec571bc4eddc8ba1e2456de34cb3091f756cfcc10060680bb496290be0ac2e13ca9f0f710ebac74bfe757524fce1844f85c421d6e
+EBUILD libidn-1.33.ebuild 2805 SHA256 6d70b0dda51adcedbe3fc41db8f9d998f7129935f1d8617c95c768164a6d1299 SHA512 863f325f2ed868a6b78d542fe584538d67ff6bbe99b1e181416b43c919cfdfc417bd92dc424657d0a632c838735826be7bbfdc82632e04cdeaf5e3bbd4351a15 WHIRLPOOL 20ec2d3960b38bbfc1d80e022855cb812c8e77d3fcc884fac4ecf34fbe44f3b4ee66c4f47797a822637512ad863931f6ddb6d80d6fbaea87f1c4862cc38435b6
+MISC ChangeLog 4866 SHA256 fafa50fd65a41bccaae966e981e3bfc745e1ff956ed3d66a8933933d87267fb1 SHA512 df837de9cd1ac3b0fd364801c147aac996ad42600bb449c85f41a500b535e2db290d17758efd670617567428a3f74b2c5692979580230a6b7f2cf6daacbf2d69 WHIRLPOOL b1d2f31a691277979c3586b9730e3c3c058870a7673fb42ab1585ef09d2dceb79a4adfbf0d597b33a28807f2b4fd84e0d0944dc6eae62c0100ac6489bc5589b9
+MISC ChangeLog-2015 26908 SHA256 f0e4fdf08e48c0b4d012acf9dad9d0555636c3c6a3db591f13632e4260eae940 SHA512 3b29c0708d0a48cfde5d018ae81977eb1f72bfaa45b9035273900975488d98a60989b5ad72c3062a5a1cc4cdc4d35cc0e0e37b093e070c480ab5b122d41dd9b1 WHIRLPOOL 2668887482e4a71b6e42032b35123735aa887cadb539ff1a1ef28b137845df3057cf2b085950595d40815ff4bfd15e748dfb44137636905c9526692597f2c74b
+MISC metadata.xml 244 SHA256 a65bfec176330796e1eeb3bb589b78ff60a123b947537decd4705ea71ca4e906 SHA512 1da71f4fae0251c97a8fcfa1e13b0a3f8b95a856fa919ebd30bf4f2f1b8fa900841db09ebc2a0ae9fe0d91f786ac40b63290382668412fcb05bca15b0746f1db WHIRLPOOL 1164de6a99d8931ca3ae60cbb397be80b802eb473943ef777dbe8473d8d665a5f93d8b99175709bf09d8af856b3ea7aaf7c95a87aad37e48b85c06e618431a1f
diff --git a/net-dns/libidn/files/50libidn-gentoo.el b/net-dns/libidn/files/50libidn-gentoo.el
new file mode 100644
index 000000000000..6ab280c64eb9
--- /dev/null
+++ b/net-dns/libidn/files/50libidn-gentoo.el
@@ -0,0 +1,12 @@
+
+;;; libidn site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'idna-to-ascii "idna"
+ "Returns an ASCII Compatible Encoding (ACE) of STR.")
+(autoload 'idna-to-unicode "idna"
+ "Returns a possibly multibyte string after decoding STR.")
+(autoload 'punycode-encode "punycode"
+ "Returns a Punycode encoding of STR.")
+(autoload 'punycode-decode "punycode"
+ "Returns a possibly multibyte string which is the punycode decoding of STR.")
diff --git a/net-dns/libidn/files/libidn-1.33-CVE-2017-14062.patch b/net-dns/libidn/files/libidn-1.33-CVE-2017-14062.patch
new file mode 100644
index 000000000000..2ddf3fdd6be2
--- /dev/null
+++ b/net-dns/libidn/files/libidn-1.33-CVE-2017-14062.patch
@@ -0,0 +1,32 @@
+From e9e81b8063b095b02cf104bb992fa9bf9515b9d8 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
+Date: Fri, 1 Sep 2017 10:04:48 +0200
+Subject: [PATCH] lib/punycode.c (decode_digit): Fix integer overflow
+
+This fix is a backport from libidn2 and addresses
+CVE-2017-14062.
+---
+ lib/punycode.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/punycode.c b/lib/punycode.c
+index 86819a7..49250a1 100644
+--- a/lib/punycode.c
++++ b/lib/punycode.c
+@@ -88,10 +88,10 @@ enum
+ /* point (for use in representing integers) in the range 0 to */
+ /* base-1, or base if cp does not represent a value. */
+
+-static punycode_uint
+-decode_digit (punycode_uint cp)
++static unsigned
++decode_digit (int cp)
+ {
+- return cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 :
++ return (unsigned) cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 :
+ cp - 97 < 26 ? cp - 97 : base;
+ }
+
+--
+1.9.1
+
diff --git a/net-dns/libidn/libidn-1.33-r1.ebuild b/net-dns/libidn/libidn-1.33-r1.ebuild
new file mode 100644
index 000000000000..92d1d7c0723e
--- /dev/null
+++ b/net-dns/libidn/libidn-1.33-r1.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit elisp-common java-pkg-opt-2 mono-env multilib-minimal libtool
+
+DESCRIPTION="Internationalized Domain Names (IDN) implementation"
+HOMEPAGE="https://www.gnu.org/software/libidn/"
+SRC_URI="mirror://gnu/libidn/${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-3 LGPL-3 java? ( Apache-2.0 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc emacs java mono nls static-libs"
+
+DOCS=( AUTHORS ChangeLog FAQ NEWS README THANKS TODO )
+COMMON_DEPEND="
+ emacs? ( virtual/emacs )
+ mono? ( >=dev-lang/mono-0.95 )
+"
+DEPEND="${COMMON_DEPEND}
+ nls? (
+ >=sys-devel/gettext-0.17
+ )
+ java? (
+ >=virtual/jdk-1.5
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ nls? (
+ >=virtual/libintl-0-r1[${MULTILIB_USEDEP}]
+ )
+ java? (
+ >=virtual/jre-1.5
+ )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r5
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )
+"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.33-CVE-2017-14062.patch
+)
+
+pkg_setup() {
+ mono-env_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # bundled, with wrong bytecode
+ rm "${S}/java/${P}.jar" || die
+
+ # prevent triggering doc updates after punycode.c patch
+ touch doc/texi/punycode* || die
+ touch doc/man/punycode* || die
+
+ elibtoolize # for Solaris shared objects
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} GJDOC=javadoc \
+ econf \
+ $(multilib_native_use_enable java) \
+ $(multilib_native_use_enable mono csharp mono) \
+ $(use_enable nls) \
+ $(use_enable static-libs static) \
+ --disable-silent-rules \
+ --disable-valgrind-tests \
+ --with-lispdir="${EPREFIX}${SITELISP}/${PN}" \
+ --with-packager-bug-reports="https://bugs.gentoo.org" \
+ --with-packager-version="r${PR}" \
+ --with-packager="Gentoo"
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi; then
+ use emacs && elisp-compile "${S}"/src/*.el
+ use java && use doc && emake -C java/src/main/java javadoc
+ fi
+}
+
+multilib_src_test() {
+ # only run libidn specific tests and not gnulib tests (bug #539356)
+ emake -C tests check
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_newjar java/${P}.jar ${PN}.jar
+ rm -r "${ED}"/usr/share/java || die
+ use doc && java-pkg_dojavadoc "${S}"/doc/java
+ fi
+}
+
+multilib_src_install_all() {
+ if use emacs; then
+ # *.el are installed by the build system
+ elisp-install ${PN} "${S}"/src/*.elc
+ elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
+ else
+ rm -r "${ED}/usr/share/emacs" || die
+ fi
+
+ einstalldocs
+ if use doc ; then
+ dohtml -r doc/reference/html/.
+ fi
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/net-dns/libidn/libidn-1.33.ebuild b/net-dns/libidn/libidn-1.33.ebuild
new file mode 100644
index 000000000000..b494bad73965
--- /dev/null
+++ b/net-dns/libidn/libidn-1.33.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit elisp-common java-pkg-opt-2 mono-env multilib-minimal libtool
+
+DESCRIPTION="Internationalized Domain Names (IDN) implementation"
+HOMEPAGE="https://www.gnu.org/software/libidn/"
+SRC_URI="mirror://gnu/libidn/${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-3 LGPL-3 java? ( Apache-2.0 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc emacs java mono nls static-libs"
+
+DOCS=( AUTHORS ChangeLog FAQ NEWS README THANKS TODO )
+COMMON_DEPEND="
+ emacs? ( virtual/emacs )
+ mono? ( >=dev-lang/mono-0.95 )
+"
+DEPEND="${COMMON_DEPEND}
+ nls? (
+ >=sys-devel/gettext-0.17
+ )
+ java? (
+ >=virtual/jdk-1.5
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ nls? (
+ >=virtual/libintl-0-r1[${MULTILIB_USEDEP}]
+ )
+ java? (
+ >=virtual/jre-1.5
+ )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r5
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )
+"
+
+pkg_setup() {
+ mono-env_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # bundled, with wrong bytecode
+ rm "${S}/java/${P}.jar" || die
+
+ eapply_user
+
+ elibtoolize # for Solaris shared objects
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} GJDOC=javadoc \
+ econf \
+ $(multilib_native_use_enable java) \
+ $(multilib_native_use_enable mono csharp mono) \
+ $(use_enable nls) \
+ $(use_enable static-libs static) \
+ --disable-silent-rules \
+ --disable-valgrind-tests \
+ --with-lispdir="${EPREFIX}${SITELISP}/${PN}" \
+ --with-packager-bug-reports="https://bugs.gentoo.org" \
+ --with-packager-version="r${PR}" \
+ --with-packager="Gentoo"
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi; then
+ use emacs && elisp-compile "${S}"/src/*.el
+ use java && use doc && emake -C java/src/main/java javadoc
+ fi
+}
+
+multilib_src_test() {
+ # only run libidn specific tests and not gnulib tests (bug #539356)
+ emake -C tests check
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_newjar java/${P}.jar ${PN}.jar
+ rm -r "${ED}"/usr/share/java || die
+ use doc && java-pkg_dojavadoc "${S}"/doc/java
+ fi
+}
+
+multilib_src_install_all() {
+ if use emacs; then
+ # *.el are installed by the build system
+ elisp-install ${PN} "${S}"/src/*.elc
+ elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
+ else
+ rm -r "${ED}/usr/share/emacs" || die
+ fi
+
+ einstalldocs
+ if use doc ; then
+ dohtml -r doc/reference/html/.
+ fi
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/net-dns/libidn/metadata.xml b/net-dns/libidn/metadata.xml
new file mode 100644
index 000000000000..f8bd6f3f34f9
--- /dev/null
+++ b/net-dns/libidn/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/libidn2/Manifest b/net-dns/libidn2/Manifest
new file mode 100644
index 000000000000..1db3935e47eb
--- /dev/null
+++ b/net-dns/libidn2/Manifest
@@ -0,0 +1,14 @@
+AUX libidn2-0.12-Werror.patch 271 SHA256 5347ec484401e39bb2a78a77398589fb30dd7de6c85d5b1cf705309533f03002 SHA512 089cd5d7b0d8d6103559c7706863306acf5beffbbd914a242cd36448c0bead07359ff011a14c1c70a507647f64b3dd79d8ef9ee94d758b927a6d240f074448cf WHIRLPOOL 43641903b6b4c55c652ef16bd0763c00ce1abd7bf43af7e9cd391522bb4156603340eeaad1bfe6b88e7f88d0ff4a90cccc191241622f1bd55a87714a14183d97
+AUX libidn2-0.12-examples.patch 241 SHA256 939a52b77f03c284c8f8b9e66df7af330d9c27d679a69d087bba8b57af0fe9a6 SHA512 5c3c391d207520a2ad5e43374f834fb186c4f545ec49769809fcb57e19355d5e892f9027d2e3ea196a4f95bcf04c734979233bfa5719f71c17b255e8784ae2e0 WHIRLPOOL 16265ed84920ad63471dc75241a81181f20735c09da8e603e2656478747299953262566466c61efea5641d85af879a5a1b5308d0669081982aeb9c658fb8801e
+AUX libidn2-0.16-cross.patch 966 SHA256 02e10090f97c537fd21d10cc936b7f40898f2fd656310405da3f238317f6f13d SHA512 742effd6f2b6ba068c103c3944152a5976b50d51f69252e4770267b4d1ba23772563e9307dc004b06a4c9080b53f85f1c6feb0f0a175f8baae17e60cfcbfb803 WHIRLPOOL c7a1bf8342bf0ce556d718b47c3f3712a33a87f787c84172072d033a2f428df10ce0b0c080e6f47db804243ec5d25cd45c4eb5a08e29af73bcff765962ca8d07
+AUX libidn2-0.16-gengetopt.patch 335 SHA256 0a0ffd51e4e1106ac768332f2391de4fc42e740fd7a42cdca4a1a1d2c805143a SHA512 88573e1b2ae1b084f6b79323228d706dc421efee423c27b516a983173d3814d297f5b7a86577c3a07930bacbc7d4e1c0118f1b758ad81363df352d21d38aaf0e WHIRLPOOL afd3028cc1f2fc749ab6e0b5269a1f6c948dd0476b3f3bed907e861f503ea6ce64a9d474b99acd0b06081a438de003dcc1cae93f22de42362b4ac4fa1238de68
+AUX libidn2-pkgconfig.diff 979 SHA256 971f4e9b3fdc30cde2ff8c761fe908cc26d1417b5a8b0cfbbf9324a513e3b59e SHA512 2d75029e2a3d259b716b7dc3428570028a25b9488aabad01c4a593445c012b801905df581b7ab60fc076a32355aed73b2ddc0f32c3f2d13eba97bf502a334b5c WHIRLPOOL 1d3f1333fefb977a321b5202ccc48666b2dbf2b6ebdc99c208f7c5c0358a05620278039fe50df0c986ef57dc363a97b89b133056f8611363167ee5f51a0b1c30
+DIST libidn2-0.16.tar.gz 1494295 SHA256 2fad9efff4082ae2143f69df76339ca99379e0e0f4231455f5d3d9d2089c688f SHA512 85f41c79bd2b88f2724383461a78e56b47e52e66e3f088d631a922438742938721d26aeebef17f6ca4fd028d95dfb5b0fa298a96982ef777c07fefe5244d1e73 WHIRLPOOL be10d0e2994e4fa0e31d710b358c7375e9454b4291bd4603a683a6ddb737241442007f04893395b36d7ef636614b6982354840bb07570e2a6b8f6aa2d888996a
+DIST libidn2-2.0.2.tar.gz 1925342 SHA256 8cd62828b2ab0171e0f35a302f3ad60c3a3fffb45733318b3a8205f9d187eeab SHA512 c8fd1114fc8df2030abf7c1044da4022989a1cd7ecd92309f62ad0b51b1fcf40418dccd2e397a8335c5e99998130f25339dcb576b4bc88888e3ef0df89714dad WHIRLPOOL fc60b6b8da20b60c851001788541ede0b7ce64ea9701a229b7312b748b02cf99f70d14070ffd64967f6b970f1ce43589956bad693d13f8b51ddde27515fd47c1
+DIST libidn2-2.0.4.tar.gz 2008524 SHA256 644b6b03b285fb0ace02d241d59483d98bc462729d8bb3608d5cad5532f3d2f0 SHA512 1e51bd4b8f8907531576291f1c2a8865d17429b4105418b4c98754eb982cd1cbb3adbeab4ec0c1c561d2dba11d876c7c09e5dc5b315c55a2c24986d7a2a3b4d2 WHIRLPOOL 0caf45267c06bd6d78fc80673a90f718686a98408b2bd668e415b0ee8a5639199091320f9877a25c89de324219e96cd72b7c7d2e4fa52fa7322604b82aede3ce
+EBUILD libidn2-0.16-r1.ebuild 1245 SHA256 0149630898a3379290f58ca48229c00ac63f1345e41632a73a86b81dc8e67f51 SHA512 ccd3857fe7b69afb6e5a214f4c32a638558af0ee8d5d63f16d0e3ef7a5ce0a5c7b12f2e920203e2aee1dfd747ca83700ff291aeaf0c0d8427d7a114944e5a873 WHIRLPOOL 2795ee6c77820bbbb2d892bf7409f5ab6e39138ff8aa0a1c6b8e55e7f1403ebecb67a6cf82e90642e97f8ebb072a418dfa4097f3a58c05280749de8f22fb6321
+EBUILD libidn2-2.0.2.ebuild 1215 SHA256 e26f15e66939fcccb1ff14d392e5d8e58b541edd8fb951d6d3728a056ad572cd SHA512 405982e2c61c980bf2f14fd31255abca41590ef60b1010651846d1d1a8ef64bc282e94b2dd4b460c5ae1912610e0ac69417fa0fa19018e8c30424d153b1f52f4 WHIRLPOOL b87ff2d1d4d131652228fd8c3c9df4b58ab1607218fc083e95835d5da533257795a0c7d714d7fb1b6594f1646b2a8d8f80837f2a6f29ae7eb39ce10531673f70
+EBUILD libidn2-2.0.4.ebuild 1231 SHA256 82578bc5b526782f502493a178c6d265446c85e33b793afe6bfc3f57d80a8c18 SHA512 5ee19044ecd0d3cb9e17e3de9a8595d93b234d248ba2b45c0464c2ce13bb063fb5fe861a62e6c9f6811443f9e57c133d243cfec3b23f7d24fbc980ba93fa65a1 WHIRLPOOL a48ba8d0f592ff6cae5a7b0eb338bad28600576f1473e17836ca68b1e2ed88ddc5f4051890efd8306f5e1475e29481861efa28f3a43ac50b409ac08695973e3b
+MISC ChangeLog 3828 SHA256 aefe244e873ffa922bd5fe4ec1e5e04c0a9e53b4b800ba7d45c852e42c59a174 SHA512 86f81bda7e03947c297ae9e43a099aefdc6998a8167cda8a1528cc331b7de0375269606e1c5ce0b78a4f24099916d2e484337919043b6a1562ebcdab58aba454 WHIRLPOOL 6875b1f712a7dd8e351d47711a458104cc915acd3bc0e0c7e3b1322c2844f8a5403aecfa106cf50e33be416b3d126449af713dc29bf45918f6bcca6a47e5b30b
+MISC ChangeLog-2015 523 SHA256 c7b427322922dc669c3a7181888c9db6e86e5e5dadb447c224a6a6fc9ae5e838 SHA512 383ea04d0912da873aa4c53f2750274e44cc964968da2c7766c34f50d7f6294443856900ac962c642d84976e0135ff43dad3d51b9655aac1bb0d56f209af52ff WHIRLPOOL f0e45be2ab24678fef9bdba1634e27841d3cc841e3c76ed6db9189735a4d44c51680d8877ee1b8c4421030d0f53ebab6fc262749f46c3609229294c33e23de81
+MISC metadata.xml 210 SHA256 59333e331c55cfd39ab5a54817053590464e735d79003424078790bad0f03885 SHA512 f7cbe57a24b67a28696f91061ad8bd61d7d4cf3d59d20c3dcc6a4921e29672d00ecf3ece70a8813399d2467ebd626f8f829300e81fc722e9aaa527e213a5fb54 WHIRLPOOL 4720a4dc9840fd244dc5c4ce9695cdb0007a36c7b0262d4db8a8b0fec37fc718fd0c33f87c9ca0cfd5f5f09b6fe42f1cf93103a85de3f2c3d5dce10a82ef082d
diff --git a/net-dns/libidn2/files/libidn2-0.12-Werror.patch b/net-dns/libidn2/files/libidn2-0.12-Werror.patch
new file mode 100644
index 000000000000..9ab14656f9e8
--- /dev/null
+++ b/net-dns/libidn2/files/libidn2-0.12-Werror.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,7 +27,7 @@
+ AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_HEADERS([config.h])
+ AC_CONFIG_MACRO_DIR([m4])
+-AM_INIT_AUTOMAKE([-Wall -Werror subdir-objects])
++AM_INIT_AUTOMAKE([-Wall subdir-objects])
+ AC_CANONICAL_HOST
+
+ AC_PROG_CC
diff --git a/net-dns/libidn2/files/libidn2-0.12-examples.patch b/net-dns/libidn2/files/libidn2-0.12-examples.patch
new file mode 100644
index 000000000000..4972fece578d
--- /dev/null
+++ b/net-dns/libidn2/files/libidn2-0.12-examples.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -15,7 +15,7 @@
+
+ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+
+-SUBDIRS = lib . src doc examples tests po
++SUBDIRS = lib . src doc tests po
+ ACLOCAL_AMFLAGS = -I m4
+ EXTRA_DIST = m4/gnulib-cache.m4
+
diff --git a/net-dns/libidn2/files/libidn2-0.16-cross.patch b/net-dns/libidn2/files/libidn2-0.16-cross.patch
new file mode 100644
index 000000000000..bf963e9f4673
--- /dev/null
+++ b/net-dns/libidn2/files/libidn2-0.16-cross.patch
@@ -0,0 +1,28 @@
+https://gitlab.com/jas/libidn2/issues/6
+
+the release ships with this source file, so don't regen it on every build.
+doing so breaks cross-compilation currently.
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -66,7 +66,8 @@
+ noinst_PROGRAMS = gentr46map
+ gentr46map_LDADD = $(LTLIBUNISTRING)
+
+-tr46map_data.c: gentr46map.c gentr46map$(EXEEXT) $(TR46MAP) $(NFCQC)
++tr46map_data.c: $(srcdir)/gentr46map.c $(TR46MAP) $(NFCQC)
++ $(MAKE) gentr46map$(EXEEXT)
+ $(builddir)/gentr46map$(EXEEXT) > $@.new
+ mv $@.new $@
+
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -34,7 +34,7 @@
+ dist_man_MANS = idn2.1 $(gdoc_MANS)
+ CLEANFILES = $(dist_man_MANS) lookup.c register.c stamp-vti version.texi $(srcdir)/libidn2.info
+
+-idn2.1: $(top_srcdir)/src/idn2.c $(top_srcdir)/src/idn2.ggo $(top_srcdir)/configure.ac
++idn2.1: $(top_srcdir)/src/idn2.c $(top_srcdir)/src/idn2.ggo
+ $(HELP2MAN) \
+ --name="Libidn2 Internationalized Domain Names (IDNA2008/TR46) conversion" \
+ --output=$@ \
diff --git a/net-dns/libidn2/files/libidn2-0.16-gengetopt.patch b/net-dns/libidn2/files/libidn2-0.16-gengetopt.patch
new file mode 100644
index 000000000000..80b10de1b80f
--- /dev/null
+++ b/net-dns/libidn2/files/libidn2-0.16-gengetopt.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -30,7 +30,7 @@
+ libidn2_cmd_la_LIBADD = ../lib/libgnu.la
+ libidn2_cmd_la_CFLAGS =
+
+-idn2_cmd.c idn2_cmd.h: idn2.ggo Makefile.am
++idn2_cmd.c idn2_cmd.h: idn2.ggo
+ gengetopt --unamed-opts --no-handle-version --no-handle-help \
+ --set-package="idn2" \
+ --input $^ --file-name idn2_cmd
diff --git a/net-dns/libidn2/files/libidn2-pkgconfig.diff b/net-dns/libidn2/files/libidn2-pkgconfig.diff
new file mode 100644
index 000000000000..a5406bd862a1
--- /dev/null
+++ b/net-dns/libidn2/files/libidn2-pkgconfig.diff
@@ -0,0 +1,42 @@
+https://bugs.gentoo.org/609188
+
+diff --git a/Makefile.am b/Makefile.am
+index f851231..438b4ce 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -113,3 +113,6 @@ check-coverage:
+
+ clean-local:
+ rm -rf */*.gc?? */*/*.gc?? $(LCOV_INFO) lcov
++
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = libidn2.pc
+diff --git a/configure.ac b/configure.ac
+index bfaff9a..6087f20 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -86,6 +86,7 @@ AC_CONFIG_FILES([
+ examples/Makefile
+ idn2.h
+ lib/Makefile
++ libidn2.pc
+ po/Makefile.in
+ src/Makefile
+ tests/Makefile
+diff --git a/libidn2.pc.in b/libidn2.pc.in
+new file mode 100644
+index 0000000..0dade23
+--- /dev/null
++++ b/libidn2.pc.in
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++includedir=@includedir@
++libdir=@libdir@
++
++Name: libidn2
++Description: Library implementing IDNA2008 and TR46
++Version: @PACKAGE_VERSION@
++Cflags: -I${includedir}
++Libs: -L${libdir} -lidn2
++Libs.private: @LTLIBICONV@ @LTLIBUNISTRING@
diff --git a/net-dns/libidn2/libidn2-0.16-r1.ebuild b/net-dns/libidn2/libidn2-0.16-r1.ebuild
new file mode 100644
index 000000000000..44f0043788a3
--- /dev/null
+++ b/net-dns/libidn2/libidn2-0.16-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils multilib-minimal
+
+DESCRIPTION="An implementation of the IDNA2008 specifications (RFCs 5890, 5891, 5892, 5893)"
+HOMEPAGE="https://www.gnu.org/software/libidn/#libidn2 https://gitlab.com/jas/libidn2"
+SRC_URI="
+ mirror://gnu-alpha/libidn/${P}.tar.gz
+"
+
+LICENSE="GPL-2+ LGPL-3+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="
+ dev-libs/libunistring[${MULTILIB_USEDEP}]
+"
+DEPEND="
+ ${RDEPEND}
+ dev-lang/perl
+ sys-apps/help2man
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.12-Werror.patch
+ "${FILESDIR}"/${PN}-0.12-examples.patch
+ "${FILESDIR}"/${PN}-0.16-gengetopt.patch
+ "${FILESDIR}"/${PN}-0.16-cross.patch
+ "${FILESDIR}"/${PN}-pkgconfig.diff
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --disable-gtk-doc
+}
+
+multilib_src_install() {
+ default
+
+ prune_libtool_files
+}
diff --git a/net-dns/libidn2/libidn2-2.0.2.ebuild b/net-dns/libidn2/libidn2-2.0.2.ebuild
new file mode 100644
index 000000000000..d2719918e52a
--- /dev/null
+++ b/net-dns/libidn2/libidn2-2.0.2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic multilib-minimal
+
+DESCRIPTION="An implementation of the IDNA2008 specifications (RFCs 5890, 5891, 5892, 5893)"
+HOMEPAGE="https://www.gnu.org/software/libidn/#libidn2 https://gitlab.com/jas/libidn2"
+SRC_URI="
+ mirror://gnu/libidn/${P}.tar.gz
+"
+
+LICENSE="GPL-2+ LGPL-3+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="
+ dev-libs/libunistring[${MULTILIB_USEDEP}]
+"
+DEPEND="
+ ${RDEPEND}
+ dev-lang/perl
+ sys-apps/help2man
+"
+
+src_prepare() {
+ default
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # Darwin ar chokes when TMPDIR doesn't exist (as done for some
+ # reason in the Makefile)
+ sed -i -e '/^TMPDIR = /d' Makefile.in || die
+ export TMPDIR="${T}"
+ fi
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --disable-gtk-doc
+}
+
+multilib_src_install() {
+ default
+
+ prune_libtool_files
+}
diff --git a/net-dns/libidn2/libidn2-2.0.4.ebuild b/net-dns/libidn2/libidn2-2.0.4.ebuild
new file mode 100644
index 000000000000..7b64e993d3ac
--- /dev/null
+++ b/net-dns/libidn2/libidn2-2.0.4.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic multilib-minimal
+
+DESCRIPTION="An implementation of the IDNA2008 specifications (RFCs 5890, 5891, 5892, 5893)"
+HOMEPAGE="https://www.gnu.org/software/libidn/#libidn2 https://gitlab.com/jas/libidn2"
+SRC_URI="
+ mirror://gnu/libidn/${P}.tar.gz
+"
+
+LICENSE="GPL-2+ LGPL-3+"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND="
+ dev-libs/libunistring[${MULTILIB_USEDEP}]
+"
+DEPEND="
+ ${RDEPEND}
+ dev-lang/perl
+ sys-apps/help2man
+"
+
+src_prepare() {
+ default
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # Darwin ar chokes when TMPDIR doesn't exist (as done for some
+ # reason in the Makefile)
+ sed -i -e '/^TMPDIR = /d' Makefile.in || die
+ export TMPDIR="${T}"
+ fi
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --disable-doc \
+ --disable-gtk-doc
+}
+
+multilib_src_install() {
+ default
+
+ prune_libtool_files
+}
diff --git a/net-dns/libidn2/metadata.xml b/net-dns/libidn2/metadata.xml
new file mode 100644
index 000000000000..5ba62861f1c4
--- /dev/null
+++ b/net-dns/libidn2/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>jer@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-dns/maradns/Manifest b/net-dns/maradns/Manifest
new file mode 100644
index 000000000000..e008a60c49c8
--- /dev/null
+++ b/net-dns/maradns/Manifest
@@ -0,0 +1,12 @@
+AUX deadwood 475 SHA256 e96d1955a0b3193a6f34aeca4009e772c56ea511abe6b1d5dcb5d4e7512b781e SHA512 ea01c5cd9494a9dd5c8146f0de84c6bd4df3ba2221b52b87886892cbc13aad21f273ea1d056c3dd88ae5e15c1f6f820f9fe4b1dd4c9ae7082d7f7f78b3f8813e WHIRLPOOL e3ed1752c228a26a662c0c011f3f4de0657e15da70ba71e458414e4f3451740b070b11c9c3d0e4409e28f23b26656941b7e5952f514a4e2cda35d796afe8c625
+AUX maradns-2.0.06-askmara-tcp.patch 7330 SHA256 b5b8f8acb732d2d85667557861c500bcb50d75dcc2213686ebd7a382299f57b6 SHA512 0a36bbe9fbf8d48e6e1e20cc6045656f3517f650bc055b1abecdac4e2eb2e0f4c0f41ed960913ec38590f76a16762a518ca3f20799b8ee64223530da5b2d0dee WHIRLPOOL a88b27c61e3a36348ccaff66488638a04921303c5911283ec19970d6facd86cd4d07d8e9cd66f41d8c0bdd766b90871e85cf7ea4b2c62ab1eb4f51d680858284
+AUX maradns-2.0.06-duende-man.patch 3393 SHA256 ae68fb3f32c7d02267d8dbf187d9d358051b547499aa0fa3b97ae031ce4ec569 SHA512 ff4996e9b377fe01d90f36bf306085e981e1b00bb6264e69e04f9bc53271d98201ec84ea773630453840b357fdf2d3aa46c48fb3af3812cb97627a66fa77bc58 WHIRLPOOL 97b8029491a5abc434a99e6e4f030339c302e1a3c1ddbc6548a5c2c6f883de1986eff82acde310168937ecda2b7ddb9ded04b2b5200cd3e3f710eaf5902c6792
+AUX maradns-2.0.09-build.patch 1549 SHA256 f424bec17d95383b2044ae09b5425aff9b872ed7ef98444d85bf5e780a7fe074 SHA512 6d06102cb8d6c5333521f9ffc75d775382c9113372fa1b80516677ef11513718d41a740a79d9f970420dc0fcede3c7bc2c9a41a08fb8c138e4063fbcbfb5c5f3 WHIRLPOOL be26700327c7f74bb24c6747118da29c9007c44be444e6157ddcce705054d3e421b9bb9ea6df66249ebe025fc18e28ffe04694e7eb58de91224d80d25aa17781
+AUX maradns.service.in 159 SHA256 7ef5236c1f764f45dd8218fdc5ff50ae1d9ab606a1759b0f346352e3289a2008 SHA512 0de3b9141b8266cb6443b8a7fcb6243782059d2ea45b89421158ded607413eb491542c279f2a9b4455e9396e6ba20e46aed8f46eba3b04e5bd428f335c4b9582 WHIRLPOOL f2fa69f08e6c69a872a32dcb9fdf82abab8f70119631fcd01845b05709c477fdc61dfd31ec2fefc16d6ac3bec0a7c4bb796a74097f5d5ac82e052c080db27d5b
+AUX maradns2 481 SHA256 f3968217d381e5ff5f8f4cbac23f9a25af8cbf174b3a4d8c970ffd91840cd32a SHA512 e893020a934c5927b772189c034469055cd0d8a8ab3e066fe063e30999be6a6679e7b95c2761dec1326cec37fe5261541fbb27e9be796681764c75252b10e90b WHIRLPOOL cd9761e7fd97b62c0cfc5d84e8f491b5e32ae2d2c5f72c02275b502f3f18864d6755b2f6c7d5a6301b9882e186345620c6d9c8b3908d138793853025a9a53662
+AUX zoneserver2 483 SHA256 11acc1b92e0503d01988ef18f48542ee0e6331b12ffe9d8e07cbbda3cc4d143b SHA512 dc5dd43b043417002fce4c3d6c2e5417bc68fae7a0ac4db03f7cb382d348ed6b2c7042c38ffc2db3a4c36abf734e9d34124042a4077090bd7947241aab955ab7 WHIRLPOOL 90fec044513a38f005ac4bb5dc1b870974039efc3717e6910776810c642002c3cb5f4be2fecaa57d7e416143497809e129d99a366150a8b0408f1a6ed3998192
+DIST maradns-2.0.09.tar.bz2 1139409 SHA256 e1ee80836f0fbc47b9b94ec839e112ea19c40bed0b70d672d231849a4dea1083 SHA512 42bfcafaf4e465d8d566b4d9ea8383b5d0f553486b86dd807b35a07358987227e5dc8187de0e8192fba5b53098d61f91091cec112ef7cc80c5d5e73d8acff3bf WHIRLPOOL 6f3e55d8c6633a465c0e9de576921d833c67332cf0cbc8c01e7bc7d70c46102c32566d0ee867cdbf11c8b2b1d5cdc40d18ee4791bd0a4e045ad0e0bc590e61d6
+EBUILD maradns-2.0.09-r2.ebuild 2691 SHA256 0289d3d002c28ad90009837378ac97e0ab5ec6c3104fb84bd3d7b32a3b860bb7 SHA512 481512b5a855aa8751ae8d3699c2b3218cf05e5ec2808df30502ed2e20756e1d50ce8714e8acd09eba09f6b3faa8442345bc9187ca5eae53a0bd178421a92f12 WHIRLPOOL 6853ccf4507686b1dc53ad48d7c3b4714c0681ce297220370abbe7b3eb5558c1f470c96d5e346b2009415b49848c8b4e756bc9609846fa27afa3f93cf4752b40
+MISC ChangeLog 4306 SHA256 37e040ff93816a78715f89c49fc0b431d79d538715b09ad25a363b68b0033163 SHA512 08d9466cef50e9b24489eee4e21d13de6e135c73f5a723e8a02efe9c61b5d98ab5111e21aec29906af055a7f91fd6aa2956afa51fb5e1400a7e8fb9237e1efdf WHIRLPOOL 723097ad9a75cb87f22b27f53ef00d4afe8f08b89257f0b8795980e079b72ab7fa600c3d588416667d0c4846b2319d81441556e8edc8f04b28ca34db8c0d4110
+MISC ChangeLog-2015 9747 SHA256 8585c9e4d407d7e6d87c24fcc2b78afc5e8a040f59b27bbe1cd8bd25bb820225 SHA512 eb00016355d88ad33eaf3ebce051f143c47c3fc0b281c0500efb9d455780a00f57a8304f6ead5c613f750288f9c50718e66643af023fabf20f9259b5252e8f34 WHIRLPOOL a5fbb13e17aa16bcc9eb720aaeaa341801ca1fa532d5bc21c8470cd179b81c3b795c18f0a88d318f6cb0eb58b1d3fc2d993614d5bc0f4be7ef93aa4f8032b058
+MISC metadata.xml 260 SHA256 4e1168b6b7d45964d30bf67e09fc1e0d8deaa998786beea02a87e8d417765d8b SHA512 cdaae37fa04f21f3befee89862ddccc792762def511336f1aae564701ed87acddd2d5a4a4723b9bf12d7b1a51a0861c22e76c1cb8cfc6d426c59dcff4405cbd6 WHIRLPOOL d85cc923086fa34ab6094d09c1981c272895bd96fea8eb4ff851f3603398bc508eef5f2310f08da91af0aed9f66a056b837497403f69fdb7a88d931cfc8db595
diff --git a/net-dns/maradns/files/deadwood b/net-dns/maradns/files/deadwood
new file mode 100644
index 000000000000..f0531d133c28
--- /dev/null
+++ b/net-dns/maradns/files/deadwood
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting deadwood"
+ start-stop-daemon --start --quiet --name deadwood --wait 1000 \
+ --exec /usr/bin/duende /usr/sbin/Deadwood -- -f /etc/maradns/dwood3rc
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping deadwood"
+ start-stop-daemon --stop --quiet --name deadwood --wait 1000 \
+ --exec /usr/bin/duende
+ eend $?
+}
diff --git a/net-dns/maradns/files/maradns-2.0.06-askmara-tcp.patch b/net-dns/maradns/files/maradns-2.0.06-askmara-tcp.patch
new file mode 100644
index 000000000000..107097159c83
--- /dev/null
+++ b/net-dns/maradns/files/maradns-2.0.06-askmara-tcp.patch
@@ -0,0 +1,251 @@
+Author: Nicholas Bamber <nicholas@periapt.co.uk>
+Subject: askmara-tcp lazily copies askmara usage and man page
+Last-Updated: 2011-09-21
+Forwarded: no
+--- a/tools/askmara_labels_en.h
++++ b/tools/askmara_labels_en.h
+@@ -1,11 +1,12 @@
+ /* Placed in the public domain 2001 by Sam Trenholme */
+
+-/* All of the labels for replies used in askmara */
++/* All of the labels for replies used in askmara(-tcp) */
+
+ #define L_NEWLINE "\n"
+ #define L_HARD_ERROR "Hard Error: "
+ #define L_QUERYING "Querying the server with the IP "
+ #define L_USAGE "Usage: askmara [-n] [-v | -t timeout] Query [server]\n#Example: askmara Ayahoo.com."
++#define L_USAGE_TCP "Usage: askmara-tcp [-n] [-v | -t timeout] Query [server]\n#Example: askmara-tcp Ayahoo.com."
+ #define L_JS_CREATE_INDATA "js_create with indata"
+ #define L_JS_CREATE_UINDATA "js_create with uindata"
+ #define L_JS_CREATE_OUTDATA "js_create with outdata"
+--- a/tools/askmara-tcp.c
++++ b/tools/askmara-tcp.c
+@@ -190,7 +190,7 @@
+ nrd = 1;
+ else if(argv[0][0] == '-' && argv[0][1] == 'p') {
+ if(argc < 2) {
+- harderror(L_USAGE);
++ harderror(L_USAGE_TCP);
+ }
+ argc--;
+ argv++;
+@@ -201,7 +201,7 @@
+ }
+ else if(argv[0][0] == '-' && argv[0][1] == 't') {
+ if(argc < 2) {
+- harderror(L_USAGE);
++ harderror(L_USAGE_TCP);
+ }
+ argc--;
+ argv++;
+@@ -213,14 +213,14 @@
+ else if (argv[0][0] != '-')
+ break;
+ else
+- harderror(L_USAGE);
++ harderror(L_USAGE_TCP);
+ argc--;
+ argv++;
+ }
+
+ /* we expect now the query string and possibly the server */
+ if(argc<1)
+- harderror(L_USAGE);
++ harderror(L_USAGE_TCP);
+
+ /* Determine what IP address to connect to */
+ if(argc>1)
+--- /dev/null
++++ b/doc/en/man/askmara-tcp.1
+@@ -0,0 +1,191 @@
++.\" Do *not* edit this file; it was automatically generated by ej2man
++.\" Look for a name.ej file with the same name as this filename
++.\"
++.\" Process this file with the following
++.\" nroff -man -Tutf8 maradns.8 | tr '\020' ' '
++.\"
++.\" Last updated Mon Sep 27 15:36:06 2010
++.\"
++.TH ASKMARA-TCP 1 "askmara-tcp" "January 2002" "askmara-tcp"
++.\" We don't want hyphenation (it's too ugly)
++.\" We also disable justification when using nroff
++.\" Due to the way the -mandoc macro works, this needs to be placed
++.\" after the .TH heading
++.hy 0
++.if n .na
++.\"
++.\" We need the following stuff so that we can have single quotes
++.\" In both groff and other UNIX *roff processors
++.if \n(.g .mso www.tmac
++.ds aq \(aq
++.if !\n(.g .if '\(aq'' .ds aq \'
++
++.SH "NAME"
++.PP
++askmara-tcp \- do simple dns queries over TCP
++.SH "DESCRIPTION"
++.PP
++.B "askmara-tcp"
++queries the user-specified dns server for records, and
++outputs the reply in a csv2-compatible format (csv2 is the format of
++zone
++files that
++.B "maradns"
++uses). However unlike
++.B "askmara"
++it uses TCP rather than UDP.
++.SH "USAGE"
++.PP
++.B "askmara-tcp"
++.RB [ -n ]
++.RB [ -v | -t
++.IR timeout ]
++.I query
++.RI [ server ]
++.SH "OPTIONS"
++.PP
++.TP 4
++.BI -t
++If this is present, the following argument is the askmara-tcp
++.IR timeout ,
++in seconds. Note that
++.B "askmara-tcp"
++can not both have a user-defined
++timeout and verbose output.
++.TP 4
++.BI -v
++If this is set,
++.B "askmara-tcp"
++will verbosely output the complete reply that the server sent. Note
++that this verbose output is not csv2-compatible.
++.TP 4
++.BI -n
++If this is set,
++.BR "askmara-tcp" ","
++when sending out a query, will not
++request DNS recursion; in other words, askmara-tcp will request that the
++remote DNS server not contact other DNS servers to answer the query in
++question.
++.TP 4
++.I query
++dns record to be queried. The query has two sections:
++The type of record we desire, and the hostname we want this record for.
++.PP
++The type of query can have two forms: A one-letter mnemonic, or a
++numeric rtype followed by a colon. This is immediately concatenated by
++the full name of the host name we wish to look up.
++.PP
++For example, to ask for the IP of \(aqexample.com.\(aq, we can use the
++one-letter
++mnemonic, in the form \(aqAexample.com.\(aq, or we can use the numeric
++RR followed
++by a colon, giving the query \(aq1:example.com.\(aq (since A has the
++record type
++of one). Note that the query name needs the trailing dot at the end.
++.PP
++Askmara supports a handful one-letter mnemonics, as follows:
++.PP
++.B "A"
++signifies a request for an A (ipv4 address) RR
++.PP
++.B "N"
++signifies a NS RR
++.PP
++.B "C"
++signifies that we are asking for a CNAME RR
++.PP
++.B "S"
++signifies that we want a SOA RR
++.PP
++.B "P"
++signifies that we want a PTR RR
++.PP
++.B "@"
++signifies that we mant a MX RR
++.PP
++.B "T"
++signifies that we want a TXT RR
++.PP
++.B "Z"
++signifies that we want to ask for all RRs.
++.TP 4
++.I server
++IP address of the dns server to be queried. If no server is given,
++askmara-tcp will query 127.0.0.1.
++.PP
++.SH "EXAMPLES"
++.PP
++Asking the server with the ip 127.0.0.1 for the IP address of
++example.com:
++
++.nf
++askmara-tcp Aexample.com.
++.fi
++
++Asking the server with the ip 198.41.0.4 for the IP address of
++example.com:
++
++.nf
++askmara-tcp Aexample.com. 198.41.0.4
++.fi
++
++Asking the server with the ip address 127.0.0.1 for the IP address of
++example.com, using the rr_number:query format:
++
++.nf
++askmara-tcp 1:example.com.
++.fi
++
++Asking the server with the ip address 127.0.0.1 for a SRV record. In
++particular, we ask for the "http over tcp" service for example.net.
++Since askmara-tcp doesn\(aqt have a mnemonic for SRV record types, we
++use the numeric code (33 for SRV):
++
++.nf
++askmara-tcp 33:_http._tcp.example.net.
++.fi
++
++Asking the server with the ip address 127.0.0.1 for the AAAA (ipv6 ip)
++record for example.net:
++
++.nf
++askmara-tcp 28:example.net.
++.fi
++
++Note that the output will be a raw DNS packet in both the SRV
++and AAAA examples.
++.SH "BUGS"
++.PP
++When askmara-tcp is asked for an SOA record, the output of
++.B "askmara-tcp"
++closely resembles the format of a csv2 file, but can not be parsed as a
++csv2 file without modification.
++.PP
++askmara-tcp outputs multi-chunk ("character-string") TXT
++records incorrectly (it only outputs the first chunk).
++.SH "SEE ALSO"
++.PP
++.B maradns(8),
++.B askmara(1)
++
++.br
++http://www.maradns.org
++.SH "LEGAL DISCLAIMER"
++.PP
++THIS SOFTWARE IS PROVIDED BY THE AUTHORS \(aq\(aqAS IS\(aq\(aq AND ANY
++EXPRESS
++OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
++LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
++CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
++SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
++BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
++WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
++OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
++EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++.SH "AUTHOR"
++.PP
++MaraDNS is written by Sam Trenholme. Jaakko Niemi used 5 minutes
++to roll this manpage together, which Sam has subsequently revised.
++
diff --git a/net-dns/maradns/files/maradns-2.0.06-duende-man.patch b/net-dns/maradns/files/maradns-2.0.06-duende-man.patch
new file mode 100644
index 000000000000..8e9283bc0802
--- /dev/null
+++ b/net-dns/maradns/files/maradns-2.0.06-duende-man.patch
@@ -0,0 +1,109 @@
+Author: Nicholas Bamber <nicholas@periapt.co.uk>
+Subject: Duende man page
+ We have made various changes to the duende executable and these need to
+ be reflected in the Debian man page.
+Forwarded: yes
+Last-Update: 2011-07-18
+--- a/doc/en/man/duende.8
++++ b/doc/en/man/duende.8
+@@ -29,11 +29,12 @@
+ makes a given child process a daemon. The standard output
+ and standard error
+ of the child process is logged via syslog() with a priority of
+-LOG_INFO.
++LOG_ALERT.
+ .SH "USAGE"
+ .PP
+ .B "duende"
+-child_process [ all subsequent arguments passed on to child ]
++.RB [ options ]
++child_process [ arguments passed onto child ]
+ .SH "DETAILS"
+ .PP
+ When
+@@ -76,48 +77,52 @@
+ duende uses a setuid() call to change the user ID of the logging
+ process
+ to the user with ID 66.
++.SH "OPTIONS"
++.PP
++Most of the above behaviour can be configured by command line arguments.
++.TP 4
++.BI -c | --chroot " directory"
++The log helper process will change its directory and root to this location.
++This defaults to
++.B /etc/maradns/logger "."
++.TP 4
++.BI -i | --ident " string"
++The log helper process will use this string to identify the process when
++sending messages to syslog.
++This defaults to
++.B log-help "."
++.TP 4
++.BI -p | --pid " filename"
++If this argument is present, the duende parent process will store its pid in
++this file.
++.TP 4
++.BI -u | --uid " integer"
++The log helper process will drop its user id to this. This value defaults to
++66.
++.TP 4
++.BI -g | --gid " integer"
++The log helper process will drop its group id to this. This value defaults to
++66.
++.TP 4
++.BI -r | --restart_on " integer"
++The log helper process will restart the child process if it exists with this
++status code. This defaults to 8.
+ .SH "LOGGING"
+ .PP
+ .B "duende"
+ uses the syslog() facility to log the standard output of the
+ program that it invokes. The name of the program (in other words, the
+-"ident" given to openlog()) is the full path of the first argument
+-given
+-to
+-.BR "duende" "."
++"ident" given to openlog()) defaults to
++.BR "log-helper"
++but can be overridden with the
++.RB "--ident"
++argument.
+ All messages created by the child process are sent
+-to syslog() with a priority of LOG_INFO and a "facility"
+-of LOG_DAEMON (daemon.info in /etc/syslog.conf); since daemon.info
+-messages are not logged by default in FreeBSD, on FreeBSD systems
+-messages generated by the child process are logged with a priority of
+-LOG_ALERT and a "facility" of LOG_DAEMON (daemon.alert in
+-/etc/syslog.conf).
++to syslog() with a priority of LOG_ALERT and a "facility"
++of LOG_DAEMON (daemon.info in /etc/syslog.conf).
+ Should duende itself encounter an error, it will send
+ messages to syslog() with a priority of LOG_ALERT.
+ .PP
+-For example, suppose one invokes duende thusly:
+-
+-.nf
+- duende /usr/local/sbin/maradns
+-.fi
+-
+-If invoked thusly, duende will log all messages with the "ident"
+-(program
+-name) of "/usr/local/sbin/maradns". If this is not desired, invoke
+-duende
+-with something like:
+-
+-.nf
+- export PATH=$PATH:/usr/local/sbin
+- duende maradns
+-.fi
+-
+-This will log messages with a (more sensible) "ident" of maradns.
+-.PP
+-Note: If a non-POSIX Bourne shell (such as csh, es, rc, or fish) is
+-used to
+-invoke MaraDNS, the above syntax needs to be changed.
+-.PP
+ Also, the directory /etc/maradns/logger, while used by duende, is not
+ used
+ to store any log messages. That is unless, for some reason, one
diff --git a/net-dns/maradns/files/maradns-2.0.09-build.patch b/net-dns/maradns/files/maradns-2.0.09-build.patch
new file mode 100644
index 000000000000..33622b9bc876
--- /dev/null
+++ b/net-dns/maradns/files/maradns-2.0.09-build.patch
@@ -0,0 +1,43 @@
+Index: maradns-2.0.09/build/Makefile.linux
+===================================================================
+--- maradns-2.0.09.orig/build/Makefile.linux
++++ maradns-2.0.09/build/Makefile.linux
+@@ -10,7 +10,7 @@ POBJECTS=parse/ParseMaraRc.o parse/Parse
+ DOBJECTS=dns/Queries.o dns/Compress.o dns/bobbit.o
+ # Secure random number generator objects
+ ROBJECTS=rng/rng-api-fst.o rng/rng-alg-fst.o
+-OBJECTS=$(JOBJS) $(MHOBJS) $(SOBJECTS) $(DOBJECTS) $(POBJECTS) $(DOBJECTS) $(ROBJECTS)
++OBJECTS=$(JOBJS) $(MHOBJS) $(SOBJECTS) $(DOBJECTS) $(POBJECTS) $(DOBJECTS) $(ROBJECTS) -lrt
+ EXECS=server/maradns
+
+ # Uncomment the following three lines to get this to compile on Solaris
+@@ -28,19 +28,21 @@ Q="DEFINES=-DSELECT_PROBLEM"
+
+ # Debug
+
+-FLAGS = -O2 -Wall -DSELECT_PROBLEM
++FLAGS=$(CFLAGS) $(LDFLAGS) -Wall -DSELECT_PROBLEM
+ M="CC=$(CC) $(FLAGS)"
+ D="CC=$(CC) $(FLAGS) -DDEBUG -DTHREADS"
+ #FLAGS = -g
+
+ all:
+- cd libs ; make $(M) ; cd ../dns ; make $(M) ; \
+- cd ../rng ; make $(M) ; cd ../parse ; make $(M) ; \
+- cd ../qual ; make $(M) ; cd ../server ; \
+- make $(M) $(V) COMPILED=\"$(COMPILED)\" ; \
+- cd ../tools ; make $(M) ; \
+- cd ../deadwood-*/src/ ; make FLAGS=-O2 ; \
+- cd ../../tcp ; make $(M) $(V) ; cat ../00README.FIRST
++ $(MAKE) -C libs $(M)
++ $(MAKE) -C dns $(M)
++ $(MAKE) -C rng $(M)
++ $(MAKE) -C parse $(M)
++ $(MAKE_ -C qual $(M)
++ $(MAKE) -C server $(M) $(V) COMPILED=\"$(COMPILED)\"
++ $(MAKE) -C tools $(M)
++ $(MAKE) -C deadwood-*/src $(M)
++ $(MAKE) -C tcp $(M) $(V)
+
+ debug:
+ cd libs ; make $(D) DEBUG="-DDEBUG -DTHREADS" ; \
diff --git a/net-dns/maradns/files/maradns.service.in b/net-dns/maradns/files/maradns.service.in
new file mode 100644
index 000000000000..f27d94653400
--- /dev/null
+++ b/net-dns/maradns/files/maradns.service.in
@@ -0,0 +1,9 @@
+[Unit]
+Description=maradns DNS server
+After=network.target
+
+[Service]
+ExecStart=@bindir@/maradns -cf @sysconfdir@/mararc
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/maradns/files/maradns2 b/net-dns/maradns/files/maradns2
new file mode 100644
index 000000000000..c97ff3bfbb13
--- /dev/null
+++ b/net-dns/maradns/files/maradns2
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+ provide dns
+}
+
+start() {
+ ebegin "Starting maradns"
+ start-stop-daemon --start --quiet --name maradns --wait 1000 \
+ --exec /usr/bin/duende /usr/sbin/maradns -- -f /etc/maradns/mararc
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping maradns"
+ start-stop-daemon --stop --quiet --name maradns --wait 1000 \
+ --exec /usr/bin/duende
+ eend $?
+}
diff --git a/net-dns/maradns/files/zoneserver2 b/net-dns/maradns/files/zoneserver2
new file mode 100644
index 000000000000..18b4cfe64936
--- /dev/null
+++ b/net-dns/maradns/files/zoneserver2
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting zoneserver"
+ start-stop-daemon --start --quiet --name zoneserver --wait 1000 \
+ --exec /usr/bin/duende /usr/sbin/zoneserver -- -f /etc/maradns/mararc
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping zoneserver"
+ start-stop-daemon --stop --quiet --name zoneserver --wait 1000 \
+ --exec /usr/bin/duende
+ eend $?
+}
diff --git a/net-dns/maradns/maradns-2.0.09-r2.ebuild b/net-dns/maradns/maradns-2.0.09-r2.ebuild
new file mode 100644
index 000000000000..2124be1f395b
--- /dev/null
+++ b/net-dns/maradns/maradns-2.0.09-r2.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd toolchain-funcs user
+
+DEADWOOD_VER="3.2.05"
+
+DESCRIPTION="A security-aware DNS server"
+HOMEPAGE="http://www.maradns.org/"
+SRC_URI="http://www.maradns.org/download/${PV%.*}/${PV}/${P}.tar.bz2"
+
+# The GPL-2 covers the init script, bug 426018.
+LICENSE="BSD-2 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc x86"
+IUSE="authonly examples ipv6"
+
+DEPEND=""
+RDEPEND=""
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.0.06-askmara-tcp.patch"
+ "${FILESDIR}/${PN}-2.0.06-duende-man.patch"
+ "${FILESDIR}/${P}-build.patch"
+)
+
+pkg_setup() {
+ ebegin "Creating group and users"
+ enewgroup maradns 99
+ enewuser duende 66 -1 -1 maradns
+ enewuser maradns 99 -1 -1 maradns
+ eend ${?}
+}
+
+src_configure() {
+ # Use duende-ng.c.
+ cp "${S}/tools/duende-ng.c" "${S}/tools/duende.c" \
+ || die "failed to rename duende-ng.c"
+
+ tc-export CC
+ ./configure $(use ipv6 && echo "--ipv6") || die "Failed to configure ${PN}"
+}
+
+src_install() {
+ # Install the MaraDNS binaries.
+ dosbin server/maradns
+ dosbin tcp/zoneserver
+ dobin tcp/getzone tcp/fetchzone
+ dobin tools/askmara tools/askmara-tcp tools/duende
+ dobin tools/bind2csv2.py tools/csv1tocsv2.pl
+
+ # MaraDNS docs, manpages, misc.
+ dodoc doc/en/{QuickStart,README,*.txt}
+ dodoc doc/en/text/*.txt
+ doman doc/en/man/*.[1-9]
+ dodoc maradns.gpg.key
+ dodoc doc/en/*.html
+ dodoc -r doc/en/webpage
+ dodoc -r doc/en/tutorial
+ if use examples ; then
+ docinto examples
+ dodoc doc/en/examples/example_*
+ fi
+
+ # Deadwood binary, docs, manpages, etc.
+ if ! use authonly; then
+ dosbin deadwood-${DEADWOOD_VER}/src/Deadwood
+ doman deadwood-${DEADWOOD_VER}/doc/{Deadwood,Duende}.1
+ docinto deadwood
+ dodoc deadwood-${DEADWOOD_VER}/doc/{Deadwood,Duende,FAQ}.txt
+ dodoc deadwood-${DEADWOOD_VER}/doc/{Deadwood,FAQ}.html
+ docinto deadwood/internals
+ dodoc deadwood-${DEADWOOD_VER}/doc/internals/*
+ insinto /etc/maradns
+ newins deadwood-${DEADWOOD_VER}/doc/dwood3rc-all dwood3rc_all.dist
+ fi
+
+ # Example configurations.
+ insinto /etc/maradns
+ newins doc/en/examples/example_full_mararc mararc_full.dist
+ newins doc/en/examples/example_csv2 example_csv2.dist
+ keepdir /etc/maradns/logger
+
+ # Init scripts.
+ newinitd "${FILESDIR}"/maradns2 maradns
+ newinitd "${FILESDIR}"/zoneserver2 zoneserver
+ if ! use authonly; then
+ newinitd "${FILESDIR}"/deadwood deadwood
+ fi
+
+ # systemd unit
+ # please keep paths in sync!
+ sed -e "s^@bindir@^${EPREFIX}/usr/sbin^" \
+ -e "s^@sysconfdir@^${EPREFIX}/etc/maradns^" \
+ "${FILESDIR}"/maradns.service.in > "${T}"/maradns.service \
+ || die "failed to create the maradns.service file (sed)"
+
+ systemd_dounit "${T}"/maradns.service
+}
diff --git a/net-dns/maradns/metadata.xml b/net-dns/maradns/metadata.xml
new file mode 100644
index 000000000000..e6602b751197
--- /dev/null
+++ b/net-dns/maradns/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<use>
+ <flag name="authonly">Allows one to build only authoritative DNS server</flag>
+</use>
+</pkgmetadata>
diff --git a/net-dns/mdns-repeater/Manifest b/net-dns/mdns-repeater/Manifest
new file mode 100644
index 000000000000..71204d7f4cfe
--- /dev/null
+++ b/net-dns/mdns-repeater/Manifest
@@ -0,0 +1,4 @@
+DIST mdns-repeater-28ecc2ab9a0e.tar.gz 10697 SHA256 6b5ccc638c7fb7fd35d71d2b736921ac3f08fc702f6fb5fc3cf0405e22275a92 SHA512 06b8365a389ccc77bc31ebcbf7089e59bd2e03e4996e719f369e7c54dbc96b1ea57c9e0b82d4376fcb165160e04a48a3a679f9ab431344f46d74a3602e58a0d8 WHIRLPOOL 25b00eb941133720311556013a9a0f4ad22e784bbbea4098a5a3d9be3c418a3d041b73b739f90829f68af89c7592ce66a302053f5127013cdba20a67a20e2f09
+EBUILD mdns-repeater-20110921.ebuild 556 SHA256 68d485d718d85fa21f86dd8350420c4daf032f461cd3c166542f63606348984b SHA512 7036958a0de08911d7696367f79fd5d8c770b3909ca5d600c4323caf6d29663e214f6bc6b4136769f0067d69d55a2e8bbbebc3b39dafd12a9b4d60e3c4b0331c WHIRLPOOL 3a7e6c3618135ca4dfc452864f6b9bc0d1fca895f5485531f2da4a4e7789fcd5c8efcbe2367015317b5b10e3aabbdafdf70a55bb224faec668daadb8c7c83df5
+MISC ChangeLog 567 SHA256 2b5eb0b35cd433c06eb2e7b96c2c76e7b92abacdcb4bb29b7f76c1994aed504c SHA512 eb49f2c22a61be1f98de2ff695da05974cdbde9cbde3f680a6834052caf0ce22d05ffe01d8f6fb1865f8518f6ca52bf08a64c02762bb627cd9c753a9355f0a37 WHIRLPOOL e8a488c812c6a42a2901716acbe993b478aa545fd50c9144a4871d526db4cf65edf412a2f9e939c823485c83a9ce410ab8903f01fc7e7d38d92f5f69ab22e9fb
+MISC metadata.xml 472 SHA256 2b5593e803d3887eb6ef0cd15719e7d53207edf1eea5061028cdba306cc34f59 SHA512 b26c5d02e9325075a58b99844baa558b5822ca39d9e35965aed9ad4480a702bd079236ad73a815a1977f2cbdf2f57fab6570b71536b64cb9221d2efb87bd9219 WHIRLPOOL 713fa0968a4f7e3ce75bd3f7405c581b53ebcc6ccde0a7f696037c2533f4206b4344837fbeb1d0a86cf5fe1957906c0af711b26889eed61c5fd70ee3e3651aff
diff --git a/net-dns/mdns-repeater/mdns-repeater-20110921.ebuild b/net-dns/mdns-repeater/mdns-repeater-20110921.ebuild
new file mode 100644
index 000000000000..262d90f35c60
--- /dev/null
+++ b/net-dns/mdns-repeater/mdns-repeater-20110921.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Multicast DNS repeater"
+HOMEPAGE="https://bitbucket.org/geekman/mdns-repeater/"
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm"
+
+REV="28ecc2ab9a0e"
+SRC_URI="https://bitbucket.org/geekman/mdns-repeater/get/${REV}.tar.gz -> ${PN}-${REV}.tar.gz"
+S="${WORKDIR}/geekman-mdns-repeater-${REV}"
+
+src_configure() {
+ tc-export CC
+}
+
+src_compile() {
+ emake HGVERSION="${REV}"
+}
+
+src_install() {
+ dobin "${PN}"
+}
diff --git a/net-dns/mdns-repeater/metadata.xml b/net-dns/mdns-repeater/metadata.xml
new file mode 100644
index 000000000000..1306680b2568
--- /dev/null
+++ b/net-dns/mdns-repeater/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>cernekee@chromium.org</email>
+ <name>Kevin Cernekee</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Gentoo Proxy Maintainers Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="bitbucket">geekman/mdns-repeater</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/metadata.xml b/net-dns/metadata.xml
new file mode 100644
index 000000000000..18ee426a8540
--- /dev/null
+++ b/net-dns/metadata.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The net-dns category contains DNS (Domain Name Service) related
+ software.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie net-dns enthült Software zum Thema DNS (Domain Name Service).
+ </longdescription>
+ <longdescription lang="es">
+ La categoría net-dns contiene programas relacionados con el DNS, el
+ sistema de resolución de nombres de dominio.
+ </longdescription>
+ <longdescription lang="ja">
+ net-dnsカテゴリーにはドメイン・ネーム・サービスに関連したソフトウェアが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De net-dns categorie bevat DNS (Domain Name Service) applicaties.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm net-dns chứa các phần mềm liên quan đến DNS.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria net-dns contiene programmi per DNS (Domain Name Service).
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria net-dns contém programas relacionados a DNS (Domain
+ Name Service).
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria net-dns zawiera pakiety związane z DNS (Domain Name Service).
+ </longdescription>
+</catmetadata>
+
diff --git a/net-dns/mydns/Manifest b/net-dns/mydns/Manifest
new file mode 100644
index 000000000000..62ca6be47d67
--- /dev/null
+++ b/net-dns/mydns/Manifest
@@ -0,0 +1,9 @@
+AUX mydns-1.2.8.27-m4.patch 1983 SHA256 ebd6a22d9af6c6fd734b0756583b116755935f4f1c6a1bd6b10dc685521cbc13 SHA512 0111a517bbeec7101bccf9cda54dc15e46952e156f3a27b9305e0a92d8aeda58756dd4fae568cc5695c2bda25e9232012e117dd52178f1f39992fb4be75167ea WHIRLPOOL c7a8d3c93758346e88bd19be27a6aebbf62a51ae5451325afa56c1e1561a88789d075a4cd3b24cd25bed28eb11bd6e2a9eefb8d221a7834e89a272a57f245d84
+AUX mydns-1.2.8.31-texinfo.patch 923 SHA256 3ab74a5406786b6b851875ca219598972023dfb4a1d32b14d31a823ad7e14dbc SHA512 a6539e9bf7c87425c9ae6c598edd6460e24c46a13de64b4eb08358a3127cc21bd78bdbf6dcb071795b76262d8944d79daa18e3729dbafaea94067b4c4061d915 WHIRLPOOL 2dd482a0345c6d55d029ec857ad6bfffb08ecc7a09fcfe290c3d603ef4340bef3afe87a0e6fa97e1aa836eebfdce746c4a1c0ababec8f5d2c67e2cb26cf1a9a4
+AUX mydns.confd 84 SHA256 3a8228a51851bf0ecd08a9db9102a09c2acf40c50700b3cf7faf9b0af018551c SHA512 7fd98de31583d0556734b7313afa257b9f73f4d74611ce03dd44f2d7e833ec4f95b4bf84dab627d59da18f89f7dc1d9eb6d840a90b16556b4e1d97439944452a WHIRLPOOL c4a4350bf8f00dd54bdeea037fff9b3117d8725567d896d8fa05b51cbdced66abd22f3f1a33fa69c091ed432e6785d2b7e0e8883e46f3660842464cceca24f02
+AUX mydns.initd 850 SHA256 efaab3ed8b2976361db2c1f5500b0ab32d4e7e1522b38dfcc696498f60ef68e0 SHA512 919a7022a350b121c8c0eed962d7a7233dc41f2e4cfda1185d642114719a533cff580367b9302b24e8c9d377c2ccb9b02ad45d638d5b483b7c101405cb9ba1be WHIRLPOOL 7f07c094ddaff45442bab6d4a7327bf4d5329f7d447f981076c34b97d78187f6bc7818393cd9c5a50e36405af80e72af6c5d2082d451ffa0559ab9446fefb632
+DIST mydns-1.2.8.31.tar.gz 958701 SHA256 cb10de11ccd948d3b86296c03c6fb692489945d58b0aaee5d17be083f3263629 SHA512 471dfed9b4f38b446fd5896939faa4c58f4e1b3a3e6928fa84eddf769eba8f3406ef08c77ab39ee79d2ac85c1e72a499b283c7404a0cae9830ffe0faee9e2737 WHIRLPOOL 615e8e129b4d3d7b426b58446f9fef7aaf78d025d1454ba46266d15030dff4a223a033bf6bbc4e6401159a99e1b2eae3d60b6bd76378a3d9e86e2dfd1d06e84f
+EBUILD mydns-1.2.8.31-r1.ebuild 2066 SHA256 ba4cdf4f3788c279deef1f7edfe34f8f03fc5ac90ef17caa6c69c06f10fa3f56 SHA512 007e14a8d4616530576173ef53a3e9e6588be18ed132965b265e88cf40874f465e9f391be19cc16d638823a88421718741028c160eb1f047106cc69571509a29 WHIRLPOOL f2b5ce541557823a3cd0c5253557fcefe0bb32efe2d67106ada974d264972fa565232c5cc288bf6e0ba475c73c26ea2e56f8f2460134d6f5e9b35a94564fd5d6
+MISC ChangeLog 3600 SHA256 7b47fe1bff8acd6c2b7f4b282bd27eea83f7ff11bc72d0c62d7c26305d75ef2a SHA512 1ab874763054f89f6513365fde7a760b8b64408128c7fb5c57aba7a0acffde01805b81900d3fd10dd453607f2acbdbbc645ac757c461a0bc4832805e3242c579 WHIRLPOOL b594b1d315121dd7eae6d933a7cbf56cccaf8e539af2b22377dc81518ecf1ebf4974eaf4a4d3e418d3117415478c85f79a22d6af2b8770899bb5d13ecea06a4a
+MISC ChangeLog-2015 6729 SHA256 fa1ca67c990c278cb61a6b6d9dc331e98571e81c6e2c76753840f8785d031564 SHA512 34ef871205f88a86130c640ab28bfe4106d62bb5c2bccaf56c23dc62c8faf3e0dd147b858e3868cb1a098b48a1fd047c54bab49b7dcc50540fea66428c449456 WHIRLPOOL c6e65fcbca8704b76ed0074cb7e644c4dc0bbe258d61400b7889152806ba123a8c1a4b4edb57c8614bf228d77277ab9466d363928a7368f18d1ae90d3992d565
+MISC metadata.xml 396 SHA256 3d2197dce1535a1df160a6b3748714b064765fb36845b017552325ab702ae972 SHA512 cba5e716877204e00ef18549d35bb39f47921389f8712c69ce81b8dd365505d6ea95fed89976bfc6722343dadd15f914f27d26fe35416c242e7963d467b147d0 WHIRLPOOL ee3f9be2ea4b76c6db1229c200f8968b355d3091e8c9cdcfd9be84f7d29ff5333610bbead68a7859e60431b433467fb265ae2c601a99bd404fc27f82afc946ba
diff --git a/net-dns/mydns/files/mydns-1.2.8.27-m4.patch b/net-dns/mydns/files/mydns-1.2.8.27-m4.patch
new file mode 100644
index 000000000000..c32e7613b466
--- /dev/null
+++ b/net-dns/mydns/files/mydns-1.2.8.27-m4.patch
@@ -0,0 +1,53 @@
+--- mydns-1.1.0/m4/mydns.m4.orig 2010-12-01 21:57:52.000000000 +0100
++++ mydns-1.1.0/m4/mydns.m4 2010-12-01 22:07:24.000000000 +0100
+@@ -542,46 +542,10 @@
+ ##
+ AC_DEFUN([AC_LIB_MYSQLCLIENT],
+ [
+- libmysqlclient_dirs="/usr/local/mysql/lib /usr/local/lib/mysql /usr/local/lib /usr/lib/mysql /usr/lib /lib"
+- AC_ARG_WITH(mysql-lib,
+- AC_HELP_STRING([--with-mysql-lib=DIR], [look for the MySQL client library in DIR]),
+- libmysqlclient_dirs="$withval $libmysqlclient_dirs")
+- libmysqlclient_found=no, libmysqlclient_ok=no
+- for libmysqlclient_dir in $libmysqlclient_dirs; do
+- if test "$libmysqlclient_found" != yes; then
+- AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient_r.so, libmysqlclient_found=yes, libmysqlclient_found=no)
+- if test "$libmysqlclient_found" != yes; then
+- AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient.so, libmysqlclient_found=yes, libmysqlclient_found=no)
+- fi
+- if test "$libmysqlclient_found" != yes; then
+- AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient.a, libmysqlclient_found=yes, libmysqlclient_found=no)
+- fi
+- if test "$libmysqlclient_found" = yes; then
+- ## libmysqlclient depends on libz
+- if ! test -n "$LIBZ"; then
+- AC_LIB_Z
+- fi
+- if ! test -n "$LIBZ"; then
+- ## No zlib
+- AC_MSG_ERROR([
+-
+-][ ###
+-][ ### zlib compression library (libz.a) not found.
+-][ ###
+-][ ### Please download and install the zlib compression
+-][ ### library from the following URL:
+-][ ###
+-][ ### http://www.gzip.org/zlib/
+-][ ###
+-][ ### (Error detail might be available in `config.log')
+-][ ###
+-])
+- fi
+- LIBMYSQLCLIENT="-L$libmysqlclient_dir -lmysqlclient"
+- libmysqlclient_found=yes
+- fi
+- fi
+- done
++ AC_CHECK_PROG(LIBMYSQLCLIENT,mysql_config,`mysql_config --libs`)
++ if test -z "$LIBMYSQLCLIENT"; then
++ AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
++ fi
+ AC_SUBST(LIBMYSQLCLIENT)
+ ]
+ )
diff --git a/net-dns/mydns/files/mydns-1.2.8.31-texinfo.patch b/net-dns/mydns/files/mydns-1.2.8.31-texinfo.patch
new file mode 100644
index 000000000000..7b6b3d1a5aa3
--- /dev/null
+++ b/net-dns/mydns/files/mydns-1.2.8.31-texinfo.patch
@@ -0,0 +1,30 @@
+From d341ad19c32777757d2ade6dc8c096a8d14dfb77 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Thu, 13 Aug 2015 23:10:29 +0200
+Subject: [PATCH] Fix texinfo compilation
+
+Error was:
+./fdl.texi:371: raising the section level of @appendixsubsec which is too low
+
+Applying idea from
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708589
+---
+ doc/fdl.texi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/fdl.texi b/doc/fdl.texi
+index a497bba..fc801a8 100644
+--- a/doc/fdl.texi
++++ b/doc/fdl.texi
+@@ -368,7 +368,7 @@ as a draft) by the Free Software Foundation.
+ @end enumerate
+
+ @page
+-@appendixsubsec ADDENDUM: How to use this License for your documents
++@appendixsec ADDENDUM: How to use this License for your documents
+
+ To use this License in a document you have written, include a copy of
+ the License in the document and put the following copyright and
+--
+2.5.0
+
diff --git a/net-dns/mydns/files/mydns.confd b/net-dns/mydns/files/mydns.confd
new file mode 100644
index 000000000000..1040f4b93c15
--- /dev/null
+++ b/net-dns/mydns/files/mydns.confd
@@ -0,0 +1,4 @@
+MYDNS_CONFFILE="/etc/mydns.conf"
+
+#MYDNS_EXTRA_OPTS="--verbose"
+MYDNS_EXTRA_OPTS=""
diff --git a/net-dns/mydns/files/mydns.initd b/net-dns/mydns/files/mydns.initd
new file mode 100644
index 000000000000..d78d1df91cb0
--- /dev/null
+++ b/net-dns/mydns/files/mydns.initd
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MYDNS_CHECKCONF="/usr/bin/mydnscheck"
+MYDNS_CONFFILE="${MYDNS_CONFFILE:-/etc/mydns.conf}"
+
+command="/usr/sbin/mydns"
+command_args="--background --conf=${MYDNS_CONFFILE} ${MYDNS_EXTRA_OPTS}"
+extra_commands="configtest"
+extra_started_commands="reload"
+pidfile="$(grep '^pidfile' ${MYDNS_CONFFILE} | sed -e 's/^pidfile\s*=\s*\([^# ]\+\?\)\s*\(#.*\)\?$/\1/')"
+pidfile="${pidfile:-/var/run/mydns.pid}"
+
+depend() {
+ need net
+ use logger mysql postgresql
+}
+
+checkconfig() {
+ "${MYDNS_CHECKCONF}" --conf="${MYDNS_CONFFILE}"
+ return $?
+}
+
+configtest() {
+ ebegin "Checking ${SVCNAME} configuration"
+ checkconfig
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/net-dns/mydns/metadata.xml b/net-dns/mydns/metadata.xml
new file mode 100644
index 000000000000..51607d90170c
--- /dev/null
+++ b/net-dns/mydns/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <use>
+ <flag name="alias">Enable David Phillips aliasing</flag>
+ <flag name="status">Enable the STATUS opcode to check server status</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">mydns-ng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/mydns/mydns-1.2.8.31-r1.ebuild b/net-dns/mydns/mydns-1.2.8.31-r1.ebuild
new file mode 100644
index 000000000000..7b6e4b894eae
--- /dev/null
+++ b/net-dns/mydns/mydns-1.2.8.31-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="A DNS-Server which gets its data from a MySQL-/PostgreSQL-database"
+HOMEPAGE="http://www.mydns.pl/"
+SRC_URI="mirror://sourceforge/mydns-ng/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~hppa ia64 ~ppc sparc x86"
+IUSE="alias debug nls mysql postgres ssl static status"
+
+RDEPEND="mysql? ( virtual/mysql )
+ nls? ( virtual/libintl )
+ postgres? ( dev-db/postgresql )
+ ssl? ( dev-libs/openssl )
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.12 )
+ sys-devel/bison"
+
+REQUIRED_USE="^^ ( mysql postgres )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.2.8.27-m4.patch"
+ eautoreconf
+ epatch "${FILESDIR}/${P}-texinfo.patch"
+}
+
+src_configure() {
+ econf \
+ $(use_enable alias) \
+ $(use_enable nls) \
+ $(use_enable debug) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ $(use_enable static) \
+ $(use_enable static static-build) \
+ $(use_enable status) \
+ $(use_with ssl openssl) \
+ --without-included-gettext
+}
+
+src_install() {
+ default
+
+ dodoc AUTHORS BUGS ChangeLog QUICKSTART* NEWS README* TODO
+ docinto contrib
+ dodoc contrib/*.php contrib/*.pl contrib/*.pm contrib/README*
+
+ newinitd "${FILESDIR}/mydns.initd" mydns
+ newconfd "${FILESDIR}/mydns.confd" mydns
+
+ ## Avoid file collision
+ rm -f "${ED}/usr/share/locale/locale.alias"
+
+ # Install config file
+ insinto /etc
+ newins mydns.conf mydns.conf
+ fowners root:root /etc/mydns.conf
+ fperms 0600 /etc/mydns.conf
+}
+
+pkg_postinst() {
+ if use postgres; then
+ elog "# createdb mydns"
+ elog "# /usr/sbin/mydns --create-tables | psql mydns"
+ elog
+ elog "to create the tables in the PostgreSQL-Database."
+ elog "For more info see QUICKSTART.postgres."
+ fi
+ if use mysql; then
+ elog "# mysqladmin -u <useruname> -p create mydns"
+ elog "# /usr/sbin/mydns --create-tables | mysql -u <username> -p mydns"
+ elog
+ elog "to create the tables in the MySQL-Database."
+ elog "For more info see QUICKSTART.mysql."
+ fi
+ elog
+}
diff --git a/net-dns/ndu/Manifest b/net-dns/ndu/Manifest
new file mode 100644
index 000000000000..b1bded38cbc6
--- /dev/null
+++ b/net-dns/ndu/Manifest
@@ -0,0 +1,6 @@
+AUX ndu-0.4-binary-locations.patch 426 SHA256 c6561a2648dfd3ce86bef0bbaae53d4cca3622268b8e6694213c2332ae56407f SHA512 58e248d48491759c33ae2ee2d57fdca38b718104606c05d965bc7b555cfd72388a906efd692d789d999fe782878e173438cc22f1091d278eed8b4322ec6f6294 WHIRLPOOL 0f4608e77ac5d73e14aa262f1dcd95e7ff210111d117a1872a004bbd9d0fcaa7e479ddb7b3d67a3f3bff79228aed5c6cd2fdef00575313b998c2811f4c6d3d95
+DIST ndu-0.4.tar.gz 16118 SHA256 27a2f523cee765db142b5582087866a90050fa00f1b365c800305204fc0c6d40 SHA512 cf401f89f1d6ae66c5440e6ef43f1c78e071d13dd2b1d816f1c3bfd2a0b2d7d7a9d2be9025b3d88f3fbd186ff610ac92858e13b4e47b23b9088f91f3e1a40f39 WHIRLPOOL 7aa8d009d2a5bd113e341e4fb782fd3e079de87ce37805ea90c08db26d9781885628e98c83f2f14f917f813d49843be2cf0bd135ad318697d96e1e614bf02efd
+EBUILD ndu-0.4-r4.ebuild 1767 SHA256 9dbb03fe09a6987ef7acb18873cbf910325324f21a42f9545105ab084321b528 SHA512 fc4ed16b8b3db3904030d6e8ce89fd0fe19ec2350df8dc0599187854fc800e3add116459b6fb748430fafc7c97aa6b84698b5e34ad24dd4f40a8e6ed4439b0a6 WHIRLPOOL 12c7f123b0e3a4a31d650f052bd372dc5955b8962cc562390255ac4f7e9c60342b828bc7e274add495caec9e3a212137a0b46038de99413619d88880fb1bfa71
+MISC ChangeLog 2204 SHA256 0cd23b11b92fb7da5bf84acf18228870cddcb2f2119c57cabd285a12a118deec SHA512 7fbae4ca323ccd711b3d210892628f2e1f7c65dbae6e805bc729170070cc40c81fa986bb3def857d8ed4263af836208771149abd873e251ae46e1f70eae4de08 WHIRLPOOL 16ec3ece90c7bfd3eb06185f6dbc91bb63c79bbff1c81c70abbc3e6989882220bea3b0c98601fc1e9ca6e72c79bb66a13d7e443b6defea88325081cbf33d8d31
+MISC ChangeLog-2015 2126 SHA256 ce9b103ef298c5014c97bffa0a2a8201a30d43183aa4d5e8d42cab6bbc6c6323 SHA512 dd9dd504a8c488772722df4fbe67393ab2248c419485e6653fa00d8a3a4f7e37e0e9aa6a13f31c73059dafc56f8da35fb3a27b459de15bee2839ed0f08e8dd76 WHIRLPOOL ce3cf4910ed7c0e47fd1127eb49b48a5956ef8a32f871ef6611041d11f71ccf7e05c295fb2386edfc8724e933f92a21185293ff5b4182ea4023607347cb5be10
+MISC metadata.xml 268 SHA256 972faf76e6638f2159ef3c7dafdcfef26d582070e6f0064d9136d1c6b2bee905 SHA512 ffda1db3fd6ac952f41a970e2e496c6a9fd0b12ed11cdf363fd269c3b00f627c6e70421fd545aad61d69594af2e5f43d8ebc197232a39b596d012818fe758850 WHIRLPOOL 759c32dcdde671d2fda0269ee9326f6d0f0e44966f767ac7becc40e6efb5429237b683cb23867d76a8d13dde79fe257e090ef890761b20f9792172a90369296d
diff --git a/net-dns/ndu/files/ndu-0.4-binary-locations.patch b/net-dns/ndu/files/ndu-0.4-binary-locations.patch
new file mode 100644
index 000000000000..4007b4dc4216
--- /dev/null
+++ b/net-dns/ndu/files/ndu-0.4-binary-locations.patch
@@ -0,0 +1,14 @@
+diff -Nuar --exclude '*~' ndu-0.4.orig/src/dnsedit ndu-0.4/src/dnsedit
+--- ndu-0.4.orig/src/dnsedit 2006-05-22 16:16:47.000000000 -0700
++++ ndu-0.4/src/dnsedit 2006-05-22 16:20:45.107741010 -0700
+@@ -19,8 +19,8 @@
+ if /usr/bin/diff $1 $tempfile >> /dev/null ; then
+ echo No changed made
+ else
+- /usr/sbin/dnstouch $1
+- /usr/sbin/ndu
++ /usr/bin/dnstouch $1
++ /usr/bin/ndu
+ # /usr/sbin/ndc reload
+ echo updated
+ fi
diff --git a/net-dns/ndu/metadata.xml b/net-dns/ndu/metadata.xml
new file mode 100644
index 000000000000..a4e0d354f696
--- /dev/null
+++ b/net-dns/ndu/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/ndu/ndu-0.4-r4.ebuild b/net-dns/ndu/ndu-0.4-r4.ebuild
new file mode 100644
index 000000000000..5471c212971c
--- /dev/null
+++ b/net-dns/ndu/ndu-0.4-r4.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="DNS serial number incrementer and reverse zone builder"
+SRC_URI="http://uranus.it.swin.edu.au/~jn/linux/${P}.tar.gz"
+HOMEPAGE="http://uranus.it.swin.edu.au/~jn/linux/dns.htm"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+DEPEND="sys-apps/sed"
+RDEPEND="sys-apps/ed" # dnstouch calls ed to do the dirty work
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}"/${P}-binary-locations.patch
+
+ cd "${S}"/src
+ # use the correct compiler
+ sed -e 's|gcc|$(CXX)|g' -i Makefile
+ # set correct config pathes
+ sed -e 's|#define CONFIG_PATH "/etc/"|#define CONFIG_PATH "/etc/bind/"|g' -i ndu.cpp
+ sed -e 's|"/etc/ndu.conf"|"/etc/bind/ndu.conf"|g' -i dnstouch.cpp
+ # hack up something to work around bug #73858
+ sed -e 's|execlp("ed", "ed", filename, 0);|execlp("ed", "ed", "-s", filename, 0);|g' -i dnstouch.cpp
+ # use the correct editor
+ sed -e 's|VISUAL|EDITOR|g' -i dnsedit
+
+ cd "${S}"
+ # match our bind config
+ sed -e 's|0.0.127.in-addr.arpa|127.in-addr.arpa|g' -i ndu.conf
+ # document the support for the chrooted BIND setup
+ echo '// if you use a chrooted setup, then you need to uncomment these lines:' >>ndu.conf
+ echo '//process "/chroot/dns/named.conf"' >>ndu.conf
+ echo '//chroot "/chroot/dns"' >>ndu.conf
+}
+
+src_compile() {
+ cd "${S}"/src
+ emake CFLAGS="${CFLAGS}" CXX="$(tc-getCXX)"
+}
+
+src_install () {
+ into /usr
+ dobin src/{dnsedit,ndu,dnstouch}
+ into /
+ insinto /etc/bind
+ doins ndu.conf
+ dodoc README INSTALL
+}
+
+pkg_postinst() {
+ elog "The ndu binary expects to read your configuration"
+ elog "from /etc/bind/named.conf, however the other binaries"
+ elog "are useful with BIND locally installed."
+}
diff --git a/net-dns/nsd/Manifest b/net-dns/nsd/Manifest
new file mode 100644
index 000000000000..c50d67fd7581
--- /dev/null
+++ b/net-dns/nsd/Manifest
@@ -0,0 +1,11 @@
+AUX nsd.initd-r1 1386 SHA256 b98d350d3f417aa5e7f3382d0ab49a5c86c8fd9f2ef45c4de59f0b47b8d5ddc5 SHA512 a8dc5b4dd6b8d763f96e46bb9bc8a43ce7518455c6efaee7061b47b477b380f47d831b993966fc4fe253657f2a3d16077dfda5c900d5788d5b991f5f9d92e618 WHIRLPOOL 0c5721351a856ef15487693671873852f1d7b1e6bf519db252fc1a5ad320299b6fe3126ee9c5d0db109affefc9f825247ac9dba8fc877c4b3f18acecadd53817
+AUX nsd.munin-conf 23 SHA256 313e0bd8841d10962eeb1fc9fec480dce7ea93dae8a673c74e45efc12d3087da SHA512 c06d0b035387e7be79cfa8fedf8afb3900772146c6d4090ac39ea2ef165772d875b222ef467bd73422078ef57818bcc931ca67fa290bd99a7a9456efa5448853 WHIRLPOOL 74509d12b52570d9fe8dcf87820162e3bab5c77650daf352d3769d334f6ba98e63c6bd615d6008959164f219e0873be6012ef167609f8aae7a5b645e9fc52a9d
+AUX nsd.service 272 SHA256 1e3455791495082b122a67f25ff123728e5b87723c37935cd17f26333152b154 SHA512 fbca86887bfc36d61af06992cc98b3f3cb33c39274fbdc1e53d489bdcc767993911fab27a20244c3878b36bacbd1644a552364b2f7bf4d48e6eb247d0eecdf0f WHIRLPOOL 7d652e0db5fca5e277ccbbfed70bdcc1c291e6dcb4419a8cbe7b4db5502f3dd7e8f91ff0270c5c79bdb045b82cb010ee1b105029da7a24dd4b0070df647d24ac
+AUX nsd_munin_.patch 542 SHA256 d5926243c3c4a4ce931a0a56d9b94c5203c762923df71fe2a6b0c5b78063c6a5 SHA512 6034086d6b6f6980468766c901e92291fea8a32df179561ede2add5918c37bfe3aabf122735d4ae2e28efece394fd3398f9a0cc4d8fdcc1e5da1ca709d2ba6ae WHIRLPOOL 0d9e62a8824314c583e0c49980c3ee945531b848b9ca1e348976d041ec5fd4889a7098331975fea3d5dbc7337d1f79fa3c4f83c812622c7dea15fa3df34361a2
+DIST nsd-4.1.16.tar.gz 1088633 SHA256 7f8367ad23cc5cddffa885e7e2f549123c8b4123db9726df41d99f255d6baab2 SHA512 51135bbf412cdc5d6d9be02af9fef16513f0529155c102debfd6bd68b025d289c684777a8fca57de86b25f68bc94aef89d2cfefb871b8d63048d262f6c8eb8e3 WHIRLPOOL 030da2551abef8cb29e16574155605eb9377836f1a43422e200ba5bc6ede319893d4293018cf0be242d1ac0cfad4c3b40f566c7ad587792186c64102d8c9785f
+DIST nsd-4.1.17.tar.gz 1089526 SHA256 107fa506d18ed6fd0a922d1b96774afd9270ec38ec6b17cd7c46fb9433a03a6c SHA512 4cffa261b1832d0daac095e92542359ffd725918f07ec605c78a9346b1cf4a4bc21bdc59ab388eb7324a170bbd8b122cfa75e7448015b38572b47d18add24a8f WHIRLPOOL c8892dca5f5c625d435cfde3f556ccc7518f3e37b7242892f9c101f4ffa5da1a2ea09083a30942bb1dad91ab70b40b2647339b2a4988f08478db9b6dd2b1c3df
+EBUILD nsd-4.1.16.ebuild 2785 SHA256 fdc37080a35ea568446feb2ddcb3fc67841cbbf82077f8157a8a53d85a5495dc SHA512 92ddc87fb87c7534969bb5fa10b6365dcf586d461440c82e8c2d48668a02e1cc314641e4f5230474572c1f176498bcf75a115983d80a33c91061ce0aa2dafe2a WHIRLPOOL b3665312bfae054a093d6597cda9019d8a7a46b9de41fda9632e361b601d39160f0b068219c570873e9408c01f7e65c17d84ecbf5693351f6cba245d6c7b95e8
+EBUILD nsd-4.1.17.ebuild 2787 SHA256 93b9a75c71c13ff1a2c3cef2a67e16515d210e90abda79a4b980c3f08f438cb0 SHA512 2d7fc76f8228583eba7944f490e2f25f6ba8defdff0cc71f7c447b1f1cce1584fddd768371a9fa7f6b0a80eee12e4d9d125f7e03c4417893dfa0acaa3d3c0e26 WHIRLPOOL 106912accb55b68055268d8570471483539bdf9f3a2a118f00876b0c72a6e14559a40610b73cd684a437a1ead46eceb5fe428e915ce70a161640891196cb6c44
+MISC ChangeLog 7402 SHA256 fc31cfd461d2b80126128324e072d7be404f904625b8bcdccbdc4d1da627df93 SHA512 f7c1c027e9dcfc5adf0c11026991e4c790a94d828d5793f5081c78ee0d9b1e2e0f675f4862c28c7bdf87264c82c454e2775926a016ef832493efb10f40e341de WHIRLPOOL 1a5818cd1f496b03b07e073449e62ee907d36e02dea8001e77054a8f2d3afd70b85379b3bdf65d7b7fc42ab23acd682037bdefc889d773b4450f01d1ce3aa156
+MISC ChangeLog-2015 2627 SHA256 441f35743cb95ae536a14f14a68a6dcd0c56cec92a9a17309a433414ed240500 SHA512 89c885fd99bbca04288f6c3e8ac3ff31bc90dd48fb68a0776fe02bbd9dfc8b2342414559e45c9bc88e04a5fb55448c074b99756a8711339870ad3944238d4b41 WHIRLPOOL 562ac8805295b1590b34dc86008aec0249b8fbb4bb48baa69fd2fec5fad0ee6e032641baa11c05d4f4612aa6af71b274cfd490315df3b279845d1f3300ac806b
+MISC metadata.xml 1013 SHA256 0b2cee01846e86109c0064b51d72d905f51b58eeeb6b46018d1d63b11e322705 SHA512 e7c0d6a267fd06546ac58278ffb75280aa0c0ed55ddf0097614906c1863e55cf572ff7660e021ac8861c506ed0de126c0c5e68dd2d88aea1a395be3234607ce5 WHIRLPOOL 62f0478902b36690036cb3345155c12336f7f71d23166faf41ead87ea25b7b0b365306791b9ee55b223dcfe3197cb3f5b8a5b9a51592ddf709be56717230d99b
diff --git a/net-dns/nsd/files/nsd.initd-r1 b/net-dns/nsd/files/nsd.initd-r1
new file mode 100755
index 000000000000..a032cb226fd7
--- /dev/null
+++ b/net-dns/nsd/files/nsd.initd-r1
@@ -0,0 +1,59 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="NSD is an authoritative-only, high performance, open source name server"
+extra_commands="configtest"
+extra_started_commands="reload"
+
+# these can be overridden in /etc/conf.d/nsd if necessary
+NSD_CONFIG="${NSD_CONFIG:-/etc/nsd/nsd.conf}"
+NSD_CHECKCONF="${NSD_CHECKCONF:-/usr/sbin/nsd-checkconf}"
+command="${NSD_BINARY:-/usr/sbin/nsd}"
+command_args="-c ${NSD_CONFIG}"
+
+depend() {
+ need net
+ use logger
+}
+
+get_pidfile() {
+ printf '%s' "$("${NSD_CHECKCONF}" -o pidfile "${NSD_CONFIG}")"
+}
+
+checkconfig() {
+ if ! test -e "${NSD_CONFIG}"; then
+ eerror "You need to create an appropriate config file."
+ eerror "An example can be found in /etc/nsd/nsd.conf.sample"
+ return 1
+ elif ! "${NSD_CHECKCONF}" "${NSD_CONFIG}"; then
+ eerror "You have errors in your configfile (${NSD_CONFIG})"
+ return $?
+ fi
+ return 0
+}
+
+configtest() {
+ ebegin "Checking ${SVCNAME} configuration"
+ checkconfig
+ eend $?
+}
+
+start_pre() {
+ checkconfig || return $?
+ pidfile="$(get_pidfile)"
+ checkpath --directory --owner nsd:nsd "${pidfile%/*}" || return 1
+}
+
+stop_pre() {
+ checkconfig || return $?
+ pidfile="$(get_pidfile)"
+}
+
+reload() {
+ checkconfig || return $?
+ pidfile="$(get_pidfile)"
+ ebegin "Reloading config and zone files"
+ kill -s HUP $(cat ${pidfile})
+ eend $?
+}
diff --git a/net-dns/nsd/files/nsd.munin-conf b/net-dns/nsd/files/nsd.munin-conf
new file mode 100644
index 000000000000..2fbec370f336
--- /dev/null
+++ b/net-dns/nsd/files/nsd.munin-conf
@@ -0,0 +1,2 @@
+[nsd_munin*]
+user root
diff --git a/net-dns/nsd/files/nsd.service b/net-dns/nsd/files/nsd.service
new file mode 100644
index 000000000000..8337557faeef
--- /dev/null
+++ b/net-dns/nsd/files/nsd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=NSD authoritative DNS server
+Wants=network.target
+After=network.target
+
+[Service]
+Type=forking
+ExecStartPre=/usr/bin/install -d -o nsd -g nsd /run/nsd
+ExecStart=/usr/sbin/nsd
+KillMode=mixed
+PIDFile=/run/nsd/nsd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/nsd/files/nsd_munin_.patch b/net-dns/nsd/files/nsd_munin_.patch
new file mode 100644
index 000000000000..36162f9a8fb2
--- /dev/null
+++ b/net-dns/nsd/files/nsd_munin_.patch
@@ -0,0 +1,17 @@
+--- a/contrib/nsd_munin_
++++ b/contrib/nsd_munin_
+@@ -87,10 +87,10 @@
+
+ =cut
+
+-state=${statefile:-/usr/local/var/munin/plugin-state/nsd-state}
+-conf=${nsd_conf:-/usr/local/etc/nsd.conf}
+-ctrl=${nsd_control:-/usr/local/sbin/nsd-control}
+-chkconf=${nsd_checkconf:-/usr/local/sbin/nsd-checkconf}
++state=${statefile:-$MUNIN_PLUGSTATE/nsd-state}
++conf=${nsd_conf:-/etc/nsd/nsd.conf}
++ctrl=${nsd_control:-/usr/sbin/nsd-control}
++chkconf=${nsd_checkconf:-/usr/sbin/nsd-checkconf}
+ lock=$state.lock
+
+ # number of seconds between polling attempts.
diff --git a/net-dns/nsd/metadata.xml b/net-dns/nsd/metadata.xml
new file mode 100644
index 000000000000..0d66874728b4
--- /dev/null
+++ b/net-dns/nsd/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <use>
+ <flag name="bind8-stats">Enables BIND8 like NSTATS and XSTATS</flag>
+ <flag name="libevent">Use libevent or libev, useful when zone
+ count is high</flag>
+ <flag name="minimal-responses">If minimal responses are disabled,
+ responses are more likely to get truncated, resulting in TCP
+ fallback</flag>
+ <flag name="nsec3">Enable NSEC3 support</flag>
+ <flag name="ratelimit">Enables ratelimiting, based on query name,
+ type and source</flag>
+ <flag name="root-server">Configure NSD as a root server</flag>
+ <flag name="runtime-checks">Enable runtime checks, this could lead
+ to a reduced service level</flag>
+ <flag name="munin">
+ Install a plugin for <pkg>net-analyzer/munin</pkg> to graph
+ statistical data from nsd.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/nsd/nsd-4.1.16.ebuild b/net-dns/nsd/nsd-4.1.16.ebuild
new file mode 100644
index 000000000000..1b7f7b998e3e
--- /dev/null
+++ b/net-dns/nsd/nsd-4.1.16.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user systemd
+
+DESCRIPTION="An authoritative only, high performance, open source name server"
+HOMEPAGE="http://www.nlnetlabs.nl/projects/nsd"
+# version voodoo needed only for non-release tarballs: 4.0.0_rc1 => 4.0.0rc1
+MY_PV=${PV/_rc/rc}
+MY_PV=${MY_PV/_beta/b}
+MY_P=${PN}-${MY_PV}
+S="${WORKDIR}/${MY_P}"
+SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="bind8-stats ipv6 libevent minimal-responses mmap munin +nsec3 ratelimit root-server runtime-checks ssl libressl"
+
+RDEPEND="
+ virtual/yacc
+ libevent? ( dev-libs/libevent )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ munin? ( net-analyzer/munin )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/flex
+"
+
+src_prepare() {
+ # Fix the paths in the munin plugin to match our install
+ eapply "${FILESDIR}"/nsd_munin_.patch
+ eapply_user
+}
+
+src_configure() {
+ local myeconfargs=(
+ --enable-pie
+ --enable-relro-now
+ --enable-largefile
+ --with-logfile="${EPREFIX}"/var/log/nsd.log
+ --with-pidfile="${EPREFIX}"/run/nsd/nsd.pid
+ --with-dbfile="${EPREFIX}"/var/db/nsd/nsd.db
+ --with-xfrdir="${EPREFIX}"/var/db/nsd
+ --with-xfrdfile="${EPREFIX}"/var/db/nsd/xfrd.state
+ --with-zonelistfile="${EPREFIX}"/var/db/nsd/zone.list
+ --with-zonesdir="${EPREFIX}"/var/lib/nsd
+ $(use_enable bind8-stats)
+ $(use_enable bind8-stats zone-stats)
+ $(use_enable ipv6)
+ $(use_enable minimal-responses)
+ $(use_enable mmap)
+ $(use_enable nsec3)
+ $(use_enable ratelimit)
+ $(use_enable root-server)
+ $(use_enable runtime-checks checking)
+ $(use_with libevent)
+ $(use_with ssl)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc doc/{ChangeLog,CREDITS,NSD-4-features,NSD-FOR-BIND-USERS,README,RELNOTES,REQUIREMENTS}
+
+ newinitd "${FILESDIR}"/nsd.initd-r1 nsd
+
+ # install munin plugin and config
+ if use munin ; then
+ exeinto /usr/libexec/munin/plugins
+ doexe contrib/nsd_munin_
+ insinto /etc/munin/plugin-conf.d
+ newins "${FILESDIR}"/nsd.munin-conf nsd_munin
+ fi
+
+ systemd_dounit "${FILESDIR}"/nsd.service
+
+ # remove the /run directory that usually resides on tmpfs and is
+ # being taken care of by the nsd init script anyway (checkpath)
+ rm -r "${ED}"/run || die "Failed to remove /run"
+}
+
+pkg_postinst() {
+ # Do this in postinst to ensure the uid/gid is consistent for binpkgs
+ enewgroup nsd
+ enewuser nsd -1 -1 -1 nsd
+
+ # database directory, writable by nsd for database updates and zone transfers
+ install -d -m 750 -o nsd -g nsd "${EROOT%/}"/var/db/nsd
+
+ # zones directory, writable by nsd for zone file updates (nsd-control write)
+ install -d -m 750 -o nsd -g nsd "${EROOT%/}"/var/lib/nsd
+}
diff --git a/net-dns/nsd/nsd-4.1.17.ebuild b/net-dns/nsd/nsd-4.1.17.ebuild
new file mode 100644
index 000000000000..23775fc75841
--- /dev/null
+++ b/net-dns/nsd/nsd-4.1.17.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user systemd
+
+DESCRIPTION="An authoritative only, high performance, open source name server"
+HOMEPAGE="http://www.nlnetlabs.nl/projects/nsd"
+# version voodoo needed only for non-release tarballs: 4.0.0_rc1 => 4.0.0rc1
+MY_PV=${PV/_rc/rc}
+MY_PV=${MY_PV/_beta/b}
+MY_P=${PN}-${MY_PV}
+S="${WORKDIR}/${MY_P}"
+SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bind8-stats ipv6 libevent minimal-responses mmap munin +nsec3 ratelimit root-server runtime-checks ssl libressl"
+
+RDEPEND="
+ virtual/yacc
+ libevent? ( dev-libs/libevent )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ munin? ( net-analyzer/munin )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/flex
+"
+
+src_prepare() {
+ # Fix the paths in the munin plugin to match our install
+ eapply "${FILESDIR}"/nsd_munin_.patch
+ eapply_user
+}
+
+src_configure() {
+ local myeconfargs=(
+ --enable-pie
+ --enable-relro-now
+ --enable-largefile
+ --with-logfile="${EPREFIX}"/var/log/nsd.log
+ --with-pidfile="${EPREFIX}"/run/nsd/nsd.pid
+ --with-dbfile="${EPREFIX}"/var/db/nsd/nsd.db
+ --with-xfrdir="${EPREFIX}"/var/db/nsd
+ --with-xfrdfile="${EPREFIX}"/var/db/nsd/xfrd.state
+ --with-zonelistfile="${EPREFIX}"/var/db/nsd/zone.list
+ --with-zonesdir="${EPREFIX}"/var/lib/nsd
+ $(use_enable bind8-stats)
+ $(use_enable bind8-stats zone-stats)
+ $(use_enable ipv6)
+ $(use_enable minimal-responses)
+ $(use_enable mmap)
+ $(use_enable nsec3)
+ $(use_enable ratelimit)
+ $(use_enable root-server)
+ $(use_enable runtime-checks checking)
+ $(use_with libevent)
+ $(use_with ssl)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc doc/{ChangeLog,CREDITS,NSD-4-features,NSD-FOR-BIND-USERS,README,RELNOTES,REQUIREMENTS}
+
+ newinitd "${FILESDIR}"/nsd.initd-r1 nsd
+
+ # install munin plugin and config
+ if use munin ; then
+ exeinto /usr/libexec/munin/plugins
+ doexe contrib/nsd_munin_
+ insinto /etc/munin/plugin-conf.d
+ newins "${FILESDIR}"/nsd.munin-conf nsd_munin
+ fi
+
+ systemd_dounit "${FILESDIR}"/nsd.service
+
+ # remove the /run directory that usually resides on tmpfs and is
+ # being taken care of by the nsd init script anyway (checkpath)
+ rm -r "${ED}"/run || die "Failed to remove /run"
+}
+
+pkg_postinst() {
+ # Do this in postinst to ensure the uid/gid is consistent for binpkgs
+ enewgroup nsd
+ enewuser nsd -1 -1 -1 nsd
+
+ # database directory, writable by nsd for database updates and zone transfers
+ install -d -m 750 -o nsd -g nsd "${EROOT%/}"/var/db/nsd
+
+ # zones directory, writable by nsd for zone file updates (nsd-control write)
+ install -d -m 750 -o nsd -g nsd "${EROOT%/}"/var/lib/nsd
+}
diff --git a/net-dns/odsclient/Manifest b/net-dns/odsclient/Manifest
new file mode 100644
index 000000000000..236684ca7f40
--- /dev/null
+++ b/net-dns/odsclient/Manifest
@@ -0,0 +1,6 @@
+AUX 1.03-gentoo.patch 461 SHA256 f276c550a753b32f8ededd51da61325c1a075733ef386017a19c9fc645f4bc55 SHA512 6a567daef79997488ac328f31b3f1cb8bd299399a6bf831bd19591f2ebd9d94d94a5949baefbfa98031aa6eadf34cfa6192b1e0bcd3282bad1acb05a4e8b9e03 WHIRLPOOL 6bf551ed018d2094c1e8c0dab628e25588858bc72d09b375f32d1c29336e9856f96cdcc884c004694cf2f0203791b36d2db5651533dfc4cb13d8b99af62b4e91
+DIST odsclient-1.03.tar.gz 4263 SHA256 4c55c88e2aebce736f2a85fb750da0292d047bfc3bd7a042535cbd9545ecc384 SHA512 12cc8b734314ec23432fc7ca980e099eee04be84134740460b7ab3edcff1abfb116794504653ef0af72b27fdc2b074633b96196e1894092152e1bd0e8300ab11 WHIRLPOOL 8d924616fa70bb90c227b9c67ef93bb5712f97d821023a9aeac96cd2fd7347c2dfab050c75a9450317c4662e52eaf6b4364e29e5686ca6f80e49e0565f8b5d0b
+EBUILD odsclient-1.03-r1.ebuild 626 SHA256 ada7e4e5cbda65c9f051649f6d46d26b14eb20f974609035fc56b47d72b062f5 SHA512 80e7e6df66f8ad354ffa865e04ddca3f9a310c7c2104f0c637f1332aaaeb36c6493b5e2d7997972f3b4a7430212ffb741c215897681bb0432737b7224939b2f9 WHIRLPOOL 3eb65e5d6e8726c126c33ef3d774d164c84da5fe0108c73bafd0a4cae1d523904ef4c2b9227040b04780c64b1d9ed371027d4f02a10654563b2003a60b8c36e8
+MISC ChangeLog 2557 SHA256 be8423716bf572809121e6ab2250110d1cf4d3fa7868ec6bd6dbfe7d20e2028b SHA512 364583c0d097a6177fa5b56fedc58af4a33147aa1a70a0c8a7f3dd78cd3731764d7d9e7baead96eb1514f7d7f354e5f36503de5de60d956db56466029b887c18 WHIRLPOOL df5ec312c1ab88c434c97ece2a86a2f952de650a90b9f39517237a86c9ccae3d477de4611ee4cf346c519b27751ad6f4bbe270110f951f736a62faece773b1e2
+MISC ChangeLog-2015 1718 SHA256 6c801bfd9a1a5390efa1e4a8bb3263ae11ab97968c1619a47d5e675dde615e22 SHA512 678068ab8b4ef5019baa83a52a2b87ea289ac5d55e278cf238a44a251e080ca4f964dd9653140891f3dc7e01f4c7649bcae88311301748556059ee20200288ad WHIRLPOOL d1163d82c0373cce9b062879c334a12d2be86e6f6bf2dcbafc8ead431f27820685b48c3bedf5e11b6546b13ec6d66e4354c074d578f96883f6378c049d37c360
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-dns/odsclient/files/1.03-gentoo.patch b/net-dns/odsclient/files/1.03-gentoo.patch
new file mode 100644
index 000000000000..76f93016a010
--- /dev/null
+++ b/net-dns/odsclient/files/1.03-gentoo.patch
@@ -0,0 +1,21 @@
+--- a/client.c
++++ b/client.c
+@@ -40,7 +40,8 @@
+ ret = getret(s);
+ if(ret == 795 || ret == 796)
+ {
+- fprintf(stderr, "Updated successfully\n");
++ fprintf(stderr, "Updated %s to %s successfully\n",
++ argv[3], ipaddress);
+ mydprintf(s, "QUIT\n");
+ close(s);
+ exit(0);
+@@ -50,7 +51,7 @@
+
+ }
+ }
+- fprintf(stderr, "Unable to update host\n");
++ fprintf(stderr, "Unable to update %s\n", argv[3]);
+ return 1;
+ }
+
diff --git a/net-dns/odsclient/metadata.xml b/net-dns/odsclient/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-dns/odsclient/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-dns/odsclient/odsclient-1.03-r1.ebuild b/net-dns/odsclient/odsclient-1.03-r1.ebuild
new file mode 100644
index 000000000000..d679353f7246
--- /dev/null
+++ b/net-dns/odsclient/odsclient-1.03-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Client for the Open Domain Server's dynamic dns"
+HOMEPAGE="http://www.ods.org/"
+SRC_URI="http://www.ods.org/dl/${P}.tar.gz"
+LICENSE="LGPL-2.1"
+
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+src_prepare() {
+ sed -i Makefile -e 's| -o | $(LDFLAGS)&|g' || die "sed failed"
+
+ epatch "${FILESDIR}"/${PV}-gentoo.patch
+}
+
+src_compile() {
+ emake \
+ CC=$(tc-getCC) \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ || die
+}
+
+src_install() {
+ dosbin odsclient
+ dodoc README
+}
diff --git a/net-dns/opendnssec/Manifest b/net-dns/opendnssec/Manifest
new file mode 100644
index 000000000000..b2f4ef27a586
--- /dev/null
+++ b/net-dns/opendnssec/Manifest
@@ -0,0 +1,27 @@
+AUX opendnssec-1.3.14-drop-privileges.patch 906 SHA256 faecb049748efab2652b890020106748039dbe7022d943393ac50b71b429b340 SHA512 cbc17153fcd617bcbc54a0b14111908635dae722f845f894d9c6769d77960433fa75c3ec0a5061af054167b4223f7f2946c3e3ba09c2bb55598f72f71d1c2106 WHIRLPOOL da7588424ce440bc302d8acacff2f702e623fe32682b1ddcd4674209f15dbcf8606ad35f59fc2d60e397d8618a7b59b1a56503b1b23a210f924e07dec51f6f16
+AUX opendnssec-1.3.14-use-system-trang.patch 706 SHA256 c704b8e232c950166131be6e70c7b48ff4f57800de7dae2a08012ef5d945f4c7 SHA512 e7d664f6ee548efeae7a015ceaf21b3fedc7654ed295ecd2440b0212015c1556b4f1bac978a2f804e7b6830181273484b428e1a363989eff067a9b3587937b7f WHIRLPOOL 92ffcd46ffaa6a7583114237a58bf634cf26445f3fe023be347f63bd88a0560371d7e89aa820e2fb7c6a6a971a4fee1bb281424baa6f6ce895c0db62d9d60146
+AUX opendnssec-1.3.18-eppclient-curl-CVE-2012-5582.patch 751 SHA256 5613a6de3b65eb1a3e0006e5e8d676d48789d23636d6b218d1ee2fbb5b69a3ae SHA512 f89fc43b96a76ed9af9ac4f28993037ee709d19e8cfeb53da2bdff2eb723c4200fe70aaac8b651998b9b6685343777316141dd0ee2ebc600f703d8dadca24d43 WHIRLPOOL e9790ebb811824f33443ca93429e59377239ac8f443c6eafe16250b68497877d4d0100ff734fd663f4dff697842fdf1b6803e80d4aab5c9cd2fb6260cae19448
+AUX opendnssec-drop-privileges-2.0.x.patch 813 SHA256 a961424707e048b62e31d0c73c516d93c537931f0d80f000a095eed1ba2e6635 SHA512 425eb123452183b4e4a3e87e9a71afa81684fe4af9c111d1bad3433ee640907cf3caa1065711f67286bb0336fd8d82e3f4bfeef94e3ff620bcbdaf960d4137b8 WHIRLPOOL 0c234dfefc3d9d26f399ed9b552a15b975c770b73f3452279cb41cbedb98ac188fcbecbb6e842c0a22f09f6bff2902fc2e0597d7b4974a8ab0a5c4ba856911bf
+AUX opendnssec-drop-privileges.patch 641 SHA256 9bc831bf45a022a9be1a2bd6ee80d9e06fa4d5cdf553ae7dfd50e3a592e5b8dd SHA512 60cb666d821ae8880ccb789f8d2b60ea218a98e1b7b9393d8dc299be55efbd93efb9334ebf5cbf55f67ef1c58df1206dce906994bd9808e3db5a5bf9644a7f06 WHIRLPOOL 90f55f6572933e4c1042076aaa42a9cd19cd7e4c0e7a0598c8ae6cb22e0c7dcc6cd18fa408e2ed80eaadccefa39b4928c59e8bf0ae3398c948092828f9342ebf
+AUX opendnssec-fix-localstatedir-2.0.x.patch 1161 SHA256 028de3256f5604472a0352fe2a9988f2eac51457cc05b4f3b794d021cc2aab8f SHA512 1d07f2108238c041041c96b4efaaec1e75740ed54fbd6390fa45f5ccf7f631c1e8d4400bb9cb95023c8909ae10abc3c93aaa137f954921af75825c06a6d94d9a WHIRLPOOL 5c5d1c035eee77af74cad6a7bec3f085300cdd446090640731430745e1cf6a0769c92de9d7e968e31dce165273ff6bb8400d07f02fc27fc90d383df3b84ea9a0
+AUX opendnssec-fix-localstatedir.patch 1693 SHA256 e9a29b3adf22ef6dd3a0ac43d2a48e2705ae09cd7550b4f3294b89dcd7814ecd SHA512 86700c97bb482f5fa6d99fe8f105c41e8798de542e6cf5fd4d6c14da11237e4fd11eccb2900de4893898d7855e31beb6572c709c2dad9774d5fe440673af2627 WHIRLPOOL 56c5e876e2e2832265474c3772a44efa288eb387438a6864d85956a990f9cedc81e60dc7922448d647702359e835c0fef7db1d6d5e643b195cd6ad26117c3f53
+AUX opendnssec-fix-run-dir-2.0.x.patch 1188 SHA256 c134ad1f6a6222ff5e52019ca5975697d68b55ab110801778ffb5053a5bb8853 SHA512 293c2ceb336623ed52028ca3144c4249eaf426dd2eb84890be9f1ed53e27d4ff5fd6a699d41426ca57d6362c2f83dd8b3556691da2815235f72e69ab4ef45165 WHIRLPOOL 293a0228a85988f4dd23ef4a16bb113fd2f23c3df35edc623996eebe09794b451a134066609b521ae5a50bccc2dca0c6ad7c7b26d970df600ee376554aa2cb30
+AUX opendnssec-fix-run-dir.patch 1204 SHA256 bc9736e424dcc739988d78b8842a44261a71a2e7073bfbd53b985db121f9f3b6 SHA512 f604ab24731bd84498f33dc3213b937335e55f805d4913e80b037b91cc5bf14f406cb2af14cc455a9a23c45a3475ef1b3901c68760188d9e4a36d314d29f8f84 WHIRLPOOL 11d5963d69022ed6e03f0ebda74fd315a8bbd59ff086a7ae8c8dfd42e02062a34d7b888c2e7929af3a1214ddfa81f98ed0ff8aacbb4949bb652ebdac1f72ae08
+AUX opendnssec-use-system-trang.patch 614 SHA256 7e8485e0f8ff1df5f9f799b908c802cf3670ecfcff6e3bf858d69429638e86b4 SHA512 9e95943d145ce7a05e32af60a944c6ee6d74fdff0fa9f0ea233070b44567bce4f5ca6bde57411effa7bab192ec58face34cddf2c349ccff3b78fc66c1f35074d WHIRLPOOL 82282bc2fc7797ff946aee5cee6e182abde0b65283865a9b084613a0dba7e53762494197c7479a6324fc3c81c8c80acf9d0d8a898a183acfe6ab62cf2a6ed1e6
+AUX opendnssec.confd 393 SHA256 cfb0c2ba683878c9f1b99618776aea152679e95ae26ecf4337b63f1a9cf0006c SHA512 17bd24efef9bd6b7a907c75126809a6012db23a6c8547169c41dbc62fc91775331f445905282bc6c2ef13357f92eccab5008d4605419d98acdb723806b63a924 WHIRLPOOL e9eb636b8fc2016bdbdedf44e7625562b1c5f6ddcf60af87cdaf1ca6e74dfb4f08886f946e788005ed3c97667417cfed9fb2fb688ad1a40ce992913a7007c142
+AUX opendnssec.confd-1.3.x 477 SHA256 9db752afc06fe3cc76bf7d4195d74853db7ccce3993b5ccd896b07b37de84909 SHA512 e45cd05e9d972dce5254f333ce21fd599ed905e8009f67de636c3a72dcd49e43fb75f702e21665dd3f19602fb9a5be5b6ff34e147ac4e29844560cc4f65f727c WHIRLPOOL 14a56cc365cdcb201f48a4c42838bc82524a2e067f4aa2f49aeada2ae2757b9c7d3f3cb375993d2f2e48364c696438404b41d64abb9a2d773f9f82e77efc5bdc
+AUX opendnssec.initd 1854 SHA256 9f200b6b2d1e2da1a161f3275992115788dd36a3eeffbaaece0d896b51cb445d SHA512 75bce27c152b55ba2ba7d0770c6f2149493ef4b145f2257328e7e4b6865ad2d644695a688c3e06be02705ac42752e031846551b80b560e19a73e595e5ad15def WHIRLPOOL 34cd2588877cd300628e5cb86e055ffc07e6682ba3ad448d83d3975e8d6802702e343437acbc187522c7a4b24672e0fff0dce4f9023908c8d9f1857e80078d3f
+AUX opendnssec.initd-1.3.x 2873 SHA256 4060ab0ecca436c08551efa693819aa2b59e84dc2cff5b36d143cde56a37dcb3 SHA512 e824206169a625b3e9cd817489870ad422793f6142abf0878049d3c075efe8c9e5895802e0ff0c4d4f36775e31aad19346c3ba0a76572dc6a0106883d9b0968d WHIRLPOOL 39f302dd5c89134689b47ff81d73a4af816bd37a6ef5f453df9c023259701f9ad264da5d7c3af1f314800ecdc23788ee57eb872d65936725c402608f245cc9a8
+DIST opendnssec-1.3.18.tar.gz 1143889 SHA256 e61d23ae0cc57b6e09d408bade6872fe5241896c61a03e8bc5ceeb65df13a676 SHA512 5df39ba778c9b1245e88b81df7aa491bca0aad2943845284c4f8b4dd729fa69014d45f07bdf99a048ccf668a1c9675a8dd99efcec1abdbd4e06e9738fec6ab6d WHIRLPOOL 7213b8f2f86651114449bc4734452d6065960e26ee289051949ca27ae3b23280cea45ff707f71942eef91c9009200272c0985ef3d3de43c9343ad2e1e54303ce
+DIST opendnssec-1.4.12.tar.gz 1036392 SHA256 4ba6cf06fcd1131c1ed913d61959ddc90726ed5e4f153c90f45ec64445528a0c SHA512 b72b76ab4aec8cc63cc9c020bef9a24b000fd00172a07cf43d57b3a33041bef9e107b71eb7271bb13c3566510599c6a1913cf986a724e169c42dc8bdac8d2e51 WHIRLPOOL f6b98b3f7522185383f1bac4b233bf725a24ba998fd09c61762de25baeb70ce3633909bc5ffe7f0ac9e83201adbe73c701e7a1892c059908ed17a75731d6335c
+DIST opendnssec-1.4.8.2.tar.gz 1043171 SHA256 7fd553ee39173e807477ed1daff6ee2f8b1c83875cd2e52a1df3315bf0015513 SHA512 7f2e10b425f60947aca40c61509b07ddc4363105cc882b518ffa816437299d6f881411cb38325f27b3a34c2005953988b39c945362866dd0f1f7c6ef973bfa06 WHIRLPOOL 38079a89d8e3d039aeab28c80b7fb1a9739014736d6076442c546fae1b13e1c89faa1858beb6f4d2f495d19a2a1187a7af10c55c0ed33563bc9b2d57945de807
+DIST opendnssec-2.0.1.tar.gz 1101523 SHA256 bf874bbb346699a5b539699f90a54e0c15fff0574df7a3c118abb30938b7b346 SHA512 aa12818f92688e087acaff8a6771d2a7da733e04d9e821967d313c7ff880a1056f470b11988eba1e7aad606418c3a4587f654163d74f68e3f61943c74d86d052 WHIRLPOOL 865fbd0d21cd015e87da5f26858e39a233464fb04e56a21683b4713d3836b925eea80973446571da78730ef765d5a1a3fc5f8ad192dd09fdf6eb7467ae417769
+DIST opendnssec-2.0.3.tar.gz 1103355 SHA256 ebeb5481d696cf83c21c5dfbecce6ab5dcc73df1a08573ef257f2f6fe10f6214 SHA512 4745a9ac317cc65d6f5b14be640687efd5fde2149541f692fb607a458378d27e903f175023c1aa16a777d17cef9cc68f1a84e7e7cdb233466d26756721b34424 WHIRLPOOL 51389851b46b62ee1829dd2af5cb41edbe28484ff23dd9b281f77ee7966dd67aa743f1c8d869052bb0a598cf42ab850ad0d2f80343b26aaf551940bb9f0d3f41
+EBUILD opendnssec-1.3.18-r1.ebuild 5693 SHA256 b4f50fe2dc4698e1f1457391f6490dbbfbf67ba01a66031a5da9819af1d1d1b1 SHA512 6322f3c01ce746605249fe7a7e748b3d59017a2cda394f750eb3ce646923335a6659cf47a240bd5c07b179ba3219f8a650a610b898d3ead4d4b68c3f150bcc34 WHIRLPOOL a622c523e2f9332e784963d10ddc52043c15cf49f048a7d1529c7cd10dee81e703f06528b421aa60d01c18f57acfa2816ab249e4f40a65b64e057012fab2299f
+EBUILD opendnssec-1.4.12-r1.ebuild 5780 SHA256 caf2d7b04e4d4a34ceb3552960c9541b5d6cd1e136fbd3c4f676e5541344db80 SHA512 3e0ac6197e86315794dd604de6adb605845c09f8a00958189f35d3432b748de2e2d8589c217035c4dd167971452026d56a6b2ca38db0af8d7eb18ad8f888237c WHIRLPOOL 9e25c65d9b5bd1751e30120e7d59f8ea26abf3e2b67749ae503a89e865f66c4f87d57dc8f0fe395a95353fb6f7ad266280244ef274c0f96537a1cdb34f4d4246
+EBUILD opendnssec-1.4.8.2.ebuild 5830 SHA256 36dfde77d4c65b0dfdac4be6a7db56f0b1eec21978e1de84efeb3f7e2564ca5e SHA512 d9cb344ca13a2a926f46e4dd041453132cb669d0ae23f4180dda38ca12fa41f6aa6187d7e9cf70ca8e36ec4266cd75569a36d928c9ab65800c68ecc11ec6da80 WHIRLPOOL 5001986e96040dae337df7d7728f4a50ee1c9e7b600f01e9d11570335073a18ec7999e4818e08fbb4c678ead18023104413b76406e48d1fa06a2216c7051ed58
+EBUILD opendnssec-2.0.1-r1.ebuild 6763 SHA256 4bff75c622d69ecc2e91b5f7672f09c77603c65a0572c799ceff744f6a84de9e SHA512 9398125ccf2e3bc05ffc8c87e9582374075cb89d079e3e01364134f6529f399fa7556afd1d489f43235a31f6e2c7e13726b6552ab59d757df761680668ad7102 WHIRLPOOL d2a85cd8266136c91407e5b8a81d8d8bac9b6dcee2357be408bb56f33c346bde0b9a1a5c035e0c02f481dd21afb5d8bf15f50d9bac280e67dbed5048321c9fe9
+EBUILD opendnssec-2.0.3.ebuild 6763 SHA256 4bff75c622d69ecc2e91b5f7672f09c77603c65a0572c799ceff744f6a84de9e SHA512 9398125ccf2e3bc05ffc8c87e9582374075cb89d079e3e01364134f6529f399fa7556afd1d489f43235a31f6e2c7e13726b6552ab59d757df761680668ad7102 WHIRLPOOL d2a85cd8266136c91407e5b8a81d8d8bac9b6dcee2357be408bb56f33c346bde0b9a1a5c035e0c02f481dd21afb5d8bf15f50d9bac280e67dbed5048321c9fe9
+MISC ChangeLog 5718 SHA256 22234d269386e8a717f4d196571001e23ccebe91b931da9b987365e63d9bbf8c SHA512 0c299644afd60dacc087e19b8530704a92cc2d65985e60689d177b39befc0fff243d2d674291c1509438d182faa71de590a364b6cc1aeeb5e4984937f8e4914a WHIRLPOOL 2eece09c7090ac503d0c7e55dce19e57caa5f00ef2ce066cabfc976f72c8f3fbba94104637e6d55be9ef506dc3e795250c81694cba5a977719a338c73afff72f
+MISC ChangeLog-2015 8837 SHA256 0bbf10d947069650e591cbb4e9785d9a729f552fd9eb7c19ee1b4e2a02d5f6ba SHA512 5d5490b6c9ae8eea841df5c30a172d688fa95e8460059b2c2205ee169baa20147dc77523d6a9802dd321665031fb99f3ec7725381bd79c6c0040869c9cb0920a WHIRLPOOL db61e6216a86b07e6c7364087a4a511237d7b6a66741338c4749edbb4ab41cf15828e18e6eb43f4d6ff4d23a7ee2f435cd8e37223660d9068c66a0d78347e149
+MISC metadata.xml 906 SHA256 f68a7488c51564b1d622ddc75e61a3a8658c1c6e94356d96cb487adba8d846fa SHA512 9cddc6b15c7a959cb885bc639c19e166ee202dd4b45db50c9bbb3b61fe9e84311f023a3d34cfc44e689cf81df092211fa4cb88427fb143c113bdfc1e7897112e WHIRLPOOL 243f9f79db1553fced401bc2443b22fbb8bfba88e3e70dfb2ede16a27cad19e22c86ee8926389e25b5fd5dfff1b162ee1d74cc7d5f15fb799aa64e3614d10261
diff --git a/net-dns/opendnssec/files/opendnssec-1.3.14-drop-privileges.patch b/net-dns/opendnssec/files/opendnssec-1.3.14-drop-privileges.patch
new file mode 100644
index 000000000000..7c9f72355d20
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-1.3.14-drop-privileges.patch
@@ -0,0 +1,43 @@
+Index: conf/conf.xml.in
+===================================================================
+--- conf/conf.xml.in (revision 3022)
++++ conf/conf.xml.in (working copy)
+@@ -38,12 +38,10 @@
+ </Common>
+
+ <Enforcer>
+-<!--
+ <Privileges>
+ <User>opendnssec</User>
+ <Group>opendnssec</Group>
+ </Privileges>
+--->
+
+ <Datastore><SQLite>@OPENDNSSEC_STATE_DIR@/kasp.db</SQLite></Datastore>
+ <Interval>PT3600S</Interval>
+@@ -56,12 +54,10 @@
+ </Enforcer>
+
+ <Signer>
+-<!--
+ <Privileges>
+ <User>opendnssec</User>
+ <Group>opendnssec</Group>
+ </Privileges>
+--->
+
+ <WorkingDirectory>@OPENDNSSEC_STATE_DIR@/tmp</WorkingDirectory>
+ <WorkerThreads>8</WorkerThreads>
+@@ -80,12 +76,10 @@
+ </Signer>
+
+ <Auditor>
+-<!--
+ <Privileges>
+ <User>opendnssec</User>
+ <Group>opendnssec</Group>
+ </Privileges>
+--->
+
+ <WorkingDirectory>@OPENDNSSEC_STATE_DIR@/tmp</WorkingDirectory>
+ </Auditor>
diff --git a/net-dns/opendnssec/files/opendnssec-1.3.14-use-system-trang.patch b/net-dns/opendnssec/files/opendnssec-1.3.14-use-system-trang.patch
new file mode 100644
index 000000000000..39678408264a
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-1.3.14-use-system-trang.patch
@@ -0,0 +1,21 @@
+diff -urN opendnssec-1.3.0rc3.old/conf/Makefile.am opendnssec-1.3.0rc3/conf/Makefile.am
+--- opendnssec-1.3.0rc3.old/conf/Makefile.am 2011-07-01 21:15:25.000000000 +0200
++++ opendnssec-1.3.0rc3/conf/Makefile.am 2011-07-01 21:17:00.000000000 +0200
+@@ -7,7 +7,7 @@
+ XML = conf.xml kasp.xml zonelist.xml signconf.xml zonefetch.xml
+ XSL= kasp2html.xsl
+
+-TRANG= $(srcdir)/trang/trang.jar
++TRANG= /usr/bin/trang
+
+ sysconfdir = @sysconfdir@/opendnssec
+ datadir = @datadir@/opendnssec
+@@ -25,7 +25,7 @@
+ .rnc.rng:
+ @test -x "${JAVA}" || \
+ (echo "java is required for converting RelaxNG Compact to RelaxNG"; false)
+- ${JAVA} -jar ${TRANG} $< $@
++ ${TRANG} $< $@
+
+ regress: $(RNG)
+ @test -x "${XMLLINT}" || \
diff --git a/net-dns/opendnssec/files/opendnssec-1.3.18-eppclient-curl-CVE-2012-5582.patch b/net-dns/opendnssec/files/opendnssec-1.3.18-eppclient-curl-CVE-2012-5582.patch
new file mode 100644
index 000000000000..a0676dd091be
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-1.3.18-eppclient-curl-CVE-2012-5582.patch
@@ -0,0 +1,12 @@
+diff -urN opendnssec-1.3.18.orig/plugins/eppclient/src/epp.c opendnssec-1.3.18/plugins/eppclient/src/epp.c
+--- opendnssec-1.3.18.orig/plugins/eppclient/src/epp.c 2014-07-21 11:16:10.000000000 +0200
++++ opendnssec-1.3.18/plugins/eppclient/src/epp.c 2016-03-23 22:25:18.679354984 +0100
+@@ -390,7 +390,7 @@
+ curl_easy_setopt(curl, CURLOPT_URL, url);
+ curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
+- curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1L);
++ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L);
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
+ curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curlerr);
+ curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
diff --git a/net-dns/opendnssec/files/opendnssec-drop-privileges-2.0.x.patch b/net-dns/opendnssec/files/opendnssec-drop-privileges-2.0.x.patch
new file mode 100644
index 000000000000..f3adc487dee9
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-drop-privileges-2.0.x.patch
@@ -0,0 +1,29 @@
+diff -ur opendnssec-2.0.1.orig/conf/conf.xml.in opendnssec-2.0.1/conf/conf.xml.in
+--- opendnssec-2.0.1.orig/conf/conf.xml.in 2016-07-21 16:15:27.000000000 +0200
++++ opendnssec-2.0.1/conf/conf.xml.in 2016-08-23 15:21:09.633384446 +0200
+@@ -36,12 +36,10 @@
+ </Common>
+
+ <Enforcer>
+-<!--
+ <Privileges>
+ <User>opendnssec</User>
+ <Group>opendnssec</Group>
+ </Privileges>
+--->
+
+ <Datastore><SQLite>@OPENDNSSEC_STATE_DIR@/kasp.db</SQLite></Datastore>
+ <!--The enforcer interval parameter is no long used in 2.0 and will be deprecated in 2.1 -->
+@@ -60,12 +58,10 @@
+ </Enforcer>
+
+ <Signer>
+-<!--
+ <Privileges>
+ <User>opendnssec</User>
+ <Group>opendnssec</Group>
+ </Privileges>
+--->
+
+ <WorkingDirectory>@OPENDNSSEC_STATE_DIR@/signer</WorkingDirectory>
+ <WorkerThreads>4</WorkerThreads>
diff --git a/net-dns/opendnssec/files/opendnssec-drop-privileges.patch b/net-dns/opendnssec/files/opendnssec-drop-privileges.patch
new file mode 100644
index 000000000000..c1972bbc3d1b
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-drop-privileges.patch
@@ -0,0 +1,28 @@
+--- conf/conf.xml.in.orig 2013-05-12 22:36:47.530988182 +0200
++++ conf/conf.xml.in 2013-05-12 22:37:56.459817918 +0200
+@@ -38,12 +38,10 @@
+ </Common>
+
+ <Enforcer>
+-<!--
+ <Privileges>
+ <User>opendnssec</User>
+ <Group>opendnssec</Group>
+ </Privileges>
+--->
+ <!-- NOTE: Enforcer worker threads are not used; this option is ignored -->
+ <!--
+ <WorkerThreads>4</WorkerThreads>
+@@ -60,12 +58,10 @@
+ </Enforcer>
+
+ <Signer>
+-<!--
+ <Privileges>
+ <User>opendnssec</User>
+ <Group>opendnssec</Group>
+ </Privileges>
+--->
+
+ <WorkingDirectory>@OPENDNSSEC_STATE_DIR@/tmp</WorkingDirectory>
+ <WorkerThreads>4</WorkerThreads>
diff --git a/net-dns/opendnssec/files/opendnssec-fix-localstatedir-2.0.x.patch b/net-dns/opendnssec/files/opendnssec-fix-localstatedir-2.0.x.patch
new file mode 100644
index 000000000000..5940c2f050e6
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-fix-localstatedir-2.0.x.patch
@@ -0,0 +1,22 @@
+diff -ur opendnssec-2.0.1.orig/Makefile.am opendnssec-2.0.1/Makefile.am
+--- opendnssec-2.0.1.orig/Makefile.am 2016-07-21 16:15:00.000000000 +0200
++++ opendnssec-2.0.1/Makefile.am 2016-08-23 14:01:50.618393034 +0200
+@@ -30,12 +30,12 @@
+
+ install-data-hook:
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/signer
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/enforcer
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/signconf
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/unsigned
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/signed
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signer
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/enforcer
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signconf
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/unsigned
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signed
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/run
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/run/opendnssec
+
diff --git a/net-dns/opendnssec/files/opendnssec-fix-localstatedir.patch b/net-dns/opendnssec/files/opendnssec-fix-localstatedir.patch
new file mode 100644
index 000000000000..3958c6c70ccf
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-fix-localstatedir.patch
@@ -0,0 +1,32 @@
+diff -urN opendnssec-1.3.0rc2.old/Makefile.am opendnssec-1.3.0rc2/Makefile.am
+--- opendnssec-1.3.0rc2.old/Makefile.am 2011-06-02 13:48:56.000000000 +0200
++++ opendnssec-1.3.0rc2/Makefile.am 2011-06-02 13:49:19.000000000 +0200
+@@ -31,11 +31,11 @@
+
+ install-data-hook:
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/tmp
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/signconf
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/unsigned
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/signed
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/tmp
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signconf
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/unsigned
++ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signed
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/run
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/run/opendnssec
+
+diff -urN opendnssec-1.3.0rc2.old/m4/opendnssec_common.m4 opendnssec-1.3.0rc2/m4/opendnssec_common.m4
+--- opendnssec-1.3.0rc2.old/m4/opendnssec_common.m4 2011-06-02 13:48:56.000000000 +0200
++++ opendnssec-1.3.0rc2/m4/opendnssec_common.m4 2011-06-02 13:49:36.000000000 +0200
+@@ -18,7 +18,7 @@
+ OPENDNSSEC_LIBEXEC_DIR=$full_libexecdir/opendnssec
+ OPENDNSSEC_DATA_DIR=$full_datadir/opendnssec
+ OPENDNSSEC_SYSCONF_DIR=$full_sysconfdir/opendnssec
+-OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/opendnssec"
++OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/lib/opendnssec"
+ OPENDNSSEC_PID_DIR="$full_localstatedir/run/opendnssec"
+
+ AC_SUBST([OPENDNSSEC_BIN_DIR])
diff --git a/net-dns/opendnssec/files/opendnssec-fix-run-dir-2.0.x.patch b/net-dns/opendnssec/files/opendnssec-fix-run-dir-2.0.x.patch
new file mode 100644
index 000000000000..5ea9c80f2ba7
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-fix-run-dir-2.0.x.patch
@@ -0,0 +1,24 @@
+diff -ur opendnssec-2.0.1.orig/m4/opendnssec_common.m4 opendnssec-2.0.1/m4/opendnssec_common.m4
+--- opendnssec-2.0.1.orig/m4/opendnssec_common.m4 2016-07-21 16:15:00.000000000 +0200
++++ opendnssec-2.0.1/m4/opendnssec_common.m4 2016-08-23 14:42:35.033460972 +0200
+@@ -17,7 +17,7 @@
+ OPENDNSSEC_DATA_DIR=$full_datadir/opendnssec
+ OPENDNSSEC_SYSCONF_DIR=$full_sysconfdir/opendnssec
+ OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/opendnssec"
+-OPENDNSSEC_PID_DIR="$full_localstatedir/run/opendnssec"
++OPENDNSSEC_PID_DIR="${destdir}/run/opendnssec"
+
+ AC_SUBST([OPENDNSSEC_BIN_DIR])
+ AC_SUBST([OPENDNSSEC_SBIN_DIR])
+diff -ur opendnssec-2.0.1.orig/Makefile.am opendnssec-2.0.1/Makefile.am
+--- opendnssec-2.0.1.orig/Makefile.am 2016-08-23 14:40:10.009951791 +0200
++++ opendnssec-2.0.1/Makefile.am 2016-08-23 14:43:20.377870776 +0200
+@@ -36,8 +36,6 @@
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signconf
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/unsigned
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signed
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/run
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/run/opendnssec
+
+ docs:
+ (cd libhsm; $(MAKE) doxygen)
diff --git a/net-dns/opendnssec/files/opendnssec-fix-run-dir.patch b/net-dns/opendnssec/files/opendnssec-fix-run-dir.patch
new file mode 100644
index 000000000000..fe5b504344cf
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-fix-run-dir.patch
@@ -0,0 +1,26 @@
+diff -ur opendnssec-1.3.12.orig/m4/opendnssec_common.m4 opendnssec-1.3.12/m4/opendnssec_common.m4
+--- opendnssec-1.3.12.orig/m4/opendnssec_common.m4 2013-01-31 13:46:01.122201232 +0100
++++ opendnssec-1.3.12/m4/opendnssec_common.m4 2013-01-31 13:54:47.648861211 +0100
+@@ -19,7 +19,7 @@
+ OPENDNSSEC_DATA_DIR=$full_datadir/opendnssec
+ OPENDNSSEC_SYSCONF_DIR=$full_sysconfdir/opendnssec
+ OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/lib/opendnssec"
+-OPENDNSSEC_PID_DIR="$full_localstatedir/run/opendnssec"
++OPENDNSSEC_PID_DIR="${destdir}/run/opendnssec"
+
+ AC_SUBST([OPENDNSSEC_BIN_DIR])
+ AC_SUBST([OPENDNSSEC_SBIN_DIR])
+diff -ur opendnssec-1.3.12.orig/Makefile.am opendnssec-1.3.12/Makefile.am
+--- opendnssec-1.3.12.orig/Makefile.am 2013-01-31 13:46:01.122201232 +0100
++++ opendnssec-1.3.12/Makefile.am 2013-01-31 13:47:08.569951675 +0100
+@@ -37,8 +37,8 @@
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signconf
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/unsigned
+ $(INSTALL) -d $(DESTDIR)$(localstatedir)/lib/opendnssec/signed
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/run
+- $(INSTALL) -d $(DESTDIR)$(localstatedir)/run/opendnssec
++
++
+
+ docs:
+ (cd libhsm; $(MAKE) doxygen)
diff --git a/net-dns/opendnssec/files/opendnssec-use-system-trang.patch b/net-dns/opendnssec/files/opendnssec-use-system-trang.patch
new file mode 100644
index 000000000000..745b277e1339
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec-use-system-trang.patch
@@ -0,0 +1,20 @@
+--- conf/Makefile.am.orig 2013-05-12 22:45:26.514768943 +0200
++++ conf/Makefile.am 2013-05-12 22:46:33.399545628 +0200
+@@ -7,7 +7,7 @@
+ XML = addns.xml conf.xml kasp.xml zonelist.xml signconf.xml enforcerstate.xml
+ XSL= kasp2html.xsl
+
+-TRANG= $(srcdir)/trang/trang.jar
++TRANG= /usr/bin/trang
+ TRANG_URL "https://code.google.com/p/jing-trang/"
+
+ sysconfdir = @sysconfdir@/opendnssec
+@@ -31,7 +31,7 @@
+ .rnc.rng:
+ @test -x "${JAVA}" || \
+ (echo "java is required for converting RelaxNG Compact to RelaxNG"; false)
+- ${JAVA} -jar ${TRANG} $< $@
++ ${TRANG} $< $@
+
+ regress: $(RNG)
+ @test -x "${XMLLINT}" || \
diff --git a/net-dns/opendnssec/files/opendnssec.confd b/net-dns/opendnssec/files/opendnssec.confd
new file mode 100644
index 000000000000..a54fc2091273
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec.confd
@@ -0,0 +1,11 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Variables containing default binaries used in the opendnssec
+# initscript. You can alter them to another applications/paths
+# if required.
+
+CHECKCONFIG_BIN=/usr/bin/ods-kaspcheck
+CONTROL_BIN=/usr/sbin/ods-control
+ENFORCER_BIN=/usr/sbin/ods-enforcerd
+SIGNER_BIN=/usr/sbin/ods-signerd
diff --git a/net-dns/opendnssec/files/opendnssec.confd-1.3.x b/net-dns/opendnssec/files/opendnssec.confd-1.3.x
new file mode 100644
index 000000000000..63121af7f0ca
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec.confd-1.3.x
@@ -0,0 +1,13 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Variables containing default binaries used in the opendnssec
+# initscript. You can alter them to another applications/paths
+# if required.
+
+CHECKCONFIG_BIN=/usr/bin/ods-kaspcheck
+CONTROL_BIN=/usr/sbin/ods-control
+ENFORCER_BIN=/usr/sbin/ods-enforcerd
+SIGNER_BIN=/usr/sbin/ods-signerd
+EPPCLIENT_BIN=/usr/sbin/eppclientd
+EPPCLIENT_PIDFILE=/run/opendnssec/eppclientd.pid
diff --git a/net-dns/opendnssec/files/opendnssec.initd b/net-dns/opendnssec/files/opendnssec.initd
new file mode 100644
index 000000000000..39757d142f2d
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec.initd
@@ -0,0 +1,85 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="An open-source turn-key solution for DNSSEC"
+
+depend() {
+ use logger
+}
+
+checkconfig() {
+ if [ -x "${CHECKCONFIG_BIN}" ]; then
+ output=$(${CHECKCONFIG_BIN} 2>&1| grep -v -E "^/etc/opendnssec/(conf|kasp).xml validates")
+ if [ -n "$output" ]; then
+ echo $output
+ fi
+
+ errors=$(echo $output | grep ERROR | wc -l)
+ if [ $errors -gt 0 ]; then
+ ewarn "$errors error(s) found in OpenDNSSEC configuration."
+ fi
+ return $errors
+ fi
+ eerror "Unable to execute ${CHECKCONFIG_BIN:-config binary}"
+ # can't validate config, just die
+ return 1
+}
+
+
+start_enforcer() {
+ if [ -n "${ENFORCER_BIN}" ] && [ -x "${ENFORCER_BIN}" ]; then
+ ebegin "Starting OpenDNSSEC Enforcer"
+ ${CONTROL_BIN} enforcer start > /dev/null
+ eend $?
+ else
+ if [ -n "${ENFORCER_BIN}" ]; then
+ eerror "OpenDNSSEC Enforcer binary not executable"
+ return 1
+ fi
+ einfo "OpenDNSSEC Enforcer not used."
+ fi
+}
+
+stop_enforcer() {
+ if [ -x "${ENFORCER_BIN}" ]; then
+ ebegin "Stopping OpenDNSSEC Enforcer"
+ ${CONTROL_BIN} enforcer stop > /dev/null
+ eend $?
+ fi
+}
+
+start_signer() {
+ if [ -n "${SIGNER_BIN}" ] && [ -x "${SIGNER_BIN}" ]; then
+ ebegin "Starting OpenDNSSEC Signer"
+ ${CONTROL_BIN} signer start > /dev/null 2>&1
+ eend $?
+ else
+ if [ -n "${SIGNER_BIN}" ]; then
+ eerror "OpenDNSSEC Signer binary not executable"
+ return 1
+ fi
+ einfo "OpenDNSSEC Signer not used."
+ fi
+}
+
+stop_signer() {
+ if [ -x "${SIGNER_BIN}" ]; then
+ ebegin "Stopping OpenDNSSEC Signer"
+ ${CONTROL_BIN} signer stop > /dev/null 2>&1
+ eend $?
+ fi
+}
+
+start() {
+ checkconfig || return $?
+ checkpath -d -m 0755 -o opendnssec:opendnssec /run/opendnssec
+ start_enforcer || return $?
+ start_signer || return $?
+}
+
+stop() {
+ stop_signer
+ stop_enforcer
+ sleep 5
+}
diff --git a/net-dns/opendnssec/files/opendnssec.initd-1.3.x b/net-dns/opendnssec/files/opendnssec.initd-1.3.x
new file mode 100644
index 000000000000..9f4adbd184a9
--- /dev/null
+++ b/net-dns/opendnssec/files/opendnssec.initd-1.3.x
@@ -0,0 +1,123 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="An open-source turn-key solution for DNSSEC"
+
+depend() {
+ use logger
+}
+
+checkconfig() {
+ if [ -z "${CHECKCONFIG_BIN}" ]; then
+ # no config checker configured, skip config check
+ return 0
+ fi
+ if [ -x "${CHECKCONFIG_BIN}" ]; then
+ output=$(${CHECKCONFIG_BIN} 2>&1| grep -v -E "^/etc/opendnssec/(conf|kasp).xml validates")
+ if [ -n "$output" ]; then
+ echo $output
+ fi
+
+ errors=$(echo $output | grep ERROR | wc -l)
+ if [ $errors -gt 0 ]; then
+ ewarn "$errors error(s) found in OpenDNSSEC configuration."
+ fi
+ return $errors
+ fi
+ eerror "Unable to execute ${CHECKCONFIG_BIN:-config binary}"
+ # can't validate config, just die
+ return 1
+}
+
+start_enforcer() {
+ if [ -n "${ENFORCER_BIN}" ] && [ -x "${ENFORCER_BIN}" ]; then
+ ebegin "Starting OpenDNSSEC Enforcer"
+ ${CONTROL_BIN} enforcer start > /dev/null
+ eend $?
+ else
+ if [ -n "${ENFORCER_BIN}" ]; then
+ eerror "OpenDNSSEC Enforcer binary not executable"
+ return 1
+ fi
+ einfo "OpenDNSSEC Enforcer not used."
+ fi
+}
+
+stop_enforcer() {
+ if [ -x "${ENFORCER_BIN}" ]; then
+ ebegin "Stopping OpenDNSSEC Enforcer"
+ ${CONTROL_BIN} enforcer stop > /dev/null
+ eend $?
+ fi
+}
+
+start_signer() {
+ if [ -n "${SIGNER_BIN}" ] && [ -x "${SIGNER_BIN}" ]; then
+ ebegin "Starting OpenDNSSEC Signer"
+ ${CONTROL_BIN} signer start > /dev/null 2>&1
+ eend $?
+ else
+ if [ -n "${SIGNER_BIN}" ]; then
+ eerror "OpenDNSSEC Signer binary not executable"
+ return 1
+ fi
+ einfo "OpenDNSSEC Signer not used."
+ fi
+}
+
+stop_signer() {
+ if [ -x "${SIGNER_BIN}" ]; then
+ ebegin "Stopping OpenDNSSEC Signer"
+ ${CONTROL_BIN} signer stop > /dev/null 2>&1
+ eend $?
+ fi
+}
+
+start_eppclient() {
+ if [ -n "${EPPCLIENT_BIN}" ] && [ -x "${EPPCLIENT_BIN}" ]; then
+ ebegin "Starting OpenDNSSEC Eppclient"
+ start-stop-daemon \
+ --start \
+ --user opendnssec --group opendnssec \
+ --exec "${EPPCLIENT_BIN}" \
+ --pidfile "${EPPCLIENT_PIDFILE}" > /dev/null
+ eend $?
+ else
+ # eppclient is ofptional so if we use the default binary and it
+ # is not used we won't die
+ if [ -n "${EPPCLIENT_BIN}" ] && \
+ [ "${EPPCLIENT_BIN}" != "/usr/sbin/eppclientd" ]; then
+ eerror "OpenDNSSEC Eppclient binary not executable"
+ return 1
+ fi
+ einfo "OpenDNSSEC Eppclient not used."
+ fi
+}
+
+stop_eppclient() {
+ if [ -x "${EPPCLIENT_BIN}" ]; then
+ ebegin "Stopping OpenDNSSEC Eppclient"
+ start-stop-daemon \
+ --stop \
+ --exec "${EPPCLIENT_BIN}" \
+ --pidfile "${EPPCLIENT_PIDFILE}" > /dev/null
+ eend $?
+ fi
+}
+
+start() {
+ checkconfig || return $?
+ test -d /run/opendnssec || mkdir -p /run/opendnssec
+ chown opendnssec:opendnssec /run/opendnssec
+ start_enforcer || return $?
+ start_signer || return $?
+ start_eppclient || return $?
+}
+
+stop() {
+ stop_eppclient
+ stop_signer
+ stop_enforcer
+ sleep 5
+}
diff --git a/net-dns/opendnssec/metadata.xml b/net-dns/opendnssec/metadata.xml
new file mode 100644
index 000000000000..f81a154f2ecf
--- /dev/null
+++ b/net-dns/opendnssec/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mschiff@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="auditor">Enables auditing capabilities for OpenDNSSEC</flag>
+ <flag name="eppclient">Enables support for automatic submission of DNSSEC keys to an upstream epp server</flag>
+ <flag name="signer">Enables signing capabilities for OpenDNSSEC</flag>
+ <flag name="opensc">Enables support for storing DNSSEC keys through a <pkg>dev-libs/opensc</pkg> PKCS#11 interface</flag>
+ <flag name="softhsm">Enables support for storing DNSSEC keys in a <pkg>dev-libs/softhsm</pkg> PKCS#11 object</flag>
+ <flag name="external-hsm">Enables support for storing DNSSEC keys through an arbitrary non-portage PKCS#11 interface, specified through an environment variable</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/opendnssec/opendnssec-1.3.18-r1.ebuild b/net-dns/opendnssec/opendnssec-1.3.18-r1.ebuild
new file mode 100644
index 000000000000..d4bfd0296b7c
--- /dev/null
+++ b/net-dns/opendnssec/opendnssec-1.3.18-r1.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P="${P/_}"
+PKCS11_IUSE="+softhsm opensc external-hsm"
+inherit autotools multilib user
+
+DESCRIPTION="An open-source turn-key solution for DNSSEC"
+HOMEPAGE="http://www.opendnssec.org/"
+SRC_URI="http://www.${PN}.org/files/source/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="-auditor +curl debug doc eppclient mysql +signer +sqlite test ${PKCS11_IUSE}"
+
+RDEPEND="
+ dev-lang/perl
+ dev-libs/libxml2
+ dev-libs/libxslt
+ net-libs/ldns
+ curl? ( net-misc/curl )
+ mysql? (
+ virtual/mysql
+ dev-perl/DBD-mysql
+ )
+ opensc? ( dev-libs/opensc )
+ softhsm? ( dev-libs/softhsm:* )
+ sqlite? (
+ dev-db/sqlite:3
+ dev-perl/DBD-SQLite
+ )
+"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ test? (
+ app-text/trang
+ )
+"
+# test? dev-util/cunit # Requires running test DB
+
+REQUIRED_USE="
+ ^^ ( mysql sqlite )
+ ^^ ( softhsm opensc external-hsm )
+ eppclient? ( curl )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-fix-localstatedir.patch"
+ "${FILESDIR}/${PN}-fix-run-dir.patch"
+ "${FILESDIR}/${PN}-1.3.14-drop-privileges.patch"
+ "${FILESDIR}/${PN}-1.3.14-use-system-trang.patch"
+ "${FILESDIR}/${PN}-1.3.18-eppclient-curl-CVE-2012-5582.patch"
+)
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( MIGRATION NEWS )
+
+check_pkcs11_setup() {
+ # PKCS#11 HSM's are often only available with proprietary drivers not
+ # available in portage tree.
+
+ if use softhsm; then
+ PKCS11_LIB=softhsm
+ if has_version ">=dev-libs/softhsm-1.3.1"; then
+ PKCS11_PATH=/usr/$(get_libdir)/softhsm/libsofthsm.so
+ else
+ PKCS11_PATH=/usr/$(get_libdir)/libsofthsm.so
+ fi
+ elog "Building with SoftHSM PKCS#11 library support."
+ fi
+ if use opensc; then
+ PKCS11_LIB=opensc
+ PKCS11_PATH=/usr/$(get_libdir)/opensc-pkcs11.so
+ elog "Building with OpenSC PKCS#11 library support."
+ fi
+ if use external-hsm; then
+ if [[ -n ${PKCS11_SCA6000} ]]; then
+ PKCS11_LIB=sca6000
+ PKCS11_PATH=${PKCS11_SCA6000}
+ elif [[ -n ${PKCS11_ETOKEN} ]]; then
+ PKCS11_LIB=etoken
+ PKCS11_PATH=${PKCS11_ETOKEN}
+ elif [[ -n ${PKCS11_NCIPHER} ]]; then
+ PKCS11_LIB=ncipher
+ PKCS11_PATH=${PKCS11_NCIPHER}
+ elif [[ -n ${PKCS11_AEPKEYPER} ]]; then
+ PKCS11_LIB=aepkeyper
+ PKCS11_PATH=${PKCS11_AEPKEYPER}
+ else
+ ewarn "You enabled USE flag 'external-hsm' but did not specify a path to a PKCS#11"
+ ewarn "library. To set a path, set one of the following environment variables:"
+ ewarn " for Sun Crypto Accelerator 6000, set: PKCS11_SCA6000=<path>"
+ ewarn " for Aladdin eToken, set: PKCS11_ETOKEN=<path>"
+ ewarn " for Thales/nCipher netHSM, set: PKCS11_NCIPHER=<path>"
+ ewarn " for AEP Keyper, set: PKCS11_AEPKEYPER=<path>"
+ ewarn "Example:"
+ ewarn " PKCS11_ETOKEN=\"/opt/etoken/lib/libeTPkcs11.so\" emerge -pv opendnssec"
+ ewarn "or store the variable into /etc/portage/make.conf"
+ die "USE flag 'external-hsm' set but no PKCS#11 library path specified."
+ fi
+ elog "Building with external PKCS#11 library support ($PKCS11_LIB): ${PKCS11_PATH}"
+ fi
+}
+
+pkg_pretend() {
+ local i
+
+ for i in eppclient mysql; do
+ if use ${i}; then
+ ewarn
+ ewarn "Usage of ${i} is considered experimental."
+ ewarn "Do not report bugs against this feature."
+ ewarn
+ fi
+ done
+
+ check_pkcs11_setup
+}
+
+pkg_setup() {
+ enewgroup opendnssec
+ enewuser opendnssec -1 -1 -1 opendnssec
+
+ # pretend does not preserve variables so we need to run this once more
+ check_pkcs11_setup
+}
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ # $(use_with test cunit "${EPREFIX}/usr/") \
+ econf \
+ --without-cunit \
+ --localstatedir="${EPREFIX}/var/" \
+ --disable-static \
+ --with-database-backend=$(use mysql && echo "mysql")$(use sqlite && echo "sqlite3") \
+ --with-pkcs11-${PKCS11_LIB}=${PKCS11_PATH} \
+ --disable-auditor \
+ $(use_with curl) \
+ $(use_enable debug timeshift) \
+ $(use_enable eppclient) \
+ $(use_enable signer)
+}
+
+src_compile() {
+ default
+ use doc && emake docs
+}
+
+src_install() {
+ default
+
+ # remove useless .la files
+ find "${ED}" -name '*.la' -delete
+
+ # Remove subversion tags from config files to avoid useless config updates
+ sed -i \
+ -e '/<!-- \$Id:/ d' \
+ "${ED}"/etc/opendnssec/* || die
+
+ # install update scripts
+ insinto /usr/share/opendnssec
+ use sqlite && doins enforcer/utils/migrate_keyshare_sqlite3.pl
+ use mysql && doins enforcer/utils/migrate_keyshare_mysql.pl
+
+ # fix permissions
+ fowners root:opendnssec /etc/opendnssec
+ fowners root:opendnssec /etc/opendnssec/{conf,kasp,zonelist,zonefetch}.xml
+ use eppclient && fowners root:opendnssec /etc/opendnssec/eppclientd.conf
+
+ fowners opendnssec:opendnssec /var/lib/opendnssec/{,signconf,unsigned,signed,tmp}
+
+ # install conf/init script
+ newinitd "${FILESDIR}"/opendnssec.initd-1.3.x opendnssec
+ newconfd "${FILESDIR}"/opendnssec.confd-1.3.x opendnssec
+ use auditor || sed -i 's/^CHECKCONFIG_BIN=.*/CHECKCONFIG_BIN=/' "${D}"/etc/conf.d/opendnssec
+}
+
+pkg_postinst() {
+ if use softhsm; then
+ elog "Please make sure that you create your softhsm database in a location writeable"
+ elog "by the opendnssec user. You can set its location in /etc/softhsm.conf."
+ elog "Suggested configuration is:"
+ elog " echo \"0:/var/lib/opendnssec/softhsm_slot0.db\" >> /etc/softhsm.conf"
+ elog " softhsm --init-token --slot 0 --label OpenDNSSEC"
+ elog " chown opendnssec:opendnssec /var/lib/opendnssec/softhsm_slot0.db"
+ fi
+ if use auditor; then
+ ewarn
+ ewarn "Please note that auditor support has been disabled in this version since it"
+ ewarn "it depends on ruby 1.8 which has been removed from the portage tree."
+ ewarn "USE=auditor is only provided for this warning but will not install the"
+ ewarn "auditor anymore."
+ ewarn
+ fi
+}
diff --git a/net-dns/opendnssec/opendnssec-1.4.12-r1.ebuild b/net-dns/opendnssec/opendnssec-1.4.12-r1.ebuild
new file mode 100644
index 000000000000..68d85cf8be58
--- /dev/null
+++ b/net-dns/opendnssec/opendnssec-1.4.12-r1.ebuild
@@ -0,0 +1,207 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P="${P/_}"
+PKCS11_IUSE="+softhsm opensc external-hsm"
+inherit autotools eutils multilib user
+
+DESCRIPTION="An open-source turn-key solution for DNSSEC"
+HOMEPAGE="http://www.opendnssec.org/"
+SRC_URI="http://www.${PN}.org/files/source/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc +mysql +signer sqlite test ${PKCS11_IUSE}"
+
+RDEPEND="
+ dev-lang/perl
+ dev-libs/libxml2
+ dev-libs/libxslt
+ net-libs/ldns
+ mysql? (
+ virtual/mysql
+ dev-perl/DBD-mysql
+ )
+ opensc? ( dev-libs/opensc )
+ softhsm? ( dev-libs/softhsm:* )
+ sqlite? (
+ dev-db/sqlite:3
+ dev-perl/DBD-SQLite
+ )
+"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ test? (
+ app-text/trang
+ )
+"
+
+REQUIRED_USE="
+ ^^ ( mysql sqlite )
+ ^^ ( softhsm opensc external-hsm )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-fix-localstatedir.patch"
+ "${FILESDIR}/${PN}-fix-run-dir.patch"
+ "${FILESDIR}/${PN}-drop-privileges.patch"
+ "${FILESDIR}/${PN}-use-system-trang.patch"
+)
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( MIGRATION NEWS )
+
+check_pkcs11_setup() {
+ # PKCS#11 HSM's are often only available with proprietary drivers not
+ # available in portage tree.
+
+ if use softhsm; then
+ PKCS11_LIB=softhsm
+ if has_version ">=dev-libs/softhsm-1.3.1"; then
+ PKCS11_PATH=/usr/$(get_libdir)/softhsm/libsofthsm.so
+ else
+ PKCS11_PATH=/usr/$(get_libdir)/libsofthsm.so
+ fi
+ elog "Building with SoftHSM PKCS#11 library support."
+ fi
+ if use opensc; then
+ PKCS11_LIB=opensc
+ PKCS11_PATH=/usr/$(get_libdir)/opensc-pkcs11.so
+ elog "Building with OpenSC PKCS#11 library support."
+ fi
+ if use external-hsm; then
+ if [[ -n ${PKCS11_SCA6000} ]]; then
+ PKCS11_LIB=sca6000
+ PKCS11_PATH=${PKCS11_SCA6000}
+ elif [[ -n ${PKCS11_ETOKEN} ]]; then
+ PKCS11_LIB=etoken
+ PKCS11_PATH=${PKCS11_ETOKEN}
+ elif [[ -n ${PKCS11_NCIPHER} ]]; then
+ PKCS11_LIB=ncipher
+ PKCS11_PATH=${PKCS11_NCIPHER}
+ elif [[ -n ${PKCS11_AEPKEYPER} ]]; then
+ PKCS11_LIB=aepkeyper
+ PKCS11_PATH=${PKCS11_AEPKEYPER}
+ else
+ ewarn "You enabled USE flag 'external-hsm' but did not specify a path to a PKCS#11"
+ ewarn "library. To set a path, set one of the following environment variables:"
+ ewarn " for Sun Crypto Accelerator 6000, set: PKCS11_SCA6000=<path>"
+ ewarn " for Aladdin eToken, set: PKCS11_ETOKEN=<path>"
+ ewarn " for Thales/nCipher netHSM, set: PKCS11_NCIPHER=<path>"
+ ewarn " for AEP Keyper, set: PKCS11_AEPKEYPER=<path>"
+ ewarn "Example:"
+ ewarn " PKCS11_ETOKEN=\"/opt/etoken/lib/libeTPkcs11.so\" emerge -pv opendnssec"
+ ewarn "or store the variable into /etc/portage/make.conf"
+ die "USE flag 'external-hsm' set but no PKCS#11 library path specified."
+ fi
+ elog "Building with external PKCS#11 library support ($PKCS11_LIB): ${PKCS11_PATH}"
+ fi
+}
+
+pkg_pretend() {
+ check_pkcs11_setup
+}
+
+pkg_setup() {
+ enewgroup opendnssec
+ enewuser opendnssec -1 -1 -1 opendnssec
+
+ # pretend does not preserve variables so we need to run this once more
+ check_pkcs11_setup
+}
+
+src_prepare() {
+ local patch
+ default
+ for patch in "${PATCHES[@]}"; do
+ epatch "$patch"
+ done
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --without-cunit \
+ --localstatedir="${EPREFIX}/var/" \
+ --disable-static \
+ --with-database-backend=$(use mysql && echo "mysql")$(use sqlite && echo "sqlite3") \
+ --with-pkcs11-${PKCS11_LIB}=${PKCS11_PATH} \
+ $(use_enable debug timeshift) \
+ $(use_enable signer)
+}
+
+src_compile() {
+ default
+ use doc && emake docs
+}
+
+src_install() {
+ default
+
+ # remove useless .la files
+ find "${ED}" -name '*.la' -delete
+
+ # Remove subversion tags from config files to avoid useless config updates
+ sed -i \
+ -e '/<!-- \$Id:/ d' \
+ "${ED}"/etc/opendnssec/* || die
+
+ # install update scripts
+ insinto /usr/share/opendnssec
+ if use sqlite; then
+ doins enforcer/utils/migrate_*sqlite*
+ fi
+ if use mysql; then
+ doins enforcer/utils/migrate_*mysql*
+ fi
+
+ # fix permissions
+ fowners root:opendnssec /etc/opendnssec
+ fowners root:opendnssec /etc/opendnssec/{addns,conf,kasp,zonelist}.xml
+ fowners opendnssec:opendnssec /var/lib/opendnssec/{,signconf,unsigned,signed,tmp}
+
+ # install conf/init script
+ newinitd "${FILESDIR}"/opendnssec.initd opendnssec
+ newconfd "${FILESDIR}"/opendnssec.confd opendnssec
+}
+
+pkg_postinst() {
+ local v
+ if use softhsm; then
+ elog "Please make sure that you create your softhsm database in a location writeable"
+ elog "by the opendnssec user. You can set its location in /etc/softhsm.conf."
+ elog "Suggested configuration is:"
+ elog " echo \"0:/var/lib/opendnssec/softhsm_slot0.db\" >> /etc/softhsm.conf"
+ elog " softhsm --init-token --slot 0 --label OpenDNSSEC"
+ elog " chown opendnssec:opendnssec /var/lib/opendnssec/softhsm_slot0.db"
+ fi
+
+ for v in $REPLACING_VERSIONS; do
+ case $v in
+ 1.3.*)
+ ewarn ""
+ ewarn "You are upgrading from version 1.3."
+ ewarn ""
+ ewarn "Please be aware of the following:"
+ ewarn " * OpenDNSSEC now supports both input and output adapters for"
+ ewarn " AXFR and IXFR in addition to file transfer."
+ ewarn " -> The zonefetch.xml file has been replaced by addns.xml"
+ ewarn " to support this enhancement."
+ ewarn " -> changes to the KASP database mean that a database"
+ ewarn " migration is required to upgrade to 1.4 from earlier"
+ ewarn " versions of OpenDNSSEC."
+ ewarn " * The auditor is no longer supported."
+ ewarn ""
+ ewarn "You can find more information here:"
+ ewarn " * /usr/share/doc/opendnssec*/MIGRATION*"
+ ewarn " * https://wiki.opendnssec.org/display/DOCS/Migrating+zone+fetcher+to+DNS+adapters"
+ ewarn " * https://wiki.opendnssec.org/display/DOCS/Migrating+from+earlier+versions+of+OpenDNSSEC"
+ ewarn ""
+ ;;
+ esac
+ done
+}
diff --git a/net-dns/opendnssec/opendnssec-1.4.8.2.ebuild b/net-dns/opendnssec/opendnssec-1.4.8.2.ebuild
new file mode 100644
index 000000000000..c83f258bb104
--- /dev/null
+++ b/net-dns/opendnssec/opendnssec-1.4.8.2.ebuild
@@ -0,0 +1,205 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P="${P/_}"
+PKCS11_IUSE="+softhsm opensc external-hsm"
+inherit autotools multilib user
+
+DESCRIPTION="An open-source turn-key solution for DNSSEC"
+HOMEPAGE="http://www.opendnssec.org/"
+SRC_URI="http://www.${PN}.org/files/source/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc +mysql +signer sqlite test ${PKCS11_IUSE}"
+
+RDEPEND="
+ dev-lang/perl
+ dev-libs/libxml2
+ dev-libs/libxslt
+ net-libs/ldns
+ mysql? (
+ virtual/mysql
+ dev-perl/DBD-mysql
+ )
+ opensc? ( dev-libs/opensc )
+ softhsm? ( dev-libs/softhsm:* )
+ sqlite? (
+ dev-db/sqlite:3
+ dev-perl/DBD-SQLite
+ )
+"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ test? (
+ app-text/trang
+ )
+"
+
+REQUIRED_USE="
+ ^^ ( mysql sqlite )
+ ^^ ( softhsm opensc external-hsm )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-fix-localstatedir.patch"
+ "${FILESDIR}/${PN}-fix-run-dir.patch"
+ "${FILESDIR}/${PN}-drop-privileges.patch"
+ "${FILESDIR}/${PN}-use-system-trang.patch"
+)
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( MIGRATION NEWS )
+
+check_pkcs11_setup() {
+ # PKCS#11 HSM's are often only available with proprietary drivers not
+ # available in portage tree.
+
+ if use softhsm; then
+ PKCS11_LIB=softhsm
+ if has_version ">=dev-libs/softhsm-1.3.1"; then
+ PKCS11_PATH=/usr/$(get_libdir)/softhsm/libsofthsm.so
+ else
+ PKCS11_PATH=/usr/$(get_libdir)/libsofthsm.so
+ fi
+ elog "Building with SoftHSM PKCS#11 library support."
+ fi
+ if use opensc; then
+ PKCS11_LIB=opensc
+ PKCS11_PATH=/usr/$(get_libdir)/opensc-pkcs11.so
+ elog "Building with OpenSC PKCS#11 library support."
+ fi
+ if use external-hsm; then
+ if [[ -n ${PKCS11_SCA6000} ]]; then
+ PKCS11_LIB=sca6000
+ PKCS11_PATH=${PKCS11_SCA6000}
+ elif [[ -n ${PKCS11_ETOKEN} ]]; then
+ PKCS11_LIB=etoken
+ PKCS11_PATH=${PKCS11_ETOKEN}
+ elif [[ -n ${PKCS11_NCIPHER} ]]; then
+ PKCS11_LIB=ncipher
+ PKCS11_PATH=${PKCS11_NCIPHER}
+ elif [[ -n ${PKCS11_AEPKEYPER} ]]; then
+ PKCS11_LIB=aepkeyper
+ PKCS11_PATH=${PKCS11_AEPKEYPER}
+ else
+ ewarn "You enabled USE flag 'external-hsm' but did not specify a path to a PKCS#11"
+ ewarn "library. To set a path, set one of the following environment variables:"
+ ewarn " for Sun Crypto Accelerator 6000, set: PKCS11_SCA6000=<path>"
+ ewarn " for Aladdin eToken, set: PKCS11_ETOKEN=<path>"
+ ewarn " for Thales/nCipher netHSM, set: PKCS11_NCIPHER=<path>"
+ ewarn " for AEP Keyper, set: PKCS11_AEPKEYPER=<path>"
+ ewarn "Example:"
+ ewarn " PKCS11_ETOKEN=\"/opt/etoken/lib/libeTPkcs11.so\" emerge -pv opendnssec"
+ ewarn "or store the variable into /etc/portage/make.conf"
+ die "USE flag 'external-hsm' set but no PKCS#11 library path specified."
+ fi
+ elog "Building with external PKCS#11 library support ($PKCS11_LIB): ${PKCS11_PATH}"
+ fi
+}
+
+pkg_pretend() {
+ check_pkcs11_setup
+}
+
+pkg_setup() {
+ enewgroup opendnssec
+ enewuser opendnssec -1 -1 -1 opendnssec
+
+ # pretend does not preserve variables so we need to run this once more
+ check_pkcs11_setup
+}
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --without-cunit \
+ --localstatedir="${EPREFIX}/var/" \
+ --disable-static \
+ --with-database-backend=$(use mysql && echo "mysql")$(use sqlite && echo "sqlite3") \
+ --with-pkcs11-${PKCS11_LIB}=${PKCS11_PATH} \
+ $(use_enable debug timeshift) \
+ $(use_enable signer)
+}
+
+src_compile() {
+ default
+ use doc && emake docs
+}
+
+src_install() {
+ default
+
+ # remove useless .la files
+ find "${ED}" -name '*.la' -delete
+
+ # Remove subversion tags from config files to avoid useless config updates
+ sed -i \
+ -e '/<!-- \$Id:/ d' \
+ "${ED}"/etc/opendnssec/* || die
+
+ # install update scripts
+ insinto /usr/share/opendnssec
+ if use sqlite; then
+ doins enforcer/utils/migrate_keyshare_sqlite3.pl
+ doins enforcer/utils/migrate_adapters_1.sqlite3
+ fi
+ if use mysql; then
+ doins enforcer/utils/migrate_keyshare_mysql.pl
+ doins enforcer/utils/migrate_adapters_1.mysql
+ fi
+
+ # fix permissions
+ fowners root:opendnssec /etc/opendnssec
+ fowners root:opendnssec /etc/opendnssec/{addns,conf,kasp,zonelist}.xml
+ fowners opendnssec:opendnssec /var/lib/opendnssec/{,signconf,unsigned,signed,tmp}
+
+ # install conf/init script
+ newinitd "${FILESDIR}"/opendnssec.initd opendnssec
+ newconfd "${FILESDIR}"/opendnssec.confd opendnssec
+}
+
+pkg_postinst() {
+ local v
+ if use softhsm; then
+ elog "Please make sure that you create your softhsm database in a location writeable"
+ elog "by the opendnssec user. You can set its location in /etc/softhsm.conf."
+ elog "Suggested configuration is:"
+ elog " echo \"0:/var/lib/opendnssec/softhsm_slot0.db\" >> /etc/softhsm.conf"
+ elog " softhsm --init-token --slot 0 --label OpenDNSSEC"
+ elog " chown opendnssec:opendnssec /var/lib/opendnssec/softhsm_slot0.db"
+ fi
+
+ for v in $REPLACING_VERSIONS; do
+ case $v in
+ 1.3.*)
+ ewarn ""
+ ewarn "You are upgrading from version 1.3."
+ ewarn ""
+ ewarn "Please be aware of the following:"
+ ewarn " * OpenDNSSEC now supports both input and output adapters for"
+ ewarn " AXFR and IXFR in addition to file transfer."
+ ewarn " -> The zonefetch.xml file has been replaced by addns.xml"
+ ewarn " to support this enhancement."
+ ewarn " -> changes to the KASP database mean that a database"
+ ewarn " migration is required to upgrade to 1.4 from earlier"
+ ewarn " versions of OpenDNSSEC."
+ ewarn " * The auditor is no longer supported."
+ ewarn ""
+ ewarn "You can find more information here:"
+ ewarn " * /usr/share/doc/opendnssec*/MIGRATION*"
+ ewarn " * https://wiki.opendnssec.org/display/DOCS/Migrating+zone+fetcher+to+DNS+adapters"
+ ewarn " * https://wiki.opendnssec.org/display/DOCS/Migrating+from+earlier+versions+of+OpenDNSSEC"
+ ewarn ""
+ ;;
+ esac
+ done
+}
diff --git a/net-dns/opendnssec/opendnssec-2.0.1-r1.ebuild b/net-dns/opendnssec/opendnssec-2.0.1-r1.ebuild
new file mode 100644
index 000000000000..f4ecf0b3f3eb
--- /dev/null
+++ b/net-dns/opendnssec/opendnssec-2.0.1-r1.ebuild
@@ -0,0 +1,239 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P="${P/_}"
+PKCS11_IUSE="+softhsm opensc external-hsm"
+inherit autotools eutils multilib user
+
+DESCRIPTION="An open-source turn-key solution for DNSSEC"
+HOMEPAGE="http://www.opendnssec.org/"
+SRC_URI="http://www.${PN}.org/files/source/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc +mysql readline +signer sqlite test ${PKCS11_IUSE}"
+
+RDEPEND="
+ dev-lang/perl
+ dev-libs/libxml2
+ dev-libs/libxslt
+ net-libs/ldns
+ mysql? (
+ virtual/mysql
+ dev-perl/DBD-mysql
+ )
+ opensc? ( dev-libs/opensc )
+ readline? ( sys-libs/readline:0 )
+ softhsm? ( dev-libs/softhsm:* )
+ sqlite? (
+ dev-db/sqlite:3
+ dev-perl/DBD-SQLite
+ )
+"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ test? (
+ app-text/trang
+ )
+"
+
+REQUIRED_USE="
+ ^^ ( mysql sqlite )
+ ^^ ( softhsm opensc external-hsm )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-fix-localstatedir-2.0.x.patch"
+ "${FILESDIR}/${PN}-fix-run-dir-2.0.x.patch"
+ "${FILESDIR}/${PN}-drop-privileges-2.0.x.patch"
+ "${FILESDIR}/${PN}-use-system-trang.patch"
+)
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( MIGRATION NEWS )
+
+check_pkcs11_setup() {
+ # PKCS#11 HSM's are often only available with proprietary drivers not
+ # available in portage tree.
+
+ if use softhsm; then
+ PKCS11_LIB=softhsm
+ if has_version ">=dev-libs/softhsm-1.3.1"; then
+ PKCS11_PATH=/usr/$(get_libdir)/softhsm/libsofthsm.so
+ else
+ PKCS11_PATH=/usr/$(get_libdir)/libsofthsm.so
+ fi
+ elog "Building with SoftHSM PKCS#11 library support."
+ fi
+ if use opensc; then
+ PKCS11_LIB=opensc
+ PKCS11_PATH=/usr/$(get_libdir)/opensc-pkcs11.so
+ elog "Building with OpenSC PKCS#11 library support."
+ fi
+ if use external-hsm; then
+ if [[ -n ${PKCS11_SCA6000} ]]; then
+ PKCS11_LIB=sca6000
+ PKCS11_PATH=${PKCS11_SCA6000}
+ elif [[ -n ${PKCS11_ETOKEN} ]]; then
+ PKCS11_LIB=etoken
+ PKCS11_PATH=${PKCS11_ETOKEN}
+ elif [[ -n ${PKCS11_NCIPHER} ]]; then
+ PKCS11_LIB=ncipher
+ PKCS11_PATH=${PKCS11_NCIPHER}
+ elif [[ -n ${PKCS11_AEPKEYPER} ]]; then
+ PKCS11_LIB=aepkeyper
+ PKCS11_PATH=${PKCS11_AEPKEYPER}
+ else
+ ewarn "You enabled USE flag 'external-hsm' but did not specify a path to a PKCS#11"
+ ewarn "library. To set a path, set one of the following environment variables:"
+ ewarn " for Sun Crypto Accelerator 6000, set: PKCS11_SCA6000=<path>"
+ ewarn " for Aladdin eToken, set: PKCS11_ETOKEN=<path>"
+ ewarn " for Thales/nCipher netHSM, set: PKCS11_NCIPHER=<path>"
+ ewarn " for AEP Keyper, set: PKCS11_AEPKEYPER=<path>"
+ ewarn "Example:"
+ ewarn " PKCS11_ETOKEN=\"/opt/etoken/lib/libeTPkcs11.so\" emerge -pv opendnssec"
+ ewarn "or store the variable into /etc/portage/make.conf"
+ die "USE flag 'external-hsm' set but no PKCS#11 library path specified."
+ fi
+ elog "Building with external PKCS#11 library support ($PKCS11_LIB): ${PKCS11_PATH}"
+ fi
+}
+
+pkg_pretend() {
+ if has_version "<net-dns/opendnssec-1.4.10"; then
+ ################################################################################
+ eerror "You are already using OpenDNSSEC."
+ eerror "In order to migrate to version >=2.0.0 you need to upgrade to"
+ eerror "version >=1.4.10 first:"
+ eerror ""
+ eerror " emerge \"<net-dns/opendnssec-2\""
+ eerror ""
+ eerror "See https://github.com/opendnssec/opendnssec/blob/2.0/master/MIGRATION"
+ eerror "for details."
+ eerror ""
+ die "Please upgrade to version >=1.4.10 first for proper db migraion"
+ fi
+
+ check_pkcs11_setup
+}
+
+pkg_setup() {
+ enewgroup opendnssec
+ enewuser opendnssec -1 -1 -1 opendnssec
+
+ # pretend does not preserve variables so we need to run this once more
+ check_pkcs11_setup
+}
+
+src_prepare() {
+ local patch
+ default
+ for patch in "${PATCHES[@]}"; do
+ epatch "$patch"
+ done
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --without-cunit \
+ --localstatedir="${EPREFIX}/var" \
+ --disable-static \
+ --with-enforcer-database=$(use mysql && echo "mysql")$(use sqlite && echo "sqlite3") \
+ --with-pkcs11-${PKCS11_LIB}=${PKCS11_PATH} \
+ $(use_with readline) \
+ $(use_enable signer)
+}
+
+src_compile() {
+ default
+ use doc && emake docs
+}
+
+src_install() {
+ default
+
+ # remove useless .la files
+ find "${ED}" -name '*.la' -delete
+
+ # Remove subversion tags from config files to avoid useless config updates
+ sed -i \
+ -e '/<!-- \$Id:/ d' \
+ "${ED}"/etc/opendnssec/* || die
+
+ # install db update/migration stuff
+ insinto /usr/share/opendnssec/db
+ if use sqlite; then
+ doins enforcer/utils/convert_mysql_to_sqlite
+ fi
+ if use mysql; then
+ doins enforcer/utils/convert_sqlite_to_mysql
+ fi
+
+ insinto /usr/share/opendnssec/db/sql
+ if use sqlite; then
+ doins enforcer/src/db/schema.sqlite
+ fi
+ if use mysql; then
+ doins enforcer/src/db/schema.mysql
+ fi
+
+ insinto /usr/share/opendnssec/db/1.4-2.0_db_convert
+ doins enforcer/utils/1.4-2.0_db_convert/find_problematic_zones.sql
+ doins enforcer/utils/1.4-2.0_db_convert/README.md
+ if use sqlite; then
+ doins enforcer/utils/1.4-2.0_db_convert/sqlite_convert.sql
+ doins enforcer/utils/1.4-2.0_db_convert/convert_sqlite
+ fi
+ if use mysql; then
+ doins enforcer/utils/1.4-2.0_db_convert/convert_mysql
+ doins enforcer/utils/1.4-2.0_db_convert/mysql_convert.sql
+ fi
+
+ # patch scripts to find schema files
+ sed -i \
+ -e 's,^SCHEMA=../src/db/,SCHEMA=/usr/share/opendnssec/db/sql/,' \
+ -e 's,^SCHEMA=../../src/db/,SCHEMA=/usr/share/opendnssec/db/sql/,' \
+ "${ED}"/usr/share/opendnssec/db/convert_* \
+ "${ED}"/usr/share/opendnssec/db/1.4-2.0_db_convert/convert_*
+
+ # fix permissions
+ fowners root:opendnssec /etc/opendnssec
+ fowners root:opendnssec /etc/opendnssec/{addns,conf,kasp,zonelist}.xml
+ fowners opendnssec:opendnssec /var/lib/opendnssec/{,enforcer,signconf,signed,signer,unsigned}
+
+ # install conf/init script
+ newinitd "${FILESDIR}"/opendnssec.initd opendnssec
+ newconfd "${FILESDIR}"/opendnssec.confd opendnssec
+}
+
+pkg_postinst() {
+ local v
+ if use softhsm; then
+ elog "Please make sure that you create your softhsm database in a location writeable"
+ elog "by the opendnssec user. You can set its location in /etc/softhsm.conf."
+ elog "Suggested configuration is:"
+ elog " echo \"0:/var/lib/opendnssec/softhsm_slot0.db\" >> /etc/softhsm.conf"
+ elog " softhsm --init-token --slot 0 --label OpenDNSSEC"
+ elog " chown opendnssec:opendnssec /var/lib/opendnssec/softhsm_slot0.db"
+ fi
+ for v in $REPLACING_VERSIONS; do
+ case $v in
+ 1.4.*)
+ ewarn ""
+ ewarn "You are upgrading from version 1.4."
+ ewarn ""
+ ewarn "A migration is needed from 1.4 to 2.0."
+ ewarn "For details see /usr/share/doc/${P}/MIGRATION*"
+ ewarn ""
+ ewarn "For your convenience the mentioned migration scripts and README"
+ ewarn "have been installed to /usr/share/${PN}/db/1.4-2.0_db_convert"
+ ewarn ""
+ ;;
+ esac
+ done
+}
diff --git a/net-dns/opendnssec/opendnssec-2.0.3.ebuild b/net-dns/opendnssec/opendnssec-2.0.3.ebuild
new file mode 100644
index 000000000000..f4ecf0b3f3eb
--- /dev/null
+++ b/net-dns/opendnssec/opendnssec-2.0.3.ebuild
@@ -0,0 +1,239 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P="${P/_}"
+PKCS11_IUSE="+softhsm opensc external-hsm"
+inherit autotools eutils multilib user
+
+DESCRIPTION="An open-source turn-key solution for DNSSEC"
+HOMEPAGE="http://www.opendnssec.org/"
+SRC_URI="http://www.${PN}.org/files/source/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc +mysql readline +signer sqlite test ${PKCS11_IUSE}"
+
+RDEPEND="
+ dev-lang/perl
+ dev-libs/libxml2
+ dev-libs/libxslt
+ net-libs/ldns
+ mysql? (
+ virtual/mysql
+ dev-perl/DBD-mysql
+ )
+ opensc? ( dev-libs/opensc )
+ readline? ( sys-libs/readline:0 )
+ softhsm? ( dev-libs/softhsm:* )
+ sqlite? (
+ dev-db/sqlite:3
+ dev-perl/DBD-SQLite
+ )
+"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ test? (
+ app-text/trang
+ )
+"
+
+REQUIRED_USE="
+ ^^ ( mysql sqlite )
+ ^^ ( softhsm opensc external-hsm )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-fix-localstatedir-2.0.x.patch"
+ "${FILESDIR}/${PN}-fix-run-dir-2.0.x.patch"
+ "${FILESDIR}/${PN}-drop-privileges-2.0.x.patch"
+ "${FILESDIR}/${PN}-use-system-trang.patch"
+)
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( MIGRATION NEWS )
+
+check_pkcs11_setup() {
+ # PKCS#11 HSM's are often only available with proprietary drivers not
+ # available in portage tree.
+
+ if use softhsm; then
+ PKCS11_LIB=softhsm
+ if has_version ">=dev-libs/softhsm-1.3.1"; then
+ PKCS11_PATH=/usr/$(get_libdir)/softhsm/libsofthsm.so
+ else
+ PKCS11_PATH=/usr/$(get_libdir)/libsofthsm.so
+ fi
+ elog "Building with SoftHSM PKCS#11 library support."
+ fi
+ if use opensc; then
+ PKCS11_LIB=opensc
+ PKCS11_PATH=/usr/$(get_libdir)/opensc-pkcs11.so
+ elog "Building with OpenSC PKCS#11 library support."
+ fi
+ if use external-hsm; then
+ if [[ -n ${PKCS11_SCA6000} ]]; then
+ PKCS11_LIB=sca6000
+ PKCS11_PATH=${PKCS11_SCA6000}
+ elif [[ -n ${PKCS11_ETOKEN} ]]; then
+ PKCS11_LIB=etoken
+ PKCS11_PATH=${PKCS11_ETOKEN}
+ elif [[ -n ${PKCS11_NCIPHER} ]]; then
+ PKCS11_LIB=ncipher
+ PKCS11_PATH=${PKCS11_NCIPHER}
+ elif [[ -n ${PKCS11_AEPKEYPER} ]]; then
+ PKCS11_LIB=aepkeyper
+ PKCS11_PATH=${PKCS11_AEPKEYPER}
+ else
+ ewarn "You enabled USE flag 'external-hsm' but did not specify a path to a PKCS#11"
+ ewarn "library. To set a path, set one of the following environment variables:"
+ ewarn " for Sun Crypto Accelerator 6000, set: PKCS11_SCA6000=<path>"
+ ewarn " for Aladdin eToken, set: PKCS11_ETOKEN=<path>"
+ ewarn " for Thales/nCipher netHSM, set: PKCS11_NCIPHER=<path>"
+ ewarn " for AEP Keyper, set: PKCS11_AEPKEYPER=<path>"
+ ewarn "Example:"
+ ewarn " PKCS11_ETOKEN=\"/opt/etoken/lib/libeTPkcs11.so\" emerge -pv opendnssec"
+ ewarn "or store the variable into /etc/portage/make.conf"
+ die "USE flag 'external-hsm' set but no PKCS#11 library path specified."
+ fi
+ elog "Building with external PKCS#11 library support ($PKCS11_LIB): ${PKCS11_PATH}"
+ fi
+}
+
+pkg_pretend() {
+ if has_version "<net-dns/opendnssec-1.4.10"; then
+ ################################################################################
+ eerror "You are already using OpenDNSSEC."
+ eerror "In order to migrate to version >=2.0.0 you need to upgrade to"
+ eerror "version >=1.4.10 first:"
+ eerror ""
+ eerror " emerge \"<net-dns/opendnssec-2\""
+ eerror ""
+ eerror "See https://github.com/opendnssec/opendnssec/blob/2.0/master/MIGRATION"
+ eerror "for details."
+ eerror ""
+ die "Please upgrade to version >=1.4.10 first for proper db migraion"
+ fi
+
+ check_pkcs11_setup
+}
+
+pkg_setup() {
+ enewgroup opendnssec
+ enewuser opendnssec -1 -1 -1 opendnssec
+
+ # pretend does not preserve variables so we need to run this once more
+ check_pkcs11_setup
+}
+
+src_prepare() {
+ local patch
+ default
+ for patch in "${PATCHES[@]}"; do
+ epatch "$patch"
+ done
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --without-cunit \
+ --localstatedir="${EPREFIX}/var" \
+ --disable-static \
+ --with-enforcer-database=$(use mysql && echo "mysql")$(use sqlite && echo "sqlite3") \
+ --with-pkcs11-${PKCS11_LIB}=${PKCS11_PATH} \
+ $(use_with readline) \
+ $(use_enable signer)
+}
+
+src_compile() {
+ default
+ use doc && emake docs
+}
+
+src_install() {
+ default
+
+ # remove useless .la files
+ find "${ED}" -name '*.la' -delete
+
+ # Remove subversion tags from config files to avoid useless config updates
+ sed -i \
+ -e '/<!-- \$Id:/ d' \
+ "${ED}"/etc/opendnssec/* || die
+
+ # install db update/migration stuff
+ insinto /usr/share/opendnssec/db
+ if use sqlite; then
+ doins enforcer/utils/convert_mysql_to_sqlite
+ fi
+ if use mysql; then
+ doins enforcer/utils/convert_sqlite_to_mysql
+ fi
+
+ insinto /usr/share/opendnssec/db/sql
+ if use sqlite; then
+ doins enforcer/src/db/schema.sqlite
+ fi
+ if use mysql; then
+ doins enforcer/src/db/schema.mysql
+ fi
+
+ insinto /usr/share/opendnssec/db/1.4-2.0_db_convert
+ doins enforcer/utils/1.4-2.0_db_convert/find_problematic_zones.sql
+ doins enforcer/utils/1.4-2.0_db_convert/README.md
+ if use sqlite; then
+ doins enforcer/utils/1.4-2.0_db_convert/sqlite_convert.sql
+ doins enforcer/utils/1.4-2.0_db_convert/convert_sqlite
+ fi
+ if use mysql; then
+ doins enforcer/utils/1.4-2.0_db_convert/convert_mysql
+ doins enforcer/utils/1.4-2.0_db_convert/mysql_convert.sql
+ fi
+
+ # patch scripts to find schema files
+ sed -i \
+ -e 's,^SCHEMA=../src/db/,SCHEMA=/usr/share/opendnssec/db/sql/,' \
+ -e 's,^SCHEMA=../../src/db/,SCHEMA=/usr/share/opendnssec/db/sql/,' \
+ "${ED}"/usr/share/opendnssec/db/convert_* \
+ "${ED}"/usr/share/opendnssec/db/1.4-2.0_db_convert/convert_*
+
+ # fix permissions
+ fowners root:opendnssec /etc/opendnssec
+ fowners root:opendnssec /etc/opendnssec/{addns,conf,kasp,zonelist}.xml
+ fowners opendnssec:opendnssec /var/lib/opendnssec/{,enforcer,signconf,signed,signer,unsigned}
+
+ # install conf/init script
+ newinitd "${FILESDIR}"/opendnssec.initd opendnssec
+ newconfd "${FILESDIR}"/opendnssec.confd opendnssec
+}
+
+pkg_postinst() {
+ local v
+ if use softhsm; then
+ elog "Please make sure that you create your softhsm database in a location writeable"
+ elog "by the opendnssec user. You can set its location in /etc/softhsm.conf."
+ elog "Suggested configuration is:"
+ elog " echo \"0:/var/lib/opendnssec/softhsm_slot0.db\" >> /etc/softhsm.conf"
+ elog " softhsm --init-token --slot 0 --label OpenDNSSEC"
+ elog " chown opendnssec:opendnssec /var/lib/opendnssec/softhsm_slot0.db"
+ fi
+ for v in $REPLACING_VERSIONS; do
+ case $v in
+ 1.4.*)
+ ewarn ""
+ ewarn "You are upgrading from version 1.4."
+ ewarn ""
+ ewarn "A migration is needed from 1.4 to 2.0."
+ ewarn "For details see /usr/share/doc/${P}/MIGRATION*"
+ ewarn ""
+ ewarn "For your convenience the mentioned migration scripts and README"
+ ewarn "have been installed to /usr/share/${PN}/db/1.4-2.0_db_convert"
+ ewarn ""
+ ;;
+ esac
+ done
+}
diff --git a/net-dns/openresolv/Manifest b/net-dns/openresolv/Manifest
new file mode 100644
index 000000000000..6c0248c21345
--- /dev/null
+++ b/net-dns/openresolv/Manifest
@@ -0,0 +1,8 @@
+AUX 3.8.1-restore-newline.patch 508 SHA256 1e0f94ee4e3972b9e6287078a02acd4090ba4a2b1fa122e0b228dd54613f79c8 SHA512 ca2c79192f808e16d0aa876fbb35eb28330a86cc4f2bd7ef618bef16f623c127327b1ce16369aadfb73413b103aa5790d7b9e7f44a9c0b26131b17cab22c0552 WHIRLPOOL 7ff4716b848f45bad99d2370040c46b6aecb7b554ebc71a9b030fe8eebecbc867a115c1906104d45153ccec73f6bb13bc0e75ae125621694333ace3edcdb69ee
+DIST openresolv-3.8.1.tar.xz 18396 SHA256 d259d78fd92ac288f1b27959daee11be9a40d70e91af5432046164c260de1d43 SHA512 390bf30bb85b071839104e5c7e276b402f6f485edc038e38da389730d82e614bb11b0dde44a55aa2ca5e790b374671a9c89cc07b053633401a608150eebbf2c8 WHIRLPOOL 34f1c545053c444d950c3a3f9c0775e377c70a2b45af561cec94f96cd171237e2e2de1cd5a45c39c4e996f87aa206b986740557aaf0104f9af9f3c66f1d1a0c1
+DIST openresolv-3.9.0.tar.xz 18844 SHA256 51a04d39232bb797c9efeaad51a525cf50a1deefcb19a1ea5dd3475118634db8 SHA512 4498db60f0b5a762194dd3651b94cc8b01a349a8cfb891e10d040cd6b8e22fa0e9897909517831591787ad22ffad97c78d3281e32296aa1ee67de5dff9bf765e WHIRLPOOL 2f912211c787517baee2e3b5f5b8036fe3a2c78d62f2366c22e256f2e236fd8a748a3816b8f2c09ba3846377a21c1ddca65a9dc96af37104682e7cbcf6aa52ff
+EBUILD openresolv-3.8.1.ebuild 1138 SHA256 0601f2bf85b5db01904eeb364c83faa8bc2dc8528183f18498d5893bfbf8ba7f SHA512 e372fd7ddbf638112830b475e0f37393d7f3b7834622296adce85ccfdd636073c803810ffd426fbd014cde789ee5572c38f066be3a4f33b1a31eb5967b1ad0e2 WHIRLPOOL 3061c23edc3af8fdfa930b8e089e6af66c2089dabece70639d87060163e1422200eb172525e4d7033a4a50db0a6958134c7393b9633122133442fce7d106f092
+EBUILD openresolv-3.9.0.ebuild 1097 SHA256 d3b1338a9012f6b1b774226bf295dbee85256412e95139cb1ebded0e1e63a52a SHA512 876ab61f7a876f6135ac2d18ed62e1d7708f44939a108128614a9302d06ba428276a69c8a68fefa00eddd10a17859383bde71e23fb31a2e9c7333a165da22248 WHIRLPOOL 984e2cfcca58b630932abd931e93c9b33da49f1ee759d35f42a0a5e8b4745eabacad95cd7462dc9c65464d1b03b9a5939088b086b4a5fdf2109809e0ee772ca8
+MISC ChangeLog 3012 SHA256 a0c2d27c372a9617529b8988652e886579564052453f637680eae493aa9cc190 SHA512 e162ae4dff285debcba56708a06e198a79850fc940b35c34a4578d9314555812b99887fadba1df72c9439144834a7f9f574b90166f5bfe03e68a5750f3edc77d WHIRLPOOL 1d71940ab2149ab61f20449b21138a29fb87ab077b7600b94c4f52d0863e48f86837a890be38b27c62ee3116669eda4ea21ddd3f9ae9363fe49fa0f1bff969cb
+MISC ChangeLog-2015 14172 SHA256 1901fc4b4c6e63864c32fca7927d38ab5b63dce0c2aee3bca8583fe05ea0bd83 SHA512 37c7a5e9a73f8ab006e1fd2ccdaf057cb3a4eeb67a63709bd20f1abedde0749ec675907a3c0552e1aa1c6c0b094c9c53d7797de659849ce7225a9af2f7b0edc4 WHIRLPOOL 39513c89107e6736440b7827e23c9093e37fd303354e66109759ac451cc34e6741c50e49abf449f2253c3471841c72738b0baf31955e1892be15f2e2acb8a86a
+MISC metadata.xml 309 SHA256 8614be1944e84bb7f1d9920e2d66a8b42ab34e7f1509811c02c16d2bdf8f9ecf SHA512 311a9444ac8811bf1ea1a8bb06370b81360c6642921b2932095bd191d8784509bfe46189de8f073a34a831eaf1c8114c3b5bfcf67d0fe042ea2ecd8c1fc7cc0a WHIRLPOOL 9a004dc20a28775a3b04a7d8dd07847d647be4a4bdc38ee53afcacacbb8bf3afbe9ca541c63095919a4d739a6fda021b5d3c78f3a4b302c750eec264a48eed7d
diff --git a/net-dns/openresolv/files/3.8.1-restore-newline.patch b/net-dns/openresolv/files/3.8.1-restore-newline.patch
new file mode 100644
index 000000000000..2522710bf941
--- /dev/null
+++ b/net-dns/openresolv/files/3.8.1-restore-newline.patch
@@ -0,0 +1,16 @@
+--- a/libc.in
++++ b/libc.in
+@@ -214,11 +214,11 @@
+ # If the old file does not have our signature, back it up.
+ # If the new file just has our signature, restore the backup.
+ if $backup; then
+ if [ "$newconf" = "$signature$NL" ]; then
+ if [ -e "$resolv_conf.bak" ]; then
+- newconf="$(cat "$resolv_conf.bak")"
++ newconf="$(cat "$resolv_conf.bak")$NL"
+ fi
+ elif [ -e "$resolv_conf" ]; then
+ read line <"$resolv_conf"
+ if [ "$line" != "$signature" ]; then
+ cp "$resolv_conf" "$resolv_conf.bak"
+
diff --git a/net-dns/openresolv/metadata.xml b/net-dns/openresolv/metadata.xml
new file mode 100644
index 000000000000..6c713591fd81
--- /dev/null
+++ b/net-dns/openresolv/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>alonbl@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ A framework for managing DNS information
+ </longdescription>
+</pkgmetadata>
diff --git a/net-dns/openresolv/openresolv-3.8.1.ebuild b/net-dns/openresolv/openresolv-3.8.1.ebuild
new file mode 100644
index 000000000000..0a45484ffa59
--- /dev/null
+++ b/net-dns/openresolv/openresolv-3.8.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="A framework for managing DNS information"
+HOMEPAGE="http://roy.marples.name/projects/openresolv"
+SRC_URI="http://roy.marples.name/downloads/${PN}/${P}.tar.xz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="selinux"
+
+DEPEND="!net-dns/resolvconf-gentoo
+ !<net-dns/dnsmasq-2.40-r1"
+RDEPEND="selinux? ( sec-policy/selinux-resolvconf )"
+
+PATCHES=(
+ "${FILESDIR}/3.8.1-restore-newline.patch"
+)
+
+src_configure() {
+ econf \
+ --prefix="${EPREFIX}" \
+ --rundir="${EPREFIX}"/var/run \
+ --libexecdir="${EPREFIX}"/lib/resolvconf
+}
+
+pkg_config() {
+ if [[ ${ROOT} != / ]]; then
+ eerror "We cannot configure unless \$ROOT=/"
+ return 1
+ fi
+
+ if [[ -n "$(resolvconf -l)" ]]; then
+ einfo "${PN} already has DNS information"
+ else
+ ebegin "Copying /etc/resolv.conf to resolvconf -a dummy"
+ resolvconf -a dummy </etc/resolv.conf
+ eend $? || return $?
+ einfo "The dummy interface will disappear when you next reboot"
+ fi
+}
diff --git a/net-dns/openresolv/openresolv-3.9.0.ebuild b/net-dns/openresolv/openresolv-3.9.0.ebuild
new file mode 100644
index 000000000000..1a5316b59154
--- /dev/null
+++ b/net-dns/openresolv/openresolv-3.9.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="A framework for managing DNS information"
+HOMEPAGE="http://roy.marples.name/projects/openresolv"
+SRC_URI="http://roy.marples.name/downloads/${PN}/${P}.tar.xz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="selinux"
+
+DEPEND="!net-dns/resolvconf-gentoo
+ !<net-dns/dnsmasq-2.40-r1"
+RDEPEND="selinux? ( sec-policy/selinux-resolvconf )"
+
+src_configure() {
+ econf \
+ --prefix="${EPREFIX}" \
+ --rundir="${EPREFIX}"/var/run \
+ --libexecdir="${EPREFIX}"/lib/resolvconf
+}
+
+pkg_config() {
+ if [[ ${ROOT} != / ]]; then
+ eerror "We cannot configure unless \$ROOT=/"
+ return 1
+ fi
+
+ if [[ -n "$(resolvconf -l)" ]]; then
+ einfo "${PN} already has DNS information"
+ else
+ ebegin "Copying /etc/resolv.conf to resolvconf -a dummy"
+ resolvconf -a dummy </etc/resolv.conf
+ eend $? || return $?
+ einfo "The dummy interface will disappear when you next reboot"
+ fi
+}
diff --git a/net-dns/pdns-ldap-backend/Manifest b/net-dns/pdns-ldap-backend/Manifest
new file mode 100644
index 000000000000..40af1dd84913
--- /dev/null
+++ b/net-dns/pdns-ldap-backend/Manifest
@@ -0,0 +1,5 @@
+DIST pdns-ldap-backend-0.2.tar.gz 745650 SHA256 6bad9b104129eeffebe2679dbc39c01183cc062b1b02c8eb5ba7903625240473 SHA512 1a9eb0282abd9dea945150412a77d9cad4ee5fb114b621396928adb6db5994a0ee54b084281b723460e2943c15570c783da518a51314636302d9179832a26990 WHIRLPOOL bb66feec72a7ad999b366ddd40c3b112b60173dfc937d4808e74a804b03bd6b85186dad0fa8ad0d8e21c47fe5c870e100dd3d9717d30b5054ba0046fb50b1736
+EBUILD pdns-ldap-backend-0.2.ebuild 850 SHA256 6b49ea5de9d1c273d4e58c26f398b3ed9c6901bc758096a343e527e27bdac91f SHA512 612b3a0ba43257f1ddd1421df9938991e06e68c6feffc1eeecda9d86b23fb875b6d652db0f8a2ed2fe3be9089d5a5b64d9a3ad93e9a33d9678c6217fda40e516 WHIRLPOOL 1432573216407485c970cfe507548c1dab51d9b9a088f23fd346f3b24b84e62fb9c84cecdb2aa750dd571cd65b2649cd5aee0f615e83bcbbc4d0995dd6643203
+MISC ChangeLog 2201 SHA256 525ccc51d0d6ddb949cbde82a1ceabd373144d9175c763cf432e1cff3456ab11 SHA512 5e3494a787b36ad6b9f4cb224bb13fa75a817c069f3c06003641b0ace3eee0b93f76d90748485ac079ed2f17d6216dac33cfc64f272d08e1ec10535b46c3150e WHIRLPOOL 00be88a8b0257c8698f78c4f5c0e4555ead1782faa64d4fc1d9bdf90b06c40d12fe3d25a09c28eb9d6cd86dda5197c39126dc98a664d25b57c630350b332be91
+MISC ChangeLog-2015 530 SHA256 003b2770f90836689206df82a6e2c17527acd113ed2bc9ac983c3c1ddf14ab64 SHA512 2a00172c11bba932d820dac5908a358ce729f11ef08e9de5a1f332bbe5bc27c136ff382915cdd762fc28af7b58132ea3a6e4d69459358d2045f3e8584d1f3944 WHIRLPOOL f4e6a4a487896474a4fe16aae058c42879e8ba0927510a0e6ac6557625b3af595b5e790d327140a11bf006ac0a16853ee7f82cc18b04123d7574fc8f35cf8405
+MISC metadata.xml 293 SHA256 7a2c89e5a2994aa2398d55fa3f297c5e788c653ac86ce8a4d6d3e0900dc5b8fc SHA512 a7b4ff80d4c13137f675038af8fb434ef5cca018a4e412ce72540400deb00683783fdbee2c9c4b8b14dd3e0ffd4fd4da60b38f8fcf37b3525b47375111a87a3a WHIRLPOOL 35e8063d061d6cbecf9485161cbf4faed28ba3d739b39c6c8e4198928b898b7f61a1af24248f7578715d455d1cfc7635f71c57ae383ccefffca85dee2ab8fd21
diff --git a/net-dns/pdns-ldap-backend/metadata.xml b/net-dns/pdns-ldap-backend/metadata.xml
new file mode 100644
index 000000000000..1f64f9d8c5a9
--- /dev/null
+++ b/net-dns/pdns-ldap-backend/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>dev-zero@gentoo.org</email>
+ <name>Tiziano Müller</name>
+ <description>Primary Maintainer</description>
+</maintainer>
+</pkgmetadata>
diff --git a/net-dns/pdns-ldap-backend/pdns-ldap-backend-0.2.ebuild b/net-dns/pdns-ldap-backend/pdns-ldap-backend-0.2.ebuild
new file mode 100644
index 000000000000..ff05ebf0060c
--- /dev/null
+++ b/net-dns/pdns-ldap-backend/pdns-ldap-backend-0.2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils multilib
+
+DESCRIPTION="Fork of the official but unmaintained LDAP backend"
+HOMEPAGE="http://repo.or.cz/w/pdns-ldap-backend.git http://sequanux.org/cgi-bin/mailman/listinfo/pdns-ldap-backend"
+SRC_URI="http://sequanux.org/dl/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="sasl"
+
+DEPEND=">=net-dns/pdns-3.2[-ldap]
+ net-nds/openldap[sasl=]
+ virtual/krb5"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-static \
+ --with-pdns="${EPREFIX}/usr/include" \
+ --libdir=/usr/$(get_libdir)/powerdns
+}
+
+src_install() {
+ DOCS="AUTHORS ChangeLog NEWS README USAGE* src/dns.ldif"
+ default
+ prune_libtool_files --all
+ insinto /etc/openldap/schema
+ doins schema/*
+}
diff --git a/net-dns/pdns-recursor/Manifest b/net-dns/pdns-recursor/Manifest
new file mode 100644
index 000000000000..544717db59e7
--- /dev/null
+++ b/net-dns/pdns-recursor/Manifest
@@ -0,0 +1,14 @@
+AUX pdns-recursor 495 SHA256 9555c08d7eadff42d3941697d86a2738a7b8d4e50619ca7de72b90cac63141e9 SHA512 4c93519693197dc43d4a298bc0646b91d5a924556aaed39000a1e3d0ca434c56ad03b054bdb5833618e7c4556b86332f048de3466e406c5aeb4ff66bb51ce8c3 WHIRLPOOL 27c96e27656eb2857a430e0fcbc794b0efdcbc969cac7df8a2f5187a2f64bc72dab75b112c69420aa95d5e38db197ab7f1d2481d36e65620074277d57302abc7
+AUX pdns-recursor-4.0.3-boost-1.61-fcontext.patch 5174 SHA256 fde7aeb34ddbb461331e85db941189fdcbcecd9588349d4eb5314d14323f8c0e SHA512 25718ff37454580c399e263c68a081c11259cb08352cf754cdf482c2cdb09372ea2e8ff90799402b44131c575cf118abdf212ca2536d5f2af525999cba3415d8 WHIRLPOOL 07bd9f5584c84e65461543fd7f94b865896e3bfeeefe51c190a40e206a60ce657d39cf1373cfb591c0a24fc4dd74e6d8381216cc75292a50e3c084227b73f9d9
+AUX pdns-recursor-4.0.3-ecdsa.patch 949 SHA256 87a4a74257618464bd7065ac74c3a8b013ba665103af26a4774c936d8c067ab5 SHA512 05309da6cc31d27670f53256b16986855d428af35d0d542589dd5cd7bad5893f7e83e8ab0acea975cf4f86c752cfb800c435edf547b49a31bc444a12a84f216b WHIRLPOOL 4ca9ffdadc408473151c2aebe0e520bd74cf260c66644e41afd84d2486c314235058eee795e1fb67ffc3ba1ddb807726899ed06bc6800c4dae4da390e1966aee
+AUX pdns-recursor-r1 1135 SHA256 f5d519a9691db1954f75e187d169ca91b72a03aaad53c8ede0a42ff00cff441b SHA512 9dce3cd454ed6b61af8d70c90a8464c60d16eb8342ffc46558f5dcc5089c77aff4581f208684ddb25c4512ce6f39c54afaf267dcade667d812511ae3fa3a1f48 WHIRLPOOL 9e08ee61e61c07bdcaa629d426a79ea837e43b6dd1802e188d3c4983db18099283d8f1b34379cbdfe8891c1e695fd150b6e0cc11edbc309e3b99b7691962d25e
+DIST pdns-recursor-4.0.4.tar.bz2 1050596 SHA256 2338778f49ccd03401e65f6f4b39047890e691c8ff6d810ecee45321fb4f1e4d SHA512 9473dfe9abc509b2bb953139dd7892de2027ee1508902fa0c2cd30dd9a88878fcf44370b8372d573cbab12de32bb8c604005d3b39ea34db2ef86786e689d36ab WHIRLPOOL b205ff800e49cba87f4796c7c2e4b5835119480dbcf07e404d37f86c65e7f45095fb2a936df0f82f85e6e869a87ec0355b1e5ddc5d29480e07397fc823fb1f6a
+DIST pdns-recursor-4.0.5.tar.bz2 1066145 SHA256 ba43ce4280b3a06afebe58c5d63680f51dd525c63d1de7f3b229b380e6b1b7af SHA512 30d41033d4650a496b2a699b03c8cb5adb3e803420330f09159cf7ca2ce1bab4818f4a9c9ce7a99d2676e31b1e30289198af1f049cd1f309b93f6aa1a05d4cb5 WHIRLPOOL e03097c44df5ca5222b33b9477a5f3e67334508a830b13054eed249ffb0cb254d66e7f3c6b302e5450b86cdee48146f12847348ac5e49777caf0094af34ad252
+DIST pdns-recursor-4.0.6.tar.bz2 1105423 SHA256 f2182ac644268bb08b865a71351f11d75c5015ac0608a1469eb4c1cd5494d60d SHA512 2203fd96469deded1da677344485da221eec036b1ad9fb418a89cd4477d73f2a6fcf984a39b574561df6946f440ddf1982de20cd39d7204da9c27e74216d1159 WHIRLPOOL a2eece8a6cdfcd6c791cb6fa42053d524b4e54f1431d78345640d7f2d9f3079939c7905767abe65abb977bce45647fb7232d1148dac13737625ee4bfae221da8
+EBUILD pdns-recursor-4.0.4-r1.ebuild 1617 SHA256 030cbb0bd2bffa560877cd2243f65e33a8f797976aae1fdc8bdfa5b262a351ba SHA512 a8a4a328dfabff7a6ae146059c8527c390f9f57ecadfc7873274f32f8f7ce484b9e9c8dac6e65a32c8751ccbb89ac505d03b6cd5fc80c23fb46e5b3cbd0ea984 WHIRLPOOL 5a3be31a88e679ba68277e7dd7ef5deef6b9ed6dbc0fa1a40a18fa9bd3ed403b63724716e1859a377b0361822b3fcbade561e56b99a295ba5656803f9fb77561
+EBUILD pdns-recursor-4.0.4.ebuild 1597 SHA256 4fd5edc325b6d2367934be33eb119700e9f7e181b7da6f4883ad197551010111 SHA512 fe1074ae33df9bded1cac8834bba4af65822338a9c755e507c67b2893aad7d27283adc74038e62457672139fbe2dba53880d2c2da6837d0d8fa9b64b70e48e3d WHIRLPOOL 67ba5663092374f6999b024e945ba125d595b170cacfcb60c84c588f82de7649b6bb0521a09c49900b7f7fec340fd84debca36f3f4a9a3621f88e32ce13d7448
+EBUILD pdns-recursor-4.0.5.ebuild 1617 SHA256 030cbb0bd2bffa560877cd2243f65e33a8f797976aae1fdc8bdfa5b262a351ba SHA512 a8a4a328dfabff7a6ae146059c8527c390f9f57ecadfc7873274f32f8f7ce484b9e9c8dac6e65a32c8751ccbb89ac505d03b6cd5fc80c23fb46e5b3cbd0ea984 WHIRLPOOL 5a3be31a88e679ba68277e7dd7ef5deef6b9ed6dbc0fa1a40a18fa9bd3ed403b63724716e1859a377b0361822b3fcbade561e56b99a295ba5656803f9fb77561
+EBUILD pdns-recursor-4.0.6.ebuild 1615 SHA256 cc135a1f0af9166154b4d6d9c6761a6d388d7406aaee9b98cc91999eb2a0cff0 SHA512 066be175500df5957c48104a7eac45dc4f401e03299375ddc324c250ffe864e1848b837f62be756bd807d2356bfee2655a022d50f70afd7d71fa08b22471bb0d WHIRLPOOL 9112b6401575fb7f42eca1d75eaaa7f81dc8ec34acc774e3150e44f151b51fb71169de59a169573eec6a10240f815fd938a7455bb54b7f16f143f1726b67e70c
+MISC ChangeLog 6695 SHA256 4dba4ab980c0005ed22b77af3a5b4dc8a74054007e08652a60de445ecd280032 SHA512 3f1bb9942c50baabe1de20b39b3dcd64fe1f205b75eb3da1792270d56e8d37e9d0a5203b4204fea256bf50aafc642328f05b7deeb03d435e05826ae082abc99b WHIRLPOOL c9d97722618db0bee57ce1c453ab2422f9cc2236c2501f5853667b950e0b5c7125252f23ff3ebfc576ee76ed5987896f8116cb0a3236503b469df229c7613592
+MISC ChangeLog-2015 9104 SHA256 5995ffbda2dd1d185931ba76a268ee0c3c869a69c36a0176c9f29c9b9dadcc68 SHA512 0cc59d4b827dff5acced105189860590bffb13a5ad3a09e9beffab3232a09127a9831ca64229f0c01faebafa06da08ae516a0019e76b392eda9653c29a4e297b WHIRLPOOL 6e2a0e2e59722b7dbe0877bcdc8055808d0618392c68ac64201545d727a71f7725705561035cdf67c7324f44c0541a5d8a352cd154edf0acd38425a8725861bd
+MISC metadata.xml 997 SHA256 cc79706ccf4ef1ee11d8fd20f5724b4e978cd6bf5137abe2c3e3187aa9dfec0f SHA512 43d84c29e22bece3fc87a925c309229dd5867c3457e3378a0000c046b06b5a7fc75f6e204111cbdc90a02fba3a987ba376bd96dd2b81e498fa19955f16b5a58e WHIRLPOOL e51cba62fb8268af2103e749bc5941db3b747d8b84f304735ea428f4335a35e40f1576dc9f0a2b9de13a905dbf7edddf2b084e7e2229cb775700a5d79e1d81a8
diff --git a/net-dns/pdns-recursor/files/pdns-recursor b/net-dns/pdns-recursor/files/pdns-recursor
new file mode 100644
index 000000000000..ebff2b02b85f
--- /dev/null
+++ b/net-dns/pdns-recursor/files/pdns-recursor
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="ping"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting PowerDNS Recursor"
+ /usr/sbin/pdns_recursor --daemon=yes >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping PowerDNS Recursor"
+ /usr/bin/rec_control quit >/dev/null 2>&1
+ eend $?
+}
+
+ping() {
+ ebegin "Pinging PowerDNS Recursor"
+ /usr/bin/rec_control ping >/dev/null 2>&1
+ eend $?
+}
diff --git a/net-dns/pdns-recursor/files/pdns-recursor-4.0.3-boost-1.61-fcontext.patch b/net-dns/pdns-recursor/files/pdns-recursor-4.0.3-boost-1.61-fcontext.patch
new file mode 100644
index 000000000000..c6cd9a326311
--- /dev/null
+++ b/net-dns/pdns-recursor/files/pdns-recursor-4.0.3-boost-1.61-fcontext.patch
@@ -0,0 +1,152 @@
+diff --git a/mtasker_fcontext.cc b/mtasker_fcontext.cc
+index bc37e76..8d96fa1 100644
+--- a/mtasker_fcontext.cc
++++ b/mtasker_fcontext.cc
+@@ -23,14 +23,15 @@
+ #include <exception>
+ #include <cassert>
+ #include <type_traits>
+-#if BOOST_VERSION > 106100
+-#include <boost/context/detail/fcontext.hpp>
+-#else
+-#include <boost/context/fcontext.hpp>
+-#endif
+ #include <boost/version.hpp>
+-
++#if BOOST_VERSION < 106100
++#include <boost/context/fcontext.hpp>
+ using boost::context::make_fcontext;
++#else
++#include <boost/context/detail/fcontext.hpp>
++using boost::context::detail::make_fcontext;
++#endif /* BOOST_VERSION < 106100 */
++
+
+ #if BOOST_VERSION < 105600
+ /* Note: This typedef means functions taking fcontext_t*, like jump_fcontext(),
+@@ -61,8 +62,15 @@ jump_fcontext (fcontext_t* const ofc, fcontext_t const nfc,
+ }
+ }
+ #else
++
++#if BOOST_VERSION < 106100
+ using boost::context::fcontext_t;
+ using boost::context::jump_fcontext;
++#else
++using boost::context::detail::fcontext_t;
++using boost::context::detail::jump_fcontext;
++using boost::context::detail::transfer_t;
++#endif /* BOOST_VERSION < 106100 */
+
+ static_assert (std::is_pointer<fcontext_t>::value,
+ "Boost Context has changed the fcontext_t type again :-(");
+@@ -72,7 +80,9 @@ static_assert (std::is_pointer<fcontext_t>::value,
+ * jump. args_t simply provides a way to pass more by reference.
+ */
+ struct args_t {
++#if BOOST_VERSION < 106100
+ fcontext_t prev_ctx = nullptr;
++#endif
+ pdns_ucontext_t* self = nullptr;
+ boost::function<void(void)>* work = nullptr;
+ };
+@@ -80,7 +90,11 @@ struct args_t {
+ extern "C" {
+ static
+ void
++#if BOOST_VERSION < 106100
+ threadWrapper (intptr_t const xargs) {
++#else
++threadWrapper (transfer_t const t) {
++#endif
+ /* Access the args passed from pdns_makecontext, and copy them directly from
+ * the calling stack on to ours (we're now using the MThreads stack).
+ * This saves heap allocating an args object, at the cost of an extra
+@@ -90,11 +104,28 @@ threadWrapper (intptr_t const xargs) {
+ * the behaviour of the System V implementation, which can inherently only
+ * be passed ints and pointers.
+ */
++#if BOOST_VERSION < 106100
+ auto args = reinterpret_cast<args_t*>(xargs);
++#else
++ auto args = reinterpret_cast<args_t*>(t.data);
++#endif
+ auto ctx = args->self;
+ auto work = args->work;
++ /* we switch back to pdns_makecontext() */
++#if BOOST_VERSION < 106100
+ jump_fcontext (reinterpret_cast<fcontext_t*>(&ctx->uc_mcontext),
+ static_cast<fcontext_t>(args->prev_ctx), 0);
++#else
++ transfer_t res = jump_fcontext (t.fctx, 0);
++ /* we got switched back from pdns_swapcontext() */
++ if (res.data) {
++ /* if res.data is not a nullptr, it holds a pointer to the context
++ we just switched from, and we need to fill it to be able to
++ switch back to it later. */
++ fcontext_t* ptr = static_cast<fcontext_t*>(res.data);
++ *ptr = res.fctx;
++ }
++#endif
+ args = nullptr;
+
+ try {
+@@ -106,9 +137,14 @@ threadWrapper (intptr_t const xargs) {
+
+ /* Emulate the System V uc_link feature. */
+ auto const next_ctx = ctx->uc_link->uc_mcontext;
++#if BOOST_VERSION < 106100
+ jump_fcontext (reinterpret_cast<fcontext_t*>(&ctx->uc_mcontext),
+ static_cast<fcontext_t>(next_ctx),
+ static_cast<bool>(ctx->exception));
++#else
++ jump_fcontext (static_cast<fcontext_t>(next_ctx), 0);
++#endif
++
+ #ifdef NDEBUG
+ __builtin_unreachable();
+ #endif
+@@ -129,10 +165,27 @@ pdns_ucontext_t::~pdns_ucontext_t
+ void
+ pdns_swapcontext
+ (pdns_ucontext_t& __restrict octx, pdns_ucontext_t const& __restrict ctx) {
++ /* we either switch back to threadwrapper() if it's the first time,
++ or we switch back to pdns_swapcontext(),
++ in both case we will be returning from a call to jump_fcontext(). */
++#if BOOST_VERSION < 106100
+ if (jump_fcontext (reinterpret_cast<fcontext_t*>(&octx.uc_mcontext),
+ static_cast<fcontext_t>(ctx.uc_mcontext), 0)) {
+ std::rethrow_exception (ctx.exception);
+ }
++#else
++ transfer_t res = jump_fcontext (static_cast<fcontext_t>(ctx.uc_mcontext), &octx.uc_mcontext);
++ if (res.data) {
++ /* if res.data is not a nullptr, it holds a pointer to the context
++ we just switched from, and we need to fill it to be able to
++ switch back to it later. */
++ fcontext_t* ptr = static_cast<fcontext_t*>(res.data);
++ *ptr = res.fctx;
++ }
++ if (ctx.exception) {
++ std::rethrow_exception (ctx.exception);
++ }
++#endif
+ }
+
+ void
+@@ -146,7 +199,15 @@ pdns_makecontext
+ args_t args;
+ args.self = &ctx;
+ args.work = &start;
++ /* jumping to threadwrapper */
++#if BOOST_VERSION < 106100
+ jump_fcontext (reinterpret_cast<fcontext_t*>(&args.prev_ctx),
+ static_cast<fcontext_t>(ctx.uc_mcontext),
+ reinterpret_cast<intptr_t>(&args));
++#else
++ transfer_t res = jump_fcontext (static_cast<fcontext_t>(ctx.uc_mcontext),
++ &args);
++ /* back from threadwrapper, updating the context */
++ ctx.uc_mcontext = res.fctx;
++#endif
+ }
diff --git a/net-dns/pdns-recursor/files/pdns-recursor-4.0.3-ecdsa.patch b/net-dns/pdns-recursor/files/pdns-recursor-4.0.3-ecdsa.patch
new file mode 100644
index 000000000000..52826c9617af
--- /dev/null
+++ b/net-dns/pdns-recursor/files/pdns-recursor-4.0.3-ecdsa.patch
@@ -0,0 +1,29 @@
+commit 3d59c6f7d83f54d5c73013de5ab61e9a0ecd1460
+Author: Remi Gacogne <remi.gacogne@powerdns.com>
+Date: Mon Oct 17 10:07:26 2016 +0200
+
+ Fix building with ECDSA support disabled in libcrypto
+
+ (cherry picked from commit aa74d164ae29269168d048d2cc8d7e1f984774c4)
+
+diff --git a/opensslsigners.cc b/opensslsigners.cc
+index 9e919a0..acf8f08 100644
+--- a/opensslsigners.cc
++++ b/opensslsigners.cc
+@@ -128,6 +128,7 @@ static inline int RSA_set0_crt_params(RSA* rsakey, BIGNUM* dmp1, BIGNUM* dmq1, B
+ return 1;
+ }
+
++#ifdef HAVE_LIBCRYPTO_ECDSA
+ static inline void ECDSA_SIG_get0(const ECDSA_SIG* signature, const BIGNUM** pr, const BIGNUM** ps) {
+ *pr = signature->r;
+ *ps = signature->s;
+@@ -140,6 +141,8 @@ static inline int ECDSA_SIG_set0(ECDSA_SIG* signature, BIGNUM* pr, BIGNUM* ps) {
+ signature->s = ps;
+ return 1;
+ }
++#endif /* HAVE_LIBCRYPTO_ECDSA */
++
+ #else
+ void openssl_thread_setup() {}
+ void openssl_thread_cleanup() {}
diff --git a/net-dns/pdns-recursor/files/pdns-recursor-r1 b/net-dns/pdns-recursor/files/pdns-recursor-r1
new file mode 100644
index 000000000000..57c9df1eaa45
--- /dev/null
+++ b/net-dns/pdns-recursor/files/pdns-recursor-r1
@@ -0,0 +1,37 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PDNS_CONFIGDIR="${PDNS_CONFIGDIR:-/etc/powerdns}"
+
+PDNS_CONFIG="${PDNS_CONFIGDIR}/recursor.conf"
+PDNS_CHROOTDIR="$( awk -F = '$1 == "chroot" { print $2 }' "${PDNS_CONFIG}" )"
+PDNS_SOCKETDIR="$( awk -F = '$1 == "socket-dir" { print $2 }' "${PDNS_CONFIG}" )"
+[ -z "${PDNS_SOCKETDIR}" -a -z "${PDNS_CHROOTDIR}" ] && PDNS_SOCKETDIR="/var/run"
+
+name="PowerDNS Recursor"
+description="Recursive name server"
+
+extra_started_commands="ping"
+description_ping="Ping the PowerDNS instance"
+
+command="/usr/sbin/pdns_recursor"
+command_args="--config-dir=${PDNS_CONFIGDIR}"
+command_args_foreground="--daemon=no"
+command_args_background="--daemon=yes"
+yesno ${rc_verbose} || command_args_background="${command_args_background} >/dev/null 2>&1"
+
+pidfile="${PDNS_CHROOTDIR}/${PDNS_SOCKETDIR}/pdns_recursor.pid"
+
+control_command="/usr/bin/rec_control"
+control_command_args="${command_args}"
+
+depend() {
+ need net
+}
+
+ping() {
+ ebegin "Pinging ${name}"
+ ${control_command} ${control_command_args} ping >/dev/null 2>&1
+ eend $?
+}
diff --git a/net-dns/pdns-recursor/metadata.xml b/net-dns/pdns-recursor/metadata.xml
new file mode 100644
index 000000000000..a5208407eaa3
--- /dev/null
+++ b/net-dns/pdns-recursor/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>swegener@gentoo.org</email>
+ <name>Sven Wegener</name>
+ <description>Primary Maintainer</description>
+</maintainer>
+<longdescription>
+With a small codebase, the PowerDNS Recursor is an advanced recursor currently
+serving the DNS resolving needs of over 2 million Internet connections. Besides
+high performance (using kqueue or epoll, over 15 thousand qps on commodity
+hardware), it provides advanced anti-spoofing measures. In addition, the program
+caches server performance and timeouts, making it both network and user friendly.
+It also has built-in hooks for making graphs with rrdtool, providing insight into
+nameserver performance.
+</longdescription>
+<use>
+ <flag name="luajit">Enable support for <pkg>dev-lang/luajit</pkg>.</flag>
+ <flag name="protobuf">Enable support for <pkg>dev-libs/protobuf</pkg>.</flag>
+</use>
+</pkgmetadata>
diff --git a/net-dns/pdns-recursor/pdns-recursor-4.0.4-r1.ebuild b/net-dns/pdns-recursor/pdns-recursor-4.0.4-r1.ebuild
new file mode 100644
index 000000000000..b748e27b710e
--- /dev/null
+++ b/net-dns/pdns-recursor/pdns-recursor-4.0.4-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs flag-o-matic eutils versionator
+
+DESCRIPTION="The PowerDNS Recursor"
+HOMEPAGE="https://www.powerdns.com/"
+SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="lua luajit protobuf systemd"
+REQUIRED_USE="?? ( lua luajit )"
+
+DEPEND="lua? ( >=dev-lang/lua-5.1:= )
+ luajit? ( dev-lang/luajit:= )
+ protobuf? (
+ dev-libs/protobuf
+ >=dev-libs/boost-1.42
+ )
+ systemd? ( sys-apps/systemd:0= )
+ >=dev-libs/boost-1.35"
+RDEPEND="${DEPEND}
+ !<net-dns/pdns-2.9.20-r1"
+DEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P/_/-}
+
+pkg_setup() {
+ filter-flags -ftree-vectorize
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/powerdns \
+ $(use_enable systemd) \
+ $(use_with lua) \
+ $(use_with luajit) \
+ $(use_with protobuf)
+}
+
+src_install() {
+ default
+
+ mv "${D}"/etc/powerdns/recursor.conf{-dist,}
+
+ # set defaults: setuid=nobody, setgid=nobody
+ sed -i \
+ -e 's/^# set\([ug]\)id=$/set\1id=nobody/' \
+ -e 's/^# quiet=$/quiet=on/' \
+ -e 's/^# chroot=$/chroot=\/var\/lib\/powerdns/' \
+ "${D}"/etc/powerdns/recursor.conf
+
+ newinitd "${FILESDIR}"/pdns-recursor-r1 pdns-recursor
+
+ keepdir /var/lib/powerdns
+}
+
+pkg_postinst() {
+ local old
+
+ for old in ${REPLACING_VERSIONS}; do
+ version_compare ${old} 4.0.0-r1
+ [[ $? -eq 1 ]] || continue
+
+ ewarn "Starting with 4.0.0-r1 the init script has been renamed from precursor"
+ ewarn "to pdns-recursor, please update your runlevels accordingly."
+
+ break
+ done
+}
diff --git a/net-dns/pdns-recursor/pdns-recursor-4.0.4.ebuild b/net-dns/pdns-recursor/pdns-recursor-4.0.4.ebuild
new file mode 100644
index 000000000000..8b3e1791ecd0
--- /dev/null
+++ b/net-dns/pdns-recursor/pdns-recursor-4.0.4.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs flag-o-matic eutils versionator
+
+DESCRIPTION="The PowerDNS Recursor"
+HOMEPAGE="https://www.powerdns.com/"
+SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="lua luajit protobuf systemd"
+REQUIRED_USE="?? ( lua luajit )"
+
+DEPEND="lua? ( >=dev-lang/lua-5.1:= )
+ luajit? ( dev-lang/luajit:= )
+ protobuf? (
+ dev-libs/protobuf
+ >=dev-libs/boost-1.42
+ )
+ systemd? ( sys-apps/systemd:0= )
+ >=dev-libs/boost-1.35"
+RDEPEND="${DEPEND}
+ !<net-dns/pdns-2.9.20-r1"
+DEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P/_/-}
+
+pkg_setup() {
+ filter-flags -ftree-vectorize
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/powerdns \
+ $(use_enable systemd) \
+ $(use_with lua) \
+ $(use_with luajit) \
+ $(use_with protobuf)
+}
+
+src_install() {
+ default
+
+ mv "${D}"/etc/powerdns/recursor.conf{-dist,}
+
+ # set defaults: setuid=nobody, setgid=nobody
+ sed -i \
+ -e 's/^# set\([ug]\)id=$/set\1id=nobody/' \
+ -e 's/^# quiet=$/quiet=on/' \
+ -e 's/^# chroot=$/chroot=\/var\/lib\/powerdns/' \
+ "${D}"/etc/powerdns/recursor.conf
+
+ doinitd "${FILESDIR}"/pdns-recursor
+
+ keepdir /var/lib/powerdns
+}
+
+pkg_postinst() {
+ local old
+
+ for old in ${REPLACING_VERSIONS}; do
+ version_compare ${old} 4.0.0-r1
+ [[ $? -eq 1 ]] || continue
+
+ ewarn "Starting with 4.0.0-r1 the init script has been renamed from precursor"
+ ewarn "to pdns-recursor, please update your runlevels accordingly."
+
+ break
+ done
+}
diff --git a/net-dns/pdns-recursor/pdns-recursor-4.0.5.ebuild b/net-dns/pdns-recursor/pdns-recursor-4.0.5.ebuild
new file mode 100644
index 000000000000..b748e27b710e
--- /dev/null
+++ b/net-dns/pdns-recursor/pdns-recursor-4.0.5.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs flag-o-matic eutils versionator
+
+DESCRIPTION="The PowerDNS Recursor"
+HOMEPAGE="https://www.powerdns.com/"
+SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="lua luajit protobuf systemd"
+REQUIRED_USE="?? ( lua luajit )"
+
+DEPEND="lua? ( >=dev-lang/lua-5.1:= )
+ luajit? ( dev-lang/luajit:= )
+ protobuf? (
+ dev-libs/protobuf
+ >=dev-libs/boost-1.42
+ )
+ systemd? ( sys-apps/systemd:0= )
+ >=dev-libs/boost-1.35"
+RDEPEND="${DEPEND}
+ !<net-dns/pdns-2.9.20-r1"
+DEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P/_/-}
+
+pkg_setup() {
+ filter-flags -ftree-vectorize
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/powerdns \
+ $(use_enable systemd) \
+ $(use_with lua) \
+ $(use_with luajit) \
+ $(use_with protobuf)
+}
+
+src_install() {
+ default
+
+ mv "${D}"/etc/powerdns/recursor.conf{-dist,}
+
+ # set defaults: setuid=nobody, setgid=nobody
+ sed -i \
+ -e 's/^# set\([ug]\)id=$/set\1id=nobody/' \
+ -e 's/^# quiet=$/quiet=on/' \
+ -e 's/^# chroot=$/chroot=\/var\/lib\/powerdns/' \
+ "${D}"/etc/powerdns/recursor.conf
+
+ newinitd "${FILESDIR}"/pdns-recursor-r1 pdns-recursor
+
+ keepdir /var/lib/powerdns
+}
+
+pkg_postinst() {
+ local old
+
+ for old in ${REPLACING_VERSIONS}; do
+ version_compare ${old} 4.0.0-r1
+ [[ $? -eq 1 ]] || continue
+
+ ewarn "Starting with 4.0.0-r1 the init script has been renamed from precursor"
+ ewarn "to pdns-recursor, please update your runlevels accordingly."
+
+ break
+ done
+}
diff --git a/net-dns/pdns-recursor/pdns-recursor-4.0.6.ebuild b/net-dns/pdns-recursor/pdns-recursor-4.0.6.ebuild
new file mode 100644
index 000000000000..2b644a932581
--- /dev/null
+++ b/net-dns/pdns-recursor/pdns-recursor-4.0.6.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs flag-o-matic eutils versionator
+
+DESCRIPTION="The PowerDNS Recursor"
+HOMEPAGE="https://www.powerdns.com/"
+SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="lua luajit protobuf systemd"
+REQUIRED_USE="?? ( lua luajit )"
+
+DEPEND="lua? ( >=dev-lang/lua-5.1:= )
+ luajit? ( dev-lang/luajit:= )
+ protobuf? (
+ dev-libs/protobuf
+ >=dev-libs/boost-1.42
+ )
+ systemd? ( sys-apps/systemd:0= )
+ >=dev-libs/boost-1.35"
+RDEPEND="${DEPEND}
+ !<net-dns/pdns-2.9.20-r1"
+DEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P/_/-}
+
+pkg_setup() {
+ filter-flags -ftree-vectorize
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/powerdns \
+ $(use_enable systemd) \
+ $(use_with lua) \
+ $(use_with luajit) \
+ $(use_with protobuf)
+}
+
+src_install() {
+ default
+
+ mv "${D}"/etc/powerdns/recursor.conf{-dist,}
+
+ # set defaults: setuid=nobody, setgid=nobody
+ sed -i \
+ -e 's/^# set\([ug]\)id=$/set\1id=nobody/' \
+ -e 's/^# quiet=$/quiet=on/' \
+ -e 's/^# chroot=$/chroot=\/var\/lib\/powerdns/' \
+ "${D}"/etc/powerdns/recursor.conf
+
+ newinitd "${FILESDIR}"/pdns-recursor-r1 pdns-recursor
+
+ keepdir /var/lib/powerdns
+}
+
+pkg_postinst() {
+ local old
+
+ for old in ${REPLACING_VERSIONS}; do
+ version_compare ${old} 4.0.0-r1
+ [[ $? -eq 1 ]] || continue
+
+ ewarn "Starting with 4.0.0-r1 the init script has been renamed from precursor"
+ ewarn "to pdns-recursor, please update your runlevels accordingly."
+
+ break
+ done
+}
diff --git a/net-dns/pdns/Manifest b/net-dns/pdns/Manifest
new file mode 100644
index 000000000000..1e0aaeeb30a5
--- /dev/null
+++ b/net-dns/pdns/Manifest
@@ -0,0 +1,15 @@
+AUX dnsdomain2.schema 6640 SHA256 a59cfe28a82ffdcb7faa7d7a3d282cd998edcb49fc2543d3789e0ad6f329a938 SHA512 ac16f8d528d6138d3c2cbf997fd8fbb467d388aa63eb6ed4e7780a3dad11ea885b91252ff0809b1d2cf7d5200814b8963aab890af84741ea86d35b2f5955a7ea WHIRLPOOL a005f1d5676fb049429893b4951f252220e97184a63875ded9090373b493da3e3cc5bdc10a61bcdea3b00b72d3e686fc4d75cb5a661329a4ea0075cba417cebd
+AUX pdns 1218 SHA256 aa50c51bcf9b42be4315afcdeed0b420049f97d8fea351096626c343fb4038d1 SHA512 7765720e89b6332af6b1f3e346c0768dc1c4533131598023c55cde09710d578c54d7a9c82df699c322cef8059b4d05a08dee3afa4837149f924b06c74e56080b WHIRLPOOL e8d3283717c2fc268cba4da5f33672d57b480c90946846fb74597c97c499fc4a32801bcd99818341c54610739da441dc4bf8553a82d65bdc7a3929da87b5ef32
+AUX pdns-r1 2533 SHA256 2f7692cd21c0212597ad474586ade8794648702bcfaae6e689c529a0a8847b7e SHA512 6392f59f82b82621b6cab6823f7761cd875bc6818c48db846df289057c02d8119a1024c5ecdf70a5ca8a55c00a2c3c56240d36b42cc038a25e8616ab9b966dd6 WHIRLPOOL 33f02fc7cd8c49aa10b93d1ebe714df0387d4f78093c61a32aa080c04ffff722d484fd32107185dceb17dcad069be3c2f87a708ecf0ad673cc83af306e73d1c1
+DIST pdns-4.0.2.tar.bz2 1314886 SHA256 d051e53b63f586c924f00ce8a81662f7bd285b461d125d4991538f92cf7e629d SHA512 6720289332ee5186f4c58a00a720f3bb58480c0ae7f09915148ca8b40e2dfdc77e2f14123df903692afa464539eeef6b21e8ea3d284278897751ba807e2cdffe WHIRLPOOL 6b58de4f2fc6fe830255203c281ca518a543b373171f73021cd8efd597c146b438a7ffd6ed018b637816fe07153a51f947818a0fa76dc237ba0f50903d3afbe9
+DIST pdns-4.0.3.tar.bz2 1312299 SHA256 60fa21550b278b41f58701af31c9f2b121badf271fb9d7642f6d35bfbea8e282 SHA512 58d33ac6cf457a916bae6abd8d2dc17f76fbcd1bd9e649948584dd669f5596b43e3e4d91841700ea1ea2cd1ac102749e503cd9075273540f33a2321e20d8bfc2 WHIRLPOOL a28ab5011b3365423f13331c31e8f0fdb9aef0798155ce6fcbe328f82ebc3ca57a966b77f48c31422d374837ee4be3f7f0bc935bab463add19714eb8abd46493
+DIST pdns-4.0.4.tar.bz2 1320327 SHA256 d974ab89de69477c7f581a3233bc731eacbb43d479291e472b2c531c83b6d763 SHA512 4ef4705cd990b03976775167c7c37850d45907e198549feda5f5701172e008e3f1f74a35a9bebdb24b63dec15ff63cb2cc9dfc8f92e4e1012e0539c5a88b845b WHIRLPOOL 5ac68a15155424d42fb4b84be1b34eb2e51498ae5193ae104215e4bb52a72845923f82dc6b112ce165444cdbfe3aaf01557d2f6ab42f6531dd525aee15ee1b19
+DIST pdns-4.1.0-rc1.tar.bz2 1106039 SHA256 a973202ca1c9333c236d76286ab1d8566d420a877a003130381150171d63d4ff SHA512 7356277126578b34587579039d4c63e9ba7822ddd39810b4a43eb06d076c2d247d8b8db7162b2aafd1cb73fd83047b0b5584d4d8bb333ec77597717bac76b450 WHIRLPOOL 19a003a7564691f5ba812f34b376d79c6acbb538df7e4b978a7058f919ef71d778770527d7a091a689a433e915cfccfc22152bc4da46e36ba6c335a31bcdb40f
+EBUILD pdns-4.0.2.ebuild 4135 SHA256 24f5032ad5e1e048133a97f3429dd2506e196f428e69da3758c1db440a5946f2 SHA512 1f67708f99dcaa22638c101bcd014db5e050a9faf82fa8bd33e92361159551b496baab06e171b18e84f98cf333b949d0398f36ff0e1a4f0afba89485fd1bf08b WHIRLPOOL 576114051c4550af58eba31023475d947cfb15d229410b768100a7dd2d7cba6097e5d0fad2911dfdfecf7317fad8f13c38be200a0fee03ad3a92ba399e06b8f4
+EBUILD pdns-4.0.3-r3.ebuild 4146 SHA256 edba6f9a310f4e9b753c0bc0396385f4d04ec198355751d44495600aed8fe9d4 SHA512 4493c9211c817c9f26f3329e64a079a18570bfcaf18fb1e318100b4bb3f2ead15e3ac4436ce20cb1779b34a624bd490cea8d8182eddee8360fcb6def57be1e37 WHIRLPOOL 629182b4d6864352705fbdbd6f24fe06d8ba0acfe371df381507187c814fdf30c3534621330e27fbf4223aae43953c3749762c232d4dc1256765378e4137f6f3
+EBUILD pdns-4.0.3.ebuild 4137 SHA256 c37616d96d56911b6f143ff74b38aaec23fcd1e79857c67c8703244a74c94c77 SHA512 a757268e5d43bc22a666c6fc84986aa1582fdc5604527677e9b8928342f010f49d4b1beefa998539d37247c9bcaaf12dd3dad600f679897e2e1c6c74fafad15c WHIRLPOOL ac212bcd7ccad356e530fd27ed44fd1061c142edbaedc7119c9762ce42122775f985d97ff637116f7ba512e67a89f6a81ae6f12bed917ea1303694fe6af497a7
+EBUILD pdns-4.0.4.ebuild 4144 SHA256 814425cb3ff6b8be6e2c0fd39671ef748553ff9a4532064d50c6114eb2b78a66 SHA512 2491bd5013165ef666ca5c077c5d6330d016ba8d87950e6875fbdf780d212624616569a708ab6bdb7016ad10bfee18605d9136541d92166253a50e4ea0729ba0 WHIRLPOOL 1ba005ec54b80ad3c305cbd76db3c97ef0073e644879dfad2877a6e6102e19adb5c46e4d9724bc0b205a142a949335a138cba03f5cd83eaa1c9241406d446699
+EBUILD pdns-4.1.0_rc1.ebuild 4067 SHA256 742d4e08c15d1bfa8da7b2bf0f83808016b7ffe5a536b217c0fd304da901266a SHA512 3c627af21069277b5a24203edcebc94342867125c287db9346aec4a81f655217e4bfc01a35f0febe33a18557c6788654bdad0e109311ff43bda98cbf69e15427 WHIRLPOOL 1a315bde86086b80ff8b2bce01b2324b716a27beb5f5a4c424f02463aa73cfb0a83015554c4af1d5b887f0d1b69560e08ed815e3a1df7046e883ad48880a8e10
+MISC ChangeLog 5944 SHA256 35de26d1c11b2d393aa8a0c4eadb15c2575dd70df9a575f6c154eb42c58418b9 SHA512 ffa4c8e213e312dafd3e1b1b6d439a4bb7d3a645eaa0485c92a9c2cb61caf68e336b3cbca6f2a36dbc232a40a869e3fa99300456e1e418c87b77e5f0ec4b5af3 WHIRLPOOL c3cfde00afbe919570b062e3077d67e682b6b37aa114d480314eb92a5dfbd301d04ab1b1cee4414a398518113aa6706ce704d8a0c11e82860e7e9cd936a86030
+MISC ChangeLog-2015 17472 SHA256 0def7a9b8ef442683005b5805aaa3d3875a59c41ac239451c8f8b27177b3aedc SHA512 cb67db8b70208f96ad278ed3a706fd81bd97c9a278ba42a4bfd2369a2c1a47e0533eeed18e0673bf4a6c76d8ab6d12c6d5bf41804e83facaf4572983bf3ea43c WHIRLPOOL d9f6683e3836f9938d9b4d25f10f8fafc262510c2593d8210ff207a22bec3ad8d444417708b61138b7c9fea108dfd5aa25c1dd76a84c75fc1598efac73ce8bd2
+MISC metadata.xml 1372 SHA256 0c8074107d7379fc04ad8e6e31bd823c6d8d492e96beba90e13299bba017777e SHA512 5031d165e37113c51d9c608a6493594825bbef8f35ea6e85eae0c4b515df91522c99c574bc0fac141fdd1d428065a66a45e8367c67b459f730d0171a3bb85080 WHIRLPOOL de40f263dbe9929a3276d341f265e27943be737576626e2af4edbffe7218eae34ef8c46ce1b8c9945bbb5546537861e1200bae2785cd8efe371b0b764eb106ce
diff --git a/net-dns/pdns/files/dnsdomain2.schema b/net-dns/pdns/files/dnsdomain2.schema
new file mode 100644
index 000000000000..a89aeafb3746
--- /dev/null
+++ b/net-dns/pdns/files/dnsdomain2.schema
@@ -0,0 +1,195 @@
+# A schema for storing DNS zones in LDAP
+#
+# ORDERING is not necessary, and some servers don't support
+# integerOrderingMatch. Omit or change if you like
+
+attributetype ( 1.3.6.1.4.1.2428.20.0.0 NAME 'dNSTTL'
+ DESC 'An integer denoting time to live'
+ EQUALITY integerMatch
+ ORDERING integerOrderingMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.0.1 NAME 'dNSClass'
+ DESC 'The class of a resource record'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.11 NAME 'wKSRecord'
+ DESC 'a well known service description, RFC 1035'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.12 NAME 'pTRRecord'
+ DESC 'domain name pointer, RFC 1035'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.13 NAME 'hInfoRecord'
+ DESC 'host information, RFC 1035'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.14 NAME 'mInfoRecord'
+ DESC 'mailbox or mail list information, RFC 1035'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.16 NAME 'tXTRecord'
+ DESC 'text string, RFC 1035'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.17 NAME 'rPRecord'
+ DESC 'for Responsible Person, RFC 1183'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.18 NAME 'aFSDBRecord'
+ DESC 'for AFS Data Base location, RFC 1183'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.24 NAME 'SigRecord'
+ DESC 'Signature, RFC 2535'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.25 NAME 'KeyRecord'
+ DESC 'Key, RFC 2535'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.27 NAME 'gPosRecord'
+ DESC 'Geographical Position, RFC 1712'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.28 NAME 'aAAARecord'
+ DESC 'IPv6 address, RFC 1886'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.29 NAME 'LocRecord'
+ DESC 'Location, RFC 1876'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.30 NAME 'nXTRecord'
+ DESC 'non-existant, RFC 2535'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.33 NAME 'sRVRecord'
+ DESC 'service location, RFC 2782'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.35 NAME 'nAPTRRecord'
+ DESC 'Naming Authority Pointer, RFC 2915'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.36 NAME 'kXRecord'
+ DESC 'Key Exchange Delegation, RFC 2230'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.37 NAME 'certRecord'
+ DESC 'certificate, RFC 2538'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.38 NAME 'a6Record'
+ DESC 'A6 Record Type, RFC 2874'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.39 NAME 'dNameRecord'
+ DESC 'Non-Terminal DNS Name Redirection, RFC 2672'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.42 NAME 'aPLRecord'
+ DESC 'Lists of Address Prefixes, RFC 3123'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.43 NAME 'dSRecord'
+ DESC 'Delegation Signer, RFC 3658'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.44 NAME 'sSHFPRecord'
+ DESC 'SSH Key Fingerprint, RFC 4255'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.45 NAME 'iPSecKeyRecord'
+ DESC 'SSH Key Fingerprint, RFC 4025'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.46 NAME 'rRSIGRecord'
+ DESC 'RRSIG, RFC 3755'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.47 NAME 'nSECRecord'
+ DESC 'NSEC, RFC 3755'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.48 NAME 'dNSKeyRecord'
+ DESC 'DNSKEY, RFC 3755'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.49 NAME 'dHCIDRecord'
+ DESC 'DHCID, RFC 4701'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.99 NAME 'sPFRecord'
+ DESC 'Sender Policy Framework, RFC 4408'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+objectclass ( 1.3.6.1.4.1.2428.20.2 NAME 'dNSDomain2'
+ SUP 'dNSDomain' STRUCTURAL
+ MAY ( DNSTTL $ DNSClass $ WKSRecord $ PTRRecord $
+ HINFORecord $ MINFORecord $ TXTRecord $ RPRecord $
+ AFSDBRecord $ SIGRecord $ KEYRecord $ GPOSRecord $
+ AAAARecord $ LOCRecord $ NXTRecord $ SRVRecord $
+ NAPTRRecord $ KXRecord $ CERTRecord $ A6Record $
+ DNAMERecord $ APLRecord $ DSRecord $ SSHFPRecord $
+ IPSECKEYRecord $ RRSIGRecord $ NSECRecord $
+ DNSKEYRecord $ DHCIDRecord $ SPFRecord
+ ) )
diff --git a/net-dns/pdns/files/pdns b/net-dns/pdns/files/pdns
new file mode 100644
index 000000000000..c16037913112
--- /dev/null
+++ b/net-dns/pdns/files/pdns
@@ -0,0 +1,61 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="monitor"
+extra_started_commands="reload dump"
+
+PDNS_INSTANCE="${SVCNAME#pdns[.-]}"
+PDNS_CONFIG=""
+
+if [ -n "${PDNS_INSTANCE}" ] && [ "${PDNS_INSTANCE}" != "pdns" ]
+then
+ PDNS_CONFIG="--config-name=${PDNS_INSTANCE}"
+else
+ PDNS_INSTANCE="default"
+fi
+
+depend() {
+ need net
+ use mysql postgresql
+}
+
+start() {
+ ebegin "Starting PowerDNS (${PDNS_INSTANCE})"
+ /usr/sbin/pdns_server \
+ ${PDNS_CONFIG} \
+ --daemon=yes \
+ --guardian=yes
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping PowerDNS (${PDNS_INSTANCE})"
+ /usr/bin/pdns_control ${PDNS_CONFIG} quit >/dev/null 2>&1
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading PowerDNS (${PDNS_INSTANCE})"
+ /usr/bin/pdns_control ${PDNS_CONFIG} cycle >/dev/null 2>&1
+ eend $?
+}
+
+dump() {
+ ebegin "Dumping PowerDNS (${PDNS_INSTANCE}) variables"
+ /usr/bin/pdns_control ${PDNS_CONFIG} list
+ eend $?
+}
+
+monitor() {
+ ebegin "Starting PowerDNS (${PDNS_INSTANCE}) in monitor mode"
+ /usr/sbin/pdns_server \
+ ${PDNS_CONFIG} \
+ --daemon=no \
+ --guardian=no \
+ --control-console=yes \
+ --loglevel=9 \
+ --log-dns-details=yes \
+ --query-logging=yes
+ eend $?
+}
diff --git a/net-dns/pdns/files/pdns-r1 b/net-dns/pdns/files/pdns-r1
new file mode 100644
index 000000000000..76c4a3f1bbf5
--- /dev/null
+++ b/net-dns/pdns/files/pdns-r1
@@ -0,0 +1,102 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PDNS_CONFIGDIR="${PDNS_CONFIGDIR:-/etc/powerdns}"
+PDNS_STOP_TIMEOUT="${PDNS_STOP_TIMEOUT:-10}"
+
+[ "${RC_SVCNAME}" != "pdns" ] && PDNS_INSTANCE="${RC_SVCNAME#pdns[.-]}" || PDNS_INSTANCE=""
+
+PDNS_CONFIG="${PDNS_CONFIGDIR}/pdns${PDNS_INSTANCE:+-${PDNS_INSTANCE}}.conf"
+PDNS_CHROOTDIR="$( awk -F = '$1 == "chroot" { print $2 }' "${PDNS_CONFIG}" )"
+PDNS_SOCKETDIR="$( awk -F = '$1 == "socket-dir" { print $2 }' "${PDNS_CONFIG}" )"
+[ -z "${PDNS_SOCKETDIR}" -a -z "${PDNS_CHROOTDIR}" ] && PDNS_SOCKETDIR="/var/run"
+
+name="PowerDNS Authoritative Server${PDNS_INSTANCE:+ (${PDNS_INSTANCE})}"
+description="Authoritative name server"
+
+extra_started_commands="dump ping"
+extra_stopped_commands="monitor"
+description_dump="Dumps all statistic variables"
+description_ping="Ping the PowerDNS instance"
+description_monitor="Starts in foreground with logging and console enabled"
+
+command="/usr/sbin/pdns_server"
+command_args="--config-dir=${PDNS_CONFIGDIR}${PDNS_INSTANCE:+ --config-name=${PDNS_INSTANCE}}"
+command_args_foreground="--daemon=no"
+command_args_background="--daemon=yes"
+yesno ${rc_verbose} || command_args_background="${command_args_background} >/dev/null 2>&1"
+
+pidfile="${PDNS_CHROOTDIR}/${PDNS_SOCKETDIR}/pdns${PDNS_INSTANCE:+-${PDNS_INSTANCE}}.pid"
+
+control_command="/usr/bin/pdns_control"
+control_command_args="${command_args}"
+
+depend() {
+ need net
+ use mysql postgresql
+}
+
+status() {
+ default_status || return
+ _ping || return 32
+}
+
+stop() {
+ default_stop || return
+ _ping || return 0
+ wait_for_stop
+}
+
+wait_for_stop() {
+ einfon "Waiting for ${name} to stop"
+
+ local timeout="${PDNS_STOP_TIMEOUT}"
+ while [ "${timeout}" -gt 0 ]; do
+ sleep 1
+ if ! _ping; then
+ echo
+ return 0
+ fi
+ : $(( timeout -= 1 ))
+ printf .
+ done
+
+ echo
+ return 1
+}
+
+dump() {
+ einfo "Dumping ${name} variables"
+ ${control_command} ${control_command_args} list
+}
+
+_ping() {
+ ${control_command} ${control_command_args} rping >/dev/null 2>&1
+}
+
+ping() {
+ ebegin "Pinging ${name}"
+ _ping
+ eend $?
+}
+
+monitor() {
+ einfo "Starting ${name} in monitor mode"
+
+ echo
+ echo '************************************************'
+ echo '* Use "QUIT" or Ctrl-C to end monitoring mode! *'
+ echo '************************************************'
+ echo
+
+ ${command} \
+ ${command_args} \
+ ${command_args_foreground} \
+ --guardian=no \
+ --control-console=yes \
+ --loglevel=9 \
+ --log-dns-details=yes \
+ --query-logging=yes
+ return 0
+}
diff --git a/net-dns/pdns/metadata.xml b/net-dns/pdns/metadata.xml
new file mode 100644
index 000000000000..264c58531540
--- /dev/null
+++ b/net-dns/pdns/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>swegener@gentoo.org</email>
+ <name>Sven Wegener</name>
+ <description>Primary Maintainer</description>
+</maintainer>
+<longdescription>
+The PowerDNS Nameserver is a modern, advanced and high performance authoritative-
+only nameserver. It is written from scratch and conforms to all relevant DNS
+standards documents. Furthermore, PowerDNS interfaces with almost any database.
+</longdescription>
+<use>
+ <flag name="botan">Make it possible to use the <pkg>dev-libs/botan</pkg> library for crypto-related stuff (like DNSSec) which can be significantly faster than PolarSSL.</flag>
+ <flag name="luajit">Enable support for <pkg>dev-lang/luajit</pkg></flag>
+ <flag name="mydns">Making it possible to use a MyDNS MySQL database with PowerDNS (not recommended for new deployments).</flag>
+ <flag name="opendbx">Use a database supported by <pkg>dev-db/opendbx</pkg> as backend.</flag>
+ <flag name="protobuf">Enable support for <pkg>dev-libs/protobuf</pkg>.</flag>
+ <flag name="remote">Use a generic socket or pipe as a backend (via JSON RPC requests).</flag>
+ <flag name="tinydns">Use a TinyDNS CDB database as backend.</flag>
+ <flag name="tools">Build optional tools (dnsscan, dnsscope, etc..).</flag>
+</use>
+</pkgmetadata>
diff --git a/net-dns/pdns/pdns-4.0.2.ebuild b/net-dns/pdns/pdns-4.0.2.ebuild
new file mode 100644
index 000000000000..99bcbba8399b
--- /dev/null
+++ b/net-dns/pdns/pdns-4.0.2.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils multilib user toolchain-funcs versionator
+
+DESCRIPTION="The PowerDNS Daemon"
+HOMEPAGE="https://www.powerdns.com/"
+SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+# other possible flags:
+# db2: we lack the dep
+# oracle: dito (need Oracle Client Libraries)
+# xdb: (almost) dead, surely not supported
+
+IUSE="botan debug doc geoip ldap libressl lua luajit mydns mysql opendbx postgres protobuf remote sqlite systemd tools tinydns test"
+
+REQUIRED_USE="mydns? ( mysql ) ?? ( lua luajit )"
+
+RDEPEND="
+ libressl? ( dev-libs/libressl:= )
+ !libressl? ( dev-libs/openssl:= )
+ >=dev-libs/boost-1.35:=
+ botan? ( =dev-libs/botan-1.10*[threads] )
+ lua? ( dev-lang/lua:= )
+ luajit? ( dev-lang/luajit:= )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:= )
+ ldap? ( >=net-nds/openldap-2.0.27-r4 )
+ sqlite? ( dev-db/sqlite:3 )
+ opendbx? ( dev-db/opendbx )
+ geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip )
+ tinydns? ( >=dev-db/tinycdb-0.77 )
+ protobuf? ( dev-libs/protobuf )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S="${WORKDIR}"/${P/_/-}
+
+src_configure() {
+ local dynmodules="pipe bind" # the default backends, always enabled
+
+ #use db2 && dynmodules+=" db2"
+ use ldap && dynmodules+=" ldap"
+ use lua && dynmodules+=" lua"
+ use mydns && dynmodules+=" mydns"
+ use mysql && dynmodules+=" gmysql"
+ use opendbx && dynmodules+=" opendbx"
+ #use oracle && dynmodules+=" goracle oracle"
+ use postgres && dynmodules+=" gpgsql"
+ use remote && dynmodules+=" remote"
+ use sqlite && dynmodules+=" gsqlite3"
+ use tinydns && dynmodules+=" tinydns"
+ use geoip && dynmodules+=" geoip"
+ #use xdb && dynmodules+=" xdb"
+
+ econf \
+ --disable-static \
+ --sysconfdir=/etc/powerdns \
+ --libdir=/usr/$(get_libdir)/powerdns \
+ --with-modules= \
+ --with-dynmodules="${dynmodules}" \
+ --with-pgsql-includes=/usr/include \
+ --with-pgsql-lib=/usr/$(get_libdir) \
+ --with-mysql-lib=/usr/$(get_libdir) \
+ $(use_enable botan botan1.10) \
+ $(use_enable debug verbose-logging) \
+ $(use_enable test unit-tests) \
+ $(use_enable tools) \
+ $(use_enable systemd) \
+ $(use_with lua) \
+ $(use_with luajit) \
+ $(use_with protobuf) \
+ ${myconf}
+}
+
+src_compile() {
+ default
+ use doc && emake -C codedocs codedocs
+}
+
+src_install() {
+ default
+
+ mv "${D}"/etc/powerdns/pdns.conf{-dist,}
+
+ fperms 0700 /etc/powerdns
+ fperms 0600 /etc/powerdns/pdns.conf
+
+ # set defaults: setuid=pdns, setgid=pdns
+ sed -i \
+ -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \
+ "${D}"/etc/powerdns/pdns.conf
+
+ doinitd "${FILESDIR}"/pdns
+
+ keepdir /var/empty
+
+ use doc && dohtml -r codedocs/html/.
+
+ # Install development headers
+ insinto /usr/include/pdns
+ doins pdns/*.hh
+ insinto /usr/include/pdns/backends/gsql
+ doins pdns/backends/gsql/*.hh
+
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins "${FILESDIR}"/dnsdomain2.schema
+ fi
+
+ prune_libtool_files --all
+}
+
+pkg_preinst() {
+ enewgroup pdns
+ enewuser pdns -1 -1 /var/empty pdns
+}
+
+pkg_postinst() {
+ elog "PowerDNS provides multiple instances support. You can create more instances"
+ elog "by symlinking the pdns init script to another name."
+ elog
+ elog "The name must be in the format pdns.<suffix> and PowerDNS will use the"
+ elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default."
+
+ if use ldap ; then
+ ewarn "The official LDAP backend module is only compile-tested by upstream."
+ ewarn "Try net-dns/pdns-ldap-backend if you have problems with it."
+ fi
+
+ local old
+ for old in ${REPLACING_VERSIONS}; do
+ version_compare ${old} 3.2
+ [[ $? -eq 1 ]] || continue
+
+ ewarn "To fix a security bug (bug #458018) had the following"
+ ewarn "files/directories the world-readable bit removed (if set):"
+ ewarn " ${EPREFIX}/etc/powerdns"
+ ewarn " ${EPREFIX}/etc/powerdns/pdns.conf"
+ ewarn "Check if this is correct for your setup"
+ ewarn "This is a one-time change and will not happen on subsequent updates."
+ chmod o-rwx "${EPREFIX}"/etc/powerdns/{,pdns.conf}
+
+ break
+ done
+}
diff --git a/net-dns/pdns/pdns-4.0.3-r3.ebuild b/net-dns/pdns/pdns-4.0.3-r3.ebuild
new file mode 100644
index 000000000000..2ba5df54f29e
--- /dev/null
+++ b/net-dns/pdns/pdns-4.0.3-r3.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils multilib user toolchain-funcs versionator
+
+DESCRIPTION="The PowerDNS Daemon"
+HOMEPAGE="https://www.powerdns.com/"
+SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# other possible flags:
+# db2: we lack the dep
+# oracle: dito (need Oracle Client Libraries)
+# xdb: (almost) dead, surely not supported
+
+IUSE="botan debug doc geoip ldap libressl lua luajit mydns mysql opendbx postgres protobuf remote sqlite systemd tools tinydns test"
+
+REQUIRED_USE="mydns? ( mysql ) ?? ( lua luajit )"
+
+RDEPEND="
+ libressl? ( dev-libs/libressl:= )
+ !libressl? ( dev-libs/openssl:= )
+ >=dev-libs/boost-1.35:=
+ botan? ( =dev-libs/botan-1.10*[threads] )
+ lua? ( dev-lang/lua:= )
+ luajit? ( dev-lang/luajit:= )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:= )
+ ldap? ( >=net-nds/openldap-2.0.27-r4 )
+ sqlite? ( dev-db/sqlite:3 )
+ opendbx? ( dev-db/opendbx )
+ geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip )
+ tinydns? ( >=dev-db/tinycdb-0.77 )
+ protobuf? ( dev-libs/protobuf )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S="${WORKDIR}"/${P/_/-}
+
+src_configure() {
+ local dynmodules="pipe bind" # the default backends, always enabled
+
+ #use db2 && dynmodules+=" db2"
+ use ldap && dynmodules+=" ldap"
+ use lua && dynmodules+=" lua"
+ use mydns && dynmodules+=" mydns"
+ use mysql && dynmodules+=" gmysql"
+ use opendbx && dynmodules+=" opendbx"
+ #use oracle && dynmodules+=" goracle oracle"
+ use postgres && dynmodules+=" gpgsql"
+ use remote && dynmodules+=" remote"
+ use sqlite && dynmodules+=" gsqlite3"
+ use tinydns && dynmodules+=" tinydns"
+ use geoip && dynmodules+=" geoip"
+ #use xdb && dynmodules+=" xdb"
+
+ econf \
+ --disable-static \
+ --sysconfdir=/etc/powerdns \
+ --libdir=/usr/$(get_libdir)/powerdns \
+ --with-modules= \
+ --with-dynmodules="${dynmodules}" \
+ --with-pgsql-includes=/usr/include \
+ --with-pgsql-lib=/usr/$(get_libdir) \
+ --with-mysql-lib=/usr/$(get_libdir) \
+ $(use_enable botan botan1.10) \
+ $(use_enable debug verbose-logging) \
+ $(use_enable test unit-tests) \
+ $(use_enable tools) \
+ $(use_enable systemd) \
+ $(use_with lua) \
+ $(use_with luajit) \
+ $(use_with protobuf) \
+ ${myconf}
+}
+
+src_compile() {
+ default
+ use doc && emake -C codedocs codedocs
+}
+
+src_install() {
+ default
+
+ mv "${D}"/etc/powerdns/pdns.conf{-dist,}
+
+ fperms 0700 /etc/powerdns
+ fperms 0600 /etc/powerdns/pdns.conf
+
+ # set defaults: setuid=pdns, setgid=pdns
+ sed -i \
+ -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \
+ "${D}"/etc/powerdns/pdns.conf
+
+ newinitd "${FILESDIR}"/pdns-r1 pdns
+
+ keepdir /var/empty
+
+ use doc && dohtml -r codedocs/html/.
+
+ # Install development headers
+ insinto /usr/include/pdns
+ doins pdns/*.hh
+ insinto /usr/include/pdns/backends/gsql
+ doins pdns/backends/gsql/*.hh
+
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins "${FILESDIR}"/dnsdomain2.schema
+ fi
+
+ prune_libtool_files --all
+}
+
+pkg_preinst() {
+ enewgroup pdns
+ enewuser pdns -1 -1 /var/empty pdns
+}
+
+pkg_postinst() {
+ elog "PowerDNS provides multiple instances support. You can create more instances"
+ elog "by symlinking the pdns init script to another name."
+ elog
+ elog "The name must be in the format pdns.<suffix> and PowerDNS will use the"
+ elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default."
+
+ if use ldap ; then
+ ewarn "The official LDAP backend module is only compile-tested by upstream."
+ ewarn "Try net-dns/pdns-ldap-backend if you have problems with it."
+ fi
+
+ local old
+ for old in ${REPLACING_VERSIONS}; do
+ version_compare ${old} 3.2
+ [[ $? -eq 1 ]] || continue
+
+ ewarn "To fix a security bug (bug #458018) had the following"
+ ewarn "files/directories the world-readable bit removed (if set):"
+ ewarn " ${EPREFIX}/etc/powerdns"
+ ewarn " ${EPREFIX}/etc/powerdns/pdns.conf"
+ ewarn "Check if this is correct for your setup"
+ ewarn "This is a one-time change and will not happen on subsequent updates."
+ chmod o-rwx "${EPREFIX}"/etc/powerdns/{,pdns.conf}
+
+ break
+ done
+}
diff --git a/net-dns/pdns/pdns-4.0.3.ebuild b/net-dns/pdns/pdns-4.0.3.ebuild
new file mode 100644
index 000000000000..c7455c660e77
--- /dev/null
+++ b/net-dns/pdns/pdns-4.0.3.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils multilib user toolchain-funcs versionator
+
+DESCRIPTION="The PowerDNS Daemon"
+HOMEPAGE="https://www.powerdns.com/"
+SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# other possible flags:
+# db2: we lack the dep
+# oracle: dito (need Oracle Client Libraries)
+# xdb: (almost) dead, surely not supported
+
+IUSE="botan debug doc geoip ldap libressl lua luajit mydns mysql opendbx postgres protobuf remote sqlite systemd tools tinydns test"
+
+REQUIRED_USE="mydns? ( mysql ) ?? ( lua luajit )"
+
+RDEPEND="
+ libressl? ( dev-libs/libressl:= )
+ !libressl? ( dev-libs/openssl:= )
+ >=dev-libs/boost-1.35:=
+ botan? ( =dev-libs/botan-1.10*[threads] )
+ lua? ( dev-lang/lua:= )
+ luajit? ( dev-lang/luajit:= )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:= )
+ ldap? ( >=net-nds/openldap-2.0.27-r4 )
+ sqlite? ( dev-db/sqlite:3 )
+ opendbx? ( dev-db/opendbx )
+ geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip )
+ tinydns? ( >=dev-db/tinycdb-0.77 )
+ protobuf? ( dev-libs/protobuf )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S="${WORKDIR}"/${P/_/-}
+
+src_configure() {
+ local dynmodules="pipe bind" # the default backends, always enabled
+
+ #use db2 && dynmodules+=" db2"
+ use ldap && dynmodules+=" ldap"
+ use lua && dynmodules+=" lua"
+ use mydns && dynmodules+=" mydns"
+ use mysql && dynmodules+=" gmysql"
+ use opendbx && dynmodules+=" opendbx"
+ #use oracle && dynmodules+=" goracle oracle"
+ use postgres && dynmodules+=" gpgsql"
+ use remote && dynmodules+=" remote"
+ use sqlite && dynmodules+=" gsqlite3"
+ use tinydns && dynmodules+=" tinydns"
+ use geoip && dynmodules+=" geoip"
+ #use xdb && dynmodules+=" xdb"
+
+ econf \
+ --disable-static \
+ --sysconfdir=/etc/powerdns \
+ --libdir=/usr/$(get_libdir)/powerdns \
+ --with-modules= \
+ --with-dynmodules="${dynmodules}" \
+ --with-pgsql-includes=/usr/include \
+ --with-pgsql-lib=/usr/$(get_libdir) \
+ --with-mysql-lib=/usr/$(get_libdir) \
+ $(use_enable botan botan1.10) \
+ $(use_enable debug verbose-logging) \
+ $(use_enable test unit-tests) \
+ $(use_enable tools) \
+ $(use_enable systemd) \
+ $(use_with lua) \
+ $(use_with luajit) \
+ $(use_with protobuf) \
+ ${myconf}
+}
+
+src_compile() {
+ default
+ use doc && emake -C codedocs codedocs
+}
+
+src_install() {
+ default
+
+ mv "${D}"/etc/powerdns/pdns.conf{-dist,}
+
+ fperms 0700 /etc/powerdns
+ fperms 0600 /etc/powerdns/pdns.conf
+
+ # set defaults: setuid=pdns, setgid=pdns
+ sed -i \
+ -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \
+ "${D}"/etc/powerdns/pdns.conf
+
+ doinitd "${FILESDIR}"/pdns
+
+ keepdir /var/empty
+
+ use doc && dohtml -r codedocs/html/.
+
+ # Install development headers
+ insinto /usr/include/pdns
+ doins pdns/*.hh
+ insinto /usr/include/pdns/backends/gsql
+ doins pdns/backends/gsql/*.hh
+
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins "${FILESDIR}"/dnsdomain2.schema
+ fi
+
+ prune_libtool_files --all
+}
+
+pkg_preinst() {
+ enewgroup pdns
+ enewuser pdns -1 -1 /var/empty pdns
+}
+
+pkg_postinst() {
+ elog "PowerDNS provides multiple instances support. You can create more instances"
+ elog "by symlinking the pdns init script to another name."
+ elog
+ elog "The name must be in the format pdns.<suffix> and PowerDNS will use the"
+ elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default."
+
+ if use ldap ; then
+ ewarn "The official LDAP backend module is only compile-tested by upstream."
+ ewarn "Try net-dns/pdns-ldap-backend if you have problems with it."
+ fi
+
+ local old
+ for old in ${REPLACING_VERSIONS}; do
+ version_compare ${old} 3.2
+ [[ $? -eq 1 ]] || continue
+
+ ewarn "To fix a security bug (bug #458018) had the following"
+ ewarn "files/directories the world-readable bit removed (if set):"
+ ewarn " ${EPREFIX}/etc/powerdns"
+ ewarn " ${EPREFIX}/etc/powerdns/pdns.conf"
+ ewarn "Check if this is correct for your setup"
+ ewarn "This is a one-time change and will not happen on subsequent updates."
+ chmod o-rwx "${EPREFIX}"/etc/powerdns/{,pdns.conf}
+
+ break
+ done
+}
diff --git a/net-dns/pdns/pdns-4.0.4.ebuild b/net-dns/pdns/pdns-4.0.4.ebuild
new file mode 100644
index 000000000000..43c8063885e7
--- /dev/null
+++ b/net-dns/pdns/pdns-4.0.4.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils multilib user toolchain-funcs versionator
+
+DESCRIPTION="The PowerDNS Daemon"
+HOMEPAGE="https://www.powerdns.com/"
+SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+# other possible flags:
+# db2: we lack the dep
+# oracle: dito (need Oracle Client Libraries)
+# xdb: (almost) dead, surely not supported
+
+IUSE="botan debug doc geoip ldap libressl lua luajit mydns mysql opendbx postgres protobuf remote sqlite systemd tools tinydns test"
+
+REQUIRED_USE="mydns? ( mysql ) ?? ( lua luajit )"
+
+RDEPEND="
+ libressl? ( dev-libs/libressl:= )
+ !libressl? ( dev-libs/openssl:= )
+ >=dev-libs/boost-1.35:=
+ botan? ( =dev-libs/botan-1.10*[threads] )
+ lua? ( dev-lang/lua:= )
+ luajit? ( dev-lang/luajit:= )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:= )
+ ldap? ( >=net-nds/openldap-2.0.27-r4 )
+ sqlite? ( dev-db/sqlite:3 )
+ opendbx? ( dev-db/opendbx )
+ geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip )
+ tinydns? ( >=dev-db/tinycdb-0.77 )
+ protobuf? ( dev-libs/protobuf )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S="${WORKDIR}"/${P/_/-}
+
+src_configure() {
+ local dynmodules="pipe bind" # the default backends, always enabled
+
+ #use db2 && dynmodules+=" db2"
+ use ldap && dynmodules+=" ldap"
+ use lua && dynmodules+=" lua"
+ use mydns && dynmodules+=" mydns"
+ use mysql && dynmodules+=" gmysql"
+ use opendbx && dynmodules+=" opendbx"
+ #use oracle && dynmodules+=" goracle oracle"
+ use postgres && dynmodules+=" gpgsql"
+ use remote && dynmodules+=" remote"
+ use sqlite && dynmodules+=" gsqlite3"
+ use tinydns && dynmodules+=" tinydns"
+ use geoip && dynmodules+=" geoip"
+ #use xdb && dynmodules+=" xdb"
+
+ econf \
+ --disable-static \
+ --sysconfdir=/etc/powerdns \
+ --libdir=/usr/$(get_libdir)/powerdns \
+ --with-modules= \
+ --with-dynmodules="${dynmodules}" \
+ --with-pgsql-includes=/usr/include \
+ --with-pgsql-lib=/usr/$(get_libdir) \
+ --with-mysql-lib=/usr/$(get_libdir) \
+ $(use_enable botan botan1.10) \
+ $(use_enable debug verbose-logging) \
+ $(use_enable test unit-tests) \
+ $(use_enable tools) \
+ $(use_enable systemd) \
+ $(use_with lua) \
+ $(use_with luajit) \
+ $(use_with protobuf) \
+ ${myconf}
+}
+
+src_compile() {
+ default
+ use doc && emake -C codedocs codedocs
+}
+
+src_install() {
+ default
+
+ mv "${D}"/etc/powerdns/pdns.conf{-dist,}
+
+ fperms 0700 /etc/powerdns
+ fperms 0600 /etc/powerdns/pdns.conf
+
+ # set defaults: setuid=pdns, setgid=pdns
+ sed -i \
+ -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \
+ "${D}"/etc/powerdns/pdns.conf
+
+ newinitd "${FILESDIR}"/pdns-r1 pdns
+
+ keepdir /var/empty
+
+ use doc && dohtml -r codedocs/html/.
+
+ # Install development headers
+ insinto /usr/include/pdns
+ doins pdns/*.hh
+ insinto /usr/include/pdns/backends/gsql
+ doins pdns/backends/gsql/*.hh
+
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins "${FILESDIR}"/dnsdomain2.schema
+ fi
+
+ prune_libtool_files --all
+}
+
+pkg_preinst() {
+ enewgroup pdns
+ enewuser pdns -1 -1 /var/empty pdns
+}
+
+pkg_postinst() {
+ elog "PowerDNS provides multiple instances support. You can create more instances"
+ elog "by symlinking the pdns init script to another name."
+ elog
+ elog "The name must be in the format pdns.<suffix> and PowerDNS will use the"
+ elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default."
+
+ if use ldap ; then
+ ewarn "The official LDAP backend module is only compile-tested by upstream."
+ ewarn "Try net-dns/pdns-ldap-backend if you have problems with it."
+ fi
+
+ local old
+ for old in ${REPLACING_VERSIONS}; do
+ version_compare ${old} 3.2
+ [[ $? -eq 1 ]] || continue
+
+ ewarn "To fix a security bug (bug #458018) had the following"
+ ewarn "files/directories the world-readable bit removed (if set):"
+ ewarn " ${EPREFIX}/etc/powerdns"
+ ewarn " ${EPREFIX}/etc/powerdns/pdns.conf"
+ ewarn "Check if this is correct for your setup"
+ ewarn "This is a one-time change and will not happen on subsequent updates."
+ chmod o-rwx "${EPREFIX}"/etc/powerdns/{,pdns.conf}
+
+ break
+ done
+}
diff --git a/net-dns/pdns/pdns-4.1.0_rc1.ebuild b/net-dns/pdns/pdns-4.1.0_rc1.ebuild
new file mode 100644
index 000000000000..95b9943f9c63
--- /dev/null
+++ b/net-dns/pdns/pdns-4.1.0_rc1.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils multilib user toolchain-funcs versionator
+
+DESCRIPTION="The PowerDNS Daemon"
+HOMEPAGE="https://www.powerdns.com/"
+SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# other possible flags:
+# db2: we lack the dep
+# oracle: dito (need Oracle Client Libraries)
+# xdb: (almost) dead, surely not supported
+
+IUSE="botan debug doc geoip ldap libressl lua luajit mydns mysql opendbx postgres protobuf remote sqlite systemd tools tinydns test"
+
+REQUIRED_USE="mydns? ( mysql ) ?? ( lua luajit )"
+
+RDEPEND="
+ libressl? ( dev-libs/libressl:= )
+ !libressl? ( dev-libs/openssl:= )
+ >=dev-libs/boost-1.35:=
+ botan? ( =dev-libs/botan-1.10*[threads] )
+ lua? ( dev-lang/lua:= )
+ luajit? ( dev-lang/luajit:= )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:= )
+ ldap? ( >=net-nds/openldap-2.0.27-r4 )
+ sqlite? ( dev-db/sqlite:3 )
+ opendbx? ( dev-db/opendbx )
+ geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip )
+ tinydns? ( >=dev-db/tinycdb-0.77 )
+ protobuf? ( dev-libs/protobuf )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S="${WORKDIR}"/${P/_/-}
+
+src_configure() {
+ local dynmodules="pipe bind" # the default backends, always enabled
+
+ #use db2 && dynmodules+=" db2"
+ use ldap && dynmodules+=" ldap"
+ use lua && dynmodules+=" lua"
+ use mydns && dynmodules+=" mydns"
+ use mysql && dynmodules+=" gmysql"
+ use opendbx && dynmodules+=" opendbx"
+ #use oracle && dynmodules+=" goracle oracle"
+ use postgres && dynmodules+=" gpgsql"
+ use remote && dynmodules+=" remote"
+ use sqlite && dynmodules+=" gsqlite3"
+ use tinydns && dynmodules+=" tinydns"
+ use geoip && dynmodules+=" geoip"
+ #use xdb && dynmodules+=" xdb"
+
+ econf \
+ --disable-static \
+ --sysconfdir=/etc/powerdns \
+ --libdir=/usr/$(get_libdir)/powerdns \
+ --with-modules= \
+ --with-dynmodules="${dynmodules}" \
+ --with-mysql-lib=/usr/$(get_libdir) \
+ $(use_enable botan botan1.10) \
+ $(use_enable debug verbose-logging) \
+ $(use_enable test unit-tests) \
+ $(use_enable tools) \
+ $(use_enable systemd) \
+ $(use_with lua) \
+ $(use_with luajit) \
+ $(use_with protobuf) \
+ ${myconf}
+}
+
+src_compile() {
+ default
+ use doc && emake -C codedocs codedocs
+}
+
+src_install() {
+ default
+
+ mv "${D}"/etc/powerdns/pdns.conf{-dist,}
+
+ fperms 0700 /etc/powerdns
+ fperms 0600 /etc/powerdns/pdns.conf
+
+ # set defaults: setuid=pdns, setgid=pdns
+ sed -i \
+ -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \
+ "${D}"/etc/powerdns/pdns.conf
+
+ newinitd "${FILESDIR}"/pdns-r1 pdns
+
+ keepdir /var/empty
+
+ use doc && dohtml -r codedocs/html/.
+
+ # Install development headers
+ insinto /usr/include/pdns
+ doins pdns/*.hh
+ insinto /usr/include/pdns/backends/gsql
+ doins pdns/backends/gsql/*.hh
+
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins "${FILESDIR}"/dnsdomain2.schema
+ fi
+
+ prune_libtool_files --all
+}
+
+pkg_preinst() {
+ enewgroup pdns
+ enewuser pdns -1 -1 /var/empty pdns
+}
+
+pkg_postinst() {
+ elog "PowerDNS provides multiple instances support. You can create more instances"
+ elog "by symlinking the pdns init script to another name."
+ elog
+ elog "The name must be in the format pdns.<suffix> and PowerDNS will use the"
+ elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default."
+
+ if use ldap ; then
+ ewarn "The official LDAP backend module is only compile-tested by upstream."
+ ewarn "Try net-dns/pdns-ldap-backend if you have problems with it."
+ fi
+
+ local old
+ for old in ${REPLACING_VERSIONS}; do
+ version_compare ${old} 3.2
+ [[ $? -eq 1 ]] || continue
+
+ ewarn "To fix a security bug (bug #458018) had the following"
+ ewarn "files/directories the world-readable bit removed (if set):"
+ ewarn " ${EPREFIX}/etc/powerdns"
+ ewarn " ${EPREFIX}/etc/powerdns/pdns.conf"
+ ewarn "Check if this is correct for your setup"
+ ewarn "This is a one-time change and will not happen on subsequent updates."
+ chmod o-rwx "${EPREFIX}"/etc/powerdns/{,pdns.conf}
+
+ break
+ done
+}
diff --git a/net-dns/pdnsd/Manifest b/net-dns/pdnsd/Manifest
new file mode 100644
index 000000000000..80289638fa30
--- /dev/null
+++ b/net-dns/pdnsd/Manifest
@@ -0,0 +1,11 @@
+AUX pdnsd.conf.test 370 SHA256 b37d79771d6be11ec9bedbbd582d905fbe7b0372212de6de9cf242509a34f8d1 SHA512 1882df76c4f3280041b9045b8ae06b929c8c418206270c25b09e604e591a5fb287328af340ec9164fb36c5af8bd2c9216a6a0fdf6eefad3986cc3221880d8138 WHIRLPOOL 00bd58f8cc7be55f1305f31363bf14b4c7f186e25d0f316ef076ef6936c1cb8db1f794c66cae889b7093c9d105bce3fd6fe699adfcd6edfa15b2a3172deb9997
+AUX pdnsd.online.2 568 SHA256 77c3585500a7ccc8f4535300ce5fe1871423cbb2242cc2d22a6ecb0b6c958628 SHA512 d1844e7e21a0f2fb44779604883f21117b8aefa900e842ed079ada0769288416bf288f424a6980f0744b92b0e502af3e578bfcdadc59187f4c4693e306241efb WHIRLPOOL faad847bc08cf856840d1a341b084bb81d466dc2e21c4a3939805c6c793d676fe8cc1906183845d0363a4aa931e38eec72e5d24a60b74d0d3abedbf7093f0452
+AUX pdnsd.rc8 573 SHA256 27b7bd5c0ec3bb026ccd2e47e7ac6f87869a9820bf4ba85a99d7cd4b1a3b826a SHA512 be012cc164301bada209dfa26087eac85735fae2dd82d76e3f1154ba21df122be2be05bc029e9219c69514de4835495aed51dcbb99e19daf3fec75110b5d941c WHIRLPOOL 6b685bfb0fd756ab989cceddb2dfc8aa24bb8c306d73a88e17e0e3a622fdb4873eda4513a8956f9bd44b1655a1415e9f4e28445323e0e92e662ba6df0acedadc
+AUX pdnsd.resolvconf-r1 17538 SHA256 40bdcc876ba8bb86069d52f8023fed468974004f47c235c202ca7eac88aa0fe3 SHA512 22a92df825d560ec03860c1a9a6000f32e19b33ccda0f6412830ebca13499e6d45161267bb30658aa9ed4b5862bae04e304e25358c30ee6d80a9deea90ba989f WHIRLPOOL c6c08c105be3986d1d0c8b86d2cf9f0a36e2608b207ec3db084f46f55dd6f0764d999179133783ac055c75c14542d049f3240cb11036c162eeb5d820811ca3cb
+AUX pdnsd.service 269 SHA256 c0db5c9844b3d882f8c6f22db839006f6616a0690b6bbd6bb4668207590f0e82 SHA512 c1504f52fb30ba197bd3c3450f200f2f274bf73f7a6436bc317ad9affc18e9c5edcb8555913a4aa9c6bf44b935e0c9cd005b4f5b0fd56eed6e11914f63db9ef2 WHIRLPOOL ed8fcdbe4acef862a3faff7322ff8fa4c2ed3923fe3931dfed6887425c52061132022c465f01082b4d76a2f15624ddb9b39886b766817897603853aed93abe1a
+AUX pdnsd.tmpfiles 37 SHA256 db6537c715c0acfd47a4ca64fce3cbb29913705462a0abbb32fdabef38cdab52 SHA512 7beacc66e8504ca0f8e613dfc8ed2479362f1ebc98ffab902622b36c795fe75e176d9f0a330ad74e10a7f7b1597cce068d94eea6511a75b941e42b2458b76df5 WHIRLPOOL f785b6980c7e1748384a4f56f6744263ab28944e42b1741f7ebe1e3e6a5638b8fbcae5f0b4e9295127258908174bfb2ffdf9b01cd89e28d80017f2e156e25e5f
+DIST pdnsd-1.2.9a-par.tar.gz 516061 SHA256 bb5835d0caa8c4b31679d6fd6a1a090b71bdf70950db3b1d0cea9cf9cb7e2a7b SHA512 4fde296642306aa986ddb7cad0b5991bcd397656d93ef4962706276848c7fa62c664a40198e807d029637f116e8000c237d98b91cbbfec5c08b134d8bb3adf81 WHIRLPOOL 9f1f94d6aece1d5cdffe4799e532b1f88217e8d0fef83d097fd03a24a958ad551154efa1f1b719a31315be5e225f33cc7da5c40e3f13a0acba6686e0f6376573
+EBUILD pdnsd-1.2.9a-r1.ebuild 4074 SHA256 7d995cb65f4457e41e0877e80def7e60d4b1e11a014cb450feeba0cc3b429612 SHA512 2378463b4df77ed3cca083e4434ccbec9b1bfebe65a2fbd42acb10a90f1ae22e43e875302fcf5a47c35702b57186a4303234f29b2618d502ee06e75d13d6c554 WHIRLPOOL bd7ea83af46499a82f7ba50ae739f8b9d203b48a75e9ede4bf1abefaff39137bc30b0e324fe862c8fb56ed25c00fbed529fead9388678b552b5dfb85e80e273e
+MISC ChangeLog 3293 SHA256 9cbe441c6561dc27cd5d0beaff85096b9c5d40ce7806c773afb986cd4320b0a1 SHA512 a91c16966a5db04e90335cf481781c58ec86273a4ecce322a13650f72e3ba09685b363fa787693fea6fa43daaa1c9846cf34c6a2822b45b2988bb4c15f0c408f WHIRLPOOL 78a9e341f825ed939da0af2aef396e18169b3658dd67d64b1490c66ea6a9803108e94d0ece625a87cd8d298d98b2837d54befb3eae77aaa09be11b75532d861d
+MISC ChangeLog-2015 19527 SHA256 132d3d9bf183812494f576f7df9ae1e063c5460254cbcf58176608cfd6857f71 SHA512 8740c224e7fc24e363f1606f81416a6db7732c771377dd6f86f72663c8a8890f011ec7c37aeed705e5e28c8c5d5030b08ca3dbe0dc2ea2df1397624801f8f7f6 WHIRLPOOL 410e7635d1824d370a9e128aa5c2e620aacb13ddb85ec139d9f87b5a36fa1b8e2d082fe701086c7c9ee7f39db5d78092e5084264c6e680b60b1a5fce8c5deaac
+MISC metadata.xml 814 SHA256 226bc1a2e634ec4238314651b2243f4222e6c78d5cb00bf6a9737964f8fafc0e SHA512 b5bca37d42c4c50031a968297332e824e2830481903ae4036347ffbf554a0a37efb582d8a52b6bba48a0566db81942b1052aca5ed16bbe248fcec46ea99090a8 WHIRLPOOL 7e7aafc09bfcebb42159cea26f58cc62f9cc6389aee87257fa336bcf9b73efb9e3291e94f00b6966ad3785a12db9a1ce0e9383f67793e580e030cdb320cd4507
diff --git a/net-dns/pdnsd/files/pdnsd.conf.test b/net-dns/pdnsd/files/pdnsd.conf.test
new file mode 100644
index 000000000000..10a5d7abb912
--- /dev/null
+++ b/net-dns/pdnsd/files/pdnsd.conf.test
@@ -0,0 +1,27 @@
+// $Id: pdnsd.conf.in,v 1.4 2000/11/11 20:32:58 thomas Exp $
+
+global {
+ perm_cache=512;
+ cache_dir=;
+ max_ttl=604800;
+ paranoid=on;
+ server_port=33455;
+ server_ip=127.0.0.1;
+ status_ctl=on;
+}
+
+server {
+ ip=
+ timeout=30;
+ interval=30;
+ uptest=ping;
+ ping_timeout=50;
+ purge_cache=off;
+}
+
+source {
+ ttl=86400;
+ owner="localhost.";
+ serve_aliases=on;
+ file="/etc/hosts";
+}
diff --git a/net-dns/pdnsd/files/pdnsd.online.2 b/net-dns/pdnsd/files/pdnsd.online.2
new file mode 100644
index 000000000000..089f4e76e9cc
--- /dev/null
+++ b/net-dns/pdnsd/files/pdnsd.online.2
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/sbin/pdnsd-ctl"
+
+depend() {
+ need pdnsd
+}
+
+wait_for_socket() {
+ local i=0 pdnsd_socket="/var/cache/pdnsd/pdnsd.status"
+ while [ $i -lt 10 ]; do
+ [ -S "${pdnsd_socket}" ] && return 0
+ i=$(($i+1))
+ sleep 1s
+ done
+
+ return 1
+}
+
+start() {
+ wait_for_socket || return 1
+ ebegin "Starting pdnsd-online"
+ ${command} -q server all up
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pdnsd-online"
+ ${command} -q server all down
+ eend $?
+}
diff --git a/net-dns/pdnsd/files/pdnsd.rc8 b/net-dns/pdnsd/files/pdnsd.rc8
new file mode 100644
index 000000000000..1f216fbc2d01
--- /dev/null
+++ b/net-dns/pdnsd/files/pdnsd.rc8
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/run/pdnsd.pid"
+command="/usr/sbin/pdnsd"
+command_args="-s -t -d -p ${pidfile} ${PDNSDCONFIG}"
+extra_started_commands="reload"
+
+depend() {
+ use net
+ provide dns
+}
+
+start_pre() {
+ if [ ! -e /etc/pdnsd/pdnsd.conf ] ; then
+ eerror "You need an /etc/pdnsd/pdnsd.conf file first."
+ eerror "There is a sample in /etc/pdnsd/pdnsd.conf.sample"
+ return 1
+ fi
+}
+
+reload() {
+ ebegin "Reloading pdnsd.conf"
+ /usr/sbin/pdnsd-ctl config
+ eend $?
+}
diff --git a/net-dns/pdnsd/files/pdnsd.resolvconf-r1 b/net-dns/pdnsd/files/pdnsd.resolvconf-r1
new file mode 100644
index 000000000000..edc1c9994f0a
--- /dev/null
+++ b/net-dns/pdnsd/files/pdnsd.resolvconf-r1
@@ -0,0 +1,631 @@
+#!/bin/bash
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# /etc/pdnsd/pdnsd.conf updater
+# Written by Oldrich Jedlicka (oldium.pro@seznam.cz)
+
+# Implementation notes:
+# * The assumptions are same as for other scripts like bind and dnsmasq:
+# - We assume that we are a local dns cache - after all, why would a server
+# use resolvconf?
+# - Now that we have assumed this, we also assume that generic DHCP clients
+# will enter their domains and search domains ONLY in the "search" field
+# in their resolv.confs and VPN clients will put the domain they are for
+# into the domain field only.
+# - This allows pdnsd to forward domains for a specific VPN domain to the
+# VPN nameserver and everything else to the standard name servers.
+#
+# HOW-TO CONFIGURE:
+#
+# To get this working, you need to do only two steps
+#
+# 1. Create a basic configuration of /etc/pdnsd/pdnsd.conf, you can use
+# /etc/pdnsd/pdnsd.conf.example to start.
+#
+# Additional configuration will be created automatically be resolvconf.
+# The generated server sections has labels starting with "resolvconf", so
+#
+# DO NOT USE "resolvconf" IN YOUR LABELS!
+#
+# Check if the status_ctl is set to "on", otherwise the configuration
+# will not be automatically reloaded - see sample config file.
+#
+# You are free to edit automatically created server sections, but always
+# write one option per line. There are few options that are always recreated
+# and your changes in them will be lost. Here is the list (with example
+# values):
+#
+# preset=on;
+# ip="192.168.0.1","192.168.0.2";
+# include=".net",".com";'
+#
+# The exclude directive in "resolvconf" server section is partly recreated.
+# Known (configured) domains in the form ".<domain>" or ".<domain>." are
+# added and removed automatically, unknown domains (also those not in
+# the format above) found in this directive are kept.
+#
+# The sample configuration file /etc/pdnsd/pdnsd.conf prepared to work
+# with resolvconf would look like this:
+#
+#global {
+# perm_cache=2048;
+# run_as="pdnsd";
+# status_ctl = on; # Important to enable status control
+# run_ipv4=on;
+# par_queries=2; # How many servers are probed in parallel
+# interface = "lo"; # Interface on which the pdnsd listens
+#}
+#
+# 2. The last step is to configure dns configuration for /etc/resolv.conf
+# for the lo interface. In Gentoo we set it up like so in /etc/conf.d/net
+#
+# dns_servers_lo=( "127.0.0.1" )
+
+# pdnsd config file
+PDNSDCONFIG="/etc/pdnsd/pdnsd.conf"
+
+# Backup suffix
+BACKUPSUFFIX=".backup"
+
+# Load our variables from resolvconf
+VARS="$(resolvconf -v)"
+eval "${VARS}"
+
+COMMENT='
+# Automatically generated by resolvconf.
+#
+# Following server sections are automatically enabled and disabled.
+#
+# !!! WARNING !!!
+# DO NOT RENAME LABELS!
+#
+# No section will be deleted and only some options are automatically changed.
+# Feel free to add your own options, but do not use pair comments /* */ as they
+# are not recognised.
+#
+# DO NOT USE resolvconf ANYWHERE IN YOUR LABELS!
+#
+# Automatically changed options are (with examples):
+# preset=on;
+# ip="192.168.0.1","192.168.0.2";
+# include=".net",".com";
+# exclude=".domain.net",".domain.com";
+# policy=excluded;
+#
+# The exclude directive is changed automatically only in "resolvconf" server
+# section. Not handled servers are kept in the directive.
+#'
+BASIC_SETTINGS='server {
+ label="resolvconf";
+ preset=off;
+}'
+
+INSTALLATION_CHECK='^[[:space:]]*label[[:space:]]*=[[:space:]]*"resolvconf"'
+
+###
+# Sed script configuration
+#
+# Composed sequence of lines:
+#
+# (1) SED_LOOP with @MATCH_LABELS@ substituted by several SED_MATCH_ONE_LABEL
+# (2) SED_EDIT_ONE_SERVER several times
+# (3) SED_ADDING with new servers
+#
+# Notes:
+#
+# * @LABEL@ is a string "resolvconf-<domain>" or "resolvconf" for global
+# section
+# * @RULE@ is @LABEL@ with translated characters '-' and '.' into '_'.
+###
+
+###
+# Main loop with label match - it will redirect the processing to
+# SED_EDIT_ONE_SERVER, when the label match is found. Special match is
+# for "resolvconf" label - the control flow is redirected to SED_ADDING to
+# allow adding new sections.
+#
+# To summarize: Old sections are edited as they appear in the file and new
+# sections are added before the "resolvconf" section.
+SED_LOOP=\
+'/^[[:space:]]*server[[:space:]]*[\{]/ b server;
+p; d;
+:server; h;
+:server_loop; n;
+/^[[:space:]]*server[[:space:]]*[\{]/ { x; p; b server_loop; };
+@MATCH_LABELS@
+/^[[:space:]]*label[[:space:]]*=[[:space:]]*"resolvconf"/ { H; b adding; };
+/^[[:space:]]*[\}]/ { H; x; p; d; };
+H;
+b server_loop;
+'
+
+###
+# Match for one label with a jump to SED_EDIT_ONE_SERVER
+SED_MATCH_ONE_LABEL=\
+'/^[[:space:]]*label[[:space:]]*=[[:space:]]*"@LABEL@"/ { H; x; b main_@RULE@; };
+'
+
+###
+# Editing one server. New lines are put into @SETUP@, lines are composed
+# in function compose_lines(). After the new lines are added, all "preset",
+# "ip" and "include" options are removed (not printed).
+#
+# Sanity checks: Check if there is a second label or another server directive.
+# In both cases, there is some error in the file, so go to the beginning by
+# jumping to SED_LOOP's :server.
+SED_EDIT_ONE_SERVER=\
+':main_@RULE@;
+p; @SETUP@
+:loop_@RULE@;
+n;
+/^[[:space:]]*server[[:space:]]*[\{]/ b server;
+/^[[:space:]]*label[[:space:]]*=/ b server;
+/^[[:space:]]*preset[[:space:]]*=/ b loop_@RULE@;
+/^[[:space:]]*ip[[:space:]]*=/ b loop_@RULE@;
+/^[[:space:]]*include[[:space:]]*=/ b loop_@RULE@;
+/^[[:space:]]*policy[[:space:]]*=/ b loop_@RULE@;
+/^[[:space:]]*exclude[[:space:]]*=/ b exclude_logic_@RULE;
+p;
+/^[[:space:]]*[\}]/ d;
+b loop_@RULE@;
+
+:exclude_logic_@RULE;
+@EXCLUDE_LOGIC@
+b loop_@RULE@;
+'
+
+###
+# Add new servers. All lines composed by function compose_lines() are put into
+# @SETUP@. Then the control flow is returned to one special SED_EDIT_ONE_SERVER
+# section with label "resolvconf".
+SED_ADDING=\
+':adding;
+@SETUP@
+x; b main_resolvconf;
+'
+
+
+###
+# Edit the domain list (include/exclude). All empty fields and matching domains
+# are removed. Unmaintained domains (not in resolvconf-<domain>) are kept. All
+# domains should be in a pipe (|) separated list and should begin, but not end
+# with a dot. The list is put into @DOMAINS@. The control flow continues, where
+# it ended in SED_EDIT_ONE_SERVER.
+#
+SED_DOMAIN_LIST_LOGIC=\
+'h;
+s/^([[:space:]]*@DIRECTIVE@[[:space:]]*=[[:space:]]*).*/\\1/;
+x;
+s/^[[:space:]]*@DIRECTIVE@[[:space:]]*=[[:space:]]*//;
+
+:@DIRECTIVE@_loop_@RULE@;
+/([[:space:]]*("[^"]"*|[^,;]*)[[:space:]]*,)*[[:space:]]*("(@DOMAINS@|)\.?"|(@DOMAINS@)\.?|,)[[:space:]]*[,;]/ {
+ s/(([[:space:]]*("[^"]"*|[^,;]*)[[:space:]]*,)*[[:space:]]*)("(@DOMAINS@|)\.?"|(@DOMAINS@)\.?|,)[[:space:]]*([,;])/\\1\\7/;
+ b @DIRECTIVE@_loop_@RULE@;
+};
+
+s/^[,;]//g;
+/^[[:space:]]*$/ b @DIRECTIVE@_end_@RULE@;
+H; x; s/\\n//; p;
+:@DIRECTIVE@_end_@RULE@;
+'
+
+################################################################################
+# Functions
+
+###
+# char* [] uniqify(char* list[])
+#
+# Uniqify the items in the list
+uniqify() {
+ local result=
+ while [ -n "$1" ] ; do
+ case " ${result} " in
+ *" $1 "*) ;;
+ *) result="${result} $1" ;;
+ esac
+ shift
+ done
+ echo "${result# *}"
+}
+
+###
+# char *make_pdnsd_label(char *domain)
+#
+# Translate domain name into pdnsd's label
+make_pdnsd_label() {
+ local domain=$1
+ if [[ -n ${domain} ]] ; then
+ echo -n "resolvconf-${domain}"
+ else
+ echo -n "resolvconf"
+ fi
+}
+
+###
+# char *make_sed_label(char *pdnsd_label)
+#
+# Translate pdnsd's label into sed's label
+make_sed_label() {
+ local label="$1"
+ label="${label//-/_}"
+ label="${label//./_}"
+ echo -n "${label}"
+}
+
+# char *compose_lines(...)
+#
+# Compose a sed command that prints lines
+compose_lines() {
+ local line result
+ for line in "$@" ; do
+ result="${result}i\\\\\\n${line// /\\t}\\n"
+ done
+ echo "${result}"
+}
+
+###
+# char *build_settings(char *nameservers, char *domains, char *directive)
+#
+# Builds configuration part @SETUP@ of sed script. The directive parameter denotes
+# if the domains are to be included ("include") or excluded ("exclude"). This
+# involves options like
+#
+# (1) # [nameserver list is empty]
+# preset=off;
+#
+# (2) # [domain list is empty]
+# preset=on;
+# ip="address","address"...;
+#
+# (3) # [directive=="include"]
+# preset=on;
+# ip="address","address"...;
+# include=".domain.",".domain."...;
+# policy=excluded;
+#
+# (4) # [directive=="exclude"]
+# preset=on;
+# ip="address","address"...;
+# exclude=".domain.",".domain."...;
+# policy=included;
+#
+# Note: Currently there will always be only one domain in "include" directive.
+#
+build_settings() {
+ local ns="$1" domains="$2" directive="$3"
+ if [[ -n ${ns} ]] ; then
+ local x list_ns list_domains
+ for x in ${ns} ; do
+ list_ns="${list_ns},\"${x}\""
+ done
+ list_ns="${list_ns#,}"
+ if [[ -n ${domains} ]] ; then
+ for x in ${domains} ; do
+ list_domains="${list_domains},\".${x}.\""
+ done
+ list_domains="${list_domains#,}"
+ if [[ $directive == "include" ]]; then
+ compose_lines \
+ " preset=on;" \
+ " ip=${list_ns};" \
+ " include=${list_domains};" \
+ " policy=excluded;"
+ else
+ compose_lines \
+ " preset=on;" \
+ " ip=${list_ns};" \
+ " exclude=${list_domains};" \
+ " policy=included;"
+ fi
+ else
+ compose_lines \
+ " preset=on;" \
+ " ip=${list_ns};"
+ fi
+ else
+ compose_lines \
+ " preset=off;"
+ fi
+}
+
+###
+# char *build_match_labels(char *domains...)
+#
+# Build the label match part of the sed script
+#
+build_match_labels() {
+ local domain result label destination new_match
+ for domain in "$@" ; do
+ label="$(make_pdnsd_label "${domain}")"
+ rule="$(make_sed_label "${label}")"
+ new_match="${SED_MATCH_ONE_LABEL//@LABEL@/${label}}"
+ new_match="${new_match//@RULE@/${rule}}"
+ result="${result}${new_match}"
+ done
+ echo "${result}"
+}
+
+###
+# char *build_domain_list_logic(char *domains, char *directive)
+#
+# Build a logic for changing (removing) domains from a directive.
+#
+build_domain_list_logic() {
+ local domains="$1" directive="$2"
+ local x domain_list logic
+
+ # Domains should be pipe separated list
+ for x in ${domains}; do
+ x=".${x%.}"
+ x="${x//./\.}"
+ domain_list="${domain_list}|${x}"
+ done
+ domain_list="${domain_list#|}"
+
+ if [[ -z ${domain_list} ]]; then
+ logic="p;"
+ else
+ logic="${SED_DOMAIN_LIST_LOGIC//@DOMAINS@/${domain_list}}"
+ logic="${logic//@DIRECTIVE@/${directive}}"
+ fi
+ echo "${logic}"
+}
+
+###
+# char *build_edit_part(char *domain, char *nameservers, \
+# char *add_domains, char *remove_domains,
+# char *directive)
+#
+# Build edit part of the sed script for a particular domain. Domain can be
+# empty in the case it is the "resolvconf" server part.
+#
+build_edit_part() {
+ local domain="$1" nameservers="$2" add_domains="$3" remove_domains="$4"
+ local directive="$5"
+ local setup label rule logic result
+
+ setup="$(build_settings "${nameservers}" "${add_domains}" "${directive}")"
+ label="$(make_pdnsd_label "${domain}")"
+ rule="$(make_sed_label "${label}")"
+ logic="$(build_domain_list_logic "${remove_domains}" "${directive}")"
+ result="${SED_EDIT_ONE_SERVER//@SETUP@/${setup}}"
+ result="${result//@EXCLUDE_LOGIC@/${logic}}"
+ result="${result//@RULE@/${rule}}"
+ echo "${result}"
+}
+
+###
+# char *get_domain_nameservers(char *domain, char *domain_config...)
+#
+# Get the list of nameservers belonging to one particular domain.
+#
+# Domain configuration is a space separated list of pair <domain>,<ip>.
+#
+get_domain_nameservers() {
+ local domain="$1" ns
+ shift
+ for x in "$@" ; do
+ if [[ ${x%,*} == ${domain} ]] ; then
+ ns="${ns} ${x#*,}"
+ fi
+ done
+ ns="$(uniqify ${ns})"
+ echo -n "${ns}"
+}
+
+###
+# char *build_domain_edit_part(char *domain, char *domain_config...)
+#
+# Parse the list of domain configurations and build settings for one particular
+# domain for the sed script.
+#
+# Domain configuration is a space separated list of pair <domain>,<ip>.
+#
+build_domain_edit_part() {
+ local domain="$1" ns
+ shift
+ ns="$(get_domain_nameservers "${domain}" "$@")"
+ build_edit_part "${domain}" "${ns}" "${domain}" "" "include"
+}
+
+###
+# char *build_add_part(char *add, char *domains...)
+#
+# Build add part of the sed script for all domains that needs to be added
+#
+build_add_part() {
+ local add="$1" x label rule add_part new_part result
+ shift
+ for x in ${add} ; do
+ local domain="${x}" ns
+ ns="$(get_domain_nameservers "${domain}" "$@")"
+ label="$(make_pdnsd_label "${domain}")"
+ rule="$(make_sed_label ${label})"
+ new_part="$(compose_lines "server {" " label=\"${label}\";")"
+ new_part="${new_part}$(build_settings "${ns}" "${domain}" "include")"
+ new_part="${new_part}$(compose_lines "}" "")"
+ add_part="${add_part}${new_part}"
+ done
+ result="${SED_ADDING//@SETUP@/${add_part}}"
+ echo "${result}"
+}
+
+###
+# char *build_sed_script(char *nameservers, char *domain_config,
+# char *change, char *add,
+# char *active_domains, char *known_domains)
+#
+# Build the full sed script from the list of nameservers, list of domains
+# (in format <domain>,<ip>), list of changed domains, list of added domains,
+# list of activly used domains and a list of all known domains.
+#
+build_sed_script() {
+ local ns="$1" domain_config="$2" change="$3" add="$4"
+ local active_domains="$5" known_domains="$6"
+
+ local match_labels="$(build_match_labels ${change})"
+
+ local edit_changed x
+ for x in ${change} ; do
+ edit_changed="${edit_changed}$( \
+ build_domain_edit_part "${x}" ${domain_config})"
+ done
+ edit_changed="${edit_changed}$( \
+ build_edit_part "" "${ns}" "${active_domains}" "${known_domains}" "exclude")"
+
+ local added
+ added="$(build_add_part "${add}" ${domain_config})"
+
+ local full
+ full="${SED_LOOP//@MATCH_LABELS@/${match_labels}}"
+ echo -ne "${full}"
+ echo -ne "${edit_changed}"
+ echo -ne "${added}"
+}
+
+###
+# char *read_configured_domains(char *config_file)
+#
+# Reads labels of servers starting with resolvconf* from the configuration file.
+#
+read_configured_domains() {
+ local config_file="$1" result
+ result="\
+ $(sed -nre 's/^[[:space:]]+label=\"?resolvconf-([^;\"]*)\";.*/\1/p' \
+ ${config_file})"
+ echo -n "${result}"
+}
+
+###
+# void installation_check(char *config_file)
+#
+# Check if the pdnsd is installed and can be configured. Prepare also the file
+# for resolvconf.
+#
+installation_check() {
+ local config_file="$1"
+ if [[ -e ${config_file} ]] ; then
+ if ! grep ${INSTALLATION_CHECK} ${config_file} &>/dev/null ; then
+ echo -e "${COMMENT}" >> ${config_file}
+ echo -e "\n${BASIC_SETTINGS}" >> ${config_file}
+ fi
+ return 0
+ else
+ return 1
+ fi
+}
+
+###
+# void initialization(char *config_file)
+#
+# Setup basic variables NAMESERVERS, DOMAINS an CONFIGURED_DOMAINS
+#
+initialization() {
+ local config_file="$1"
+
+ for N in ${NEWNS} ; do
+ NAMESERVERS="${NAMESERVERS} ${N}"
+ done
+
+ for N in ${NEWSEARCH} ; do
+ NAMESERVERS="${NAMESERVERS} ${N#*,}"
+ done
+
+ for DN in ${NEWDOMAIN} ; do
+ DOMAINS="${DOMAINS} ${DN%,*}"
+ done
+
+ CONFIGURED_DOMAINS=$(read_configured_domains ${config_file})
+
+ NAMESERVERS=$(uniqify ${NAMESERVERS})
+ DOMAINS=$(uniqify ${DOMAINS})
+ CONFIGURED_DOMAINS=$(uniqify ${CONFIGURED_DOMAINS})
+}
+
+###
+# void find_changed_and_added(char *configured, char *domains)
+#
+# Find already configured and newly added domains. Sets variables
+# CHANGE_DOMAINS, ADD_DOMAINS and KNOWN_DOMAINS.
+#
+find_changed_and_added() {
+ local configured="$1" domains="$2" x
+
+ KNOWN_DOMAINS="${CONFIGURED_DOMAINS} ${DOMAINS}"
+
+ # Find what has to be disabled
+ for x in ${configured} ; do
+ if [[ " ${domains} " != *" ${x} "* ]] ; then
+ CHANGE_DOMAINS="${CHANGE_DOMAINS} ${x}"
+ fi
+ done
+
+ # Find what has to be added
+ for x in ${domains} ; do
+ if [[ " ${configured} " != *" ${x} "* ]] ; then
+ ADD_DOMAINS="${ADD_DOMAINS} ${x}"
+ else
+ CHANGE_DOMAINS="${CHANGE_DOMAINS} ${x}"
+ fi
+ done
+
+ ADD_DOMAINS=$(uniqify ${ADD_DOMAINS})
+ CHANGE_DOMAINS=$(uniqify ${CHANGE_DOMAINS})
+ KNOWN_DOMAINS=$(uniqify ${KNOWN_DOMAINS})
+}
+
+###
+# bool make_configuration_change(char *config_file, char *backup_suffix,
+# char *sed_script)
+#
+# Applies any configuration change. Returns true, if there was a change.
+#
+make_configuration_change() {
+ local config_file="$1" backup_suffix="$2" sed_script="$3"
+ local old_config new_config
+
+ old_config=$(< ${config_file})
+
+ # Sanity check: add '}' at the end of the file
+ new_config=$( (echo -n "${old_config}" && echo -ne "\n}" ) | \
+ sed -nre "${sed_script}")
+ # Now remove what we added
+ new_config=${new_config%?\}}
+
+ if [[ "${old_config}" != "${new_config}" ]] ; then
+ cp ${config_file} ${config_file}${backup_suffix}
+ echo "${new_config}" > "${config_file}"
+ return 0
+ else
+ return 1
+ fi
+}
+
+################################################################################
+# Main part
+
+# Check, if pdnsd configuration file is installed and possibly prepare it
+installation_check "${PDNSDCONFIG}" || exit 0
+
+# Basic initialization of NAMESERVERS, DOMAINS and CONFIGURED_DOMAINS
+initialization "${PDNSDCONFIG}"
+
+find_changed_and_added "${CONFIGURED_DOMAINS}" "${DOMAINS}"
+
+sed_script="$(build_sed_script "${NAMESERVERS}" "${NEWDOMAIN}" \
+ "${CHANGE_DOMAINS}" "${ADD_DOMAINS}" \
+ "${DOMAINS}" "${KNOWN_DOMAINS}")"
+
+# Check if the config changed
+if make_configuration_change "${PDNSDCONFIG}" "${BACKUPSUFFIX}" "${sed_script}" ; then
+ # Checks for running pdnsd
+ [ -x /usr/sbin/pdnsd-ctl ] || exit 0
+ [ -e /var/cache/pdnsd/pdnsd.status ] || exit 0
+
+ # Reload config files
+ /usr/sbin/pdnsd-ctl config &>/dev/null
+fi
+
+exit 0
diff --git a/net-dns/pdnsd/files/pdnsd.service b/net-dns/pdnsd/files/pdnsd.service
new file mode 100644
index 000000000000..d1812a53b384
--- /dev/null
+++ b/net-dns/pdnsd/files/pdnsd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=pdnsd private name-server cache daemon
+After=syslog.target network.target auditd.service
+ConditionPathExists=/etc/pdnsd/pdnsd.conf
+
+[Service]
+ExecStart=/usr/sbin/pdnsd -s -t
+ExecReload=/usr/sbin/pdnsd-ctl config
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/pdnsd/files/pdnsd.tmpfiles b/net-dns/pdnsd/files/pdnsd.tmpfiles
new file mode 100644
index 000000000000..dc538151fe32
--- /dev/null
+++ b/net-dns/pdnsd/files/pdnsd.tmpfiles
@@ -0,0 +1 @@
+d /var/cache/pdnsd 750 pdnsd pdnsd -
diff --git a/net-dns/pdnsd/metadata.xml b/net-dns/pdnsd/metadata.xml
new file mode 100644
index 000000000000..1198baddd17c
--- /dev/null
+++ b/net-dns/pdnsd/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <longdescription>
+ A proxy DNS server with permanent caching (the cache contents are
+ written to hard disk on exit) that is designed to cope with
+ unreachable or down DNS servers (for example in dial-in
+ networking).
+ </longdescription>
+ <use>
+ <flag name="isdn">
+ Linux-only: check status of ippp interfaces with ISDN-specific
+ system calls.
+ </flag>
+ <flag name="urandom">
+ Linux-only: use /dev/urandom (pseudo-random number generation)
+ instead of the default use of random() PRNG.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/pdnsd/pdnsd-1.2.9a-r1.ebuild b/net-dns/pdnsd/pdnsd-1.2.9a-r1.ebuild
new file mode 100644
index 000000000000..67ce6e471960
--- /dev/null
+++ b/net-dns/pdnsd/pdnsd-1.2.9a-r1.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit systemd user
+
+DESCRIPTION="Proxy DNS server with permanent caching"
+HOMEPAGE="http://members.home.nl/p.a.rombouts/pdnsd/"
+SRC_URI="http://members.home.nl/p.a.rombouts/pdnsd/releases/${P}-par.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ppc ~s390 sparc x86"
+IUSE="debug ipv6 isdn +urandom test"
+
+RDEPEND=""
+DEPEND="test? ( net-dns/bind-tools )"
+
+pkg_setup() {
+ enewgroup pdnsd
+ enewuser pdnsd -1 -1 /var/lib/pdnsd pdnsd
+}
+
+src_configure() {
+ local myconf=""
+ use debug && myconf="${myconf} --with-debug=3"
+ use urandom && myconf="${myconf} --with-random-device=/dev/urandom"
+
+ econf \
+ --disable-dependency-tracking \
+ --sysconfdir=/etc/pdnsd \
+ --with-cachedir=/var/cache/pdnsd \
+ --with-default-id=pdnsd \
+ $(use_enable ipv6) $(use_enable ipv6 ipv6-startup) \
+ $(use_enable isdn) \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS ChangeLog* NEWS README THANKS TODO README.par
+ docinto contrib ; dodoc contrib/{README,dhcp2pdnsd,pdnsd_dhcp.pl}
+ docinto html ; dohtml doc/html/*
+ docinto txt ; dodoc doc/txt/*
+ newdoc doc/pdnsd.conf pdnsd.conf.sample
+
+ newinitd "${FILESDIR}/pdnsd.rc8" pdnsd
+ newinitd "${FILESDIR}/pdnsd.online.2" pdnsd-online
+ systemd_newtmpfilesd "${FILESDIR}/pdnsd.tmpfiles" pdnsd.conf
+ systemd_dounit "${FILESDIR}/pdnsd.service"
+
+ mkdir "${T}"/confd || die
+
+ cat - > "${T}"/confd/pdnsd-online <<EOF
+# Make sure to change the rc_need variable to the service for the
+# interface that connects you to the dns servers.
+#
+# For instance if you use a PPP connection on ppp0 to connect, set
+# rc_need="net.ppp0"
+
+rc_need="net.lo"
+EOF
+
+ # Don't try to do the smart thing and add the --help output here:
+ # it will cause the file to be etc-updated if the help text
+ # changes and fails when cross-compiling.
+ cat - > "${T}"/confd/pdnsd <<EOF
+# Command line options, check pdnsd --help for a list of valid
+# parameters. Note that most of the options that can be given at
+# command-line are also available as configuration parameters in
+# /etc/pdnsd/pdnsd.conf
+PDNSDCONFIG=""
+EOF
+
+ doconfd "${T}"/confd/*
+
+ # gentoo resolvconf support
+ exeinto /etc/resolvconf/update.d
+ newexe "${FILESDIR}/pdnsd.resolvconf-r1" pdnsd
+}
+
+src_test() {
+ fail_kill() {
+ kill -9 $(<"${T}"/pid)
+ die "$1"
+ }
+
+ mkdir "${T}/pdnsd" || die
+ echo -n -e "pd12\0\0\0\0" > "${T}/pdnsd/pdnsd.cache"
+ IPS=$(grep ^nameserver /etc/resolv.conf | sed -e 's/nameserver \(.*\)/\tip=\1;/g' | xargs)
+ sed -e "s/\tip=/${IPS}/" -e "s:cache_dir=:cache_dir=${T}/pdnsd:" "${FILESDIR}/pdnsd.conf.test" \
+ > "${T}/pdnsd.conf.test"
+ src/pdnsd -c "${T}/pdnsd.conf.test" -g -s -d -p "${T}/pid" || die "couldn't start daemon"
+ sleep 3
+
+ find "${T}" -ls
+ [ -s "${T}/pid" ] || die "empty or no pid file created"
+ [ -S "${T}/pdnsd/pdnsd.status" ] || fail_kill "no socket created"
+ src/pdnsd-ctl/pdnsd-ctl -c "${T}/pdnsd" server all up || fail_kill "failed to start the daemon"
+ src/pdnsd-ctl/pdnsd-ctl -c "${T}/pdnsd" status || fail_kill "failed to communicate with the daemon"
+ sleep 3
+
+ dig @127.0.0.1 -p 33455 localhost > "${T}"/dig.output 2>&1
+ cat "${T}"/dig.output || die
+ fgrep -q "status: NOERROR" "${T}"/dig.output || fail_kill "www.gentoo.org lookup failed"
+
+ kill $(<"${T}/pid") || fail_kill "failed to terminate daemon"
+}
+
+pkg_postinst() {
+ elog
+ elog "Add pdnsd to your default runlevel - rc-update add pdnsd default"
+ elog ""
+ elog "Add pdnsd-online to your online runlevel."
+ elog "The online interface will be listed in /etc/conf.d/pdnsd-online"
+ elog ""
+ elog "Sample config file in /etc/pdnsd/pdnsd.conf.sample"
+
+ # The tmpfiles.d configuration does not come into effect before the
+ # next reboot so create the cachedir now.
+ local cachedir="/var/cache/pdnsd"
+ if [[ ! -d ${cachedir} ]] ; then
+ mkdir ${cachedir} || eerror "Failed to create cache"
+ fi
+ chown pdnsd:pdnsd ${cachedir} \
+ || eerror "Failed to set ownership for cachedir"
+ chmod 0750 ${cachedir} \
+ || eerror "Failed to set permissions for cachedir"
+}
diff --git a/net-dns/rbldnsd/Manifest b/net-dns/rbldnsd/Manifest
new file mode 100644
index 000000000000..769c115d8230
--- /dev/null
+++ b/net-dns/rbldnsd/Manifest
@@ -0,0 +1,11 @@
+AUX confd-0.997a 1375 SHA256 10930e7738de72c588182b84a4db5c574948ccc870308de175d2e9b3edd52db9 SHA512 c26f561a0906704c8eb32d8748428b120489cb02d0c9b5ea814b7b4eb71e2ccdddc153d442ebcc46789e65c8c3aa3a305bbf56e6030f3b9994c6d7d247120669 WHIRLPOOL cff5b0a6cf15baa12c49e9d43674302511900afe502dff5a197a8048eddd3812892e4a8633665b854152bb5b00a9d276fca7463d2356bafd884b837dfb8a2075
+AUX initd-0.997a 546 SHA256 261449b46c659b3e8fafad2572cec7ee42b5a36a9600820bf06cd7a697ac2a2d SHA512 2d18c5126ee1cf79e45881cf358f9d9299387dc1b2c0ee2433f85f617694ba11fb2c80703c18002995dc3d1f3d9d561b9b473a9c705b5b0c8ff282385b2e3170 WHIRLPOOL aa79aa99e1db25835ea88089005d7bbab1b62c748cb37f2c01c16dd68d9d2b5726764905d83ce27e0a5466c5c90b86bf1addd2c7fef9d00735d3a6c6db3cab94
+AUX rbldnsd-0.997a-format-security-compile-fix.patch 914 SHA256 13d806d81dcae2038e1b8542fc0ed19cdd8b42d6be48ab11ff181a1d9cd551d4 SHA512 fe61d08ca56759cbce9e078576b3efd4e0bfa35108ca3921d9aa02d78d8e5fc8bae4ea4c38cc9695379ea28f058facf70978c8aa5ecc7d53742222a28dcbc166 WHIRLPOOL 8e8c8092725adab1a2b7663e04719b876bded4ca7d0c2b9c8e7d2cf1c550a63f2fffa872230ff545a472df190ae9fe1f8e3ca6728f329c30eaaa679e7cbd95a4
+AUX rbldnsd-0.997a-robust-ipv6-test-support.patch 10867 SHA256 92c21510d898b0f8e48ee9b53fd59dcd1386b6c446ba92859d7189a78f989420 SHA512 a502df0c102a92dbccba482741ef628cde409f6d87d8467b66a0e4f595f8b28b9e99db0832ca27e3dbf317018b33f666b8bb8962988177cfaf1e0d28b6bf21d6 WHIRLPOOL e703fd7a7e471a67e9e43156257bbc421eb6728f6d60f25774397eae60030f143d0265a1f8f85c6f5913deced5fa274111662d865bff11dfc1bae635054b555a
+AUX rbldnsd-0.998-fix-huge-zone-OOM.patch 1659 SHA256 d99bb2117552ca8a60a65854122a4864b8e4bab7f17d633372ea0f67a68b9303 SHA512 2342d29322e6a5b726319a60c54a7f8d19b020e3dfc8a9d236ac7b6a55d9755b9afe1505c2f835604016fb899630074090baa737b2d3a24f7b4d4e4d911b0443 WHIRLPOOL 6d69d9f51a4eb7ae8907995b40da138995637a40aa6d96e793b2269ee2a56c52f396df4f604d4add59964a6eda3aef2aab51657a6ed291aa3cc5de006ea10263
+DIST rbldnsd-0.998.tar.gz 145363 SHA256 bc36082d46828ecdc0c9e3f8f009596746e1242b2b4002ab9cf9b93fe36e4924 SHA512 7b6fb106f8188b2ce6e05b622cf90a393a4642f00faa5bddc184ce02dbd2beee9d8de22cb09ae53a25c475f28f99d13fbf6252f0d4c1d72bf47ba23f769e7074 WHIRLPOOL 27165b85c85de5cd4db65979a093104d2f614af8163f10d65b5ac28eb443d4b9584ac5501314b8c3a8df3d730a0658f8cf88b0d6eb35efb9f3a17f25fc0ed49a
+EBUILD rbldnsd-0.998-r2.ebuild 1568 SHA256 d6ea19d5b81951dc132a40a2049abd5523c0e1f9915bc4c43ab342ca6825167d SHA512 4d027da14375e3d51a9fa8d9bc10697996c5ff5a68ba75d322c02b7ee8ddce062f993cec3ca2070fbd6d8f2d8452c99529e7d5b7e9a771b34dde110c43298b76 WHIRLPOOL 9702b468b489a9c28b2ae0ed3326ebeb6bb853cf3001e0849bf17e77d8b8f6fb8c5163b8da1babfc1eb7e1e781c2283e7124f6f5e507b3988d6590e1df9ac7de
+EBUILD rbldnsd-0.998.ebuild 1550 SHA256 25833302a1be2613b06195ffec8cdb25c65131b429eef37fd1594493b88ab5df SHA512 0035d4f3a4119a03cb7f102ae63a25ef09d85e216dae8fd847a050b670ac281b624fa4873fe6d4cc0454c4e67d891748509a4f0f2180bdb932def5ccc7aa999a WHIRLPOOL 788f38ab5a02fdf0e0a0d547a94455fb7ea787b7cde465c7832a1e0ab7765426af25ba10752b890d5a347a91010e04bbc7a49183b62afa2e6b46411caf190e4e
+MISC ChangeLog 4565 SHA256 446438d603a79732de9cda4fe955bedaa948b11285210ec6c12d860f6e04a6b1 SHA512 102b574f07561e982dc37b82e789ffea2a24620627db1b1c907de45a0237b9b4cac43633b788ae2da3de2d2bf1a693b74c33d25a02a7bcc6e8fee6f0fc5ff770 WHIRLPOOL 780a2d43fb134a3d53340f84396dbe83c096ea394ad04b4c24b8cab3ef8ab88f94449ae4497951f9018d775aed04fd16db84c81c5954124497d375e74067634a
+MISC ChangeLog-2015 5316 SHA256 a8577ca1e2b89d26e3e133ed9b627023fdc233d0bb0af0047fba8e53825813a4 SHA512 ab98f85ba061e41fc5f741616eadee8fc61336aa63e67eaf110f1e29321c5f8da9d96bdbca01a5a3d96b6e4ab6549669b545d661142002143bc9a51d39bdad7a WHIRLPOOL 1c8ae5813c96550c6c1f71cbcebce8d5bcc4b9fab43116eb8e8afd83bd5a6bfe49f7139e0b28494c1869bab6ce00b63643e5d581270ed685572b92bd6a96f4db
+MISC metadata.xml 1219 SHA256 272c19796e1dd176a3960826d7a1695d5174335eced7d485a1aee158c79a6317 SHA512 23bddced94702b936cadbaf9a6a51cfd8506715a766cbef9dbb0fb69bf02443e0c8636b6237f98fd3922d0c43fb17c7c2850074e6bdefc2c9af3731a01971f8f WHIRLPOOL 865fbc0a2307a65405fb70a08e8be7085f18535a99570b709a1818c541cfc10e33858fffe66d2522ef11709ff8f8f6e8e9030cf988a1fc0be45c9c97892b5143
diff --git a/net-dns/rbldnsd/files/confd-0.997a b/net-dns/rbldnsd/files/confd-0.997a
new file mode 100644
index 000000000000..e7abb81fbc78
--- /dev/null
+++ b/net-dns/rbldnsd/files/confd-0.997a
@@ -0,0 +1,35 @@
+# A whitespace-separated list of addresses on which to listen. The
+# syntax is "host/port", where the port defaults to 53.
+#
+# Note that by default the rbldnsd init script does not require any
+# interfaces other than lo to be "up" (see bug #439092). So if you
+# LISTEN on a non-loopback interface, you should specify a dependency
+# on that interface using rc_need. An example is given below assuming
+# that net.lan0 provides 192.168.0.1.
+#
+# rc_need="net.lan0"
+#
+# LISTEN="127.0.0.1
+# 192.168.0.1/5353"
+#
+LISTEN="localhost"
+
+
+# A whitespace-separated list of RBL zones. For the correct syntax, please
+# see the rbldnsd(8) man page. The following $ZONES will look for
+# files named "badguys.example.com" and "spammers.example.net" (in the
+# appropriate format) under /var/db/rbldnsd, and use those same names
+# for the blacklists contained therein.
+ZONES="badguys.example.com:ip4set:badguys.example.com
+ spammers.example.net:ip4tset:spammers.example.net"
+
+
+# Add any additional options for the rbldnsd daemon below. The -a and
+# -vv below are suggested for performance/security reasons. They are
+# described in the man page.
+#
+# The rootdir (-r) and PID (-p) options are passed automatically, with
+# rootdir set to /var/db/rbldnsd (where you should put your zone
+# files). The daemon will run as the rbldns user, which was created by
+# portage.
+OPTIONS="-a -vv"
diff --git a/net-dns/rbldnsd/files/initd-0.997a b/net-dns/rbldnsd/files/initd-0.997a
new file mode 100644
index 000000000000..70629b47267d
--- /dev/null
+++ b/net-dns/rbldnsd/files/initd-0.997a
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+start() {
+ ebegin "Starting rbldnsd"
+
+ start-stop-daemon --start --quiet --pidfile /run/rbldnsd.pid \
+ --exec /usr/sbin/rbldnsd -- \
+ -r /var/db/rbldnsd \
+ -p /run/rbldnsd.pid \
+ $(for x in ${LISTEN}; do echo "-b ${x}"; done) \
+ ${OPTIONS} \
+ ${ZONES}
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rbldnsd"
+ start-stop-daemon --stop --quiet --pidfile /run/rbldnsd.pid \
+ --exec /usr/sbin/rbldnsd
+ eend $?
+}
diff --git a/net-dns/rbldnsd/files/rbldnsd-0.997a-format-security-compile-fix.patch b/net-dns/rbldnsd/files/rbldnsd-0.997a-format-security-compile-fix.patch
new file mode 100644
index 000000000000..03da010336e3
--- /dev/null
+++ b/net-dns/rbldnsd/files/rbldnsd-0.997a-format-security-compile-fix.patch
@@ -0,0 +1,30 @@
+From 5d3455065f84fe1ef4673552a27d2e6e8f02c97a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 22 Sep 2014 10:09:27 -0400
+Subject: [PATCH 1/1] Fix compilation with -Werror=format-security.
+
+The dslog() function takes an optional format string, analogous to
+e.g. printf(), and a list of arguments to be substituted into the
+format string. A call to dslog() in do_reload() omitted the format
+string causing GCC to throw a format-security warning. To silence the
+warning, a trivial format string of "%s" was provided.
+---
+ rbldnsd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rbldnsd.c b/rbldnsd.c
+index abf1d01..e791231 100644
+--- a/rbldnsd.c
++++ b/rbldnsd.c
+@@ -959,7 +959,7 @@ static int do_reload(int do_fork) {
+ # undef kb
+ }
+ #endif /* NO_MEMINFO */
+- dslog(LOG_INFO, 0, ibuf);
++ dslog(LOG_INFO, 0, "%s", ibuf);
+
+ check_expires();
+
+--
+1.8.5.5
+
diff --git a/net-dns/rbldnsd/files/rbldnsd-0.997a-robust-ipv6-test-support.patch b/net-dns/rbldnsd/files/rbldnsd-0.997a-robust-ipv6-test-support.patch
new file mode 100644
index 000000000000..e1ac1535dc99
--- /dev/null
+++ b/net-dns/rbldnsd/files/rbldnsd-0.997a-robust-ipv6-test-support.patch
@@ -0,0 +1,329 @@
+diff --git a/NEWS b/NEWS
+index 8d8bdd9..4d8c01d 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,6 +1,19 @@
+ This file describes user-visible changes in rbldnsd.
+ Newer news is at the top.
+
++Next release
++
++ - fix tests for systems without ipv6 support, or when ipv6 is
++ disabled in rbldnsd at compile-time
++
++ - fix tests for API change in pydns >= 2.3.6
++
++ - It is no longer an error to request binding to a particular
++ address/port more than once. (The subsequent requests are simply
++ ignored.) (This avoids confusion on certain systems/configurations
++ where gethostbyname("localhost") can return 127.0.0.1 multiple
++ times.)
++
+ 0.997a (23 Jul 2013)
+
+ - minor fixes/changes in packaging, no code changes.
+diff --git a/rbldnsd.c b/rbldnsd.c
+index abf1d01..8322bdd 100644
+--- a/rbldnsd.c
++++ b/rbldnsd.c
+@@ -203,10 +203,79 @@ static volatile int signalled;
+ #define SIGNALLED_ZSTATS 0x10
+ #define SIGNALLED_TERM 0x20
+
++static inline int sockaddr_in_equal(const struct sockaddr_in *addr1,
++ const struct sockaddr_in *addr2)
++{
++ return (addr1->sin_port == addr2->sin_port
++ && addr1->sin_addr.s_addr == addr2->sin_addr.s_addr);
++}
++
++#ifndef NO_IPv6
++static inline int sockaddr_in6_equal(const struct sockaddr_in6 *addr1,
++ const struct sockaddr_in6 *addr2)
++{
++ if (memcmp(addr1->sin6_addr.s6_addr, addr2->sin6_addr.s6_addr, 16) != 0)
++ return 0;
++ return (addr1->sin6_port == addr2->sin6_port
++ && addr1->sin6_flowinfo == addr2->sin6_flowinfo
++ && addr1->sin6_scope_id == addr2->sin6_scope_id);
++}
++#endif
++
++static inline int sockaddr_equal(const struct sockaddr *addr1,
++ const struct sockaddr *addr2)
++{
++ if (addr1->sa_family != addr2->sa_family)
++ return 0;
++ switch (addr1->sa_family) {
++ case AF_INET:
++ return sockaddr_in_equal((const struct sockaddr_in *)addr1,
++ (const struct sockaddr_in *)addr2);
++#ifndef NO_IPv6
++ return sockaddr_in6_equal((const struct sockaddr_in6 *)addr1,
++ (const struct sockaddr_in6 *)addr2);
++#endif
++ default:
++ error(0, "unknown address family (%d)", addr1->sa_family);
++ }
++}
++
++/* already_bound(addr, addrlen)
++ *
++ * Determine whether we've already bound to a particular address.
++ * This is here mostly to deal with the fact that on certain systems,
++ * gethostbyname()/getaddrinfo() can return a duplicate 127.0.0.1
++ * for 'localhost'. See
++ * - https://sourceware.org/bugzilla/show_bug.cgi?id=4980
++ * - https://bugzilla.redhat.com/show_bug.cgi?id=496300
++ */
++static int already_bound(const struct sockaddr *addr, socklen_t addrlen) {
++#ifdef NO_IPv6
++ struct sockaddr_in addr_buf;
++#else
++ struct sockaddr_in6 addr_buf;
++#endif
++ struct sockaddr *boundaddr = (struct sockaddr *)&addr_buf;
++ socklen_t buflen;
++ int i;
++
++ for (i = 0; i < numsock; i++) {
++ buflen = sizeof(addr_buf);
++ if (getsockname(sock[i], boundaddr, &buflen) < 0)
++ error(errno, "getsockname failed");
++ if (buflen == addrlen && sockaddr_equal(boundaddr, addr))
++ return 1;
++ }
++ return 0;
++}
++
+ #ifdef NO_IPv6
+ static void newsocket(struct sockaddr_in *sin) {
+ int fd;
+ const char *host = ip4atos(ntohl(sin->sin_addr.s_addr));
++
++ if (already_bound((struct sockaddr *)sin, sizeof(*sin)))
++ return;
+ if (numsock >= MAXSOCK)
+ error(0, "too many listening sockets (%d max)", MAXSOCK);
+ fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+@@ -223,6 +292,8 @@ static int newsocket(struct addrinfo *ai) {
+ int fd;
+ char host[NI_MAXHOST], serv[NI_MAXSERV];
+
++ if (already_bound(ai->ai_addr, ai->ai_addrlen))
++ return 1;
+ if (numsock >= MAXSOCK)
+ error(0, "too many listening sockets (%d max)", MAXSOCK);
+ fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
+diff --git a/rbldnsd.py b/rbldnsd.py
+index 9300ef2..4b78dee 100644
+--- a/rbldnsd.py
++++ b/rbldnsd.py
+@@ -2,6 +2,7 @@
+
+
+ """
++import errno
+ from itertools import count
+ import subprocess
+ from tempfile import NamedTemporaryFile, TemporaryFile
+@@ -12,6 +13,14 @@ try:
+ import DNS
+ except ImportError:
+ raise RuntimeError("The pydns library is not installed")
++try:
++ from DNS import SocketError as DNS_SocketError
++except ImportError:
++ class DNS_SocketError(Exception):
++ """ Dummy, never raised.
++
++ (Older versions of pydns before 2.3.6 do not raise SocketError.)
++ """
+
+ DUMMY_ZONE_HEADER = """
+ $SOA 0 example.org. hostmaster.example.com. 0 1h 1h 2d 1h
+@@ -113,7 +122,6 @@ class Rbldnsd(object):
+ stderr=self.stderr)
+
+ # wait for rbldnsd to start responding
+- time.sleep(0.1)
+ for retry in count():
+ if daemon.poll() is not None:
+ raise DaemonError(
+@@ -124,12 +132,18 @@ class Rbldnsd(object):
+ break
+ except QueryRefused:
+ break
++ except DNS_SocketError as ex:
++ # pydns >= 2.3.6
++ wrapped_error = ex.args[0]
++ if wrapped_error.errno != errno.ECONNREFUSED:
++ raise
+ except DNS.DNSError as ex:
++ # pydns < 2.3.6
+ if str(ex) != 'no working nameservers found':
+ raise
+- elif retries > 10:
+- raise DaemonError(
+- "rbldnsd does not seem to be responding")
++ if retry > 10:
++ raise DaemonError("rbldnsd does not seem to be responding")
++ time.sleep(0.1)
+
+ def _stop_daemon(self):
+ daemon = self._daemon
+@@ -150,6 +164,22 @@ class Rbldnsd(object):
+ raise DaemonError("rbldnsd exited with code %d"
+ % daemon.returncode)
+
++ @property
++ def no_ipv6(self):
++ """ Was rbldnsd compiled with -DNO_IPv6?
++ """
++ # If rbldnsd was compiled with -DNO_IPv6, the (therefore
++ # unsupported) '-6' command-line switch will not be described
++ # in the help message
++ cmd = [self.daemon_bin, '-h']
++ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
++ help_message = proc.stdout.readlines()
++ if proc.wait() != 0:
++ raise subprocess.CalledProcessError(proc.returncode, cmd)
++ return not any(line.lstrip().startswith('-6 ')
++ for line in help_message)
++
++
+ class TestRbldnsd(unittest.TestCase):
+ def test(self):
+ rbldnsd = Rbldnsd()
+diff --git a/test_acl.py b/test_acl.py
+index d93ca0a..10bed1c 100644
+--- a/test_acl.py
++++ b/test_acl.py
+@@ -1,5 +1,8 @@
+ """ Tests for the acl dataset
+ """
++from functools import wraps
++import socket
++import sys
+ from tempfile import NamedTemporaryFile
+ import unittest
+
+@@ -9,6 +12,35 @@ __all__ = [
+ 'TestAclDataset',
+ ]
+
++try:
++ from unittest import skipIf
++except ImportError:
++ # hokey replacement (for python <= 2.6)
++ def skipIf(condition, reason):
++ if condition:
++ def decorate(f):
++ @wraps(f)
++ def skipped(*args, **kw):
++ sys.stderr.write("skipped test: %s " % reason)
++ return skipped
++ return decorate
++ else:
++ return lambda f: f
++
++def _have_ipv6():
++ # Check for IPv6 support
++ if not getattr(socket, 'has_ipv6', False):
++ return False # no python support for ipv6
++ elif Rbldnsd().no_ipv6:
++ return False # rbldnsd compiled with -DNO_IPv6
++ try:
++ socket.socket(socket.AF_INET6, socket.SOCK_DGRAM).close()
++ except socket.error:
++ return False # no kernel (or libc) support for ipv6?
++ return True
++
++no_ipv6 = not _have_ipv6()
++
+ def daemon(acl, addr='localhost'):
+ """ Create an Rbldnsd instance with given ACL
+ """
+@@ -33,11 +65,13 @@ class TestAclDataset(unittest.TestCase):
+ addr='127.0.0.1') as dnsd:
+ self.assertEqual(dnsd.query('test.example.com'), 'Success')
+
++ @skipIf(no_ipv6, "IPv6 unsupported")
+ def test_refuse_ipv6(self):
+ with daemon(acl=["::1 :refuse"],
+ addr='::1') as dnsd:
+ self.assertRaises(QueryRefused, dnsd.query, 'test.example.com')
+
++ @skipIf(no_ipv6, "IPv6 unsupported")
+ def test_pass_ipv6(self):
+ with daemon(acl=[ "0/0 :refuse",
+ "0::1 :pass" ],
+diff --git a/test_ip4trie.py b/test_ip4trie.py
+index fe9e78f..2cce09b 100644
+--- a/test_ip4trie.py
++++ b/test_ip4trie.py
+@@ -9,7 +9,7 @@ __all__ = [
+ ]
+
+ def ip4trie(zone_data):
+- """ Run rbldnsd with an ip6trie dataset
++ """ Run rbldnsd with an ip4trie dataset
+ """
+ dnsd = Rbldnsd()
+ dnsd.add_dataset('ip4trie', ZoneFile(zone_data))
+diff --git a/test_ip6trie.py b/test_ip6trie.py
+index d3600db..377c5dd 100644
+--- a/test_ip6trie.py
++++ b/test_ip6trie.py
+@@ -15,15 +15,6 @@ def ip6trie(zone_data):
+ dnsd.add_dataset('ip6trie', ZoneFile(zone_data))
+ return dnsd
+
+-def rfc3152(ip6addr, domain='example.com'):
+- from socket import inet_pton, AF_INET6
+- from struct import unpack
+-
+- bytes = unpack("16B", inet_pton(AF_INET6, ip6addr))
+- nibbles = '.'.join("%x.%x" % (byte & 0xf, (byte >> 4) & 0xf)
+- for byte in reversed(bytes))
+- return "%s.%s" % (nibbles, domain)
+-
+ class TestIp6TrieDataset(unittest.TestCase):
+ def test_exclusion(self):
+ with ip6trie(["dead::/16 listed",
+@@ -31,5 +22,35 @@ class TestIp6TrieDataset(unittest.TestCase):
+ self.assertEqual(dnsd.query(rfc3152("dead::beef")), None)
+ self.assertEqual(dnsd.query(rfc3152("dead::beee")), "listed")
+
++
++def rfc3152(ip6addr, domain='example.com'):
++ return "%s.%s" % ('.'.join(reversed(_to_nibbles(ip6addr))), domain)
++
++def _to_nibbles(ip6addr):
++ """ Convert ip6 address (in rfc4291 notation) to a sequence of nibbles
++
++ NB: We avoid the use of socket.inet_pton(AF_INET6, ip6addr) here
++ because it fails (with 'error: can't use AF_INET6, IPv6 is
++ disabled') when python has been compiled without IPv6 support. See
++ http://www.corpit.ru/pipermail/rbldnsd/2013q3/001181.html
++
++ """
++ def _split_words(addr):
++ return [ int(w, 16) for w in addr.split(':') ] if addr else []
++
++ if '::' in ip6addr:
++ head, tail = [ _split_words(s) for s in ip6addr.split('::', 1) ]
++ nzeros = 8 - len(head) - len(tail)
++ assert nzeros >= 0
++ words = head + [ 0 ] * nzeros + tail
++ else:
++ words = _split_words(ip6addr)
++
++ assert len(words) == 8
++ for word in words:
++ assert 0 <= word <= 0xffff
++
++ return ''.join("%04x" % word for word in words)
++
+ if __name__ == '__main__':
+ unittest.main()
diff --git a/net-dns/rbldnsd/files/rbldnsd-0.998-fix-huge-zone-OOM.patch b/net-dns/rbldnsd/files/rbldnsd-0.998-fix-huge-zone-OOM.patch
new file mode 100644
index 000000000000..7a4d2da7187f
--- /dev/null
+++ b/net-dns/rbldnsd/files/rbldnsd-0.998-fix-huge-zone-OOM.patch
@@ -0,0 +1,60 @@
+This upstream patch has been merged but not released. I (mjo) dropped
+a change to the NEWS file to prevent a pointless conflict.
+
+From a1295eefc78b6e8a3c220e164dbfad6dbecc6f6e Mon Sep 17 00:00:00 2001
+From: Antonio Mammita <am@spamteq.com>
+Date: Wed, 21 Dec 2016 16:54:06 +0100
+Subject: [PATCH] Fix for out of memory errors on huge zones. Thanks to Andrew
+ Clayton
+
+---
+ rbldnsd.h | 6 +++---
+ rbldnsd_util.c | 6 +++---
+ 3 files changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/rbldnsd.h b/rbldnsd.h
+index 6acd8a0..f195a30 100644
+--- a/rbldnsd.h
++++ b/rbldnsd.h
+@@ -367,9 +367,9 @@ extern struct dataset *g_dsacl; /* global acl */
+ extern const char *show_version; /* version.bind CH TXT */
+
+ void oom(void);
+-char *emalloc(unsigned size);
+-char *ezalloc(unsigned size); /* zero-fill */
+-char *erealloc(void *ptr, unsigned size);
++char *emalloc(size_t size);
++char *ezalloc(size_t size); /* zero-fill */
++char *erealloc(void *ptr, size_t size);
+ char *estrdup(const char *str);
+ char *ememdup(const void *buf, unsigned size);
+
+diff --git a/rbldnsd_util.c b/rbldnsd_util.c
+index d17b51b..c6d628d 100644
+--- a/rbldnsd_util.c
++++ b/rbldnsd_util.c
+@@ -460,21 +460,21 @@ dump_a_txt(const char *name, const char *rr,
+
+ #endif
+
+-char *emalloc(unsigned size) {
++char *emalloc(size_t size) {
+ void *ptr = malloc(size);
+ if (!ptr)
+ oom();
+ return ptr;
+ }
+
+-char *ezalloc(unsigned size) {
++char *ezalloc(size_t size) {
+ void *ptr = calloc(1, size);
+ if (!ptr)
+ oom();
+ return ptr;
+ }
+
+-char *erealloc(void *ptr, unsigned size) {
++char *erealloc(void *ptr, size_t size) {
+ void *nptr = realloc(ptr, size);
+ if (!nptr)
+ oom();
diff --git a/net-dns/rbldnsd/metadata.xml b/net-dns/rbldnsd/metadata.xml
new file mode 100644
index 000000000000..6ae7879eb421
--- /dev/null
+++ b/net-dns/rbldnsd/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+ </maintainer>
+
+ <longdescription lang="en">
+ rbldnsd is a small and fast DNS daemon which is especially made to
+ serve DNSBL zones. This daemon was inspired by Dan J. Bernstein's
+ rbldns program found in the djbdns package.
+
+ rbldnsd is extremely fast - it outperforms both bind and djbdns
+ greatly. It has very small memory footprint.
+
+ The daemon can serve both IP-based (ordb.org, dsbl.org etc) and
+ name-based (rfc-ignorant.org) blocklists. Unlike DJB's rbldns, it
+ has ability to specify individual values for every entry, can
+ serve as many zones on a single IP address as you wish, and,
+ finally, it is a real nameserver: it can reply to DNS metadata
+ requests. The daemon keeps all zones in memory for faster
+ operations, but its memory usage is very efficient, especially for
+ repeated TXT values which are stored only once.
+ </longdescription>
+
+ <upstream>
+ <remote-id type="github">spamhaus/rbldnsd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/rbldnsd/rbldnsd-0.998-r2.ebuild b/net-dns/rbldnsd/rbldnsd-0.998-r2.ebuild
new file mode 100644
index 000000000000..04537f305756
--- /dev/null
+++ b/net-dns/rbldnsd/rbldnsd-0.998-r2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit toolchain-funcs user python-any-r1
+
+DESCRIPTION="DNS server designed to serve blacklist zones"
+HOMEPAGE="https://rbldnsd.io/"
+SRC_URI="https://github.com/spamhaus/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~sparc ~x86 ~x86-fbsd"
+IUSE="ipv6 test zlib"
+
+RDEPEND="zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ test? (
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep 'dev-python/pydns:2[${PYTHON_USEDEP}]')
+ )"
+
+PATCHES=(
+ "${FILESDIR}/rbldnsd-0.997a-robust-ipv6-test-support.patch"
+ "${FILESDIR}/rbldnsd-0.997a-format-security-compile-fix.patch"
+ "${FILESDIR}/rbldnsd-0.998-fix-huge-zone-OOM.patch"
+)
+
+src_configure() {
+ # The ./configure file is handwritten and doesn't support a `make
+ # install` target, so there are no --prefix options. The econf
+ # function appends those automatically, so we can't use it.
+ ./configure \
+ $(use_enable ipv6) \
+ $(use_enable zlib) \
+ || die "./configure failed"
+}
+
+src_compile() {
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ RANLIB="$(tc-getRANLIB)"
+}
+
+src_test() {
+ emake check \
+ CC="$(tc-getCC)" \
+ PYTHON="${PYTHON}"
+}
+
+src_install() {
+ einstalldocs
+ dosbin rbldnsd
+ doman rbldnsd.8
+ keepdir /var/db/rbldnsd
+ newinitd "${FILESDIR}"/initd-0.997a rbldnsd
+ newconfd "${FILESDIR}"/confd-0.997a rbldnsd
+}
+
+pkg_postinst() {
+ enewgroup rbldns
+ enewuser rbldns -1 -1 /var/db/rbldnsd rbldns
+ fowners rbldns:rbldns /var/db/rbldnsd
+}
diff --git a/net-dns/rbldnsd/rbldnsd-0.998.ebuild b/net-dns/rbldnsd/rbldnsd-0.998.ebuild
new file mode 100644
index 000000000000..8c559177fb0e
--- /dev/null
+++ b/net-dns/rbldnsd/rbldnsd-0.998.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils toolchain-funcs user python-any-r1
+
+DESCRIPTION="DNS server designed to serve blacklist zones"
+HOMEPAGE="http://www.corpit.ru/mjt/rbldnsd.html"
+SRC_URI="http://www.corpit.ru/mjt/rbldnsd/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ~sparc x86 ~x86-fbsd"
+IUSE="ipv6 test zlib"
+
+RDEPEND="zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ test? (
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep 'dev-python/pydns:2[${PYTHON_USEDEP}]')
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}/rbldnsd-0.997a-robust-ipv6-test-support.patch"
+ epatch "${FILESDIR}/rbldnsd-0.997a-format-security-compile-fix.patch"
+}
+
+src_configure() {
+ # The ./configure file is handwritten and doesn't support a `make
+ # install` target, so there are no --prefix options. The econf
+ # function appends those automatically, so we can't use it.
+ ./configure \
+ $(use_enable ipv6) \
+ $(use_enable zlib) \
+ || die "./configure failed"
+}
+
+src_compile() {
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ RANLIB="$(tc-getRANLIB)"
+}
+
+src_test() {
+ emake check \
+ CC="$(tc-getCC)" \
+ PYTHON="${PYTHON}"
+}
+
+src_install() {
+ dosbin rbldnsd
+ doman rbldnsd.8
+ keepdir /var/db/rbldnsd
+ dodoc CHANGES* TODO NEWS README*
+ newinitd "${FILESDIR}"/initd-0.997a rbldnsd
+ newconfd "${FILESDIR}"/confd-0.997a rbldnsd
+}
+
+pkg_postinst() {
+ enewgroup rbldns
+ enewuser rbldns -1 -1 /var/db/rbldnsd rbldns
+ chown rbldns:rbldns /var/db/rbldnsd
+}
diff --git a/net-dns/resolv_wrapper/Manifest b/net-dns/resolv_wrapper/Manifest
new file mode 100644
index 000000000000..7bd628af17cd
--- /dev/null
+++ b/net-dns/resolv_wrapper/Manifest
@@ -0,0 +1,6 @@
+DIST resolv_wrapper-1.1.4.tar.gz 33288 SHA256 bc027585d54c9966fb4daaace617784b436d0fdcf4e371f0bc7460830605235d SHA512 da7eb897d3964015b2bb6f7c1ba6483020c70e2d64c5e13b6c095f9e57dccf5b035d04e41c38953fa0eb260e83d7e23f6af32c0d8186553bae8d7b741c46c5ba WHIRLPOOL acbbbd383ead9d7093c5d585a34df1a3b38c81279aab275c0af43a0f53954d0c883c14135ed71c35e534c172a13374e394a56663fbe9954080750e7d8ac27903
+DIST resolv_wrapper-1.1.5.tar.gz 34241 SHA256 e989fdaa1385bdf3ef7dbcb83b3f7f15c69e78ca6432e254be390b7c63e1b06c SHA512 d11beff60cf935c0c12ac97ae375299ab1cd2e270d09438cf81b5c19dd94b7d430484c44ec9611171b67654d5c0f26afc4aa9d069d61293a956ef8fc59efc7a8 WHIRLPOOL 94e6a835183c0b100ba948e6281298b4cf7f38639006bd352096e7c4bd1cbc4ca74a435eb27fc121cdb7baf770257cf0dc8d7f4d53f87ab347cc7528830d4637
+EBUILD resolv_wrapper-1.1.4.ebuild 648 SHA256 6bc8347d9390341f1e43d74b37efdb392355f79b3c10c6f006764a4a5c25f4b0 SHA512 04ed1fefb76528f14f1f9a941381a8dcbd7cfa8cd2a298ac0d9397b10051eb96b47da947b7ba9976ce1dcb03e263428c57945d9b680167fc920a88fd82f7ee78 WHIRLPOOL cc4858e8fbbbf124814f68e99e8a3e6a5d1c12242992b2e383006ae91ab738cccf12fc6788c3969a3dc50d4a285fa03a53d42d87258f19a7d62c5a4c430a22c8
+EBUILD resolv_wrapper-1.1.5.ebuild 685 SHA256 8fc3419708cca32a012d2fb61ac5e981b6f516946b96bfef49e4007faf3aec4c SHA512 7d10a414cac31ec30abb8911247b755da87949e8d038096d31477e59ee34384d16e5c2ad629c847a8a2c6c5fb26c909ff1b626bff70926f76072169485de0d7f WHIRLPOOL d7e75a759c1803957748d747fdd2e6f0056b5fc48faee601ee6f0419201683f165f770e55e3690358865c94a712ad8d07a423e2f1767d721ae6b2c853310bfa3
+MISC ChangeLog 911 SHA256 6269222afc42ba2a671ad03b77113e29dcba2d7e3857a120566c182289810493 SHA512 e63b168ac8600cc6c480cdc1e38110d97da42f20f72e5030a349d192e2265ccbfd47855cd4c271cfc7a56ceef8182305f8ca692b823fe51ab00ff1ef1bdc5cb4 WHIRLPOOL 5dfda9443bc76d21c817c35ca2d9b63c5898b399998b6173664caf9750a34c2823757d329021af19d17977c8e26157c85b1e99b9ba7d4332626c0271d35ed415
+MISC metadata.xml 360 SHA256 debc337b7549e12f55cf6ebdf900a95eb3b2370aa60daa49fd7ae97659ca5a85 SHA512 6cfeb9ed18b5c3b6c6e6875311bad627e9baffdf7b0846d70c8e0e36ce053ce849f867e963f7504292bbeb4b133c828e75a2d877c34fe7858ab3b9403ce533d2 WHIRLPOOL 1e6aa7563470c001516ce0b5f398d4fb5d854bb8a3a47a6631bd53f9b377950644ccb487a651f9648ead2815b815e8fd16d3cf7b6cd5c2d18958472b2a25c421
diff --git a/net-dns/resolv_wrapper/metadata.xml b/net-dns/resolv_wrapper/metadata.xml
new file mode 100644
index 000000000000..f05d1f266834
--- /dev/null
+++ b/net-dns/resolv_wrapper/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+<maintainer type="project">
+ <email>samba@gentoo.org</email>
+ <name>Samba</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dns/resolv_wrapper/resolv_wrapper-1.1.4.ebuild b/net-dns/resolv_wrapper/resolv_wrapper-1.1.4.ebuild
new file mode 100644
index 000000000000..811c71aed8c0
--- /dev/null
+++ b/net-dns/resolv_wrapper/resolv_wrapper-1.1.4.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-multilib
+
+DESCRIPTION="A wrapper for DNS name resolving or DNS faking"
+HOMEPAGE="https://cwrap.org/resolv_wrapper.html"
+SRC_URI="https://ftp.samba.org/pub/cwrap/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+# Work around a problem with >=dev-util/cmake-3.3.0 (bug #558340)
+# Because of this we cannot use cmake-multilib_src_configure() here.
+multilib_src_configure() {
+ local mycmakeargs=( -DCMAKE_LIBRARY_PATH=/usr/$(get_libdir) )
+ cmake-utils_src_configure
+}
diff --git a/net-dns/resolv_wrapper/resolv_wrapper-1.1.5.ebuild b/net-dns/resolv_wrapper/resolv_wrapper-1.1.5.ebuild
new file mode 100644
index 000000000000..0181764a443b
--- /dev/null
+++ b/net-dns/resolv_wrapper/resolv_wrapper-1.1.5.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-multilib
+
+DESCRIPTION="A wrapper for DNS name resolving or DNS faking"
+HOMEPAGE="https://cwrap.org/resolv_wrapper.html"
+SRC_URI="https://ftp.samba.org/pub/cwrap/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~arm64 ia64 ppc ppc64 sparc x86"
+IUSE="test"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+# Work around a problem with >=dev-util/cmake-3.3.0 (bug #558340)
+# Because of this we cannot use cmake-multilib_src_configure() here.
+multilib_src_configure() {
+ local mycmakeargs=( -DCMAKE_LIBRARY_PATH=/usr/$(get_libdir) )
+ cmake-utils_src_configure
+}
diff --git a/net-dns/resolvconf-symlink/Manifest b/net-dns/resolvconf-symlink/Manifest
new file mode 100644
index 000000000000..5d20d7b2ab9e
--- /dev/null
+++ b/net-dns/resolvconf-symlink/Manifest
@@ -0,0 +1,4 @@
+EBUILD resolvconf-symlink-0.ebuild 1496 SHA256 4d22efbc2141dc6b29ed70a945be5da6dc22549d4b0a59edd05d691bac077509 SHA512 8099ea0189da0e4614445d406c569e70ee1f88227803a5fcf42b6365a75224ac550f0af2a140c2d70db1f0bb2c49c0f85f6eb25314b161307829f99e552be889 WHIRLPOOL e44081ab10538722383c23f3643b6833019a75a16eaa5b58b15377167325d67f6a60279ea2ef96e5d0a26f3bcb076216b7d0beeb74f1d9cf5378a6ad0488ec2f
+MISC ChangeLog 2624 SHA256 00328fd3cb7410e338010ea767c3b3983ee337d7a3852d5691a7f870f656295b SHA512 37aed5d97e5f30ad17cc9f9fee3a80b6644d8011e5885a8832f048a6513dea128376a083f7a1656cf63c19a5c856e6a809d10c55e39673b7b62b466a8e57b70b WHIRLPOOL ea46ed9fde514b3240734a577e1df3968157070e0b44e856af0d5c4d6585e6b5a272a3b81d8d8fbef7f99b17e419f4cb5f33bdeae8cfb5a35ff25a649e8e9b1e
+MISC ChangeLog-2015 552 SHA256 a1059c3cba7440b50857cf040cb74e5b4914564a6536d8ab117674c5032e582b SHA512 58a1a6f41e80aed60d3604ea2c7dcae297a209fc61fd32a9ba0255bb23ea79d05738d341782148f2f82926b822437fd25322a8cef76d13ee9d7d9c655f7acfe5 WHIRLPOOL 1579c8ec7ae9f44cbd2c3fc586cf4938e0cc6bbc722502895ce2d9a292f5c2b97f57f0fed89c70c0e7488fa93d80aad45c65c7ba7944df950fdf3deae5b34c72
+MISC metadata.xml 387 SHA256 bca32353c836198378e0a4a3b3756b3d199ffe3862e268a7f24172cccc78f6f4 SHA512 34bb7374a90375f557a9791c7b7cfb78260965a148e6c73ef829bbd2dbc34931b7677408e519e7cdb06445c0ac3ea180b59e73770614e6215eddf15fcdbaf064 WHIRLPOOL 91d3e4be9dba19461fec843a567da6892714e35c44aac9b61d6de15bbade70ccaa260b7db7b8b8c7557bdbf9a95c61573b21debf465e642e4dfa44936aa6b5da
diff --git a/net-dns/resolvconf-symlink/metadata.xml b/net-dns/resolvconf-symlink/metadata.xml
new file mode 100644
index 000000000000..91f7b275a878
--- /dev/null
+++ b/net-dns/resolvconf-symlink/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <use>
+ <flag name="symlink">Actually replace /etc/resolv.conf with a
+ symlink. Without this flag, the ebuild is a no-op.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild b/net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild
new file mode 100644
index 000000000000..d11ff4ab6257
--- /dev/null
+++ b/net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+DESCRIPTION="Make /etc/resolv.conf a symlink to a runtime-writable location"
+HOMEPAGE="https://www.gentoo.org"
+SRC_URI=""
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+symlink"
+
+S=${WORKDIR}
+
+pkg_preinst() {
+ if use symlink; then
+ if [[ -f "${ROOT}"etc/resolv.conf && ! -L "${ROOT}"etc/resolv.conf ]]
+ then # migrate existing resolv.conf
+ if [[ "$(head -n 1 "${ROOT}"etc/resolv.conf)" \
+ != "# Generated by "* ]]; then
+
+ eerror "${ROOT}etc/resolv.conf seems not to be autogenerated."
+ eerror "Aborting build to avoid removing user data. If that file is supposed"
+ eerror "to be autogenerated, please remove it manually. Otherwise, please"
+ eerror "set USE=-symlink to avoid installing resolv.conf symlink."
+
+ die "${ROOT}etc/resolv.conf not autogenerated"
+ else
+ ebegin "Moving ${ROOT}etc/resolv.conf to ${ROOT}var/run/"
+ mv "${ROOT}"etc/resolv.conf "${ROOT}"var/run/
+ eend ${?} || die
+ fi
+ fi
+ fi
+}
+
+src_install() {
+ # XXX: /run should be more correct, when it's supported by baselayout
+
+ use symlink && dosym /var/run/resolv.conf /etc/resolv.conf
+}
+
+pkg_postrm() {
+ # Don't leave the user with no resolv.conf
+ if [[ ! -e "${ROOT}"etc/resolv.conf && -f "${ROOT}"var/run/resolv.conf ]]; then
+ ebegin "Moving ${ROOT}var/run/resolv.conf to ${ROOT}etc/"
+ mv "${ROOT}"var/run/resolv.conf "${ROOT}"etc/
+ eend ${?} || die
+ fi
+}
diff --git a/net-dns/s6-dns/Manifest b/net-dns/s6-dns/Manifest
new file mode 100644
index 000000000000..ab6049808b01
--- /dev/null
+++ b/net-dns/s6-dns/Manifest
@@ -0,0 +1,7 @@
+DIST s6-dns-2.1.0.0.tar.gz 77415 SHA256 8455f3b1edad8f01a1340cb1242c141755729bfd5d71059739eced5c006539ad SHA512 c75722b3ddd9d1646116654983558efde22d0d5d3ff1c296a8d5e2ba44abe0d5a86fc86804cf90bea2ee8c3e82028e182d28cdbf5155d46c6b3d8f4d1c3387fc WHIRLPOOL 7c1eb845d6101c53fd65579bd46ad83c0085ee734d2623b616a34db0721bbca913820f21c6979bdc1c87582d8a92c547f7f9a5b640c4f31badbc3bd0098f75fd
+DIST s6-dns-2.2.0.0.tar.gz 76702 SHA256 06856745aa034a1655b7d8226a4b235579b098c58b6009d92151dedd41b15fc2 SHA512 55cc0a4e677a28d5ebeeab1f995ee8d03c6aaa0c839ad420e006468c0712f45e638a3d32e082a34e09098d20c3bb08496afcefbec4c58f7674017e22732b1cda WHIRLPOOL 7b4c8e5e12a53d41ef6bd8ee7854aaa9d97206766b7eb5bc5bcac06b27c0487d3ddbfe516b74f37e609eae677a57c5b4ab4ba6daa692009fd23ef12bbbd42326
+DIST s6-dns-2.2.0.1.tar.gz 76046 SHA256 e31b454aef2bd0e35afb497c42dd0d49c011e0535ad2bf4dd6719afcf6e5e6b4 SHA512 9b62ddec94be86d186520f0240dafda95861c54345f92a1fac3251f8560e70932bc5915cca4136d428ed02d0718e8082ad382bffd0c707ae867f1896d93ecaed WHIRLPOOL 4eafa9f6062d4eb80f46150a3db9745b42270183857c97aecc19c189a570eb39cb26b2bc003fb2ab6900bb0c708e32168b3453b59948a60ca8e7a41e5018cdf4
+EBUILD s6-dns-2.1.0.0.ebuild 1175 SHA256 d88b0fe7429df0bd70d1a8cfbeb048029688537eaa2f938e8efbbc31fa77375f SHA512 7c1a1af1fe399c2192ee92e0b6c33a75b6951eb05446e24485b4e6d8282c86031b3664e15b3694e02d78f37038ffd892e85f3c1c396f4933a9d0350153615262 WHIRLPOOL 4d642d01a077e03354b2a5427805e1a1670f6a35ac4d9589247c523eeef9d49927734af9d4f1ab4d6fc9e8d9876fa8d967c5ed3db09c852c0443d55a67c710f4
+EBUILD s6-dns-2.2.0.0.ebuild 1177 SHA256 751a490639910bcd8417ecb22e5ef7997e3867de952effa211bc53bee824a901 SHA512 f31c888c63f199ccbaa8adfea5f195b8e10313532c5cc85769bcaddbc3bc2d4f5fd4357d51291402d9d9cf13f24f341d225d70ad1d6524bb49d60847cb88d859 WHIRLPOOL 186a9cbcdb08a453216f72f5071841cd69548cd649b854179368668a78282df6022ab00b32490c974ae6cc5d501c25238fea148df66f714234b4dcc73279a4ef
+EBUILD s6-dns-2.2.0.1.ebuild 1316 SHA256 fba0c0aa4a583cf71937e0e7f02b035b965b1b7a1be304378d257765803913fb SHA512 a0153e3c80f54fd744dc5e1412672857280e3204da461e8eb75e2c06133a9d4162eccec950ebed272061a1614e00e04ce8024be8ac1a001ae0e57187ff064557 WHIRLPOOL dfba3789b5fbd417e23a729504cc9160c538a6c5de7973ee22035ae37a80da92d43c00bcd32071f175fe7d510314ce67dae48921411c05875c89592a83825446
+MISC metadata.xml 544 SHA256 a5561c51b0d8d14bb005674b8f108200ccd4a032f8f29d5eda501f58e56cd831 SHA512 3927f465e32d28b0b0571a472ab36c7e5cacbf8eb5303d044e735be4345cbd0e215bc167e25027c5e91c744df54b7c7f22b993cf6a4a1a7aa4b43ce5330526ed WHIRLPOOL 854b9a9d5476b07175d86683833cc250ae1b8b50c1eff3643f27fcd1a4db7f9817a763222d4583d5c2b0e1336e69078db2cad526260735268ed70794b5f6f5ba
diff --git a/net-dns/s6-dns/metadata.xml b/net-dns/s6-dns/metadata.xml
new file mode 100644
index 000000000000..e93f8569c708
--- /dev/null
+++ b/net-dns/s6-dns/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>samuel@sholland.org</email>
+ <name>Samuel Holland</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <longdescription lang="en">
+ s6-dns is a suite of DNS client programs and libraries for Unix systems,
+ as an alternative to the BIND, djbdns or other DNS clients.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-dns/s6-dns/s6-dns-2.1.0.0.ebuild b/net-dns/s6-dns/s6-dns-2.1.0.0.ebuild
new file mode 100644
index 000000000000..be37a9222394
--- /dev/null
+++ b/net-dns/s6-dns/s6-dns-2.1.0.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="suite of DNS client programs and libraries for Unix systems"
+HOMEPAGE="http://www.skarnet.org/software/s6-dns/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.4.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.4.0.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.4.0.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/net-dns/s6-dns/s6-dns-2.2.0.0.ebuild b/net-dns/s6-dns/s6-dns-2.2.0.0.ebuild
new file mode 100644
index 000000000000..a77493930c3c
--- /dev/null
+++ b/net-dns/s6-dns/s6-dns-2.2.0.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="suite of DNS client programs and libraries for Unix systems"
+HOMEPAGE="https://www.skarnet.org/software/s6-dns/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.5.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.5.0.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.5.0.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/net-dns/s6-dns/s6-dns-2.2.0.1.ebuild b/net-dns/s6-dns/s6-dns-2.2.0.1.ebuild
new file mode 100644
index 000000000000..1c86a6a85661
--- /dev/null
+++ b/net-dns/s6-dns/s6-dns-2.2.0.1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="suite of DNS client programs and libraries for Unix systems"
+HOMEPAGE="https://www.skarnet.org/software/s6-dns/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.6.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.6.0.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.6.0.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+
+ # configure overrides gentoo's -fstack-protector default
+ sed -i "/^tryflag CFLAGS_AUTO -fno-stack-protector$/d" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/net-dns/sheerdns/Manifest b/net-dns/sheerdns/Manifest
new file mode 100644
index 000000000000..3041f28b7c45
--- /dev/null
+++ b/net-dns/sheerdns/Manifest
@@ -0,0 +1,5 @@
+DIST sheerdns-1.0.3.tar.gz 22937 SHA256 4155c0ad33defb8bc7ce90fa4ecc31bd7e7562478cbfc7b46aaa0f25f0b5b4fb SHA512 c24b33d5ed9cdf501a3c685398f694c2c8e31814c30caec7406d3d819e3d2affd854da23f3e1f1e0621fbd7e81f189f3316346c4d1c48abeef9ee0b9b47e4c12 WHIRLPOOL 29c5e3ec88b79a4c1e326099518babcffa259c7f1ac19bf832c1812e171a1b47f920f34d28368a11721f5de8b9e9367dcc6f1476bc705ff41d337942f94bdd77
+EBUILD sheerdns-1.0.3.ebuild 665 SHA256 e43071492ed5c7629a058598674de896861bf527c5a66438af02c954255625fe SHA512 0f98fb58389e29ea690509ee8eca482bbe985a2359bcc136916509717a2c8970e25594f7ff53563d71c4c7962fbbc48f3fa0c3a28a3f985d6d0f83dbd83f7c43 WHIRLPOOL 3b61db67f57dfe8403f9f2a054311f62f4a0450ca13424cbfd116d03e247ff1269f3e965dd714c1e1a85da995c622c1c2fc97b175602cf2f2029a9fd1eeb6566
+MISC ChangeLog 2917 SHA256 4d14a0a166f69518fde9018c77dfb8bb0084f15214f5645532a0a32248799503 SHA512 b72dcebe11481dad5dd2dec53223660ba4a39fb424ed26785a1503cead129186cef68c8fd9f8758575f36da3446b7cb3cf62064baab04dce10a7b898d00b3fad WHIRLPOOL c6e522dfa3b1bbcfade83a3f647db3f1e619cf97d6ee1760a6e0abf8a3e25d677cd56b4f5ca617d1e268bf6c8170d121c92b9bc7e816b6bd02cee0ac1238a286
+MISC ChangeLog-2015 1533 SHA256 25e530ab91e5a8e68c14ccf258ccf259199d62f15ca6aaad482b5f33f1fc85ee SHA512 ff610c01e2d7bda5ad0e51cffcf1c3551e227777542b1ef47e393fb32a56492419d6cc751753585f53cbb38e72e37d25a68c3375c1b7f8a9b7c5437f96119d46 WHIRLPOOL 9707ca725c402ca5bbf58cf1034bfeb57aec85033e446133f813dad4eca5cdfd4292c4346e30a861a3236dc323f55c7ba9f551d06dd1e11a11132d4258c2c64e
+MISC metadata.xml 634 SHA256 fa029bff9ca033cd084ce55a490681fc733c812387ffaebddcf3c78a65521674 SHA512 daca37a1ea32a267c0d2b622a533713bcc63ffcfc351a8b7111cf208fba30f4aab38f181c7f0f1910a5598e20828ee24ab17fba3e91af384ad8c15233e477896 WHIRLPOOL 454185350ddb72406f559d13feaf60aa1d82ed0a21cf13b492a7c93550c6eebcaa2fd28dbd681885dc9ac103261405756aabd3ee96a07451e77f1a21f822db80
diff --git a/net-dns/sheerdns/metadata.xml b/net-dns/sheerdns/metadata.xml
new file mode 100644
index 000000000000..1145277be30e
--- /dev/null
+++ b/net-dns/sheerdns/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription>
+ SheerDNS was written to be a simple replacement master DNS server that can
+ be used where atomic updates are required. Because it stores each record in
+ a small file, updating records does not require the sheerdns process to be
+ notified or restarted. Each update is immediately available and served
+ as-is.
+ SheerDNS is extremely light-weight, simple, and fast, and written with
+ security in mind.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-dns/sheerdns/sheerdns-1.0.3.ebuild b/net-dns/sheerdns/sheerdns-1.0.3.ebuild
new file mode 100644
index 000000000000..d1e7c5e721a3
--- /dev/null
+++ b/net-dns/sheerdns/sheerdns-1.0.3.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="Sheerdns is a small, simple, fast master only DNS server"
+HOMEPAGE="http://threading.2038bug.com/sheerdns/"
+SRC_URI="http://threading.2038bug.com/sheerdns/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+DEPEND=""
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ # Fix multilib support
+ sed -i "/^CFLAGS/s:usr/lib:usr/$(get_libdir):" Makefile
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) || die
+}
+
+src_install() {
+ dodoc ChangeLog
+ doman sheerdns.8
+ dosbin sheerdns sheerdnshash
+}
diff --git a/net-dns/tinystats/Manifest b/net-dns/tinystats/Manifest
new file mode 100644
index 000000000000..03f66a82530e
--- /dev/null
+++ b/net-dns/tinystats/Manifest
@@ -0,0 +1,5 @@
+DIST tinystats-1.1.tar.gz 8102 SHA256 84b46ecc2c136cd286f24593dff6e0e9dacf5ca92a48193ee95455151c077957 SHA512 62791ee6cd759eb535e19b8c2901059ec6b335d79d3997ba6fa437927b18902cdeb73fb830b804b0bcfa48e75bb150ffa793a4412cd2e1dafebe6ca861be8e23 WHIRLPOOL c37276cefe4c16122c3f3d789b4151f3785dd0cb91915c4fc798eef62b7e97ef429797c8d285e4a7f6b807d8b12062fa283cbe30c18ed88ee635dafe66b757f0
+EBUILD tinystats-1.1.ebuild 709 SHA256 fcce66bd6cd979a663ef5d4b1852bd602ba01baba2fd20fccbf2794fbf9c7458 SHA512 f578b839d1481c4f5057754035bb58acd3ee0ad5c9079dc5f04d40dec4cdce6e3563b33009ed29624f64f6f8eb32a4d141d2d647cb12e3520b63b1e6534411cd WHIRLPOOL 7e0c071d5d613a6129452bb10da4d7deeb0d72a1456a39e31f8cd49ead00e664a9cd8f95b19262da008bdffcc779f1fbc195fb0d52158951460f9933915979ea
+MISC ChangeLog 2523 SHA256 ff92659be8d9f097f07b7a420e08db49da1388fa8c56ea0993367142024e42dd SHA512 511333ce624a10a61eb01caa5f91c82515f941c4e97a71d7f1ad7271b4362addd78edb7c04364cb40bac80156a2b8bb5d83b943b65dcc6fe79021dc2464b5d10 WHIRLPOOL 914fe7a6ee0df5c3c62df7371cb975d7333ccf13f74c844c471b63ae9d73023781178c97216fd934eccfee8718d384060306866c08070a79e9dc02c2a74f9834
+MISC ChangeLog-2015 914 SHA256 6525e61310d9993bf0e0f9d88fee1db33a6812d4582942ab0059470ccdbc5aa7 SHA512 55af242d4a94ddd74ca6cf7b3885ee290bb2b9db601ddd634a29bb8873f89dff7a0b53fad889929962148af3590a0e88f404be278e6874253df6f85de9f8cdec WHIRLPOOL a7128e691704fe81f9126bb42588a50ca8167d6b36f3eb97d2c7101b733ce81cb8a057e43f1737bd1aca42e7da418c21b44165202416ffbb23446163f50f50f0
+MISC metadata.xml 330 SHA256 81c4f5802aae3c06362fe78518130ff9fdadc5882b4d5c2269be11fb9d5e7b50 SHA512 2e9a09f3f2ccee2b639c468cd1b025f27c6095a29265cc2e9e1947a011593b9a9287265737fa7015a8aa8d5b5a73c724b92827228f1387ff6c7ef5a45a15a7da WHIRLPOOL 819ea33eeeb35ce7a950b4b4245dd9117789036a2f7bb4821fd45fa5c398a8b5bfe4d650c70cc2436afe94180b6ca6cad010107cbc114a8ba743f2f0fff2f172
diff --git a/net-dns/tinystats/metadata.xml b/net-dns/tinystats/metadata.xml
new file mode 100644
index 000000000000..7998a88c5476
--- /dev/null
+++ b/net-dns/tinystats/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription lang="en">tinystats is a filter that reads tinydns logs and stores stats
+about query types and errors of your authoritative dns.</longdescription>
+</pkgmetadata>
diff --git a/net-dns/tinystats/tinystats-1.1.ebuild b/net-dns/tinystats/tinystats-1.1.ebuild
new file mode 100644
index 000000000000..1b35725a547d
--- /dev/null
+++ b/net-dns/tinystats/tinystats-1.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit toolchain-funcs
+
+DESCRIPTION="A tinydns logging helper app"
+HOMEPAGE="http://www.morettoni.net/tinystats.en.html"
+SRC_URI="http://www.morettoni.net/bsd/${P}.tar.gz"
+IUSE="ipv6"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~x86"
+RDEPEND="net-dns/djbdns"
+S=${WORKDIR}/${PN}
+
+src_compile() {
+ use ipv6 && IPV6="-D WITH_IPV6"
+ $(tc-getCC) ${CFLAGS} ${IPV6} -o tinystats ${LDFLAGS} tinystats.c || \
+ die "compile failed"
+}
+
+src_install() {
+ dobin tinystats || die 'dobin failed'
+ dodoc README
+ docinto sample
+ dodoc start_slave.sh.sample update_slave.sh.sample \
+ tinydns.log.run.sample tinydns.sh.sample
+}
diff --git a/net-dns/totd/Manifest b/net-dns/totd/Manifest
new file mode 100644
index 000000000000..b6d82a82a8a9
--- /dev/null
+++ b/net-dns/totd/Manifest
@@ -0,0 +1,7 @@
+AUX totd 703 SHA256 1bc60cc6a32b0a72b0cab0b64cef455de679c46afa6161cfd5abb1c761cb0f36 SHA512 1ff0bf4969a2670147646590e5f33f6dfbebc1e3e03b3d544f03567867f439b386695020766a6433a411664ea0ec64a4e816794a7cff9172ff6ea546d888a4b9 WHIRLPOOL cf8589f770de4eb9b974b5acb215d61ea2bb6e97d871286c850d50557b8607f687bd1af234504d362e496cdb43ad642fd737027998f10a64e504aea774ebc99f
+AUX totd-1.5.1-no_werror.patch 528 SHA256 2f33c9d1a6e18e8e889c4b47291a177b0d99dc09b6fa52995feed11c6c8b6149 SHA512 ae7dc467c1e404c705502b256635c62a80e6f087878af64e8a3d8367abad053fcfc1d2d1da47a772e57bd669bd26c409302b808eed2fe69bd64d3483c1f5c30c WHIRLPOOL 76d939dbbb53773257e93e36e1388cc80aa6086739a422ea04de51087bddfcad85b1fb9f475ab9e347c8d3bd7429972a42f77b01d4f89fb499cabd8c37479a3e
+DIST totd-1.5.1.tar.gz 235809 SHA256 1a09ef6dcf382beea3546eec3138eadfbaeec198a6f921c96e8937e91a1e06fa SHA512 47087fd0478bc2952b25a0952ffb7273e4fdebda019f61fd0bad3c0305ab8f6e32b8f8dd042364f9ae6e6bd31c223e8fd3b17e3b4d44219fd6509f530f56025a WHIRLPOOL 6ea01380cc9306937b919fefcc8f6eb7e8cc2c7992d391457ef08648c8379b419e92ffb9fd581bee57ec12780b32316d380606adb01c422bb28a2df966d74901
+EBUILD totd-1.5.1.ebuild 905 SHA256 00716d4eb25e743a3fe78dc1bc0852b62dd83273bbdd6504ad8210dc190139f3 SHA512 ca5087f4228d05228190dd158cd2972709a6c119cf38cb2ab991e26c7088d6d7b42daed91cf6e85a653e28c43485f480e50d9c57353351915d310d494b10107d WHIRLPOOL 5d0b179da614e65c93319687b38009734baed5d5cbfade4d2ecb3adefe1aa03d183da181790417da43bfb29062dbe24211c7aedd4f3116b8bfcf94131762b1c2
+MISC ChangeLog 2448 SHA256 e85ddcb989da947b7ba105db5db2dc15f7530f3985b84a756297bf12c0ef40c6 SHA512 6dfa12a5a3e534c6f1251c3a8045a4820c4c1af73dee3282329ee6ab23461729898639aa5aa1f3862e6cceaf6368f3b562f0201660665d6d051b3281215d419e WHIRLPOOL 7b228892b7ec3343587c96834bc5345733b5ec50e2dad1eefd9fa4c7c561769aafc3a01d7c4b5c87f88b7406c94cb4543f5a104ad5356ed69044261178f86b3a
+MISC ChangeLog-2015 2111 SHA256 07f035f90d5136e45b3a8a1c579db01528d99b1775c921fa797a851f70fbf981 SHA512 d0596394dfa073035c893172d1e25a8145cfdee1430a2db396858e1061b320445b169e8c40606e5126fe130da8764250841edfb65584aa215f0d2cdbc7868105 WHIRLPOOL d00af7b44bc1115ba38924edce31be81d323645fac984986b8b6df7b63f28e8181e323d985bf3f44a5a1267d322259f18bfccda7179da22d0567e1d8932c0dea
+MISC metadata.xml 471 SHA256 33484338c8bc4b7d63e8b71e0972e48fad50ce26d6e9a186fca8934fd8b75895 SHA512 95d9e3644841041c2a873f098bc1fc79ba53f205edd0af389792f5c544e794ab8883a6f1dfc1de98b110fc3b04185e610c2ee67b7bea4d4878a7d3e6557c30f7 WHIRLPOOL 76012bc656f4db8dacbdfd84c28ffe92e301d28dd935a0a3940cdc1f60a6e982d5cc11b72cdd9311bc9c65b5dcef3facd9991f13b8e0cac0d7d679f0853f8325
diff --git a/net-dns/totd/files/totd b/net-dns/totd/files/totd
new file mode 100644
index 000000000000..79d410acb013
--- /dev/null
+++ b/net-dns/totd/files/totd
@@ -0,0 +1,38 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f /etc/totd.conf ]
+ then
+ eerror "The config file /etc/totd.conf does not exist."
+ return 1
+ else
+ return 0
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting totd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/totd
+ eend $?
+}
+
+stop() {
+ local pid_file
+ pid_file="`grep ^pidfile /etc/totd.conf | cut -f2 -d ' '`"
+ ebegin "Stopping totd"
+ if [ -n "$pid_file" ]
+ then
+ start-stop-daemon --stop --quiet --pidfile $pid_file
+ else
+ start-stop-daemon --stop --quiet --pidfile /var/run/totd.pid
+ fi
+ eend $?
+}
diff --git a/net-dns/totd/files/totd-1.5.1-no_werror.patch b/net-dns/totd/files/totd-1.5.1-no_werror.patch
new file mode 100644
index 000000000000..246e709d5109
--- /dev/null
+++ b/net-dns/totd/files/totd-1.5.1-no_werror.patch
@@ -0,0 +1,11 @@
+--- totd-1.5.1/Makefile.in 2005-01-31 12:55:14.000000000 +0100
++++ totd-1.5.1_new/Makefile.in 2007-06-30 22:51:07.000000000 +0200
+@@ -19,7 +19,7 @@
+
+ INSTALL = /usr/bin/install
+
+-CFLAGS = @CFLAGS@ @DEFS@ -Werror -Wall -DTOTCONF=\"$(TOT_CONFIG_FILE)\" @OPTFLAGS@ $(INCLUDEPATH)
++CFLAGS = @CFLAGS@ @DEFS@ -Wall -DTOTCONF=\"$(TOT_CONFIG_FILE)\" @OPTFLAGS@ $(INCLUDEPATH)
+
+ # When debugging is enabled by --enable-malloc-debug flag to the configure
+ # script, the @DBMALLOC@ substitution will contain the empty string, thus
diff --git a/net-dns/totd/metadata.xml b/net-dns/totd/metadata.xml
new file mode 100644
index 000000000000..d71991b3359b
--- /dev/null
+++ b/net-dns/totd/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <longdescription lang="en">
+ Totd ( Trick Or Treat Daemon ) is a small DNS proxy nameserver that
+ supports IPv6 only hosts/networks that communicate with the IPv4 world
+ using some translation mechanism.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-dns/totd/totd-1.5.1.ebuild b/net-dns/totd/totd-1.5.1.ebuild
new file mode 100644
index 000000000000..8cb983f4b008
--- /dev/null
+++ b/net-dns/totd/totd-1.5.1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Trick Or Treat Daemon, a DNS proxy for 6to4"
+HOMEPAGE="http://www.dillema.net/software/totd.html"
+SRC_URI="http://www.dillema.net/software/${PN}/${P}.tar.gz"
+
+LICENSE="totd BSD BSD-4"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no_werror.patch
+}
+
+src_configure() {
+ econf \
+ --enable-ipv4 \
+ --enable-ipv6 \
+ --enable-stf \
+ --enable-scoped-rewrite \
+ --disable-http-server
+}
+
+src_install() {
+ dosbin totd
+ doman totd.8
+ dodoc totd.conf.sample README INSTALL
+
+ doinitd "${FILESDIR}"/totd
+}
+
+pkg_postinst() {
+ elog "The totd.conf.sample file in /usr/share/doc/${P}/ contains"
+ elog "a sample config file for totd. Make sure you create"
+ elog "/etc/totd.conf with the necessary configurations"
+}
diff --git a/net-dns/unbound/Manifest b/net-dns/unbound/Manifest
new file mode 100644
index 000000000000..04f249ff7fbd
--- /dev/null
+++ b/net-dns/unbound/Manifest
@@ -0,0 +1,22 @@
+AUX 0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch 2032 SHA256 b5312b80a37501198345214a7eeaf589340ab698dc3390e3addb146c35f2e9b6 SHA512 1a28fca9fa39cf4c07e2f9b75058ca1d00a176ab4f0b96130fbe4773f503f39f7f16518e82f58d289001dd468e53e54f1e208e99eec713fda0efd35517c4bcb3 WHIRLPOOL 7f630f1c7b0be788a4a288501fb47065b31a8afb9b4d462122e01c01f7be9f8575aa141502fc83d57c6f330a0d8a3f8423489452f878fb6314868c6e2586204c
+AUX unbound-1.4.12-gentoo.patch 639 SHA256 8223261764f067355a5c013b2c8b13384480c91782fc42ae339dcc8bed843448 SHA512 81292d898284c27e0b30a90816d283d2fffd5810afb38b5a79ff4acc94d82c91bd5414d177f11745c5ee7e56d1600a67bdc4d7395504ff6266103b4e018baf6c WHIRLPOOL 29fb59e16d8f3f4e4d6029f2b3ec6dfd3665c366f3842b318a80b5721a9770b7fd47ad5e0169ab9539f87ed49d03a282f47507754c09cf17ea0d99705f1860c0
+AUX unbound-1.5.7-trust-anchor-file.patch 632 SHA256 787630b5111e70daa7f6fe2c9a8c8524b94c1ee51b5f2c045cee4e4db778cfe6 SHA512 fe9cb259a17452ab84df98eb8caaaa389e40e149e4de6f1245e78c350d1c6af42d1b094be6779ec19ce5ea11f86e102ae9767c8785d54cfa9746390c73e0f329 WHIRLPOOL 8b044dc717461a8d321394d7668fbd338e957cd3f8dc3e0bb2c4e5b90b8ab83e349edc4a1955080d0724585f8fbe535a4edb5a943e6e36c8188c770b6d215fe5
+AUX unbound-anchor.service 263 SHA256 cbb233e37b5136ab089a909472bfb0b58185f138df974a8abc9121d86cf2ba17 SHA512 c0f8ff2df106d1f05786cf5d69b48cdf69ba2fd42645bf6b7fa2d34d6c3fdd1608fb470c4fb0216164386e8b22977292ae8932c784a6967774e3daae1b8aeb95 WHIRLPOOL 0fa95e2d8113f9940b89c3c26194b37ab99a85f7ffb699240e6bad32213565c614a4f41d88e08d4b0a15e5a8b0b6a81a029d0f8dac9f7b36763ed3c5b18b0b05
+AUX unbound.confd 171 SHA256 7da812ef83f8f8b9351363525ab6bebd5348faed76d0ae424dcbd7cb6a830dfd SHA512 e3e4c7f97c13d133724417a70e4f20dac6f1f4b5a4e2e573c410148059d9f722589249b3dd4668069d4e324abef60f5981f20b1797623f37db9c9422410dc13f WHIRLPOOL d88c7542891ea7420253598c1fb94982a01d378aacf26a75c28650acc6f0093f526e0fab51f8e1b60681809bd253f765f8f73aa205bef5c4949766861f410ca5
+AUX unbound.initd 1370 SHA256 fe18b49ea3c50bf17343581599953dac1cc190d1ea9aab1e69eab0b295420c76 SHA512 ee28d0fdc0abd10fbdeb3d2d01a6f06f4bfa83c78f0d64290cf187a76b31fee8f838c051ae962d90bf7c154678c3f866161564257f1834454e681775fd82fc49 WHIRLPOOL bb772ee2d1681ce69efc07e9afbd6791cda1c90ccac52da7081e4346cbd2c365eb307391061dbd63b792ad8977d059e3cf33f0ad8efd56cec8b4c5547c9c77da
+AUX unbound.service 247 SHA256 6c12373b61f136edd95bea3dc6b7f56499de83aae7c925aee30e6db99051d72d SHA512 7904225d0e9fb3ea5b97521ed24f24fcc4db650cfff8523b896ddd9edfccbd61e817775ad0449acf30d02dba5f714d633b60cace6010d472f438df7c22381dfc WHIRLPOOL c156a2b96e1c1a6d787ee7c143b8c5cd8bf00b9e8cb00f90a5113ecd502f4d5fa2f0249debd10ef7f15d38d33f5d1c9ac4c15c61485f227fa70cd42af696ee3d
+AUX unbound.socket 101 SHA256 9bc0b128f4b275e67fc404eddf7c44e2e72c390128c836508394d57fe663a719 SHA512 935ab3bd5bc3d3347e44c20482aa19396d243b89f2dbc7bf9f89b16a2559715866e16dfd9f5c4866222d8ee968f158a773475d94629f0ef9fa9b8fd23f0fbc2e WHIRLPOOL 3111c10ad16f9b776ba5b19c38c11caea8100daa3c69e9cb8d97d1725937f0fa7da488a3a5a6ffba9793337538e142dc2fe4ff6130c441ff6e474fc5c538d698
+AUX unbound_at.service 304 SHA256 6d8dfaf740f47af87bf521e871d824aefa10c702f724ae57998656b443fb8675 SHA512 71bd8c422ffe57e448b66f97775075a407671757266d40294a670b41cd1a59f16b65488d30aa74b79b7536f0c4c50adb56e32377e8029fd6c327b85c022c5fe3 WHIRLPOOL c304eec4a9293b92499b6895c57b7553a3d0247a00eed7f8299f4d0b2b7d24a33ca383125270b0616d826f71fa5e800e1a0b32c38316f03d806a2399dfb3cbcd
+DIST unbound-1.5.1.tar.gz 4805176 SHA256 0ff82709fb2bd7ecbde8dbdcf60fa417d2b43379570a3d460193a76a169900ec SHA512 85d7069cf47709aceb7d9457c8befb1b327adfb098d8aa98082fc9bf710274e8ba86b56d796c86917639bb7e57ab5c40af1bc79090de038c6375be2c3877e0c4 WHIRLPOOL e23f7d399a1f01da5aec98ff0fa3b377e8a76789d237ceaf0e9146c96a97088716a0ec6c0f68f95f57af16743e73c1bc7209889a04a698bf7aa5d0706c7514f5
+DIST unbound-1.5.10.tar.gz 4941299 SHA256 a39b8b4fcca2a2b35a2daa53fe35150cc3f09038dc9acede09c912fc248a9486 SHA512 1c413886a12d4b626e03e076da6b9ccbcc8fd4769649fef8895eca74199bc22aec33c026e777524e8fe0327045a194f79b52282fe40674a9fb15cac58c4493f6 WHIRLPOOL 4e4ef7e4a89a6d8cd7b359a38cfb8a5cd99ea4e59a89ab894181b149346cf1e2875ec6b2af0985925cc50ff1c2f50fbfe569569ead2913127631781003c84742
+DIST unbound-1.6.3.tar.gz 5381240 SHA256 4c7e655c1d0d2d133fdeb81bc1ab3aa5c155700f66c9f5fb53fa6a5c3ea9845f SHA512 1d84fcc4c4b2a2b5cce6540cf252ff964f4acae3b6567c61cee69b76c6cee3e00270b1f7cc7ad83a2754afb33cc199c8b6e8116e5b587811714398b1d34de8a3 WHIRLPOOL c4cc7b45686bb3e5128f8c2e28b6e87867b983e01c53d336d85f342dc84e5c9a01491a7325f8290620a02ff9323173f433892f114ee5f4350cf41e91bbc74831
+DIST unbound-1.6.4.tar.gz 5477897 SHA256 df0a88816ec31ccb8284c9eb132e1166fbf6d9cde71fbc4b8cd08a91ee777fed SHA512 1abf50552c97b304884f07372f9fb05f9f30354647cf5299192deac81fa28a41d89d84ee092baef644a6069d0f545d36e7e814c9b8f83f21a7a53572d9a91907 WHIRLPOOL 36cadfa940ae121ab0d261fa70b91114462aeb56b0c3b1505e58a307248d4741a040b1cecd62ad42e95958798b7aa5331c45cc879d83298318d9eee184de8a17
+DIST unbound-1.6.6.tar.gz 5460482 SHA256 972b14dc33093e672652a7b2b5f159bab2198b0fe9c9e1c5707e1895d4d4b390 SHA512 910fd0956b8828d3db0511a85bf6ab6c4c3982f17c70ccb7123d1de1650d24c2906bc29ac4ea83fd7d95d8af29e2cbc88df666f365e51296f552292ef9753016 WHIRLPOOL 0aff265050876defa900303c152f643258dd26b9c1fd4abdd901a849fe96481b488cafdd834dbca73b769dff19971300b5ae4798e3286c17bc5b24f70beb7a83
+EBUILD unbound-1.5.1-r2.ebuild 3427 SHA256 ef825ebe8f6e5b0e5fefdd687201ea56e573728dcbc9f711e2a2eea2b9726481 SHA512 d3630f81fd44b40f5deb155473dc5835cc68e444be26afd0207fa734f285b566694b92dc073185cb24c9588a0ca5cb9ebf9c9268c2725c24a6c61d7ca73d1bcf WHIRLPOOL dd17fc532fe0d1469e6c4d4fe47a6c32ca775fdde2c9d444c71d0241595be8c84e5434a925d1cfc6ce293fb401bfccc65d555c50ad272b3fd00a2af46c184b68
+EBUILD unbound-1.5.10.ebuild 3465 SHA256 6bdb4b942c097a199169f936b044f5ca54dae40fb13ecb1d5a9b02a22d62fbd1 SHA512 28fb9da2c9bf08fbdd8e440c7c0f61da5ef25f7ca179b18e7c189e5c23f70dea295e1dd9b0fa289c75f5a4ee24ed9e1b3248f62fb0dc05d78068f22c00d100a7 WHIRLPOOL 3ab215abb5e4826b1cbd4ae550be68ad06da04fd2f6781ccee41807dfa3386d3a3d31bdc966eda6c1e38fc0d7fb250f00608bb9f9543664c5ec08fc11fd0a6c7
+EBUILD unbound-1.6.3.ebuild 3669 SHA256 6e81fc507a65073bcc3a6ca5b9f9c5f23bab2d12867effc11561e417437e419f SHA512 d7d1035bab213ff950883ecac04f7c3ff972b6f83465a2c09afba1339ef1e74e560cb9cc818800d02a79462d2b857832596bc80b2088b5db9083f82a9032a5a6 WHIRLPOOL 403ad626abf7780baef05cf0379b50fbff64c54c82fc08fa4eb8b62fe08c46e0b398dbf0452290dcb887091b76cb4daa2a86ee882a7d8e69bfd4321880662c0c
+EBUILD unbound-1.6.4.ebuild 3669 SHA256 6e81fc507a65073bcc3a6ca5b9f9c5f23bab2d12867effc11561e417437e419f SHA512 d7d1035bab213ff950883ecac04f7c3ff972b6f83465a2c09afba1339ef1e74e560cb9cc818800d02a79462d2b857832596bc80b2088b5db9083f82a9032a5a6 WHIRLPOOL 403ad626abf7780baef05cf0379b50fbff64c54c82fc08fa4eb8b62fe08c46e0b398dbf0452290dcb887091b76cb4daa2a86ee882a7d8e69bfd4321880662c0c
+EBUILD unbound-1.6.6.ebuild 3676 SHA256 8d2ec13b1eabc2d9adaaec9ebce3c02a31e69b5701ce8361bd5d5bb90f4410df SHA512 112962ccdb8e60f8fb195061e607c449416355bcc5524a7bd6df2964d5a1508d4ddd7f5969b9f2b2e3b0acefc4fa7b6f687ef634cbcf24dc416cecfd9964dc7d WHIRLPOOL bc25f1e89eb85cf2b98dc4fca4a4cea07a04ed0dde33227e022f125a1bad4cfce214a4803319423c1ce2b7a3c3cc65bbb02668e539154fceccb673128522aa8a
+MISC ChangeLog 4993 SHA256 f53fa7175ae0b710ddb0df108b922db89f4449ec5a9b674134629be88164cba9 SHA512 336d83dc5de953102832d944a4ec0df67624a998da034863fac513094ddc08f903a98d7c1b3c255619e4d8b7f6544185f3372cec32c81c0ae406280e4a891042 WHIRLPOOL 8b367cc1e7547c94f2d52c6ff5f2a334dfc78087789e00bb5ad0bfaf9c6ff6e5f91afac6188c28ef5e396104f4dc65f567bfccf847cab9338e91850b76e62780
+MISC ChangeLog-2015 14623 SHA256 5aa53f86707049ae9653275aa1607755fd461a8cea88b2389febaf920423947f SHA512 1081e4336632d07cb6999dd3a09081bc69115139d14ee19c93e9bd282891cfa2695831cd0cf56ec0ce1c2afc10adaa4e3e0d0e3a804c5062cecf965342e6bb96 WHIRLPOOL c7f367a9ead9954dab00363b0e965eb25100c23d35a11371856daec8eb3c14770f0afa6956ef0cc70a57f6308209eb380150f0f8d6441f671ac36ac3695374ec
+MISC metadata.xml 1320 SHA256 6b777d45f60b6c9650a3ff8f3ff27032ee3533c13b9e58a4ba4c798a89aaeb07 SHA512 d9b83f4424bf5cf789ecbc44a0f1a8092dfe84409ae4416653a19cfceb3b544c23161b183d37e1cfaf436a5683e74908a0234fccc80c411455338e705548549f WHIRLPOOL ceaa79330a14546188def51da229062d020fd52d80e765d2b19f4aba69a1e7230ed8fc7fc4d887a1dbc9b6136eb6b42e0889d9d340df38c7958b4c1d710eca1a
diff --git a/net-dns/unbound/files/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch b/net-dns/unbound/files/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch
new file mode 100644
index 000000000000..c1be28cbc0db
--- /dev/null
+++ b/net-dns/unbound/files/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch
@@ -0,0 +1,72 @@
+From 858da540f70a4411ad8fbe7144cef6ce9da18f89 Mon Sep 17 00:00:00 2001
+From: wouter <wouter@be551aaa-1e26-0410-a405-d3ace91eadb9>
+Date: Mon, 5 Jan 2015 13:51:22 +0000
+Subject: [PATCH] - Fix #634: fix fail to start on Linux LTS 3.14.X, ignores
+ missing IP_MTU_DISCOVER OMIT option.
+
+--- a/services/listen_dnsport.c
++++ b/services/listen_dnsport.c
+@@ -368,29 +368,47 @@ create_udp_sock(int family, int socktype, struct sockaddr* addr,
+ * (and also uses the interface mtu to determine the size of the packets).
+ * So there won't be any EMSGSIZE error. Against DNS fragmentation attacks.
+ * FreeBSD already has same semantics without setting the option. */
+-# if defined(IP_PMTUDISC_OMIT)
+- int action = IP_PMTUDISC_OMIT;
+-# else
+- int action = IP_PMTUDISC_DONT;
+-# endif
++ int omit_set = 0;
++ int action;
++# if defined(IP_PMTUDISC_OMIT)
++ action = IP_PMTUDISC_OMIT;
+ if (setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER,
+ &action, (socklen_t)sizeof(action)) < 0) {
+- log_err("setsockopt(..., IP_MTU_DISCOVER, "
+-# if defined(IP_PMTUDISC_OMIT)
+- "IP_PMTUDISC_OMIT"
++
++ if (errno != EINVAL) {
++ log_err("setsockopt(..., IP_MTU_DISCOVER, IP_PMTUDISC_OMIT...) failed: %s",
++ strerror(errno));
++
++# ifndef USE_WINSOCK
++ close(s);
+ # else
+- "IP_PMTUDISC_DONT"
++ closesocket(s);
+ # endif
+- "...) failed: %s",
+- strerror(errno));
++ *noproto = 0;
++ *inuse = 0;
++ return -1;
++ }
++ }
++ else
++ {
++ omit_set = 1;
++ }
++# endif
++ if (omit_set == 0) {
++ action = IP_PMTUDISC_DONT;
++ if (setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER,
++ &action, (socklen_t)sizeof(action)) < 0) {
++ log_err("setsockopt(..., IP_MTU_DISCOVER, IP_PMTUDISC_DONT...) failed: %s",
++ strerror(errno));
+ # ifndef USE_WINSOCK
+- close(s);
++ close(s);
+ # else
+- closesocket(s);
++ closesocket(s);
+ # endif
+- *noproto = 0;
+- *inuse = 0;
+- return -1;
++ *noproto = 0;
++ *inuse = 0;
++ return -1;
++ }
+ }
+ # elif defined(IP_DONTFRAG)
+ int off = 0;
diff --git a/net-dns/unbound/files/unbound-1.4.12-gentoo.patch b/net-dns/unbound/files/unbound-1.4.12-gentoo.patch
new file mode 100644
index 000000000000..57920689783e
--- /dev/null
+++ b/net-dns/unbound/files/unbound-1.4.12-gentoo.patch
@@ -0,0 +1,12 @@
+diff -Naur unbound-1.4.12.orig/doc/example.conf.in unbound-1.4.12/doc/example.conf.in
+--- unbound-1.4.12.orig/doc/example.conf.in 2011-07-14 17:33:37.000000000 +0900
++++ unbound-1.4.12/doc/example.conf.in 2011-07-16 10:01:06.644402341 +0900
+@@ -334,7 +334,7 @@
+ # with several entries, one file per entry.
+ # Zone file format, with DS and DNSKEY entries.
+ # Note this gets out of date, use auto-trust-anchor-file please.
+- # trust-anchor-file: ""
++ # trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@"
+
+ # Trusted key for validation. DS or DNSKEY. specify the RR on a
+ # single line, surrounded by "". TTL is ignored. class is IN default.
diff --git a/net-dns/unbound/files/unbound-1.5.7-trust-anchor-file.patch b/net-dns/unbound/files/unbound-1.5.7-trust-anchor-file.patch
new file mode 100644
index 000000000000..c4c0ffa3d6d1
--- /dev/null
+++ b/net-dns/unbound/files/unbound-1.5.7-trust-anchor-file.patch
@@ -0,0 +1,12 @@
+diff -ur unbound-1.5.7.orig/doc/example.conf.in unbound-1.5.7/doc/example.conf.in
+--- unbound-1.5.7.orig/doc/example.conf.in 2015-12-10 08:59:18.000000000 +0100
++++ unbound-1.5.7/doc/example.conf.in 2016-01-05 04:08:01.666760015 +0100
+@@ -378,7 +378,7 @@
+ # with several entries, one file per entry.
+ # Zone file format, with DS and DNSKEY entries.
+ # Note this gets out of date, use auto-trust-anchor-file please.
+- # trust-anchor-file: ""
++ # trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@"
+
+ # Trusted key for validation. DS or DNSKEY. specify the RR on a
+ # single line, surrounded by "". TTL is ignored. class is IN default.
diff --git a/net-dns/unbound/files/unbound-anchor.service b/net-dns/unbound/files/unbound-anchor.service
new file mode 100644
index 000000000000..f55cf9db5d1e
--- /dev/null
+++ b/net-dns/unbound/files/unbound-anchor.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Update of the root trust anchor for DNSSEC validation
+After=network.target
+Before=nss-lookup.target
+Wants=nss-lookup.target
+Before=unbound.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/unbound-anchor
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/unbound/files/unbound.confd b/net-dns/unbound/files/unbound.confd
new file mode 100644
index 000000000000..b4de7cf1142e
--- /dev/null
+++ b/net-dns/unbound/files/unbound.confd
@@ -0,0 +1,4 @@
+# Settings should normally not need any changes.
+
+# Location of the unbound configuration file. Leave empty for the default.
+#UNBOUND_CONFFILE="/etc/unbound/unbound.conf"
diff --git a/net-dns/unbound/files/unbound.initd b/net-dns/unbound/files/unbound.initd
new file mode 100644
index 000000000000..b295f285dd1e
--- /dev/null
+++ b/net-dns/unbound/files/unbound.initd
@@ -0,0 +1,55 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+name="unbound daemon"
+extra_commands="configtest"
+extra_started_commands="reload"
+description="unbound is a Domain Name Server (DNS) that is used to resolve host names to IP address."
+description_configtest="Run syntax tests for configuration files only."
+description_reload="Kills all children and reloads the configuration."
+
+
+UNBOUND_BINARY=${UNBOUND_BINARY:-/usr/sbin/unbound}
+UNBOUND_CHECKCONF=${UNBOUND_CHECKCONF:-/usr/sbin/unbound-checkconf}
+UNBOUND_CONFFILE=${UNBOUND_CONFFILE:-/etc/unbound/${SVCNAME}.conf}
+
+depend() {
+ need net
+ use logger
+ provide dns
+ after auth-dns
+}
+
+checkconfig() {
+ UNBOUND_PIDFILE=$("${UNBOUND_CHECKCONF}" -o pidfile "${UNBOUND_CONFFILE}")
+ return $?
+}
+
+configtest() {
+ ebegin "Checking ${SVCNAME} configuration"
+ checkconfig
+ eend $?
+}
+
+start() {
+ checkconfig || return $?
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --pidfile "${UNBOUND_PIDFILE}" \
+ --exec "${UNBOUND_BINARY}" -- -c "${UNBOUND_CONFFILE}"
+ eend $?
+}
+
+stop() {
+ checkconfig || return $?
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile "${UNBOUND_PIDFILE}"
+ eend $?
+}
+
+reload() {
+ checkconfig || return $?
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile "${UNBOUND_PIDFILE}"
+ eend $?
+}
diff --git a/net-dns/unbound/files/unbound.service b/net-dns/unbound/files/unbound.service
new file mode 100644
index 000000000000..41dd6fabd290
--- /dev/null
+++ b/net-dns/unbound/files/unbound.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Unbound recursive Domain Name Server
+After=network.target
+Before=nss-lookup.target
+Wants=nss-lookup.target
+
+[Service]
+ExecStartPre=/usr/sbin/unbound-checkconf
+ExecStart=/usr/sbin/unbound -d
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/unbound/files/unbound.socket b/net-dns/unbound/files/unbound.socket
new file mode 100644
index 000000000000..0628064a4a5e
--- /dev/null
+++ b/net-dns/unbound/files/unbound.socket
@@ -0,0 +1,5 @@
+[Socket]
+ListenDatagram=127.0.0.1:1153
+ListenStream=127.0.0.1:1153
+[Install]
+WantedBy=sockets.target
diff --git a/net-dns/unbound/files/unbound_at.service b/net-dns/unbound/files/unbound_at.service
new file mode 100644
index 000000000000..84b34af45446
--- /dev/null
+++ b/net-dns/unbound/files/unbound_at.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Unbound recursive Domain Name Server
+After=network.target
+Before=nss-lookup.target
+Wants=nss-lookup.target
+
+[Service]
+Type=simple
+ExecStartPre=/usr/sbin/unbound-checkconf /etc/unbound/%i.conf
+ExecStart=/usr/sbin/unbound -d -c /etc/unbound/%i.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/unbound/metadata.xml b/net-dns/unbound/metadata.xml
new file mode 100644
index 000000000000..f12c6693d624
--- /dev/null
+++ b/net-dns/unbound/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mschiff@gentoo.org</email>
+ <name>Marc Schiffbauer</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>nabeken@tknetworks.org</email>
+ <description>Proxied developer. Please CC on bugs.</description>
+ <name>TANABE Ken-ichi</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ Unbound is a validating, recursive, and caching DNS resolver.
+
+ The C implementation of Unbound is developed and maintained by NLnet
+ Labs. It is based on ideas and algorithms taken from a java prototype
+ developed by Verisign labs, Nominet, Kirei and ep.net.
+
+ Unbound is designed as a set of modular components, so that also
+ DNSSEC (secure DNS) validation and stub-resolvers (that do not run
+ as a server, but are linked into an application) are easily possible.
+ </longdescription>
+ <use>
+ <flag name="dnscrypt">Enable DNSCrypt support</flag>
+ <flag name="dnstap">Enable dnstap support</flag>
+ <flag name="ecdsa">Enable ECDSA support</flag>
+ <flag name="gost">Enable GOST support</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/unbound/unbound-1.5.1-r2.ebuild b/net-dns/unbound/unbound-1.5.1-r2.ebuild
new file mode 100644
index 000000000000..eeb41c65a8f5
--- /dev/null
+++ b/net-dns/unbound/unbound-1.5.1-r2.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic multilib-minimal python-single-r1 systemd user
+
+MY_P=${PN}-${PV/_/}
+DESCRIPTION="A validating, recursive and caching DNS resolver"
+HOMEPAGE="http://unbound.net/"
+SRC_URI="http://unbound.net/downloads/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ppc ppc64 x86"
+IUSE="debug dnstap +ecdsa gost python selinux static-libs test threads"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+# Note: expat is needed by executable only but the Makefile is custom
+# and doesn't make it possible to easily install the library without
+# the executables. MULTILIB_USEDEP may be dropped once build system
+# is fixed.
+
+CDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
+ >=dev-libs/libevent-2.0.21[${MULTILIB_USEDEP}]
+ >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}]
+ dnstap? (
+ dev-libs/fstrm[${MULTILIB_USEDEP}]
+ >=dev-libs/protobuf-c-1.0.2-r1[${MULTILIB_USEDEP}]
+ )
+ ecdsa? ( dev-libs/openssl:0[-bindist] )
+ python? ( ${PYTHON_DEPS} )"
+
+DEPEND="${CDEPEND}
+ python? ( dev-lang/swig )
+ test? (
+ net-dns/ldns-utils[examples]
+ dev-util/splint
+ app-text/wdiff
+ )"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-bind )"
+
+# bug #347415
+RDEPEND="${RDEPEND}
+ net-dns/dnssec-root"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup unbound
+ enewuser unbound -1 -1 /etc/unbound unbound
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # To avoid below error messages, set 'trust-anchor-file' to same value in
+ # 'auto-trust-anchor-file'.
+ # [23109:0] error: Could not open autotrust file for writing,
+ # /etc/dnssec/root-anchors.txt: Permission denied
+ epatch "${FILESDIR}"/${PN}-1.4.12-gentoo.patch
+ epatch "${FILESDIR}"/0001-fix-fail-to-start-on-Linux-LTS-3.14.X-ignore.patch
+
+ # required for the python part
+ multilib_copy_sources
+}
+
+src_configure() {
+ [[ ${CHOST} == *-darwin* ]] || append-ldflags -Wl,-z,noexecstack
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable gost) \
+ $(use_enable dnstap) \
+ $(use_enable ecdsa) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with python pythonmodule) \
+ $(multilib_native_use_with python pyunbound) \
+ $(use_with threads pthreads) \
+ --disable-flto \
+ --disable-rpath \
+ --with-libevent="${EPREFIX}"/usr \
+ --with-pidfile="${EPREFIX}"/var/run/unbound.pid \
+ --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \
+ --with-ssl="${EPREFIX}"/usr \
+ --with-libexpat="${EPREFIX}"/usr
+
+ # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html
+ # $(use_enable debug lock-checks) \
+ # $(use_enable debug alloc-checks) \
+ # $(use_enable debug alloc-lite) \
+ # $(use_enable debug alloc-nonregional) \
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --modules
+ use python && python_optimize
+
+ newinitd "${FILESDIR}"/unbound.initd unbound
+ newconfd "${FILESDIR}"/unbound.confd unbound
+
+ systemd_dounit "${FILESDIR}"/unbound.service
+ systemd_newunit "${FILESDIR}"/unbound_at.service "unbound@.service"
+ systemd_dounit "${FILESDIR}"/unbound-anchor.service
+
+ dodoc doc/{README,CREDITS,TODO,Changelog,FEATURES}
+
+ # bug #315519
+ dodoc contrib/unbound_munin_
+
+ docinto selinux
+ dodoc contrib/selinux/*
+
+ exeinto /usr/share/${PN}
+ doexe contrib/update-anchor.sh
+}
diff --git a/net-dns/unbound/unbound-1.5.10.ebuild b/net-dns/unbound/unbound-1.5.10.ebuild
new file mode 100644
index 000000000000..93b077ac9bc5
--- /dev/null
+++ b/net-dns/unbound/unbound-1.5.10.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic multilib-minimal python-single-r1 systemd user
+
+MY_P=${PN}-${PV/_/}
+DESCRIPTION="A validating, recursive and caching DNS resolver"
+HOMEPAGE="http://unbound.net/"
+SRC_URI="http://unbound.net/downloads/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~hppa ~mips ppc ppc64 x86"
+IUSE="debug dnstap +ecdsa gost libressl python selinux static-libs test threads"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+# Note: expat is needed by executable only but the Makefile is custom
+# and doesn't make it possible to easily install the library without
+# the executables. MULTILIB_USEDEP may be dropped once build system
+# is fixed.
+
+CDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
+ >=dev-libs/libevent-2.0.21:0=[${MULTILIB_USEDEP}]
+ libressl? ( >=dev-libs/libressl-2.2.4:0[${MULTILIB_USEDEP}] )
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
+ dnstap? (
+ dev-libs/fstrm[${MULTILIB_USEDEP}]
+ >=dev-libs/protobuf-c-1.0.2-r1[${MULTILIB_USEDEP}]
+ )
+ ecdsa? (
+ !libressl? ( dev-libs/openssl:0[-bindist] )
+ )
+ python? ( ${PYTHON_DEPS} )"
+
+DEPEND="${CDEPEND}
+ python? ( dev-lang/swig )
+ test? (
+ net-dns/ldns-utils[examples]
+ dev-util/splint
+ app-text/wdiff
+ )"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-bind )"
+
+# bug #347415
+RDEPEND="${RDEPEND}
+ net-dns/dnssec-root"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup unbound
+ enewuser unbound -1 -1 /etc/unbound unbound
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # To avoid below error messages, set 'trust-anchor-file' to same value in
+ # 'auto-trust-anchor-file'.
+ # [23109:0] error: Could not open autotrust file for writing,
+ # /etc/dnssec/root-anchors.txt: Permission denied
+ epatch "${FILESDIR}"/${PN}-1.5.7-trust-anchor-file.patch
+
+ # required for the python part
+ multilib_copy_sources
+}
+
+src_configure() {
+ [[ ${CHOST} == *-darwin* ]] || append-ldflags -Wl,-z,noexecstack
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable gost) \
+ $(use_enable dnstap) \
+ $(use_enable ecdsa) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with python pythonmodule) \
+ $(multilib_native_use_with python pyunbound) \
+ $(use_with threads pthreads) \
+ --disable-flto \
+ --disable-rpath \
+ --with-libevent="${EPREFIX}"/usr \
+ --with-pidfile="${EPREFIX}"/var/run/unbound.pid \
+ --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \
+ --with-ssl="${EPREFIX}"/usr \
+ --with-libexpat="${EPREFIX}"/usr
+
+ # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html
+ # $(use_enable debug lock-checks) \
+ # $(use_enable debug alloc-checks) \
+ # $(use_enable debug alloc-lite) \
+ # $(use_enable debug alloc-nonregional) \
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --modules
+ use python && python_optimize
+
+ newinitd "${FILESDIR}"/unbound.initd unbound
+ newconfd "${FILESDIR}"/unbound.confd unbound
+
+ systemd_dounit "${FILESDIR}"/unbound.service
+ systemd_newunit "${FILESDIR}"/unbound_at.service "unbound@.service"
+ systemd_dounit "${FILESDIR}"/unbound-anchor.service
+
+ dodoc doc/{README,CREDITS,TODO,Changelog,FEATURES}
+
+ # bug #315519
+ dodoc contrib/unbound_munin_
+
+ docinto selinux
+ dodoc contrib/selinux/*
+
+ exeinto /usr/share/${PN}
+ doexe contrib/update-anchor.sh
+}
diff --git a/net-dns/unbound/unbound-1.6.3.ebuild b/net-dns/unbound/unbound-1.6.3.ebuild
new file mode 100644
index 000000000000..7b72e64ed4e6
--- /dev/null
+++ b/net-dns/unbound/unbound-1.6.3.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic multilib-minimal python-single-r1 systemd user
+
+MY_P=${PN}-${PV/_/}
+DESCRIPTION="A validating, recursive and caching DNS resolver"
+HOMEPAGE="http://unbound.net/"
+SRC_URI="http://unbound.net/downloads/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86"
+IUSE="debug dnscrypt dnstap +ecdsa gost libressl python selinux static-libs systemd test threads"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+# Note: expat is needed by executable only but the Makefile is custom
+# and doesn't make it possible to easily install the library without
+# the executables. MULTILIB_USEDEP may be dropped once build system
+# is fixed.
+
+CDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
+ >=dev-libs/libevent-2.0.21:0=[${MULTILIB_USEDEP}]
+ libressl? ( >=dev-libs/libressl-2.2.4:0[${MULTILIB_USEDEP}] )
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
+ dnscrypt? ( dev-libs/libsodium )
+ dnstap? (
+ dev-libs/fstrm[${MULTILIB_USEDEP}]
+ >=dev-libs/protobuf-c-1.0.2-r1[${MULTILIB_USEDEP}]
+ )
+ ecdsa? (
+ !libressl? ( dev-libs/openssl:0[-bindist] )
+ )
+ python? ( ${PYTHON_DEPS} )"
+
+DEPEND="${CDEPEND}
+ python? ( dev-lang/swig )
+ test? (
+ net-dns/ldns-utils[examples]
+ dev-util/splint
+ app-text/wdiff
+ )
+ systemd? ( sys-apps/systemd )
+ virtual/pkgconfig"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-bind )"
+
+# bug #347415
+RDEPEND="${RDEPEND}
+ net-dns/dnssec-root"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup unbound
+ enewuser unbound -1 -1 /etc/unbound unbound
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # To avoid below error messages, set 'trust-anchor-file' to same value in
+ # 'auto-trust-anchor-file'.
+ # [23109:0] error: Could not open autotrust file for writing,
+ # /etc/dnssec/root-anchors.txt: Permission denied
+ epatch "${FILESDIR}"/${PN}-1.5.7-trust-anchor-file.patch
+
+ # required for the python part
+ multilib_copy_sources
+}
+
+src_configure() {
+ [[ ${CHOST} == *-darwin* ]] || append-ldflags -Wl,-z,noexecstack
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable gost) \
+ $(use_enable dnscrypt) \
+ $(use_enable dnstap) \
+ $(use_enable ecdsa) \
+ $(use_enable static-libs static) \
+ $(use_enable systemd) \
+ $(multilib_native_use_with python pythonmodule) \
+ $(multilib_native_use_with python pyunbound) \
+ $(use_with threads pthreads) \
+ --disable-flto \
+ --disable-rpath \
+ --with-libevent="${EPREFIX}"/usr \
+ --with-pidfile="${EPREFIX}"/var/run/unbound.pid \
+ --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \
+ --with-ssl="${EPREFIX}"/usr \
+ --with-libexpat="${EPREFIX}"/usr
+
+ # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html
+ # $(use_enable debug lock-checks) \
+ # $(use_enable debug alloc-checks) \
+ # $(use_enable debug alloc-lite) \
+ # $(use_enable debug alloc-nonregional) \
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --modules
+ use python && python_optimize
+
+ newinitd "${FILESDIR}"/unbound.initd unbound
+ newconfd "${FILESDIR}"/unbound.confd unbound
+
+ systemd_dounit "${FILESDIR}"/unbound.service
+ systemd_dounit "${FILESDIR}"/unbound.socket
+ systemd_newunit "${FILESDIR}"/unbound_at.service "unbound@.service"
+ systemd_dounit "${FILESDIR}"/unbound-anchor.service
+
+ dodoc doc/{README,CREDITS,TODO,Changelog,FEATURES}
+
+ # bug #315519
+ dodoc contrib/unbound_munin_
+
+ docinto selinux
+ dodoc contrib/selinux/*
+
+ exeinto /usr/share/${PN}
+ doexe contrib/update-anchor.sh
+}
diff --git a/net-dns/unbound/unbound-1.6.4.ebuild b/net-dns/unbound/unbound-1.6.4.ebuild
new file mode 100644
index 000000000000..7b72e64ed4e6
--- /dev/null
+++ b/net-dns/unbound/unbound-1.6.4.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic multilib-minimal python-single-r1 systemd user
+
+MY_P=${PN}-${PV/_/}
+DESCRIPTION="A validating, recursive and caching DNS resolver"
+HOMEPAGE="http://unbound.net/"
+SRC_URI="http://unbound.net/downloads/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86"
+IUSE="debug dnscrypt dnstap +ecdsa gost libressl python selinux static-libs systemd test threads"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+# Note: expat is needed by executable only but the Makefile is custom
+# and doesn't make it possible to easily install the library without
+# the executables. MULTILIB_USEDEP may be dropped once build system
+# is fixed.
+
+CDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
+ >=dev-libs/libevent-2.0.21:0=[${MULTILIB_USEDEP}]
+ libressl? ( >=dev-libs/libressl-2.2.4:0[${MULTILIB_USEDEP}] )
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
+ dnscrypt? ( dev-libs/libsodium )
+ dnstap? (
+ dev-libs/fstrm[${MULTILIB_USEDEP}]
+ >=dev-libs/protobuf-c-1.0.2-r1[${MULTILIB_USEDEP}]
+ )
+ ecdsa? (
+ !libressl? ( dev-libs/openssl:0[-bindist] )
+ )
+ python? ( ${PYTHON_DEPS} )"
+
+DEPEND="${CDEPEND}
+ python? ( dev-lang/swig )
+ test? (
+ net-dns/ldns-utils[examples]
+ dev-util/splint
+ app-text/wdiff
+ )
+ systemd? ( sys-apps/systemd )
+ virtual/pkgconfig"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-bind )"
+
+# bug #347415
+RDEPEND="${RDEPEND}
+ net-dns/dnssec-root"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup unbound
+ enewuser unbound -1 -1 /etc/unbound unbound
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # To avoid below error messages, set 'trust-anchor-file' to same value in
+ # 'auto-trust-anchor-file'.
+ # [23109:0] error: Could not open autotrust file for writing,
+ # /etc/dnssec/root-anchors.txt: Permission denied
+ epatch "${FILESDIR}"/${PN}-1.5.7-trust-anchor-file.patch
+
+ # required for the python part
+ multilib_copy_sources
+}
+
+src_configure() {
+ [[ ${CHOST} == *-darwin* ]] || append-ldflags -Wl,-z,noexecstack
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable gost) \
+ $(use_enable dnscrypt) \
+ $(use_enable dnstap) \
+ $(use_enable ecdsa) \
+ $(use_enable static-libs static) \
+ $(use_enable systemd) \
+ $(multilib_native_use_with python pythonmodule) \
+ $(multilib_native_use_with python pyunbound) \
+ $(use_with threads pthreads) \
+ --disable-flto \
+ --disable-rpath \
+ --with-libevent="${EPREFIX}"/usr \
+ --with-pidfile="${EPREFIX}"/var/run/unbound.pid \
+ --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \
+ --with-ssl="${EPREFIX}"/usr \
+ --with-libexpat="${EPREFIX}"/usr
+
+ # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html
+ # $(use_enable debug lock-checks) \
+ # $(use_enable debug alloc-checks) \
+ # $(use_enable debug alloc-lite) \
+ # $(use_enable debug alloc-nonregional) \
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --modules
+ use python && python_optimize
+
+ newinitd "${FILESDIR}"/unbound.initd unbound
+ newconfd "${FILESDIR}"/unbound.confd unbound
+
+ systemd_dounit "${FILESDIR}"/unbound.service
+ systemd_dounit "${FILESDIR}"/unbound.socket
+ systemd_newunit "${FILESDIR}"/unbound_at.service "unbound@.service"
+ systemd_dounit "${FILESDIR}"/unbound-anchor.service
+
+ dodoc doc/{README,CREDITS,TODO,Changelog,FEATURES}
+
+ # bug #315519
+ dodoc contrib/unbound_munin_
+
+ docinto selinux
+ dodoc contrib/selinux/*
+
+ exeinto /usr/share/${PN}
+ doexe contrib/update-anchor.sh
+}
diff --git a/net-dns/unbound/unbound-1.6.6.ebuild b/net-dns/unbound/unbound-1.6.6.ebuild
new file mode 100644
index 000000000000..983c471e4d59
--- /dev/null
+++ b/net-dns/unbound/unbound-1.6.6.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic multilib-minimal python-single-r1 systemd user
+
+MY_P=${PN}-${PV/_/}
+DESCRIPTION="A validating, recursive and caching DNS resolver"
+HOMEPAGE="http://unbound.net/"
+SRC_URI="http://unbound.net/downloads/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86"
+IUSE="debug dnscrypt dnstap +ecdsa gost libressl python selinux static-libs systemd test threads"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+# Note: expat is needed by executable only but the Makefile is custom
+# and doesn't make it possible to easily install the library without
+# the executables. MULTILIB_USEDEP may be dropped once build system
+# is fixed.
+
+CDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
+ >=dev-libs/libevent-2.0.21:0=[${MULTILIB_USEDEP}]
+ libressl? ( >=dev-libs/libressl-2.2.4:0[${MULTILIB_USEDEP}] )
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
+ dnscrypt? ( dev-libs/libsodium )
+ dnstap? (
+ dev-libs/fstrm[${MULTILIB_USEDEP}]
+ >=dev-libs/protobuf-c-1.0.2-r1[${MULTILIB_USEDEP}]
+ )
+ ecdsa? (
+ !libressl? ( dev-libs/openssl:0[-bindist] )
+ )
+ python? ( ${PYTHON_DEPS} )"
+
+DEPEND="${CDEPEND}
+ python? ( dev-lang/swig )
+ test? (
+ net-dns/ldns-utils[examples]
+ dev-util/splint
+ app-text/wdiff
+ )
+ systemd? ( sys-apps/systemd )
+ virtual/pkgconfig"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-bind )"
+
+# bug #347415
+RDEPEND="${RDEPEND}
+ net-dns/dnssec-root"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup unbound
+ enewuser unbound -1 -1 /etc/unbound unbound
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # To avoid below error messages, set 'trust-anchor-file' to same value in
+ # 'auto-trust-anchor-file'.
+ # [23109:0] error: Could not open autotrust file for writing,
+ # /etc/dnssec/root-anchors.txt: Permission denied
+ epatch "${FILESDIR}"/${PN}-1.5.7-trust-anchor-file.patch
+
+ # required for the python part
+ multilib_copy_sources
+}
+
+src_configure() {
+ [[ ${CHOST} == *-darwin* ]] || append-ldflags -Wl,-z,noexecstack
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable gost) \
+ $(use_enable dnscrypt) \
+ $(use_enable dnstap) \
+ $(use_enable ecdsa) \
+ $(use_enable static-libs static) \
+ $(use_enable systemd) \
+ $(multilib_native_use_with python pythonmodule) \
+ $(multilib_native_use_with python pyunbound) \
+ $(use_with threads pthreads) \
+ --disable-flto \
+ --disable-rpath \
+ --with-libevent="${EPREFIX}"/usr \
+ --with-pidfile="${EPREFIX}"/var/run/unbound.pid \
+ --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \
+ --with-ssl="${EPREFIX}"/usr \
+ --with-libexpat="${EPREFIX}"/usr
+
+ # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html
+ # $(use_enable debug lock-checks) \
+ # $(use_enable debug alloc-checks) \
+ # $(use_enable debug alloc-lite) \
+ # $(use_enable debug alloc-nonregional) \
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --modules
+ use python && python_optimize
+
+ newinitd "${FILESDIR}"/unbound.initd unbound
+ newconfd "${FILESDIR}"/unbound.confd unbound
+
+ systemd_dounit "${FILESDIR}"/unbound.service
+ systemd_dounit "${FILESDIR}"/unbound.socket
+ systemd_newunit "${FILESDIR}"/unbound_at.service "unbound@.service"
+ systemd_dounit "${FILESDIR}"/unbound-anchor.service
+
+ dodoc doc/{README,CREDITS,TODO,Changelog,FEATURES}
+
+ # bug #315519
+ dodoc contrib/unbound_munin_
+
+ docinto selinux
+ dodoc contrib/selinux/*
+
+ exeinto /usr/share/${PN}
+ doexe contrib/update-anchor.sh
+}
diff --git a/net-dns/updatedd/Manifest b/net-dns/updatedd/Manifest
new file mode 100644
index 000000000000..466e44385808
--- /dev/null
+++ b/net-dns/updatedd/Manifest
@@ -0,0 +1,10 @@
+AUX fix-ovh-DYNDNSHOST.patch 278 SHA256 c12a8cc092d62e4459d24fb3dfb4d25ccc566ab9552fe2a9ef990bf08ec94c8c SHA512 2d172df64210a081c026b64a88d92eb0118d4cc5cd75b6c52187cecdea7a22d650c439e893fef533f76bce18a532f888fb0bfa1ef3be0ee04a331ae3bf00a406 WHIRLPOOL a79e0b872ae7e675e2b5540183a29de8a3e3db8ff5cf64ebef823af0fe672cdd94fb36802dad19b205c12fcfa9fd6eead99b817dfec9641f1469e769b2f4efdd
+AUX respect-docdir.patch 1189 SHA256 ac9db82611aa9068df2c102b858aa3a19fa3d30499e7909517b4517d86ac3fc8 SHA512 6dbd17bfccc5823d7eb412f0189ab691ad277e6796b760096ff11ab2e493e84159e900b1990bf54fde0ee5a4e5b0e6c956cf0878741520dcc9c9225989a739c7 WHIRLPOOL c2522d5b727b325ee53f50b6c38322b3881d7210c59f58ce47a36d5dae9de1bb9e5069a626c37d9498135df6e73a5a8de2108a667cb753281cd453d317a70dfe
+AUX set-socket-timeouts-for-ipserv.patch 1001 SHA256 b4d9e5879bb461e004bd192ad0e7be0454a52881e230e18b849a139affad1d81 SHA512 def30f688dbef6c6547a671914120b0da3fc6177236ed563e4a0f26f5c4200a393ce2fd6e48042cce3eca281c5073e0ad8c6aed98e507be9b52781f8e57b29bd WHIRLPOOL d81f22aa48b3673c9b01660b556f3f4084027670bae32dc11317d3d63d114eb31bf9fc8a838177210dc3c929653950f5ec7de7cb11d1904485fbf085180503ba
+AUX updatedd-2.6-options.patch 385 SHA256 86c9b58df432cdec5689d0c3255dcd30f60e444fd61771986c512b8ae9f4019c SHA512 e509e177d0147cc047d8272051541f132a6b64beabff14db9fc7936e780b61947653cd9c501f76877c869ebbbcb052fc263d539ee42bba8eb46c47a6b24eac33 WHIRLPOOL 780eae323de657e03f754924222ca662ecd1bc6c9ef035ab3437999ba01f225ce9b9c36306069e28483b49b81fe7dd468dfe20a0c1493c80731721cfd79d82de
+DIST updatedd_2.6.tar.gz 667104 SHA256 9d240c7e9fcc3f6cb1d32410ca2dee10d359c53f1a5a30d8f3ec49b18b73f1d0 SHA512 f8a83dfc612d4f0dfc7ffabb9934fbfc236a21f7bbd38355dd1234e45cf5fa616c1cc48036a29a2b82195c0b9d1f9b6bb3b78a3acc8f28c1c65b87f27f2b832f WHIRLPOOL 090850d931019820d177e2a952d20e8690139c1585f5b6482d2afe7b66fa24068175a7384d71dccbfd545f55a098d2b97060b848a1c5ec9d776324c15a28d25a
+EBUILD updatedd-2.6-r5.ebuild 710 SHA256 d778d4e641cc5537f6d310a4c723adf1eb51b54f3af8cc799a23f2840a7d0ac9 SHA512 3f69087934105235b677a105102bf7ab32132ba0be0f3322298f3f805c7f45c8c05bfafa15b6a46ae80f165c6d61126780c06580a84aaaaf1fa9702daf864eaa WHIRLPOOL 8416d4405c44374106a5cee67f47507b7d3fa21a79bd5716bab79f4d7d15664ba4ff6a004aa14b39528d85bcc3b711f1069e3682936ea05eeb7da2c8fdf1d4ff
+EBUILD updatedd-2.6.ebuild 616 SHA256 d7202a175572a4eac502550cbdc4877d2cbf04e0d55071d770eac376115bb4a9 SHA512 ad3f43dad804ef81d39c0a428ab1536e0557f00391ea9b9943898bbe390f4685598fe87e7f32a78c68e4cb1cb2c99cbfe99443463207fd2de71b5bad9aaf6e01 WHIRLPOOL 87da487cee24c5625bafad7f54d9514aa391209622054542d7c3e9b52eba738f3e5427277b5568b562139860405aeb01b1e557324ac1b84682e39dfa7c38171d
+MISC ChangeLog 3291 SHA256 e8ae698242b324f78bf493b78063f435c7e092a5f8eb76831c2d87b7d915a98e SHA512 db9bd813da8ee84d30586ba0e62a137afcd56fa174f7f5c7b19ef34cb79dc5a180b9dffbae764c250784a4bc6ef6a95abe90f018e64bf6c329e3e889d7444168 WHIRLPOOL c86860758953906aef3d206f4618c5f6fd3ffa919fcfb9a707ce7bab9274b103f7c063bec229fc445d36e8b288d873d3f3d2f408def52f03dc8fa56006e0bca5
+MISC ChangeLog-2015 2617 SHA256 4af73567710a298f677291dfc6712759e6283df0e04f14e2483ef9c56118d718 SHA512 83f9c1910e46793b64e0a92278084e790567e29ba2149ed939ea2ed49d3240d2b25d8d4599ec8aa4690528cc612f0559114294c15c6299c82b1d9d7e83120a80 WHIRLPOOL a3d170db834efea48c891efaef407965bea856a64916a7ff27fa8b0a5b7b93f6289bc4b75e9694df55801ce2f94e29a510abc2726e745c40136291eefa8414e8
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-dns/updatedd/files/fix-ovh-DYNDNSHOST.patch b/net-dns/updatedd/files/fix-ovh-DYNDNSHOST.patch
new file mode 100644
index 000000000000..f8f61741ef1e
--- /dev/null
+++ b/net-dns/updatedd/files/fix-ovh-DYNDNSHOST.patch
@@ -0,0 +1,11 @@
+--- a/src/plugins/libovh.h 2006-09-07 22:32:59.000000000 +0200
++++ b/src/plugins/libovh.h 2013-01-20 13:48:37.162920947 +0100
+@@ -21,7 +21,7 @@
+
+ #include <ret_codes.h>
+
+-#define DYNDNSHOST "ovh.com"
++#define DYNDNSHOST "www.ovh.com"
+ #define PORT 80
+
+ #define BUFSIZE 512
diff --git a/net-dns/updatedd/files/respect-docdir.patch b/net-dns/updatedd/files/respect-docdir.patch
new file mode 100644
index 000000000000..504220a4eb8f
--- /dev/null
+++ b/net-dns/updatedd/files/respect-docdir.patch
@@ -0,0 +1,33 @@
+From 8e484c4b0ceac8e7c37492fdf5e5b89f18451277 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 14 Jan 2017 01:06:48 -0500
+Subject: [PATCH 1/1] Use the autotools "docdir" in Documentation/Makefile.in.
+
+---
+ Documentation/Makefile.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Documentation/Makefile.in b/Documentation/Makefile.in
+index 8c87281..c213c09 100644
+--- a/Documentation/Makefile.in
++++ b/Documentation/Makefile.in
+@@ -325,12 +325,12 @@ uninstall-am: uninstall-info-am uninstall-local
+
+
+ install-data-local:
+- $(INSTALL) -d $(DESTDIR)$(datadir)/doc/updatedd
+- $(INSTALL) $(srcdir)/updatedd-*.pdf $(DESTDIR)$(datadir)/doc/updatedd
+- $(INSTALL) $(srcdir)/updatedd-pppd-rc $(DESTDIR)$(datadir)/doc/updatedd
++ $(INSTALL) -d $(DESTDIR)$(docdir)
++ $(INSTALL) $(srcdir)/updatedd-*.pdf $(DESTDIR)$(docdir)
++ $(INSTALL) $(srcdir)/updatedd-pppd-rc $(DESTDIR)$(docdir)
+
+ uninstall-local:
+- $(RM) -r $(DESTDIR)$(datadir)/doc/updatedd
++ $(RM) -r $(DESTDIR)$(docdir)
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
+--
+2.10.2
+
diff --git a/net-dns/updatedd/files/set-socket-timeouts-for-ipserv.patch b/net-dns/updatedd/files/set-socket-timeouts-for-ipserv.patch
new file mode 100644
index 000000000000..dbcf4c7c7c79
--- /dev/null
+++ b/net-dns/updatedd/files/set-socket-timeouts-for-ipserv.patch
@@ -0,0 +1,36 @@
+Patch by Maciej S. Szmigiero to prevent ipserv from hanging when the
+other end of the connection goes AWOL.
+
+Gentoo-Bug: 602216
+
+--- a/scripts/ipserv.pl.in 2005-03-06 22:21:36.000000000 +0100
++++ b/scripts/ipserv.pl.in 2017-01-14 19:39:25.583277538 +0100
+@@ -20,6 +20,7 @@
+
+ use strict;
+ use IO::Socket;
++use IO::Socket::Timeout qw(IO::Socket::INET);
+
+ my $ipv4_rex = qr/(?:\d{1,3}\.){3}\d{1,3}/imosx;
+
+@@ -128,7 +129,8 @@
+ $socket = IO::Socket::INET->new(PeerAddr => $target->{url},
+ PeerPort => $target->{port},
+ Proto => "tcp",
+- Type => SOCK_STREAM)
++ Type => SOCK_STREAM,
++ Timeout => 2 * 60)
+ or $retries--;
+
+ } while(!defined($socket) && $retries != 0);
+@@ -137,6 +139,10 @@
+ die "could not connect to $target->{url}: $!";
+ }
+
++ IO::Socket::Timeout->enable_timeouts_on($socket);
++ $socket->read_timeout(2 * 60);
++ $socket->write_timeout(2 * 60);
++
+ if(defined($target->{request})) {
+ print($socket $target->{request});
+ }
diff --git a/net-dns/updatedd/files/updatedd-2.6-options.patch b/net-dns/updatedd/files/updatedd-2.6-options.patch
new file mode 100644
index 000000000000..17fe89b3e49d
--- /dev/null
+++ b/net-dns/updatedd/files/updatedd-2.6-options.patch
@@ -0,0 +1,12 @@
+--- updatedd-2.6/src/updatedd.c.orig 2008-04-01 19:00:30.000000000 +1100
++++ updatedd-2.6/src/updatedd.c 2008-04-01 19:01:17.000000000 +1100
+@@ -272,7 +272,8 @@
+ int c, option_index = 0;
+ static struct option long_options[] = {
+ { "help", 0, 0, 'h' },
+- { "version", 0, 0, 'v' }
++ { "version", 0, 0, 'v' },
++ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "LY",
diff --git a/net-dns/updatedd/metadata.xml b/net-dns/updatedd/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-dns/updatedd/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-dns/updatedd/updatedd-2.6-r5.ebuild b/net-dns/updatedd/updatedd-2.6-r5.ebuild
new file mode 100644
index 000000000000..fae1a41e9e1b
--- /dev/null
+++ b/net-dns/updatedd/updatedd-2.6-r5.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Dynamic DNS client with plugins for several dynamic dns services"
+HOMEPAGE="https://savannah.nongnu.org/projects/updatedd/"
+SRC_URI="https://savannah.nongnu.org/download/updatedd/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-lang/perl
+ dev-perl/IO-Socket-Timeout"
+
+PATCHES=(
+ "${FILESDIR}/${P}-options.patch"
+ "${FILESDIR}/fix-ovh-DYNDNSHOST.patch"
+ "${FILESDIR}/respect-docdir.patch"
+ "${FILESDIR}/set-socket-timeouts-for-ipserv.patch"
+)
+
+src_configure() {
+ econf --disable-static --docdir="/usr/share/doc/${PF}"
+}
diff --git a/net-dns/updatedd/updatedd-2.6.ebuild b/net-dns/updatedd/updatedd-2.6.ebuild
new file mode 100644
index 000000000000..351f873c1738
--- /dev/null
+++ b/net-dns/updatedd/updatedd-2.6.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+DESCRIPTION="Dynamic DNS client with plugins for several dynamic dns services"
+HOMEPAGE="https://savannah.nongnu.org/projects/updatedd/"
+SRC_URI="https://savannah.nongnu.org/download/updatedd/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc x86"
+IUSE=""
+
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}"/${P}-options.patch
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ mv "${D}"/usr/share/doc/updatedd "${D}"/usr/share/doc/${PF}
+ dodoc AUTHORS
+}
diff --git a/net-dns/validns/Manifest b/net-dns/validns/Manifest
new file mode 100644
index 000000000000..d7c26d618d98
--- /dev/null
+++ b/net-dns/validns/Manifest
@@ -0,0 +1,7 @@
+DIST validns-0.7.tar.gz 185377 SHA256 372f37f2ae2ff44251ffc0ceed7ad60bdb3e6a3a692e69d186566b9d19407591 SHA512 2309aabdf863ff51b035ecf4536f2499d9373aed057a07546bdf4498c06c8e6cb36fc8094a8e3b26b49bd12c245ea705421744b354e46c3cc3927f6c3b33e72a WHIRLPOOL d405c33b640a9f21608021bbc1e634393b8a36097f5a0b20c87b330ab3948facfcaab25f9f2596b9401759b534618a53b1dcdd384790f9f5144e2778ae3a185f
+DIST validns-0.8.tar.gz 190325 SHA256 df2db0eaa998a0411ff4c1c4e417eb82d32aec4835f92f45f26c66c8d1d5bd22 SHA512 2443bb8a7373f27d41ab3be1a92b61696d05b74afa42c19db54f6e999e4a634499faa44a5feefd3bc515bc677a8ef0a076092cf13316eff6d1cc504ff9702038 WHIRLPOOL e9a743409457452461a22dd5f57efee7df1e96a9f20665490d7066c87a4609e0a13e6a8a2866f18cc017eee82120b22ddce3794ad381702cda7a82de9935339e
+EBUILD validns-0.7.ebuild 526 SHA256 120c93cbe5af3e6a6c27a235241ad075207ed857770b1dc223cd06b47afb5471 SHA512 301fb91e5dbfb030f3cb16cb5e3a4ee07a8692e600b6a33ea049250ae430c751d50ed1e2945ead284795c4b19091f7de9fa74a7fcd000ddcc917a89e12e4fc6a WHIRLPOOL cfb498c8a40383025504ed469765a6ab0c7882ff2489492776fcdc8f500160633e615e2ae80af0a17fc1c9de863ebdc5beee61ebb6635dbde559cb044851ec33
+EBUILD validns-0.8.ebuild 526 SHA256 120c93cbe5af3e6a6c27a235241ad075207ed857770b1dc223cd06b47afb5471 SHA512 301fb91e5dbfb030f3cb16cb5e3a4ee07a8692e600b6a33ea049250ae430c751d50ed1e2945ead284795c4b19091f7de9fa74a7fcd000ddcc917a89e12e4fc6a WHIRLPOOL cfb498c8a40383025504ed469765a6ab0c7882ff2489492776fcdc8f500160633e615e2ae80af0a17fc1c9de863ebdc5beee61ebb6635dbde559cb044851ec33
+MISC ChangeLog 2470 SHA256 858d34df398a50683748e2b9b9fd37d9595725fb6b087f5f904428b4fae433a4 SHA512 f042e49cc0d5315bbc7695146e5c2571149f638b68813b0fee69e8c8cbccf531ea1d18e1394d8ae0a252c93c73219dd04bbea500230e2b450827c75b0c122164 WHIRLPOOL 26fc300cdb5816a96b635f0b853cf52b7c4e8eca3fddc2b76694a9f94214c9a399195815efed4a190f6755675e6ef884b1ef54db6bd5854196481916731f2e4b
+MISC ChangeLog-2015 1340 SHA256 b90889b4617b511e5c1c9e9e0bc8f9e793e141f5893aba42405d369b08874da7 SHA512 44ca34bd43e7c18bdc4acd3765568d0cae1ae91b30b1a90521294657a704fdbcd5d2fb0bf73439dfa0ec25db212a96cd6b49abb4deab23f113c638f5b8a2b7e8 WHIRLPOOL 004f935e94c24368684d43f42718440490eca3b0f9ff84eff3cf1076f8af406332040b8a2566084674002d51bf00e5caf30d289235f6d3e6b80ffb9b8435755c
+MISC metadata.xml 890 SHA256 b3d39799bb34ef0fb19dec3d3fba291ce8f72407fd712e1da934710ce5632256 SHA512 f9659200aa50b0a5a974be90ad01d5533de51ac0fc8b152a76f524f7af8e50bf0badb52b8784be5b84d7b4231ebb1754c8dd9de4837c4e3128707ec5bd651514 WHIRLPOOL 6fce590545a7158efa3d58e032f3df63474fb8a88ee1a7c7b3fd9808e28ef22b2d71f02f10448f96514d4559bdd24f8f4f9868134d25d195d23a49f16dd2abde
diff --git a/net-dns/validns/metadata.xml b/net-dns/validns/metadata.xml
new file mode 100644
index 000000000000..772e0d4541a3
--- /dev/null
+++ b/net-dns/validns/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tom@whyscream.net</email>
+ <name>Tom Hendrikx</name>
+ <description>Please assign bugs</description>
+ </maintainer>
+ <maintainer type="person">
+ <email>wschlich@gentoo.org</email>
+ <name>Wolfram Schlich</name>
+ <description>proxy-maintainer, please CC on bugs</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>Validns is a standalone command line RFC 1034/1035 zone file validation tool that, in addition to basic syntactic and semantic zone checks, includes DNSSEC signature verification and NSEC/NSEC3 chain validation, as well a number of optional policy checks on the zone.</longdescription>
+</pkgmetadata>
diff --git a/net-dns/validns/validns-0.7.ebuild b/net-dns/validns/validns-0.7.ebuild
new file mode 100644
index 000000000000..b50c9ab0f8d9
--- /dev/null
+++ b/net-dns/validns/validns-0.7.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+DESCRIPTION="A high performance DNS/DNSSEC zone validator"
+HOMEPAGE="http://www.validns.net/"
+SRC_URI="http://www.validns.net/download/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="dev-libs/judy"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-perl/Test-Command-Simple )
+"
+
+src_install() {
+ dobin validns
+ doman validns.1
+ dodoc {notes,technical-notes,todo,usage}.mdwn Changes README
+}
diff --git a/net-dns/validns/validns-0.8.ebuild b/net-dns/validns/validns-0.8.ebuild
new file mode 100644
index 000000000000..b50c9ab0f8d9
--- /dev/null
+++ b/net-dns/validns/validns-0.8.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+DESCRIPTION="A high performance DNS/DNSSEC zone validator"
+HOMEPAGE="http://www.validns.net/"
+SRC_URI="http://www.validns.net/download/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="dev-libs/judy"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-perl/Test-Command-Simple )
+"
+
+src_install() {
+ dobin validns
+ doman validns.1
+ dodoc {notes,technical-notes,todo,usage}.mdwn Changes README
+}
diff --git a/net-dns/valtz/Manifest b/net-dns/valtz/Manifest
new file mode 100644
index 000000000000..bd75ae1250ae
--- /dev/null
+++ b/net-dns/valtz/Manifest
@@ -0,0 +1,5 @@
+DIST valtz.tgz 10638 SHA256 f09a6c7b79bfb201f18ab658953c6b58119731f127fb9e9f38601a0897019a13 SHA512 173e9f04399f8011b565ddfa7ad542c87af03da1b829d40b616271a993a282a1a3f54fb434db4837fb9ee4c3eb66a39f70ebf5ff5f13aff9c6fccfeabb3a3df7 WHIRLPOOL d9a5633e43cb00425ce43e51abe031eb70340aa8c35932af1e1e7b72e461af1d2b9d36b385a7f286cf02366d643914cb77dde55e0213e232b3fbd7e52d9d4bb3
+EBUILD valtz-0.7.ebuild 399 SHA256 b3e464182a6aef2ae3fd93f9c5c3b0a0faec3c34635f7a15d57e1525af31fc4b SHA512 1c6a261a37d7bec17aca25d13ee1ca12307e302cc3b80d82f8c0989d4e620e057c42804ba08c0cb0ad7f43f2a338ceef323d6ec7be7b829cdc7f9003d5e81fca WHIRLPOOL d6cbebbc5d71c554eb61f510741cc715b7a86112d0b08c5496c59ff260ad9b0c6dbf535b5ea71772d4088b71c11964d66d86fa560e0bf44995ea01c0b9ca43fa
+MISC ChangeLog 2511 SHA256 523c1877146ed0e6bb7f5c530b86a18d30b98cfef57f94be942937d3893cba65 SHA512 c0c6248cef254ae93072474e790a56c2f333a6bb102d4dde1e78a036d0ef39f2427c2635822a7046d1c2d0fc0b1098de19819f5345472be54e7514b32ba8e497 WHIRLPOOL 9a9962c02ef1e51f82b062458b133b30787ea2a1cf7006276bdde8af92af31d92bc6cac3e3745f053c00a2a14b85eef6ce4871fb95915c47510f9eae7254c27e
+MISC ChangeLog-2015 894 SHA256 03683fbfbeac5832689c3a212fbc0b63cb5be891424636448d7257315a169a4b SHA512 e96944ab603d9d6cb428aa238113107a5e1884fd96e7cf8ea58a3d1af759127bbb359f0a49d5a2361f4490f231568e1bddc8f7f79909dd90e16b24a9ebc5136b WHIRLPOOL 4ed614f31c303379fce4512cca1caaf7ef3019cf3850b2853a39372db632caf0413568a5ba24c69f223c5700eceb5f65380306f9238006e30b37b5b14389eb42
+MISC metadata.xml 341 SHA256 bb76ad498ab1218f39bde41f4a9c1e3bf7a97214fb7159a0ee13fa14b7d08935 SHA512 a85234c263a6f8f3a857f9b803cc19d483181060cfb37118287924bee852d95be01d898585b0417d4aad71bd565ae2fce107fecd234777dfd4384302e602c6cd WHIRLPOOL f5676b2ac8bf86d22f2a9680e24c997e313bb68bb62b8cc70c9afdb0a0640461489dc200e0d61b57ff35cfbf95245370877297db450ceb7806d16059a5cb0da2
diff --git a/net-dns/valtz/metadata.xml b/net-dns/valtz/metadata.xml
new file mode 100644
index 000000000000..9667cc45e608
--- /dev/null
+++ b/net-dns/valtz/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription>Simple validation tool for tinydns-data zonefiles. Also able to
+filter file(s) from errors, not allowed zones and not allowed record types.</longdescription>
+</pkgmetadata>
diff --git a/net-dns/valtz/valtz-0.7.ebuild b/net-dns/valtz/valtz-0.7.ebuild
new file mode 100644
index 000000000000..d3c355727be3
--- /dev/null
+++ b/net-dns/valtz/valtz-0.7.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="Validation tool for tinydns-data zone files"
+SRC_URI="http://x42.com/software/valtz/${PN}.tgz"
+HOMEPAGE="http://x42.com/software/valtz/"
+IUSE=""
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-lang/perl"
+
+src_install() {
+ dobin valtz || die
+ dodoc README CHANGES
+}