Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-Net-DNS for openSUSE:Factory checked in at 2025-08-27 21:33:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Net-DNS (Old) and /work/SRC/openSUSE:Factory/.perl-Net-DNS.new.30751 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Net-DNS" Wed Aug 27 21:33:18 2025 rev:81 rq:1301443 version:1.520.0 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Net-DNS/perl-Net-DNS.changes 2025-07-15 16:42:51.473536736 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Net-DNS.new.30751/perl-Net-DNS.changes 2025-08-27 21:33:18.967263040 +0200 @@ -1,0 +2,6 @@ +Mon Aug 18 11:18:42 UTC 2025 - Tina Müller <tina.muel...@suse.com> + +- updated to 1.520.0 (1.52) + see /usr/share/doc/packages/perl-Net-DNS/Changes + +------------------------------------------------------------------- Old: ---- Net-DNS-1.51.tar.gz New: ---- Net-DNS-1.52.tar.gz README.md _scmsync.obsinfo build.specials.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Net-DNS.spec ++++++ --- /var/tmp/diff_new_pack.LLpxwC/_old 2025-08-27 21:33:19.899302010 +0200 +++ /var/tmp/diff_new_pack.LLpxwC/_new 2025-08-27 21:33:19.899302010 +0200 @@ -18,15 +18,16 @@ %define cpan_name Net-DNS Name: perl-Net-DNS -Version: 1.510.0 +Version: 1.520.0 Release: 0 -# 1.51 -> normalize -> 1.510.0 -%define cpan_version 1.51 +# 1.52 -> normalize -> 1.520.0 +%define cpan_version 1.52 License: MIT Summary: Perl Interface to the Domain Name System URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/N/NL/NLNETLABS/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml +Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros @@ -72,65 +73,65 @@ Requires: perl(overload) >= 1.06 #Requires: perl(warnings) >= 1.0501 Provides: perl(Net::DNS) = %{version} -Provides: perl(Net::DNS::Domain) -Provides: perl(Net::DNS::DomainName) +Provides: perl(Net::DNS::Domain) = 2002.0.0 +Provides: perl(Net::DNS::DomainName) = 2005.0.0 Provides: perl(Net::DNS::DomainName1035) Provides: perl(Net::DNS::DomainName2535) -Provides: perl(Net::DNS::Header) -Provides: perl(Net::DNS::Mailbox) +Provides: perl(Net::DNS::Header) = 2002.0.0 +Provides: perl(Net::DNS::Mailbox) = 2002.0.0 Provides: perl(Net::DNS::Mailbox1035) Provides: perl(Net::DNS::Mailbox2535) -Provides: perl(Net::DNS::Nameserver) -Provides: perl(Net::DNS::Packet) -Provides: perl(Net::DNS::Parameters) -Provides: perl(Net::DNS::Question) -Provides: perl(Net::DNS::RR) -Provides: perl(Net::DNS::RR::A) -Provides: perl(Net::DNS::RR::AAAA) -Provides: perl(Net::DNS::RR::AFSDB) -Provides: perl(Net::DNS::RR::AMTRELAY) -Provides: perl(Net::DNS::RR::APL) +Provides: perl(Net::DNS::Nameserver) = 2002.0.0 +Provides: perl(Net::DNS::Packet) = 2003.0.0 +Provides: perl(Net::DNS::Parameters) = 2021.0.0 +Provides: perl(Net::DNS::Question) = 2002.0.0 +Provides: perl(Net::DNS::RR) = 2028.0.0 +Provides: perl(Net::DNS::RR::A) = 2003.0.0 +Provides: perl(Net::DNS::RR::AAAA) = 2003.0.0 +Provides: perl(Net::DNS::RR::AFSDB) = 2002.0.0 +Provides: perl(Net::DNS::RR::AMTRELAY) = 2003.0.0 +Provides: perl(Net::DNS::RR::APL) = 2003.0.0 Provides: perl(Net::DNS::RR::APL::Item) -Provides: perl(Net::DNS::RR::CAA) -Provides: perl(Net::DNS::RR::CDNSKEY) -Provides: perl(Net::DNS::RR::CDS) -Provides: perl(Net::DNS::RR::CERT) -Provides: perl(Net::DNS::RR::CNAME) -Provides: perl(Net::DNS::RR::CSYNC) -Provides: perl(Net::DNS::RR::DELEG) -Provides: perl(Net::DNS::RR::DHCID) -Provides: perl(Net::DNS::RR::DNAME) -Provides: perl(Net::DNS::RR::DNSKEY) -Provides: perl(Net::DNS::RR::DS) -Provides: perl(Net::DNS::RR::DSYNC) -Provides: perl(Net::DNS::RR::EUI48) -Provides: perl(Net::DNS::RR::EUI64) -Provides: perl(Net::DNS::RR::GPOS) -Provides: perl(Net::DNS::RR::HINFO) -Provides: perl(Net::DNS::RR::HIP) -Provides: perl(Net::DNS::RR::HTTPS) -Provides: perl(Net::DNS::RR::IPSECKEY) -Provides: perl(Net::DNS::RR::ISDN) -Provides: perl(Net::DNS::RR::KEY) -Provides: perl(Net::DNS::RR::KX) -Provides: perl(Net::DNS::RR::L32) -Provides: perl(Net::DNS::RR::L64) -Provides: perl(Net::DNS::RR::LOC) -Provides: perl(Net::DNS::RR::LP) -Provides: perl(Net::DNS::RR::MB) -Provides: perl(Net::DNS::RR::MG) -Provides: perl(Net::DNS::RR::MINFO) -Provides: perl(Net::DNS::RR::MR) -Provides: perl(Net::DNS::RR::MX) -Provides: perl(Net::DNS::RR::NAPTR) -Provides: perl(Net::DNS::RR::NID) -Provides: perl(Net::DNS::RR::NS) -Provides: perl(Net::DNS::RR::NSEC) -Provides: perl(Net::DNS::RR::NSEC3) -Provides: perl(Net::DNS::RR::NSEC3PARAM) -Provides: perl(Net::DNS::RR::NULL) -Provides: perl(Net::DNS::RR::OPENPGPKEY) -Provides: perl(Net::DNS::RR::OPT) +Provides: perl(Net::DNS::RR::CAA) = 2003.0.0 +Provides: perl(Net::DNS::RR::CDNSKEY) = 2003.0.0 +Provides: perl(Net::DNS::RR::CDS) = 2003.0.0 +Provides: perl(Net::DNS::RR::CERT) = 2002.0.0 +Provides: perl(Net::DNS::RR::CNAME) = 2003.0.0 +Provides: perl(Net::DNS::RR::CSYNC) = 2003.0.0 +Provides: perl(Net::DNS::RR::DELEG) = 2033.0.0 +Provides: perl(Net::DNS::RR::DHCID) = 2003.0.0 +Provides: perl(Net::DNS::RR::DNAME) = 2003.0.0 +Provides: perl(Net::DNS::RR::DNSKEY) = 2003.0.0 +Provides: perl(Net::DNS::RR::DS) = 2003.0.0 +Provides: perl(Net::DNS::RR::DSYNC) = 2003.0.0 +Provides: perl(Net::DNS::RR::EUI48) = 2003.0.0 +Provides: perl(Net::DNS::RR::EUI64) = 2003.0.0 +Provides: perl(Net::DNS::RR::GPOS) = 2003.0.0 +Provides: perl(Net::DNS::RR::HINFO) = 2003.0.0 +Provides: perl(Net::DNS::RR::HIP) = 2003.0.0 +Provides: perl(Net::DNS::RR::HTTPS) = 2002.0.0 +Provides: perl(Net::DNS::RR::IPSECKEY) = 2003.0.0 +Provides: perl(Net::DNS::RR::ISDN) = 2002.0.0 +Provides: perl(Net::DNS::RR::KEY) = 2002.0.0 +Provides: perl(Net::DNS::RR::KX) = 2003.0.0 +Provides: perl(Net::DNS::RR::L32) = 2003.0.0 +Provides: perl(Net::DNS::RR::L64) = 2003.0.0 +Provides: perl(Net::DNS::RR::LOC) = 2003.0.0 +Provides: perl(Net::DNS::RR::LP) = 2003.0.0 +Provides: perl(Net::DNS::RR::MB) = 2002.0.0 +Provides: perl(Net::DNS::RR::MG) = 2002.0.0 +Provides: perl(Net::DNS::RR::MINFO) = 2002.0.0 +Provides: perl(Net::DNS::RR::MR) = 2002.0.0 +Provides: perl(Net::DNS::RR::MX) = 2002.0.0 +Provides: perl(Net::DNS::RR::NAPTR) = 2003.0.0 +Provides: perl(Net::DNS::RR::NID) = 2003.0.0 +Provides: perl(Net::DNS::RR::NS) = 2003.0.0 +Provides: perl(Net::DNS::RR::NSEC) = 2002.0.0 +Provides: perl(Net::DNS::RR::NSEC3) = 2003.0.0 +Provides: perl(Net::DNS::RR::NSEC3PARAM) = 2003.0.0 +Provides: perl(Net::DNS::RR::NULL) = 2002.0.0 +Provides: perl(Net::DNS::RR::OPENPGPKEY) = 2003.0.0 +Provides: perl(Net::DNS::RR::OPT) = 2005.0.0 Provides: perl(Net::DNS::RR::OPT::CHAIN) Provides: perl(Net::DNS::RR::OPT::CLIENT_SUBNET) Provides: perl(Net::DNS::RR::OPT::COOKIE) @@ -145,38 +146,38 @@ Provides: perl(Net::DNS::RR::OPT::REPORT_CHANNEL) Provides: perl(Net::DNS::RR::OPT::TCP_KEEPALIVE) Provides: perl(Net::DNS::RR::OPT::ZONEVERSION) -Provides: perl(Net::DNS::RR::PTR) -Provides: perl(Net::DNS::RR::PX) -Provides: perl(Net::DNS::RR::RESINFO) -Provides: perl(Net::DNS::RR::RP) -Provides: perl(Net::DNS::RR::RRSIG) -Provides: perl(Net::DNS::RR::RT) -Provides: perl(Net::DNS::RR::SIG) -Provides: perl(Net::DNS::RR::SMIMEA) -Provides: perl(Net::DNS::RR::SOA) -Provides: perl(Net::DNS::RR::SPF) -Provides: perl(Net::DNS::RR::SRV) -Provides: perl(Net::DNS::RR::SSHFP) -Provides: perl(Net::DNS::RR::SVCB) -Provides: perl(Net::DNS::RR::TKEY) -Provides: perl(Net::DNS::RR::TLSA) -Provides: perl(Net::DNS::RR::TSIG) -Provides: perl(Net::DNS::RR::TXT) -Provides: perl(Net::DNS::RR::URI) -Provides: perl(Net::DNS::RR::X25) -Provides: perl(Net::DNS::RR::ZONEMD) -Provides: perl(Net::DNS::Resolver) -Provides: perl(Net::DNS::Resolver::Base) -Provides: perl(Net::DNS::Resolver::MSWin32) -Provides: perl(Net::DNS::Resolver::Recurse) -Provides: perl(Net::DNS::Resolver::UNIX) -Provides: perl(Net::DNS::Resolver::android) -Provides: perl(Net::DNS::Resolver::cygwin) -Provides: perl(Net::DNS::Resolver::os2) -Provides: perl(Net::DNS::Resolver::os390) -Provides: perl(Net::DNS::Text) -Provides: perl(Net::DNS::Update) -Provides: perl(Net::DNS::ZoneFile) +Provides: perl(Net::DNS::RR::PTR) = 2002.0.0 +Provides: perl(Net::DNS::RR::PX) = 2003.0.0 +Provides: perl(Net::DNS::RR::RESINFO) = 2003.0.0 +Provides: perl(Net::DNS::RR::RP) = 2002.0.0 +Provides: perl(Net::DNS::RR::RRSIG) = 2003.0.0 +Provides: perl(Net::DNS::RR::RT) = 2003.0.0 +Provides: perl(Net::DNS::RR::SIG) = 2003.0.0 +Provides: perl(Net::DNS::RR::SMIMEA) = 2003.0.0 +Provides: perl(Net::DNS::RR::SOA) = 2002.0.0 +Provides: perl(Net::DNS::RR::SPF) = 2003.0.0 +Provides: perl(Net::DNS::RR::SRV) = 2003.0.0 +Provides: perl(Net::DNS::RR::SSHFP) = 2003.0.0 +Provides: perl(Net::DNS::RR::SVCB) = 2033.0.0 +Provides: perl(Net::DNS::RR::TKEY) = 2003.0.0 +Provides: perl(Net::DNS::RR::TLSA) = 2003.0.0 +Provides: perl(Net::DNS::RR::TSIG) = 2003.0.0 +Provides: perl(Net::DNS::RR::TXT) = 2003.0.0 +Provides: perl(Net::DNS::RR::URI) = 2003.0.0 +Provides: perl(Net::DNS::RR::X25) = 2002.0.0 +Provides: perl(Net::DNS::RR::ZONEMD) = 2003.0.0 +Provides: perl(Net::DNS::Resolver) = 2017.0.0 +Provides: perl(Net::DNS::Resolver::Base) = 2031.0.0 +Provides: perl(Net::DNS::Resolver::MSWin32) = 2002.0.0 +Provides: perl(Net::DNS::Resolver::Recurse) = 2002.0.0 +Provides: perl(Net::DNS::Resolver::UNIX) = 2007.0.0 +Provides: perl(Net::DNS::Resolver::android) = 2007.0.0 +Provides: perl(Net::DNS::Resolver::cygwin) = 2002.0.0 +Provides: perl(Net::DNS::Resolver::os2) = 2007.0.0 +Provides: perl(Net::DNS::Resolver::os390) = 2007.0.0 +Provides: perl(Net::DNS::Text) = 2002.0.0 +Provides: perl(Net::DNS::Update) = 2017.0.0 +Provides: perl(Net::DNS::ZoneFile) = 2002.0.0 Provides: perl(Net::DNS::ZoneFile::Generator) Provides: perl(Net::DNS::ZoneFile::Text) %undefine __perllib_provides ++++++ Net-DNS-1.51.tar.gz -> Net-DNS-1.52.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.51/Changes new/Net-DNS-1.52/Changes --- old/Net-DNS-1.51/Changes 2025-07-04 15:04:14.000000000 +0200 +++ new/Net-DNS-1.52/Changes 2025-07-29 20:04:54.000000000 +0200 @@ -1,4 +1,13 @@ -$Id: Changes 2022 2025-07-04 13:03:53Z willem $ -*-text-*- +$Id: Changes 2034 2025-07-29 18:04:34Z willem $ -*-text-*- + + +**** 1.52 Jul 29, 2025 + + Refactor SVCB to avoid internal use of generic keyNN. + DELEG documentation and code improvement. + +Fix rt.cpan.org #168433 + Bug in resolver base selection on non-Unix/Linux platforms **** 1.51 Jul 4, 2025 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.51/MANIFEST new/Net-DNS-1.52/MANIFEST --- old/Net-DNS-1.51/MANIFEST 2025-07-04 15:04:21.000000000 +0200 +++ new/Net-DNS-1.52/MANIFEST 2025-07-29 20:05:02.000000000 +0200 @@ -136,6 +136,7 @@ t/05-CERT.t t/05-CNAME.t t/05-CSYNC.t +t/05-DELEG.t t/05-DHCID.t t/05-DNAME.t t/05-DNSKEY.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.51/META.json new/Net-DNS-1.52/META.json --- old/Net-DNS-1.51/META.json 2025-07-04 15:04:21.000000000 +0200 +++ new/Net-DNS-1.52/META.json 2025-07-29 20:05:02.000000000 +0200 @@ -79,6 +79,6 @@ } }, "release_status" : "stable", - "version" : "1.51", + "version" : "1.52", "x_serialization_backend" : "JSON::PP version 4.16" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.51/META.yml new/Net-DNS-1.52/META.yml --- old/Net-DNS-1.51/META.yml 2025-07-04 15:04:21.000000000 +0200 +++ new/Net-DNS-1.52/META.yml 2025-07-29 20:05:02.000000000 +0200 @@ -55,5 +55,5 @@ perl: '5.008009' strict: '1.03' warnings: '1.0501' -version: '1.51' +version: '1.52' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.51/lib/Net/DNS/RR/DELEG.pm new/Net-DNS-1.52/lib/Net/DNS/RR/DELEG.pm --- old/Net-DNS-1.51/lib/Net/DNS/RR/DELEG.pm 2025-07-04 15:04:14.000000000 +0200 +++ new/Net-DNS-1.52/lib/Net/DNS/RR/DELEG.pm 2025-07-29 20:04:54.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = (qw$Id: DELEG.pm 2021 2025-07-04 13:00:27Z willem $)[2]; +our $VERSION = (qw$Id: DELEG.pm 2033 2025-07-29 18:03:07Z willem $)[2]; use base qw(Net::DNS::RR::SVCB); @@ -15,11 +15,14 @@ use integer; -use Carp; - my %keyname = reverse( - IPv4addr => 'key4', - IPv6addr => 'key6', + alpn => 'key1', # RFC9460(7.1) + 'no-default-alpn' => 'key2', # RFC9460(7.1) + port => 'key3', # RFC9460(7.2) + IPv4 => 'key4', + IPv6 => 'key6', + dohpath => 'key7', # RFC9461 + 'tls-supported-groups' => 'key9', ); @@ -27,9 +30,10 @@ my $self = shift; my $priority = $self->{SvcPriority}; + my @target = grep { $_ ne '.' } $self->{TargetName}->string; my $mode = $priority ? 'DIRECT' : 'INCLUDE'; - my @rdata = join '=', $mode, $self->{TargetName}->string; - push @rdata, "\n", join '=', 'Priority', $priority if $priority > 1; + my @rdata = join '=', $mode, @target; + push @rdata, "priority=$priority" if $priority > 1; my $params = $self->{SvcParams} || []; my @params = @$params; @@ -37,8 +41,9 @@ my $key = join '', 'key', shift @params; my $val = shift @params; if ( my $name = $keyname{$key} ) { - my @val = $self->$name; - push @rdata, "\n", length($val) ? "$name=@val" : "$name"; + my @val = grep {length} $self->$name; + my @rhs = @val ? join ',', @val : @val; + push @rdata, join '=', $name, @rhs; } else { my @hex = unpack 'H*', $val; $self->_annotation(qq(unexpected $key="@hex")); @@ -52,79 +57,157 @@ sub _parse_rdata { ## populate RR from rdata in argument list my ( $self, @argument ) = @_; - local $SIG{__WARN__} = sub { die @_ }; - while ( my $parameter = shift @argument ) { - for ($parameter) { - my @value; - if (/^key\d+.*$/i) { # reject SVCB generic key - my $rhs = /=$/ ? shift @argument : ''; - croak "Unexpected parameter: $_$rhs"; - } elsif (/^[^=]+=(.*)$/) { - local $_ = length($1) ? $1 : shift @argument; - s/^"([^"]*)"$/$1/; # strip enclosing quotes - s/\\,/\\044/g; # disguise escaped comma - push @value, split /,/; - } - - s/[-]/_/g; # extract identifier - m/^([^=]+)/; - $self->$1(@value); + while ( local $_ = shift @argument ) { + my @value; + m/^[^=]+=?(.*)$/; + for ( my $rhs = /=$/ ? shift @argument : $1 ) { + s/^"(.*)"$/$1/; # strip enclosing quotes + s/\\,/\\044/g; # disguise escaped comma + push @value, length() ? split /,/ : ''; } + + s/[-]/_/g; # extract identifier + m/^([^=]+)/; + $self->$1(@value); } return; } -sub DIRECT { - my ( $self, $servername ) = @_; # uncoverable pod - $self->{SvcPriority} = 1; - $self->{TargetName} = Net::DNS::DomainName->new($servername); +sub _post_parse { ## parser post processing + my $self = shift; + + my $paramref = $self->{SvcParams} || []; + unless (@$paramref) { + return if $self->_empty; + die('no name or address specified') unless $self->targetname; + } + $self->SUPER::_post_parse; return; } -sub INCLUDE { - my ( $self, $target ) = @_; # uncoverable pod - $self->{SvcPriority} = 0; - $self->{TargetName} = Net::DNS::DomainName->new($target); + +sub _defaults { ## specify RR attribute default values + my $self = shift; + + $self->DIRECT; return; } + +sub DIRECT { + my ( $self, @servername ) = @_; + $self->targetname( @servername, '.' ); + return $self->SvcPriority(1); +} + +sub INCLUDE { + my ( $self, $target ) = @_; + $self->targetname($target); + return $self->SvcPriority(0); +} + sub priority { - my ( $self, @value ) = @_; # uncoverable pod - my @arg = $self->{SvcPriority} ? @value : (); - return $self->SvcPriority(@arg) || croak 'Priority invalid for INCLUDE'; + my ( $self, @value ) = @_; + my $priority = $self->{SvcPriority}; + return $priority unless @value; + my ($value) = @value; + if ($priority) { + die 'invalid zero priority' unless $value; + } else { + die 'invalid non-zero priority' if $value; + } + return $self->SvcPriority(@value); } -sub glue4 { ## glue4=192.0.2.53,... +sub targetname { my ( $self, @value ) = @_; - my $ip = $self->ipv4hint(@value); - return $ip if @value; - my @ip = unpack 'a4' x ( length($ip) / 4 ), $ip; - return join ',', map { bless( {address => $_}, 'Net::DNS::RR::A' )->address } @ip; + $self->{TargetName} = Net::DNS::DomainName->new(@value) if @value; + my $target = $self->{TargetName} ? $self->{TargetName}->name : return; + return $target eq '.' ? undef : $target; } -sub glue6 { ## glue6=2001:DB8::53,... +sub ipv4 { ## IPv4=192.0.2.53,... my ( $self, @value ) = @_; - my $ip = $self->ipv6hint(@value); - return $ip if @value; - my @ip = unpack 'a16' x ( length($ip) / 16 ), $ip; - return join ',', map { bless( {address => $_}, 'Net::DNS::RR::AAAA' )->address } @ip; + my $packed = $self->_SvcParam( 4, _ipv4(@value) ); + return $packed if @value; + my @ip = unpack 'a4' x ( length($packed) / 4 ), $packed; + return map { bless( {address => $_}, 'Net::DNS::RR::A' )->address } @ip; } -sub ipv4addr { return &glue4 } -sub ipv6addr { return &glue6 } +sub ipv6 { ## IPv6=2001:DB8::53,... + my ( $self, @value ) = @_; + my $packed = $self->_SvcParam( 6, _ipv6(@value) ); + return $packed if @value; + my @ip = unpack 'a16' x ( length($packed) / 16 ), $packed; + return map { bless( {address => $_}, 'Net::DNS::RR::AAAA' )->address_short } @ip; +} + +sub port { ## port=53 + my ( $self, @value ) = @_; + my $packed = $self->_SvcParam( 3, map { _integer16($_) } @value ); + return @value ? $packed : unpack 'n', $packed; +} + +sub alpn { ## alpn=dot,doq + my ( $self, @value ) = @_; + my $packed = $self->_SvcParam( 1, _string(@value) ); + return $packed if @value; + my $index = 0; + while ( $index < length $packed ) { + ( my $text, $index ) = Net::DNS::Text->decode( \$packed, $index ); + push @value, $text->string; + } + return @value; +} + +sub tls_supported_groups { ## tls_supported_groups=29,23 + my ( $self, @value ) = @_; # uncoverable pod + my $packed = $self->_SvcParam( 9, _integer16(@value) ); + return @value ? $packed : unpack 'n*', $packed; +} sub generic { my $self = shift; my @ttl = grep {defined} $self->{ttl}; - my @class = map {"CLASS$_"} grep {defined} $self->{class}; + my @class = map { $_ ? "CLASS$_" : () } $self->{class}; my @core = ( $self->{owner}->string, @ttl, @class, "TYPE$self->{type}" ); my @rdata = $self->_empty ? () : $self->SUPER::_format_rdata; return join "\n\t", Net::DNS::RR::_wrap( "@core (", @rdata, ')' ); } +######################################## + +sub _concatenate { ## concatenate octet string(s) + my @arg = @_; + return scalar(@arg) ? join( '', @arg ) : return @arg; +} + +sub _ipv4 { + my @arg = @_; + return _concatenate( map { Net::DNS::RR::A::address( {}, $_ ) } @arg ); +} + +sub _ipv6 { + my @arg = @_; + return _concatenate( map { Net::DNS::RR::AAAA::address( {}, $_ ) } @arg ); +} + +sub _integer16 { + my @arg = @_; + return _concatenate( map { pack( 'n', $_ ) } @arg ); +} + +sub _string { + my @arg = @_; + return _concatenate( map { Net::DNS::Text->new($_)->encode() } @arg ); +} + +######################################## + + 1; __END__ @@ -132,16 +215,19 @@ =head1 SYNOPSIS use Net::DNS; + $rr = Net::DNS::RR->new('zone DELEG DIRECT=nameserver IPv4=192.0.2.1'); + $rr = Net::DNS::RR->new('zone DELEG DIRECT IPv6=2001:db8::53'); $rr = Net::DNS::RR->new('zone DELEG INCLUDE=targetname'); - $rr = Net::DNS::RR->new('zone DELEG DIRECT=nameserver IPv4addr=192.0.2.1 IPv6addr=2001:db8::53'); =head1 DESCRIPTION -The DNS DELEG resource record appears in, and is logically a part of, -the parent zone to mark the delegation point for a child zone. -It advertises, directly or indirectly, transport methods -available for connection to nameservers serving the child zone. +The DNS DELEG resource record set, wherever it appears, advertises the +authoritative nameservers and transport parameters to be used to resolve +queries for data at the owner name or any subordinate thereof. + +The DELEG RRset is authoritative data within the delegating zone +and must not appear at the apex of the subordinate zone. The DELEG class is derived from, and inherits properties of, the Net::DNS::RR::SVCB class. @@ -157,6 +243,57 @@ other unpredictable behaviour. +=head2 DIRECT + + example. DELEG DIRECT=nameserver + example. DELEG DIRECT=nameserver IPv6=2001:db8::53 + example. DELEG DIRECT IPv4=192.0.2.1 IPv6=2001:db8::53 + $nameserver = $rr->targetname; + +Specifies the nameserver domain name, which may be absent, +and sets DIRECT mode (non-zero SvcPriority). + + +=head2 INCLUDE + + example. DELEG INCLUDE=targetname + $targetname = $rr->targetname; + +Specifies the location of an external nameserver configuration +and sets INCLUDE mode (zero SvcPriority). + + +=head2 priority + + example. DELEG DIRECT=nameserver priority=123 + $priority = $rr->priority; + +Gets or sets the priority value for the DELEG record. +An exception will be raised for any attempt to set +a non-zero priority for INCLUDE. + + +=head2 targetname + + $target = $rr->targetname; + +Returns the target domain name or the undefined value if not specified. + + +=head2 IPv4, ipv4 + + example. DELEG DIRECT IPv4=192.0.2.1 + @ip = $rr->IPv4; + +Sets or gets the list of IP addresses. + +=head2 IPv6, ipv6 + + example. DELEG DIRECT IPv6=2001:db8::53 + @ip = $rr->IPv6; + +Sets or gets the list of IP addresses. + =head1 COPYRIGHT @@ -191,6 +328,8 @@ L<perl> L<Net::DNS> L<Net::DNS::RR> L<Net::DNS::RR::SVCB> +draft-ietf-deleg + L<RFC9460|https://iana.org/go/rfc9460> L<Service Parameter Keys|https://iana.org/assignments/dns-svcb> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.51/lib/Net/DNS/RR/SVCB.pm new/Net-DNS-1.52/lib/Net/DNS/RR/SVCB.pm --- old/Net-DNS-1.51/lib/Net/DNS/RR/SVCB.pm 2025-07-04 15:04:14.000000000 +0200 +++ new/Net-DNS-1.52/lib/Net/DNS/RR/SVCB.pm 2025-07-29 20:04:54.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = (qw$Id: SVCB.pm 2018 2025-07-01 11:57:43Z willem $)[2]; +our $VERSION = (qw$Id: SVCB.pm 2033 2025-07-29 18:03:07Z willem $)[2]; use base qw(Net::DNS::RR); @@ -82,7 +82,7 @@ my $length = 2 + length $encode; my @target = grep {length} split /(\S{32})/, unpack 'H*', $encode; my $target = substr $self->{TargetName}->string, 0, 40; - push @rdata, join '', shift(@target), "\t; $target\n"; + push @rdata, join '', shift(@target), "\t; $target\n" unless $target eq '.'; push @rdata, @target; my $params = $self->{SvcParams} || []; @@ -182,12 +182,10 @@ sub targetname { my ( $self, @value ) = @_; # uncoverable pod - - for (@value) { $self->{TargetName} = Net::DNS::DomainName->new($_) } - + $self->{TargetName} = Net::DNS::DomainName->new(@value) if @value; my $target = $self->{TargetName} ? $self->{TargetName}->name : return; - return $target unless $self->{SvcPriority}; - return ( $target eq '.' ) ? $self->owner : $target; + return $target unless $target eq '.'; + return $self->{SvcPriority} ? $self->owner : undef; } @@ -195,64 +193,63 @@ my ( $self, @value ) = @_; my @list = map { $keybyname{lc $_} || $_ } map { split /,/ } @value; my @keys = map { /(\d+)$/ ? $1 : die( $self->type . qq[: unexpected "$_"] ) } @list; - return $self->key0( _integer16( sort { $a <=> $b } @keys ) ); + return $self->_SvcParam( 0, _integer16( sort { $a <=> $b } @keys ) ); } sub alpn { ## alpn=h3,h2,... my ( $self, @value ) = @_; - return $self->key1( _string(@value) ); + return $self->_SvcParam( 1, _string(@value) ); } sub no_default_alpn { ## no-default-alpn (Boolean) my ( $self, @value ) = @_; # uncoverable pod - return $self->key2() if defined wantarray; - return $self->key2( _boolean(@value) ); + return $self->_SvcParam(2) if defined wantarray; + return $self->_SvcParam( 2, _boolean(@value) ); } sub port { ## port=1234 my ( $self, @value ) = @_; - return $self->key3( map { _integer16($_) } @value ); + return $self->_SvcParam( 3, map { _integer16($_) } @value ); } sub ipv4hint { ## ipv4hint=192.0.2.1,... my ( $self, @value ) = @_; - return $self->key4( _ipv4(@value) ); + return $self->_SvcParam( 4, _ipv4(@value) ); } sub ech { ## ech=base64 my ( $self, @value ) = @_; - return $self->key5( map { _base64($_) } @value ); + return $self->_SvcParam( 5, map { _base64($_) } @value ); } sub ipv6hint { ## ipv6hint=2001:DB8::1,... my ( $self, @value ) = @_; - return $self->key6( _ipv6(@value) ); + return $self->_SvcParam( 6, _ipv6(@value) ); } sub dohpath { ## dohpath=/dns-query{?dns} my ( $self, @value ) = @_; # uncoverable pod - return $self->key7(@value); + return $self->_SvcParam( 7, map { substr _string($_), 1 } @value ); } sub ohttp { ## ohttp my ( $self, @value ) = @_; # uncoverable pod - return $self->key8() if defined wantarray; - return $self->key8( _boolean(@value) ); + return $self->_SvcParam(8) if defined wantarray; + return $self->_SvcParam( 8, _boolean(@value) ); } sub tls_supported_groups { ## tls_supported_groups=29,23 my ( $self, @value ) = @_; # uncoverable pod - return $self->key9( _integer16(@value) ); + return $self->_SvcParam( 9, _integer16(@value) ); } ######################################## -sub _presentation { ## represent octet string(s) using local charset +sub _concatenate { ## concatenate octet string(s) my @arg = @_; - my $raw = scalar(@arg) ? join( '', @arg ) : return (); # concatenate arguments - return Net::DNS::Text->decode( \$raw, 0, length($raw) )->string; + return scalar(@arg) ? join( '', @arg ) : return (); } sub _boolean { @@ -263,27 +260,27 @@ sub _string { my @arg = @_; - return _presentation( map { Net::DNS::Text->new($_)->encode() } @arg ); + return _concatenate( map { Net::DNS::Text->new($_)->encode() } @arg ); } sub _base64 { my @arg = @_; - return _presentation( map { MIME::Base64::decode($_) } @arg ); + return _concatenate( map { MIME::Base64::decode($_) } @arg ); } sub _integer16 { my @arg = @_; - return _presentation( map { pack( 'n', $_ ) } @arg ); + return _concatenate( map { pack( 'n', $_ ) } @arg ); } sub _ipv4 { my @arg = @_; - return _presentation( map { Net::DNS::RR::A::address( {}, $_ ) } @arg ); + return _concatenate( map { Net::DNS::RR::A::address( {}, $_ ) } @arg ); } sub _ipv6 { my @arg = @_; - return _presentation( map { Net::DNS::RR::AAAA::address( {}, $_ ) } @arg ); + return _concatenate( map { Net::DNS::RR::AAAA::address( {}, $_ ) } @arg ); } @@ -304,6 +301,16 @@ return $self->$super(@argument) unless $method =~ /^key[0]*(\d+)$/i; my $key = $1; + return $self->_SvcParam($key) unless @argument; + my $first = shift @argument; + my $value = defined $first ? Net::DNS::Text->new($first)->raw : $first; + return $self->_SvcParam( $key, $value, @argument ); +} + + +sub _SvcParam { + my ( $self, $key, @argument ) = @_; + my $paramsref = $self->{SvcParams} || []; my %svcparams = @$paramsref; @@ -314,7 +321,7 @@ die( $self->type . qq[: invalid SvcParam "key$key"] ) if $key > 65534; die( $self->type . qq[: unexpected "key$key" value] ) if scalar @argument; delete $self->{rdata}; - $svcparams{$key} = Net::DNS::Text->new("$arg")->raw if defined $arg; + $svcparams{$key} = $arg if defined $arg; $self->{SvcParams} = [map { ( $_, $svcparams{$_} ) } sort { $a <=> $b } keys %svcparams]; } else { die( $self->type . qq[: no value specified for "key$key"] ) unless defined wantarray; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.51/lib/Net/DNS/RR.pm new/Net-DNS-1.52/lib/Net/DNS/RR.pm --- old/Net-DNS-1.51/lib/Net/DNS/RR.pm 2025-07-04 15:04:14.000000000 +0200 +++ new/Net-DNS-1.52/lib/Net/DNS/RR.pm 2025-07-29 20:04:54.000000000 +0200 @@ -3,7 +3,7 @@ use strict; use warnings; -our $VERSION = (qw$Id: RR.pm 2018 2025-07-01 11:57:43Z willem $)[2]; +our $VERSION = (qw$Id: RR.pm 2028 2025-07-22 16:52:42Z willem $)[2]; =head1 NAME @@ -174,20 +174,24 @@ sub _new_hash { my $base = shift; - my %attribute = ( owner => '.', type => 'NULL' ); + my %argument = ( owner => '.', type => 'NULL' ); + my @attribute; while ( my $key = shift ) { - $attribute{lc $key} = shift; + push @attribute, $key; + $argument{lc $key} = shift; } - my ( $owner, $name, $type, $class, $ttl ) = delete @attribute{@core}; + my ( $owner, $name, $type, $class, $ttl ) = delete @argument{@core}; - my $self = $base->_subclass( $type, scalar(%attribute) ); + my $self = $base->_subclass( $type, scalar(%argument) ); $self->owner( $name ? $name : $owner ); $self->class($class) if defined $class; # optional CLASS $self->ttl($ttl) if defined $ttl; # optional TTL eval { - while ( my ( $attribute, $value ) = each %attribute ) { + foreach my $attribute (@attribute) { + my $value = $argument{lc $attribute}; + next unless defined $value; $self->$attribute( ref($value) eq 'ARRAY' ? @$value : $value ); } }; @@ -338,7 +342,7 @@ $last = join $tab, @core, "@rdata" unless scalar(@line); $self->_annotation('no data') if $empty; - return join "\n\t", @line, _wrap( $last, map {"; $_"} $self->_annotation ); + return join "\n\t", @line, _wrap( $last, $self->_annotation ); } @@ -715,8 +719,8 @@ sub _annotation { my ( $self, @note ) = @_; - $self->{annotation} = ["@note"] if scalar @note; - return wantarray ? @{$self->{annotation} || []} : (); + push @{$self->{annotation}}, "; @note", "\n" if scalar @note; + return wantarray ? @{delete( $self->{annotation} ) || []} : undef; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.51/lib/Net/DNS/Resolver/Base.pm new/Net-DNS-1.52/lib/Net/DNS/Resolver/Base.pm --- old/Net-DNS-1.51/lib/Net/DNS/Resolver/Base.pm 2025-07-04 15:04:14.000000000 +0200 +++ new/Net-DNS-1.52/lib/Net/DNS/Resolver/Base.pm 2025-07-29 20:04:54.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = (qw$Id: Base.pm 2016 2025-02-27 15:27:42Z willem $)[2]; +our $VERSION = (qw$Id: Base.pm 2031 2025-07-28 13:52:18Z willem $)[2]; # @@ -27,7 +27,7 @@ use constant OS_SPEC => "Net::DNS::Resolver::$^O"; use constant OS_UNIX => "Net::DNS::Resolver::UNIX"; -use constant OS_CONF => grep eval "require $_", OS_SPEC, OS_UNIX; ## no critic +use constant OS_CONF => grep( eval "require $_", OS_SPEC ), OS_UNIX; ## no critic use base (OS_CONF)[0]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.51/lib/Net/DNS.pm new/Net-DNS-1.52/lib/Net/DNS.pm --- old/Net-DNS-1.51/lib/Net/DNS.pm 2025-07-04 15:04:14.000000000 +0200 +++ new/Net-DNS-1.52/lib/Net/DNS.pm 2025-07-29 20:04:54.000000000 +0200 @@ -4,9 +4,9 @@ use warnings; our $VERSION; -$VERSION = '1.51'; +$VERSION = '1.52'; $VERSION = eval {$VERSION}; -our $SVNVERSION = (qw$Id: DNS.pm 2022 2025-07-04 13:03:53Z willem $)[2]; +our $SVNVERSION = (qw$Id: DNS.pm 2034 2025-07-29 18:04:34Z willem $)[2]; =head1 NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.51/t/05-DELEG.t new/Net-DNS-1.52/t/05-DELEG.t --- old/Net-DNS-1.51/t/05-DELEG.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Net-DNS-1.52/t/05-DELEG.t 2025-07-29 20:04:54.000000000 +0200 @@ -0,0 +1,79 @@ +#!/usr/bin/perl +# $Id: 05-DELEG.t 2033 2025-07-29 18:03:07Z willem $ -*-perl-*- +# + +use strict; +use warnings; +use Net::DNS; +use Net::DNS::ZoneFile; + +use Test::More; +use TestToolkit; + +exit( plan skip_all => 'unresolved AUTOLOAD regression [perl #120694]' ) + unless ( $] > 5.018001 ) + or ( $] < 5.018 ); + +plan tests => 28; + + +my $type = 'DELEG'; +my $code = $Net::DNS::Parameters::typebyname{$type}; + +my $typecode = unpack 'xn', Net::DNS::RR->new( type => $type )->encode; +is( $typecode, $code, "$type RR type code = $code" ); + + +for my $rr ( Net::DNS::RR->new( my $record = 'example. IN DELEG' ) ) { + ok( $rr, "new DELEG RR: $record" ); + is( $rr->priority, undef, 'undefined priority' ); + is( $rr->targetname, undef, 'undefined targetname' ); + ok( $rr->string, 'presentation format string' ); + ok( $rr->generic, 'RFC3597 generic format' ); +} + + +for my $rr ( Net::DNS::RR->new( my $record = 'example. DELEG DIRECT=servername' ) ) { + ok( $rr, "new DELEG RR: $record" ); + isnt( $rr->priority, 0, 'non-zero priority' ); + ok( $rr->targetname, 'defined targetname' ); + ok( $rr->string, 'presentation format string' ); + ok( $rr->generic, 'RFC3597 generic format' ); +} + + +for my $rr ( Net::DNS::RR->new( my $record = 'example. DELEG DIRECT=servername IPv4=192.0.2.1 port=53 key65534' ) ) { + ok( $rr, "new DELEG RR: $record" ); + is( $rr->priority, 1, 'default priority 1' ); + ok( $rr->priority(123), 'set arbitrary priority' ); + is( $rr->priority, 123, 'verify changed priority' ); + exception( 'zero priority value rejected', sub { $rr->priority(0) } ); + ok( $rr->string, 'presentation format string' ); +} + + +for my $rr ( + Net::DNS::RR->new( + my $record = 'example. DELEG IPv6=2001:db8::53 alpn=dot key2 tls-supported-groups=29' + ) + ) { + ok( $rr, "new DELEG RR: $record" ); + is( $rr->targetname, undef, 'undefined targetname' ); + ok( $rr->string, 'presentation format string' ); +} + + +for my $rr ( Net::DNS::RR->new( my $record = 'example. DELEG INCLUDE="targetname"' ) ) { + ok( $rr, "new DELEG RR: $record" ); + is( $rr->priority, 0, 'zero priority' ); + ok( $rr->targetname, 'defined targetname' ); + ok( $rr->string, 'presentation format string' ); + is( $rr->priority(0), 0, 'zero priority silently accepted' ); + exception( 'non-zero priority rejected', sub { $rr->priority(1) } ); +} + +exception( 'incomplete INCLUDE parameter', sub { Net::DNS::RR->new('example. DELEG INCLUDE') } ); +exception( 'incomplete DIRECT parameter set', sub { Net::DNS::RR->new('example. DELEG DIRECT') } ); + +exit; + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.51/t/05-SVCB.t new/Net-DNS-1.52/t/05-SVCB.t --- old/Net-DNS-1.51/t/05-SVCB.t 2025-07-04 15:04:14.000000000 +0200 +++ new/Net-DNS-1.52/t/05-SVCB.t 2025-07-29 20:04:54.000000000 +0200 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: 05-SVCB.t 2017 2025-06-27 13:48:03Z willem $ -*-perl-*- +# $Id: 05-SVCB.t 2028 2025-07-22 16:52:42Z willem $ -*-perl-*- # use strict; @@ -14,7 +14,7 @@ unless ( $] > 5.018001 ) or ( $] < 5.018 ); -plan tests => 49; +plan tests => 50; my $name = 'SVCB.example'; @@ -22,7 +22,7 @@ my $code = 64; my @attr = qw( svcpriority targetname port ); my @data = qw( 1 pool.svc.example 1234 ); -my @also = qw(mandatory alpn no-default-alpn port ipv4hint ech ipv6hint dohpath ohttp); +my @also = qw(key0 mandatory alpn no-default-alpn port ipv4hint ech ipv6hint dohpath ohttp); my $wire = '000104706f6f6c03737663076578616d706c65000003000204d2'; ++++++ README.md ++++++ ## Build Results Current state of perl in openSUSE:Factory is  The current state of perl in the devel project build (devel:languages:perl)  ++++++ _scmsync.obsinfo ++++++ mtime: 1755516054 commit: 148abe710b39671ffef82c34d46aaddbb08b9ae7bf03ff156617df7320f8416b url: https://src.opensuse.org/perl/perl-Net-DNS.git revision: 148abe710b39671ffef82c34d46aaddbb08b9ae7bf03ff156617df7320f8416b projectscmsync: https://src.opensuse.org/perl/_ObsPrj ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2025-08-20 13:41:32.000000000 +0200 @@ -0,0 +1 @@ +.osc