Package: squid-deb-proxy-client
Version: 0.8.15+nmu1
Severity: grave
Justification: breaks the client.
Control: tags -1 patch fixed-upstream

Dear Michael,

The client currently breaks with exmitting an error message to stdout:

error: uncaptured python exception, closing channel <AptAvahiClient> ('<SOME 
IPV6_ON_LAN>', 3142, 0, 0): 9223372036854775807 (<class 
'ConnectionRefusedError'>:[Errno 111] Connection refused 
[/usr/lib/python3.9/asyncore.py|read|83] 
[/usr/lib/python3.9/asyncore.py|handle_read_event|417] 
[/usr/lib/python3.9/asyncore.py|handle_connect_event|425])
error: uncaptured python exception, closing channel <AptAvahiClient> 
('<SAME_IPV6_ON_LAN>', 3142, 0, 0): 9223372036854775807 (<class 
'ConnectionRefusedError'>:[Errno 111] Connection refused 
[/usr/lib/python3.9/asyncore.py|read|83] 
[/usr/lib/python3.9/asyncore.py|handle_read_event|417] 
[/usr/lib/python3.9/asyncore.py|handle_connect_event|425])
error: uncaptured python exception, closing channel <AptAvahiClient> 
('<A_IPV4_IN_THE_LAN', 3142): 9223372036854775807 (<class 
'ConnectionRefusedError'>:[Errno 111] Connection refused 
[/usr/lib/python3.9/asyncore.py|read|83] 
[/usr/lib/python3.9/asyncore.py|handle_read_event|417] 
[/usr/lib/python3.9/asyncore.py|handle_connect_event|425])
error: uncaptured python exception, closing channel <AptAvahiClient> 
('A_IPV4_IN_THE_LAN', 3142): 9223372036854775807 (<class 
'ConnectionRefusedError'>:[Errno 111] Connection refused 
[/usr/lib/python3.9/asyncore.py|read|83] 
[/usr/lib/python3.9/asyncore.py|handle_read_event|417] 
[/usr/lib/python3.9/asyncore.py|handle_connect_event|425])
http://<IPV4_apnc_on_LAN:3142/

(Except the last result, no machine has a apt-cacher-ng running)

This is reported in Ubuntu as well,
https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670;

The fix upstream is 
https://github.com/mvo5/squid-deb-proxy/commit/604ba3f98beff25a8fd51783d3ffc4db5e987dab
(attaching for reference)

--
tobi

-- System Information:
Debian Release: 11.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-7-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages squid-deb-proxy-client depends on:
ii  apt          2.2.3
ii  avahi-utils  0.8-5
ii  python3      3.9.2-3

squid-deb-proxy-client recommends no packages.

squid-deb-proxy-client suggests no packages.

-- no debconf information
>From 604ba3f98beff25a8fd51783d3ffc4db5e987dab Mon Sep 17 00:00:00 2001
From: Michael Vogt <m...@ubuntu.com>
Date: Thu, 30 Sep 2021 10:06:00 +0200
Subject: [PATCH] apt-avahi-discover: use syslog for logging in AptAvahiClient

Patch from `jasonpe...@gmail.com` - thanks!

Fixes LP: #1505670
---
 apt-avahi-discover | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/apt-avahi-discover b/apt-avahi-discover
index dfd579b..11cc25a 100755
--- a/apt-avahi-discover
+++ b/apt-avahi-discover
@@ -10,6 +10,7 @@ import socket
 import sys
 import time
 from subprocess        import Popen, PIPE, call
+from syslog import syslog, LOG_INFO, LOG_USER
 
 DEFAULT_CONNECT_TIMEOUT_SEC = 2
 
@@ -58,6 +59,11 @@ class AptAvahiClient(asyncore.dispatcher):
     def __repr__(self):
         return "<{}> {}: {}".format(
             self.__class__.__name__, self.addr, self.time_to_connect)
+    def log(self, message):
+        syslog((LOG_INFO|LOG_USER), '%s\n' % str(message))
+    def log_info(self, message, type='info'):
+        if type not in self.ignore_log_types:
+            self.log('%s: %s' % (type, message))
 
 
 def is_ipv6(a):

Reply via email to