summaryrefslogtreecommitdiff
path: root/net-dns/valtz
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
commit7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch)
tree4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /net-dns/valtz
parentb284a3168fa91a038925d2ecf5e4791011ea5e7d (diff)
gentoo resync : 15.12.2019
Diffstat (limited to 'net-dns/valtz')
-rw-r--r--net-dns/valtz/Manifest7
-rw-r--r--net-dns/valtz/files/add-support-for-srv-records.patch83
-rw-r--r--net-dns/valtz/files/allow-underscores-in-records.patch48
-rw-r--r--net-dns/valtz/files/fix-generic-records-support.patch33
-rw-r--r--net-dns/valtz/metadata.xml11
-rw-r--r--net-dns/valtz/valtz-0.7-r3.ebuild (renamed from net-dns/valtz/valtz-0.7-r1.ebuild)4
6 files changed, 181 insertions, 5 deletions
diff --git a/net-dns/valtz/Manifest b/net-dns/valtz/Manifest
index a974e0a39cd1..609b74f0455d 100644
--- a/net-dns/valtz/Manifest
+++ b/net-dns/valtz/Manifest
@@ -1,3 +1,6 @@
+AUX add-support-for-srv-records.patch 2565 BLAKE2B 8e858bbb93991ccdb033318dec6c81c391181ea7c43044ff3f660995b114a7592c23099306e67eeb99bed05f6ec04bcab7153512b45c8031175f24a85f6a82b2 SHA512 6c4616f1df43530f1ccebd900ac19bac6b8f217dfebfa81b6eaf25afa0dbd96c616a5e7b859a326eb903d82f7d165997a695c21c8a457be467fc51d92bc40f0b
+AUX allow-underscores-in-records.patch 1561 BLAKE2B 7aba9fc4ca4f0b25d1bed1f7dbe524073b1b16b701a4c3d7830fd20e40af1983284a640a7c4ad913e9d8b2b27a864225989b0a8e7e9ec55c5d56841e65d837a3 SHA512 c23aaadab40863710b0ff9de964ab639c4dec2ef5aec0bf2fb402e7631436081012e80302aac5dbc81611b127fc2a6b549b7bb433d0220f012a7ae39fa0a0381
+AUX fix-generic-records-support.patch 1165 BLAKE2B e164ea03315bbbb0d9641f66a37c22a97a4f8e05f4dae86af542619b3299ad764417a40718e944bf10e6119419fad29beff55b947b00e601f86a5297cc2826fa SHA512 0613180930e526feeffa4367d1bf3e0050d2dcffe2181464b9084a1223ec4482c23890868aa761ae1a046da67b16f61761026fd2194c44bdaf6c4c5c556e3e62
DIST valtz-0.7.tgz 10638 BLAKE2B f6c8c476f523bc72531dd6537a7ed096b4fe15122db8ac8398b6ce325e8d61aecd3ef496c6102127bb8df4c8e0651201826ed4ccf79fd47616b6e083967412c4 SHA512 173e9f04399f8011b565ddfa7ad542c87af03da1b829d40b616271a993a282a1a3f54fb434db4837fb9ee4c3eb66a39f70ebf5ff5f13aff9c6fccfeabb3a3df7
-EBUILD valtz-0.7-r1.ebuild 411 BLAKE2B 7aea688aea884ef88944c452682716d465ca61c727b6e65f0e62c81589e0ff56421c28c31842525c55bf992a257287877b9f86bcfacbe51f3608d6d06ba6aafe SHA512 fe9e61498ef8df67b57d817754fecf0433d59bea2b8daa21626157485942d19329d11e9671b84bad38c5be648b546efe40c9be585662a68685b231447cc30695
-MISC metadata.xml 341 BLAKE2B 53f669b92bd42cbfc65ed61e51ddfbcf29046003710d2ed754989a6d09a912b606c7a0b8539551b05c58325af576113fb1c5065f7d1e7ef1a7c68e2f12f263d7 SHA512 a85234c263a6f8f3a857f9b803cc19d483181060cfb37118287924bee852d95be01d898585b0417d4aad71bd565ae2fce107fecd234777dfd4384302e602c6cd
+EBUILD valtz-0.7-r3.ebuild 577 BLAKE2B 5f9afb0bb6a709e2f89c3eef5f9403faea7418e8ae1cdac57671985d86db74b3ee1dc4071ea4aaa2039ca9444c8388d7fccf5f98e1cb0eac9b490d371d45a5fd SHA512 b8633fec0770b7b58c51547d27c4bed79b458638fbe85e92241c2cabd2cccc409a093894c1ecb72e0bd16af1803eb254fbff6549fcdcf90482d79ca06b676e21
+MISC metadata.xml 425 BLAKE2B 4d19148fc299036fffdd0c0c5b2dbbd35ee256071c36fad39a3595a95cc560466e10d680cf720c6b2a51d7304d21d734b7039c3fbc74f304cc9d5c8293ece42e SHA512 028d54f6c591f211acc6ae3605158053516e17424db39e34b8cf01706619421f65efbbb422e0bdfad88be4b1f539672782ad754201499ae3a40deb00c05c0ab4
diff --git a/net-dns/valtz/files/add-support-for-srv-records.patch b/net-dns/valtz/files/add-support-for-srv-records.patch
new file mode 100644
index 000000000000..f8b9435c2ba8
--- /dev/null
+++ b/net-dns/valtz/files/add-support-for-srv-records.patch
@@ -0,0 +1,83 @@
+From 9d29c28941ca629e223d0d4f20a833f10375d331 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 5 Dec 2019 10:28:40 -0500
+Subject: [PATCH 2/3] Add support for SRV records.
+
+There is a patch for djbdns that adds support for SRV records to both
+tinydns-data and axfr-get:
+
+ 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 -040
+
+Many distributions carry the patch, but valtz rejects the SRV records
+because it doesn't recognize the "S" indicator or know how to validate
+the port, weight, or priority fields.
+
+This commit adds support for the new record type, and adds validation
+routines for the three new fields. All of them are the same: ports,
+weights, and priorities are all integers between 0 and 65536.
+---
+ valtz | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ mode change 100644 => 100755 valtz
+
+diff --git a/valtz b/valtz
+old mode 100644
+new mode 100755
+index eebda76..92aaa40
+--- a/valtz
++++ b/valtz
+@@ -100,6 +100,9 @@ my %token_name = (
+ 'min' => 'Minimum time',
+ 'n' => 'Record type number',
+ 'rdata' => 'Resource data',
++ 'port' => 'Port',
++ 'priority' => 'Priority',
++ 'weight' => 'Weight'
+ );
+
+ my %record_type = (
+@@ -114,6 +117,7 @@ my %record_type = (
+ "'" => 'TXT',
+ '^' => 'PTR',
+ 'C' => 'CNAME',
++ 'S' => 'SRV',
+ 'Z' => 'SOA',
+ ':' => 'GENERIC'
+ );
+@@ -131,6 +135,8 @@ my %line_type = (
+ "'" => [ 'TXT', 'fqdn:s:ttl:timestamp:lo', 'fqdn:s' ],
+ '^' => [ 'PTR', 'fqdn:p:ttl:timestamp:lo', 'fqdn:p' ],
+ 'C' => [ 'CNAME', 'fqdn:p:ttl:timestamp:lo', 'fqdn:p' ],
++ 'S' => [ 'SRV', 'fqdn:ip:x:port:weight:priority:ttl:timestamp:lo',
++ 'fqdn:x:port' ],
+ 'Z' => [ 'SOA', 'fqdn:mname:rname:ser:ref:ret:exp:min:ttl:timestamp:lo',
+ 'fqdn:mname:rname' ],
+ ':' => [ 'GENERIC', 'fqdn:n:rdata:ttl:timestamp:lo', 'fqdn:n:rdata' ]
+@@ -340,6 +346,21 @@ my %token_validator = (
+ # TODO : Validation needed?
+ my $result = 0;
+ return $result;
++ }],
++ 'port' => [ 21, sub {
++ my ($type, $s) = @_;
++ my $result = validate_integer($s, 65536);
++ return $result;
++ }],
++ 'priority' => [ 22, sub {
++ my ($type, $s) = @_;
++ my $result = validate_integer($s, 65536);
++ return $result;
++ }],
++ 'weight' => [ 23, sub {
++ my ($type, $s) = @_;
++ my $result = validate_integer($s, 65536);
++ return $result;
+ }],
+
+
+--
+2.23.0
+
diff --git a/net-dns/valtz/files/allow-underscores-in-records.patch b/net-dns/valtz/files/allow-underscores-in-records.patch
new file mode 100644
index 000000000000..b76b231e6f15
--- /dev/null
+++ b/net-dns/valtz/files/allow-underscores-in-records.patch
@@ -0,0 +1,48 @@
+From 7c5df8ad5c18a9f8b9440dbd1ae4faacf55b452a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 5 Dec 2019 10:34:54 -0500
+Subject: [PATCH 1/3] Allow underscore characters in FQDNs and pointers.
+
+Modern DNS records can contain underscores for a number of reasons. In
+particular, DKIM records involve a "_domainkey" part,
+
+ https://tools.ietf.org/html/rfc6376
+
+that is rejected by the current "fqdn" and "p" validation routines.
+Moreover, any SRV records will have a service name prefixed with an
+underscore:
+
+ https://tools.ietf.org/html/rfc2782
+
+To recognize these tokens as valid, this commit expands the "fqdn" and
+"p" regular expressions to allow underscores as the first character in
+each component of an FQDN.
+---
+ valtz | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/valtz b/valtz
+index c68c120..eebda76 100644
+--- a/valtz
++++ b/valtz
+@@ -202,7 +202,7 @@ my %token_validator = (
+ # check all parts
+ for my $hostpart (split /\./, $s)
+ {
+- return 1005 unless $hostpart =~ /^[-a-z0-9]+$/i;
++ return 1005 unless $hostpart =~ /^_?[-a-z0-9]+$/i;
+ return 1006 if $hostpart =~ /^-/;
+ return 1007 if $hostpart =~ /-$/;
+ }
+@@ -268,7 +268,7 @@ my %token_validator = (
+ # check all parts
+ for (split /\./, $s)
+ {
+- return 1005 unless /^[-[a-z0-9]+$/i;
++ return 1005 unless /^_?[-[a-z0-9]+$/i;
+ return 1006 if /^-/;
+ return 1007 if /-$/;
+ }
+--
+2.23.0
+
diff --git a/net-dns/valtz/files/fix-generic-records-support.patch b/net-dns/valtz/files/fix-generic-records-support.patch
new file mode 100644
index 000000000000..b266340a471b
--- /dev/null
+++ b/net-dns/valtz/files/fix-generic-records-support.patch
@@ -0,0 +1,33 @@
+mjo: cherry-picked from https://github.com/wKovacs64/valtz
+
+From 422cc33cf0da52d10c271a75cda271d5963da4eb Mon Sep 17 00:00:00 2001
+From: wKovacs64 <justin.r.hall@gmail.com>
+Date: Tue, 16 Dec 2014 17:13:17 -0700
+Subject: [PATCH] Fix support for generic records
+
+---
+ valtz | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/valtz b/valtz
+index e9b831f..c68c120 100644
+--- a/valtz
++++ b/valtz
+@@ -75,7 +75,7 @@ my %validation_msg = (
+ 1007 => 'parts must not end with the - character',
+ 1008 => 'integer out of bounds',
+ 1009 => 'must have at least three labels to be valid as mail address',
+- 1010 => 'must not 2(NS), 5(CNAME), 6(SOA), 12(PTR), 15(MX) or 252(AXFR)',
++ 1010 => 'must not be 2(NS), 5(CNAME), 6(SOA), 12(PTR), 15(MX) or 252(AXFR)',
+ );
+
+ # NOTE : ONLY translate the right-hand part
+@@ -331,7 +331,7 @@ my %token_validator = (
+ my ($type, $s) = @_;
+ my $result = validate_integer($s, 65535);
+
+- return 1010 if ($s==2)||($s==5)||($s==6)||($s==12)||($s==15)||($s=252);
++ return 1010 if ($s==2)||($s==5)||($s==6)||($s==12)||($s==15)||($s==252);
+
+ return $result;
+ }],
diff --git a/net-dns/valtz/metadata.xml b/net-dns/valtz/metadata.xml
index 9667cc45e608..ea885d1f24b0 100644
--- a/net-dns/valtz/metadata.xml
+++ b/net-dns/valtz/metadata.xml
@@ -1,7 +1,12 @@
<?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>
+<maintainer type="person">
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+</maintainer>
+<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-r1.ebuild b/net-dns/valtz/valtz-0.7-r3.ebuild
index 0a8f39b368fe..002d679c03a7 100644
--- a/net-dns/valtz/valtz-0.7-r1.ebuild
+++ b/net-dns/valtz/valtz-0.7-r3.ebuild
@@ -14,6 +14,10 @@ IUSE=""
RDEPEND="dev-lang/perl"
+PATCHES=( "${FILESDIR}/fix-generic-records-support.patch"
+ "${FILESDIR}/allow-underscores-in-records.patch"
+ "${FILESDIR}/add-support-for-srv-records.patch" )
+
src_install() {
dobin valtz
dodoc README CHANGES