[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [ascension] branch master updated (7e1e8df -> 5dc85dc)
From: |
gnunet |
Subject: |
[GNUnet-SVN] [ascension] branch master updated (7e1e8df -> 5dc85dc) |
Date: |
Fri, 10 May 2019 15:24:20 +0200 |
This is an automated email from the git hooks/post-receive script.
rexxnor pushed a change to branch master
in repository ascension.
from 7e1e8df added --dry-run option, bumped version, updated docs
new b197dfa fixed a double implemented issue
new 9aa9515 updated config file for ascension-bind
new 8c52d3b fixed exception not catching all
new 3d9b0cb bugfixes, improved config file
new b15fbf7 ascension dry-run fixes, packaging, ascension-bind
new ca0fc06 first working version of ascension-bind
new fda4767 fixed up gitlabci
new 7e45cd4 make linter and lintian happier, fixed logic errors
new 5dc85dc updated gitlabci to include correct postinst and prerm files
The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.gitlab-ci.yml | 6 +-
ascension/ascension.py | 39 +-
deb_dist/ascension-0.5.0/.pc/.quilt_patches | 1 +
deb_dist/ascension-0.5.0/.pc/.quilt_series | 1 +
deb_dist/ascension-0.5.0/.pc/.version | 1 +
.../ascension-0.5.0/.pc/applied-patches | 0
.../.pybuild/pythonX.Y_3.5/.pydistutils.cfg | 11 +
deb_dist/ascension-0.5.0/PKG-INFO | 76 +++
README => deb_dist/ascension-0.5.0/README | 27 +-
.../ascension-0.5.0/ascension.1 | 2 +-
.../ascension-0.5.0/ascension}/__init__.py | 0
.../ascension-0.5.0/ascension}/ascension.py | 582 ++++++++++-----------
.../ascension-0.5.0/debian}/ascension.1 | 0
deb_dist/ascension-0.5.0/debian/changelog | 5 +
.../ascension-0.5.0}/debian/compat | 0
deb_dist/ascension-0.5.0/debian/control | 33 ++
.../ascension-0.5.0/debian}/copyright | 0
.../ascension-0.5.0/debian/debhelper-build-stamp | 1 +
deb_dist/ascension-0.5.0/debian/files | 2 +
.../debian/python3-ascension.manpages | 1 +
.../debian/python3-ascension.postinst | 41 ++
.../debian/python3-ascension.postinst.debhelper | 7 +
.../debian/python3-ascension.prerm.debhelper | 10 +
.../debian/python3-ascension.substvars | 3 +
.../debian/python3-ascension/DEBIAN/control | 31 ++
.../debian/python3-ascension/DEBIAN/md5sums | 12 +
.../debian/python3-ascension/DEBIAN/postinst | 0
.../debian/python3-ascension/DEBIAN/prerm | 12 +
.../debian/python3-ascension/usr/bin/ascension | 12 +
.../python3-ascension/usr/man/man1/ascension.1 | 33 +-
.../doc/python3-ascension/changelog.Debian.gz | Bin 0 -> 161 bytes
.../usr/share/doc/python3-ascension}/copyright | 0
.../usr/share/man/man1/ascension.1.gz | Bin 0 -> 390 bytes
deb_dist/ascension-0.5.0/debian/rules | 8 +
.../ascension-0.5.0}/debian/source/format | 0
deb_dist/ascension-0.5.0/debian/watch | 4 +
deb_dist/ascension-0.5.0/setup.cfg | 4 +
setup.py => deb_dist/ascension-0.5.0/setup.py | 2 +-
deb_dist/ascension-0.6.1/.pc/.quilt_patches | 1 +
deb_dist/ascension-0.6.1/.pc/.quilt_series | 1 +
deb_dist/ascension-0.6.1/.pc/.version | 1 +
.../ascension-0.6.1/.pc/applied-patches | 0
deb_dist/ascension-0.6.1/PKG-INFO | 81 +++
README => deb_dist/ascension-0.6.1/README | 0
.../ascension-0.6.1/ascension.1 | 0
.../ascension-0.6.1/ascension}/__init__.py | 0
.../ascension-0.6.1/ascension}/ascension.py | 39 +-
.../python3-ascension/installed-by-dh_installdocs | 0
deb_dist/ascension-0.6.1/debian/changelog | 5 +
deb_dist/ascension-0.6.1/debian/compat | 1 +
deb_dist/ascension-0.6.1/debian/control | 36 ++
deb_dist/ascension-0.6.1/debian/files | 2 +
.../debian/python3-ascension.postinst | 46 ++
.../debian/python3-ascension.postinst.debhelper | 7 +
.../ascension-0.6.1/debian/python3-ascension.prerm | 22 +
.../debian/python3-ascension.prerm.debhelper | 10 +
.../debian/python3-ascension.substvars | 3 +
.../debian/python3-ascension/DEBIAN/control | 30 ++
.../debian/python3-ascension/DEBIAN/md5sums | 10 +
.../debian/python3-ascension/DEBIAN/postinst | 53 ++
.../debian/python3-ascension/DEBIAN/prerm | 32 ++
.../debian/python3-ascension/usr/bin/ascension | 12 +
.../python3-ascension/usr/man/man1/ascension.1 | 0
.../doc/python3-ascension/changelog.Debian.gz | Bin 0 -> 162 bytes
deb_dist/ascension-0.6.1/debian/rules | 31 ++
.../ascension-0.6.1}/debian/source/format | 0
deb_dist/ascension-0.6.1/debian/source/options | 1 +
deb_dist/ascension-0.6.1/setup.cfg | 4 +
setup.py => deb_dist/ascension-0.6.1/setup.py | 0
deb_dist/python3-ascension_0.5.0-1_all.deb | Bin 0 -> 11380 bytes
deb_dist/python3-ascension_0.6.1-1_all.deb | Bin 0 -> 11738 bytes
.../ascension-bind/installed-by-dh_installdocs | 0
.../debian/ascension-bind.config | 108 ++--
.../debian/ascension-bind.postrm.debhelper | 2 +-
.../debian/ascension-bind.templates | 1 -
.../debian/ascension-bind/DEBIAN/config | 114 ++--
.../debian/ascension-bind/DEBIAN/control | 2 +-
.../debian/ascension-bind/DEBIAN/templates | 1 -
.../debian/debhelper-build-stamp | 1 -
debian/ascension-bind_0.0.1-1.debian.tar.xz | Bin 3684 -> 3916 bytes
debian/ascension-bind_0.0.1-1.dsc | 6 +-
debian/ascension-bind_0.0.1-1_amd64.build | 27 +-
debian/ascension-bind_0.0.1-1_amd64.buildinfo | 67 +--
debian/ascension-bind_0.0.1-1_amd64.changes | 24 +-
debian/ascension-bind_0.0.1-1_amd64.deb | Bin 3592 -> 3846 bytes
helpers/python3-ascension.postinst | 46 ++
helpers/python3-ascension.prerm | 22 +
87 files changed, 1302 insertions(+), 514 deletions(-)
create mode 100644 deb_dist/ascension-0.5.0/.pc/.quilt_patches
create mode 100644 deb_dist/ascension-0.5.0/.pc/.quilt_series
create mode 100644 deb_dist/ascension-0.5.0/.pc/.version
copy ascension/__init__.py => deb_dist/ascension-0.5.0/.pc/applied-patches
(100%)
create mode 100644
deb_dist/ascension-0.5.0/.pybuild/pythonX.Y_3.5/.pydistutils.cfg
create mode 100644 deb_dist/ascension-0.5.0/PKG-INFO
copy README => deb_dist/ascension-0.5.0/README (58%)
copy ascension.1 => deb_dist/ascension-0.5.0/ascension.1 (99%)
copy {ascension => deb_dist/ascension-0.5.0/ascension}/__init__.py (100%)
copy {ascension => deb_dist/ascension-0.5.0/ascension}/ascension.py (55%)
copy {helpers => deb_dist/ascension-0.5.0/debian}/ascension.1 (100%)
create mode 100644 deb_dist/ascension-0.5.0/debian/changelog
copy {debian/ascension-bind-0.0.1 => deb_dist/ascension-0.5.0}/debian/compat
(100%)
create mode 100644 deb_dist/ascension-0.5.0/debian/control
copy {helpers => deb_dist/ascension-0.5.0/debian}/copyright (100%)
create mode 100644 deb_dist/ascension-0.5.0/debian/debhelper-build-stamp
create mode 100644 deb_dist/ascension-0.5.0/debian/files
create mode 100644 deb_dist/ascension-0.5.0/debian/python3-ascension.manpages
create mode 100644 deb_dist/ascension-0.5.0/debian/python3-ascension.postinst
create mode 100644
deb_dist/ascension-0.5.0/debian/python3-ascension.postinst.debhelper
create mode 100644
deb_dist/ascension-0.5.0/debian/python3-ascension.prerm.debhelper
create mode 100644 deb_dist/ascension-0.5.0/debian/python3-ascension.substvars
create mode 100644
deb_dist/ascension-0.5.0/debian/python3-ascension/DEBIAN/control
create mode 100644
deb_dist/ascension-0.5.0/debian/python3-ascension/DEBIAN/md5sums
rename helpers/postinst_ascension.sh =>
deb_dist/ascension-0.5.0/debian/python3-ascension/DEBIAN/postinst (100%)
mode change 100644 => 100755
create mode 100755
deb_dist/ascension-0.5.0/debian/python3-ascension/DEBIAN/prerm
create mode 100755
deb_dist/ascension-0.5.0/debian/python3-ascension/usr/bin/ascension
copy ascension.1 =>
deb_dist/ascension-0.5.0/debian/python3-ascension/usr/man/man1/ascension.1 (73%)
create mode 100644
deb_dist/ascension-0.5.0/debian/python3-ascension/usr/share/doc/python3-ascension/changelog.Debian.gz
copy {helpers =>
deb_dist/ascension-0.5.0/debian/python3-ascension/usr/share/doc/python3-ascension}/copyright
(100%)
create mode 100644
deb_dist/ascension-0.5.0/debian/python3-ascension/usr/share/man/man1/ascension.1.gz
create mode 100755 deb_dist/ascension-0.5.0/debian/rules
copy {debian/ascension-bind-0.0.1 =>
deb_dist/ascension-0.5.0}/debian/source/format (100%)
create mode 100644 deb_dist/ascension-0.5.0/debian/watch
create mode 100644 deb_dist/ascension-0.5.0/setup.cfg
copy setup.py => deb_dist/ascension-0.5.0/setup.py (98%)
create mode 100644 deb_dist/ascension-0.6.1/.pc/.quilt_patches
create mode 100644 deb_dist/ascension-0.6.1/.pc/.quilt_series
create mode 100644 deb_dist/ascension-0.6.1/.pc/.version
copy ascension/__init__.py => deb_dist/ascension-0.6.1/.pc/applied-patches
(100%)
create mode 100644 deb_dist/ascension-0.6.1/PKG-INFO
copy README => deb_dist/ascension-0.6.1/README (100%)
copy ascension.1 => deb_dist/ascension-0.6.1/ascension.1 (100%)
copy {ascension => deb_dist/ascension-0.6.1/ascension}/__init__.py (100%)
copy {ascension => deb_dist/ascension-0.6.1/ascension}/ascension.py (97%)
copy ascension/__init__.py =>
deb_dist/ascension-0.6.1/debian/.debhelper/generated/python3-ascension/installed-by-dh_installdocs
(100%)
create mode 100644 deb_dist/ascension-0.6.1/debian/changelog
create mode 100644 deb_dist/ascension-0.6.1/debian/compat
create mode 100644 deb_dist/ascension-0.6.1/debian/control
create mode 100644 deb_dist/ascension-0.6.1/debian/files
create mode 100644 deb_dist/ascension-0.6.1/debian/python3-ascension.postinst
create mode 100644
deb_dist/ascension-0.6.1/debian/python3-ascension.postinst.debhelper
create mode 100644 deb_dist/ascension-0.6.1/debian/python3-ascension.prerm
create mode 100644
deb_dist/ascension-0.6.1/debian/python3-ascension.prerm.debhelper
create mode 100644 deb_dist/ascension-0.6.1/debian/python3-ascension.substvars
create mode 100644
deb_dist/ascension-0.6.1/debian/python3-ascension/DEBIAN/control
create mode 100644
deb_dist/ascension-0.6.1/debian/python3-ascension/DEBIAN/md5sums
create mode 100755
deb_dist/ascension-0.6.1/debian/python3-ascension/DEBIAN/postinst
create mode 100755
deb_dist/ascension-0.6.1/debian/python3-ascension/DEBIAN/prerm
create mode 100755
deb_dist/ascension-0.6.1/debian/python3-ascension/usr/bin/ascension
copy ascension.1 =>
deb_dist/ascension-0.6.1/debian/python3-ascension/usr/man/man1/ascension.1
(100%)
create mode 100644
deb_dist/ascension-0.6.1/debian/python3-ascension/usr/share/doc/python3-ascension/changelog.Debian.gz
create mode 100755 deb_dist/ascension-0.6.1/debian/rules
copy {debian/ascension-bind-0.0.1 =>
deb_dist/ascension-0.6.1}/debian/source/format (100%)
create mode 100644 deb_dist/ascension-0.6.1/debian/source/options
create mode 100644 deb_dist/ascension-0.6.1/setup.cfg
copy setup.py => deb_dist/ascension-0.6.1/setup.py (100%)
create mode 100644 deb_dist/python3-ascension_0.5.0-1_all.deb
create mode 100644 deb_dist/python3-ascension_0.6.1-1_all.deb
copy ascension/__init__.py =>
debian/ascension-bind-0.0.1/debian/.debhelper/generated/ascension-bind/installed-by-dh_installdocs
(100%)
delete mode 100644 debian/ascension-bind-0.0.1/debian/debhelper-build-stamp
create mode 100644 helpers/python3-ascension.postinst
create mode 100644 helpers/python3-ascension.prerm
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index aa28513..7bc6a9d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,15 +10,15 @@ run-build_deb:
- apt update
- apt install -y python-all python3-stdeb git
- python3 setup.py --command-package=stdeb.command sdist_dsc
- - cd deb_dist/*/
+ - cd deb_dist/ascension-0.6.1/
- cp ../../helpers/ascension.1 debian/ascension.1
- echo "debian/ascension.1" > debian/python3-ascension.manpages
- dh_installman
- - cp ../../helpers/postinst_ascension.sh debian/postinst
+ - cp ../../helpers/python3-ascension.p* debian/
- cp ../../helpers/copyright debian/copyright
- dpkg-buildpackage -rfakeroot -uc -us
- cd ../../
- - apt install -y ./deb_dist/python3-ascension*.deb
+ - apt install -y ./deb_dist/python3-ascension_0.6.1-1_all.deb
- ascension -h
- bash helpers/gnunet-installer-0.11-debian.sh Production
- apt install -y bind9 dnsutils procps
diff --git a/ascension/ascension.py b/ascension/ascension.py
index 790306a..cd85872 100644
--- a/ascension/ascension.py
+++ b/ascension/ascension.py
@@ -136,6 +136,9 @@ class Ascender():
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:
@@ -152,11 +155,7 @@ class Ascender():
logging.critical("Domain '%s' does not allow xfr requests.",
domain)
return None
- except dns.query.TransferError:
- logging.critical("Domain '%s' does not allow xfr requests.",
- domain)
- return None
- except:
+ except Exception:
logging.error("Unexpected error while transfering domain '%s'",
domain)
return None
@@ -292,8 +291,9 @@ class Ascender():
values = nsrecord[1]
ttl = values.ttl
- gnspkeys = list(filter(lambda record:
str(record).startswith('gns--pkey--')
- and illegalchars not in str(record)[11:],
values))
+ gnspkeys = list(filter(lambda record:
+ str(record).startswith('gns--pkey--'),
+ values))
num_gnspkeys = len(gnspkeys)
if not num_gnspkeys:
@@ -308,7 +308,10 @@ class Ascender():
# FIXME: drop all NS records under this name later!
# => new map, if entry present during NS processing, skip!
if not any(illegal in gnspkey for illegal in illegalchars):
- self.add_pkey_record_to_zone(gnspkey[11:], self.domain, name,
ttl)
+ self.add_pkey_record_to_zone(gnspkey[11:],
+ self.domain,
+ name,
+ ttl)
# Unify all records under same label into a record set
customrdataset = dict()
@@ -695,6 +698,18 @@ def main():
if debug:
logging.basicConfig(level=logging.DEBUG)
+ # Initialize class instance
+ ascender = Ascender(domain, transferns, port, flags, minimum)
+
+ # Do dey run before GNUnet check
+ if dryrun:
+ dns_zone_serial = ascender.get_dns_zone_serial(ascender.domain,
+ ascender.transferns)
+ if not dns_zone_serial:
+ return 1
+ else:
+ return 0
+
# Checks if GNUnet services are running
try:
sp.check_output([GNUNET_ARM_COMMAND, '-I'], timeout=1)
@@ -702,9 +717,6 @@ def main():
logging.critical('GNUnet services are not running!')
sys.exit(1)
- # Initialize class instance
- ascender = Ascender(domain, transferns, port, flags, minimum)
-
# Set to defaults to use before we get a SOA for the first time
retry = 300
refresh = 300
@@ -725,11 +737,6 @@ def main():
dns_zone_serial = ascender.get_dns_zone_serial(ascender.domain,
ascender.transferns)
- if dryrun:
- if dns_zone_serial:
- return 0
- return 1
-
if not dns_zone_serial:
logging.error("Could not get DNS zone serial")
if standalone:
diff --git a/deb_dist/ascension-0.5.0/.pc/.quilt_patches
b/deb_dist/ascension-0.5.0/.pc/.quilt_patches
new file mode 100644
index 0000000..6857a8d
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/.pc/.quilt_patches
@@ -0,0 +1 @@
+debian/patches
diff --git a/deb_dist/ascension-0.5.0/.pc/.quilt_series
b/deb_dist/ascension-0.5.0/.pc/.quilt_series
new file mode 100644
index 0000000..c206706
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/.pc/.quilt_series
@@ -0,0 +1 @@
+series
diff --git a/deb_dist/ascension-0.5.0/.pc/.version
b/deb_dist/ascension-0.5.0/.pc/.version
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/.pc/.version
@@ -0,0 +1 @@
+2
diff --git a/ascension/__init__.py
b/deb_dist/ascension-0.5.0/.pc/applied-patches
similarity index 100%
copy from ascension/__init__.py
copy to deb_dist/ascension-0.5.0/.pc/applied-patches
diff --git a/deb_dist/ascension-0.5.0/.pybuild/pythonX.Y_3.5/.pydistutils.cfg
b/deb_dist/ascension-0.5.0/.pybuild/pythonX.Y_3.5/.pydistutils.cfg
new file mode 100644
index 0000000..b198fd8
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/.pybuild/pythonX.Y_3.5/.pydistutils.cfg
@@ -0,0 +1,11 @@
+[clean]
+all=1
+[build]
+build-lib=/mnt/ascension/deb_dist/ascension-0.5.0/.pybuild/pythonX.Y_3.5/build
+[install]
+force=1
+install-layout=deb
+install-scripts=/usr/bin
+install-lib=/usr/lib/python3.5/dist-packages
+[easy_install]
+allow_hosts=None
diff --git a/deb_dist/ascension-0.5.0/PKG-INFO
b/deb_dist/ascension-0.5.0/PKG-INFO
new file mode 100644
index 0000000..a9f80de
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/PKG-INFO
@@ -0,0 +1,76 @@
+Metadata-Version: 1.1
+Name: ascension
+Version: 0.5.0
+Summary: Tool to migrate DNS Zones to the GNU Name System
+Home-page: https://gnunet.org/git/ascension.git/
+Author: rexxnor
+Author-email: address@hidden
+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]
+ ascension <domain> <port> [-d] [-p]
+ ascension <domain> -n <transferns> [-d] [-p]
+ ascension <domain> -n <transferns> <port> [-d] [-p]
+ ascension -p | --public
+ ascension -h | --help
+ ascension -v | --version
+
+ Options:
+ <domain> Domain to migrate
+ <port> Port for zone transfer
+ <transferns> DNS Server that does the zone transfer
+ -p --public Make records public on the DHT
+ -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/README b/deb_dist/ascension-0.5.0/README
similarity index 58%
copy from README
copy to deb_dist/ascension-0.5.0/README
index d201db0..784536f 100644
--- a/README
+++ b/deb_dist/ascension-0.5.0/README
@@ -38,27 +38,22 @@ 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>]
- 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 <domain> [-d] [-p]
+ ascension <domain> <port> [-d] [-p]
+ ascension <domain> -n <transferns> [-d] [-p]
+ ascension <domain> -n <transferns> <port> [-d] [-p]
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.
+ <domain> Domain to migrate
+ <port> Port for zone transfer
+ <transferns> DNS Server that does the zone transfer
+ -p --public Make records public on the DHT
+ -d --debug Enable debugging
+ -h --help Show this screen.
+ -v --version Show version.
```
Example use:
diff --git a/ascension.1 b/deb_dist/ascension-0.5.0/ascension.1
similarity index 99%
copy from ascension.1
copy to deb_dist/ascension-0.5.0/ascension.1
index 93810c6..1cd6f1e 100644
--- a/ascension.1
+++ b/deb_dist/ascension-0.5.0/ascension.1
@@ -21,7 +21,7 @@
.\"
.\" SPDX-License-Identifier: GPL3.0-or-later OR FDL1.3-or-later
.\"
-.Dd May 9, 2019
+.Dd May 1, 2019
.Dt ASCENSION 1
.Os
.Sh NAME
diff --git a/ascension/__init__.py
b/deb_dist/ascension-0.5.0/ascension/__init__.py
similarity index 100%
copy from ascension/__init__.py
copy to deb_dist/ascension-0.5.0/ascension/__init__.py
diff --git a/ascension/ascension.py
b/deb_dist/ascension-0.5.0/ascension/ascension.py
similarity index 55%
copy from ascension/ascension.py
copy to deb_dist/ascension-0.5.0/ascension/ascension.py
index 790306a..180b6ce 100644
--- a/ascension/ascension.py
+++ b/deb_dist/ascension-0.5.0/ascension/ascension.py
@@ -20,12 +20,11 @@
# Author rexxnor
"""
Usage:
- ascension <domain> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run]
+ ascension <domain> [-d] [-p] [-s] [--minimum-ttl=<ttl>]
ascension <domain> <port> [-d] [-p] [-s] [--minimum-ttl=<ttl>]
- 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 <domain> -n <transferns> [-d] [-p] [-s] [--minimum-ttl=<ttl>]
+ ascension <domain> -n <transferns> <port> [-d] [-p] [-s]
[--minimum-ttl=<ttl>]
ascension -p | --public
- ascension -s | --debug
ascension -s | --standalone
ascension -h | --help
ascension -v | --version
@@ -35,7 +34,6 @@ Options:
<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
@@ -62,61 +60,62 @@ 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).
+# TODO find better solution for ignoring DNSSEC record types
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",
+ "A", "AAAA", "NS", "MX", "SRV", "TXT", "CNAME"
]
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
+ @classmethod
+ def __init__(cls, domain, transferns, port, flags, minimum):
+ cls.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:
+ cls.domain = cls.domain[:-1]
+ cls.port = int(port)
+ cls.transferns = transferns
+ cls.soa = None
+ cls.tld = cls.domain.split(".")[::-1][0]
+ cls.zone = None
+ cls.zonegenerator = None
+ cls.nscache = dict()
+ cls.flags = flags
+ cls.minimum = int(minimum)
+ cls.subzonedict = dict()
+
+ @classmethod
+ def initial_zone_transfer(cls, serial=None):
+ """
+ Initialize the zone transfer generator
+ :param serial: The serial to base the transfer on
+ """
+ if serial:
+ cls.zonegenerator = dns.query.xfr(cls.transferns,
+ cls.domain,
+ rdtype=dns.rdatatype.IXFR,
+ serial=serial,
+ port=cls.port)
+ else:
+ cls.zonegenerator = dns.query.xfr(cls.transferns,
+ cls.domain,
+ port=cls.port)
+
+ @classmethod
+ def bootstrap_zone(cls):
"""
Creates the zone in gnunet
"""
try:
ret = sp.run([GNUNET_ZONE_CREATION_COMMAND,
- '-C', self.domain])
+ '-C', cls.domain])
logging.info("executed command: %s", " ".join(ret.args))
except sp.CalledProcessError:
- logging.info("Zone %s already exists!", self.domain)
+ logging.info("Zone %s already exists!", cls.domain)
- def get_dns_zone_serial(self,
- domain: str,
- resolver=None) -> int:
+ @classmethod
+ def get_current_serial(cls, domain, resolver=None):
"""
Gets the current serial for a given zone
:param domain: Domain to query for in DNS
@@ -129,48 +128,72 @@ class Ascender():
# 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)
+ logging.critical("the domain '%s' does not exist", domain)
+ sys.exit(1)
except dns.resolver.NXDOMAIN:
- logging.warning("The domain '%s' is not publicly resolvable.",
- domain)
-
+ logging.critical("the domain '%s' is invalid", domain)
+ sys.exit(1)
+ master_answer = dns.resolver.query(soa_answer[0].mname, 'A')
try:
if resolver:
zone = dns.zone.from_xfr(dns.query.xfr(
- resolver, domain, port=self.port))
+ resolver, domain, port=cls.port))
else:
zone = dns.zone.from_xfr(dns.query.xfr(
master_answer[0].address, domain,
- port=self.port))
+ port=cls.port))
except dns.resolver.NoAnswer:
- logging.critical("Nameserver for '%s' did not answer.", domain)
- return None
+ logging.error("nameserver for '%s' did not answer", domain)
except dns.exception.FormError:
- logging.critical("Domain '%s' does not allow xfr requests.",
- domain)
- return None
+ logging.critical("domain '%s' does not allow xfr requests", domain)
+ sys.exit(1)
except dns.query.TransferError:
- logging.critical("Domain '%s' does not allow xfr requests.",
- domain)
- return None
- except:
- logging.error("Unexpected error while transfering domain '%s'",
- domain)
- return None
-
+ logging.critical("domain '%s' does not allow xfr requests", domain)
+ sys.exit(1)
for soa_record in zone.iterate_rdatas(rdtype=dns.rdatatype.SOA):
- if not self.transferns:
+ if not cls.transferns:
mname = soa_record[2].mname
- if self.domain not in mname:
- self.transferns = str(soa_record[2].mname) + "." + domain
+ if cls.domain not in mname:
+ cls.transferns = str(soa_record[2].mname) + "." + domain
else:
- self.transferns = str(soa_record[2].mname)
- return int(soa_record[2].serial)
+ cls.transferns = str(soa_record[2].mname)
+ return soa_record[2].serial
- def add_records_to_gns(self) -> None:
+ @classmethod
+ def mirror_zone(cls):
+ """
+ Extract necessary information from Generator
+ """
+ currentserial = int(cls.get_current_serial(cls.domain, cls.transferns))
+ zoneserial = int(cls.get_zone_serial())
+ if zoneserial == 0:
+ logging.info("zone does not exist yet")
+ cls.initial_zone_transfer()
+ try:
+ cls.zone = dns.zone.from_xfr(cls.zonegenerator,
+ check_origin=False)
+ except dns.zone.BadZone:
+ logging.critical("Malformed DNS Zone '%s'", cls.domain)
+ cls.soa = cls.get_zone_soa(cls.zone)
+ elif zoneserial < currentserial:
+ logging.info("zone is out of date")
+ cls.initial_zone_transfer(serial=zoneserial)
+ try:
+ cls.zone = dns.zone.from_xfr(cls.zonegenerator)
+ except dns.zone.BadZone:
+ logging.critical("Malformed DNS Zone '%s'", cls.domain)
+ cls.soa = cls.get_zone_soa(cls.zone)
+ elif zoneserial == currentserial:
+ logging.info("zone is up to date")
+ # should be unnecessary but AXFR SOA might not be equal to direct SOA
+ else:
+ # because it runs as a daemon, ignore this case but log it
+ logging.warning("SOA serial is bigger than zone serial?")
+ logging.warning("zone: %s, current: %s", zoneserial, currentserial)
+
+ @classmethod
+ def add_records_to_gns(cls):
"""
Extracts records from zone and adds them to GNS
:raises AttributeError: When getting incomplete data
@@ -196,17 +219,18 @@ class Ascender():
# execute thing to run on item
label, listofrdatasets = labelrecords
subzones = label.split('.')
- domain = self.domain
+ domain = cls.domain
if len(subzones) > 1:
+ ttl = cls.get_zone_refresh_time()
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():
+ if fqdn in cls.subzonedict.keys():
label = "@"
domain = fqdn
- elif subzone in self.subzonedict.keys():
+ elif subzone in cls.subzonedict.keys():
domain = subzone
for rdataset in listofrdatasets:
@@ -216,12 +240,12 @@ class Ascender():
continue
try:
- if rdataset.ttl <= self.minimum:
- ttl = self.minimum
+ if rdataset.ttl <= cls.minimum:
+ ttl = cls.minimum
else:
ttl = rdataset.ttl
except AttributeError:
- ttl = self.minimum
+ ttl = cls.minimum
value = str(record)
@@ -231,7 +255,7 @@ class Ascender():
# modify value to fit gns syntax
rdtype, value, label = \
- self.transform_to_gns_format(record,
+ cls.transform_to_gns_format(record,
rdtype,
domain,
label)
@@ -246,7 +270,7 @@ class Ascender():
recordline.append('%d %s %s %s' %
(int(ttl),
rdtype,
- self.flags,
+ cls.flags,
element))
else:
# build recordline
@@ -258,69 +282,49 @@ class Ascender():
recordline.append('%d %s %s %s' %
(int(ttl),
rdtype,
- self.flags,
+ cls.flags,
value))
# add recordline to gns and filter out empty lines
if len(recordline) > 1:
- self.add_recordline_to_gns(recordline,
+ cls.add_recordline_to_gns(recordline,
domain,
label)
taskqueue.task_done()
- # End of worker
-
-
- # Check if a delegated zone is available in GNS as per NS record
- nsrecords = self.zone.iterate_rdatasets(dns.rdatatype.NS)
-
- # This is broken if your NS is for ns.foo.YOURZONE as you add
- # the PKEY to YOURZONE instead of to the foo.YOURZONE subzone.
- # alice NS IN ns.alice
- # bob NS IN ns.bob
- # carol NS IN ns.alice
- # => carol GNS2DNS GNS address@hidden
- # dave.foo NS IN gns--pkey--$KEY.bob
- # => dave.foo PKEY GNS $KEY
- # foo.bar A IN 1.2.3.4
- # => bar PKEY GNS $NEWKEY + mapping: bar => $NEWKEY
- # => foo[.bar] A GNS 1.2.3.4
- #gnspkey = list(filter(lambda record: for rec in record[2]: if
str(rec).startswith('gns--pkey--'): return true; return false, nsrecords))
- illegalchars = ["I", "L", "O", "U", "i", "l", "o", "u"]
- for nsrecord in nsrecords:
- name = str(nsrecord[0])
- values = nsrecord[1]
- ttl = values.ttl
-
- gnspkeys = list(filter(lambda record:
str(record).startswith('gns--pkey--')
- and illegalchars not in str(record)[11:],
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: drop all NS records under this name later!
- # => new map, if entry present during NS processing, skip!
- if not any(illegal in gnspkey for illegal in illegalchars):
- self.add_pkey_record_to_zone(gnspkey[11:], self.domain, name,
ttl)
-
- # Unify all records under same label into a record set
+ # Check if there is zone has already been migrated
+ nsrecords = cls.zone.iterate_rdatas(dns.rdatatype.NS)
+
+ gnspkey = list(filter(lambda record:
str(record[2]).startswith('gns--pkey--'), nsrecords))
+ if gnspkey:
+ label = str(gnspkey[0][0])
+ ttl = gnspkey[0][1]
+ pkey = str(gnspkey[0][2])
+ # TODO Check this check
+ if not cls.transferns in ['127.0.0.1', '::1', 'localhost']:
+ logging.warning("zone exists in GNS, adding it to local store")
+ cls.add_pkey_record_to_zone(pkey[11:], cls.domain,
+ label, ttl)
+ return
+
+ # Unify all records under same label into datastructure
customrdataset = dict()
- for name, rdset in self.zone.iterate_rdatasets():
+ for remaining in cls.zone.iterate_rdatasets():
# build lookup table for later GNS2DNS records
- name = str(name) # Name could be str or DNS.name.Name
- if customrdataset.get(name) is None:
+ domain = "%s.%s" % (str(remaining[0]), cls.domain)
+ elementlist = []
+ for element in remaining[1]:
+ if dns.rdatatype.to_text(element.rdtype) in ['A', 'AAAA']:
+ elementlist.append(str(element))
+ cls.nscache[str(domain)] = elementlist
+ rdataset = remaining[1]
+ if customrdataset.get(str(remaining[0])) is None:
work = list()
- work.append(rdset)
- customrdataset[name] = work
+ work.append(rdataset)
+ customrdataset[str(remaining[0])] = work
else:
- customrdataset[name].append(rdset)
+ customrdataset[str(remaining[0])].append(rdataset)
for label, value in customrdataset.items():
if value is None:
@@ -329,23 +333,21 @@ class Ascender():
subzones = label.split('.')
label = subzones[0]
subdomain = ".".join(subzones[1:])
- zonename = "%s.%s" % (subdomain, self.domain)
+ zonename = "%s.%s" % (subdomain, cls.domain)
- try:
- if value.ttl <= self.minimum:
- ttl = self.minimum
- else:
- ttl = value.ttl
- except AttributeError:
- ttl = self.minimum
+ refresh = cls.get_zone_refresh_time()
+ if refresh <= cls.minimum:
+ ttl = cls.minimum
+ else:
+ ttl = refresh
if len(subzones) > 1:
- if self.subzonedict.get(zonename):
+ if cls.subzonedict.get(zonename):
continue
else:
- self.subzonedict[zonename] = (False, ttl)
+ cls.subzonedict[zonename] = (False, ttl)
- self.create_zone_hierarchy()
+ cls.create_zone_hierarchy()
# Create one thread
thread = threading.Thread(target=worker)
@@ -367,14 +369,12 @@ class Ascender():
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)
-
+ soa = cls.get_zone_soa(cls.zone)
+ cls.add_soa_record_to_gns(soa)
logging.info("All records have been added!")
@staticmethod
- def add_recordline_to_gns(recordline: list,
- zonename: str,
- label: str) -> None:
+ def add_recordline_to_gns(recordline, zonename, label):
"""
Replaces records in zone or adds them if not
:param recordline: records to replace as list in form
@@ -397,30 +397,8 @@ class Ascender():
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("address@hidden" % (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:
+ @classmethod
+ def transform_to_gns_format(cls, record, rdtype, zonename, label):
"""
Transforms value of record to GNS compatible format
:param record: record to transform
@@ -440,8 +418,8 @@ class Ascender():
if owner[-1] == '.':
owner = owner[:-1]
# hacky and might cause bugs
- authns += self.tld
- owner += self.tld
+ authns += cls.tld
+ owner += cls.tld
value = "rname=%s.%s mname=%s.%s %d,%d,%d,%d,%d" % (
authns, zonename, owner, zonename,
int(serial), int(refresh), int(retry),
@@ -453,33 +431,25 @@ class Ascender():
else:
value = "%s.%s" % (value, zonename)
elif rdtype == 'NS':
- nameserver = str(record.target)
- if nameserver[-1] == ".":
- nameserver = nameserver[:-1]
+ nameserver = str(record)
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 = 'address@hidden' % (zonename, nameserver)
- else:
- value = 'address@hidden' % (str(label),
- zonename,
- nameserver)
+ value = value[:-1]
+ else:
+ value = "%s.%s" % (value, zonename)
+ if zonename[-1] == ".":
+ zonename = zonename[:-1]
+ if nameserver[-1] == ".":
+ dnsresolver = nameserver[:-1]
+ dnsresolver = cls.nscache.get(dnsresolver, dnsresolver)
else:
- # Name is relative to zone, must be in bailiwick
- value = self.resolve_glue(record.target)
- if not value:
- if label.startswith("@"):
- value = 'address@hidden' % (self.domain,
- record.target,
- self.domain)
- else:
- value = 'address@hidden' % (str(label), self.domain,
- record.target, self.domain)
+ dnsresolver = "%s.%s" % (nameserver, zonename)
+ dnsresolver = cls.nscache.get(dnsresolver, dnsresolver)
+ if isinstance(dnsresolver, list):
+ value = []
+ for nsip in dnsresolver:
+ value.append("address@hidden" % (zonename, nsip))
+ else:
+ value = 'address@hidden' % (str(label), zonename, dnsresolver)
logging.info("transformed %s record to GNS2DNS format", rdtype)
rdtype = 'GNS2DNS'
@@ -527,7 +497,8 @@ class Ascender():
logging.info("Did not transform record of type: %s", rdtype)
return (rdtype, value, label)
- def get_gns_zone_serial(self) -> int:
+ @classmethod
+ def get_zone_serial(cls):
"""
Fetches the zones serial from GNS
:returns: serial of the SOA record in GNS
@@ -535,7 +506,7 @@ class Ascender():
try:
serial = sp.check_output([GNUNET_GNS_COMMAND,
'-t', 'SOA',
- '-u', '%s' % self.domain,])
+ '-u', '@.%s' % cls.domain,])
serial = serial.decode()
except sp.CalledProcessError:
serial = ""
@@ -545,10 +516,61 @@ class Ascender():
soa_serial = re.findall(soapattern, serial)[0]
else:
soa_serial = 0
- return int(soa_serial)
+ return soa_serial
+
+ @classmethod
+ def get_zone_soa_expiry(cls):
+ """
+ Extracts the current serial from the class SOA
+ :returns: refresh time of the current SOA record
+ """
+ ttlpattern = re.compile(r'.+\s\d+\s(\d+)\s\d+\s\d+\s\d+', re.M)
+ return re.findall(ttlpattern, str(cls.soa[2]))
+
+ @classmethod
+ def get_zone_refresh_time(cls):
+ """
+ Extracts the current refresh time of the zone from GNS
+ :returns: refresh time of the current SOA record
+ """
+ try:
+ serial = sp.check_output([GNUNET_GNS_COMMAND,
+ '-t', 'SOA',
+ '-u', '@.%s' % cls.domain])
+ serial = serial.decode()
+ except sp.CalledProcessError:
+ serial = ""
+ refresh = 0
+ soapattern = re.compile(r'.+\s\d+,(\d+),\d+,\d+,\d+', re.M)
+ if re.findall(soapattern, serial):
+ refresh = re.findall(soapattern, serial)[0]
+ else:
+ refresh = 0
+ return refresh
+
+ @classmethod
+ def get_zone_retry_time(cls):
+ """
+ Extracts the current retry time of the zone from GNS
+ :returns: retry time of the current SOA record
+ """
+ try:
+ serial = sp.check_output([GNUNET_GNS_COMMAND,
+ '-t', 'SOA',
+ '-u', '@.%s' % cls.domain])
+ serial = serial.decode()
+ except sp.CalledProcessError:
+ serial = ""
+ retry = 300
+ soapattern = re.compile(r'.+\s\d+,\d+,(\d+),\d+,\d+', re.M)
+ if re.findall(soapattern, serial):
+ retry = re.findall(soapattern, serial)[0]
+ else:
+ retry = 300
+ return retry
@staticmethod
- def get_zone_soa(zone) -> dns.rdatatype.SOA:
+ def get_zone_soa(zone):
"""
Fetches soa record from zone a given zone
:param zone: A dnspython zone
@@ -560,7 +582,8 @@ class Ascender():
soa = soarecord
return soa
- def add_soa_record_to_gns(self, record) -> None:
+ @classmethod
+ def add_soa_record_to_gns(cls, record):
"""
Adds a SOA record to GNS
:param record: The record to add
@@ -571,11 +594,11 @@ class Ascender():
if authns[-1] == '.':
authns = authns[:-1]
else:
- authns = "%s.%s" % (authns, self.domain)
+ authns = "%s.%s" % (authns, cls.domain)
if owner[-1] == '.':
owner = owner[:-1]
else:
- owner = "%s.%s" % (owner, self.domain)
+ owner = "%s.%s" % (owner, cls.domain)
value = "rname=%s mname=%s %s,%s,%s,%s,%s" % (authns,
owner,
@@ -584,12 +607,12 @@ class Ascender():
retry,
expiry,
irefresh)
- recordval = '%s %s %s %s' % (ttl, "SOA", self.flags, str(value))
+ recordval = '%s %s %s %s' % (ttl, "SOA", cls.flags, str(value))
recordline = ['-R', recordval]
- self.add_recordline_to_gns(recordline, self.domain, str(label))
+ cls.add_recordline_to_gns(recordline, cls.domain, str(label))
@staticmethod
- def create_zone_and_get_pkey(zonestring: str) -> str:
+ def create_zone_and_get_pkey(zonestring):
"""
Creates the zone in zonestring and returns pkey
:param zonestring: The label name of the zone
@@ -597,27 +620,29 @@ class Ascender():
"""
try:
ret = sp.run([GNUNET_ZONE_CREATION_COMMAND,
- '-C', zonestring,
- '-V'],
- stdout=sp.PIPE,
- stderr=sp.DEVNULL,
- check=True)
+ '-C', zonestring],
+ stdout=sp.DEVNULL,
+ stderr=sp.DEVNULL)
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()
+ logging.info("Zone %s already exists!", zonestring)
+
+ pkey_lookup = sp.Popen([GNUNET_ZONE_CREATION_COMMAND,
+ '-d'],
+ stdout=sp.PIPE)
+ pkey_line = sp.Popen(['grep', '^' + zonestring],
+ stdin=pkey_lookup.stdout,
+ stdout=sp.PIPE)
+ pkey_zone = sp.check_output(['cut', '-d',
+ ' ', '-f3'],
+ stdin=pkey_line.stdout)
+ pkey_zone = pkey_zone.decode().strip()
+ pkey_lookup.stdout.close()
+ pkey_line.stdout.close()
return pkey_zone
@staticmethod
- def add_pkey_record_to_zone(pkey: str,
- domain: str,
- label: str,
- ttl: str) -> None:
+ def add_pkey_record_to_zone(pkey, domain, label, ttl):
"""
Adds the pkey of the subzone to the parent zone
:param pkey: the public key of the child zone
@@ -648,47 +673,40 @@ class Ascender():
label, domain)
#logging.warning("PKEY record %s already exists in %s", label, domain)
- def create_zone_hierarchy(self) -> None:
+ @classmethod
+ def create_zone_hierarchy(cls):
"""
Creates the zone hierarchy in GNS for label
+ :param label: the split record to create zones for
"""
- domain = self.domain
+ domain = cls.domain
- # Build Dictionary from GNS identities
- ids = sp.run([GNUNET_ZONE_CREATION_COMMAND, '-d'], stdout=sp.PIPE)
- domainlist = ''.join(col for col in ids.stdout.decode()).split('\n')
- altdomainlist = [e for e in domainlist if domain + " " in e]
- for zone in altdomainlist:
- zonename, _, pkey = zone.split(" ")
- self.subzonedict[zonename] = (pkey, self.minimum)
-
- zonelist = self.subzonedict.items()
+ zonelist = cls.subzonedict.items()
sortedlist = sorted(zonelist, key=lambda s: len(str(s).split('.')))
for zone, pkeyttltuple in sortedlist:
pkey, ttl = pkeyttltuple
if not pkey:
domain = ".".join(zone.split('.')[1::])
label = zone.split('.')[0]
- pkey = self.create_zone_and_get_pkey(zone)
+ pkey = cls.create_zone_and_get_pkey(zone)
logging.info("adding zone %s with %s pkey into %s", zone,
pkey, domain)
- self.add_pkey_record_to_zone(pkey, domain, label,
pkeyttltuple[1])
- self.subzonedict[zone] = (pkey, ttl)
+ cls.add_pkey_record_to_zone(pkey, domain, label,
pkeyttltuple[1])
+ cls.subzonedict[zone] = (pkey, ttl)
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.5.0')
# 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"
+ 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
@@ -699,80 +717,34 @@ def main():
try:
sp.check_output([GNUNET_ARM_COMMAND, '-I'], timeout=1)
except sp.TimeoutExpired:
- logging.critical('GNUnet services are not running!')
+ logging.critical('GNUnet Services are not running!')
sys.exit(1)
# Initialize class instance
ascender = Ascender(domain, transferns, port, flags, minimum)
- # 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)
+ # Event loop for actual daemon
+ while 1:
+ serial = ascender.get_zone_serial()
+ ascender.initial_zone_transfer(serial)
+ ascender.mirror_zone()
+ ascender.bootstrap_zone()
+ if ascender.zone is not None:
+ ascender.add_records_to_gns()
+ logging.info("Finished migration of the zone %s", ascender.domain)
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 dryrun:
- if dns_zone_serial:
- return 0
- return 1
-
- 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
+ logging.info("Zone %s already up to date", ascender.domain)
+ refresh = int(ascender.get_zone_refresh_time())
+ retry = int(ascender.get_zone_retry_time())
+ if standalone:
+ return 0
+ if refresh == 0:
+ logging.info("unable to refresh zone, retrying in %ds", retry)
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)
+ logging.info("refreshing zone in %ds", refresh)
+ print("refreshing zone in %ds" % refresh)
+ time.sleep(refresh)
if __name__ == '__main__':
main()
diff --git a/helpers/ascension.1 b/deb_dist/ascension-0.5.0/debian/ascension.1
similarity index 100%
copy from helpers/ascension.1
copy to deb_dist/ascension-0.5.0/debian/ascension.1
diff --git a/deb_dist/ascension-0.5.0/debian/changelog
b/deb_dist/ascension-0.5.0/debian/changelog
new file mode 100644
index 0000000..9c857b3
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/debian/changelog
@@ -0,0 +1,5 @@
+ascension (0.5.0-1) unstable; urgency=low
+
+ * source package automatically created by stdeb 0.8.5
+
+ -- rexxnor <address@hidden> Tue, 30 Apr 2019 19:01:03 +0000
diff --git a/debian/ascension-bind-0.0.1/debian/compat
b/deb_dist/ascension-0.5.0/debian/compat
similarity index 100%
copy from debian/ascension-bind-0.0.1/debian/compat
copy to deb_dist/ascension-0.5.0/debian/compat
diff --git a/deb_dist/ascension-0.5.0/debian/control
b/deb_dist/ascension-0.5.0/debian/control
new file mode 100644
index 0000000..d42e205
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/debian/control
@@ -0,0 +1,33 @@
+Source: ascension
+Maintainer: rexxnor <address@hidden>
+Section: python
+Priority: optional
+Build-Depends: dh-python, python3-setuptools, python3-all, debhelper (>= 9)
+Standards-Version: 3.9.6
+Homepage: https://gnunet.org/git/ascension.git/
+
+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/helpers/copyright b/deb_dist/ascension-0.5.0/debian/copyright
similarity index 100%
copy from helpers/copyright
copy to deb_dist/ascension-0.5.0/debian/copyright
diff --git a/deb_dist/ascension-0.5.0/debian/debhelper-build-stamp
b/deb_dist/ascension-0.5.0/debian/debhelper-build-stamp
new file mode 100644
index 0000000..7c43134
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/debian/debhelper-build-stamp
@@ -0,0 +1 @@
+python3-ascension
diff --git a/deb_dist/ascension-0.5.0/debian/files
b/deb_dist/ascension-0.5.0/debian/files
new file mode 100644
index 0000000..0e62119
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/debian/files
@@ -0,0 +1,2 @@
+ascension_0.5.0-1_amd64.buildinfo python optional
+python3-ascension_0.5.0-1_all.deb python optional
diff --git a/deb_dist/ascension-0.5.0/debian/python3-ascension.manpages
b/deb_dist/ascension-0.5.0/debian/python3-ascension.manpages
new file mode 100644
index 0000000..d424cf6
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/debian/python3-ascension.manpages
@@ -0,0 +1 @@
+debian/ascension.1
diff --git a/deb_dist/ascension-0.5.0/debian/python3-ascension.postinst
b/deb_dist/ascension-0.5.0/debian/python3-ascension.postinst
new file mode 100644
index 0000000..3bfb0d2
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/debian/python3-ascension.postinst
@@ -0,0 +1,41 @@
+#!/bin/sh
+# postinst script for ascension-bind
+#
+# see: dh_installdeb(1)
+# load debconf library
+set -e
+
+adduser --system ascension
+# ok if this fails as gnunet is not yet a dependency
+addgroup --system gnunet
+adduser ascension gnunet || true
+
+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
+systemctl start gnunet-ascension
+systemctl enable gnunet-ascension
+
+exit 0
+#DEBHELPER#
diff --git
a/deb_dist/ascension-0.5.0/debian/python3-ascension.postinst.debhelper
b/deb_dist/ascension-0.5.0/debian/python3-ascension.postinst.debhelper
new file mode 100644
index 0000000..c132d8d
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/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.5.0/debian/python3-ascension.prerm.debhelper
b/deb_dist/ascension-0.5.0/debian/python3-ascension.prerm.debhelper
new file mode 100644
index 0000000..98de74e
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/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.5.0/debian/python3-ascension.substvars
b/deb_dist/ascension-0.5.0/debian/python3-ascension.substvars
new file mode 100644
index 0000000..039c7ae
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/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.5.0/debian/python3-ascension/DEBIAN/control
b/deb_dist/ascension-0.5.0/debian/python3-ascension/DEBIAN/control
new file mode 100644
index 0000000..49b21fa
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/debian/python3-ascension/DEBIAN/control
@@ -0,0 +1,31 @@
+Package: python3-ascension
+Source: ascension
+Version: 0.5.0-1
+Architecture: all
+Maintainer: rexxnor <address@hidden>
+Installed-Size: 61
+Depends: python3-coverage, python3-dnspython, python3-docopt, python3-mock,
python3-pbr, python3-six, python3:any (>= 3.3.2-2~)
+Section: python
+Priority: optional
+Homepage: https://gnunet.org/git/ascension.git/
+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.5.0/debian/python3-ascension/DEBIAN/md5sums
b/deb_dist/ascension-0.5.0/debian/python3-ascension/DEBIAN/md5sums
new file mode 100644
index 0000000..5aa6670
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/debian/python3-ascension/DEBIAN/md5sums
@@ -0,0 +1,12 @@
+a0f759101bdbf91192e01e4aa7fc735a usr/bin/ascension
+bc657ea500b7eb1aaaed030b6825fa0f
usr/lib/python3/dist-packages/ascension-0.5.0.egg-info/PKG-INFO
+68b329da9893e34099c7d8ad5cb9c940
usr/lib/python3/dist-packages/ascension-0.5.0.egg-info/dependency_links.txt
+9cda1022e5fc72a3762b4bc09ee0ddb5
usr/lib/python3/dist-packages/ascension-0.5.0.egg-info/entry_points.txt
+d41d8cd98f00b204e9800998ecf8427e
usr/lib/python3/dist-packages/ascension-0.5.0.egg-info/requires.txt
+e616e4373e7b199db038fd8e938a3188
usr/lib/python3/dist-packages/ascension-0.5.0.egg-info/top_level.txt
+d41d8cd98f00b204e9800998ecf8427e
usr/lib/python3/dist-packages/ascension/__init__.py
+b8e868d3010eb44c1dd5d13fb4a17013
usr/lib/python3/dist-packages/ascension/ascension.py
+46ed4cd14add4c87e480fd2f30f72fbd usr/man/man1/ascension.1
+7190029e7e99c1b73c2018382db26093
usr/share/doc/python3-ascension/changelog.Debian.gz
+42cbfd228642e598041a4f8583b17259 usr/share/doc/python3-ascension/copyright
+5139d8621867d59e7b2ce8dcb06d974d usr/share/man/man1/ascension.1.gz
diff --git a/helpers/postinst_ascension.sh
b/deb_dist/ascension-0.5.0/debian/python3-ascension/DEBIAN/postinst
old mode 100644
new mode 100755
similarity index 100%
rename from helpers/postinst_ascension.sh
rename to deb_dist/ascension-0.5.0/debian/python3-ascension/DEBIAN/postinst
diff --git a/deb_dist/ascension-0.5.0/debian/python3-ascension/DEBIAN/prerm
b/deb_dist/ascension-0.5.0/debian/python3-ascension/DEBIAN/prerm
new file mode 100755
index 0000000..0f8785b
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/debian/python3-ascension/DEBIAN/prerm
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+# 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.5.0/debian/python3-ascension/usr/bin/ascension
b/deb_dist/ascension-0.5.0/debian/python3-ascension/usr/bin/ascension
new file mode 100755
index 0000000..69f2586
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/debian/python3-ascension/usr/bin/ascension
@@ -0,0 +1,12 @@
+#!/usr/bin/python3
+# EASY-INSTALL-ENTRY-SCRIPT: 'ascension==0.5.0','console_scripts','ascension'
+__requires__ = 'ascension==0.5.0'
+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.5.0', 'console_scripts', 'ascension')()
+ )
diff --git a/ascension.1
b/deb_dist/ascension-0.5.0/debian/python3-ascension/usr/man/man1/ascension.1
similarity index 73%
copy from ascension.1
copy to
deb_dist/ascension-0.5.0/debian/python3-ascension/usr/man/man1/ascension.1
index 93810c6..c3b7f73 100644
--- a/ascension.1
+++ b/deb_dist/ascension-0.5.0/debian/python3-ascension/usr/man/man1/ascension.1
@@ -21,7 +21,7 @@
.\"
.\" SPDX-License-Identifier: GPL3.0-or-later OR FDL1.3-or-later
.\"
-.Dd May 9, 2019
+.Dd March 7, 2019
.Dt ASCENSION 1
.Os
.Sh NAME
@@ -29,15 +29,14 @@
.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 Ar domain Fl d Fl p
+.Op Ar domain port Fl d Fl p
+.Op Ar domain Fl n Ar transferns Fl d Fl p
+.Op Ar domain Fl n Ar transferns Ar port Fl d Fl p
.Op Fl d | \-debug
.Op Fl h | \-help
.Op Fl p | \-public
.Op Fl v | \-version
-.Op Fl s | \-standalone
.Sh DESCRIPTION
.Nm
is a tool to migrate existing DNS Zones into the GNU Name System (GNS) using
incremental zone transfers (AXFR/IXFR).
@@ -51,20 +50,18 @@ 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
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>
+The debug and public options are optional.
+.It Ar domain port Fl d Fl p
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>
+The debug and public options are optional.
+.It Ar domain Fl n Ar transferns Fl d Fl p
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>
+The debug and public options are optional.
+.It Ar domain Fl n Ar transferns Ar port Fl d Fl p
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
+The debug and public options are optional.
.It Fl d | \-debug
Enable debugging
.It Fl h | \-help
@@ -95,9 +92,7 @@ tool was designed and written in 2018 by
.An rexxnor Aq Mt address@hidden .
.Sh AUTHORS
This man page was written by
-.An ng0 Aq Mt address@hidden
-and updated by
-.An rexxnor Aq Mt address@hidden
+.An ng0 Aq Mt address@hidden ,
it first appeared in
.Nm
0.5.1.
diff --git
a/deb_dist/ascension-0.5.0/debian/python3-ascension/usr/share/doc/python3-ascension/changelog.Debian.gz
b/deb_dist/ascension-0.5.0/debian/python3-ascension/usr/share/doc/python3-ascension/changelog.Debian.gz
new file mode 100644
index 0000000..721261b
Binary files /dev/null and
b/deb_dist/ascension-0.5.0/debian/python3-ascension/usr/share/doc/python3-ascension/changelog.Debian.gz
differ
diff --git a/helpers/copyright
b/deb_dist/ascension-0.5.0/debian/python3-ascension/usr/share/doc/python3-ascension/copyright
similarity index 100%
copy from helpers/copyright
copy to
deb_dist/ascension-0.5.0/debian/python3-ascension/usr/share/doc/python3-ascension/copyright
diff --git
a/deb_dist/ascension-0.5.0/debian/python3-ascension/usr/share/man/man1/ascension.1.gz
b/deb_dist/ascension-0.5.0/debian/python3-ascension/usr/share/man/man1/ascension.1.gz
new file mode 100644
index 0000000..fdd5a0b
Binary files /dev/null and
b/deb_dist/ascension-0.5.0/debian/python3-ascension/usr/share/man/man1/ascension.1.gz
differ
diff --git a/deb_dist/ascension-0.5.0/debian/rules
b/deb_dist/ascension-0.5.0/debian/rules
new file mode 100755
index 0000000..403000d
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/debian/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+
+# This file was automatically generated by stdeb 0.8.5 at
+# Tue, 30 Apr 2019 19:01:03 +0000
+export PYBUILD_NAME=ascension
+%:
+ dh $@ --with python3 --buildsystem=pybuild
+
diff --git a/debian/ascension-bind-0.0.1/debian/source/format
b/deb_dist/ascension-0.5.0/debian/source/format
similarity index 100%
copy from debian/ascension-bind-0.0.1/debian/source/format
copy to deb_dist/ascension-0.5.0/debian/source/format
diff --git a/deb_dist/ascension-0.5.0/debian/watch
b/deb_dist/ascension-0.5.0/debian/watch
new file mode 100644
index 0000000..f9c8e3b
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/debian/watch
@@ -0,0 +1,4 @@
+# please also check http://pypi.debian.net/ascension/watch
+version=3
+opts=uversionmangle=s/(rc|a|b|c)/~$1/ \
+http://pypi.debian.net/ascension/ascension-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
\ No newline at end of file
diff --git a/deb_dist/ascension-0.5.0/setup.cfg
b/deb_dist/ascension-0.5.0/setup.cfg
new file mode 100644
index 0000000..8bfd5a1
--- /dev/null
+++ b/deb_dist/ascension-0.5.0/setup.cfg
@@ -0,0 +1,4 @@
+[egg_info]
+tag_build =
+tag_date = 0
+
diff --git a/setup.py b/deb_dist/ascension-0.5.0/setup.py
similarity index 98%
copy from setup.py
copy to deb_dist/ascension-0.5.0/setup.py
index 7afc1b9..cd0b403 100644
--- a/setup.py
+++ b/deb_dist/ascension-0.5.0/setup.py
@@ -28,7 +28,7 @@ with open("README", "r") as fh:
setuptools.setup(
name="ascension",
- version="0.6.1",
+ version="0.5.0",
author="rexxnor",
author_email="address@hidden",
description="Tool to migrate DNS Zones to the GNU Name System",
diff --git a/deb_dist/ascension-0.6.1/.pc/.quilt_patches
b/deb_dist/ascension-0.6.1/.pc/.quilt_patches
new file mode 100644
index 0000000..6857a8d
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/.pc/.quilt_patches
@@ -0,0 +1 @@
+debian/patches
diff --git a/deb_dist/ascension-0.6.1/.pc/.quilt_series
b/deb_dist/ascension-0.6.1/.pc/.quilt_series
new file mode 100644
index 0000000..c206706
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/.pc/.quilt_series
@@ -0,0 +1 @@
+series
diff --git a/deb_dist/ascension-0.6.1/.pc/.version
b/deb_dist/ascension-0.6.1/.pc/.version
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/.pc/.version
@@ -0,0 +1 @@
+2
diff --git a/ascension/__init__.py
b/deb_dist/ascension-0.6.1/.pc/applied-patches
similarity index 100%
copy from ascension/__init__.py
copy to deb_dist/ascension-0.6.1/.pc/applied-patches
diff --git a/deb_dist/ascension-0.6.1/PKG-INFO
b/deb_dist/ascension-0.6.1/PKG-INFO
new file mode 100644
index 0000000..717ffbb
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/PKG-INFO
@@ -0,0 +1,81 @@
+Metadata-Version: 1.1
+Name: ascension
+Version: 0.6.1
+Summary: Tool to migrate DNS Zones to the GNU Name System
+Home-page: https://gnunet.org/git/ascension.git/
+Author: rexxnor
+Author-email: address@hidden
+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>]
+ 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/README b/deb_dist/ascension-0.6.1/README
similarity index 100%
copy from README
copy to deb_dist/ascension-0.6.1/README
diff --git a/ascension.1 b/deb_dist/ascension-0.6.1/ascension.1
similarity index 100%
copy from ascension.1
copy to deb_dist/ascension-0.6.1/ascension.1
diff --git a/ascension/__init__.py
b/deb_dist/ascension-0.6.1/ascension/__init__.py
similarity index 100%
copy from ascension/__init__.py
copy to deb_dist/ascension-0.6.1/ascension/__init__.py
diff --git a/ascension/ascension.py
b/deb_dist/ascension-0.6.1/ascension/ascension.py
similarity index 97%
copy from ascension/ascension.py
copy to deb_dist/ascension-0.6.1/ascension/ascension.py
index 790306a..cd85872 100644
--- a/ascension/ascension.py
+++ b/deb_dist/ascension-0.6.1/ascension/ascension.py
@@ -136,6 +136,9 @@ class Ascender():
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:
@@ -152,11 +155,7 @@ class Ascender():
logging.critical("Domain '%s' does not allow xfr requests.",
domain)
return None
- except dns.query.TransferError:
- logging.critical("Domain '%s' does not allow xfr requests.",
- domain)
- return None
- except:
+ except Exception:
logging.error("Unexpected error while transfering domain '%s'",
domain)
return None
@@ -292,8 +291,9 @@ class Ascender():
values = nsrecord[1]
ttl = values.ttl
- gnspkeys = list(filter(lambda record:
str(record).startswith('gns--pkey--')
- and illegalchars not in str(record)[11:],
values))
+ gnspkeys = list(filter(lambda record:
+ str(record).startswith('gns--pkey--'),
+ values))
num_gnspkeys = len(gnspkeys)
if not num_gnspkeys:
@@ -308,7 +308,10 @@ class Ascender():
# FIXME: drop all NS records under this name later!
# => new map, if entry present during NS processing, skip!
if not any(illegal in gnspkey for illegal in illegalchars):
- self.add_pkey_record_to_zone(gnspkey[11:], self.domain, name,
ttl)
+ self.add_pkey_record_to_zone(gnspkey[11:],
+ self.domain,
+ name,
+ ttl)
# Unify all records under same label into a record set
customrdataset = dict()
@@ -695,6 +698,18 @@ def main():
if debug:
logging.basicConfig(level=logging.DEBUG)
+ # Initialize class instance
+ ascender = Ascender(domain, transferns, port, flags, minimum)
+
+ # Do dey run before GNUnet check
+ if dryrun:
+ dns_zone_serial = ascender.get_dns_zone_serial(ascender.domain,
+ ascender.transferns)
+ if not dns_zone_serial:
+ return 1
+ else:
+ return 0
+
# Checks if GNUnet services are running
try:
sp.check_output([GNUNET_ARM_COMMAND, '-I'], timeout=1)
@@ -702,9 +717,6 @@ def main():
logging.critical('GNUnet services are not running!')
sys.exit(1)
- # Initialize class instance
- ascender = Ascender(domain, transferns, port, flags, minimum)
-
# Set to defaults to use before we get a SOA for the first time
retry = 300
refresh = 300
@@ -725,11 +737,6 @@ def main():
dns_zone_serial = ascender.get_dns_zone_serial(ascender.domain,
ascender.transferns)
- if dryrun:
- if dns_zone_serial:
- return 0
- return 1
-
if not dns_zone_serial:
logging.error("Could not get DNS zone serial")
if standalone:
diff --git a/ascension/__init__.py
b/deb_dist/ascension-0.6.1/debian/.debhelper/generated/python3-ascension/installed-by-dh_installdocs
similarity index 100%
copy from ascension/__init__.py
copy to
deb_dist/ascension-0.6.1/debian/.debhelper/generated/python3-ascension/installed-by-dh_installdocs
diff --git a/deb_dist/ascension-0.6.1/debian/changelog
b/deb_dist/ascension-0.6.1/debian/changelog
new file mode 100644
index 0000000..14d75ee
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/debian/changelog
@@ -0,0 +1,5 @@
+ascension (0.6.1-1) unstable; urgency=low
+
+ * source package automatically created by stdeb 0.8.5
+
+ -- rexxnor <address@hidden> Fri, 10 May 2019 08:52:57 +0000
diff --git a/deb_dist/ascension-0.6.1/debian/compat
b/deb_dist/ascension-0.6.1/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/deb_dist/ascension-0.6.1/debian/control
b/deb_dist/ascension-0.6.1/debian/control
new file mode 100644
index 0000000..88e735b
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/debian/control
@@ -0,0 +1,36 @@
+Source: ascension
+Maintainer: rexxnor <address@hidden>
+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.6.1/debian/files
b/deb_dist/ascension-0.6.1/debian/files
new file mode 100644
index 0000000..8be8597
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/debian/files
@@ -0,0 +1,2 @@
+ascension_0.6.1-1_amd64.buildinfo python optional
+python3-ascension_0.6.1-1_all.deb python optional
diff --git a/deb_dist/ascension-0.6.1/debian/python3-ascension.postinst
b/deb_dist/ascension-0.6.1/debian/python3-ascension.postinst
new file mode 100644
index 0000000..0921bcf
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/debian/python3-ascension.postinst
@@ -0,0 +1,46 @@
+#!/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"
+systemctl daemon-reload
+
+# start and enable service
+systemctl start gnunet-ascension
+systemctl enable gnunet-ascension
+
+exit 0
+#DEBHELPER#
diff --git
a/deb_dist/ascension-0.6.1/debian/python3-ascension.postinst.debhelper
b/deb_dist/ascension-0.6.1/debian/python3-ascension.postinst.debhelper
new file mode 100644
index 0000000..c132d8d
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/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.6.1/debian/python3-ascension.prerm
b/deb_dist/ascension-0.6.1/debian/python3-ascension.prerm
new file mode 100644
index 0000000..e0dce86
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/debian/python3-ascension.prerm
@@ -0,0 +1,22 @@
+#!/bin/sh
+# prerm script for ascension-bind
+#
+# see: dh_installdeb(1)
+# load debconf library
+set -e
+
+mkdir -p /etc/ascension.d/
+
+# remove systemd stuff
+systemctl disable gnunet-ascension
+systemctl stop gnunet-ascension
+
+# remove the systemd files
+unlink /lib/systemd/system/gnunet-ascension.service
+rm /etc/ascension.d/gnunet-ascension.service
+
+# link the systemd unit file
+systemctl daemon-reload
+
+exit 0
+#DEBHELPER#
diff --git a/deb_dist/ascension-0.6.1/debian/python3-ascension.prerm.debhelper
b/deb_dist/ascension-0.6.1/debian/python3-ascension.prerm.debhelper
new file mode 100644
index 0000000..98de74e
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/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.6.1/debian/python3-ascension.substvars
b/deb_dist/ascension-0.6.1/debian/python3-ascension.substvars
new file mode 100644
index 0000000..039c7ae
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/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.6.1/debian/python3-ascension/DEBIAN/control
b/deb_dist/ascension-0.6.1/debian/python3-ascension/DEBIAN/control
new file mode 100644
index 0000000..d799377
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/debian/python3-ascension/DEBIAN/control
@@ -0,0 +1,30 @@
+Package: python3-ascension
+Source: ascension
+Version: 0.6.1-1
+Architecture: all
+Maintainer: rexxnor <address@hidden>
+Installed-Size: 59
+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.6.1/debian/python3-ascension/DEBIAN/md5sums
b/deb_dist/ascension-0.6.1/debian/python3-ascension/DEBIAN/md5sums
new file mode 100644
index 0000000..c1de06a
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/debian/python3-ascension/DEBIAN/md5sums
@@ -0,0 +1,10 @@
+e39447d26076db60f6e3af5fcc58d379 usr/bin/ascension
+9a1cca110e94552f9190fb1b0e3e5dad
usr/lib/python3/dist-packages/ascension-0.6.1.egg-info/PKG-INFO
+68b329da9893e34099c7d8ad5cb9c940
usr/lib/python3/dist-packages/ascension-0.6.1.egg-info/dependency_links.txt
+9cda1022e5fc72a3762b4bc09ee0ddb5
usr/lib/python3/dist-packages/ascension-0.6.1.egg-info/entry_points.txt
+d41d8cd98f00b204e9800998ecf8427e
usr/lib/python3/dist-packages/ascension-0.6.1.egg-info/requires.txt
+e616e4373e7b199db038fd8e938a3188
usr/lib/python3/dist-packages/ascension-0.6.1.egg-info/top_level.txt
+d41d8cd98f00b204e9800998ecf8427e
usr/lib/python3/dist-packages/ascension/__init__.py
+8037c2638d715efd5ad70ce603c15912
usr/lib/python3/dist-packages/ascension/ascension.py
+3211ad0ee8099a5512e496e8a4a39816 usr/man/man1/ascension.1
+f8c929864bed72e1a7f4f6cfb7dc4cab
usr/share/doc/python3-ascension/changelog.Debian.gz
diff --git a/deb_dist/ascension-0.6.1/debian/python3-ascension/DEBIAN/postinst
b/deb_dist/ascension-0.6.1/debian/python3-ascension/DEBIAN/postinst
new file mode 100755
index 0000000..3c0f52c
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/debian/python3-ascension/DEBIAN/postinst
@@ -0,0 +1,53 @@
+#!/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"
+systemctl daemon-reload
+
+# start and enable service
+systemctl start gnunet-ascension
+systemctl enable gnunet-ascension
+
+exit 0
+
+# 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.6.1/debian/python3-ascension/DEBIAN/prerm
b/deb_dist/ascension-0.6.1/debian/python3-ascension/DEBIAN/prerm
new file mode 100755
index 0000000..f3ba583
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/debian/python3-ascension/DEBIAN/prerm
@@ -0,0 +1,32 @@
+#!/bin/sh
+# prerm script for ascension-bind
+#
+# see: dh_installdeb(1)
+# load debconf library
+set -e
+
+mkdir -p /etc/ascension.d/
+
+# remove systemd stuff
+systemctl disable gnunet-ascension
+systemctl stop gnunet-ascension
+
+# remove the systemd files
+unlink /lib/systemd/system/gnunet-ascension.service
+rm /etc/ascension.d/gnunet-ascension.service
+
+# link the systemd unit file
+systemctl daemon-reload
+
+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.6.1/debian/python3-ascension/usr/bin/ascension
b/deb_dist/ascension-0.6.1/debian/python3-ascension/usr/bin/ascension
new file mode 100755
index 0000000..91dcb61
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/debian/python3-ascension/usr/bin/ascension
@@ -0,0 +1,12 @@
+#! /usr/bin/python3
+# EASY-INSTALL-ENTRY-SCRIPT: 'ascension==0.6.1','console_scripts','ascension'
+__requires__ = 'ascension==0.6.1'
+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.6.1', 'console_scripts', 'ascension')()
+ )
diff --git a/ascension.1
b/deb_dist/ascension-0.6.1/debian/python3-ascension/usr/man/man1/ascension.1
similarity index 100%
copy from ascension.1
copy to
deb_dist/ascension-0.6.1/debian/python3-ascension/usr/man/man1/ascension.1
diff --git
a/deb_dist/ascension-0.6.1/debian/python3-ascension/usr/share/doc/python3-ascension/changelog.Debian.gz
b/deb_dist/ascension-0.6.1/debian/python3-ascension/usr/share/doc/python3-ascension/changelog.Debian.gz
new file mode 100644
index 0000000..89c9a11
Binary files /dev/null and
b/deb_dist/ascension-0.6.1/debian/python3-ascension/usr/share/doc/python3-ascension/changelog.Debian.gz
differ
diff --git a/deb_dist/ascension-0.6.1/debian/rules
b/deb_dist/ascension-0.6.1/debian/rules
new file mode 100755
index 0000000..bc762e3
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/debian/rules
@@ -0,0 +1,31 @@
+#!/usr/bin/make -f
+
+# This file was automatically generated by stdeb 0.8.5 at
+# Fri, 10 May 2019 08:52:57 +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/debian/ascension-bind-0.0.1/debian/source/format
b/deb_dist/ascension-0.6.1/debian/source/format
similarity index 100%
copy from debian/ascension-bind-0.0.1/debian/source/format
copy to deb_dist/ascension-0.6.1/debian/source/format
diff --git a/deb_dist/ascension-0.6.1/debian/source/options
b/deb_dist/ascension-0.6.1/debian/source/options
new file mode 100644
index 0000000..bcc4bbb
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/debian/source/options
@@ -0,0 +1 @@
+extend-diff-ignore="\.egg-info$"
\ No newline at end of file
diff --git a/deb_dist/ascension-0.6.1/setup.cfg
b/deb_dist/ascension-0.6.1/setup.cfg
new file mode 100644
index 0000000..8bfd5a1
--- /dev/null
+++ b/deb_dist/ascension-0.6.1/setup.cfg
@@ -0,0 +1,4 @@
+[egg_info]
+tag_build =
+tag_date = 0
+
diff --git a/setup.py b/deb_dist/ascension-0.6.1/setup.py
similarity index 100%
copy from setup.py
copy to deb_dist/ascension-0.6.1/setup.py
diff --git a/deb_dist/python3-ascension_0.5.0-1_all.deb
b/deb_dist/python3-ascension_0.5.0-1_all.deb
new file mode 100644
index 0000000..3a53dc2
Binary files /dev/null and b/deb_dist/python3-ascension_0.5.0-1_all.deb differ
diff --git a/deb_dist/python3-ascension_0.6.1-1_all.deb
b/deb_dist/python3-ascension_0.6.1-1_all.deb
new file mode 100644
index 0000000..0288559
Binary files /dev/null and b/deb_dist/python3-ascension_0.6.1-1_all.deb differ
diff --git a/ascension/__init__.py
b/debian/ascension-bind-0.0.1/debian/.debhelper/generated/ascension-bind/installed-by-dh_installdocs
similarity index 100%
copy from ascension/__init__.py
copy to
debian/ascension-bind-0.0.1/debian/.debhelper/generated/ascension-bind/installed-by-dh_installdocs
diff --git a/debian/ascension-bind-0.0.1/debian/ascension-bind.config
b/debian/ascension-bind-0.0.1/debian/ascension-bind.config
index c77bc11..8348931 100644
--- a/debian/ascension-bind-0.0.1/debian/ascension-bind.config
+++ b/debian/ascension-bind-0.0.1/debian/ascension-bind.config
@@ -5,7 +5,7 @@
# load debconf library
. /usr/share/debconf/confmodule
-set -e
+#set -e
if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
@@ -15,32 +15,29 @@ ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"
1>&2 }
#read -r zones < installedzones
zonelist=$(grep "^zone" < /etc/bind/named.conf.local | grep -vE
"(arpa|localhost|\"\.\")" | cut -d '"' -f2)
-zonelist=${zonelist// /, /}
+zonelist=$(echo "$zonelist" | sed 's/\n/ /g' | sed 's/ /, /g')
#altzonelist=$(named-checkconf -z | grep -P "\d{4,}$")
#altzones=("$altzonelist")
-#echo $zonelist
-#echo $altzonelist
-#echo $altzones
-
#if [ address@hidden -eq address@hidden ]; then
#db_metaget ascension-bind/zones choices
#echo "$RET"
#db_set ascension-bind/zones 'foo.bar, this.does.not.work'
#db_subst ascension-bind/zones choices "mine, this.does.work"
#db_set ascension-bind/zones "foo.bar, this.does.not.work"
-if grep allow-transfer < /etc/bind/named.conf.local &> /dev/null; then
- db_fset ascension-bind/transfer-allowed seen false
- db_input high ascension-bind/transfer-allowed
- db_go || true
- exit 1
-fi
+#if grep allow-transfer < /etc/bind/named.conf &> /dev/null; then
+# db_fset ascension-bind/transfer-allowed seen false
+# db_input high ascension-bind/transfer-allowed
+# db_go || true
+# exit 1
+#fi
db_set ascension-bind/zones "$zonelist"
db_subst ascension-bind/zones choices "$zonelist"
db_fset ascension-bind/zones seen false
db_input high ascension-bind/zones || true
db_go || true
+
# fix the zone selection
db_get ascension-bind/zones
echo "$RET" | sed 's/ //g' | sed 's/,/\n/g' > selectedzones
@@ -51,22 +48,69 @@ db_input medium ascension-bind/publishing || true
db_go || true
PUBLIC=$RET
+zonestatus=true
+for ZONE in "address@hidden"
+do
+ ZONE=$( echo "$ZONE" | tr -d '\n')
+ su -s /bin/bash ascension << EOF
+ascension "$ZONE" -n localhost --dry-run
+EOF
+ if [ $? -gt 0 ]; then
+ zonestatus=false
+ break
+ fi
+done
+
+if ! $zonestatus; then
+ echo "Some zones don't allow zone transfer"
+ if grep allow-transfer /etc/bind/named.conf* &> /dev/null; then
+ db_fset ascension-bind/transfer-allowed seen false
+ db_input high ascension-bind/transfer-allowed
+ db_go || true
+ exit 1
+ else
+ echo "Trying to allow zone transfer on localhost in global
configuration"
+ sed -i.backup -r 's|(^[^\n\S]*options\s?\{)|\1 allow\-transfer {
localhost; }; |g' /etc/bind/named.conf.options
+ deb-systemd-invoke restart bind9
+ zonestatus=true
+ for ZONE in "address@hidden"
+ do
+ ZONE=$( echo "$ZONE" | tr -d '\n')
+ su -s /bin/bash ascension << EOF
+ascension "$ZONE" -n localhost --dry-run
+EOF
+ if [ $? -gt 0 ]; then
+ zonestatus=false
+ break
+ fi
+ done
+ if [ -z $zonestatus ]; then
+ db_fset ascension-bind/transfer-allowed seen false
+ db_input high ascension-bind/transfer-allowed
+ db_go || true
+ exit 1
+ fi
+ echo "Zone transfer possible, continuing"
+ fi
+fi
+
+echo "Everything okay, templating files"
mkdir -p /etc/ascension.d/
for ZONE in "address@hidden"
do
- echo "creating ascension import config files"
- cat > "/etc/ascension.d/bind-import-$ZONE.conf" << EOF
+ ZONE=$( echo "$ZONE" | tr -d '\n')
+ FILECONV=$( echo "$ZONE" | tr '.' '_')
+ echo "Creating ascension import config files for $ZONE"
+ cat > "/etc/ascension.d/bind-import-$FILE.conf" << EOF
[ascension]
ZONE = $ZONE
TRANSFERNS = localhost
PORT = 53
PUBLIC = $PUBLIC
EOF
- touch "/etc/ascension.d/bind-import-$ZONE.conf"
- echo "editing config to allow local zone transfer"
- sed -i.backup -r 's|(^[^\n\S]*zone\s\"[a-zA-Z.]*\".*\{)|\1
allow\-transfer { localhost; }; |g' /etc/bind/named.conf.local
- echo "creating systemd unit file"
- cat > "/etc/ascension.d/ascension-bind-$ZONE.service" << EOF
+ touch "/etc/ascension.d/bind-import-$ZONE.conf"
+ echo "Creating systemd unit file."
+ cat > "/etc/ascension.d/ascension-bind-$FILECONV.service" << EOF
[Unit]
Description=Ascension-bind for $ZONE
After=gnunet-ascension.service
@@ -79,21 +123,21 @@ ExecStart=/usr/bin/ascension $ZONE -n localhost
[Install]
WantedBy=multi-user.target
EOF
- ln -s "/etc/ascension.d/ascension-bind-$ZONE.service"
"/lib/systemd/system/ascension-bind-$ZONE.service"
+ ln -sf "/etc/ascension.d/ascension-bind-$FILECONV.service"
"/lib/systemd/system/ascension-bind-$FILECONV.service"
done
-#if deb-systemd-invoke reload bind9; then
-# echo "reconfiguring failed, restoring original state"
-# mv /etc/bind/named.conf.local.backup /etc/bind/named.conf.local
-# exit 1
-#fi
-#
-#for ZONE in "address@hidden"
-#do
-# echo "starting and enabling ascension-bind-$ZONE"
-# deb-systemd-invoke start "ascension-bind-$ZONE"
-# deb-systemd-invoke enable "ascension-bind-$ZONE"
-#done
+deb-systemd-invoke daemon-reload
+for ZONE in "address@hidden"
+do
+ ZONE=$( echo "$ZONE" | tr -d '\n')
+ ZONE=$( echo "$ZONE" | tr '.' '_')
+ echo "Starting and enabling ascension-bind-$FILECONV"
+ deb-systemd-invoke start "ascension-bind-$FILECONV"
+ deb-systemd-invoke enable "ascension-bind-$FILECONV"
+ #deb-systemd-invoke start "ascension-bind-$ZONE"
+ #deb-systemd-invoke enable "ascension-bind-$ZONE"
+done
+deb-systemd-invoke daemon-reload
exit 0
#DEBHELPER#
diff --git a/debian/ascension-bind-0.0.1/debian/ascension-bind.postrm.debhelper
b/debian/ascension-bind-0.0.1/debian/ascension-bind.postrm.debhelper
index bc035b9..c2ab326 100644
--- a/debian/ascension-bind-0.0.1/debian/ascension-bind.postrm.debhelper
+++ b/debian/ascension-bind-0.0.1/debian/ascension-bind.postrm.debhelper
@@ -1,4 +1,4 @@
-# Automatically added by dh_installdebconf
+# Automatically added by dh_installdebconf/12.1.1~bpo9+1
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
diff --git a/debian/ascension-bind-0.0.1/debian/ascension-bind.templates
b/debian/ascension-bind-0.0.1/debian/ascension-bind.templates
index 28d9db4..e8663cc 100644
--- a/debian/ascension-bind-0.0.1/debian/ascension-bind.templates
+++ b/debian/ascension-bind-0.0.1/debian/ascension-bind.templates
@@ -4,7 +4,6 @@ Choices: ${zonelist}
Description: Which zones do you want to migrate to the GNU Name System?
Please select the zones you want to have migrated into the GNU Name System.
-
Template: ascension-bind/publishing
Type: boolean
Default: true
diff --git a/debian/ascension-bind-0.0.1/debian/ascension-bind/DEBIAN/config
b/debian/ascension-bind-0.0.1/debian/ascension-bind/DEBIAN/config
index f96bba0..9ba9e8a 100755
--- a/debian/ascension-bind-0.0.1/debian/ascension-bind/DEBIAN/config
+++ b/debian/ascension-bind-0.0.1/debian/ascension-bind/DEBIAN/config
@@ -5,7 +5,7 @@
# load debconf library
. /usr/share/debconf/confmodule
-set -e
+#set -e
if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
@@ -14,65 +14,103 @@ ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"
1>&2 }
#grep "Zone dump" /var/cache/bind/named_dump.db | grep -v "arpa" | grep "IN" |
grep -v localhost > installedzones
#read -r zones < installedzones
-zonelist=$(grep "^zone" < /etc/bind/named.conf.local | grep -vE
"(arpa|localhost|\"\.\")" | grep -v "allow-transfer" | cut -d '"' -f2)
-zonelist=$(echo $zonelist | sed 's/ /, /g')
+zonelist=$(grep "^zone" < /etc/bind/named.conf.local | grep -vE
"(arpa|localhost|\"\.\")" | cut -d '"' -f2)
+zonelist=$(echo $zonelist | sed 's/\n/ /g' | sed 's/ /, /g')
#altzonelist=$(named-checkconf -z | grep -P "\d{4,}$")
#altzones=("$altzonelist")
-#echo $zonelist
-#echo $altzonelist
-#echo $altzones
-
#if [ address@hidden -eq address@hidden ]; then
#db_metaget ascension-bind/zones choices
#echo "$RET"
#db_set ascension-bind/zones 'foo.bar, this.does.not.work'
#db_subst ascension-bind/zones choices "mine, this.does.work"
#db_set ascension-bind/zones "foo.bar, this.does.not.work"
-
-if [ -n "$(ls -A /etc/ascension.d/)" ]; then
- echo "there seem to be config files already"
-fi
+#if grep allow-transfer < /etc/bind/named.conf &> /dev/null; then
+# db_fset ascension-bind/transfer-allowed seen false
+# db_input high ascension-bind/transfer-allowed
+# db_go || true
+# exit 1
+#fi
db_set ascension-bind/zones "$zonelist"
db_subst ascension-bind/zones choices "$zonelist"
db_fset ascension-bind/zones seen false
db_input high ascension-bind/zones || true
db_go || true
+
# fix the zone selection
db_get ascension-bind/zones
-
-echo "$RET" | sed 's/ //g' | sed 's/,/\n/g' | sed '/^ *$/d' > selectedzones
+echo "$RET" | sed 's/ //g' | sed 's/,/\n/g' > selectedzones
readarray zones < selectedzones
-rm selectedzones
-
-if [ address@hidden -eq 0 ]; then
- echo "No zones to enable zonetransfer on"
- exit 0
-fi
db_fset ascension-bind/publishing seen false
db_input medium ascension-bind/publishing || true
db_go || true
PUBLIC=$RET
+zonestatus=true
+for ZONE in "address@hidden"
+do
+ ZONE=$( echo "$ZONE" | tr -d '\n')
+ su -s /bin/bash ascension << EOF
+ascension "$ZONE" -n localhost --dry-run
+EOF
+ if [ $? -gt 0 ]; then
+ zonestatus=false
+ break
+ fi
+done
+
+if ! $zonestatus; then
+ echo "Some zones don't allow zone transfer"
+ if grep allow-transfer /etc/bind/named.conf* &> /dev/null; then
+ db_fset ascension-bind/transfer-allowed seen false
+ db_input high ascension-bind/transfer-allowed
+ db_go || true
+ exit 1
+ else
+ echo "Trying to allow zone transfer on localhost in global
configuration"
+ sed -i.backup -r 's|(^[^\n\S]*options\s?\{)|\1 allow\-transfer {
localhost; }; |g' /etc/bind/named.conf.options
+ systemctl restart bind9
+ zonestatus=true
+ for ZONE in "address@hidden"
+ do
+ ZONE=$( echo "$ZONE" | tr -d '\n')
+ su -s /bin/bash ascension << EOF
+ascension "$ZONE" -n localhost --dry-run
+EOF
+ if [ $? -gt 0 ]; then
+ zonestatus=false
+ break
+ fi
+ done
+ if [ -z $zonestatus ]; then
+ db_fset ascension-bind/transfer-allowed seen false
+ db_input high ascension-bind/transfer-allowed
+ db_go || true
+ exit 1
+ fi
+ echo "Zone transfer possible, continuing"
+ fi
+fi
+
+echo "Everything okay, templating files"
mkdir -p /etc/ascension.d/
for ZONE in "address@hidden"
do
- ZONE=$(echo "$ZONE" | tr -d '\n' | tr '.' '_')
- echo "creating ascension import config files"
- cat > "/etc/ascension.d/bind-import-$ZONE.conf" << EOF
+ ZONE=$( echo "$ZONE" | tr -d '\n')
+ FILECONV=$( echo "$ZONE" | tr '.' '_')
+ echo "Creating ascension import config files for $ZONE"
+ cat > "/etc/ascension.d/bind-import-$FILE.conf" << EOF
[ascension]
ZONE = $ZONE
TRANSFERNS = localhost
PORT = 53
PUBLIC = $PUBLIC
EOF
-touch "/etc/ascension.d/bind-import-$ZONE.conf"
-echo "editing config to allow local zone transfer"
-sed -i.backup -r 's|(^[^\n\S]*zone\s\"[a-zA-Z.]*\".*\{)|\1 allow\-transfer {
localhost; }; |g' /etc/bind/named.conf.local
-echo "creating systemd unit file"
-cat > "/etc/ascension.d/ascension-bind-$ZONE.service" << EOF
+ touch "/etc/ascension.d/bind-import-$ZONE.conf"
+ echo "Creating systemd unit file."
+ cat > "/etc/ascension.d/ascension-bind-$FILECONV.service" << EOF
[Unit]
Description=Ascension-bind for $ZONE
After=gnunet-ascension.service
@@ -85,23 +123,21 @@ ExecStart=/usr/bin/ascension $ZONE -n localhost
[Install]
WantedBy=multi-user.target
EOF
-ln -sf "/etc/ascension.d/ascension-bind-$ZONE.service"
"/lib/systemd/system/ascension-bind-$ZONE.service"
+ ln -sf "/etc/ascension.d/ascension-bind-$FILECONV.service"
"/lib/systemd/system/ascension-bind-$FILECONV.service"
done
-if systemctl reload bind9; then
- echo "reconfiguring failed, restoring original state"
- mv /etc/bind/named.conf.local.backup /etc/bind/named.conf.local
- systemctl reload bind9
- exit 1
-fi
-
+deb-systemd-invoke daemon-reload
for ZONE in "address@hidden"
do
- ZONE=$(echo "$ZONE" | tr -d '\n' | tr '.' '_')
- echo "starting and enabling ascension-bind-$ZONE"
- systemctl start "ascension-bind-$ZONE"
- systemctl enable "ascension-bind-$ZONE"
+ ZONE=$( echo "$ZONE" | tr -d '\n')
+ ZONE=$( echo "$ZONE" | tr '.' '_')
+ echo "Starting and enabling ascension-bind-$FILECONV"
+ deb-systemd-invoke start "ascension-bind-$FILECONV"
+ deb-systemd-invoke enable "ascension-bind-$FILECONV"
+ #deb-systemd-invoke start "ascension-bind-$ZONE"
+ #deb-systemd-invoke enable "ascension-bind-$ZONE"
done
+deb-systemd-invoke daemon-reload
exit 0
diff --git a/debian/ascension-bind-0.0.1/debian/ascension-bind/DEBIAN/control
b/debian/ascension-bind-0.0.1/debian/ascension-bind/DEBIAN/control
index ddd8c9e..5361a6d 100644
--- a/debian/ascension-bind-0.0.1/debian/ascension-bind/DEBIAN/control
+++ b/debian/ascension-bind-0.0.1/debian/ascension-bind/DEBIAN/control
@@ -2,7 +2,7 @@ Package: ascension-bind
Version: 0.0.1-1
Architecture: amd64
Maintainer: rexxnor <address@hidden>
-Installed-Size: 16
+Installed-Size: 17
Depends: debconf (>= 0.5) | debconf-2.0
Section: net
Priority: optional
diff --git a/debian/ascension-bind-0.0.1/debian/ascension-bind/DEBIAN/templates
b/debian/ascension-bind-0.0.1/debian/ascension-bind/DEBIAN/templates
index 28d9db4..e8663cc 100644
--- a/debian/ascension-bind-0.0.1/debian/ascension-bind/DEBIAN/templates
+++ b/debian/ascension-bind-0.0.1/debian/ascension-bind/DEBIAN/templates
@@ -4,7 +4,6 @@ Choices: ${zonelist}
Description: Which zones do you want to migrate to the GNU Name System?
Please select the zones you want to have migrated into the GNU Name System.
-
Template: ascension-bind/publishing
Type: boolean
Default: true
diff --git a/debian/ascension-bind-0.0.1/debian/debhelper-build-stamp
b/debian/ascension-bind-0.0.1/debian/debhelper-build-stamp
deleted file mode 100644
index d664a51..0000000
--- a/debian/ascension-bind-0.0.1/debian/debhelper-build-stamp
+++ /dev/null
@@ -1 +0,0 @@
-ascension-bind
diff --git a/debian/ascension-bind_0.0.1-1.debian.tar.xz
b/debian/ascension-bind_0.0.1-1.debian.tar.xz
index 3f902f2..1620237 100644
Binary files a/debian/ascension-bind_0.0.1-1.debian.tar.xz and
b/debian/ascension-bind_0.0.1-1.debian.tar.xz differ
diff --git a/debian/ascension-bind_0.0.1-1.dsc
b/debian/ascension-bind_0.0.1-1.dsc
index 07aeade..197cdfe 100644
--- a/debian/ascension-bind_0.0.1-1.dsc
+++ b/debian/ascension-bind_0.0.1-1.dsc
@@ -11,10 +11,10 @@ Package-List:
ascension-bind deb net optional arch=any
Checksums-Sha1:
0a7953cf5bf7616ff1c2171789fab736e199e769 3860 ascension-bind_0.0.1.orig.tar.xz
- 3c0570477541ef66e6f6773deeddc918265b13de 3684
ascension-bind_0.0.1-1.debian.tar.xz
+ 6b5155ca3372492c44934aaaa511d1fb4600de77 3916
ascension-bind_0.0.1-1.debian.tar.xz
Checksums-Sha256:
e21b0672b6d9932d03541c13e9350546542d9dd86373bf6bc78f61a1c79586b4 3860
ascension-bind_0.0.1.orig.tar.xz
- de0d19f8b275a8e5ff2abdf03bd773e48fbce24620dfe35a6d2e27dc6769c811 3684
ascension-bind_0.0.1-1.debian.tar.xz
+ e78f2137906bf781746c9dab80819e9424952e2c32ea87c64d5d0099ef79081d 3916
ascension-bind_0.0.1-1.debian.tar.xz
Files:
3e51a0f28a46eff44e0366ab9185b840 3860 ascension-bind_0.0.1.orig.tar.xz
- 20f842e732fc6fad01164eebb47511d6 3684 ascension-bind_0.0.1-1.debian.tar.xz
+ ee9021dd6a5702694d477e09bca5a2be 3916 ascension-bind_0.0.1-1.debian.tar.xz
diff --git a/debian/ascension-bind_0.0.1-1_amd64.build
b/debian/ascension-bind_0.0.1-1_amd64.build
index d6e2ff8..93d44fd 100644
--- a/debian/ascension-bind_0.0.1-1_amd64.build
+++ b/debian/ascension-bind_0.0.1-1_amd64.build
@@ -1,15 +1,12 @@
- dpkg-buildpackage -rfakeroot -us -uc
-dpkg-buildpackage: warning: using a gain-root-command while being root
+ dpkg-buildpackage -us -uc -ui
dpkg-buildpackage: info: source package ascension-bind
dpkg-buildpackage: info: source version 0.0.1-1
dpkg-buildpackage: info: source distribution UNRELEASED
dpkg-buildpackage: info: source changed by rexxnor <address@hidden>
dpkg-source --before-build ascension-bind-0.0.1
dpkg-buildpackage: info: host architecture amd64
- fakeroot debian/rules clean
+ debian/rules clean
dh clean
- dh_testdir
- dh_auto_clean
dh_clean
dpkg-source -b ascension-bind-0.0.1
dpkg-source: info: using source format '3.0 (quilt)'
@@ -52,18 +49,11 @@ dpkg-source: info: building ascension-bind in
ascension-bind_0.0.1-1.debian.tar.
dpkg-source: info: building ascension-bind in ascension-bind_0.0.1-1.dsc
debian/rules build
dh build
- dh_testdir
dh_update_autotools_config
- dh_auto_configure
- dh_auto_build
- dh_auto_test
- create-stamp debian/debhelper-build-stamp
- fakeroot debian/rules binary
+ debian/rules binary
dh binary
- create-stamp debian/debhelper-build-stamp
dh_testroot
dh_prep
- dh_auto_install
dh_installdocs
dh_installchangelogs
dh_installdebconf
@@ -72,6 +62,7 @@ dh binary
dh_strip_nondeterminism
dh_compress
dh_fixperms
+ dh_missing
dh_strip
dh_makeshlibs
dh_shlibdeps
@@ -86,12 +77,16 @@ dpkg-deb: building package 'ascension-bind' in
'../ascension-bind_0.0.1-1_amd64.
dpkg-genchanges: info: including full source code in upload
dpkg-source --after-build ascension-bind-0.0.1
dpkg-buildpackage: info: full upload (original source is included)
-Now running lintian...
+Now running lintian ascension-bind_0.0.1-1_amd64.changes ...
warning: the authors of lintian do not recommend running it with root
privileges!
W: ascension-bind source: changelog-should-mention-nmu
W: ascension-bind source: source-nmu-has-incorrect-version-number 0.0.1-1
E: ascension-bind source: untranslatable-debconf-templates
ascension-bind.templates: 4
-E: ascension-bind source: untranslatable-debconf-templates
ascension-bind.templates: 11
-E: ascension-bind source: untranslatable-debconf-templates
ascension-bind.templates: 18
+E: ascension-bind source: untranslatable-debconf-templates
ascension-bind.templates: 10
+E: ascension-bind source: untranslatable-debconf-templates
ascension-bind.templates: 17
E: ascension-bind source: not-using-po-debconf
+E: ascension-bind source: debian-rules-is-dh_make-template
+W: ascension-bind: empty-binary-package
+W: ascension-bind: maintainer-script-ignores-errors config
+W: ascension-bind: maintainer-script-calls-systemctl config:74
Finished running lintian.
diff --git a/debian/ascension-bind_0.0.1-1_amd64.buildinfo
b/debian/ascension-bind_0.0.1-1_amd64.buildinfo
index 4941f76..c7a6720 100644
--- a/debian/ascension-bind_0.0.1-1_amd64.buildinfo
+++ b/debian/ascension-bind_0.0.1-1_amd64.buildinfo
@@ -4,28 +4,28 @@ Binary: ascension-bind
Architecture: amd64 source
Version: 0.0.1-1
Checksums-Md5:
- 2d9afbd0d573cb0a16cb9565cb56709f 892 ascension-bind_0.0.1-1.dsc
- 56e65ac4ed6b803ca7589adfa999472f 3592 ascension-bind_0.0.1-1_amd64.deb
+ d4406ce06c99ebabbcc22834d8fd780b 892 ascension-bind_0.0.1-1.dsc
+ 9156944d8b0162ac8c76efb193cec389 3846 ascension-bind_0.0.1-1_amd64.deb
Checksums-Sha1:
- 22b4b76b8a8758b25d33f52ab3ac3148ffe0a493 892 ascension-bind_0.0.1-1.dsc
- 55867a2ff68af31a002da15200e4e5a05b2ade18 3592 ascension-bind_0.0.1-1_amd64.deb
+ 16c228c6f9458087258222bc1851cd623963d63a 892 ascension-bind_0.0.1-1.dsc
+ fff1c10e43a0ecd3fb0348e33f3810646fe0869b 3846 ascension-bind_0.0.1-1_amd64.deb
Checksums-Sha256:
- dbfe6c1bc6c196352bedf65eb8ae4e18e35ecbb8f4c818d36bd9f4a95aeef67c 892
ascension-bind_0.0.1-1.dsc
- 7be97f15620050bf13cf5dfb79edcf7e3dcff04b89f57da9b596a9a835e2e862 3592
ascension-bind_0.0.1-1_amd64.deb
+ 73455935623c505a28f4654f6999cb3caf9a706aa3c1eca819911a2fdd482f5e 892
ascension-bind_0.0.1-1.dsc
+ dfba7ef2ed8d0ebd5972ae7c75f9836b32237c4f33bf6a32b9a0a09053aacffc 3846
ascension-bind_0.0.1-1_amd64.deb
Build-Origin: Debian
Build-Architecture: amd64
-Build-Date: Mon, 06 May 2019 21:11:30 +0000
+Build-Date: Fri, 10 May 2019 12:00:26 +0000
Installed-Build-Depends:
adduser (= 3.115),
autoconf (= 2.69-10),
automake (= 1:1.15-6),
autopoint (= 0.19.8.1-2),
autotools-dev (= 20161112.1),
- base-files (= 9.9+deb9u7),
+ base-files (= 9.9+deb9u4),
base-passwd (= 3.5.43),
bash (= 4.4-5),
- bind9 (= 1:9.10.3.dfsg.P4-12.3+deb9u4),
- bind9utils (= 1:9.10.3.dfsg.P4-12.3+deb9u4),
+ bind9 (= 1:9.11.5.P4+dfsg-1~bpo9+1),
+ bind9utils (= 1:9.11.5.P4+dfsg-1~bpo9+1),
binutils (= 2.28-5),
bsdmainutils (= 9.0.12+nmu1),
bsdutils (= 1:2.29.2-1+deb9u1),
@@ -36,14 +36,16 @@ Installed-Build-Depends:
cpp-6 (= 6.3.0-18+deb9u1),
dash (= 0.5.8-2.4),
debconf (= 1.5.61),
- debhelper (= 10.2.5),
+ debhelper (= 12.1.1~bpo9+1),
debianutils (= 4.8.1.1),
- dh-autoreconf (= 14),
+ dh-autoreconf (= 17~bpo9+1),
dh-python (= 2.20170125),
dh-strip-nondeterminism (= 0.034-1),
diffutils (= 1:3.5-3),
- dpkg (= 1.18.25),
+ dns-root-data (= 2019031302~deb9u1),
+ 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),
@@ -68,7 +70,7 @@ Installed-Build-Depends:
libattr1 (= 1:2.4.47-2+b2),
libaudit-common (= 1:2.6.7-2),
libaudit1 (= 1:2.6.7-2),
- libbind9-140 (= 1:9.10.3.dfsg.P4-12.3+deb9u4),
+ libbind9-161 (= 1:9.11.5.P4+dfsg-1~bpo9+1),
libblkid1 (= 2.29.2-1+deb9u1),
libbsd0 (= 0.8.3-1),
libbz2-1.0 (= 1.0.6-8.1),
@@ -84,12 +86,14 @@ Installed-Build-Depends:
libcroco3 (= 0.6.11-3),
libdb5.3 (= 5.3.28-12+deb9u1),
libdebconfclient0 (= 0.227),
- libdns162 (= 1:9.10.3.dfsg.P4-12.3+deb9u4),
+ libdns1104 (= 1:9.11.5.P4+dfsg-1~bpo9+1),
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),
+ libfstrm0 (= 0.3.0-1),
libgcc-6-dev (= 6.3.0-18+deb9u1),
libgcc1 (= 1:6.3.0-18+deb9u1),
libgcrypt20 (= 1.7.6-2+deb9u3),
@@ -98,21 +102,22 @@ Installed-Build-Depends:
libglib2.0-0 (= 2.50.3-2),
libgmp10 (= 2:6.1.2+dfsg-1),
libgomp1 (= 6.3.0-18+deb9u1),
- libgpg-error0 (= 1.26-2),
+ libgpg-error0 (= 1.35-1~bpo9+1),
libgssapi-krb5-2 (= 1.15-1+deb9u1),
libicu57 (= 57.1-6+deb9u2),
- libirs141 (= 1:9.10.3.dfsg.P4-12.3+deb9u4),
- libisc160 (= 1:9.10.3.dfsg.P4-12.3+deb9u4),
- libisccc140 (= 1:9.10.3.dfsg.P4-12.3+deb9u4),
- libisccfg140 (= 1:9.10.3.dfsg.P4-12.3+deb9u4),
+ libisc1100 (= 1:9.11.5.P4+dfsg-1~bpo9+1),
+ libisccc161 (= 1:9.11.5.P4+dfsg-1~bpo9+1),
+ libisccfg163 (= 1:9.11.5.P4+dfsg-1~bpo9+1),
libisl15 (= 0.18-1),
libitm1 (= 6.3.0-18+deb9u1),
+ libjson-c3 (= 0.12.1-1.1),
libk5crypto3 (= 1.15-1+deb9u1),
libkeyutils1 (= 1.5.9-9),
libkrb5-3 (= 1.15-1+deb9u1),
libkrb5support0 (= 1.15-1+deb9u1),
+ liblmdb0 (= 0.9.18-5),
liblsan0 (= 6.3.0-18+deb9u1),
- liblwres141 (= 1:9.10.3.dfsg.P4-12.3+deb9u4),
+ liblwres161 (= 1:9.11.5.P4+dfsg-1~bpo9+1),
liblz4-1 (= 0.0~r131-2+b1),
liblzma5 (= 5.2.2-1.2+b1),
libmagic-mgc (= 1:5.30-1+deb9u2),
@@ -131,6 +136,7 @@ Installed-Build-Depends:
libpcre3 (= 2:8.39-3),
libperl5.24 (= 5.24.1-3+deb9u5),
libpipeline1 (= 1.4.1-2),
+ libprotobuf-c1 (= 1.2.1-2),
libpython3-stdlib (= 3.5.3-1),
libpython3.5-minimal (= 3.5.3-1+deb9u1),
libpython3.5-stdlib (= 3.5.3-1+deb9u1),
@@ -142,24 +148,23 @@ Installed-Build-Depends:
libsepol1 (= 2.6-2),
libsigsegv2 (= 2.10-5),
libsmartcols1 (= 2.29.2-1+deb9u1),
- libsqlite3-0 (= 3.16.2-5+deb9u1),
+ libsqlite3-0 (= 3.27.2-2~bpo9+1),
libss2 (= 1.43.4-2),
- libssl1.0.2 (= 1.0.2r-1~deb9u1),
- libssl1.1 (= 1.1.0j-1~deb9u1),
+ libssl1.1 (= 1.1.0f-3+deb9u1),
libstdc++-6-dev (= 6.3.0-18+deb9u1),
libstdc++6 (= 6.3.0-18+deb9u1),
- libsystemd0 (= 232-25+deb9u8),
+ 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 (= 232-25+deb9u8),
+ 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.9.144-3.1),
+ linux-libc-dev (= 4.19.28-2~bpo9+1),
login (= 1:4.4-4.1),
lsb-base (= 9.20161125),
m4 (= 1.4.18-1),
@@ -174,20 +179,22 @@ Installed-Build-Depends:
net-tools (= 1.60+git20161116.90da8a0-1),
netbase (= 5.4),
passwd (= 1:4.4-4.1),
- patch (= 2.7.5-1+deb9u1),
+ 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-ascension (= 0.5.0-1),
+ python3-ascension (= 0.6.1-1),
python3-coverage (= 4.2+dfsg.1-2),
python3-dnspython (= 1.15.0-1+deb9u1),
python3-docopt (= 0.6.2-1),
python3-minimal (= 3.5.3-1),
python3-mock (= 2.0.0-3),
- python3-pbr (= 1.10.0-1),
+ python3-pbr (= 4.2.0-4~bpo9+2),
python3-pkg-resources (= 33.1.1-1),
+ python3-ply (= 3.9-1),
+ python3-setuptools (= 33.1.1-1),
python3-six (= 1.10.0-3),
python3.5 (= 3.5.3-1+deb9u1),
python3.5-minimal (= 3.5.3-1+deb9u1),
diff --git a/debian/ascension-bind_0.0.1-1_amd64.changes
b/debian/ascension-bind_0.0.1-1_amd64.changes
index 2e0f67e..564a5d3 100644
--- a/debian/ascension-bind_0.0.1-1_amd64.changes
+++ b/debian/ascension-bind_0.0.1-1_amd64.changes
@@ -16,20 +16,20 @@ Changes:
.
* Initial release Closes: #123123
Checksums-Sha1:
- 22b4b76b8a8758b25d33f52ab3ac3148ffe0a493 892 ascension-bind_0.0.1-1.dsc
+ 16c228c6f9458087258222bc1851cd623963d63a 892 ascension-bind_0.0.1-1.dsc
0a7953cf5bf7616ff1c2171789fab736e199e769 3860 ascension-bind_0.0.1.orig.tar.xz
- 3c0570477541ef66e6f6773deeddc918265b13de 3684
ascension-bind_0.0.1-1.debian.tar.xz
- 34ad26b484c543a73a36b5de4314c5b7bc7d8d75 6297
ascension-bind_0.0.1-1_amd64.buildinfo
- 55867a2ff68af31a002da15200e4e5a05b2ade18 3592 ascension-bind_0.0.1-1_amd64.deb
+ 6b5155ca3372492c44934aaaa511d1fb4600de77 3916
ascension-bind_0.0.1-1.debian.tar.xz
+ 702b9e3ffde295c125ec590b722bc56cfdd5a750 6465
ascension-bind_0.0.1-1_amd64.buildinfo
+ fff1c10e43a0ecd3fb0348e33f3810646fe0869b 3846 ascension-bind_0.0.1-1_amd64.deb
Checksums-Sha256:
- dbfe6c1bc6c196352bedf65eb8ae4e18e35ecbb8f4c818d36bd9f4a95aeef67c 892
ascension-bind_0.0.1-1.dsc
+ 73455935623c505a28f4654f6999cb3caf9a706aa3c1eca819911a2fdd482f5e 892
ascension-bind_0.0.1-1.dsc
e21b0672b6d9932d03541c13e9350546542d9dd86373bf6bc78f61a1c79586b4 3860
ascension-bind_0.0.1.orig.tar.xz
- de0d19f8b275a8e5ff2abdf03bd773e48fbce24620dfe35a6d2e27dc6769c811 3684
ascension-bind_0.0.1-1.debian.tar.xz
- 3df280a2de88c38c4faa2c1fd0551f8241669bc1383fe0a33a74abc6cbf1a930 6297
ascension-bind_0.0.1-1_amd64.buildinfo
- 7be97f15620050bf13cf5dfb79edcf7e3dcff04b89f57da9b596a9a835e2e862 3592
ascension-bind_0.0.1-1_amd64.deb
+ e78f2137906bf781746c9dab80819e9424952e2c32ea87c64d5d0099ef79081d 3916
ascension-bind_0.0.1-1.debian.tar.xz
+ 16e76d9f72c890130a98efc5ed7ebed135d96696d956c85fc7ea178a742c3e87 6465
ascension-bind_0.0.1-1_amd64.buildinfo
+ dfba7ef2ed8d0ebd5972ae7c75f9836b32237c4f33bf6a32b9a0a09053aacffc 3846
ascension-bind_0.0.1-1_amd64.deb
Files:
- 2d9afbd0d573cb0a16cb9565cb56709f 892 net optional ascension-bind_0.0.1-1.dsc
+ d4406ce06c99ebabbcc22834d8fd780b 892 net optional ascension-bind_0.0.1-1.dsc
3e51a0f28a46eff44e0366ab9185b840 3860 net optional
ascension-bind_0.0.1.orig.tar.xz
- 20f842e732fc6fad01164eebb47511d6 3684 net optional
ascension-bind_0.0.1-1.debian.tar.xz
- 752bba32d46c6fb2537fdc58d66622d4 6297 net optional
ascension-bind_0.0.1-1_amd64.buildinfo
- 56e65ac4ed6b803ca7589adfa999472f 3592 net optional
ascension-bind_0.0.1-1_amd64.deb
+ ee9021dd6a5702694d477e09bca5a2be 3916 net optional
ascension-bind_0.0.1-1.debian.tar.xz
+ 182e01787b6c95b1fc94d4464a6f5103 6465 net optional
ascension-bind_0.0.1-1_amd64.buildinfo
+ 9156944d8b0162ac8c76efb193cec389 3846 net optional
ascension-bind_0.0.1-1_amd64.deb
diff --git a/debian/ascension-bind_0.0.1-1_amd64.deb
b/debian/ascension-bind_0.0.1-1_amd64.deb
index b491306..b67d423 100644
Binary files a/debian/ascension-bind_0.0.1-1_amd64.deb and
b/debian/ascension-bind_0.0.1-1_amd64.deb differ
diff --git a/helpers/python3-ascension.postinst
b/helpers/python3-ascension.postinst
new file mode 100644
index 0000000..0921bcf
--- /dev/null
+++ b/helpers/python3-ascension.postinst
@@ -0,0 +1,46 @@
+#!/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"
+systemctl daemon-reload
+
+# start and enable service
+systemctl start gnunet-ascension
+systemctl enable gnunet-ascension
+
+exit 0
+#DEBHELPER#
diff --git a/helpers/python3-ascension.prerm b/helpers/python3-ascension.prerm
new file mode 100644
index 0000000..e0dce86
--- /dev/null
+++ b/helpers/python3-ascension.prerm
@@ -0,0 +1,22 @@
+#!/bin/sh
+# prerm script for ascension-bind
+#
+# see: dh_installdeb(1)
+# load debconf library
+set -e
+
+mkdir -p /etc/ascension.d/
+
+# remove systemd stuff
+systemctl disable gnunet-ascension
+systemctl stop gnunet-ascension
+
+# remove the systemd files
+unlink /lib/systemd/system/gnunet-ascension.service
+rm /etc/ascension.d/gnunet-ascension.service
+
+# link the systemd unit file
+systemctl daemon-reload
+
+exit 0
+#DEBHELPER#
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [ascension] branch master updated (7e1e8df -> 5dc85dc),
gnunet <=
- [GNUnet-SVN] [ascension] 01/09: fixed a double implemented issue, gnunet, 2019/05/10
- [GNUnet-SVN] [ascension] 03/09: fixed exception not catching all, gnunet, 2019/05/10
- [GNUnet-SVN] [ascension] 02/09: updated config file for ascension-bind, gnunet, 2019/05/10
- [GNUnet-SVN] [ascension] 07/09: fixed up gitlabci, gnunet, 2019/05/10
- [GNUnet-SVN] [ascension] 09/09: updated gitlabci to include correct postinst and prerm files, gnunet, 2019/05/10
- [GNUnet-SVN] [ascension] 04/09: bugfixes, improved config file, gnunet, 2019/05/10
- [GNUnet-SVN] [ascension] 06/09: first working version of ascension-bind, gnunet, 2019/05/10
- [GNUnet-SVN] [ascension] 08/09: make linter and lintian happier, fixed logic errors, gnunet, 2019/05/10
- [GNUnet-SVN] [ascension] 05/09: ascension dry-run fixes, packaging, ascension-bind, gnunet, 2019/05/10