2148210 - hplip: pcardext Python extension broken
stop shipping hp-unload, since it depends on pcardext
This commit is contained in:
parent
bbb19dff5e
commit
a3d30bea25
@ -1,13 +1,5 @@
|
|||||||
scan/sane/orblite: Include <dflcn.h> for function prototypes
|
|
||||||
|
|
||||||
This is required for C99 compatibility. Also delete the unused
|
|
||||||
bb_unload function because it calls a call to the undefined
|
|
||||||
_DBG function/macro.
|
|
||||||
|
|
||||||
Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
|
||||||
|
|
||||||
diff --git a/scan/sane/orblite.c b/scan/sane/orblite.c
|
diff --git a/scan/sane/orblite.c b/scan/sane/orblite.c
|
||||||
index ba86640c7528fc9c..ac59dda9c2dba593 100644
|
index ba86640..2eb7aba 100644
|
||||||
--- a/scan/sane/orblite.c
|
--- a/scan/sane/orblite.c
|
||||||
+++ b/scan/sane/orblite.c
|
+++ b/scan/sane/orblite.c
|
||||||
@@ -20,6 +20,7 @@
|
@@ -20,6 +20,7 @@
|
||||||
@ -18,31 +10,12 @@ index ba86640c7528fc9c..ac59dda9c2dba593 100644
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
|
|
||||||
@@ -193,27 +194,6 @@ bugout:
|
@@ -195,7 +196,7 @@ bugout:
|
||||||
|
|
||||||
}
|
static int bb_unload(SANE_THandle ps)
|
||||||
|
|
||||||
-static int bb_unload(SANE_THandle ps)
|
|
||||||
-{
|
|
||||||
- _DBG("Calling orblite bb_unload: \n");
|
|
||||||
- if (ps->bb_handle)
|
|
||||||
- {
|
|
||||||
- dlclose(ps->bb_handle);
|
|
||||||
- ps->bb_handle = NULL;
|
|
||||||
- }
|
|
||||||
- if (ps->hpmud_handle)
|
|
||||||
- {
|
|
||||||
- dlclose(ps->hpmud_handle);
|
|
||||||
- ps->hpmud_handle = NULL;
|
|
||||||
- }
|
|
||||||
-// if (ps->math_handle)
|
|
||||||
-// {
|
|
||||||
-// dlclose(ps->math_handle);
|
|
||||||
-// ps->math_handle = NULL;
|
|
||||||
-// }
|
|
||||||
- return 0;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
SANE_Status
|
|
||||||
orblite_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
|
|
||||||
{
|
{
|
||||||
|
- _DBG("Calling orblite bb_unload: \n");
|
||||||
|
+ DBG("Calling orblite bb_unload: \n");
|
||||||
|
if (ps->bb_handle)
|
||||||
|
{
|
||||||
|
dlclose(ps->bb_handle);
|
||||||
|
@ -1,20 +1,16 @@
|
|||||||
Kludge to support building C99 mode. This should no longer be needed
|
Switch the whole libsane-hpaio to get proper definition of strcasestr() used in
|
||||||
once glibc declares strcasestr by default, and not just with
|
sclpml.c
|
||||||
-D_GNU_SOURCE.
|
|
||||||
|
|
||||||
Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
diff --git a/Makefile.am b/Makefile.am
|
||||||
|
index 15d953a..7105f74 100644
|
||||||
diff --git a/scan/sane/sclpml.c b/scan/sane/sclpml.c
|
--- a/Makefile.am
|
||||||
index dc8b32ce02ad1202..f2cacd53e86800ce 100644
|
+++ b/Makefile.am
|
||||||
--- a/scan/sane/sclpml.c
|
@@ -73,7 +73,7 @@ endif
|
||||||
+++ b/scan/sane/sclpml.c
|
# The following is a interlibrary dependency that must be compiled first.
|
||||||
@@ -47,6 +47,9 @@
|
libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la libhpipp.la $(DBUS_LIBS) -lcups -ldl
|
||||||
#define DEBUG_DECLARE_ONLY
|
#libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
|
||||||
#include "sanei_debug.h"
|
-libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) -Iprotocol
|
||||||
|
+libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) -Iprotocol -D_GNU_SOURCE
|
||||||
|
|
||||||
+/* This file is not built with _GNU_SOURCE. */
|
if NETWORK_BUILD
|
||||||
+char *strcasestr(const char *, const char *);
|
libsane_hpaio_la_LIBADD += libhpdiscovery.la
|
||||||
+
|
|
||||||
//# define SCLPML_DEBUG
|
|
||||||
# ifdef SCLPML_DEBUG
|
|
||||||
# define _DBG(args...) syslog(LOG_INFO, __FILE__ " " STRINGIZE(__LINE__) ": " args)
|
|
||||||
|
110
hplip.spec
110
hplip.spec
@ -7,7 +7,7 @@
|
|||||||
Summary: HP Linux Imaging and Printing Project
|
Summary: HP Linux Imaging and Printing Project
|
||||||
Name: hplip
|
Name: hplip
|
||||||
Version: 3.22.10
|
Version: 3.22.10
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC
|
License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC
|
||||||
|
|
||||||
Url: https://developers.hp.com/hp-linux-imaging-and-printing
|
Url: https://developers.hp.com/hp-linux-imaging-and-printing
|
||||||
@ -197,19 +197,33 @@ Patch59: hplip-no-libhpmud-libm-warnings.patch
|
|||||||
# reported as https://bugs.launchpad.net/hplip/+bug/1982185
|
# reported as https://bugs.launchpad.net/hplip/+bug/1982185
|
||||||
Patch60: hplip-snprintf-format.patch
|
Patch60: hplip-snprintf-format.patch
|
||||||
Patch61: hplip-plugin-script.patch
|
Patch61: hplip-plugin-script.patch
|
||||||
|
# C99 compatibility fixes by fweimer - use explicit int
|
||||||
|
# Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||||
|
Patch62: hplip-pserror-c99.patch
|
||||||
|
# C99 compatibility patch by fweimer - several undefined functions in hpaio
|
||||||
|
# backend are declared in orblite.h
|
||||||
|
# Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||||
|
Patch63: hplip-scan-hpaio-include.patch
|
||||||
|
# C99 compatibility patch by fweimer - undefined _DBG() and dynamic linking funcs in orblite.c
|
||||||
|
# - _DBG() looks like typo and new header is added for funcs
|
||||||
|
# Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||||
|
Patch64: hplip-scan-orblite-c99.patch
|
||||||
|
# C99 compatibility patch by fweimer:
|
||||||
|
# PyString_AsStringAndSize is removed in Python3, remove its compilation for now
|
||||||
|
# in case there is a request for compiling it again, there is a possible solution
|
||||||
|
# for the function py3 alternative https://opendev.org/openstack/pyeclib/commit/19c8313986
|
||||||
|
# - disabling removes hp-unload and /usr/share/hplip/pcard as well
|
||||||
|
# Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||||
|
Patch65: hplip-pcardext-disable.patch
|
||||||
|
# undefined strcasestr() in sclpml.c - build with _GNU_SOURCE
|
||||||
|
# Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||||
|
Patch66: hplip-sclpml-strcasestr.patch
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} <= 8
|
%if 0%{?fedora} || 0%{?rhel} <= 8
|
||||||
# mention hplip-gui if you want to have GUI
|
# mention hplip-gui if you want to have GUI
|
||||||
Patch1000: hplip-fedora-gui.patch
|
Patch1000: hplip-fedora-gui.patch
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# C99 compatibility fixes.
|
|
||||||
# Submitted uostream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
|
||||||
Patch1001: hplip-pserror-c99.patch
|
|
||||||
Patch1002: hplip-scan-hpaio-include.patch
|
|
||||||
Patch1003: hplip-scan-orblite-c99.patch
|
|
||||||
Patch1004: hplip-pcardext-disable.patch
|
|
||||||
Patch1005: hplip-sclpml-strcasestr.patch
|
|
||||||
|
|
||||||
# uses automatic creation of configure
|
# uses automatic creation of configure
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -526,17 +540,29 @@ done
|
|||||||
# hplip 3.22.6 doesn't use proper arguments for snprintf
|
# hplip 3.22.6 doesn't use proper arguments for snprintf
|
||||||
%patch60 -p1 -b .snprintf-format
|
%patch60 -p1 -b .snprintf-format
|
||||||
%patch61 -p1 -b .plugin-patch
|
%patch61 -p1 -b .plugin-patch
|
||||||
|
# C99 compatibility fixes by fweimer - use explicit int
|
||||||
|
# Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||||
|
%patch62 -p1 -b .pserror-int
|
||||||
|
# C99 compatibility patch by fweimer - several undefined functions in hpaio
|
||||||
|
# backend are declared in orblite.h
|
||||||
|
# Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||||
|
%patch63 -p1 -b .hpaio-orblite-defs
|
||||||
|
# C99 compatibility patch by fweimer - undefined _DBG() and dynamic linking funcs in orblite.c
|
||||||
|
# - _DBG() looks like typo and new header is added for funcs
|
||||||
|
# Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||||
|
%patch64 -p1 -b .orblite-undefs
|
||||||
|
# C99 compatibility patch by fweimer - python2 PyString_AsStringAndSize in python3 code
|
||||||
|
# gives undefined reference - removed for now with dependent hp-unload
|
||||||
|
%patch65 -p1 -b .pcardext-disable
|
||||||
|
# C99 compatibility patch by fweimer - undefined strcasestr() in sclpml.c - build with _GNU_SOURCE
|
||||||
|
%patch66 -p1 -b .sclpml-strcasestr
|
||||||
|
|
||||||
|
# Fedora specific patches now, don't put a generic patches under it
|
||||||
%if 0%{?fedora} || 0%{?rhel} <= 8
|
%if 0%{?fedora} || 0%{?rhel} <= 8
|
||||||
# mention hplip-gui should be installed if you want GUI
|
# mention hplip-gui should be installed if you want GUI
|
||||||
%patch1000 -p1 -b .fedora-gui
|
%patch1000 -p1 -b .fedora-gui
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%patch1001 -p1
|
|
||||||
%patch1002 -p1
|
|
||||||
%patch1003 -p1
|
|
||||||
%patch1004 -p1
|
|
||||||
%patch1005 -p1
|
|
||||||
|
|
||||||
sed -i.duplex-constraints \
|
sed -i.duplex-constraints \
|
||||||
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
|
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
|
||||||
@ -604,8 +630,9 @@ rm -rf %{buildroot}%{_sysconfdir}/sane.d \
|
|||||||
%{buildroot}%{_docdir} \
|
%{buildroot}%{_docdir} \
|
||||||
%{buildroot}%{_datadir}/hal/fdi \
|
%{buildroot}%{_datadir}/hal/fdi \
|
||||||
%{buildroot}%{_datadir}/hplip/pkservice.py \
|
%{buildroot}%{_datadir}/hplip/pkservice.py \
|
||||||
%{buildroot}%{_bindir}/hp-pkservice \
|
%{buildroot}%{_bindir}/hp-pkservice
|
||||||
%{buildroot}%{_datadir}/hplip/locatedriver* \
|
|
||||||
|
rm -rf %{buildroot}%{_datadir}/hplip/locatedriver* \
|
||||||
%{buildroot}%{_datadir}/hplip/dat2drv*
|
%{buildroot}%{_datadir}/hplip/dat2drv*
|
||||||
|
|
||||||
rm -f %{buildroot}%{_bindir}/hp-logcapture \
|
rm -f %{buildroot}%{_bindir}/hp-logcapture \
|
||||||
@ -628,7 +655,32 @@ rm -f %{buildroot}%{_bindir}/foomatic-rip \
|
|||||||
%{buildroot}%{_datadir}/applications/hplip.desktop \
|
%{buildroot}%{_datadir}/applications/hplip.desktop \
|
||||||
%{buildroot}%{_datadir}/ppd/HP/*.ppd
|
%{buildroot}%{_datadir}/ppd/HP/*.ppd
|
||||||
|
|
||||||
install -p -m755 hp-plugin %{buildroot}%{_bindir}/hp-plugin-download
|
rm -f %{buildroot}%{_datadir}/hplip/hpaio.desc
|
||||||
|
|
||||||
|
rm -rf %{buildroot}%{_datadir}/hplip/install.* \
|
||||||
|
%{buildroot}%{_datadir}/hplip/uninstall.* \
|
||||||
|
%{buildroot}%{_bindir}/hp-uninstall \
|
||||||
|
%{buildroot}%{_datadir}/hplip/upgrade.* \
|
||||||
|
%{buildroot}%{_bindir}/hp-upgrade \
|
||||||
|
%{buildroot}%{_datadir}/hplip/hplip-install
|
||||||
|
|
||||||
|
rm -f %{buildroot}%{_datadir}/hplip/hpijs.drv.in.template
|
||||||
|
|
||||||
|
rm -f %{buildroot}%{_datadir}/cups/mime/pstotiff.types \
|
||||||
|
%{buildroot}%{_datadir}/hplip/fax/pstotiff*
|
||||||
|
|
||||||
|
rm -f %{buildroot}%{_datadir}/hplip/hplip-install
|
||||||
|
|
||||||
|
rm -f %{buildroot}%{_unitdir}/hplip-printer@.service
|
||||||
|
|
||||||
|
rm -f %{buildroot}%{_datadir}/ipp-usb/quirks/HPLIP.conf
|
||||||
|
|
||||||
|
rm -rf %{buildroot}%{_bindir}/hp-unload \
|
||||||
|
%{buildroot}%{_datadir}/%{name}/pcard
|
||||||
|
|
||||||
|
# The systray applet doesn't work properly (displays icon as a
|
||||||
|
# window), so don't ship the launcher yet.
|
||||||
|
rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
||||||
|
|
||||||
%if 0%{?rhel} > 8
|
%if 0%{?rhel} > 8
|
||||||
rm -rf %{buildroot}%{_bindir}/hp-check \
|
rm -rf %{buildroot}%{_bindir}/hp-check \
|
||||||
@ -668,6 +720,8 @@ rm -rf %{buildroot}%{_bindir}/hp-check \
|
|||||||
doc/hpscan.html
|
doc/hpscan.html
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
install -p -m755 hp-plugin %{buildroot}%{_bindir}/hp-plugin-download
|
||||||
|
|
||||||
%if 0%{?rhel} <= 8 || 0%{?fedora}
|
%if 0%{?rhel} <= 8 || 0%{?fedora}
|
||||||
mkdir -p %{buildroot}%{_datadir}/metainfo
|
mkdir -p %{buildroot}%{_datadir}/metainfo
|
||||||
cp %{SOURCE3} %{buildroot}%{_datadir}/metainfo/
|
cp %{SOURCE3} %{buildroot}%{_datadir}/metainfo/
|
||||||
@ -721,24 +775,6 @@ find doc/images -type f -exec chmod 644 {} \;
|
|||||||
# SELinux file context (bug #564551).
|
# SELinux file context (bug #564551).
|
||||||
%{__mkdir_p} %{buildroot}%{_datadir}/hplip/prnt/plugins
|
%{__mkdir_p} %{buildroot}%{_datadir}/hplip/prnt/plugins
|
||||||
|
|
||||||
# Remove files we don't want to package.
|
|
||||||
rm -f %{buildroot}%{_datadir}/hplip/hpaio.desc
|
|
||||||
rm -f %{buildroot}%{_datadir}/hplip/hplip-install
|
|
||||||
rm -rf %{buildroot}%{_datadir}/hplip/install.*
|
|
||||||
rm -f %{buildroot}%{_datadir}/hplip/uninstall.*
|
|
||||||
rm -f %{buildroot}%{_bindir}/hp-uninstall
|
|
||||||
rm -f %{buildroot}%{_datadir}/hplip/upgrade.*
|
|
||||||
rm -f %{buildroot}%{_bindir}/hp-upgrade
|
|
||||||
rm -f %{buildroot}%{_datadir}/hplip/hpijs.drv.in.template
|
|
||||||
rm -f %{buildroot}%{_datadir}/cups/mime/pstotiff.types
|
|
||||||
rm -f %{buildroot}%{_datadir}/hplip/fax/pstotiff*
|
|
||||||
rm -f %{buildroot}%{_unitdir}/hplip-printer@.service
|
|
||||||
rm -f %{buildroot}%{_datadir}/ipp-usb/quirks/HPLIP.conf
|
|
||||||
|
|
||||||
# The systray applet doesn't work properly (displays icon as a
|
|
||||||
# window), so don't ship the launcher yet.
|
|
||||||
rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# timeout is to prevent possible freeze during update
|
# timeout is to prevent possible freeze during update
|
||||||
%{_bindir}/timeout 10m -k 15m %{_bindir}/hpcups-update-ppds &>/dev/null ||:
|
%{_bindir}/timeout 10m -k 15m %{_bindir}/hpcups-update-ppds &>/dev/null ||:
|
||||||
@ -773,7 +809,6 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|||||||
%{_bindir}/hp-setup
|
%{_bindir}/hp-setup
|
||||||
%{_bindir}/hp-testpage
|
%{_bindir}/hp-testpage
|
||||||
%{_bindir}/hp-timedate
|
%{_bindir}/hp-timedate
|
||||||
%{_bindir}/hp-unload
|
|
||||||
%{_cups_serverbin}/backend/hp
|
%{_cups_serverbin}/backend/hp
|
||||||
%{_cups_serverbin}/backend/hpfax
|
%{_cups_serverbin}/backend/hpfax
|
||||||
# ex-hpijs
|
# ex-hpijs
|
||||||
@ -820,7 +855,6 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|||||||
%{_datadir}/hplip/data/pcl
|
%{_datadir}/hplip/data/pcl
|
||||||
%{_datadir}/hplip/data/ps
|
%{_datadir}/hplip/data/ps
|
||||||
%{_datadir}/hplip/installer
|
%{_datadir}/hplip/installer
|
||||||
%{_datadir}/hplip/pcard
|
|
||||||
%{_datadir}/hplip/prnt
|
%{_datadir}/hplip/prnt
|
||||||
%if 0%{?rhel} <= 8 || 0%{?fedora}
|
%if 0%{?rhel} <= 8 || 0%{?fedora}
|
||||||
%{_datadir}/hplip/scan
|
%{_datadir}/hplip/scan
|
||||||
@ -893,6 +927,10 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|||||||
%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
|
%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Dec 01 2022 Zdenek Dohnal <zdohnal@redhat.com> - 3.22.10-3
|
||||||
|
- 2148210 - hplip: pcardext Python extension broken
|
||||||
|
- stop shipping hp-unload, since it depends on pcardext
|
||||||
|
|
||||||
* Thu Nov 24 2022 Florian Weimer <fweimer@redhat.com> - 3.22.10-2
|
* Thu Nov 24 2022 Florian Weimer <fweimer@redhat.com> - 3.22.10-2
|
||||||
- C99 compatibility fixes
|
- C99 compatibility fixes
|
||||||
- Stop building the pcardext Python extension because it unusable (#2148210)
|
- Stop building the pcardext Python extension because it unusable (#2148210)
|
||||||
|
Loading…
Reference in New Issue
Block a user