ascension

Migrate DNS zones to the GNU Name System
Log | Files | Refs | README | LICENSE

commit 06ab83ec5cac6b56e8e1a5f2730e01a4064bcf16
parent 466482c5e2dff6758727844e1b62784fa0504bb4
Author: rexxnor <rexxnor+gnunet@brief.li>
Date:   Fri, 24 May 2019 09:36:24 +0200

bumped version to GNUnet compatible version, updated manpage

Diffstat:
MREADME | 2+-
Aascension-0.11.4.tar.gz | 0
Mascension.1 | 24+++++++++++-------------
Mascension/ascension.py | 2+-
Adeb_dist/ascension-0.11.4/.pc/.quilt_patches | 1+
Adeb_dist/ascension-0.11.4/.pc/.quilt_series | 1+
Adeb_dist/ascension-0.11.4/.pc/.version | 1+
Adeb_dist/ascension-0.11.4/.pc/applied-patches | 0
Adeb_dist/ascension-0.11.4/PKG-INFO | 81+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adeb_dist/ascension-0.11.4/README | 70++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adeb_dist/ascension-0.11.4/ascension.1 | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adeb_dist/ascension-0.11.4/ascension/__init__.py | 0
Adeb_dist/ascension-0.11.4/ascension/ascension.py | 762+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adeb_dist/ascension-0.11.4/debian/.debhelper/generated/python3-ascension/installed-by-dh_installdocs | 0
Adeb_dist/ascension-0.11.4/debian/changelog | 5+++++
Adeb_dist/ascension-0.11.4/debian/compat | 1+
Adeb_dist/ascension-0.11.4/debian/control | 36++++++++++++++++++++++++++++++++++++
Adeb_dist/ascension-0.11.4/debian/files | 2++
Adeb_dist/ascension-0.11.4/debian/python3-ascension.postinst | 44++++++++++++++++++++++++++++++++++++++++++++
Adeb_dist/ascension-0.11.4/debian/python3-ascension.postinst.debhelper | 7+++++++
Adeb_dist/ascension-0.11.4/debian/python3-ascension.prerm | 19+++++++++++++++++++
Adeb_dist/ascension-0.11.4/debian/python3-ascension.prerm.debhelper | 10++++++++++
Adeb_dist/ascension-0.11.4/debian/python3-ascension.substvars | 3+++
Adeb_dist/ascension-0.11.4/debian/python3-ascension/DEBIAN/control | 30++++++++++++++++++++++++++++++
Adeb_dist/ascension-0.11.4/debian/python3-ascension/DEBIAN/md5sums | 10++++++++++
Adeb_dist/ascension-0.11.4/debian/python3-ascension/DEBIAN/postinst | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
Adeb_dist/ascension-0.11.4/debian/python3-ascension/DEBIAN/prerm | 29+++++++++++++++++++++++++++++
Adeb_dist/ascension-0.11.4/debian/python3-ascension/usr/bin/ascension | 12++++++++++++
Adeb_dist/ascension-0.11.4/debian/python3-ascension/usr/man/man1/ascension.1 | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adeb_dist/ascension-0.11.4/debian/python3-ascension/usr/share/doc/python3-ascension/changelog.Debian.gz | 0
Adeb_dist/ascension-0.11.4/debian/rules | 31+++++++++++++++++++++++++++++++
Adeb_dist/ascension-0.11.4/debian/source/format | 1+
Adeb_dist/ascension-0.11.4/debian/source/options | 2++
Adeb_dist/ascension-0.11.4/setup.cfg | 4++++
Adeb_dist/ascension-0.11.4/setup.py | 55+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adeb_dist/ascension_0.11.4-1.debian.tar.xz | 0
Adeb_dist/ascension_0.11.4-1.dsc | 19+++++++++++++++++++
Adeb_dist/ascension_0.11.4-1_amd64.buildinfo | 180+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adeb_dist/ascension_0.11.4-1_amd64.changes | 34++++++++++++++++++++++++++++++++++
Adeb_dist/ascension_0.11.4-1_source.buildinfo | 177+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adeb_dist/ascension_0.11.4-1_source.changes | 31+++++++++++++++++++++++++++++++
Adeb_dist/ascension_0.11.4.orig.tar.gz | 0
Adeb_dist/python3-ascension_0.11.4-1_all.deb | 0
Mhelpers/ascension.1 | 149+++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------
Msetup.py | 2+-
45 files changed, 2040 insertions(+), 60 deletions(-)

