Hello community, here is the log from the commit of package hplip for openSUSE:Factory checked in at 2020-01-23 16:10:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hplip (Old) and /work/SRC/openSUSE:Factory/.hplip.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hplip" Thu Jan 23 16:10:02 2020 rev:130 rq:765845 version:3.19.12 Changes: -------- --- /work/SRC/openSUSE:Factory/hplip/hplip.changes 2020-01-12 23:19:28.206707083 +0100 +++ /work/SRC/openSUSE:Factory/.hplip.new.26092/hplip.changes 2020-01-23 16:10:44.691629824 +0100 @@ -1,0 +2,14 @@ +Mon Jan 13 22:01:08 UTC 2020 - Martin Wilck <[email protected]> + +- Use /etc/sane.d/dll.d/hpaio to register SANE backend rather + than modifying /etc/sane/dll.conf +- SANE backend must be configured in hplip-sane package (bsc#1160708) + +------------------------------------------------------------------- +Mon Jan 13 17:27:20 UTC 2020 - Martin Wilck <[email protected]> + +- Revert changes from 3.18.5 that break hp-setup for fax devices + (bsc#1107711, lp#1773320) + * Added patch: Revert-changes-from-3.18.5-that-break-hp-setup-for-f.patch + +------------------------------------------------------------------- New: ---- Revert-changes-from-3.18.5-that-break-hp-setup-for-f.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hplip.spec ++++++ --- /var/tmp/diff_new_pack.YhWSLR/_old 2020-01-23 16:10:46.399630836 +0100 +++ /var/tmp/diff_new_pack.YhWSLR/_new 2020-01-23 16:10:46.403630839 +0100 @@ -81,6 +81,8 @@ # Use a pgp server (pool.sks-keyservers.net) which doesn't throw proxy errors # or run into timeouts most of the time Patch402: hplip-change-pgp-server.patch +# boo#1107711 +Patch403: Revert-changes-from-3.18.5-that-break-hp-setup-for-f.patch BuildRequires: %{pymod devel} BuildRequires: %{pymod qt5-devel} BuildRequires: %{pymod xml} @@ -314,6 +316,7 @@ %patch400 -p1 %patch401 -p1 %patch402 -p1 +%patch403 -p1 # replace "env" shebang and "/usr/bin/python" with real executable find . -name '*.py' -o -name pstotiff | \ @@ -447,6 +450,8 @@ # Remove the installed /etc/sane.d/dll.conf # because this is provided by the sane-backends package: rm %{buildroot}%{_sysconfdir}/sane.d/dll.conf +mkdir %{buildroot}%{_sysconfdir}/sane.d/dll.d +echo hpaio >%{buildroot}%{_sysconfdir}/sane.d/dll.d/hpaio # Remove the installed HAL fdi file because HAL is no longer used (HAL is deprecated): rm %{buildroot}%{_datadir}/hal/fdi/preprobe/10osvendor/20-hplip-devices.fdi # Remove the installed [email protected] file for systemd @@ -578,38 +583,18 @@ /sbin/ldconfig exit 0 -%triggerin -p /bin/bash -- sane-backends -# As hplip can be used for plain printers it cannot "PreReq sane-backends". -# Therefore if sane-backends is installed it may be installed or updated after hplip. -# In this case trigger to add the SANE backend "hpaio" to /etc/sane.d/dll.conf if it is not there. -# To be safe there is a test that /etc/sane.d/dll.conf is writable. -if [ -w %{_sysconfdir}/sane.d/dll.conf ] -then if ! grep -q 'hpaio' %{_sysconfdir}/sane.d/dll.conf - then echo -e '# The hpaio backend is provided by the hplip package:\n#hpaio' >>%{_sysconfdir}/sane.d/dll.conf - fi -fi -exit 0 - %postun -p /bin/bash %desktop_database_postun %icon_theme_cache_postun /sbin/ldconfig + +%postun sane +# Earlier versions of hplip modified /etc/sane.d/dll.conf +# Now we use /etc/sane.d/dll.d (multiple hpaio entries don't hurt). # If the package was removed (but not if it was updated) # then remove the hpaio lines in /etc/sane.d/dll.conf. -# Don't remove them when the hplip package was automatically -# replaced by the hplip17 package (via RPM obsoletes) or vice versa. -# Because postun of the old package runs last (after triggerin -- sane-backends) -# it is done via a special "ls" test if any libsane-hpaio.so exists -# (e.g. there could be only 32-bit installed on 64-bit hardware). -# If the "ls" test does not fail, some kind of HPLIP is installed. -# The package sane-backends may not be installed (see triggerin) -# and therefore the test that /etc/sane.d/dll.conf is writable. -# The "exit 0" is necessary, otherwise the postun script -# would exit with non-zero exit-code if the package was not removed. -if [ "$1" = "0" ] -then if ! ls %{_prefix}/lib*/sane/libsane-hpaio.so* &>/dev/null - then [ -w %{_sysconfdir}/sane.d/dll.conf ] && sed -i -e '/hpaio/d' %{_sysconfdir}/sane.d/dll.conf - fi +if [ "$1" = "0" ] && [ -w %{_sysconfdir}/sane.d/dll.conf ]; then + sed -i -e '/hpaio/d' %{_sysconfdir}/sane.d/dll.conf fi exit 0 @@ -740,6 +725,9 @@ %files sane %dir %{_libdir}/sane %{_libdir}/sane/libsane-hpaio.so.* +%dir %{_sysconfdir}/sane.d +%dir %{_sysconfdir}/sane.d/dll.d +%{_sysconfdir}/sane.d/dll.d/hpaio %files devel %{_libdir}/libhpip.so ++++++ Revert-changes-from-3.18.5-that-break-hp-setup-for-f.patch ++++++ >From af8ddd502a88f8dc0910c2c9a91471be8434af61 Mon Sep 17 00:00:00 2001 From: Martin Wilck <[email protected]> Date: Mon, 13 Jan 2020 18:20:22 +0100 Subject: [PATCH] Revert changes from 3.18.5 that break hp-setup for fax devices See bsc#1107711, lp#1773320 https://launchpadlibrarian.net/371794274/hplip-use-binary-str.patch Credits: Eric Schirra <[email protected]> --- base/utils.py | 5 +---- fax/pmlfax.py | 8 ++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/base/utils.py b/base/utils.py index f268cf8..cc77820 100644 --- a/base/utils.py +++ b/base/utils.py @@ -954,10 +954,7 @@ else: def printable(s): - if s: - return s.translate(identity, unprintable) - else: - return "" + return s.translate(identity, unprintable) def any(S,f=lambda x:x): diff --git a/fax/pmlfax.py b/fax/pmlfax.py index adcc1cb..b68ff6a 100644 --- a/fax/pmlfax.py +++ b/fax/pmlfax.py @@ -143,8 +143,8 @@ class PMLFaxDevice(FaxDevice): def getPhoneNum(self): if PY3: - data = utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1]) - return data + data = utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1].encode('utf-8')) + return data.decode('utf-8') else: return utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1]) phone_num = property(getPhoneNum, setPhoneNum, doc="OID_FAX_LOCAL_PHONE_NUM") @@ -155,8 +155,8 @@ class PMLFaxDevice(FaxDevice): def getStationName(self): if PY3: - data = utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1]) - return data + data = utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1].encode('utf-8')) + return data.decode('utf-8') else: return utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1]) -- 2.24.1
