Files
hplip/hplip-fix-python-crash-in-avahi.py.patch
Johannes Meixner 497ec9ee78 - Move more utilities from hplip-utils to hplip-base.
* hplip-base now contains all utilities that are not totally useless
    and can run without the Qt GUI.

- Update fix for support of new GPG key, as the key has now been
  uploaded to GPG keyservers (lp#2120738)
  * drop hplip-hardcode-new-signing-key-AC69536A2CF3A243.patch
  * update hplip-change-pgp-server.patch

- Drop dependency on cups-ppdc. It isn't necessary, as PPD
  generation on target system is done by cups-driverd.

- The old and outdated 'hpijs' driver support is finally dropped
  (the 'hpcups' driver is the default driver since 2009)
  so that there is no need for foomatic-filters (boo#1250481)

- Continue refactoring:
  * move GUI tools to "hplip-utils" subpackage
  * convert "hplip" into an empty metapackage that pulls in hplip-utils 
    and all drivers / PPDs (except hpijs PPDs).

- Refactor package structure:
  * hplip: full set of utilities. Pulls in almost all subpackages
    to deliver the "traditional" hplip experience
  * hplip-base: small set of basic utilities that can be run
    without GUI. Includes hp-probe and hp-plugin
  * hplip-cups: minimal package for printing, without PPDs or
    setup helpers
  * hplip-sane: scanning support (unchanged) 
  * hplip-driver-hpcups: hpcups.drv for generating hpcups PPDs on
    the fly (requires ppdc). The functionality of this package is
    similar to the old (misnamed) "hplip-hpijs" package.
  * hplip-driver-hpijs: hpijs.drv for generating PPDs for the deprecated
    hpijs / foomatic_rip filter. Note that this functionality was not part of
    the late hplip-hpijs package, because upstream hasn't ship foomatic PPDs
    since hplip 3.17.11.
  * hplip-ppds-{hpcups,hpps,postscript,hpijs,fax,plugin}: static PPD
    files for different printer types.
    hplip-ppds-hpcups is an alternative to hplip-driver-hpcups.
  * libhplip0: shared library package, used by hplip-cups and
    hplip-sane
  * hplip-common: configuration files and directories used by
    all hplip packages.
- Other spec file changes:
  * Skip deprecated suse_update_desktop_file by default on TW
  * Don't mess with sane configuration in udev rules
  * Only the hpijs packages depend on foomatic-rip, which is only
    provided by cups-filters-1.x. The other packages can be used
    with cups-filters2.
  * Remove Obsoletes: for ancient predecessor packages
  * Remove outdated comments from spec file
  * Shorten package descriptions
  * Fix a couple of rpmlint issues
    
- Fix printer probing using avahi (lp#2120947)
  * Add hplip-fix-driver-probing-using-avahi.patch
  * Add hplip-fix-python-crash-in-avahi.py.patch

OBS-URL: https://build.opensuse.org/package/show/Printing/hplip?expand=0&rev=275
2025-10-09 08:17:23 +00:00

29 lines
1.0 KiB
Diff

From 5bdb75b1b3397abd58a69aba18c6aacf8d70df77 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Tue, 19 Aug 2025 23:38:24 +0200
Subject: [PATCH] hplip: fix python crash in avahi.py
The avahi search method may crash on MDNS records that have
an empty "details" field (field 9). This can happen e.g. for
existing shared local printers advertized by cups.
---
base/avahi.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/base/avahi.py b/base/avahi.py
index b82a089..f168585 100755
--- a/base/avahi.py
+++ b/base/avahi.py
@@ -43,7 +43,7 @@ def detectNetworkDevices(ttl=4, timeout=10):
for line in output.splitlines():
if line.startswith('='):
bits = line.split(';')
- if bits[2] == 'IPv4' and len(bits[7].split('.')) == 4:
+ if bits[2] == 'IPv4' and len(bits[7].split('.')) == 4 and bits[9] != "":
ip = bits[7]
port = bits[8]
# Run through the offered addresses and see if we have a bound local
--
2.50.1