Bug#944252: buster-pu: package standardskriver/0.0.3-2+deb10u1
Mike Gabriel
mike.gabriel at das-netzwerkteam.de
Wed Nov 6 18:11:01 GMT 2019
Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian.org at packages.debian.org
Usertags: pu
Dear Release Team,
today I stumbled over a flaw in the standardskriver package version in buster...
+ + Add 0002_standardskriver-Use-ip-command-rather-than-deprecate.patch.
+ Use external "ip" command rather than deprecated "ifconfig" command.
+ This fixes (essential) local system's IPv4 detection. (Closes: #944244).
This renders the standardskriver tool unusable. It relies on IPv4
detection for the local system to decide what default printer to set for
a logging in user.
+ + Add 0001_RawConfigParser-use-new-method-read_file-instead-of-.patch.
+ Fix deprecation warning by config.RawConfigParser.
A cosmetic deprecation fix that silence stderr when testing
standardskriver on the cmdline.
A fixed version (+deb10u1) has just been uploaded to the archive (targetting buster).
light+love
Mike
-- System Information:
Debian Release: 10.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.19.0-6-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-------------- next part --------------
diff -Nru standardskriver-0.0.3/debian/changelog standardskriver-0.0.3/debian/changelog
--- standardskriver-0.0.3/debian/changelog 2018-08-15 11:58:10.000000000 +0200
+++ standardskriver-0.0.3/debian/changelog 2019-11-06 19:00:58.000000000 +0100
@@ -1,3 +1,14 @@
+standardskriver (0.0.3-2+deb10u1) buster; urgency=medium
+
+ * debian/patches:
+ + Add 0001_RawConfigParser-use-new-method-read_file-instead-of-.patch.
+ Fix deprecation warning by config.RawConfigParser.
+ + Add 0002_standardskriver-Use-ip-command-rather-than-deprecate.patch.
+ Use external "ip" command rather than deprecated "ifconfig" command.
+ This fixes (essential) local system's IPv4 detection. (Closes: #944244).
+
+ -- Mike Gabriel <sunweaver at debian.org> Wed, 06 Nov 2019 19:00:58 +0100
+
standardskriver (0.0.3-2) unstable; urgency=medium
* debian/control:
diff -Nru standardskriver-0.0.3/debian/patches/0001_RawConfigParser-use-new-method-read_file-instead-of-.patch standardskriver-0.0.3/debian/patches/0001_RawConfigParser-use-new-method-read_file-instead-of-.patch
--- standardskriver-0.0.3/debian/patches/0001_RawConfigParser-use-new-method-read_file-instead-of-.patch 1970-01-01 01:00:00.000000000 +0100
+++ standardskriver-0.0.3/debian/patches/0001_RawConfigParser-use-new-method-read_file-instead-of-.patch 2019-11-06 18:56:40.000000000 +0100
@@ -0,0 +1,26 @@
+From e4aa5cc08f8d9c013d5d7f43c24cb9d4f95febcf Mon Sep 17 00:00:00 2001
+From: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+Date: Wed, 6 Nov 2019 16:44:50 +0100
+Subject: [PATCH 2/4] RawConfigParser: use new method read_file() instead of
+ deprectated readfp().
+
+---
+ standardskriver | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/standardskriver b/standardskriver
+index b778a9f..7c82f68 100755
+--- a/standardskriver
++++ b/standardskriver
+@@ -95,7 +95,7 @@ cfg.OPTCRE = re.compile(
+ # by any # space/tab
+ r'(?P<value>.*)$' # everything up to eol
+ )
+-cfg.readfp(open(CFG_FILE, 'r'))
++cfg.read_file(open(CFG_FILE, 'r'))
+
+ if cfg.get('settings', 'enable') != "yes":
+ sys.exit(0)
+--
+2.20.1
+
diff -Nru standardskriver-0.0.3/debian/patches/0002_standardskriver-Use-ip-command-rather-than-deprecate.patch standardskriver-0.0.3/debian/patches/0002_standardskriver-Use-ip-command-rather-than-deprecate.patch
--- standardskriver-0.0.3/debian/patches/0002_standardskriver-Use-ip-command-rather-than-deprecate.patch 1970-01-01 01:00:00.000000000 +0100
+++ standardskriver-0.0.3/debian/patches/0002_standardskriver-Use-ip-command-rather-than-deprecate.patch 2019-11-06 18:56:40.000000000 +0100
@@ -0,0 +1,34 @@
+From d1b0fa6b2ffa33263fb699a4aea6cc9f6cc8e1b9 Mon Sep 17 00:00:00 2001
+From: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+Date: Wed, 6 Nov 2019 16:45:22 +0100
+Subject: [PATCH 3/4] standardskriver: Use ip command (rather than deprecated
+ ifconfig) to obtain local IP addresses.
+
+---
+ standardskriver | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/standardskriver b/standardskriver
+index 7c82f68..230ce3b 100755
+--- a/standardskriver
++++ b/standardskriver
+@@ -109,13 +109,14 @@ hostnames = []
+ hostnames.append(gethostname())
+ hostnames.append(getfqdn())
+
+-re_ipaddr = re.compile(r'inet addr:(\S+)')
++re_ipaddr = re.compile(r'inet (\S+)/')
+ ipaddrs = []
+ try:
+ ipaddrs.append(os.environ['SSH_CLIENT'].split()[0])
+ except KeyError:
+ pass
+-p = subprocess.Popen(['/sbin/ifconfig'], env={'LANG': 'C'}, stdout=subprocess.PIPE)
++
++p = subprocess.Popen(['/usr/bin/ip', 'a'], env={'LANG': 'C'}, stdout=subprocess.PIPE)
+ for line in p.stdout:
+ m = re_ipaddr.search(line.decode())
+ if m:
+--
+2.20.1
+
diff -Nru standardskriver-0.0.3/debian/patches/series standardskriver-0.0.3/debian/patches/series
--- standardskriver-0.0.3/debian/patches/series 2018-08-15 11:57:52.000000000 +0200
+++ standardskriver-0.0.3/debian/patches/series 2019-11-06 18:57:54.000000000 +0100
@@ -1 +1,3 @@
1001_fix-typo-in-man-page.patch
+0001_RawConfigParser-use-new-method-read_file-instead-of-.patch
+0002_standardskriver-Use-ip-command-rather-than-deprecate.patch
More information about the Debian-edu-pkg-team
mailing list