Control: tags 947567 + pending Dear maintainer,
I've prepared an NMU for libnxt (versioned as 0.3-9.1) and uploaded it to DELAYED/14. Please feel free to tell me if I should cancel it. cu Adrian
diff -Nru libnxt-0.3/debian/changelog libnxt-0.3/debian/changelog --- libnxt-0.3/debian/changelog 2017-08-01 11:05:24.000000000 +0300 +++ libnxt-0.3/debian/changelog 2020-02-12 12:29:51.000000000 +0200 @@ -1,3 +1,11 @@ +libnxt (0.3-9.1) unstable; urgency=low + + * Non-maintainer upload. + * Add patch from Hugh McMaster fixing building with Python 3 SCons. + (Closes: #947567) + + -- Adrian Bunk <b...@debian.org> Wed, 12 Feb 2020 12:29:51 +0200 + libnxt (0.3-9) unstable; urgency=medium * Correct content of d/compat to list level 9, not level 8. diff -Nru libnxt-0.3/debian/patches/python3.patch libnxt-0.3/debian/patches/python3.patch --- libnxt-0.3/debian/patches/python3.patch 1970-01-01 02:00:00.000000000 +0200 +++ libnxt-0.3/debian/patches/python3.patch 2020-02-12 12:28:45.000000000 +0200 @@ -0,0 +1,102 @@ +Description: Convert make_flash_header.py to Python 3 +Author: Hugh McMaster <hugh.mcmas...@outlook.com> +Bug-Debian: http://bugs.debian.org/947567 +Last-Update: 2020-01-12 + +--- a/make_flash_header.py ++++ b/make_flash_header.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Take the flash_routine.bin file, and embed it as an array of bytes + # in a flash_routine.h, ready for packaging with the C firmware +@@ -11,8 +11,8 @@ + import sys + import os + import os.path +-import urllib2 +-import sha ++import urllib.request, urllib.error, urllib.parse ++import hashlib + + FLASH_DIR = 'flash_write' + FLASH_BIN = 'flash.bin' +@@ -24,7 +24,7 @@ + def check_flash_size(): + statinfo = os.stat(FLASH_PATH) + if statinfo.st_size > 1024: +- print "The flash driver looks too big, refusing to embed." ++ print("The flash driver looks too big, refusing to embed.") + return False + return True + +@@ -35,7 +35,7 @@ + + # If the binary doesn't exist, offer to download a binary build + # from Google Code. +- print """ ++ print(""" + Embedded flash driver not found. This is required to build LibNXT. + + If you have an ARM7 cross-compiler toolchain available, you can build +@@ -46,21 +46,21 @@ + If you do not have a cross-compiler, do not despair! I can also + download a copy of the compiled driver (built by the libnxt developer) + from the project website and use that. +-""" +- reply = raw_input("Is that okay? (y/n) ") ++""") ++ reply = input("Is that okay? (y/n) ") + if reply not in ('y', 'Y', 'yes'): + print ("Okay, you're the boss. But that does mean I can't build " + "LibNXT. Sorry.") + return False +- f = urllib2.urlopen(DOWNLOAD_FLASH_URL) ++ f = urllib.request.urlopen(DOWNLOAD_FLASH_URL) + data = f.read() + f.close() + + # Verify the SHA-1 checksum +- checksum = sha.new(data).hexdigest() ++ checksum = hashlib.sha1(data).hexdigest() + if checksum != DOWNLOAD_FLASH_CHECKSUM: +- print "Oops, the flash binary I downloaded has the wrong checksum!" +- print "Aborting :(" ++ print("Oops, the flash binary I downloaded has the wrong checksum!") ++ print("Aborting :(") + return False + + f = open(FLASH_PATH, 'w') +@@ -78,11 +78,11 @@ + if not ensure_flash_bin(): + sys.exit(1) + +- f = file(FLASH_PATH) ++ f = open(FLASH_PATH, 'rb') + fwbin = f.read() + f.close() + +- data = ['0x%s' % c.encode('hex') for c in fwbin] ++ data = [f'0x{c:02x}' for c in fwbin] + + for i in range(0, len(data), 12): + data[i] = "\n " + data[i] +@@ -91,7 +91,7 @@ + len_data = "%d" % len(data) + + # Read in the template +- tplfile = file('flash_routine.h.base') ++ tplfile = open('flash_routine.h.base', 'rt') + template = tplfile.read() + tplfile.close() + +@@ -100,7 +100,7 @@ + template = template.replace('___FLASH_LEN___', len_data) + + # Output the done header +- out = file('flash_routine.h', 'w') ++ out = open('flash_routine.h', 'w') + out.write(template) + out.close() + diff -Nru libnxt-0.3/debian/patches/series libnxt-0.3/debian/patches/series --- libnxt-0.3/debian/patches/series 2016-10-07 09:03:59.000000000 +0300 +++ libnxt-0.3/debian/patches/series 2020-02-12 12:29:30.000000000 +0200 @@ -1,2 +1,3 @@ makefile_hardenning.patch fix_ftbfs_as_needed.patch +python3.patch