Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-dnslib for openSUSE:Factory checked in at 2024-01-07 21:39:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-dnslib (Old) and /work/SRC/openSUSE:Factory/.python-dnslib.new.28375 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-dnslib" Sun Jan 7 21:39:22 2024 rev:7 rq:1137272 version:0.9.24 Changes: -------- --- /work/SRC/openSUSE:Factory/python-dnslib/python-dnslib.changes 2023-01-04 17:54:39.754910071 +0100 +++ /work/SRC/openSUSE:Factory/.python-dnslib.new.28375/python-dnslib.changes 2024-01-07 21:39:32.918374209 +0100 @@ -1,0 +2,10 @@ +Sat Jan 6 17:11:17 UTC 2024 - Dirk Müller <dmuel...@suse.com> + +- update to 0.9.24: + * #49 - Generate README.md (via symlink) + * #51 - Update Github CI checkout & setup-python actions (and + remove Python 2.7 CI support) + * #54 - Support for RP records + * #57 - Support for LOC record + +------------------------------------------------------------------- Old: ---- dnslib-0.9.23.tar.gz New: ---- dnslib-0.9.24.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-dnslib.spec ++++++ --- /var/tmp/diff_new_pack.DgzLJV/_old 2024-01-07 21:39:33.618399673 +0100 +++ /var/tmp/diff_new_pack.DgzLJV/_new 2024-01-07 21:39:33.618399673 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-dnslib # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-dnslib -Version: 0.9.23 +Version: 0.9.24 Release: 0 Summary: Simple library to encode/decode DNS wire-format packets License: BSD-2-Clause ++++++ dnslib-0.9.23.tar.gz -> dnslib-0.9.24.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnslib-0.9.23/PKG-INFO new/dnslib-0.9.24/PKG-INFO --- old/dnslib-0.9.23/PKG-INFO 2022-10-28 19:28:52.501596500 +0200 +++ new/dnslib-0.9.24/PKG-INFO 2024-01-03 00:31:55.850229500 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: dnslib -Version: 0.9.23 +Version: 0.9.24 Summary: Simple library to encode/decode DNS wire-format packets Home-page: https://github.com/paulc/dnslib Author: PaulC @@ -15,11 +15,13 @@ ## From Version 0.9.12 the master repository for _dnslib_ has been moved to GitHub (https://github.com/paulc/dnslib). Please update any links to the original BitBucket repository as this will no longer be maintained. +## Release 0.9.24 (2024-01-02) will be the last release supporting Python 2.7 and Python <3.7. Supporting old Python versions is increasingly painful and holds back adoption of new features so it's probably time to move on. + +A library to encode/decode DNS wire-format packets supporting both dnslib ------ -A library to encode/decode DNS wire-format packets supporting both Python 2.7 and Python 3.2+. The library provides: @@ -400,6 +402,13 @@ dynamically map from rtype <-> TYPExxxx for unknown record types RR zone representation updated to match RFC3597 Pull Request #47: Add support for DS, SSHFP, and TLSA records (thanks to @rmbolger) + * 0.9.24 2024-01-02 Merge multiple PRs + #49 - Generate README.md (via symlink) + #51 - Update Github CI checkout & setup-python actions (and remove Python 2.7 CI support) + (thanks to @SpencerIsGiddy) + #54 - Support for RP records (thanks to @ryan-gang) + #57 - Support for LOC records (thanks to @valentinesd) + (Note that this will be the last release supporting Python 2.7 and Python <3.7) License: -------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnslib-0.9.23/README new/dnslib-0.9.24/README --- old/dnslib-0.9.23/README 2022-10-28 19:25:14.000000000 +0200 +++ new/dnslib-0.9.24/README 2024-01-03 00:30:21.000000000 +0100 @@ -2,11 +2,13 @@ ## From Version 0.9.12 the master repository for _dnslib_ has been moved to GitHub (https://github.com/paulc/dnslib). Please update any links to the original BitBucket repository as this will no longer be maintained. +## Release 0.9.24 (2024-01-02) will be the last release supporting Python 2.7 and Python <3.7. Supporting old Python versions is increasingly painful and holds back adoption of new features so it's probably time to move on. + +A library to encode/decode DNS wire-format packets supporting both dnslib ------ -A library to encode/decode DNS wire-format packets supporting both Python 2.7 and Python 3.2+. The library provides: @@ -387,6 +389,13 @@ dynamically map from rtype <-> TYPExxxx for unknown record types RR zone representation updated to match RFC3597 Pull Request #47: Add support for DS, SSHFP, and TLSA records (thanks to @rmbolger) + * 0.9.24 2024-01-02 Merge multiple PRs + #49 - Generate README.md (via symlink) + #51 - Update Github CI checkout & setup-python actions (and remove Python 2.7 CI support) + (thanks to @SpencerIsGiddy) + #54 - Support for RP records (thanks to @ryan-gang) + #57 - Support for LOC records (thanks to @valentinesd) + (Note that this will be the last release supporting Python 2.7 and Python <3.7) License: -------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnslib-0.9.23/dnslib/__init__.py new/dnslib-0.9.24/dnslib/__init__.py --- old/dnslib-0.9.23/dnslib/__init__.py 2022-10-28 19:25:02.000000000 +0200 +++ new/dnslib-0.9.24/dnslib/__init__.py 2024-01-03 00:29:09.000000000 +0100 @@ -4,11 +4,13 @@ ## From Version 0.9.12 the master repository for _dnslib_ has been moved to GitHub (https://github.com/paulc/dnslib). Please update any links to the original BitBucket repository as this will no longer be maintained. +## Release 0.9.24 (2024-01-02) will be the last release supporting Python 2.7 and Python <3.7. Supporting old Python versions is increasingly painful and holds back adoption of new features so it's probably time to move on. + +A library to encode/decode DNS wire-format packets supporting both dnslib ------ -A library to encode/decode DNS wire-format packets supporting both Python 2.7 and Python 3.2+. The library provides: @@ -389,6 +391,13 @@ dynamically map from rtype <-> TYPExxxx for unknown record types RR zone representation updated to match RFC3597 Pull Request #47: Add support for DS, SSHFP, and TLSA records (thanks to @rmbolger) + * 0.9.24 2024-01-02 Merge multiple PRs + #49 - Generate README.md (via symlink) + #51 - Update Github CI checkout & setup-python actions (and remove Python 2.7 CI support) + (thanks to @SpencerIsGiddy) + #54 - Support for RP records (thanks to @ryan-gang) + #57 - Support for LOC records (thanks to @valentinesd) + (Note that this will be the last release supporting Python 2.7 and Python <3.7) License: -------- @@ -411,7 +420,7 @@ from dnslib.dns import * -version = "0.9.23" +version = "0.9.24" if __name__ == '__main__': import doctest,sys,textwrap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnslib-0.9.23/dnslib/dns.py new/dnslib-0.9.24/dnslib/dns.py --- old/dnslib-0.9.23/dnslib/dns.py 2022-10-28 19:18:20.000000000 +0200 +++ new/dnslib-0.9.24/dnslib/dns.py 2024-01-02 23:27:37.000000000 +0100 @@ -2248,13 +2248,229 @@ attrs = ('cert_usage','selector','matching_type','cert_data') +class LOC(RD): + """ + LOC record as specified in RFC 1876 + + >>> LOC(37.236693, -115.804069, 1381.0) + 37 14 12.094 N 115 48 14.649 W 1381.00m + >>> LOC(37.236693, -115.804069, 1381.0, 3000.0, 1.0, 1.0) + 37 14 12.094 N 115 48 14.649 W 1381.00m 3000.00m 1.00m 1.00m + >>> a = DNSRecord(DNSHeader(id=1456)) + >>> a.add_answer(*RR.fromZone('area51.local. 60 IN LOC 37 14 12.094 N 115 48 14.649 W 1381.00m')) + >>> a.add_answer(*RR.fromZone('area51.local. 60 IN LOC 37 N 115 48 W 1381.00m')) + >>> a.add_answer(*RR.fromZone('area51.local. 60 IN LOC 37 14 12.094 N 115 48 14.649 W 1381.00m 1m 10000m 10m')) + >>> print(a) + ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1456 + ;; flags: rd; QUERY: 0, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0 + ;; ANSWER SECTION: + area51.local. 60 IN LOC 37 14 12.094 N 115 48 14.649 W 1381.00m + area51.local. 60 IN LOC 37 N 115 48 W 1381.00m + area51.local. 60 IN LOC 37 14 12.094 N 115 48 14.649 W 1381.00m + """ + + @classmethod + def parse(cls, buffer, length): + try: + (_, siz, hp, vp) = buffer.unpack('!BBBB') + (lat, lon, alt) = buffer.unpack('!III') + self = cls.__new__(cls) + self._lat = lat + self._lon = lon + self._alt = alt + self._siz = siz + self._hp = hp + self._vp = vp + return self + except (BufferError, BimapError) as e: + raise DNSError("Error unpacking LOC [offset=%d]: %s" % + (buffer.offset,e)) + + @classmethod + def fromZone(cls, rd, origin=None): + args = [] + # We still support Python 2.7 so use nonlocal workaround + class context: + idx = 0 + tofloat = lambda x: float(x[:-1]) # get float from "100.0m" + def todecimal(chars): + decimal = 0.0 + multiplier = 1 + for c in chars: + if c in rd: + nxt = rd.index(c) + if c in ('S', 'W'): + multiplier = -1 + break + else: + raise DNSError('Missing cardinality [{chars}]'.format(chars=chars)) + for n, d in zip(rd[context.idx:nxt], (1, 60, 3600)): + decimal += float(n) / d + context.idx = nxt + 1 + return decimal * multiplier + + args.append(todecimal('NS')) + args.append(todecimal('EW')) + + try: + while True: + args.append(tofloat(rd[context.idx])) + context.idx += 1 + except IndexError: + return cls(*args) + + def __init__(self, lat, lon, alt, siz=1.0, hp=10000.0, vp=10.0): + self._lat = int(lat * 3600000 + pow(2, 31)) + self._lon = int(lon * 3600000 + pow(2, 31)) + self._alt = int((alt + 100000) * 100) + self._siz = LOC.__tosiz(siz) + self._hp = LOC.__tosiz(hp) + self._vp = LOC.__tosiz(vp) + + def pack(self, buffer): + buffer.pack("!BBBB", 0, self._siz, self._hp, self._vp) + buffer.pack("!III", self._lat, self._lon, self._alt) + + @property + def siz(self): + return self.__reprsiz(self._siz) + + @property + def hp(self): + return self.__reprsiz(self._hp) + + @property + def vp(self): + return self.__reprsiz(self._vp) + + @property + def lat(self): + c = 'N' if self._lat > pow(2, 31) else 'S' + return self._reprcoord(self._lat, c) + + @property + def lon(self): + c = 'E' if self._lon > pow(2, 31) else 'W' + return self._reprcoord(self._lon, c) + + @property + def alt(self): + return self._alt / 100 - 100000 + + @staticmethod + def _reprcoord(value, c): + base = abs(pow(2, 31) - value) + d = base // 3600000 + m = base % 3600000 // 60000 + s = base % 3600000 % 60000 / 1000.0 + + if int(s) == 0: + if m == 0: + return '{d} {c}'.format(c=c,d=d) + else: + return '{d} {m} {c}'.format(d=d,m=m,c=c) + return '{d} {m} {s:.3f} {c}'.format(d=d,m=m,s=s,c=c) + + def __repr__(self): + DEFAULT_SIZ = 0x12 # 1m + DEFAULT_HP = 0x16 # 10,000m + DEFAULT_VP = 0x13 # 10m + + result = '{self.lat} {self.lon} {self.alt:.2f}m'.format(self=self) + + if self._vp != DEFAULT_VP: + result += ' {self.siz:.2f}m {self.hp:.2f}m {self.vp:.2f}m'.format(self=self) + elif self._hp != DEFAULT_HP: + result += ' {self.siz:.2f}m {self.hp:.2f}m'.format(self=self) + elif self._siz != DEFAULT_SIZ: + result += ' {self.siz:.2f}m'.format(self=self) + + return result + + @staticmethod + def __tosiz(v): + if int(v) == 0: + return 0 + e = 0 + v *= 100 + while v >= 10 and e < 9: + v /= 10 + e += 1 + v = int(round(v)) + if v >= 10: + raise DNSError("Value out of range") + return v << 4 | e + + @staticmethod + def __reprsiz(v): + b = v >> 4 + e = v & 0x0F + if b > 9 or e > 9 or (b == 0 and e > 0): + raise DNSError("Value out of range") + return b * pow(10, e) / 100 + +class RP(RD): + """ + RP record as specified in RFC 1183. + https://datatracker.ietf.org/doc/html/rfc1183 + """ + @classmethod + def parse(cls,buffer,length): + try: + mbox = buffer.decode_name() + txt = buffer.decode_name() + return cls(mbox, txt) + except (BufferError,BimapError) as e: + raise DNSError("Error unpacking RP [offset=%d]: %s" % + (buffer.offset,e)) + + @classmethod + def fromZone(cls,rd,origin=None): + return cls(label(rd[0],origin),label(rd[1],origin)) + + def __init__(self,mbox=None, txt=None): + self.mbox = mbox + self.txt = txt + + def set_mbox(self,mbox): + if isinstance(mbox,DNSLabel): + self._mbox = mbox + else: + self._mbox = DNSLabel(mbox) + + def get_mbox(self): + return self._mbox + + mbox = property(get_mbox,set_mbox) + + def set_txt(self,txt): + if isinstance(txt,DNSLabel): + self._txt = txt + else: + self._txt = DNSLabel(txt) + + def get_txt(self): + return self._txt + + txt = property(get_txt,set_txt) + + def pack(self,buffer): + buffer.encode_name(self.mbox) + buffer.encode_name(self.txt) + + def __repr__(self): + return "%s %s" % (self.mbox,self.txt) + + attrs = ('mbox','txt') + # Map from RD type to class (used to pack/unpack records) # If you add a new RD class you must add to RDMAP RDMAP = { 'CNAME':CNAME, 'A':A, 'AAAA':AAAA, 'TXT':TXT, 'MX':MX, 'PTR':PTR, 'SOA':SOA, 'NS':NS, 'NAPTR': NAPTR, 'SRV':SRV, 'DNSKEY':DNSKEY, 'RRSIG':RRSIG, 'NSEC':NSEC, 'CAA':CAA, - 'HTTPS': HTTPS, 'DS':DS, 'SSHFP':SSHFP, 'TLSA':TLSA + 'HTTPS': HTTPS, 'DS':DS, 'SSHFP':SSHFP, 'TLSA':TLSA, 'LOC':LOC, + 'RP':RP, } ## diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnslib-0.9.23/dnslib.egg-info/PKG-INFO new/dnslib-0.9.24/dnslib.egg-info/PKG-INFO --- old/dnslib-0.9.23/dnslib.egg-info/PKG-INFO 2022-10-28 19:28:52.000000000 +0200 +++ new/dnslib-0.9.24/dnslib.egg-info/PKG-INFO 2024-01-03 00:31:55.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: dnslib -Version: 0.9.23 +Version: 0.9.24 Summary: Simple library to encode/decode DNS wire-format packets Home-page: https://github.com/paulc/dnslib Author: PaulC @@ -15,11 +15,13 @@ ## From Version 0.9.12 the master repository for _dnslib_ has been moved to GitHub (https://github.com/paulc/dnslib). Please update any links to the original BitBucket repository as this will no longer be maintained. +## Release 0.9.24 (2024-01-02) will be the last release supporting Python 2.7 and Python <3.7. Supporting old Python versions is increasingly painful and holds back adoption of new features so it's probably time to move on. + +A library to encode/decode DNS wire-format packets supporting both dnslib ------ -A library to encode/decode DNS wire-format packets supporting both Python 2.7 and Python 3.2+. The library provides: @@ -400,6 +402,13 @@ dynamically map from rtype <-> TYPExxxx for unknown record types RR zone representation updated to match RFC3597 Pull Request #47: Add support for DS, SSHFP, and TLSA records (thanks to @rmbolger) + * 0.9.24 2024-01-02 Merge multiple PRs + #49 - Generate README.md (via symlink) + #51 - Update Github CI checkout & setup-python actions (and remove Python 2.7 CI support) + (thanks to @SpencerIsGiddy) + #54 - Support for RP records (thanks to @ryan-gang) + #57 - Support for LOC records (thanks to @valentinesd) + (Note that this will be the last release supporting Python 2.7 and Python <3.7) License: --------