diff --git a/hplip-no-libhpmud-libm-warnings.patch b/hplip-no-libhpmud-libm-warnings.patch new file mode 100644 index 0000000..160b70e --- /dev/null +++ b/hplip-no-libhpmud-libm-warnings.patch @@ -0,0 +1,108 @@ +diff --git a/scan/sane/escl.c b/scan/sane/escl.c +index 9fbbcaf..bc9e0b5 100644 +--- a/scan/sane/escl.c ++++ b/scan/sane/escl.c +@@ -37,18 +37,12 @@ static int bb_load(struct escl_session *ps, const char *so) + int stat=1; + + /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */ +- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) +- { +- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) +- goto bugout; +- } ++ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) ++ goto bugout; + + /* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */ +- if ((ps->math_handle = load_library("libm.so")) == NULL) +- { +- if ((ps->math_handle = load_library("libm.so.6")) == NULL) +- goto bugout; +- } ++ if ((ps->math_handle = load_library("libm.so.6")) == NULL) ++ goto bugout; + if ((ps->bb_handle = load_plugin_library(UTILS_SCAN_PLUGIN_LIBRARY, so)) == NULL) + { + SendScanEvent(ps->uri, EVENT_PLUGIN_FAIL); +diff --git a/scan/sane/marvell.c b/scan/sane/marvell.c +index 236f7c9..793104c 100644 +--- a/scan/sane/marvell.c ++++ b/scan/sane/marvell.c +@@ -60,18 +60,12 @@ static int bb_load(struct marvell_session *ps, const char *so) + int stat=1; + + /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */ +- if ((ps->hpmud_handle = load_library("libhpmud.so")) == NULL) +- { +- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) +- goto bugout; +- } ++ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) ++ goto bugout; + + /* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */ +- if ((ps->math_handle = load_library("libm.so")) == NULL) +- { +- if ((ps->math_handle = load_library("libm.so.6")) == NULL) +- goto bugout; +- } ++ if ((ps->math_handle = load_library("libm.so.6")) == NULL) ++ goto bugout; + + if ((ps->bb_handle = load_plugin_library(UTILS_SCAN_PLUGIN_LIBRARY, so)) == NULL) + { +diff --git a/scan/sane/soap.c b/scan/sane/soap.c +index 0d22e52..dcd8c7c 100644 +--- a/scan/sane/soap.c ++++ b/scan/sane/soap.c +@@ -68,18 +68,12 @@ static int bb_load(struct soap_session *ps, const char *so) + int stat=1; + + /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */ +- if ((ps->hpmud_handle = load_library("libhpmud.so")) == NULL) +- { +- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) +- goto bugout; +- } ++ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) ++ goto bugout; + + /* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */ +- if ((ps->math_handle = load_library("libm.so")) == NULL) +- { +- if ((ps->math_handle = load_library("libm.so.6")) == NULL) +- goto bugout; +- } ++ if ((ps->math_handle = load_library("libm.so.6")) == NULL) ++ goto bugout; + + if ((ps->bb_handle = load_plugin_library(UTILS_SCAN_PLUGIN_LIBRARY, so)) == NULL) + { +diff --git a/scan/sane/soapht.c b/scan/sane/soapht.c +index 139100d..74e8391 100644 +--- a/scan/sane/soapht.c ++++ b/scan/sane/soapht.c +@@ -62,18 +62,12 @@ static int bb_load(struct soap_session *ps, const char *so) + int stat=1; + + /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */ +- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) +- { +- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) +- goto bugout; +- } ++ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL) ++ goto bugout; + + /* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */ +- if ((ps->math_handle = load_library("libm.so")) == NULL) +- { +- if ((ps->math_handle = load_library("libm.so.6")) == NULL) +- goto bugout; +- } ++ if ((ps->math_handle = load_library("libm.so.6")) == NULL) ++ goto bugout; + + if ((ps->bb_handle = load_plugin_library(UTILS_SCAN_PLUGIN_LIBRARY, so)) == NULL) + { diff --git a/hplip.spec b/hplip.spec index c94227a..57ed4ef 100644 --- a/hplip.spec +++ b/hplip.spec @@ -189,6 +189,15 @@ Patch58: hplip-gpgdir-perms.patch Patch59: hplip-plugin-udevissues.patch # reported upstream https://bugs.launchpad.net/hplip/+bug/1938504 Patch60: hplip-osname-mismatch.patch +# 2080235 - Misleading errors about missing shared libraries when scanning +# downstream patch to prevent errors: +# - when loading libhpmud.so - unversioned .so files belong into devel packages, +# but dlopen() in hplip was set to load the unversioned .so - so to remove rpmlint +# error (when libhpmud.so is in non-devel package) and prevent runtime dependency on -devel +# package (if libhpmud.so had been moved to -devel) the dlopen on unversioned .so file was +# removed +# - /lib64/libm.so is not symlink but ld script, which cannot be used in dlopen() +Patch61: hplip-no-libhpmud-libm-warnings.patch %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui if you want to have GUI @@ -503,6 +512,8 @@ done %patch59 -p1 -b .hpplugin-udevperms # upstream bug https://bugs.launchpad.net/hplip/+bug/1938504 %patch60 -p1 -b .osname-mismatch +# 2080235 - Misleading errors about missing shared libraries when scanning +%patch61 -p1 -b .no-libm-libhpmud-warn %if 0%{?fedora} || 0%{?rhel} <= 8 # mention hplip-gui should be installed if you want GUI @@ -858,6 +869,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Tue May 17 2022 Zdenek Dohnal - 3.22.4-1 +- 2080235 - Misleading errors about missing shared libraries when scanning + * Wed May 11 2022 Zdenek Dohnal - 3.22.4-1 - 2079740 - hplip-3.22.4 is available