diff --git a/README b/README @@ -39,7 +39,7 @@ Ascension Usage: ascension <domain> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] - ascension <domain> <port> [-d] [-p] [-s] [--minimum-ttl=<ttl>] + ascension <domain> <port> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] ascension <domain> -n <transferns> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] ascension <domain> -n <transferns> <port> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] ascension -p | --public diff --git a/ascension-0.11.4.tar.gz b/ascension-0.11.4.tar.gz Binary files differ. diff --git a/ascension.1 b/ascension.1 @@ -29,15 +29,13 @@ .Nd migrate existing DNS zones into the GNU Name System .Sh SYNOPSIS .Nm -.Op Ar domain Fl d Fl p Fl s \- minimum-ttl=<ttl> \- dry-run -.Op Ar domain port Fl d Fl p Fl s \- minimum-ttl=<ttl> \- dry-run -.Op Ar domain Fl n Ar transferns Fl d Fl p Fl s Fl \- minimum-ttl=<ttl> \- dry-run -.Op Ar domain Fl n Ar transferns Ar port Fl d Fl p Fl s \- minimum-ttl=<ttl> \- dry-run -.Op Fl d | \-debug -.Op Fl h | \-help -.Op Fl p | \-public -.Op Fl v | \-version -.Op Fl s | \-standalone +.Op Ar domain Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run +.Nm +.Op Ar domain port Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run +.Nm +.Op Ar domain Fl n Ar transferns Fl d Fl p Fl s Fl -minimum-ttl=<ttl> -dry-run +.Nm +.Op Ar domain Fl n Ar transferns Ar port Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run .Sh DESCRIPTION .Nm is a tool to migrate existing DNS Zones into the GNU Name System (GNS) using incremental zone transfers (AXFR/IXFR). @@ -51,16 +49,16 @@ relies on these 3 GNUnet services, .Xr gnunet-arm 1 must be installed and running. .Bl -tag -width Ds -.It Ar domain Fl d Fl p Fl s Fl minimum-ttl=<ttl> +.It Ar domain Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run Migrate the DOMAIN passed as domain. The debug, public and standalone options are optional. -.It Ar domain port Fl d Fl p Fl s Fl minimum-ttl=<ttl> +.It Ar domain port Fl d Fl p Fl s -minimum-ttl=<ttl -dry-run> Migrate the DOMAIN domain, using port for zone transfer. The debug, public and standalone options are optional. -.It Ar domain Fl n Ar transferns Fl d Fl p Fl s Fl minimum-ttl=<ttl> +.It Ar domain Fl n Ar transferns Fl d Fl p Fl s -minimum-ttl=<ttl -dry-run> Migrate the DOMAIN domain from the DNS server transferns. The debug, public and standalone options are optional. -.It Ar domain Fl n Ar transferns Ar port Fl d Fl p Fl s Fl minimum-ttl=<ttl> +.It Ar domain Fl n Ar transferns Ar port Fl d Fl p Fl s -minimum-ttl=<ttl -dry-run> Migrate the DOMAIN domain from the DNS server transferns using port for the zone transfer. The debug, public and standalone options are optional. .It Fl s | \-standalone diff --git a/ascension/ascension.py b/ascension/ascension.py @@ -659,7 +659,7 @@ def main(): Initializes object and handles arguments """ # argument parsing from docstring definition - args = docopt.docopt(__doc__, version='Ascension 0.6.1') + args = docopt.docopt(__doc__, version='Ascension 0.11.4') # argument parsing debug = args['--debug'] diff --git a/deb_dist/ascension-0.11.4/.pc/.quilt_patches b/deb_dist/ascension-0.11.4/.pc/.quilt_patches @@ -0,0 +1 @@ +debian/patches diff --git a/deb_dist/ascension-0.11.4/.pc/.quilt_series b/deb_dist/ascension-0.11.4/.pc/.quilt_series @@ -0,0 +1 @@ +series diff --git a/deb_dist/ascension-0.11.4/.pc/.version b/deb_dist/ascension-0.11.4/.pc/.version @@ -0,0 +1 @@ +2 diff --git a/deb_dist/ascension-0.11.4/.pc/applied-patches b/deb_dist/ascension-0.11.4/.pc/applied-patches diff --git a/deb_dist/ascension-0.11.4/PKG-INFO b/deb_dist/ascension-0.11.4/PKG-INFO @@ -0,0 +1,81 @@ +Metadata-Version: 1.1 +Name: ascension +Version: 0.11.4 +Summary: Tool to migrate DNS Zones to the GNU Name System +Home-page: https://gnunet.org/git/ascension.git/ +Author: rexxnor +Author-email: rexxnor+gnunet@brief.li +License: UNKNOWN +Description: # Ascension + + Tool to easily migrate existing DNS Zones into the GNU Name System using + incremental zone transfers (AXFR/IXFR). + + ## How to install + To install the ascension simply execute one of the following commands in the + freshly cloned directory: + + ```bash + # System wide installation + sudo python3 setup.py install + + # Local installation through virtualenv + python3 -m venv .venv + source .venv/bin/activate + python3 setup.py install + ``` + + ## How to install (Developer) + A developer installation is very handy when you are making changes to the source + code as this way you don't need to re-run the installation procedure every time + you make a change. + + ```bash + # installation through virtualenv + python3 -m venv .venv + source .venv/bin/activate + python3 setup.py develop + ``` + + ## How to use + If you have installed it, simply execute ascension with one of several options. + You can also just run the file ascension.py itself directly. + + Taken from the docstring of the ascension.py file: + ``` + Ascension + + Usage: + ascension <domain> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] + ascension <domain> <port> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] + ascension <domain> -n <transferns> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] + ascension <domain> -n <transferns> <port> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] + ascension -p | --public + ascension -s | --debug + ascension -s | --standalone + ascension -h | --help + ascension -v | --version + + Options: + <domain> Domain to migrate + <port> Port for zone transfer + <transferns> DNS Server that does the zone transfer + --minimum-ttl=<ttl> Minimum TTL for records to migrate [default: 3600] + --dry-run Only try if a zone transfer is allowed + -p --public Make records public on the DHT + -s --standalone Run ascension once + -d --debug Enable debugging + -h --help Show this screen. + -v --version Show version. + ``` + + Example use: + ``` + # Transfers the sy TLD from ns1.tld.sy. + ascension sy -n ns1.tld.sy. + # Transfers the nu TLD from zonedata.iis.se with debug options enabled + ascension nu -n zonedata.iis.se. -d + ``` + +Platform: UNKNOWN +Classifier: Programming Language :: Python :: 3 diff --git a/deb_dist/ascension-0.11.4/README b/deb_dist/ascension-0.11.4/README @@ -0,0 +1,70 @@ +# Ascension + +Tool to easily migrate existing DNS Zones into the GNU Name System using +incremental zone transfers (AXFR/IXFR). + +## How to install +To install the ascension simply execute one of the following commands in the +freshly cloned directory: + +```bash +# System wide installation +sudo python3 setup.py install + +# Local installation through virtualenv +python3 -m venv .venv +source .venv/bin/activate +python3 setup.py install +``` + +## How to install (Developer) +A developer installation is very handy when you are making changes to the source +code as this way you don't need to re-run the installation procedure every time +you make a change. + +```bash +# installation through virtualenv +python3 -m venv .venv +source .venv/bin/activate +python3 setup.py develop +``` + +## How to use +If you have installed it, simply execute ascension with one of several options. +You can also just run the file ascension.py itself directly. + +Taken from the docstring of the ascension.py file: +``` +Ascension + +Usage: + ascension <domain> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] + ascension <domain> <port> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] + ascension <domain> -n <transferns> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] + ascension <domain> -n <transferns> <port> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] + ascension -p | --public + ascension -s | --debug + ascension -s | --standalone + ascension -h | --help + ascension -v | --version + +Options: + <domain> Domain to migrate + <port> Port for zone transfer + <transferns> DNS Server that does the zone transfer + --minimum-ttl=<ttl> Minimum TTL for records to migrate [default: 3600] + --dry-run Only try if a zone transfer is allowed + -p --public Make records public on the DHT + -s --standalone Run ascension once + -d --debug Enable debugging + -h --help Show this screen. + -v --version Show version. +``` + +Example use: +``` +# Transfers the sy TLD from ns1.tld.sy. +ascension sy -n ns1.tld.sy. +# Transfers the nu TLD from zonedata.iis.se with debug options enabled +ascension nu -n zonedata.iis.se. -d +``` diff --git a/deb_dist/ascension-0.11.4/ascension.1 b/deb_dist/ascension-0.11.4/ascension.1 @@ -0,0 +1,106 @@ +.\" This file is part of Ascension. +.\" Copyright (C) 2018,2019 GNUnet e.V. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.3 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A +.\" copy of the license is included in the file +.\" ``FDL-1.3''. +.\" +.\" A copy of the license is also available from the Free Software +.\" Foundation Web site at http://www.gnu.org/licenses/fdl.html. +.\" +.\" Alternately, this document is also available under the General +.\" Public License, version 3 or later, as published by the Free Software +.\" Foundation. A copy of the license is included in the file +.\" ``GPL3''. +.\" +.\" A copy of the license is also available from the Free Software +.\" Foundation Web site at http://www.gnu.org/licenses/gpl.html. +.\" +.\" SPDX-License-Identifier: GPL3.0-or-later OR FDL1.3-or-later +.\" +.Dd May 9, 2019 +.Dt ASCENSION 1 +.Os +.Sh NAME +.Nm ascension +.Nd migrate existing DNS zones into the GNU Name System +.Sh SYNOPSIS +.Nm +.Op Ar domain Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run +.Nm +.Op Ar domain port Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run +.Nm +.Op Ar domain Fl n Ar transferns Fl d Fl p Fl s Fl -minimum-ttl=<ttl> -dry-run +.Nm +.Op Ar domain Fl n Ar transferns Ar port Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run +.Sh DESCRIPTION +.Nm +is a tool to migrate existing DNS Zones into the GNU Name System (GNS) using incremental zone transfers (AXFR/IXFR). +To achieve this it uses +.Xr gnunet-identity 1 , +.Xr gnunet-namestore 1 , +.Xr gnunet-gns 1 . +As +.Nm +relies on these 3 GNUnet services, +.Xr gnunet-arm 1 +must be installed and running. +.Bl -tag -width Ds +.It Ar domain Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run +Migrate the DOMAIN passed as domain. +The debug, public and standalone options are optional. +.It Ar domain port Fl d Fl p Fl s -minimum-ttl=<ttl -dry-run> +Migrate the DOMAIN domain, using port for zone transfer. +The debug, public and standalone options are optional. +.It Ar domain Fl n Ar transferns Fl d Fl p Fl s -minimum-ttl=<ttl -dry-run> +Migrate the DOMAIN domain from the DNS server transferns. +The debug, public and standalone options are optional. +.It Ar domain Fl n Ar transferns Ar port Fl d Fl p Fl s -minimum-ttl=<ttl -dry-run> +Migrate the DOMAIN domain from the DNS server transferns using port for the zone transfer. +The debug, public and standalone options are optional. +.It Fl s | \-standalone +Run Ascension once +.It Fl d | \-debug +Enable debugging +.It Fl h | \-help +Print short help on options +.It Fl p | \-public +Make records public on the DHT +.It Fl v | \-version +Print ascension version number +.El +.\" .Sh FILES +.Sh EXAMPLES +To transfer the sy TLD from ns1.tld.sy: +.Pp +.Dl $ ascension sy -n ns1.tld.sy. +.Pp +To transfer the nu TLD from zonedata.iis.se with debug options enabled: +.Pp +.Dl $ ascension nu -n zonedata.iis.se. -d +.Sh SEE ALSO +.Xr gnunet-arm 1 , +.Xr gnunet-gns 1 , +.Xr gnunet-identity 1 , +.Xr gnunet-namestore 1 +.Sh HISTORY +The +.Nm +tool was designed and written in 2018 by +.An rexxnor Aq Mt rexxnor+gnunet@brief.li . +.Sh AUTHORS +This man page was written by +.An ng0 Aq Mt ng0@gnunet.org +and updated by +.An rexxnor Aq Mt rexxnor+gnunet@brief.li +it first appeared in +.Nm +0.5.1. +.Sh BUGS +Report bugs by using +.Lk https://bugs.gnunet.org +or by sending electronic mail to +.Aq Mt bug-gnunet@gnu.org . diff --git a/deb_dist/ascension-0.11.4/ascension/__init__.py b/deb_dist/ascension-0.11.4/ascension/__init__.py diff --git a/deb_dist/ascension-0.11.4/ascension/ascension.py b/deb_dist/ascension-0.11.4/ascension/ascension.py @@ -0,0 +1,762 @@ +#!/usr/bin/env python3 +# This file is part of Ascension. +# Copyright (C) 2019 GNUnet e.V. +# +# Ascension is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, +# or (at your option) any later version. +# +# Ascension is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +# SPDX-License-Identifier: AGPL3.0-or-later +# +# Author rexxnor +""" +Usage: + ascension <domain> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] + ascension <domain> <port> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] + ascension <domain> -n <transferns> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] + ascension <domain> -n <transferns> <port> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] + ascension -p | --public + ascension -d | --debug + ascension -s | --standalone + ascension -h | --help + ascension -v | --version + +Options: + <domain> Domain to migrate + <port> Port for zone transfer + <transferns> DNS Server that does the zone transfer + --minimum-ttl=<ttl> Minimum TTL for records to migrate [default: 3600] + --dry-run Only try if a zone transfer is allowed + -p --public Make records public on the DHT + -s --standalone Run ascension once + -d --debug Enable debugging + -h --help Show this screen. + -v --version Show version. +""" + +# imports +import logging +import queue +import re +import socket +import sys +import time +import subprocess as sp +import threading +import dns.query +import dns.resolver +import dns.zone +import docopt + +# GLOBALS +GNUNET_ZONE_CREATION_COMMAND = 'gnunet-identity' +GNUNET_NAMESTORE_COMMAND = 'gnunet-namestore' +GNUNET_GNS_COMMAND = 'gnunet-gns' +GNUNET_ARM_COMMAND = 'gnunet-arm' +# This is the list of record types Ascension (and GNS) currently +# explicitly supports. Record types we encounter that are not +# in this list and not in the OBSOLETE_RECORD_TYPES list will +# create a warning (information loss during migration). +SUPPORTED_RECORD_TYPES = [ + "A", "AAAA", "NS", "MX", "SRV", "TXT", "CNAME" +] +# Record types that exist in DNS but that won't ever exist in GNS +# as they are not needed anymore (so we should not create a warning +# if we drop one of these). +OBSOLETE_RECORD_TYPES = [ + "PTR", + "SIG", "KEY", + "RRSIG", "NSEC", "DNSKEY", "NSEC3", "NSEC3PARAM", "CDNSKEY", + "TKEY", "TSIG", + "TA", "DLV", +] + +class Ascender(): + """ + Class that provides migration for any given domain + """ + def __init__(self, + domain: str, + transferns: str, + port: str, + flags: str, + minimum: str) -> None: + self.domain = domain + if domain[-1] == '.': + self.domain = self.domain[:-1] + self.port = int(port) + self.transferns = transferns + self.soa = None + self.tld = self.domain.split(".")[::-1][0] + self.zone = None + self.zonegenerator = None + self.flags = flags + self.minimum = int(minimum) + self.subzonedict = dict() + + def bootstrap_zone(self) -> None: + """ + Creates the zone in gnunet + """ + try: + ret = sp.run([GNUNET_ZONE_CREATION_COMMAND, + '-C', self.domain]) + logging.info("executed command: %s", " ".join(ret.args)) + except sp.CalledProcessError: + logging.info("Zone %s already exists!", self.domain) + + def get_dns_zone_serial(self, + domain: str, + resolver=None) -> int: + """ + Gets the current serial for a given zone + :param domain: Domain to query for in DNS + :param resolver: Nameserver to query in DNS, defaults to None + :returns: Serial of the zones SOA record + """ + # Makes domains better resolvable + domain = domain + "." + # SOA is different if taken directly from SOA record + # compared to AXFR/IXFR - changed to respect this + try: + soa_answer = dns.resolver.query(domain, 'SOA') + master_answer = dns.resolver.query(soa_answer[0].mname, 'A') + except dns.resolver.NoAnswer: + logging.warning("The domain '%s' is not publicly resolvable.", + domain) + except dns.resolver.NXDOMAIN: + logging.warning("The domain '%s' is not publicly resolvable.", + domain) + except Exception: + logging.warning("The domain '%s' is not publicly resolvable.", + domain) + + try: + if resolver: + zone = dns.zone.from_xfr(dns.query.xfr( + resolver, domain, port=self.port)) + else: + zone = dns.zone.from_xfr(dns.query.xfr( + master_answer[0].address, domain, + port=self.port)) + except dns.resolver.NoAnswer: + logging.critical("Nameserver for '%s' did not answer.", domain) + return None + except dns.exception.FormError: + logging.critical("Domain '%s' does not allow xfr requests.", + domain) + return None + except Exception: + logging.error("Unexpected error while transfering domain '%s'", + domain) + return None + + for soa_record in zone.iterate_rdatas(rdtype=dns.rdatatype.SOA): + if not self.transferns: + mname = soa_record[2].mname + if self.domain not in mname: + self.transferns = str(soa_record[2].mname) + "." + domain + else: + self.transferns = str(soa_record[2].mname) + return int(soa_record[2].serial) + + def add_records_to_gns(self) -> None: + """ + Extracts records from zone and adds them to GNS + :raises AttributeError: When getting incomplete data + """ + logging.info("Starting to add records into GNS...") + + # Defining FIFO Queue + taskqueue = queue.Queue(maxsize=5) + + # Defining worker + def worker(): + while True: + # define recordline + recordline = list() + label = "" + domain = None + + labelrecords = taskqueue.get() + # break if taskqueue is empty + if labelrecords is None: + break + + # execute thing to run on item + label, listofrdatasets = labelrecords + label = str(label) + subzones = str(label).split('.') + domain = self.domain + + if len(subzones) > 1: + label = subzones[0] + subdomains = ".".join(subzones[1:]) + subzone = "%s.%s" % (subdomains, domain) + fqdn = "%s.%s.%s" % (label, subdomains, domain) + if fqdn in self.subzonedict.keys(): + label = "@" + domain = fqdn + elif subzone in self.subzonedict.keys(): + domain = subzone + + for rdataset in listofrdatasets: + for record in rdataset: + rdtype = dns.rdatatype.to_text(record.rdtype) + if rdtype == "SOA": + continue + if rdtype not in SUPPORTED_RECORD_TYPES: + if rdtype not in OBSOLETE_RECORD_TYPES: + logging.critical("%s records not supported!", + rdtype) + continue + + try: + if rdataset.ttl <= self.minimum: + ttl = self.minimum + else: + ttl = rdataset.ttl + except AttributeError: + ttl = self.minimum + + value = str(record) + + # ignore NS for itself here + if label == '@' and rdtype == 'NS': + logging.info("ignoring NS record for itself") + + # modify value to fit gns syntax + rdtype, value, label = \ + self.transform_to_gns_format(record, + rdtype, + domain, + label) + # skip record if value is none + if value is None: + continue + + if isinstance(value, list): + for element in value: + # build recordline + recordline.append("-R") + recordline.append('%d %s %s %s' % + (int(ttl), + rdtype, + self.flags, + element)) + else: + # build recordline + recordline.append("-R") + recordline.append('%d %s %s %s' % + (int(ttl), + rdtype, + self.flags, + value)) + + # add recordline to gns and filter out empty lines + if len(recordline) > 1: + self.add_recordline_to_gns(recordline, + domain, + label) + + taskqueue.task_done() + # End of worker + + self.create_zone_hierarchy() + + # Create one thread + thread = threading.Thread(target=worker) + thread.start() + + # add records + for name, rdatasets in self.zone.nodes.items(): + # log if the rdataset is empty for some reason + if not rdatasets: + logging.warning("Empty Rdataset!") + continue + taskqueue.put((name, rdatasets)) + + # Block until all tasks are done + taskqueue.join() + + # Stop workers and threads + taskqueue.put(None) + thread.join(timeout=10) + if thread.is_alive(): + logging.critical("thread join timed out, still running") + + # Add soa record to GNS once completed (updates the previous one) + self.add_soa_record_to_gns(self.soa) + + logging.info("All records have been added!") + + @staticmethod + def add_recordline_to_gns(recordline: list, + zonename: str, + label: str) -> None: + """ + Replaces records in zone or adds them if not + :param recordline: records to replace as list in form + ['-R', 'TTL TYPE FLAGS VALUE'] + :param zonename: zonename of zone to add records to + :param label: label under which to add the records + """ + logging.info("trying to add %d records with name %s", + len(recordline)/2, label) + + ret = sp.run([GNUNET_NAMESTORE_COMMAND, + '-z', zonename, + '-n', str(label), + ] + recordline) + + if ret.returncode != 0: + logging.warning("failed adding record with name %s", + ' '.join(ret.args)) + else: + logging.info("successfully added record with command %s", + ' '.join(ret.args)) + + def resolve_glue(self, + authorityname: str) -> list: + """ + Resolves IP Adresses within zone + :param authorityname: + """ + try: + rdsets = self.zone[authorityname].rdatasets + except KeyError: + return [] + value = [] + for rdataset in rdsets: + if rdataset.rdtype in [dns.rdatatype.A, dns.rdatatype.AAAA]: + for rdata in rdataset: + value.append("%s.%s@%s" % (authorityname, + self.domain, + str(rdata))) + return value + + def transform_to_gns_format(self, + record: dns.rdata.Rdata, + rdtype: dns.rdata.Rdata, + zonename: str, + label: str) -> tuple: + """ + Transforms value of record to GNS compatible format + :param record: record to transform + :param rdtype: record value to transform + :param zonename: name of the zone to add to + :param label: label under which the record is stored + :returns: a tuple consisting of the new rdtype, the label and value + """ + value = str(record) + if label is None: + label = '@' + if rdtype == 'SOA': + zonetuple = str(value).split(' ') + authns, owner, serial, refresh, retry, expiry, irefresh = zonetuple + if authns[-1] == '.': + authns = authns[:-1] + if owner[-1] == '.': + owner = owner[:-1] + # hacky and might cause bugs + authns += self.tld + owner += self.tld + value = "rname=%s.%s mname=%s.%s %d,%d,%d,%d,%d" % ( + authns, zonename, owner, zonename, + int(serial), int(refresh), int(retry), + int(expiry), int(irefresh) + ) + elif rdtype in ['CNAME']: + if value[-1] == ".": + value = value[:-1] + else: + value = "%s.%s" % (value, self.domain) + elif rdtype == 'NS': + if self.subzonedict.get(str(label) + "." + zonename): + return (None, None, None) + nameserver = str(record.target) + if nameserver[-1] == ".": + nameserver = nameserver[:-1] + if value[-1] == ".": + # FQDN provided + if value.endswith(".%s." % zonename): + # in bailiwick + value = self.resolve_glue(record.target) + else: + # out of bailiwick + if label.startswith("@"): + value = '%s@%s' % (zonename, nameserver) + else: + value = '%s.%s@%s' % (str(label), + zonename, + nameserver) + else: + # Name is relative to zone, must be in bailiwick + value = self.resolve_glue(record.target) + if not value: + if label.startswith("@"): + value = '%s@%s.%s' % (self.domain, + record.target, + self.domain) + else: + value = '%s.%s@%s.%s' % (str(label), self.domain, + record.target, self.domain) + + logging.info("transformed %s record to GNS2DNS format", rdtype) + rdtype = 'GNS2DNS' + elif rdtype == 'MX': + priority, mailserver = str(value).split(' ') + if mailserver[-1] == ".": + mailserver = mailserver[:-1] + mailserver = '%s.%s' % (mailserver, zonename) + value = '%s,%s' % (priority, mailserver) + logging.info("transformed %s record to GNS format", rdtype) + elif rdtype == 'SRV': + # this is the number for a SRV record + rdtype = 'BOX' + srv = 33 + + # tearing the record apart + try: + srvrecord = str(label).split('.') + proto = srvrecord[1] + except IndexError: + logging.warning("could not parse SRV label %s", label) + return (rdtype, None, None) + priority, weight, destport, target = value.split(' ') + + try: + protostring = proto.strip('_') + protonum = socket.getprotobyname(protostring) + except OSError: + logging.warning("invalid protocol: %s", protostring) + return (rdtype, None, None) + + if target[:-1] == ".": + value = '%s %s %s %s %s %s %s' % ( + destport, protonum, srv, priority, weight, destport, + "%s" % target + ) + else: + value = '%s %s %s %s %s %s %s' % ( + destport, protonum, srv, priority, weight, destport, + "%s.%s" % (target, zonename) + ) + + label = target + else: + logging.info("Did not transform record of type: %s", rdtype) + return (rdtype, value, label) + + def get_gns_zone_serial(self) -> int: + """ + Fetches the zones serial from GNS + :returns: serial of the SOA record in GNS + """ + try: + serial = sp.check_output([GNUNET_GNS_COMMAND, + '-t', 'SOA', + '-u', '%s' % self.domain,]) + serial = serial.decode() + except sp.CalledProcessError: + serial = "" + soa_serial = 0 + soapattern = re.compile(r'.+\s(\d+),\d+,\d+,\d+,\d+', re.M) + if re.findall(soapattern, serial): + soa_serial = re.findall(soapattern, serial)[0] + else: + soa_serial = 0 + return int(soa_serial) + + @staticmethod + def get_zone_soa(zone) -> dns.rdatatype.SOA: + """ + Fetches soa record from zone a given zone + :param zone: A dnspython zone + :returns: SOA record of given zone + """ + soa = None + for soarecord in zone.iterate_rdatas(rdtype=dns.rdatatype.SOA): + if str(soarecord[0]) == '@': + soa = soarecord + return soa + + def add_soa_record_to_gns(self, record) -> None: + """ + Adds a SOA record to GNS + :param record: The record to add + """ + label, ttl, rdata = record + zonetuple = str(rdata).split(' ') + authns, owner, serial, refresh, retry, expiry, irefresh = zonetuple + if authns[-1] == '.': + authns = authns[:-1] + else: + authns = "%s.%s" % (authns, self.domain) + if owner[-1] == '.': + owner = owner[:-1] + else: + owner = "%s.%s" % (owner, self.domain) + + value = "rname=%s mname=%s %s,%s,%s,%s,%s" % (authns, + owner, + serial, + refresh, + retry, + expiry, + irefresh) + recordval = '%s %s %s %s' % (ttl, "SOA", self.flags, str(value)) + recordline = ['-R', recordval] + self.add_recordline_to_gns(recordline, self.domain, str(label)) + + @staticmethod + def create_zone_and_get_pkey(zonestring: str) -> str: + """ + Creates the zone in zonestring and returns pkey + :param zonestring: The label name of the zone + :returns: gnunet pkey of the zone + """ + try: + ret = sp.run([GNUNET_ZONE_CREATION_COMMAND, + '-C', zonestring, + '-V'], + stdout=sp.PIPE, + stderr=sp.DEVNULL, + check=True) + logging.info("executed command: %s", " ".join(ret.args)) + pkey_zone = ret.stdout.decode().strip() + except sp.CalledProcessError: + ret = sp.run([GNUNET_ZONE_CREATION_COMMAND, + '-dq', + '-e', zonestring], + stdout=sp.PIPE) + logging.info("executed command: %s", " ".join(ret.args)) + pkey_zone = ret.stdout.decode().strip() + return pkey_zone + + @staticmethod + def add_pkey_record_to_zone(pkey: str, + domain: str, + label: str, + ttl: str) -> None: + """ + Adds the pkey of the subzone to the parent zone + :param pkey: the public key of the child zone + :param domain: the name of the parent zone + :param label: the label under which to add the pkey + :param ttl: the time to live the record should have + """ + #lookup = sp.run(GNUNET_NAMESTORE_COMMAND, + # '-z', domain, + # '-n', label, + # '-t', 'PKEY') + #if not 'Got result:' in lookup.stdout: + debug = " ".join([GNUNET_NAMESTORE_COMMAND, + '-z', domain, + '-a', '-n', label, + '-t', 'PKEY', + '-V', pkey, + '-e', "%ss" % ttl]) + ret = sp.run([GNUNET_NAMESTORE_COMMAND, + '-z', domain, + '-a', '-n', label, + '-t', 'PKEY', + '-V', pkey, + '-e', "%ss" % ttl], + stdout=sp.DEVNULL, + stderr=sp.DEVNULL) + logging.info("executed command: %s", debug) + if ret.returncode != 0: + # FIXME: extend gnunet-namestore to return *specific* error code for + # "record already exists", and in that case reduce log level to DEBUG here. + logging.info("failed to add PKEY record %s to %s", + label, domain) + #logging.warning("PKEY record %s already exists in %s", label, domain) + + def create_zone_hierarchy(self) -> None: + """ + Creates the zone hierarchy in GNS for label + """ + # Extend Dictionary using GNS identities that already exist, + # checking for conflicts with information in DNS + ids = sp.run([GNUNET_ZONE_CREATION_COMMAND, '-d'], stdout=sp.PIPE) + domainlist = ''.join(col for col in ids.stdout.decode()).split('\n') + # Filter for domains relevant for us, i.e. that end in self.domain + altdomainlist = [e for e in domainlist if self.domain + " " in e] + for zone in altdomainlist: + zonename, _, pkey = zone.split(" ") + self.subzonedict[zonename] = (pkey, self.minimum) + + # Create missing zones (and add to dict) for GNS zones that are NOT DNS zones + # ("." is not a zone-cut in DNS, but always in GNS). + for name in self.zone.nodes.keys(): + subzones = str(name).split('.') + for i in range(1, len(subzones)): + subdomain = ".".join(subzones[i:]) + zonename = "%s.%s" % (subdomain, self.domain) + ttl = self.minimum # new record, cannot use existing one, might want to use larger value + if self.subzonedict.get(zonename) is None: + pkey = self.create_zone_and_get_pkey(zonename) + self.subzonedict[zonename] = (pkey, ttl) + + # Check if a delegated zone is available in GNS as per NS record + # Adds NS records that contain "gns--pkey--" to dictionary + nsrecords = self.zone.iterate_rdatasets(dns.rdatatype.NS) + for nsrecord in nsrecords: + name = str(nsrecord[0]) + values = nsrecord[1] + ttl = values.ttl + + gnspkeys = list(filter(lambda record: + str(record).startswith('gns--pkey--'), + values)) + num_gnspkeys = len(gnspkeys) + if not num_gnspkeys: + # skip empty values + continue + if num_gnspkeys > 1: + logging.critical("Detected ambiguous PKEY records for label \ + %s (not generating PKEY record)", name) + continue + gnspkey = str(gnspkeys[0]) + + # FIXME: test strlen(gnspkey) "right length", theoretically: + # Crockford base32 decoder... -> base32-crockford looks promising + zone = "%s.%s" % (name, self.domain) + if not self.subzonedict.get(zone): + self.subzonedict[zone] = (gnspkey[11:], ttl) + else: + # This should be impossible!!? + pkey_ttl = self.subzonedict[zone] + pkey2, ttl = pkey_ttl + if pkey2 != pkey: + logging.critical("PKEY in DNS does not match PKEY in GNS for name %s", name) + continue + + # Generate PKEY records for all entries in subzonedict + for zone, pkeyttltuple in self.subzonedict.items(): + pkey, ttl = pkeyttltuple + domain = ".".join(zone.split('.')[1::]) + # This happens if root is reached + if domain == '': + logging.info("Reached domain root") + continue + label = zone.split('.')[0] + logging.info("adding zone %s with %s pkey into %s", zone, pkey, domain) + self.add_pkey_record_to_zone(pkey, domain, label, ttl) + +def main(): + """ + Initializes object and handles arguments + """ + # argument parsing from docstring definition + args = docopt.docopt(__doc__, version='Ascension 0.11.4') + + # argument parsing + debug = args['--debug'] + domain = args.get('<domain>', None) + transferns = args['<transferns>'] if args['<transferns>'] else None + port = args['<port>'] if args['<port>'] else "53" + flags = "p" if args.get('--public') else "n" + standalone = bool(args.get('--standalone')) + dryrun = bool(args.get('--dry-run')) + minimum = args['--minimum-ttl'] + + # Change logging severity to debug + if debug: + logging.basicConfig(level=logging.DEBUG) + + # Initialize class instance + ascender = Ascender(domain, transferns, port, flags, minimum) + + # Do dry run before GNUnet check + if dryrun: + dns_zone_serial = ascender.get_dns_zone_serial(ascender.domain, + ascender.transferns) + if dns_zone_serial is None: + return 1 + else: + return 0 + + # Checks if GNUnet services are running + try: + sp.check_output([GNUNET_ARM_COMMAND, '-I'], timeout=1) + except sp.TimeoutExpired: + logging.critical('GNUnet services are not running!') + sys.exit(1) + + # Set to defaults to use before we get a SOA for the first time + retry = 300 + refresh = 300 + + # Main loop for actual daemon + while True: + gns_zone_serial = ascender.get_gns_zone_serial() + if gns_zone_serial: + ascender.zonegenerator = dns.query.xfr(ascender.transferns, + ascender.domain, + rdtype=dns.rdatatype.IXFR, + serial=gns_zone_serial, + port=ascender.port) + else: + ascender.zonegenerator = dns.query.xfr(ascender.transferns, + ascender.domain, + port=ascender.port) + dns_zone_serial = ascender.get_dns_zone_serial(ascender.domain, + ascender.transferns) + + if not dns_zone_serial: + logging.error("Could not get DNS zone serial") + if standalone: + return 1 + time.sleep(retry) + continue + if not gns_zone_serial: + logging.info("GNS zone does not exist yet, performing full transfer.") + print("GNS zone does not exist yet, performing full transfer.") + ascender.bootstrap_zone() + elif gns_zone_serial == dns_zone_serial: + logging.info("GNS zone is up to date.") + print("GNS zone is up to date.") + if standalone: + return 0 + time.sleep(refresh) + continue + elif gns_zone_serial > dns_zone_serial: + logging.critical("SOA serial in GNS is bigger than SOA serial in DNS?") + logging.critical("GNS zone: %s, DNS zone: %s", gns_zone_serial, dns_zone_serial) + if standalone: + return 1 + time.sleep(retry) + continue + else: + logging.info("GNS zone is out of date, performing incremental transfer.") + print("GNS zone is out of date, performing incremental transfer.") + + try: + ascender.zone = dns.zone.from_xfr(ascender.zonegenerator, + check_origin=False) + ascender.soa = ascender.get_zone_soa(ascender.zone) + refresh = int(str(ascender.soa[2]).split(" ")[3]) + retry = int(str(ascender.soa[2]).split(" ")[4]) + except dns.zone.BadZone: + logging.critical("Malformed DNS Zone '%s'", ascender.domain) + if standalone: + return 2 + time.sleep(retry) + continue + + ascender.add_records_to_gns() + logging.info("Finished migration of the zone %s", ascender.domain) + +if __name__ == '__main__': + main() diff --git a/deb_dist/ascension-0.11.4/debian/.debhelper/generated/python3-ascension/installed-by-dh_installdocs b/deb_dist/ascension-0.11.4/debian/.debhelper/generated/python3-ascension/installed-by-dh_installdocs diff --git a/deb_dist/ascension-0.11.4/debian/changelog b/deb_dist/ascension-0.11.4/debian/changelog @@ -0,0 +1,5 @@ +ascension (0.11.4-1) unstable; urgency=low + + * source package automatically created by stdeb 0.8.5 + + -- rexxnor <rexxnor+gnunet@brief.li> Fri, 24 May 2019 07:32:55 +0000 diff --git a/deb_dist/ascension-0.11.4/debian/compat b/deb_dist/ascension-0.11.4/debian/compat @@ -0,0 +1 @@ +7 diff --git a/deb_dist/ascension-0.11.4/debian/control b/deb_dist/ascension-0.11.4/debian/control @@ -0,0 +1,36 @@ +Source: ascension +Maintainer: rexxnor <rexxnor+gnunet@brief.li> +Section: python +Priority: optional +Build-Depends: python3-setuptools, python3-all, debhelper (>= 7.4.3) +Standards-Version: 3.9.1 + + + + + +Package: python3-ascension +Architecture: all +Depends: ${misc:Depends}, ${python3:Depends} +Description: Tool to migrate DNS Zones to the GNU Name System + # Ascension + . + Tool to easily migrate existing DNS Zones into the GNU Name System using + incremental zone transfers (AXFR/IXFR). + . + ## How to install + To install the ascension simply execute one of the following commands in the + freshly cloned directory: + . + ```bash + # System wide installation + sudo python3 setup.py install + . + # Local installation through virtualenv + python3 -m venv .venv + source .venv/bin/activate + python3 setup.py install + ``` + . + ## How to install (Developer) + diff --git a/deb_dist/ascension-0.11.4/debian/files b/deb_dist/ascension-0.11.4/debian/files @@ -0,0 +1,2 @@ +ascension_0.11.4-1_amd64.buildinfo python optional +python3-ascension_0.11.4-1_all.deb python optional diff --git a/deb_dist/ascension-0.11.4/debian/python3-ascension.postinst b/deb_dist/ascension-0.11.4/debian/python3-ascension.postinst @@ -0,0 +1,44 @@ +#!/bin/sh +# postinst script for ascension-bind +# +# see: dh_installdeb(1) +# load debconf library +set -e + +if ! id ascension; then + adduser --system ascension +fi +# ok if this fails as gnunet is not yet a dependency +if ! id gnunet; then + addgroup --system gnunet + adduser ascension gnunet +fi + +mkdir -p /etc/ascension.d/ + +# add systemd unit file + cat > "/etc/ascension.d/gnunet-ascension.service" << EOF +[Unit] +Description=Starting GNUnet peer for ascension +After=network.target + +[Service] +Type=oneshot +RemainAfterExit=yes +User=ascension +ExecStart=/usr/bin/gnunet-arm -s +ExecStop=/usr/bin/gnunet-arm -e +ExecReload=/usr/bin/gnunet-arm -r + +[Install] +WantedBy=multi-user.target +EOF + +# link the systemd unit file +ln -sf "/etc/ascension.d/gnunet-ascension.service" "/lib/systemd/system/gnunet-ascension.service" + +# start and enable service +deb-systemd-invoke enable gnunet-ascension +deb-systemd-invoke start gnunet-ascension + +#DEBHELPER# diff --git a/deb_dist/ascension-0.11.4/debian/python3-ascension.postinst.debhelper b/deb_dist/ascension-0.11.4/debian/python3-ascension.postinst.debhelper @@ -0,0 +1,7 @@ + +# Automatically added by dh_python3: +if which py3compile >/dev/null 2>&1; then + py3compile -p python3-ascension +fi + +# End automatically added section diff --git a/deb_dist/ascension-0.11.4/debian/python3-ascension.prerm b/deb_dist/ascension-0.11.4/debian/python3-ascension.prerm @@ -0,0 +1,19 @@ +#!/bin/sh +# prerm script for ascension-bind +# +# see: dh_installdeb(1) +# load debconf library +set -e + +mkdir -p /etc/ascension.d/ + +# remove systemd stuff +deb-systemd-invoke stop gnunet-ascension +deb-systemd-invoke disable gnunet-ascension + +# remove the systemd files +unlink /lib/systemd/system/gnunet-ascension.service +rm /etc/ascension.d/gnunet-ascension.service + +exit 0 +#DEBHELPER# diff --git a/deb_dist/ascension-0.11.4/debian/python3-ascension.prerm.debhelper b/deb_dist/ascension-0.11.4/debian/python3-ascension.prerm.debhelper @@ -0,0 +1,10 @@ + +# Automatically added by dh_python3: +if which py3clean >/dev/null 2>&1; then + py3clean -p python3-ascension +else + dpkg -L python3-ascension | perl -ne 's,/([^/]*)\.py$,/__pycache__/\1.*, or next; unlink $_ or die $! foreach glob($_)' + find /usr/lib/python3/dist-packages/ -type d -name __pycache__ -empty -print0 | xargs --null --no-run-if-empty rmdir +fi + +# End automatically added section diff --git a/deb_dist/ascension-0.11.4/debian/python3-ascension.substvars b/deb_dist/ascension-0.11.4/debian/python3-ascension.substvars @@ -0,0 +1,3 @@ +python3:Depends=python3-coverage, python3-dnspython, python3-docopt, python3-mock, python3-pbr, python3-six, python3:any, python3:any (>= 3.3.2-2~) +misc:Depends= +misc:Pre-Depends= diff --git a/deb_dist/ascension-0.11.4/debian/python3-ascension/DEBIAN/control b/deb_dist/ascension-0.11.4/debian/python3-ascension/DEBIAN/control @@ -0,0 +1,30 @@ +Package: python3-ascension +Source: ascension +Version: 0.11.4-1 +Architecture: all +Maintainer: rexxnor <rexxnor+gnunet@brief.li> +Installed-Size: 60 +Depends: python3-coverage, python3-dnspython, python3-docopt, python3-mock, python3-pbr, python3-six, python3:any (>= 3.3.2-2~) +Section: python +Priority: optional +Description: Tool to migrate DNS Zones to the GNU Name System + # Ascension + . + Tool to easily migrate existing DNS Zones into the GNU Name System using + incremental zone transfers (AXFR/IXFR). + . + ## How to install + To install the ascension simply execute one of the following commands in the + freshly cloned directory: + . + ```bash + # System wide installation + sudo python3 setup.py install + . + # Local installation through virtualenv + python3 -m venv .venv + source .venv/bin/activate + python3 setup.py install + ``` + . + ## How to install (Developer) diff --git a/deb_dist/ascension-0.11.4/debian/python3-ascension/DEBIAN/md5sums b/deb_dist/ascension-0.11.4/debian/python3-ascension/DEBIAN/md5sums @@ -0,0 +1,10 @@ +4a3c4f90f1d539dade5496be18827b98 usr/bin/ascension +b1efd00ba6c7edbe41310553322d00d4 usr/lib/python3/dist-packages/ascension-0.11.4.egg-info/PKG-INFO +68b329da9893e34099c7d8ad5cb9c940 usr/lib/python3/dist-packages/ascension-0.11.4.egg-info/dependency_links.txt +9cda1022e5fc72a3762b4bc09ee0ddb5 usr/lib/python3/dist-packages/ascension-0.11.4.egg-info/entry_points.txt +d41d8cd98f00b204e9800998ecf8427e usr/lib/python3/dist-packages/ascension-0.11.4.egg-info/requires.txt +e616e4373e7b199db038fd8e938a3188 usr/lib/python3/dist-packages/ascension-0.11.4.egg-info/top_level.txt +d41d8cd98f00b204e9800998ecf8427e usr/lib/python3/dist-packages/ascension/__init__.py +833d17dfed5605c8f51666b901bbbad1 usr/lib/python3/dist-packages/ascension/ascension.py +de060b4ca299c6460ff508aed915526b usr/man/man1/ascension.1 +03c74fcaddfab396bc49e20cda862d89 usr/share/doc/python3-ascension/changelog.Debian.gz diff --git a/deb_dist/ascension-0.11.4/debian/python3-ascension/DEBIAN/postinst b/deb_dist/ascension-0.11.4/debian/python3-ascension/DEBIAN/postinst @@ -0,0 +1,51 @@ +#!/bin/sh +# postinst script for ascension-bind +# +# see: dh_installdeb(1) +# load debconf library +set -e + +if ! id ascension; then + adduser --system ascension +fi +# ok if this fails as gnunet is not yet a dependency +if ! id gnunet; then + addgroup --system gnunet + adduser ascension gnunet +fi + +mkdir -p /etc/ascension.d/ + +# add systemd unit file + cat > "/etc/ascension.d/gnunet-ascension.service" << EOF +[Unit] +Description=Starting GNUnet peer for ascension +After=network.target + +[Service] +Type=oneshot +RemainAfterExit=yes +User=ascension +ExecStart=/usr/bin/gnunet-arm -s +ExecStop=/usr/bin/gnunet-arm -e +ExecReload=/usr/bin/gnunet-arm -r + +[Install] +WantedBy=multi-user.target +EOF + +# link the systemd unit file +ln -sf "/etc/ascension.d/gnunet-ascension.service" "/lib/systemd/system/gnunet-ascension.service" + +# start and enable service +deb-systemd-invoke enable gnunet-ascension +deb-systemd-invoke start gnunet-ascension + + +# Automatically added by dh_python3: +if which py3compile >/dev/null 2>&1; then + py3compile -p python3-ascension +fi + +# End automatically added section + diff --git a/deb_dist/ascension-0.11.4/debian/python3-ascension/DEBIAN/prerm b/deb_dist/ascension-0.11.4/debian/python3-ascension/DEBIAN/prerm @@ -0,0 +1,29 @@ +#!/bin/sh +# prerm script for ascension-bind +# +# see: dh_installdeb(1) +# load debconf library +set -e + +mkdir -p /etc/ascension.d/ + +# remove systemd stuff +deb-systemd-invoke stop gnunet-ascension +deb-systemd-invoke disable gnunet-ascension + +# remove the systemd files +unlink /lib/systemd/system/gnunet-ascension.service +rm /etc/ascension.d/gnunet-ascension.service + +exit 0 + +# Automatically added by dh_python3: +if which py3clean >/dev/null 2>&1; then + py3clean -p python3-ascension +else + dpkg -L python3-ascension | perl -ne 's,/([^/]*)\.py$,/__pycache__/\1.*, or next; unlink $_ or die $! foreach glob($_)' + find /usr/lib/python3/dist-packages/ -type d -name __pycache__ -empty -print0 | xargs --null --no-run-if-empty rmdir +fi + +# End automatically added section + diff --git a/deb_dist/ascension-0.11.4/debian/python3-ascension/usr/bin/ascension b/deb_dist/ascension-0.11.4/debian/python3-ascension/usr/bin/ascension @@ -0,0 +1,12 @@ +#! /usr/bin/python3 +# EASY-INSTALL-ENTRY-SCRIPT: 'ascension==0.11.4','console_scripts','ascension' +__requires__ = 'ascension==0.11.4' +import re +import sys +from pkg_resources import load_entry_point + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit( + load_entry_point('ascension==0.11.4', 'console_scripts', 'ascension')() + ) diff --git a/deb_dist/ascension-0.11.4/debian/python3-ascension/usr/man/man1/ascension.1 b/deb_dist/ascension-0.11.4/debian/python3-ascension/usr/man/man1/ascension.1 @@ -0,0 +1,106 @@ +.\" This file is part of Ascension. +.\" Copyright (C) 2018,2019 GNUnet e.V. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.3 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A +.\" copy of the license is included in the file +.\" ``FDL-1.3''. +.\" +.\" A copy of the license is also available from the Free Software +.\" Foundation Web site at http://www.gnu.org/licenses/fdl.html. +.\" +.\" Alternately, this document is also available under the General +.\" Public License, version 3 or later, as published by the Free Software +.\" Foundation. A copy of the license is included in the file +.\" ``GPL3''. +.\" +.\" A copy of the license is also available from the Free Software +.\" Foundation Web site at http://www.gnu.org/licenses/gpl.html. +.\" +.\" SPDX-License-Identifier: GPL3.0-or-later OR FDL1.3-or-later +.\" +.Dd May 9, 2019 +.Dt ASCENSION 1 +.Os +.Sh NAME +.Nm ascension +.Nd migrate existing DNS zones into the GNU Name System +.Sh SYNOPSIS +.Nm +.Op Ar domain Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run +.Nm +.Op Ar domain port Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run +.Nm +.Op Ar domain Fl n Ar transferns Fl d Fl p Fl s Fl -minimum-ttl=<ttl> -dry-run +.Nm +.Op Ar domain Fl n Ar transferns Ar port Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run +.Sh DESCRIPTION +.Nm +is a tool to migrate existing DNS Zones into the GNU Name System (GNS) using incremental zone transfers (AXFR/IXFR). +To achieve this it uses +.Xr gnunet-identity 1 , +.Xr gnunet-namestore 1 , +.Xr gnunet-gns 1 . +As +.Nm +relies on these 3 GNUnet services, +.Xr gnunet-arm 1 +must be installed and running. +.Bl -tag -width Ds +.It Ar domain Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run +Migrate the DOMAIN passed as domain. +The debug, public and standalone options are optional. +.It Ar domain port Fl d Fl p Fl s -minimum-ttl=<ttl -dry-run> +Migrate the DOMAIN domain, using port for zone transfer. +The debug, public and standalone options are optional. +.It Ar domain Fl n Ar transferns Fl d Fl p Fl s -minimum-ttl=<ttl -dry-run> +Migrate the DOMAIN domain from the DNS server transferns. +The debug, public and standalone options are optional. +.It Ar domain Fl n Ar transferns Ar port Fl d Fl p Fl s -minimum-ttl=<ttl -dry-run> +Migrate the DOMAIN domain from the DNS server transferns using port for the zone transfer. +The debug, public and standalone options are optional. +.It Fl s | \-standalone +Run Ascension once +.It Fl d | \-debug +Enable debugging +.It Fl h | \-help +Print short help on options +.It Fl p | \-public +Make records public on the DHT +.It Fl v | \-version +Print ascension version number +.El +.\" .Sh FILES +.Sh EXAMPLES +To transfer the sy TLD from ns1.tld.sy: +.Pp +.Dl $ ascension sy -n ns1.tld.sy. +.Pp +To transfer the nu TLD from zonedata.iis.se with debug options enabled: +.Pp +.Dl $ ascension nu -n zonedata.iis.se. -d +.Sh SEE ALSO +.Xr gnunet-arm 1 , +.Xr gnunet-gns 1 , +.Xr gnunet-identity 1 , +.Xr gnunet-namestore 1 +.Sh HISTORY +The +.Nm +tool was designed and written in 2018 by +.An rexxnor Aq Mt rexxnor+gnunet@brief.li . +.Sh AUTHORS +This man page was written by +.An ng0 Aq Mt ng0@gnunet.org +and updated by +.An rexxnor Aq Mt rexxnor+gnunet@brief.li +it first appeared in +.Nm +0.5.1. +.Sh BUGS +Report bugs by using +.Lk https://bugs.gnunet.org +or by sending electronic mail to +.Aq Mt bug-gnunet@gnu.org . diff --git a/deb_dist/ascension-0.11.4/debian/python3-ascension/usr/share/doc/python3-ascension/changelog.Debian.gz b/deb_dist/ascension-0.11.4/debian/python3-ascension/usr/share/doc/python3-ascension/changelog.Debian.gz Binary files differ. diff --git a/deb_dist/ascension-0.11.4/debian/rules b/deb_dist/ascension-0.11.4/debian/rules @@ -0,0 +1,31 @@ +#!/usr/bin/make -f + +# This file was automatically generated by stdeb 0.8.5 at +# Fri, 24 May 2019 07:32:55 +0000 + +%: + dh $@ --with python3 --buildsystem=python_distutils + + +override_dh_auto_clean: + python3 setup.py clean -a + find . -name \*.pyc -exec rm {} \; + + + +override_dh_auto_build: + python3 setup.py build --force + + + +override_dh_auto_install: + python3 setup.py install --force --root=debian/python3-ascension --no-compile -O0 --install-layout=deb --prefix=/usr + + + +override_dh_python2: + dh_python2 --no-guessing-versions + + + + diff --git a/deb_dist/ascension-0.11.4/debian/source/format b/deb_dist/ascension-0.11.4/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/deb_dist/ascension-0.11.4/debian/source/options b/deb_dist/ascension-0.11.4/debian/source/options @@ -0,0 +1 @@ +extend-diff-ignore="\.egg-info$" +\ No newline at end of file diff --git a/deb_dist/ascension-0.11.4/setup.cfg b/deb_dist/ascension-0.11.4/setup.cfg @@ -0,0 +1,4 @@ +[egg_info] +tag_build = +tag_date = 0 + diff --git a/deb_dist/ascension-0.11.4/setup.py b/deb_dist/ascension-0.11.4/setup.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python3 +""" +This file is part of Ascension. +Copyright (C) 2019 GNUnet e.V. + +Ascension is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as published +by the Free Software Foundation, either version 3 of the License, +or (at your option) any later version. + +Ascension is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +SPDX-License-Identifier: AGPL3.0-or-later + +Author rexxnor +""" + +import setuptools + +with open("README", "r") as fh: + long_description = fh.read() + +setuptools.setup( + name="ascension", + version="0.11.4", + author="rexxnor", + author_email="rexxnor+gnunet@brief.li", + description="Tool to migrate DNS Zones to the GNU Name System", + long_description=long_description, + url="https://gnunet.org/git/ascension.git/", + packages=['ascension'], + data_files=[('man/man1', ['ascension.1'])], + classifiers=[ + "Programming Language :: Python :: 3", + ], + entry_points={ + 'console_scripts': [ + 'ascension=ascension.ascension:main', + ], + }, + install_requires=[ + 'coverage', + 'dnspython', + 'docopt', + 'mock', + 'pbr', + 'six', + ], +) diff --git a/deb_dist/ascension_0.11.4-1.debian.tar.xz b/deb_dist/ascension_0.11.4-1.debian.tar.xz Binary files differ. diff --git a/deb_dist/ascension_0.11.4-1.dsc b/deb_dist/ascension_0.11.4-1.dsc @@ -0,0 +1,19 @@ +Format: 3.0 (quilt) +Source: ascension +Binary: python3-ascension +Architecture: all +Version: 0.11.4-1 +Maintainer: rexxnor <rexxnor+gnunet@brief.li> +Standards-Version: 3.9.1 +Build-Depends: python3-setuptools, python3-all, debhelper (>= 7.4.3) +Package-List: + python3-ascension deb python optional arch=all +Checksums-Sha1: + c5840b838fc7c28356e62d5566b0996fbe496fa3 10528 ascension_0.11.4.orig.tar.gz + 06939160603c6ccf2eadaade4e567645b3b25806 1668 ascension_0.11.4-1.debian.tar.xz +Checksums-Sha256: + 250d78320b208c6d3ae41aeda92998113a66cff9839c2ca7c787c8e65a78c0cc 10528 ascension_0.11.4.orig.tar.gz + f0b8b3a4b1b11326c1d4391262131dc9d78efea71c98041c20b6a5c1eeeb7663 1668 ascension_0.11.4-1.debian.tar.xz +Files: + ee6e55480a7a42c78c373351f66616fc 10528 ascension_0.11.4.orig.tar.gz + 759887366ef7d70523234fb8984b35b7 1668 ascension_0.11.4-1.debian.tar.xz diff --git a/deb_dist/ascension_0.11.4-1_amd64.buildinfo b/deb_dist/ascension_0.11.4-1_amd64.buildinfo @@ -0,0 +1,180 @@ +Format: 1.0 +Source: ascension +Binary: python3-ascension +Architecture: all source +Version: 0.11.4-1 +Checksums-Md5: + cb114d97a59cb6b41ab18e7b5558ff21 846 ascension_0.11.4-1.dsc + e6223faa180a637a85e297070edf7aee 11684 python3-ascension_0.11.4-1_all.deb +Checksums-Sha1: + 4db0f2939b02d6e44386ab98a71b7b137d3976ae 846 ascension_0.11.4-1.dsc + c9c05eb2b84289005e5b0c2d486cdc1ec07ac9fa 11684 python3-ascension_0.11.4-1_all.deb +Checksums-Sha256: + c5f5753ec7f03abf43d4981a27f9d922955ae41f5a7c93d1dc42e57fb4b46215 846 ascension_0.11.4-1.dsc + 98bfd4a47066211c1cc14b5a021f65a3540fd65d6e80edc9f4b0a1433bfc3265 11684 python3-ascension_0.11.4-1_all.deb +Build-Origin: Debian +Build-Architecture: amd64 +Build-Date: Fri, 24 May 2019 07:35:32 +0000 +Installed-Build-Depends: + autoconf (= 2.69-10), + automake (= 1:1.15-6), + autopoint (= 0.19.8.1-2), + autotools-dev (= 20161112.1), + base-files (= 9.9+deb9u4), + base-passwd (= 3.5.43), + bash (= 4.4-5), + binutils (= 2.28-5), + bsdmainutils (= 9.0.12+nmu1), + bsdutils (= 1:2.29.2-1+deb9u1), + build-essential (= 12.3), + bzip2 (= 1.0.6-8.1), + coreutils (= 8.26-3), + cpp (= 4:6.3.0-4), + cpp-6 (= 6.3.0-18+deb9u1), + dash (= 0.5.8-2.4), + debconf (= 1.5.61), + debhelper (= 12.1.1~bpo9+1), + debianutils (= 4.8.1.1), + dh-autoreconf (= 17~bpo9+1), + dh-python (= 2.20170125), + dh-strip-nondeterminism (= 0.034-1), + diffutils (= 1:3.5-3), + dpkg (= 1.18.24), + dpkg-dev (= 1.18.25), + dwz (= 0.12-1+b1), + e2fslibs (= 1.43.4-2), + e2fsprogs (= 1.43.4-2), + file (= 1:5.30-1+deb9u2), + findutils (= 4.6.0+git+20161106-2), + g++ (= 4:6.3.0-4), + g++-6 (= 6.3.0-18+deb9u1), + gcc (= 4:6.3.0-4), + gcc-6 (= 6.3.0-18+deb9u1), + gcc-6-base (= 6.3.0-18+deb9u1), + gettext (= 0.19.8.1-2), + gettext-base (= 0.19.8.1-2), + grep (= 2.27-2), + groff-base (= 1.22.3-9), + gzip (= 1.6-5+b1), + hostname (= 3.18+b1), + init-system-helpers (= 1.48), + intltool-debian (= 0.35.0+20060710.4), + libacl1 (= 2.2.52-3+b1), + libarchive-zip-perl (= 1.59-1+deb9u1), + libasan3 (= 6.3.0-18+deb9u1), + libatomic1 (= 6.3.0-18+deb9u1), + libattr1 (= 1:2.4.47-2+b2), + libaudit-common (= 1:2.6.7-2), + libaudit1 (= 1:2.6.7-2), + libblkid1 (= 2.29.2-1+deb9u1), + libbsd0 (= 0.8.3-1), + libbz2-1.0 (= 1.0.6-8.1), + libc-bin (= 2.24-11+deb9u3), + libc-dev-bin (= 2.24-11+deb9u4), + libc6 (= 2.24-11+deb9u4), + libc6-dev (= 2.24-11+deb9u4), + libcap-ng0 (= 0.7.7-3+b1), + libcc1-0 (= 6.3.0-18+deb9u1), + libcilkrts5 (= 6.3.0-18+deb9u1), + libcomerr2 (= 1.43.4-2), + libcroco3 (= 0.6.11-3), + libdb5.3 (= 5.3.28-12+deb9u1), + libdebconfclient0 (= 0.227), + libdpkg-perl (= 1.18.25), + libelf1 (= 0.168-1), + libexpat1 (= 2.2.0-2+deb9u1), + libfdisk1 (= 2.29.2-1+deb9u1), + libffi6 (= 3.2.1-6), + libfile-stripnondeterminism-perl (= 0.034-1), + libgcc-6-dev (= 6.3.0-18+deb9u1), + libgcc1 (= 1:6.3.0-18+deb9u1), + libgcrypt20 (= 1.7.6-2+deb9u3), + libgdbm3 (= 1.8.3-14), + libglib2.0-0 (= 2.50.3-2), + libgmp10 (= 2:6.1.2+dfsg-1), + libgomp1 (= 6.3.0-18+deb9u1), + libgpg-error0 (= 1.35-1~bpo9+1), + libicu57 (= 57.1-6+deb9u2), + libisl15 (= 0.18-1), + libitm1 (= 6.3.0-18+deb9u1), + liblsan0 (= 6.3.0-18+deb9u1), + liblz4-1 (= 0.0~r131-2+b1), + liblzma5 (= 5.2.2-1.2+b1), + libmagic-mgc (= 1:5.30-1+deb9u2), + libmagic1 (= 1:5.30-1+deb9u2), + libmount1 (= 2.29.2-1+deb9u1), + libmpc3 (= 1.0.3-1+b2), + libmpdec2 (= 2.4.2-1), + libmpfr4 (= 3.1.5-1), + libmpx2 (= 6.3.0-18+deb9u1), + libncurses5 (= 6.0+20161126-1+deb9u2), + libncursesw5 (= 6.0+20161126-1+deb9u2), + libpam-modules (= 1.1.8-3.6), + libpam-modules-bin (= 1.1.8-3.6), + libpam-runtime (= 1.1.8-3.6), + libpam0g (= 1.1.8-3.6), + libpcre3 (= 2:8.39-3), + libperl5.24 (= 5.24.1-3+deb9u5), + libpipeline1 (= 1.4.1-2), + libpython3-stdlib (= 3.5.3-1), + libpython3.5-minimal (= 3.5.3-1+deb9u1), + libpython3.5-stdlib (= 3.5.3-1+deb9u1), + libquadmath0 (= 6.3.0-18+deb9u1), + libreadline7 (= 7.0-3), + libselinux1 (= 2.6-3+b3), + libsemanage-common (= 2.6-2), + libsemanage1 (= 2.6-2), + libsepol1 (= 2.6-2), + libsigsegv2 (= 2.10-5), + libsmartcols1 (= 2.29.2-1+deb9u1), + libsqlite3-0 (= 3.27.2-2~bpo9+1), + libss2 (= 1.43.4-2), + libssl1.1 (= 1.1.0f-3+deb9u1), + libstdc++-6-dev (= 6.3.0-18+deb9u1), + libstdc++6 (= 6.3.0-18+deb9u1), + libsystemd0 (= 237-3~bpo9+1), + libtimedate-perl (= 2.3000-2), + libtinfo5 (= 6.0+20161126-1+deb9u2), + libtool (= 2.4.6-2), + libtsan0 (= 6.3.0-18+deb9u1), + libubsan0 (= 6.3.0-18+deb9u1), + libudev1 (= 237-3~bpo9+1), + libunistring0 (= 0.9.6+really0.9.3-0.1), + libustr-1.0-1 (= 1.0.4-6), + libuuid1 (= 2.29.2-1+deb9u1), + libxml2 (= 2.9.4+dfsg1-2.2+deb9u2), + linux-libc-dev (= 4.19.28-2~bpo9+1), + login (= 1:4.4-4.1), + m4 (= 1.4.18-1), + make (= 4.1-9.1), + man-db (= 2.7.6.1-2), + mawk (= 1.3.3-17+b3), + mime-support (= 3.60), + mount (= 2.29.2-1+deb9u1), + multiarch-support (= 2.24-11+deb9u3), + ncurses-base (= 6.0+20161126-1+deb9u2), + ncurses-bin (= 6.0+20161126-1+deb9u2), + passwd (= 1:4.4-4.1), + patch (= 2.7.5-1+b2), + perl (= 5.24.1-3+deb9u5), + perl-base (= 5.24.1-3+deb9u5), + perl-modules-5.24 (= 5.24.1-3+deb9u5), + po-debconf (= 1.0.20), + python3 (= 3.5.3-1), + python3-all (= 3.5.3-1), + python3-minimal (= 3.5.3-1), + python3-pkg-resources (= 33.1.1-1), + python3-setuptools (= 33.1.1-1), + python3.5 (= 3.5.3-1+deb9u1), + python3.5-minimal (= 3.5.3-1+deb9u1), + readline-common (= 7.0-3), + sed (= 4.4-1), + sensible-utils (= 0.0.9+deb9u1), + sysvinit-utils (= 2.88dsf-59.9), + tar (= 1.29b-1.1), + util-linux (= 2.29.2-1+deb9u1), + xz-utils (= 5.2.2-1.2+b1), + zlib1g (= 1:1.2.8.dfsg-5) +Environment: + DEB_BUILD_OPTIONS="parallel=2" + SOURCE_DATE_EPOCH="1558683175" diff --git a/deb_dist/ascension_0.11.4-1_amd64.changes b/deb_dist/ascension_0.11.4-1_amd64.changes @@ -0,0 +1,34 @@ +Format: 1.8 +Date: Fri, 24 May 2019 07:32:55 +0000 +Source: ascension +Binary: python3-ascension +Architecture: source all +Version: 0.11.4-1 +Distribution: unstable +Urgency: low +Maintainer: rexxnor <rexxnor+gnunet@brief.li> +Changed-By: rexxnor <rexxnor+gnunet@brief.li> +Description: + python3-ascension - Tool to migrate DNS Zones to the GNU Name System +Changes: + ascension (0.11.4-1) unstable; urgency=low + . + * source package automatically created by stdeb 0.8.5 +Checksums-Sha1: + 4db0f2939b02d6e44386ab98a71b7b137d3976ae 846 ascension_0.11.4-1.dsc + c5840b838fc7c28356e62d5566b0996fbe496fa3 10528 ascension_0.11.4.orig.tar.gz + 06939160603c6ccf2eadaade4e567645b3b25806 1668 ascension_0.11.4-1.debian.tar.xz + c1ff6c6a79c8df766a1283beb6551155612b42a5 5432 ascension_0.11.4-1_amd64.buildinfo + c9c05eb2b84289005e5b0c2d486cdc1ec07ac9fa 11684 python3-ascension_0.11.4-1_all.deb +Checksums-Sha256: + c5f5753ec7f03abf43d4981a27f9d922955ae41f5a7c93d1dc42e57fb4b46215 846 ascension_0.11.4-1.dsc + 250d78320b208c6d3ae41aeda92998113a66cff9839c2ca7c787c8e65a78c0cc 10528 ascension_0.11.4.orig.tar.gz + f0b8b3a4b1b11326c1d4391262131dc9d78efea71c98041c20b6a5c1eeeb7663 1668 ascension_0.11.4-1.debian.tar.xz + fea1bf1acce1801d81f4e3aca731554356bd9dbc63442fab63ec036dd37b29a4 5432 ascension_0.11.4-1_amd64.buildinfo + 98bfd4a47066211c1cc14b5a021f65a3540fd65d6e80edc9f4b0a1433bfc3265 11684 python3-ascension_0.11.4-1_all.deb +Files: + cb114d97a59cb6b41ab18e7b5558ff21 846 python optional ascension_0.11.4-1.dsc + ee6e55480a7a42c78c373351f66616fc 10528 python optional ascension_0.11.4.orig.tar.gz + 759887366ef7d70523234fb8984b35b7 1668 python optional ascension_0.11.4-1.debian.tar.xz + c5aabf6919bc3f819586eb2c5d0c9202 5432 python optional ascension_0.11.4-1_amd64.buildinfo + e6223faa180a637a85e297070edf7aee 11684 python optional python3-ascension_0.11.4-1_all.deb diff --git a/deb_dist/ascension_0.11.4-1_source.buildinfo b/deb_dist/ascension_0.11.4-1_source.buildinfo @@ -0,0 +1,177 @@ +Format: 1.0 +Source: ascension +Binary: python3-ascension +Architecture: source +Version: 0.11.4-1 +Checksums-Md5: + 158aeffcf835e70fb17f1bcd8017b1bb 846 ascension_0.11.4-1.dsc +Checksums-Sha1: + 9a39b5f45cf7d06d6da2a9c02dc6848f4f28dac6 846 ascension_0.11.4-1.dsc +Checksums-Sha256: + db3791660af97ff2cfbccbd317bcbec58e5a906ab7f3a1dddd40109522900f30 846 ascension_0.11.4-1.dsc +Build-Origin: Debian +Build-Architecture: amd64 +Build-Date: Fri, 24 May 2019 07:32:58 +0000 +Installed-Build-Depends: + autoconf (= 2.69-10), + automake (= 1:1.15-6), + autopoint (= 0.19.8.1-2), + autotools-dev (= 20161112.1), + base-files (= 9.9+deb9u4), + base-passwd (= 3.5.43), + bash (= 4.4-5), + binutils (= 2.28-5), + bsdmainutils (= 9.0.12+nmu1), + bsdutils (= 1:2.29.2-1+deb9u1), + build-essential (= 12.3), + bzip2 (= 1.0.6-8.1), + coreutils (= 8.26-3), + cpp (= 4:6.3.0-4), + cpp-6 (= 6.3.0-18+deb9u1), + dash (= 0.5.8-2.4), + debconf (= 1.5.61), + debhelper (= 12.1.1~bpo9+1), + debianutils (= 4.8.1.1), + dh-autoreconf (= 17~bpo9+1), + dh-python (= 2.20170125), + dh-strip-nondeterminism (= 0.034-1), + diffutils (= 1:3.5-3), + dpkg (= 1.18.24), + dpkg-dev (= 1.18.25), + dwz (= 0.12-1+b1), + e2fslibs (= 1.43.4-2), + e2fsprogs (= 1.43.4-2), + file (= 1:5.30-1+deb9u2), + findutils (= 4.6.0+git+20161106-2), + g++ (= 4:6.3.0-4), + g++-6 (= 6.3.0-18+deb9u1), + gcc (= 4:6.3.0-4), + gcc-6 (= 6.3.0-18+deb9u1), + gcc-6-base (= 6.3.0-18+deb9u1), + gettext (= 0.19.8.1-2), + gettext-base (= 0.19.8.1-2), + grep (= 2.27-2), + groff-base (= 1.22.3-9), + gzip (= 1.6-5+b1), + hostname (= 3.18+b1), + init-system-helpers (= 1.48), + intltool-debian (= 0.35.0+20060710.4), + libacl1 (= 2.2.52-3+b1), + libarchive-zip-perl (= 1.59-1+deb9u1), + libasan3 (= 6.3.0-18+deb9u1), + libatomic1 (= 6.3.0-18+deb9u1), + libattr1 (= 1:2.4.47-2+b2), + libaudit-common (= 1:2.6.7-2), + libaudit1 (= 1:2.6.7-2), + libblkid1 (= 2.29.2-1+deb9u1), + libbsd0 (= 0.8.3-1), + libbz2-1.0 (= 1.0.6-8.1), + libc-bin (= 2.24-11+deb9u3), + libc-dev-bin (= 2.24-11+deb9u4), + libc6 (= 2.24-11+deb9u4), + libc6-dev (= 2.24-11+deb9u4), + libcap-ng0 (= 0.7.7-3+b1), + libcc1-0 (= 6.3.0-18+deb9u1), + libcilkrts5 (= 6.3.0-18+deb9u1), + libcomerr2 (= 1.43.4-2), + libcroco3 (= 0.6.11-3), + libdb5.3 (= 5.3.28-12+deb9u1), + libdebconfclient0 (= 0.227), + libdpkg-perl (= 1.18.25), + libelf1 (= 0.168-1), + libexpat1 (= 2.2.0-2+deb9u1), + libfdisk1 (= 2.29.2-1+deb9u1), + libffi6 (= 3.2.1-6), + libfile-stripnondeterminism-perl (= 0.034-1), + libgcc-6-dev (= 6.3.0-18+deb9u1), + libgcc1 (= 1:6.3.0-18+deb9u1), + libgcrypt20 (= 1.7.6-2+deb9u3), + libgdbm3 (= 1.8.3-14), + libglib2.0-0 (= 2.50.3-2), + libgmp10 (= 2:6.1.2+dfsg-1), + libgomp1 (= 6.3.0-18+deb9u1), + libgpg-error0 (= 1.35-1~bpo9+1), + libicu57 (= 57.1-6+deb9u2), + libisl15 (= 0.18-1), + libitm1 (= 6.3.0-18+deb9u1), + liblsan0 (= 6.3.0-18+deb9u1), + liblz4-1 (= 0.0~r131-2+b1), + liblzma5 (= 5.2.2-1.2+b1), + libmagic-mgc (= 1:5.30-1+deb9u2), + libmagic1 (= 1:5.30-1+deb9u2), + libmount1 (= 2.29.2-1+deb9u1), + libmpc3 (= 1.0.3-1+b2), + libmpdec2 (= 2.4.2-1), + libmpfr4 (= 3.1.5-1), + libmpx2 (= 6.3.0-18+deb9u1), + libncurses5 (= 6.0+20161126-1+deb9u2), + libncursesw5 (= 6.0+20161126-1+deb9u2), + libpam-modules (= 1.1.8-3.6), + libpam-modules-bin (= 1.1.8-3.6), + libpam-runtime (= 1.1.8-3.6), + libpam0g (= 1.1.8-3.6), + libpcre3 (= 2:8.39-3), + libperl5.24 (= 5.24.1-3+deb9u5), + libpipeline1 (= 1.4.1-2), + libpython3-stdlib (= 3.5.3-1), + libpython3.5-minimal (= 3.5.3-1+deb9u1), + libpython3.5-stdlib (= 3.5.3-1+deb9u1), + libquadmath0 (= 6.3.0-18+deb9u1), + libreadline7 (= 7.0-3), + libselinux1 (= 2.6-3+b3), + libsemanage-common (= 2.6-2), + libsemanage1 (= 2.6-2), + libsepol1 (= 2.6-2), + libsigsegv2 (= 2.10-5), + libsmartcols1 (= 2.29.2-1+deb9u1), + libsqlite3-0 (= 3.27.2-2~bpo9+1), + libss2 (= 1.43.4-2), + libssl1.1 (= 1.1.0f-3+deb9u1), + libstdc++-6-dev (= 6.3.0-18+deb9u1), + libstdc++6 (= 6.3.0-18+deb9u1), + libsystemd0 (= 237-3~bpo9+1), + libtimedate-perl (= 2.3000-2), + libtinfo5 (= 6.0+20161126-1+deb9u2), + libtool (= 2.4.6-2), + libtsan0 (= 6.3.0-18+deb9u1), + libubsan0 (= 6.3.0-18+deb9u1), + libudev1 (= 237-3~bpo9+1), + libunistring0 (= 0.9.6+really0.9.3-0.1), + libustr-1.0-1 (= 1.0.4-6), + libuuid1 (= 2.29.2-1+deb9u1), + libxml2 (= 2.9.4+dfsg1-2.2+deb9u2), + linux-libc-dev (= 4.19.28-2~bpo9+1), + login (= 1:4.4-4.1), + m4 (= 1.4.18-1), + make (= 4.1-9.1), + man-db (= 2.7.6.1-2), + mawk (= 1.3.3-17+b3), + mime-support (= 3.60), + mount (= 2.29.2-1+deb9u1), + multiarch-support (= 2.24-11+deb9u3), + ncurses-base (= 6.0+20161126-1+deb9u2), + ncurses-bin (= 6.0+20161126-1+deb9u2), + passwd (= 1:4.4-4.1), + patch (= 2.7.5-1+b2), + perl (= 5.24.1-3+deb9u5), + perl-base (= 5.24.1-3+deb9u5), + perl-modules-5.24 (= 5.24.1-3+deb9u5), + po-debconf (= 1.0.20), + python3 (= 3.5.3-1), + python3-all (= 3.5.3-1), + python3-minimal (= 3.5.3-1), + python3-pkg-resources (= 33.1.1-1), + python3-setuptools (= 33.1.1-1), + python3.5 (= 3.5.3-1+deb9u1), + python3.5-minimal (= 3.5.3-1+deb9u1), + readline-common (= 7.0-3), + sed (= 4.4-1), + sensible-utils (= 0.0.9+deb9u1), + sysvinit-utils (= 2.88dsf-59.9), + tar (= 1.29b-1.1), + util-linux (= 2.29.2-1+deb9u1), + xz-utils (= 5.2.2-1.2+b1), + zlib1g (= 1:1.2.8.dfsg-5) +Environment: + DEB_BUILD_OPTIONS="parallel=2" + SOURCE_DATE_EPOCH="1558683175" diff --git a/deb_dist/ascension_0.11.4-1_source.changes b/deb_dist/ascension_0.11.4-1_source.changes @@ -0,0 +1,31 @@ +Format: 1.8 +Date: Fri, 24 May 2019 07:32:55 +0000 +Source: ascension +Binary: python3-ascension +Architecture: source +Version: 0.11.4-1 +Distribution: unstable +Urgency: low +Maintainer: rexxnor <rexxnor+gnunet@brief.li> +Changed-By: rexxnor <rexxnor+gnunet@brief.li> +Description: + python3-ascension - Tool to migrate DNS Zones to the GNU Name System +Changes: + ascension (0.11.4-1) unstable; urgency=low + . + * source package automatically created by stdeb 0.8.5 +Checksums-Sha1: + 9a39b5f45cf7d06d6da2a9c02dc6848f4f28dac6 846 ascension_0.11.4-1.dsc + c5840b838fc7c28356e62d5566b0996fbe496fa3 10528 ascension_0.11.4.orig.tar.gz + 9281ff854bfe7952ca209fa1b472ca55d0e598d1 1140 ascension_0.11.4-1.debian.tar.xz + d26cc92c39bab47e867bd94d184a7c85868bc3c8 5163 ascension_0.11.4-1_source.buildinfo +Checksums-Sha256: + db3791660af97ff2cfbccbd317bcbec58e5a906ab7f3a1dddd40109522900f30 846 ascension_0.11.4-1.dsc + 250d78320b208c6d3ae41aeda92998113a66cff9839c2ca7c787c8e65a78c0cc 10528 ascension_0.11.4.orig.tar.gz + f10b4449f3482a23665e017bb1b26843b9ecd5b308d29f3021fb6c5c40546e77 1140 ascension_0.11.4-1.debian.tar.xz + 05548436221bb7a658a3f7bd2cc0bb67d77ce01559db6f8d3b2e67b10c3da87e 5163 ascension_0.11.4-1_source.buildinfo +Files: + 158aeffcf835e70fb17f1bcd8017b1bb 846 python optional ascension_0.11.4-1.dsc + ee6e55480a7a42c78c373351f66616fc 10528 python optional ascension_0.11.4.orig.tar.gz + 229f88add4ca34691eac2fbe3f3f9c17 1140 python optional ascension_0.11.4-1.debian.tar.xz + 878a09557bcf7eef1c28aa81ddf8f102 5163 python optional ascension_0.11.4-1_source.buildinfo diff --git a/deb_dist/ascension_0.11.4.orig.tar.gz b/deb_dist/ascension_0.11.4.orig.tar.gz Binary files differ. diff --git a/deb_dist/python3-ascension_0.11.4-1_all.deb b/deb_dist/python3-ascension_0.11.4-1_all.deb Binary files differ. diff --git a/helpers/ascension.1 b/helpers/ascension.1 @@ -1,45 +1,106 @@ -.TH ASCENSION "1" "February 2019" "Ascension 0.5.0" "User Commands" -.SH NAME -Ascension \- continuous migration of DNS zones to GNS -.SH USAGE -.IP -ascension <domain> [\-d] [\-p] [\-s] -.IP -ascension <domain> <port> [\-d] [\-p] [\-s] -.IP -ascension <domain> \fB\-n\fR <transferns> [\-d] [\-p] [\-s] -.IP -ascension <domain> \fB\-n\fR <transferns> <port> [\-d] [\-p] [\-s] -.IP -ascension \fB\-p\fR | \fB\-\-public\fR -.IP -ascension \fB\-s\fR | \fB\-\-standalone\fR -.IP -ascension \fB\-h\fR | \fB\-\-help\fR -.IP -ascension \fB\-v\fR | \fB\-\-version\fR -.SH OPTIONS -.TP -<domain> -Domain to migrate -.TP -<port> -Port for zone transfer -.TP -<transferns> -DNS Server that does the zone transfer -.TP -\fB\-p\fR \fB\-\-public\fR -Make records public on the DHT -.TP -\fB\-s\fR \fB\-\-standalone\fR -Run ascension once -.TP -\fB\-d\fR \fB\-\-debug\fR +.\" This file is part of Ascension. +.\" Copyright (C) 2018,2019 GNUnet e.V. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.3 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A +.\" copy of the license is included in the file +.\" ``FDL-1.3''. +.\" +.\" A copy of the license is also available from the Free Software +.\" Foundation Web site at http://www.gnu.org/licenses/fdl.html. +.\" +.\" Alternately, this document is also available under the General +.\" Public License, version 3 or later, as published by the Free Software +.\" Foundation. A copy of the license is included in the file +.\" ``GPL3''. +.\" +.\" A copy of the license is also available from the Free Software +.\" Foundation Web site at http://www.gnu.org/licenses/gpl.html. +.\" +.\" SPDX-License-Identifier: GPL3.0-or-later OR FDL1.3-or-later +.\" +.Dd May 9, 2019 +.Dt ASCENSION 1 +.Os +.Sh NAME +.Nm ascension +.Nd migrate existing DNS zones into the GNU Name System +.Sh SYNOPSIS +.Nm +.Op Ar domain Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run +.Nm +.Op Ar domain port Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run +.Nm +.Op Ar domain Fl n Ar transferns Fl d Fl p Fl s Fl -minimum-ttl=<ttl> -dry-run +.Nm +.Op Ar domain Fl n Ar transferns Ar port Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run +.Sh DESCRIPTION +.Nm +is a tool to migrate existing DNS Zones into the GNU Name System (GNS) using incremental zone transfers (AXFR/IXFR). +To achieve this it uses +.Xr gnunet-identity 1 , +.Xr gnunet-namestore 1 , +.Xr gnunet-gns 1 . +As +.Nm +relies on these 3 GNUnet services, +.Xr gnunet-arm 1 +must be installed and running. +.Bl -tag -width Ds +.It Ar domain Fl d Fl p Fl s -minimum-ttl=<ttl> -dry-run +Migrate the DOMAIN passed as domain. +The debug, public and standalone options are optional. +.It Ar domain port Fl d Fl p Fl s -minimum-ttl=<ttl -dry-run> +Migrate the DOMAIN domain, using port for zone transfer. +The debug, public and standalone options are optional. +.It Ar domain Fl n Ar transferns Fl d Fl p Fl s -minimum-ttl=<ttl -dry-run> +Migrate the DOMAIN domain from the DNS server transferns. +The debug, public and standalone options are optional. +.It Ar domain Fl n Ar transferns Ar port Fl d Fl p Fl s -minimum-ttl=<ttl -dry-run> +Migrate the DOMAIN domain from the DNS server transferns using port for the zone transfer. +The debug, public and standalone options are optional. +.It Fl s | \-standalone +Run Ascension once +.It Fl d | \-debug Enable debugging -.TP -\fB\-h\fR \fB\-\-help\fR -Show this screen. -.TP -\fB\-v\fR \fB\-\-version\fR -Show version. +.It Fl h | \-help +Print short help on options +.It Fl p | \-public +Make records public on the DHT +.It Fl v | \-version +Print ascension version number +.El +.\" .Sh FILES +.Sh EXAMPLES +To transfer the sy TLD from ns1.tld.sy: +.Pp +.Dl $ ascension sy -n ns1.tld.sy. +.Pp +To transfer the nu TLD from zonedata.iis.se with debug options enabled: +.Pp +.Dl $ ascension nu -n zonedata.iis.se. -d +.Sh SEE ALSO +.Xr gnunet-arm 1 , +.Xr gnunet-gns 1 , +.Xr gnunet-identity 1 , +.Xr gnunet-namestore 1 +.Sh HISTORY +The +.Nm +tool was designed and written in 2018 by +.An rexxnor Aq Mt rexxnor+gnunet@brief.li . +.Sh AUTHORS +This man page was written by +.An ng0 Aq Mt ng0@gnunet.org +and updated by +.An rexxnor Aq Mt rexxnor+gnunet@brief.li +it first appeared in +.Nm +0.5.1. +.Sh BUGS +Report bugs by using +.Lk https://bugs.gnunet.org +or by sending electronic mail to +.Aq Mt bug-gnunet@gnu.org . diff --git a/setup.py b/setup.py @@ -28,7 +28,7 @@ with open("README", "r") as fh: setuptools.setup( name="ascension", - version="0.6.1", + version="0.11.4", author="rexxnor", author_email="rexxnor+gnunet@brief.li", description="Tool to migrate DNS Zones to the GNU Name System",