aboutsummaryrefslogtreecommitdiff
path: root/print/hplip/files
diff options
context:
space:
mode:
Diffstat (limited to 'print/hplip/files')
-rw-r--r--print/hplip/files/patch-FindPPD.cpp11
-rw-r--r--print/hplip/files/patch-Makefile.in137
-rw-r--r--print/hplip/files/patch-base_g.py29
-rw-r--r--print/hplip/files/patch-base_os__utils.py11
-rw-r--r--print/hplip/files/patch-base_queues.py11
-rw-r--r--print/hplip/files/patch-base_utils.py17
-rw-r--r--print/hplip/files/patch-base_validation.py11
-rw-r--r--print/hplip/files/patch-check.py35
-rw-r--r--print/hplip/files/patch-common_utils.c11
-rw-r--r--print/hplip/files/patch-configure70
-rw-r--r--print/hplip/files/patch-doc_index.html11
-rw-r--r--print/hplip/files/patch-doc_troubleshooting.html46
-rw-r--r--print/hplip/files/patch-fax_backend_hpfax.py29
-rw-r--r--print/hplip/files/patch-fax_filters_pstotiff15
-rw-r--r--print/hplip/files/patch-hp-uiscan.desktop.in14
-rw-r--r--print/hplip/files/patch-hpdio.py11
-rw-r--r--print/hplip/files/patch-hplip-systray.desktop.in13
-rw-r--r--print/hplip/files/patch-hplip.desktop.in13
-rw-r--r--print/hplip/files/patch-installer_core__install.py11
-rw-r--r--print/hplip/files/patch-installer_dcheck.py4
-rw-r--r--print/hplip/files/patch-installer_pluginhandler.py56
-rw-r--r--print/hplip/files/patch-io_hpmud_musb.c6
-rw-r--r--print/hplip/files/patch-logcapture.py31
-rw-r--r--print/hplip/files/patch-prnt_backend_hp.c11
-rw-r--r--print/hplip/files/patch-prnt_cups.py88
-rw-r--r--print/hplip/files/patch-prnt_filters_hpps20
-rw-r--r--print/hplip/files/patch-prnt_hpcups_CommonDefinitions.h2
-rw-r--r--print/hplip/files/patch-prnt_hpcups_ErnieFilter.cpp2
-rw-r--r--print/hplip/files/patch-prnt_hpcups_HPCupsFilter.cpp74
-rw-r--r--print/hplip/files/patch-prnt_hpcups_SystemServices.cpp11
-rw-r--r--print/hplip/files/patch-prnt_hpcups_genJPEGStrips.cpp2
-rw-r--r--print/hplip/files/patch-prnt_hpijs_hpcupsfax.cpp20
-rw-r--r--print/hplip/files/patch-prnt_hpps_hppsfilter.c13
-rw-r--r--print/hplip/files/patch-protocol_discovery_mdns.c86
-rw-r--r--print/hplip/files/patch-scan_sane_OrbliteScan_BSDCommon.h63
-rw-r--r--print/hplip/files/patch-scan_sane_OrbliteScan_LinuxCommon.h13
-rw-r--r--print/hplip/files/patch-scan_sane_OrbliteScan_MacCommon.h19
-rw-r--r--print/hplip/files/patch-scan_sane_hpaio.c24
-rw-r--r--print/hplip/files/patch-scan_sane_io.c14
-rw-r--r--print/hplip/files/patch-scan_sane_orblite.c2
-rw-r--r--print/hplip/files/patch-ui5_devmgr5.py11
-rw-r--r--print/hplip/files/patch-ui5_scandialog.py23
42 files changed, 787 insertions, 314 deletions
diff --git a/print/hplip/files/patch-FindPPD.cpp b/print/hplip/files/patch-FindPPD.cpp
new file mode 100644
index 000000000000..a29981028c6c
--- /dev/null
+++ b/print/hplip/files/patch-FindPPD.cpp
@@ -0,0 +1,11 @@
+--- FindPPD.cpp.orig 2022-02-23 07:41:04 UTC
++++ FindPPD.cpp
+@@ -15,7 +15,7 @@ unsigned char CreateModelDict(MODEL_DICT_MAP &model_d
+
+ unsigned char family_ppd = 0;
+ fstream file_pointer;
+- file_pointer.open("/usr/share/hplip/data/models/models.dat", fstream::in);
++ file_pointer.open("/usr/local/share/hplip/data/models/models.dat", fstream::in);
+
+ if(!file_pointer)
+ {
diff --git a/print/hplip/files/patch-Makefile.in b/print/hplip/files/patch-Makefile.in
index 14e83588d86e..0cb028e2d783 100644
--- a/print/hplip/files/patch-Makefile.in
+++ b/print/hplip/files/patch-Makefile.in
@@ -1,78 +1,81 @@
---- Makefile.in.orig 2019-10-22 06:32:27 UTC
+--- Makefile.in.orig 2022-02-23 07:42:31 UTC
+++ Makefile.in
-@@ -103,7 +103,7 @@ DIST_COMMON = $(am__configure_deps) \
+@@ -96,8 +96,7 @@ DIST_COMMON = $(am__configure_deps) \
+ @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@LIBUSB01_BUILD_TRUE@am__append_5 = io/hpmud/musb_libusb01.c
+ @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@LIBUSB01_BUILD_TRUE@am__append_6 = -lusb
+ @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@LIBUSB01_BUILD_FALSE@am__append_7 = io/hpmud/musb.c
+-@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@LIBUSB01_BUILD_FALSE@am__append_8 = -I/usr/include/libusb-1.0
+-@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@LIBUSB01_BUILD_FALSE@am__append_9 = -lusb-1.0
++@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@LIBUSB01_BUILD_FALSE@am__append_9 = -lusb
+ @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@NETWORK_BUILD_TRUE@am__append_10 = -Iprotocol/discovery
+ @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@NETWORK_BUILD_TRUE@am__append_11 = -l$(SNMPLIB) -lcrypto
- # ip library
- @HPLIP_BUILD_TRUE@am__append_12 = libhpip.la
--@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_13 = prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so
-+@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_13 = prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template
- @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_14 = dat2drv.py install.py hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv
- @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@am__append_15 = scan/sane/hpaio.desc \
- @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ installer/text_install.py \
-@@ -377,6 +377,7 @@ am__libsane_hpaio_la_SOURCES_DIST = scan/sane/hpaio.c
- scan/sane/sclpml.h common/utils.c common/utils.h \
- scan/sane/escl.h scan/sane/escli.h scan/sane/escl.c \
- scan/sane/orblitei.h scan/sane/orblite.h scan/sane/orblite.c \
-+ scan/sane/OrbliteScan/BSDCommon.h \
- scan/sane/OrbliteScan/LinuxCommon.h \
- scan/sane/OrbliteScan/MacCommon.h
- @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@SCAN_BUILD_TRUE@am_libsane_hpaio_la_OBJECTS = libsane_hpaio_la-hpaio.lo \
-@@ -500,8 +501,7 @@ am__hpcups_SOURCES_DIST = prnt/hpcups/HPCupsFilter.cpp
- prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \
- prnt/hpcups/genPCLm.h common/utils.c common/utils.h \
- prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \
-- prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \
-- prnt/hpcups/ImageProcessor.h
-+ prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp
- @HPCUPS_INSTALL_TRUE@am_hpcups_OBJECTS = \
- @HPCUPS_INSTALL_TRUE@ hpcups-HPCupsFilter.$(OBJEXT) \
- @HPCUPS_INSTALL_TRUE@ hpcups-dbuscomm.$(OBJEXT) \
-@@ -728,8 +728,6 @@ am__dist_locatedriver_DATA_DIST = locatedriver
- am__dist_models_DATA_DIST = data/models/models.dat
- am__dist_noinst_DATA_DIST = prnt/drv/hpijs.drv.in.template \
- prnt/drv/hpcups.drv.in.template \
-- prnt/hpcups/libImageProcessor-x86_64.so \
-- prnt/hpcups/libImageProcessor-x86_32.so scan/sane/hpaio.desc \
- installer/text_install.py data/localization/hplip_de.ts \
- data/localization/hplip_es.ts data/localization/hplip_fr.ts \
- data/localization/hplip_it.ts data/localization/hplip_pt.ts \
-@@ -4407,7 +4405,7 @@ dist_unrel_DATA =
- @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@SCAN_BUILD_TRUE@ scan/sane/bb_ledm.c scan/sane/http.h scan/sane/http.c scan/sane/sclpml.c scan/sane/sclpml.h common/utils.c common/utils.h \
- @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@SCAN_BUILD_TRUE@ scan/sane/escl.h scan/sane/escli.h scan/sane/escl.c \
- @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@SCAN_BUILD_TRUE@ scan/sane/orblitei.h scan/sane/orblite.h scan/sane/orblite.c \
--@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@SCAN_BUILD_TRUE@ scan/sane/OrbliteScan/LinuxCommon.h scan/sane/OrbliteScan/MacCommon.h
-+@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@SCAN_BUILD_TRUE@ scan/sane/OrbliteScan/BSDCommon.h scan/sane/OrbliteScan/LinuxCommon.h scan/sane/OrbliteScan/MacCommon.h
+@@ -125,7 +124,6 @@ DIST_COMMON = $(am__configure_deps) \
+ @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@am__append_17 = libhpipp.la
+ @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@NETWORK_BUILD_TRUE@am__append_18 = libhpdiscovery.la
+ @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@NETWORK_BUILD_TRUE@am__append_19 = -Iprotocol/discovery
+-@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@LIBUSB01_BUILD_FALSE@am__append_20 = -I/usr/include/libusb-1.0
+ @FULL_BUILD_TRUE@@GUI_BUILD_TRUE@@HPLIP_BUILD_TRUE@@QT3_INSTALL_TRUE@am__append_21 = ui/colorcalform2_base.ui ui/settingsdialog_base.ui ui/aligntype6form1_base.ui \
+ @FULL_BUILD_TRUE@@GUI_BUILD_TRUE@@HPLIP_BUILD_TRUE@@QT3_INSTALL_TRUE@ ui/aboutdlg_base.ui ui/imagepropertiesdlg_base.ui ui/paperedgealignform_base.ui ui/aligntype6form2_base.ui \
+ @FULL_BUILD_TRUE@@GUI_BUILD_TRUE@@HPLIP_BUILD_TRUE@@QT3_INSTALL_TRUE@ ui/nodevicesform_base.ui ui/cleaningform_base.ui ui/colorcalform_base.ui ui/devmgr4_base.ui ui/loadpaperform_base.ui \
+@@ -4645,7 +4643,7 @@ dist_unrel_DATA =
+ @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@SCAN_BUILD_TRUE@ $(am__append_2)
+ #libhpdiscovery_la_SOURCES = protocol/discovery/mdns.c protocol/discovery/mdns.h
+ @HPLIP_BUILD_TRUE@@NETWORK_BUILD_TRUE@libhpdiscovery_la_SOURCES = protocol/discovery/avahiDiscovery.c protocol/discovery/avahiDiscovery.h
+-@HPLIP_BUILD_TRUE@@NETWORK_BUILD_TRUE@libhpdiscovery_la_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\" -I/usr/include/avahi-client -I/usr/include/avahi-core -I/usr/include/avahi-common $(DBUS_CFLAGS)
++@HPLIP_BUILD_TRUE@@NETWORK_BUILD_TRUE@libhpdiscovery_la_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\" $(DBUS_CFLAGS)
+ @HPLIP_BUILD_TRUE@@NETWORK_BUILD_TRUE@libhpdiscovery_la_LDFLAGS = -version-info 0:1:0 -L$(libdir)
+ @HPLIP_BUILD_TRUE@@NETWORK_BUILD_TRUE@libhpdiscovery_la_LIBADD = -l$(SNMPLIB) -lcrypto -lavahi-client -lavahi-core -lavahi-common $(DBUS_LIBS)
- @DARWIN_BUILD_FALSE@@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LDFLAGS = -version-info 1:0:0
- @DARWIN_BUILD_TRUE@@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LDFLAGS = -module -framework CoreFoundation -version-info 1:0:0
-@@ -4802,11 +4800,10 @@ libapdk_la_CFLAGS = $(libapdk_la_CXXFLAGS) -Iprnt/hpij
- @HPCUPS_INSTALL_TRUE@ prnt/hpcups/flate_colorspace.h prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \
- @HPCUPS_INSTALL_TRUE@ prnt/hpcups/genPCLm.h \
- @HPCUPS_INSTALL_TRUE@ common/utils.c common/utils.h prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \
--@HPCUPS_INSTALL_TRUE@ prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \
--@HPCUPS_INSTALL_TRUE@ prnt/hpcups/ImageProcessor.h
-+@HPCUPS_INSTALL_TRUE@ prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp
+@@ -4705,7 +4703,7 @@ dist_unrel_DATA =
+ @HPLIP_BUILD_TRUE@dist_halpre_DATA = data/rules/20-hplip-devices.fdi
+
+ # hplip.conf
+-@HPLIP_BUILD_TRUE@hplip_confdir = /etc/hp
++@HPLIP_BUILD_TRUE@hplip_confdir = $(sysconfdir)/hp
+ @HPLIP_BUILD_TRUE@hplip_conf_DATA = hplip.conf
+
+ #pstotiff filter
+@@ -5027,7 +5025,7 @@ libapdk_la_CFLAGS = $(libapdk_la_CXXFLAGS) -Iprnt/hpij
+ @HPCUPS_INSTALL_TRUE@ prnt/hpcups/ImageProcessor.h
@HPCUPS_INSTALL_TRUE@hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
-@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS)
-+@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS)
++@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -lcups -lcupsimage -lz $(DBUS_LIBS)
#else
#hpcupsdir = $(cupsfilterdir)
#hpcups_PROGRAMS = hpcups
-@@ -9577,16 +9574,6 @@ uninstall-am: uninstall-apparmor_abstractionDATA \
-
-
- install-data-hook:
--@HPLIP_BUILD_TRUE@ if [ \( "$(UNAME)" = "x86_64" -a -d "$(libdir)/" \) ]; then \
--@HPLIP_BUILD_TRUE@ cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \
--@HPLIP_BUILD_TRUE@ chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \
--@HPLIP_BUILD_TRUE@ ln -sf $(libdir)/libImageProcessor-x86_64.so $(libdir)/libImageProcessor.so ; \
--@HPLIP_BUILD_TRUE@ fi; \
--@HPLIP_BUILD_TRUE@ if [ \( \( "$(UNAME)" = "i686" -o "$(UNAME)" = "i386" \) -a -d "$(libdir)/" \) ]; then \
--@HPLIP_BUILD_TRUE@ cp prnt/hpcups/libImageProcessor-x86_32.so $(libdir)/ ; \
--@HPLIP_BUILD_TRUE@ chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \
--@HPLIP_BUILD_TRUE@ ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \
--@HPLIP_BUILD_TRUE@ fi
+@@ -9562,7 +9560,7 @@ install-data-am: install-apparmor_abstractionDATA \
+ install-dist_basepexpectDATA install-dist_cmdSCRIPTS \
+ install-dist_copierDATA install-dist_faxDATA \
+ install-dist_fax_filtersDATA install-dist_filterDATA \
+- install-dist_finSCRIPTS install-dist_halpreDATA \
++ install-dist_finSCRIPTS \
+ install-dist_homeDATA install-dist_hpcupsfaxppdDATA \
+ install-dist_hpfaxSCRIPTS install-dist_hpijsfaxppdDATA \
+ install-dist_hplipSCRIPTS install-dist_hplip_stateDATA \
+@@ -9580,7 +9578,6 @@ install-data-am: install-apparmor_abstractionDATA \
+ install-dist_policykit_policyDATA install-dist_postscriptDATA \
+ install-dist_ppdDATA install-dist_printpluginsDATA \
+ install-dist_prntDATA install-dist_ripSCRIPTS \
+- install-dist_rulesDATA install-dist_rulessystemDATA \
+ install-dist_scanDATA install-dist_selinuxDATA \
+ install-dist_ui4DATA install-dist_ui5DATA install-dist_uiDATA \
+ install-dist_unrelDATA install-dist_www0DATA \
+@@ -9814,14 +9811,8 @@ install-data-hook:
+ @HPLIP_BUILD_TRUE@ fi
# If scanner build, add hpaio entry to sane dll.conf.
@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ if [ "$(scan_build)" = "yes" ]; then \
- @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ $(mkinstalldirs) $(DESTDIR)/etc/sane.d; \
+-@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ $(mkinstalldirs) $(DESTDIR)/etc/sane.d; \
+-@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ if [ ! -f $(DESTDIR)/etc/sane.d/dll.conf ]; then \
+-@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ touch $(DESTDIR)/etc/sane.d/dll.conf; \
+-@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ fi; \
+-@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ if ! grep ^hpaio $(DESTDIR)/etc/sane.d/dll.conf >/dev/null 2>/dev/null ; then \
+-@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ echo "Adding hpaio entry to /etc/sane.d/dll.conf." ; \
+-@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ echo hpaio >>$(DESTDIR)/etc/sane.d/dll.conf ; \
+-@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ fi; \
++@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/sane.d/dll.d; \
++@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ echo hpaio > $(DESTDIR)$(sysconfdir)/sane.d/dll.d/hpaio ; \
+ @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ if [ \( "$(UNAME)" = "x86_64" -a -d "$(libdir)/x86_64-linux-gnu/sane" \) ]; then \
+ @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ ln -sf $(libdir)/sane/libsane-hpaio.so $(libdir)/x86_64-linux-gnu/sane/ ; \
+ @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ ln -sf $(libdir)/sane/libsane-hpaio.so.1 $(libdir)/x86_64-linux-gnu/sane/ ; \
diff --git a/print/hplip/files/patch-base_g.py b/print/hplip/files/patch-base_g.py
new file mode 100644
index 000000000000..5a7147a8f2de
--- /dev/null
+++ b/print/hplip/files/patch-base_g.py
@@ -0,0 +1,29 @@
+--- base/g.py.orig 2022-02-23 07:41:04 UTC
++++ base/g.py
+@@ -143,7 +143,7 @@ class ConfigBase(object):
+ def write(self):
+ if self.filename is not None:
+ filename = self.filename
+- if filename.startswith("/root/") or filename.startswith("/etc/"):
++ if filename.startswith("/root/") or filename.startswith("/etc/") or filename.startswith("/usr/local/etc/"):
+ # Don't try writing a file in root's home directory or
+ # the system-wide config file.
+ # See bug #479178.
+@@ -182,7 +182,7 @@ class ConfigBase(object):
+
+ class SysConfig(ConfigBase):
+ def __init__(self):
+- ConfigBase.__init__(self, '/etc/hp/hplip.conf')
++ ConfigBase.__init__(self, '/usr/local/etc/hp/hplip.conf')
+
+
+ class State(ConfigBase):
+@@ -343,7 +343,7 @@ def check_extension_module_env(ext_mod):
+ else :
+ python_ver = 2
+
+- for dirpath, dirname, filenames in os.walk('/usr/lib/'): #find the .so path
++ for dirpath, dirname, filenames in os.walk('/usr/local/lib/'): #find the .so path
+ if ext_mod_so in filenames:
+ ext_path = dirpath
+ flag = 1
diff --git a/print/hplip/files/patch-base_os__utils.py b/print/hplip/files/patch-base_os__utils.py
new file mode 100644
index 000000000000..40ac18487b2e
--- /dev/null
+++ b/print/hplip/files/patch-base_os__utils.py
@@ -0,0 +1,11 @@
+--- base/os_utils.py.orig 2022-02-23 07:41:04 UTC
++++ base/os_utils.py
+@@ -53,7 +53,7 @@ def getHPLIPDir():
+ status = 0
+ if not os.path.exists(hplipdir):
+ try:
+- os.umask(0)
++ os.umask(0o022)
+ s = os.stat(homedir)
+ os.mkdir(hplipdir, 0o755)
+ os.chown(hplipdir, s[stat.ST_UID], s[stat.ST_GID])
diff --git a/print/hplip/files/patch-base_queues.py b/print/hplip/files/patch-base_queues.py
new file mode 100644
index 000000000000..59707a80cad2
--- /dev/null
+++ b/print/hplip/files/patch-base_queues.py
@@ -0,0 +1,11 @@
+--- base/queues.py.orig 2022-02-23 07:41:04 UTC
++++ base/queues.py
+@@ -128,7 +128,7 @@ def parseQueues(mode):
+ is_hp = True
+
+ log.debug("Device URI: %s" % device_uri)
+- ppd_file = os.path.join('/etc/cups/ppd', printer_name + '.ppd')
++ ppd_file = os.path.join('/usr/local/etc/cups/ppd', printer_name + '.ppd')
+ ppd_fileType = None
+ PPDFileError = False
+ if not os.path.exists(ppd_file):
diff --git a/print/hplip/files/patch-base_utils.py b/print/hplip/files/patch-base_utils.py
new file mode 100644
index 000000000000..77d3682094c1
--- /dev/null
+++ b/print/hplip/files/patch-base_utils.py
@@ -0,0 +1,17 @@
+--- base/utils.py.orig 2022-02-23 07:41:04 UTC
++++ base/utils.py
+@@ -139,11 +139,11 @@ for s in EXPECT_WORD_LIST:
+ def get_cups_systemgroup_list():
+ lis = []
+ try:
+- fp=open('/etc/cups/cupsd.conf')
++ fp=open('/usr/local/etc/cups/cupsd.conf')
+ except IOError:
+ try:
+- if "root" != grp.getgrgid(os.stat('/etc/cups/cupsd.conf').st_gid).gr_name:
+- return [grp.getgrgid(os.stat('/etc/cups/cupsd.conf').st_gid).gr_name]
++ if "root" != grp.getgrgid(os.stat('/usr/local/etc/cups/cupsd.conf').st_gid).gr_name:
++ return [grp.getgrgid(os.stat('/usr/local/etc/cups/cupsd.conf').st_gid).gr_name]
+ except OSError:
+ return lis
+
diff --git a/print/hplip/files/patch-base_validation.py b/print/hplip/files/patch-base_validation.py
new file mode 100644
index 000000000000..3e25a59f4837
--- /dev/null
+++ b/print/hplip/files/patch-base_validation.py
@@ -0,0 +1,11 @@
+--- base/validation.py.orig 2022-02-23 07:41:04 UTC
++++ base/validation.py
+@@ -61,7 +61,7 @@ class GPG_Verification(DigiSign_Verification):
+ self.__change_owner()
+ def __change_owner(self, Recursive = False):
+ try:
+- os.umask(0)
++ os.umask(0o022)
+ s = os.stat(self.__hplipdir)
+ os_utils.changeOwner(self.__gpg_dir, s[stat.ST_UID], s[stat.ST_GID], Recursive)
+
diff --git a/print/hplip/files/patch-check.py b/print/hplip/files/patch-check.py
new file mode 100644
index 000000000000..378e5f4cb7ef
--- /dev/null
+++ b/print/hplip/files/patch-check.py
@@ -0,0 +1,35 @@
+--- check.py.orig 2022-02-23 07:41:04 UTC
++++ check.py
+@@ -139,9 +139,9 @@ def get_comment(package, Inst_status, installed_ver):
+ comment = "Python Programming is not supported if version is lessthan 2.2"
+ elif package == 'hpaio':
+ if Inst_status == 'OK':
+- comment = "'hpaio found in /etc/sane.d/dll.conf'"
++ comment = "'hpaio found in /usr/local/etc/sane.d/dll.d/hpaio'"
+ else:
+- comment = "'hpaio not found in /etc/sane.d/dll.conf. hpaio needs to be added in this file.'"
++ comment = "'hpaio not found in /usr/local/etc/sane.d/dll.d/hpaio. hpaio needs to be added in this file.'"
+ elif package == 'cupsext' or package == 'pcardext' or package == 'hpmudext':
+ if Inst_status != 'OK':
+ comment = "'Not Found or Failed to load, Please reinstall HPLIP'"
+@@ -326,9 +326,9 @@ class DependenciesCheck(object):
+ log.warn("HPLIP-Installation: Auto installation is not supported for %s distro %s version " %(self.core.distro, self.core.distro_version))
+
+ log.info()
+- log.info(log.bold("Current contents of '/etc/hp/hplip.conf' file:"))
++ log.info(log.bold("Current contents of '/usr/local/etc/hp/hplip.conf' file:"))
+ try:
+- output = open('/etc/hp/hplip.conf', 'r').read()
++ output = open('/usr/local/etc/hp/hplip.conf', 'r').read()
+ except (IOError, OSError) as e:
+ log.error("Could not access file: %s. Check HPLIP installation." % e.strerror)
+ self.num_errors += 1
+@@ -502,7 +502,7 @@ class DependenciesCheck(object):
+ #log.info("Installed in HPLIP?: %s" % x)
+ log.info("Device URI: %s" % device_uri)
+
+- ppd = os.path.join('/etc/cups/ppd', printer_name + '.ppd')
++ ppd = os.path.join('/usr/local/etc/cups/ppd', printer_name + '.ppd')
+
+ if os.path.exists(ppd):
+ log.info("PPD: %s" % ppd)
diff --git a/print/hplip/files/patch-common_utils.c b/print/hplip/files/patch-common_utils.c
new file mode 100644
index 000000000000..35e42aeaa075
--- /dev/null
+++ b/print/hplip/files/patch-common_utils.c
@@ -0,0 +1,11 @@
+--- common/utils.c.orig 2022-02-23 07:41:04 UTC
++++ common/utils.c
+@@ -311,7 +311,7 @@ int getHPLogLevel()
+ char *p;
+ int iLogLevel = 0;
+
+- fp = fopen ("/etc/cups/cupsd.conf", "r");
++ fp = fopen ("/usr/local/etc/cups/cupsd.conf", "r");
+ if (fp == NULL)
+ return 0;
+ while (!feof (fp))
diff --git a/print/hplip/files/patch-configure b/print/hplip/files/patch-configure
new file mode 100644
index 000000000000..01cb7d2cdb6b
--- /dev/null
+++ b/print/hplip/files/patch-configure
@@ -0,0 +1,70 @@
+--- configure.orig 2022-02-23 07:41:20 UTC
++++ configure
+@@ -16074,11 +16074,9 @@ $as_echo "yes" >&6; }
+ epm_scan=\#
+ epm_class_driver=
+ epm_class_install=yes
+- test `sh ./createPPD.sh -f` == 0
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+- test `sh ./createPPD.sh -q` == 0
+ fi
+ if test x$class_driver = xyes; then
+ HPLIP_CLASS_DRIVER_TRUE=
+@@ -17178,13 +17176,13 @@ fi
+ done
+
+ else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb_init in -lusb-1.0" >&5
+-$as_echo_n "checking for libusb_init in -lusb-1.0... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb_init in -lusb" >&5
++$as_echo_n "checking for libusb_init in -lusb... " >&6; }
+ if ${ac_cv_lib_usb_1_0_libusb_init+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lusb-1.0 $LIBS"
++LIBS="-lusb $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -17220,9 +17218,9 @@ else
+ as_fn_error 2 "cannot find libusb 1.0 support" "$LINENO" 5
+ fi
+
+- for ac_header in libusb-1.0/libusb.h
++ for ac_header in libusb.h
+ do :
+- ac_fn_c_check_header_mongrel "$LINENO" "libusb-1.0/libusb.h" "ac_cv_header_libusb_1_0_libusb_h" "$ac_includes_default"
++ ac_fn_c_check_header_mongrel "$LINENO" "libusb.h" "ac_cv_header_libusb_1_0_libusb_h" "$ac_includes_default"
+ if test "x$ac_cv_header_libusb_1_0_libusb_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBUSB_1_0_LIBUSB_H 1
+@@ -17237,18 +17235,6 @@ done
+ fi
+ fi
+
+-SAVE_CPPFLAGS="$CPPFLAGS"
+-CFLAGS=`python-config --includes`
+-if $? -eq 0
+-then
+- echo $FLAGS
+-else
+-CFLAGS=`python3-config --includes`
+- if $? -eq 0
+- then
+- echo $FLAGS
+- fi
+-fi
+
+ #CFLAGS=`(python-config --includes)`
+ if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$lite_build" = "no" && test "$hpcups_only_build" = "no"; then
+@@ -17565,7 +17551,6 @@ done
+ as_fn_error 6 "cannot find python-devel support" "$LINENO" 5
+ fi
+ fi
+-CFLAGS="$save_CFLAGS"
+
+ if test "$hpijs_only_build" = "no" && test "$scan_build" = "yes" && test "$hpcups_only_build" = "no"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sane_open in -lsane" >&5
diff --git a/print/hplip/files/patch-doc_index.html b/print/hplip/files/patch-doc_index.html
new file mode 100644
index 000000000000..492e55c78fce
--- /dev/null
+++ b/print/hplip/files/patch-doc_index.html
@@ -0,0 +1,11 @@
+--- doc/index.html.orig 2022-02-23 07:41:04 UTC
++++ doc/index.html
+@@ -32,8 +32,6 @@
+ <a href="commandline.html"><li>Using command line tools</li></a><br><br>
+ <a href="plugins.html"><li>About plugins</li></a><br><br>
+ <a href="systray.html"><li>About HP Status Service "system tray" icon (hp-systray)</li></a><br><br>
+-<a href="uninstalling.html"><li>Uninstalling HPLIP</li></a><br><br>
+-<a href="upgrading.html"><li>Upgrading HPLIP</li></a><br><br>
+ <a href="gettinghelp.html"><li>Getting help</li></a><br><br>
+ <a href="http://www.hplip.net"><li>HPLIP Website</li></a><br></ul><hr class="hide">
+ </div>
diff --git a/print/hplip/files/patch-doc_troubleshooting.html b/print/hplip/files/patch-doc_troubleshooting.html
new file mode 100644
index 000000000000..5792f3213b2b
--- /dev/null
+++ b/print/hplip/files/patch-doc_troubleshooting.html
@@ -0,0 +1,46 @@
+--- doc/troubleshooting.html.orig 2022-02-23 07:41:04 UTC
++++ doc/troubleshooting.html
+@@ -25,7 +25,7 @@ section describes what is currently enabled or disable
+ example if you are having a problem setting up your parallel printer
+ check to be sure that pp-build=yes--if it does not you'll need to
+ reinstall hplip and enable parallel support.<span style="font-style: italic;"><span style="font-style: italic;"><span style="font-style: italic;"><span style="font-style: italic;"></span></span></span><br></span><h3 class="showhide_heading" id="System_Defaults">I/O Problems (Printer is not detected)</h3>
+-<p>If the printer is not being detected by hp-setup check the following items:</p><p style="font-style: italic;">Is the printer supported by HPLIP?</p><p style="font-style: italic;">Is the printer powered on?</p><p style="font-style: italic;">Is the printer connected correctly with the proper type of cable?</p><p style="font-style: italic;">Is the printer in an error state? (i.e. out of paper, out of ink, etc.)</p><p style="font-style: italic;">Is the cable (usb/parallel/ethernet) in good working condition?</p><p><span style="font-weight: bold;">USB</span></p><p>If you run "/usr/lib/cups/backend/hp" you should get output similar to the following:</p><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;
++<p>If the printer is not being detected by hp-setup check the following items:</p><p style="font-style: italic;">Is the printer supported by HPLIP?</p><p style="font-style: italic;">Is the printer powered on?</p><p style="font-style: italic;">Is the printer connected correctly with the proper type of cable?</p><p style="font-style: italic;">Is the printer in an error state? (i.e. out of paper, out of ink, etc.)</p><p style="font-style: italic;">Is the cable (usb/parallel/ethernet) in good working condition?</p><p><span style="font-weight: bold;">USB</span></p><p>If you run "/usr/local/libexec/cups/backend/hp" you should get output similar to the following:</p><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;
+ direct
+ hp:/usb/HP_Color_LaserJet_CP1515n?serial=00XXXXXXXXXX "HP Color
+ LaserJet CP1515n" "HP Color LaserJet CP1515n USB &nbsp;&nbsp;&nbsp;
+@@ -42,28 +42,28 @@ enterprises.11.2.3.9.1.1.7.0
+ LaserJet &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
+ &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
+ 3380;CLS:PRINTER;DES:Hewlett-Packard LaserJet
+-3380;MEM:23MB;COMMENT:RES=1200x1;" </span><br><br>If it does not there may be an snmp problem on your system and/or network.<br><br><span style="font-weight: bold;">Parallel<br><br></span>Was HPLIP installed with parallel support? &nbsp;Run hp-check -t and look in the for the following output:<br><br><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; # Following values are determined at configure time and cannot be changed.<br>&nbsp;&nbsp;&nbsp; [configure]<br>&nbsp;&nbsp;&nbsp; network-build=yes<br>&nbsp;&nbsp;&nbsp; pp-build=no<br>&nbsp;&nbsp;&nbsp; gui-build=yes<br>&nbsp;&nbsp;&nbsp; scanner-build=yes<br>&nbsp;&nbsp;&nbsp; fax-build=yes<br>&nbsp;&nbsp;&nbsp; dbus-build=yes<br>&nbsp;&nbsp;&nbsp; cups11-build=no<br>&nbsp;&nbsp;&nbsp; doc-build=yes<br>&nbsp;&nbsp;&nbsp; shadow-build=no<br>&nbsp;&nbsp;&nbsp; foomatic-drv-install=yes<br>&nbsp;&nbsp;&nbsp; foomatic-ppd-install=no<br>&nbsp;&nbsp;&nbsp; foomatic-rip-hplip-install=yes<br>&nbsp;&nbsp;&nbsp; internal-tag=2.8.5.23<br></span><span style="font-style: italic;"></span><br>Find the section:<br><br><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; pp-build=no<br><br><span style="font-style: italic;"></span></span>This should be "<span style="font-style: italic;">pp-build=yes</span>".<br><br>Is the ppdev module loaded?<br><br>Look for the output results from the hp-check -t for the following:<br><br><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Checking for dependency: ppdev - Parallel port support kernel module....</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; OK, found.</span><br><span style="font-weight: bold;"><span style="font-weight: bold;"><br></span></span>If you are missing the ppdev module you can try running:<br><br>&nbsp;&nbsp;&nbsp; <span style="font-style: italic;">modprobe ppdev</span><br><br>Is your parallel port set to ECP mode in the BIOS?<br><br>If you run /usr/lib/cups/backend/hp do you should get an output similar to the following:<br><br><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;
++3380;MEM:23MB;COMMENT:RES=1200x1;" </span><br><br>If it does not there may be an snmp problem on your system and/or network.<br><br><span style="font-weight: bold;">Parallel<br><br></span>Was HPLIP installed with parallel support? &nbsp;Run hp-check -t and look in the for the following output:<br><br><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; # Following values are determined at configure time and cannot be changed.<br>&nbsp;&nbsp;&nbsp; [configure]<br>&nbsp;&nbsp;&nbsp; network-build=yes<br>&nbsp;&nbsp;&nbsp; pp-build=no<br>&nbsp;&nbsp;&nbsp; gui-build=yes<br>&nbsp;&nbsp;&nbsp; scanner-build=yes<br>&nbsp;&nbsp;&nbsp; fax-build=yes<br>&nbsp;&nbsp;&nbsp; dbus-build=yes<br>&nbsp;&nbsp;&nbsp; cups11-build=no<br>&nbsp;&nbsp;&nbsp; doc-build=yes<br>&nbsp;&nbsp;&nbsp; shadow-build=no<br>&nbsp;&nbsp;&nbsp; foomatic-drv-install=yes<br>&nbsp;&nbsp;&nbsp; foomatic-ppd-install=no<br>&nbsp;&nbsp;&nbsp; foomatic-rip-hplip-install=yes<br>&nbsp;&nbsp;&nbsp; internal-tag=2.8.5.23<br></span><span style="font-style: italic;"></span><br>Find the section:<br><br><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; pp-build=no<br><br><span style="font-style: italic;"></span></span>This should be "<span style="font-style: italic;">pp-build=yes</span>".<br><br>Is the ppdev module loaded?<br><br>Look for the output results from the hp-check -t for the following:<br><br><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Checking for dependency: ppdev - Parallel port support kernel module....</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; OK, found.</span><br><span style="font-weight: bold;"><span style="font-weight: bold;"><br></span></span>If you are missing the ppdev module you can try running:<br><br>&nbsp;&nbsp;&nbsp; <span style="font-style: italic;">modprobe ppdev</span><br><br>Is your parallel port set to ECP mode in the BIOS?<br><br>If you run /usr/local/libexec/cups/backend/hp do you should get an output similar to the following:<br><br><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;
+ direct
+ hp:/par/HP_LaserJet?serial=00XXXXXXXXXX "HP
+ LaserJet" "HP LaserJet&nbsp;PAR 00XXXXXXXXXX HPLIP"
+ "MFG:HP;MDL:HP &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
+ &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
+-LaserJet&nbsp;;CLS:PRINTER;DES:HP&nbsp;LaserJet&nbsp;;SN:00XXXXXXXXXX;"</span><br><br>If the /usr/lib/cups/backend/hp does not detect the printer, HPLIP will not function.<h3 class="showhide_heading" id="Add_ons">Functionality Problems (print, scan, fax)</h3>
+-<p style="font-weight: bold;">Print</p><p>Is the printer on-line and not in an error state?</p><p>If you run hp-check -t, are there any problems reported?</p><p>In the "hp-check -t", verify that the printer is configured:</p><p>Verify in the section DISCOVERED USB DEVICES that the printer is displayed.</p><p>Verify in the section INSTALLED CUPS PRINTER QUEUES that the printer queue is displayed.</p><p>Verify on the line PPD: that the ppd file matches the printer model.</p>Example:<br><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; --------------------------</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; | DISCOVERED USB DEVICES |</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; --------------------------</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; No devices found.</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; ---------------------------------</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; | INSTALLED CUPS PRINTER QUEUES |</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; ---------------------------------</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Photosmart_3300</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; ---------------</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Type: Printer</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Installed in HPLIP?: Yes, using the hp: CUPS backend.</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Device URI: hp:/net/Photosmart_3300_series?ip=15.252.39.136</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; PPD: /etc/cups/ppd/Photosmart_3300.ppd</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; PPD Description: HP PhotoSmart 3300 Foomatic/hpijs, hpijs 2.8.2.10 - HPLIP 2.8.2</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Printer status: printer Photosmart_3300 is idle.&nbsp; enabled since Tue 27 May 2008 01:58:02 PM PDT</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Communication status: Good</span><br><br>Are you able to print from any application?<br><br>View the syslog and try to print do you see any errors?<br><br>&nbsp;Run:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<span style="font-style: italic;"> tail -f /var/log/messages</span><p>The
++LaserJet&nbsp;;CLS:PRINTER;DES:HP&nbsp;LaserJet&nbsp;;SN:00XXXXXXXXXX;"</span><br><br>If the /usr/local/libexec/cups/backend/hp does not detect the printer, HPLIP will not function.<h3 class="showhide_heading" id="Add_ons">Functionality Problems (print, scan, fax)</h3>
++<p style="font-weight: bold;">Print</p><p>Is the printer on-line and not in an error state?</p><p>If you run hp-check -t, are there any problems reported?</p><p>In the "hp-check -t", verify that the printer is configured:</p><p>Verify in the section DISCOVERED USB DEVICES that the printer is displayed.</p><p>Verify in the section INSTALLED CUPS PRINTER QUEUES that the printer queue is displayed.</p><p>Verify on the line PPD: that the ppd file matches the printer model.</p>Example:<br><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; --------------------------</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; | DISCOVERED USB DEVICES |</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; --------------------------</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; No devices found.</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; ---------------------------------</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; | INSTALLED CUPS PRINTER QUEUES |</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; ---------------------------------</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Photosmart_3300</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; ---------------</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Type: Printer</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Installed in HPLIP?: Yes, using the hp: CUPS backend.</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Device URI: hp:/net/Photosmart_3300_series?ip=15.252.39.136</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; PPD: /usr/local/etc/cups/ppd/Photosmart_3300.ppd</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; PPD Description: HP PhotoSmart 3300 Foomatic/hpijs, hpijs 2.8.2.10 - HPLIP 2.8.2</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Printer status: printer Photosmart_3300 is idle.&nbsp; enabled since Tue 27 May 2008 01:58:02 PM PDT</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Communication status: Good</span><br><br>Are you able to print from any application?<br><br>View the syslog and try to print do you see any errors?<br><br>&nbsp;Run:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<span style="font-style: italic;"> tail -f /var/log/messages</span><p>The
+ possible errors presented in the "messages" log can be varied.
+ &nbsp;You may need to reference your Linux distribution documentation
+ for more information.</p><p>View the cups log and try to print do you see any errors?</p><p>To view the cups log:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="font-style: italic;">Edit
+-the file /etc/cups/cupsd.conf to change the loglevel to debug, then
++the file /usr/local/etc/cups/cupsd.conf to change the loglevel to debug, then
+ restart cups /etc/init.d/cups restart (or the command may be /etc/init.d/cupsys
+ restart depending on your system configuration).</span></p><p style="font-weight: bold;">Scan</p>Is the printer on-line and not in an error state?<br><br>If you run&nbsp;hp-check -t are there any problems?<br><br>Within
+ the "hp-check -t" output, verify that the sane is configured correctly
+ in the SANE CONFIGURATION section. &nbsp;Here is an example of what you
+-should see after running hp-check -t:<br><br><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; 'hpaio' in '/etc/sane.d/dll.conf'...</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; OK, found. SANE backend 'hpaio' is properly set up.</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Checking output of 'scanimage -L'...</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; No scanners were identified. If you were expecting something different,</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; check that the scanner is plugged in, turned on and detected by the</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; sane-find-scanner tool (if appropriate). Please read the documentation</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; which came with this software (README, FAQ, manpages).</span><br><br>If
++should see after running hp-check -t:<br><br><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; 'hpaio' in '/usr/local/etc/sane.d/dll.d/hpaio'...</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; OK, found. SANE backend 'hpaio' is properly set up.</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Checking output of 'scanimage -L'...</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; No scanners were identified. If you were expecting something different,</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; check that the scanner is plugged in, turned on and detected by the</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; sane-find-scanner tool (if appropriate). Please read the documentation</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; which came with this software (README, FAQ, manpages).</span><br><br>If
+ you do not see this or get an error, edit the dll.conf file and add
+ hpaio. &nbsp;If the scanner is not detect using the scanimage be
+ sure that the printer is supported and working correctly.<br><p style="font-weight: bold;">Fax&nbsp;</p>Is the printer powered on and not in an error state?<br><br>If you run hp-check -t are there any problems?<br><br>If
+ you run hp-check -t is there a fax queue installed? &nbsp;You should
+-see output similar to the following after running hp-check -t:<br><br><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Photosmart_3300_fax</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; -------------------</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Type: Fax</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Installed in HPLIP?: Yes, using the hpfax: CUPS backend.</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Device URI: hpfax:/net/Photosmart_3300_series?ip=15.252.39.136</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; PPD: /etc/cups/ppd/Photosmart_3300_fax.ppd</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; PPD Description: HP Fax</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Printer status: printer Photosmart_3300_fax is idle.&nbsp; enabled since Thu 22 May 2008 01:32:01 PM PDT</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Communication status: Good</span><br><br>Is the phone line connected to the multifunction printer?<br><br>Can you fax a different document? (i.e. ensure that this is not a document-specific problem)<br><br>Is the receiving fax machine or device on-line and able to accept faxes?<br><h3 class="showhide_heading" id="Add_ons"><br></h3>
++see output similar to the following after running hp-check -t:<br><br><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Photosmart_3300_fax</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; -------------------</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Type: Fax</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Installed in HPLIP?: Yes, using the hpfax: CUPS backend.</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Device URI: hpfax:/net/Photosmart_3300_series?ip=15.252.39.136</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; PPD: /usr/local/etc/cups/ppd/Photosmart_3300_fax.ppd</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; PPD Description: HP Fax</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Printer status: printer Photosmart_3300_fax is idle.&nbsp; enabled since Thu 22 May 2008 01:32:01 PM PDT</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Communication status: Good</span><br><br>Is the phone line connected to the multifunction printer?<br><br>Can you fax a different document? (i.e. ensure that this is not a document-specific problem)<br><br>Is the receiving fax machine or device on-line and able to accept faxes?<br><h3 class="showhide_heading" id="Add_ons"><br></h3>
+ <p>
+ </p>
+
diff --git a/print/hplip/files/patch-fax_backend_hpfax.py b/print/hplip/files/patch-fax_backend_hpfax.py
new file mode 100644
index 000000000000..f5ce3d12ba4f
--- /dev/null
+++ b/print/hplip/files/patch-fax_backend_hpfax.py
@@ -0,0 +1,29 @@
+--- fax/backend/hpfax.py.orig 2022-02-23 07:41:04 UTC
++++ fax/backend/hpfax.py
+@@ -49,7 +49,7 @@ PIPE_BUF = 4096
+
+ job_id = 0
+ pid = os.getpid()
+-config_file = '/etc/hp/hplip.conf'
++config_file = '/usr/local/etc/hp/hplip.conf'
+ home_dir = ''
+
+
+@@ -68,7 +68,7 @@ if os.path.exists(config_file):
+ bug("Error setting home directory: home= under [dirs] not found.")
+ sys.exit(1)
+ else:
+- bug("Error setting home directory: /etc/hp/hplip.conf not found")
++ bug("Error setting home directory: /usr/local/etc/hp/hplip.conf not found")
+ sys.exit(1)
+
+ if not home_dir or not os.path.exists(home_dir):
+@@ -255,7 +255,7 @@ else:
+
+ # Create the named pipe. Make sure it exists before sending
+ # message to hppsd.
+- os.umask(0o111)
++ os.umask(0o133)
+ try:
+ os.mkfifo(pipe_name)
+ except OSError:
diff --git a/print/hplip/files/patch-fax_filters_pstotiff b/print/hplip/files/patch-fax_filters_pstotiff
new file mode 100644
index 000000000000..02453c368912
--- /dev/null
+++ b/print/hplip/files/patch-fax_filters_pstotiff
@@ -0,0 +1,15 @@
+--- fax/filters/pstotiff.orig 2022-02-23 07:41:04 UTC
++++ fax/filters/pstotiff
+@@ -18,10 +18,10 @@ if (len(sys.argv) > 6):
+
+ temp_out_handle, temp_out_fname = tempfile.mkstemp()
+
+-font = "-I/usr/share/cups/fonts"
++font = "-I/usr/local/share/cups/fonts"
+ device = "-sDEVICE=tiffg4 -dMaxStripSize=0 -r204x196 -dNOPAUSE -dBATCH -dSAFER -dPARANOIDSAFER -dSHORTERRORS -dWRITESYSTEMDICT -dGHOSTSCRIPT -sstdout=%stderr -sOutputFile=" + temp_out_fname + " " + temp_in_file
+
+-gs_command = "/usr/bin/gs" + " " + font + " " + device
++gs_command = "/usr/local/bin/gs" + " " + font + " " + device
+
+ exit_code = os.system(gs_command)
+
diff --git a/print/hplip/files/patch-hp-uiscan.desktop.in b/print/hplip/files/patch-hp-uiscan.desktop.in
new file mode 100644
index 000000000000..9888c15ec35a
--- /dev/null
+++ b/print/hplip/files/patch-hp-uiscan.desktop.in
@@ -0,0 +1,14 @@
+--- hp-uiscan.desktop.in.orig 2022-02-23 07:41:04 UTC
++++ hp-uiscan.desktop.in
+@@ -1,8 +1,8 @@
+-#!/usr/bin/env xdg-open
+ [Desktop Entry]
+ Version=1.0
+ Type=Application
+ Terminal=false
+ Name=hp-uiscan
+-Exec=/usr/bin/hp-uiscan
+-Icon=/usr/share/icons/Humanity/devices/48/printer.svg
++Exec=hp-uiscan
++Icon=hp_logo
++Categories=Utility;
diff --git a/print/hplip/files/patch-hpdio.py b/print/hplip/files/patch-hpdio.py
new file mode 100644
index 000000000000..e56b5ac5bf8e
--- /dev/null
+++ b/print/hplip/files/patch-hpdio.py
@@ -0,0 +1,11 @@
+--- hpdio.py.orig 2022-02-23 07:41:04 UTC
++++ hpdio.py
+@@ -67,7 +67,7 @@ def run(read_pipe2=None, # pipe from hpssd
+
+ global r2, w3
+ # tmp_dir = '/tmp'
+- os.umask(0o111)
++ os.umask(0o133)
+
+ try:
+ log.set_module("hp-systray(hpdio)")
diff --git a/print/hplip/files/patch-hplip-systray.desktop.in b/print/hplip/files/patch-hplip-systray.desktop.in
new file mode 100644
index 000000000000..4c4f458e871d
--- /dev/null
+++ b/print/hplip/files/patch-hplip-systray.desktop.in
@@ -0,0 +1,13 @@
+--- hplip-systray.desktop.in.orig 2022-02-23 07:41:04 UTC
++++ hplip-systray.desktop.in
+@@ -5,8 +5,7 @@ Name=HP System Tray Service
+ GenericName=Printer Status Applet
+ Comment=HP System Tray Service
+ Exec=hp-systray -x
+-Icon=@abs_datadir@/hplip/data/images/128x128/hp_logo.png
++Icon=hp_logo
+ Terminal=false
+-Categories=Application;Utility;
+-X-KDE-StartupNotify=false
++Categories=Utility;
+ StartupNotify=false
diff --git a/print/hplip/files/patch-hplip.desktop.in b/print/hplip/files/patch-hplip.desktop.in
new file mode 100644
index 000000000000..e0902bda925a
--- /dev/null
+++ b/print/hplip/files/patch-hplip.desktop.in
@@ -0,0 +1,13 @@
+--- hplip.desktop.in.orig 2022-02-23 07:41:04 UTC
++++ hplip.desktop.in
+@@ -5,8 +5,7 @@ Name=HP Device Manager
+ GenericName=Printer Management Application
+ Comment=View device status, ink levels and perform maintenance.
+ Exec=hp-toolbox
+-Icon=@abs_datadir@/hplip/data/images/128x128/hp_logo.png
++Icon=hp_logo
+ Terminal=false
+-Categories=Application;Utility;
+-X-KDE-StartupNotify=false
++Categories=Utility;
+ StartupNotify=false
diff --git a/print/hplip/files/patch-installer_core__install.py b/print/hplip/files/patch-installer_core__install.py
new file mode 100644
index 000000000000..091f71aba863
--- /dev/null
+++ b/print/hplip/files/patch-installer_core__install.py
@@ -0,0 +1,11 @@
+--- installer/core_install.py.orig 2022-02-23 07:41:04 UTC
++++ installer/core_install.py
+@@ -1358,7 +1358,7 @@ class CoreInstall(object):
+
+ if not found:
+ st = os.stat('/etc/sane.d/dll.conf')
+- cmd = self.passwordObj.getAuthCmd() % 'chmod 777 /etc/sane.d/dll.conf'
++ cmd = self.passwordObj.getAuthCmd() % 'chmod 644 /etc/sane.d/dll.conf'
+ log.debug("cmd=%s" % cmd)
+ utils.run(cmd, self.passwordObj)
+ try:
diff --git a/print/hplip/files/patch-installer_dcheck.py b/print/hplip/files/patch-installer_dcheck.py
index 9b5354766374..ae43661df942 100644
--- a/print/hplip/files/patch-installer_dcheck.py
+++ b/print/hplip/files/patch-installer_dcheck.py
@@ -1,4 +1,4 @@
---- installer/dcheck.py.orig 2019-11-03 15:17:23 UTC
+--- installer/dcheck.py.orig 2022-02-23 07:41:04 UTC
+++ installer/dcheck.py
@@ -48,7 +48,11 @@ mod_output = ''
def update_ld_output():
@@ -13,7 +13,7 @@
if status != 0:
log.debug("ldconfig failed.")
-@@ -378,6 +385,8 @@ def get_libpthread_version():
+@@ -380,6 +384,8 @@ def get_libpthread_version():
except ImportError:
return '-'
else:
diff --git a/print/hplip/files/patch-installer_pluginhandler.py b/print/hplip/files/patch-installer_pluginhandler.py
new file mode 100644
index 000000000000..caac54b0c645
--- /dev/null
+++ b/print/hplip/files/patch-installer_pluginhandler.py
@@ -0,0 +1,56 @@
+--- installer/pluginhandler.py.orig 2022-02-23 07:41:04 UTC
++++ installer/pluginhandler.py
+@@ -80,7 +80,7 @@ class PluginHandle(object):
+ DOCDIR = sys_conf.get('dirs', 'doc')
+ CUPSBACKENDDIR = sys_conf.get('dirs', 'cupsbackend')
+ CUPSFILTERDIR = sys_conf.get('dirs', 'cupsfilter')
+- RULESDIR = '/etc/udev/rules.d'
++ RULESDIR = '/usr/local/etc/udev/rules.d'
+ BIN = sys_conf.get('dirs', 'bin')
+
+ # Copying plugin.spec file to home dir.
+@@ -97,11 +97,11 @@ class PluginHandle(object):
+ ARCH = 'x86_%d' % BITNESS
+
+ if BITNESS == 64:
+- SANELIBDIR = '/usr/lib64/sane'
+- LIBDIR = '/usr/lib64'
++ SANELIBDIR = '/usr/local/lib/sane'
++ LIBDIR = '/usr/local/lib'
+ else:
+- SANELIBDIR = '/usr/lib/sane'
+- LIBDIR = '/usr/lib'
++ SANELIBDIR = '/usr/local/lib/sane'
++ LIBDIR = '/usr/local/lib'
+
+ copies = []
+
+@@ -239,8 +239,8 @@ class PluginHandle(object):
+ def __setPluginConfFile(self):
+ home = sys_conf.get('dirs', 'home')
+
+- if os.path.exists('/etc/hp/plugin.conf'):
+- self.__plugin_conf_file = "file:///etc/hp/plugin.conf"
++ if os.path.exists('/usr/local/etc/hp/plugin.conf'):
++ self.__plugin_conf_file = "file:///usr/local/etc/hp/plugin.conf"
+
+ elif os.path.exists(os.path.join(home, 'plugin.conf')):
+ self.__plugin_conf_file = "file://" + os.path.join(home, 'plugin.conf')
+@@ -268,7 +268,7 @@ class PluginHandle(object):
+ log.debug("Downloading %s plug-in file from '%s' to '%s'..." % (self.__required_version, src, self.__plugin_path))
+ plugin_file = os.path.join(self.__plugin_path, self.__plugin_name)
+ try:
+- os.umask(0)
++ os.umask(0o022)
+ if not os.path.exists(self.__plugin_path):
+ os.makedirs(self.__plugin_path, 0o755)
+ if os.path.exists(plugin_file):
+@@ -373,7 +373,7 @@ class PluginHandle(object):
+ def copyFiles(self, src_dir):
+
+ copies = self.__getPluginFilesList(src_dir)
+- os.umask(0)
++ os.umask(0o022)
+
+ for src, trg, link in copies:
+
diff --git a/print/hplip/files/patch-io_hpmud_musb.c b/print/hplip/files/patch-io_hpmud_musb.c
index d20b4c2e7d65..81291ead8c1a 100644
--- a/print/hplip/files/patch-io_hpmud_musb.c
+++ b/print/hplip/files/patch-io_hpmud_musb.c
@@ -1,6 +1,6 @@
---- io/hpmud/musb.c.orig 2016-08-26 10:05:31 UTC
+--- io/hpmud/musb.c.orig 2022-02-23 07:41:04 UTC
+++ io/hpmud/musb.c
-@@ -139,10 +139,16 @@ static int get_string_descriptor(libusb_
+@@ -139,10 +139,16 @@ static int get_string_descriptor(libusb_device_handle
0x409,
tbuf, sizeof(tbuf), LIBUSB_CONTROL_REQ_TIMEOUT);
@@ -20,7 +20,7 @@
continue;
}
break;
-@@ -385,7 +391,7 @@ static int detach(libusb_device_handle *
+@@ -385,7 +391,7 @@ static int detach(libusb_device_handle *hd, int interf
{
int ret ;
/* If any kernel module has claimed this interface, detach it. */
diff --git a/print/hplip/files/patch-logcapture.py b/print/hplip/files/patch-logcapture.py
new file mode 100644
index 000000000000..03c07863a6b9
--- /dev/null
+++ b/print/hplip/files/patch-logcapture.py
@@ -0,0 +1,31 @@
+--- logcapture.py.orig 2022-02-23 07:41:04 UTC
++++ logcapture.py
+@@ -37,8 +37,8 @@ from base.sixext import to_string_utf8
+ from subprocess import Popen, PIPE
+ from installer.core_install import *
+
+-CUPS_FILE='/etc/cups/cupsd.conf'
+-CUPS_BACKUP_FILE='/etc/cups/cupsd.conf_orginal'
++CUPS_FILE='/usr/local/etc/cups/cupsd.conf'
++CUPS_BACKUP_FILE='/usr/local/etc/cups/cupsd.conf_orginal'
+ LOG_FOLDER_PATH='./'
+ LOG_FOLDER_NAME='hplip_troubleshoot_logs'
+ LOG_FILES=LOG_FOLDER_PATH + LOG_FOLDER_NAME
+@@ -332,7 +332,7 @@ for u in USERS:
+ sts,out = utils.run('mv -f ./hp-check.log %s'%LOG_FILES)
+ if sts != 0:
+ log.error("Failed to capture %s log files."%("./hp-check.log"))
+-cmd = 'chmod 666 %s/*.log' % LOG_FILES
++cmd = 'chmod 644 %s/*.log' % LOG_FILES
+ sts = os_utils.execute(cmd)
+ if sts != 0:
+ log.error("Failed to change permissions for %s."%(LOG_FILES))
+@@ -346,7 +346,7 @@ if sts_compress != 0:
+ log.error("Failed to compress %s folder."%(LOG_FILES))
+ else:
+ log.debug("Changing Permissions of ./%s.tar.gz "%LOG_FOLDER_NAME)
+- sts,out = utils.run('chmod 666 -R ./%s.tar.gz'%(LOG_FOLDER_NAME))
++ sts,out = utils.run('chmod 644 -R ./%s.tar.gz'%(LOG_FOLDER_NAME))
+ if sts != 0:
+ log.error("Failed to change permissions for %s.tar.gz."%(LOG_FILES))
+ log.debug("Removing Temporary log files..")
diff --git a/print/hplip/files/patch-prnt_backend_hp.c b/print/hplip/files/patch-prnt_backend_hp.c
new file mode 100644
index 000000000000..966376edcb16
--- /dev/null
+++ b/print/hplip/files/patch-prnt_backend_hp.c
@@ -0,0 +1,11 @@
+--- prnt/backend/hp.c.orig 2022-02-23 07:41:04 UTC
++++ prnt/backend/hp.c
+@@ -649,7 +649,7 @@ static FILE* create_out_file(char* job_id, char* user_
+
+ if (temp_fp)
+ {
+- chmod(fname, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
++ chmod(fname, S_IRUSR | S_IWUSR | S_IRGRP | 0 | S_IROTH);
+ }
+ else
+ {
diff --git a/print/hplip/files/patch-prnt_cups.py b/print/hplip/files/patch-prnt_cups.py
new file mode 100644
index 000000000000..2d53567712a5
--- /dev/null
+++ b/print/hplip/files/patch-prnt_cups.py
@@ -0,0 +1,88 @@
+--- prnt/cups.py.orig 2022-02-23 07:41:04 UTC
++++ prnt/cups.py
+@@ -224,7 +224,7 @@ def isfamilydrv(ppds):
+ # for m in models.FAMILY_CLASSES:
+ # if m in f:
+ # family_check=1
+- filename_config = "/etc/hp/hplip.conf"
++ filename_config = "/usr/local/etc/hp/hplip.conf"
+ file_conf = open(filename_config,'r')
+ for line in file_conf:
+ if 'class-driver' in line:
+@@ -236,8 +236,8 @@ def isfamilydrv(ppds):
+
+ def getPPDPath(addtional_paths=None):
+ """
+- Returns the CUPS ppd path (not the foomatic one under /usr/share/ppd).
+- Usually this is /usr/share/cups/model.
++ Returns the CUPS ppd path (not the foomatic one under /usr/local/share/ppd).
++ Usually this is /usr/local/share/cups/model.
+ """
+ if addtional_paths is None:
+ addtional_paths = []
+@@ -254,7 +254,7 @@ def getPPDPath1(addtional_paths=None):
+ return path for hplip ppds.
+ """
+
+- filename_config = "/etc/hp/hplip.conf"
++ filename_config = "/usr/local/etc/hp/hplip.conf"
+ file_conf = open(filename_config,'r')
+ for line in file_conf:
+ if 'ppd=' in line:
+@@ -267,16 +267,16 @@ def getPPDPath1(addtional_paths=None):
+
+ def getAllowableMIMETypes():
+ """
+- Scan all /etc/cups/*.convs and /usr/share/cups/mime
++ Scan all /usr/local/etc/cups/*.convs and /usr/local/share/cups/mime
+ files for allowable file formats.
+ """
+ paths = []
+ allowable_mime_types = []
+ files = []
+- if os.path.exists("/etc/cups"):
+- paths.append("/etc/cups/*.convs")
+- if os.path.exists("/usr/share/cups/mime"):
+- paths.append("/usr/share/cups/mime/*.convs")
++ if os.path.exists("/usr/local/etc/cups"):
++ paths.append("/usr/local/etc/cups/*.convs")
++ if os.path.exists("/usr/local/share/cups/mime"):
++ paths.append("/usr/local/share/cups/mime/*.convs")
+ for path in paths:
+ files.extend(glob.glob(path))
+ for f in files:
+@@ -337,11 +337,11 @@ def getSystemPPDs():
+ else: # 1.2.x
+ log.debug("(CUPS 1.2.x) Getting list of PPDs using CUPS_GET_PPDS...")
+ ppd_dict = cupsext.getPPDList()
+- cups_ppd_path = getPPDPath() # usually /usr/share/cups/model
+- foomatic_ppd_path = sys_conf.get('dirs', 'ppdbase', '/usr/share/ppd')
++ cups_ppd_path = getPPDPath() # usually /usr/local/share/cups/model
++ foomatic_ppd_path = sys_conf.get('dirs', 'ppdbase', '/usr/local/share/ppd')
+
+ if not foomatic_ppd_path or not os.path.exists(foomatic_ppd_path):
+- foomatic_ppd_path = '/usr/share/ppd'
++ foomatic_ppd_path = '/usr/local/share/ppd'
+
+ log.debug("CUPS PPD base path = %s" % cups_ppd_path)
+ log.debug("Foomatic PPD base path = %s" % foomatic_ppd_path)
+@@ -360,8 +360,8 @@ def getSystemPPDs():
+ 'gutenprint' in ppd):
+
+ # PPD files returned by CUPS_GET_PPDS (and by lpinfo -m)
+- # can be relative to /usr/share/ppd/ or to
+- # /usr/share/cups/model/. Not sure why this is.
++ # can be relative to /usr/local/share/ppd/ or to
++ # /usr/local/share/cups/model/. Not sure why this is.
+ # Here we will try both and see which one it is...
+
+ if os.path.exists(ppd):
+@@ -699,7 +699,7 @@ def getFaxPPDFile(mq, model):
+
+
+ def getErrorLogLevel():
+- cups_conf = '/etc/cups/cupsd.conf'
++ cups_conf = '/usr/local/etc/cups/cupsd.conf'
+ try:
+ f = open(cups_conf, 'r')
+ except OSError:
diff --git a/print/hplip/files/patch-prnt_filters_hpps b/print/hplip/files/patch-prnt_filters_hpps
new file mode 100644
index 000000000000..ce26d356da11
--- /dev/null
+++ b/print/hplip/files/patch-prnt_filters_hpps
@@ -0,0 +1,20 @@
+--- prnt/filters/hpps.orig 2022-02-23 07:41:04 UTC
++++ prnt/filters/hpps
+@@ -48,7 +48,7 @@ output_fd = 1
+
+ job_id = 0
+ pid = os.getpid()
+-config_file = '/etc/hp/hplip.conf'
++config_file = '/usr/local/etc/hp/hplip.conf'
+ home_dir = ''
+
+
+@@ -68,7 +68,7 @@ if os.path.exists(config_file):
+ bug("Error setting home directory: home= under [dirs] not found.")
+ sys.exit(CUPS_FILTER_FAILED)
+ else:
+- bug("Error setting home directory: /etc/hp/hplip.conf not found")
++ bug("Error setting home directory: /usr/local/etc/hp/hplip.conf not found")
+ sys.exit(CUPS_FILTER_FAILED)
+
+ if not home_dir or not os.path.exists(home_dir):
diff --git a/print/hplip/files/patch-prnt_hpcups_CommonDefinitions.h b/print/hplip/files/patch-prnt_hpcups_CommonDefinitions.h
index 970d609a7aff..f673dfff1ea8 100644
--- a/print/hplip/files/patch-prnt_hpcups_CommonDefinitions.h
+++ b/print/hplip/files/patch-prnt_hpcups_CommonDefinitions.h
@@ -1,4 +1,4 @@
---- prnt/hpcups/CommonDefinitions.h.orig 2016-09-23 08:47:53 UTC
+--- prnt/hpcups/CommonDefinitions.h.orig 2022-02-23 07:41:04 UTC
+++ prnt/hpcups/CommonDefinitions.h
@@ -41,6 +41,7 @@
#include <sys/stat.h>
diff --git a/print/hplip/files/patch-prnt_hpcups_ErnieFilter.cpp b/print/hplip/files/patch-prnt_hpcups_ErnieFilter.cpp
index df9090bfc370..e011d2e1f7ac 100644
--- a/print/hplip/files/patch-prnt_hpcups_ErnieFilter.cpp
+++ b/print/hplip/files/patch-prnt_hpcups_ErnieFilter.cpp
@@ -1,4 +1,4 @@
---- prnt/hpcups/ErnieFilter.cpp.orig 2016-08-26 10:03:22 UTC
+--- prnt/hpcups/ErnieFilter.cpp.orig 2022-02-23 07:41:04 UTC
+++ prnt/hpcups/ErnieFilter.cpp
@@ -50,7 +50,8 @@
#include "ErnieFilter.h"
diff --git a/print/hplip/files/patch-prnt_hpcups_HPCupsFilter.cpp b/print/hplip/files/patch-prnt_hpcups_HPCupsFilter.cpp
index 33d841e313f9..f5ae47fea511 100644
--- a/print/hplip/files/patch-prnt_hpcups_HPCupsFilter.cpp
+++ b/print/hplip/files/patch-prnt_hpcups_HPCupsFilter.cpp
@@ -1,62 +1,20 @@
---- prnt/hpcups/HPCupsFilter.cpp.orig 2019-10-22 06:14:20 UTC
+--- prnt/hpcups/HPCupsFilter.cpp.orig 2022-02-23 07:41:04 UTC
+++ prnt/hpcups/HPCupsFilter.cpp
-@@ -31,7 +31,6 @@
- \*****************************************************************************/
-
- #include "HPCupsFilter.h"
--#include "ImageProcessor.h"
-
- #include <signal.h>
- #include <sys/wait.h>
-@@ -637,16 +636,10 @@ int HPCupsFilter::processRasterData(cups_raster_t *cup
-
-
- sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
-- image_processor_t* imageProcessor = imageProcessorCreate();
-
- while (cupsRasterReadHeader2(cups_raster, &cups_header))
- {
-
-- IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header);
-- if (result != IPE_SUCCESS){
-- dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result);
-- }
--
- current_page_number++;
-
- if (current_page_number == 1) {
-@@ -745,12 +738,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cup
- color_raster = rgbRaster;
- black_raster = kRaster;
-
-- result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine);
-- if (result != IPE_SUCCESS){
-- dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result);
-- }
--
--
- if ((y == 0) && !is_ljmono) {
- //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer
- //may not skip blank lines before actual data
-@@ -780,12 +767,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cup
+@@ -754,7 +754,7 @@ int HPCupsFilter::processRasterData(cups_raster_t *cup
+ createTempFile(szFileName, &cfp);
+ if (cfp)
+ {
+- chmod (szFileName, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
++ chmod (szFileName, S_IRUSR | S_IWUSR | S_IRGRP | 0 | S_IROTH);
+ }
}
- } // for() loop end
-- result = imageProcessorEndPage(imageProcessor);
-- if (result != IPE_SUCCESS){
-- dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result);
-- }
--
--
- m_Job.NewPage();
- if (err != NO_ERROR) {
- break;
-@@ -799,8 +780,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cup
- kRaster = NULL;
- rgbRaster = NULL;
- }
--
-- imageProcessorDestroy(imageProcessor);
+@@ -765,7 +765,7 @@ int HPCupsFilter::processRasterData(cups_raster_t *cup
+ createTempFile(szFileName, &kfp);
+ if (kfp)
+ {
+- chmod (szFileName, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
++ chmod (szFileName, S_IRUSR | S_IWUSR | S_IRGRP | 0 | S_IROTH);
+ }
+ }
- unlink(hpPreProcessedRasterFile);
- return ret_status;
diff --git a/print/hplip/files/patch-prnt_hpcups_SystemServices.cpp b/print/hplip/files/patch-prnt_hpcups_SystemServices.cpp
new file mode 100644
index 000000000000..c7e3fe13f475
--- /dev/null
+++ b/print/hplip/files/patch-prnt_hpcups_SystemServices.cpp
@@ -0,0 +1,11 @@
+--- prnt/hpcups/SystemServices.cpp.orig 2022-02-23 07:41:04 UTC
++++ prnt/hpcups/SystemServices.cpp
+@@ -42,7 +42,7 @@ SystemServices::SystemServices(int iLogLevel, int job_
+ createTempFile(fname, &m_fp);
+ if (m_fp)
+ {
+- chmod(fname, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
++ chmod(fname, S_IRUSR | S_IWUSR | S_IRGRP | 0 | S_IROTH);
+ }
+ }
+ }
diff --git a/print/hplip/files/patch-prnt_hpcups_genJPEGStrips.cpp b/print/hplip/files/patch-prnt_hpcups_genJPEGStrips.cpp
index a5f60fd0e0ba..0bf48f3227d1 100644
--- a/print/hplip/files/patch-prnt_hpcups_genJPEGStrips.cpp
+++ b/print/hplip/files/patch-prnt_hpcups_genJPEGStrips.cpp
@@ -1,4 +1,4 @@
---- prnt/hpcups/genJPEGStrips.cpp.orig 2017-12-19 19:39:29 UTC
+--- prnt/hpcups/genJPEGStrips.cpp.orig 2022-02-23 07:41:04 UTC
+++ prnt/hpcups/genJPEGStrips.cpp
@@ -28,7 +28,6 @@ extern "C"
diff --git a/print/hplip/files/patch-prnt_hpijs_hpcupsfax.cpp b/print/hplip/files/patch-prnt_hpijs_hpcupsfax.cpp
new file mode 100644
index 000000000000..217e6bc7105c
--- /dev/null
+++ b/print/hplip/files/patch-prnt_hpijs_hpcupsfax.cpp
@@ -0,0 +1,20 @@
+--- prnt/hpijs/hpcupsfax.cpp.orig 2022-02-23 07:41:05 UTC
++++ prnt/hpijs/hpcupsfax.cpp
+@@ -94,7 +94,7 @@ static void GetLogLevel ()
+ FILE *fp;
+ char str[258];
+ char *p;
+- fp = fopen ("/etc/cups/cupsd.conf", "r");
++ fp = fopen ("/usr/local/etc/cups/cupsd.conf", "r");
+ if (fp == NULL)
+ return;
+ while (!feof (fp))
+@@ -687,7 +687,7 @@ int main (int argc, char **argv)
+ return 1;
+ }
+ else
+- chmod(hpFileName, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP );
++ chmod(hpFileName, S_IRUSR | S_IWUSR | S_IRGRP | 0 );
+
+ /*********** MAIN ***********/
+
diff --git a/print/hplip/files/patch-prnt_hpps_hppsfilter.c b/print/hplip/files/patch-prnt_hpps_hppsfilter.c
index ed13628e6621..2b2db136b071 100644
--- a/print/hplip/files/patch-prnt_hpps_hppsfilter.c
+++ b/print/hplip/files/patch-prnt_hpps_hppsfilter.c
@@ -1,6 +1,15 @@
---- prnt/hpps/hppsfilter.c.orig 2019-11-04 10:12:15 UTC
+--- prnt/hpps/hppsfilter.c.orig 2022-02-23 07:41:05 UTC
+++ prnt/hpps/hppsfilter.c
-@@ -104,7 +104,7 @@ static void open_tempbookletfile(char *mode)
+@@ -53,7 +53,7 @@ static void get_LogLevel ()
+ FILE *fp;
+ char str[258];
+ char *p;
+- fp = fopen ("/etc/cups/cupsd.conf", "r");
++ fp = fopen ("/usr/local/etc/cups/cupsd.conf", "r");
+ if (fp == NULL)
+ return;
+ while (!feof (fp))
+@@ -105,7 +105,7 @@ static void open_tempbookletfile(char *mode)
if(ptempbooklet_file == NULL)
{
fprintf(stderr, "ERROR: Unable to open temp file %s\n", temp_filename);
diff --git a/print/hplip/files/patch-protocol_discovery_mdns.c b/print/hplip/files/patch-protocol_discovery_mdns.c
deleted file mode 100644
index f22417a63aa3..000000000000
--- a/print/hplip/files/patch-protocol_discovery_mdns.c
+++ /dev/null
@@ -1,86 +0,0 @@
-Use a dynamically allocated port instead of binding port 5353. The bind(2)
-call fails when Avahi has already claimed port 5353. On top of that, HPLIP
-only performs one-shot queries and those shouldn't be using port 5353 according
-to RFC 6762.
-
-Don't disable loop-back. It's harmless.
-
-Use default TTL of 1. RFC 6762 requires 255 for responses, not for queries.
-
-There's no need to join the multicast group for one-shot queries. Responses
-are sent to the unicast address.
-
---- protocol/discovery/mdns.c.orig 2020-07-01 14:48:56 UTC
-+++ protocol/discovery/mdns.c
-@@ -24,7 +24,11 @@
- Author: Sanjay Kumar
- \*****************************************************************************/
-
--//#include <stdio.h>
-+#include <ctype.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <unistd.h>
-+#include <sys/select.h>
- #include <string.h>
- #include <syslog.h>
- #include <sys/socket.h>
-@@ -70,57 +74,13 @@ static int mdns_convert_name_to_dns(const char *name,
- static int mdns_open_socket(int *psocket)
- {
- int stat = MDNS_STATUS_ERROR;
-- int udp_socket = -1, yes = 1;
-- char loop = 0, ttl = 255;
-- struct sockaddr_in recv_addr , addr;
-- struct ip_mreq mreq;
-+ int udp_socket;
-
- DBG("mdns_open_socket entry.\n");
-
- if ((udp_socket = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
- {
- BUG("unable to create udp socket: %m\n");
-- goto bugout;
-- }
--
-- /* Get rid of "address already in use" error message. */
-- if (setsockopt(udp_socket, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) == -1)
-- {
-- BUG("unable to setsockopt: %m\n");
-- goto bugout;
-- }
--
-- /* Bind the socket to port and IP equal to INADDR_ANY. */
-- bzero(&recv_addr, sizeof(recv_addr));
-- recv_addr.sin_family = AF_INET;
-- recv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
-- recv_addr.sin_port = htons(5353);
-- if (bind(udp_socket, (struct sockaddr *) &recv_addr, sizeof(recv_addr)) == -1)
-- {
-- BUG("unable to bind udp socket: %m\n");
-- goto bugout;
-- }
--
-- /* Set multicast loopback off. */
-- if (setsockopt(udp_socket, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop)) == -1)
-- {
-- BUG("unable to setsockopt: %m\n");
-- goto bugout;
-- }
--
-- /* Set ttl to 255. Required by mdns. */
-- if (setsockopt(udp_socket, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl))== -1)
-- {
-- BUG("unable to setsockopt: %m\n");
-- goto bugout;
-- }
--
-- /* Join the .local multicast group */
-- mreq.imr_multiaddr.s_addr = inet_addr("224.0.0.251");
-- mreq.imr_interface.s_addr = htonl(INADDR_ANY);
-- if (setsockopt(udp_socket, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(struct ip_mreq)) == -1) {
-- BUG("unable to add to multicast group: %m\n");
-- close(udp_socket);
- goto bugout;
- }
-
diff --git a/print/hplip/files/patch-scan_sane_OrbliteScan_BSDCommon.h b/print/hplip/files/patch-scan_sane_OrbliteScan_BSDCommon.h
deleted file mode 100644
index 4e1a491be188..000000000000
--- a/print/hplip/files/patch-scan_sane_OrbliteScan_BSDCommon.h
+++ /dev/null
@@ -1,63 +0,0 @@
---- scan/sane/OrbliteScan/BSDCommon.h.orig 2019-11-03 16:02:42 UTC
-+++ scan/sane/OrbliteScan/BSDCommon.h
-@@ -0,0 +1,60 @@
-+#ifndef H_BSDCommon
-+#define H_BSDCommon
-+
-+#include <sys/types.h>
-+
-+/* Common typedefs for BSD */
-+
-+typedef unsigned char * StringPtr;
-+typedef unsigned char Boolean;
-+typedef char * Ptr;
-+
-+typedef unsigned char UInt8;
-+typedef UInt8* PUInt8;
-+typedef signed char SInt8;
-+typedef unsigned short UInt16;
-+typedef signed short SInt16;
-+typedef u_int32_t UInt32;
-+typedef int32_t SInt32;
-+//typedef unsigned long UInt32;
-+//typedef signed long SInt32;
-+typedef int64_t SInt64;
-+typedef uint64_t UInt64;
-+//typedef __S64_TYPE int64_t;
-+//typedef __U64_TYPE uint64_t;
-+
-+//typedef unsigned long ULONG;
-+//typedef void* LPVOID;
-+//typedef long HRESULT;
-+//typedef int32_t HRESULT;
-+
-+typedef SInt16 OSErr;
-+
-+typedef unsigned long FourCharCode;
-+typedef FourCharCode OSType;
-+
-+typedef void IUnknown;
-+
-+#define FAILED(Status) ((HRESULT)(Status) < 0)
-+
-+/* dummy definitions - TODO: define these ... or not? */
-+
-+typedef int FSSpec;
-+typedef int CFURLRef;
-+typedef int CFBundleRef;
-+typedef void* Handle; // needed by Python driver
-+
-+/* re-define MAC-only memory API to POSIX-compliant */
-+#define NewPtr malloc /* MAC */
-+#define DisposePtr free /* MAC */
-+
-+/* re-define WinDoze-only memory API to POSIX-compliant */
-+/* currently not used because we are using #ifdef __MAC__ */
-+
-+// #define CoTaskMemAlloc malloc
-+// #define CoTaskMemFree free
-+// #define CoTaskMemRealloc realloc
-+
-+
-+#endif /* H_BSDCommon */
-+
diff --git a/print/hplip/files/patch-scan_sane_OrbliteScan_LinuxCommon.h b/print/hplip/files/patch-scan_sane_OrbliteScan_LinuxCommon.h
new file mode 100644
index 000000000000..38b8a7667add
--- /dev/null
+++ b/print/hplip/files/patch-scan_sane_OrbliteScan_LinuxCommon.h
@@ -0,0 +1,13 @@
+--- scan/sane/OrbliteScan/LinuxCommon.h.orig 2022-03-07 20:11:09 UTC
++++ scan/sane/OrbliteScan/LinuxCommon.h
+@@ -18,10 +18,6 @@ typedef u_int32_t UInt32;
+ typedef int32_t SInt32;
+ //typedef unsigned long UInt32;
+ //typedef signed long SInt32;
+-typedef __S64_TYPE SInt64;
+-typedef __U64_TYPE UInt64;
+-typedef __S64_TYPE int64_t;
+-typedef __U64_TYPE uint64_t;
+
+ //typedef unsigned long ULONG;
+ //typedef void* LPVOID;
diff --git a/print/hplip/files/patch-scan_sane_OrbliteScan_MacCommon.h b/print/hplip/files/patch-scan_sane_OrbliteScan_MacCommon.h
index b14dd9819687..7e45e1bdd98b 100644
--- a/print/hplip/files/patch-scan_sane_OrbliteScan_MacCommon.h
+++ b/print/hplip/files/patch-scan_sane_OrbliteScan_MacCommon.h
@@ -1,26 +1,21 @@
---- scan/sane/OrbliteScan/MacCommon.h.orig 2019-10-22 06:21:36 UTC
+--- scan/sane/OrbliteScan/MacCommon.h.orig 2022-02-23 07:41:05 UTC
+++ scan/sane/OrbliteScan/MacCommon.h
-@@ -1,7 +1,7 @@
+@@ -1,12 +1,12 @@
#ifndef H_MacCommon
#define H_MacCommon
-#ifndef __linux__
-+#if !defined(__linux__) && !defined(__FreeBSD__)
++#ifdef __APPLE__
#include <CoreFoundation/CFPlugInCOM.h>
#define __CFPlugInCOM_Included__
#endif
-@@ -10,6 +10,10 @@
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__)
# include "LinuxCommon.h"
#endif
-+#if defined(__FreeBSD__)
-+# include "BSDCommon.h"
-+#endif
-+
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
-@@ -257,7 +261,7 @@ typedef struct _GUID {
+@@ -257,7 +257,7 @@ typedef struct _GUID {
typedef GUID CLSID;
diff --git a/print/hplip/files/patch-scan_sane_hpaio.c b/print/hplip/files/patch-scan_sane_hpaio.c
index 1db522c34b14..80d83cd2eadf 100644
--- a/print/hplip/files/patch-scan_sane_hpaio.c
+++ b/print/hplip/files/patch-scan_sane_hpaio.c
@@ -1,20 +1,10 @@
---- scan/sane/hpaio.c.orig 2019-10-22 06:25:58 UTC
+--- scan/sane/hpaio.c.orig 2022-02-23 07:41:05 UTC
+++ scan/sane/hpaio.c
-@@ -419,7 +419,7 @@ extern void sane_hpaio_close(SANE_Handle handle)
- if (strcmp(*((char **)handle), "ESCL") == 0)
- return escl_close(handle);
- if (strcmp(*((char **)handle), "ORBLITE") == 0)
-- return orblite_close(handle);
-+ orblite_close(handle);
- } /* sane_hpaio_close() */
+@@ -51,6 +51,7 @@
+ #include "escl.h"
+ #include "io.h"
+ #include "orblitei.h"
++#include "orblite.h"
- extern const SANE_Option_Descriptor * sane_hpaio_get_option_descriptor(SANE_Handle handle, SANE_Int option)
-@@ -552,7 +552,7 @@ extern void sane_hpaio_cancel( SANE_Handle handle )
- if (strcmp(*((char **)handle), "ESCL") == 0)
- return escl_cancel(handle);
- if (strcmp(*((char **)handle), "ORBLITE") == 0)
-- return orblite_cancel(handle);
-+ orblite_cancel(handle);
- } /* sane_hpaio_cancel() */
- extern SANE_Status sane_hpaio_set_io_mode(SANE_Handle handle, SANE_Bool nonBlocking)
+ #define DEBUG_DECLARE_ONLY
diff --git a/print/hplip/files/patch-scan_sane_io.c b/print/hplip/files/patch-scan_sane_io.c
new file mode 100644
index 000000000000..a4745da2a4db
--- /dev/null
+++ b/print/hplip/files/patch-scan_sane_io.c
@@ -0,0 +1,14 @@
+--- scan/sane/io.c.orig 2022-02-23 07:41:05 UTC
++++ scan/sane/io.c
+@@ -92,9 +92,10 @@ int __attribute__ ((visibility ("hidden"))) SendScanEv
+ DBUS_TYPE_STRING, &title,
+ DBUS_TYPE_INVALID);
+
+- if (!dbus_connection_send(dbus_conn, msg, NULL))
++ if (NULL == dbus_conn || !dbus_connection_send(dbus_conn, msg, NULL))
+ {
+ BUG("dbus message send failed!\n");
++ dbus_message_unref(msg);
+ return 0;
+ }
+
diff --git a/print/hplip/files/patch-scan_sane_orblite.c b/print/hplip/files/patch-scan_sane_orblite.c
index eee188971cc6..e3aed6fae952 100644
--- a/print/hplip/files/patch-scan_sane_orblite.c
+++ b/print/hplip/files/patch-scan_sane_orblite.c
@@ -1,4 +1,4 @@
---- scan/sane/orblite.c.orig 2019-10-22 06:25:58 UTC
+--- scan/sane/orblite.c.orig 2022-03-07 20:11:09 UTC
+++ scan/sane/orblite.c
@@ -315,7 +315,7 @@ orblite_open (SANE_String_Const devicename, SANE_Handl
void
diff --git a/print/hplip/files/patch-ui5_devmgr5.py b/print/hplip/files/patch-ui5_devmgr5.py
new file mode 100644
index 000000000000..16be209abb90
--- /dev/null
+++ b/print/hplip/files/patch-ui5_devmgr5.py
@@ -0,0 +1,11 @@
+--- ui5/devmgr5.py.orig 2022-02-23 07:41:05 UTC
++++ ui5/devmgr5.py
+@@ -1073,7 +1073,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QM
+ return
+
+ hplip_conf = configparser.ConfigParser()
+- fp = open("/etc/hp/hplip.conf", "r")
++ fp = open("/usr/local/etc/hp/hplip.conf", "r")
+ hplip_conf.readfp(fp)
+ fp.close()
+
diff --git a/print/hplip/files/patch-ui5_scandialog.py b/print/hplip/files/patch-ui5_scandialog.py
new file mode 100644
index 000000000000..cd15c95d1c61
--- /dev/null
+++ b/print/hplip/files/patch-ui5_scandialog.py
@@ -0,0 +1,23 @@
+--- ui5/scandialog.py.orig 2022-02-23 07:41:05 UTC
++++ ui5/scandialog.py
+@@ -242,17 +242,17 @@ class Ui_HpScan(object):
+ self.label_Flatbed = QtWidgets.QLabel(self.dockWidgetContents)
+ self.label_Flatbed.setGeometry(QtCore.QRect(10, 150, 51, 41))
+ self.label_Flatbed.setText("")
+- self.label_Flatbed.setPixmap(QtGui.QPixmap("/usr/share/hplip/data/images/other/flat1.png"))
++ self.label_Flatbed.setPixmap(QtGui.QPixmap("/usr/local/share/hplip/data/images/other/flat1.png"))
+ self.label_Flatbed.setObjectName("label_Flatbed")
+ self.label_Color = QtWidgets.QLabel(self.dockWidgetContents)
+ self.label_Color.setGeometry(QtCore.QRect(20, 210, 61, 41))
+ self.label_Color.setText("")
+- self.label_Color.setPixmap(QtGui.QPixmap("/usr/share/hplip/data/images/other/viewer.png"))
++ self.label_Color.setPixmap(QtGui.QPixmap("/usr/local/share/hplip/data/images/other/viewer.png"))
+ self.label_Color.setObjectName("label_Color")
+ self.label_Resolution = QtWidgets.QLabel(self.dockWidgetContents)
+ self.label_Resolution.setGeometry(QtCore.QRect(20, 270, 51, 51))
+ self.label_Resolution.setText("")
+- self.label_Resolution.setPixmap(QtGui.QPixmap("/usr/share/hplip/data/images/other/resolution.png"))
++ self.label_Resolution.setPixmap(QtGui.QPixmap("/usr/local/share/hplip/data/images/other/resolution.png"))
+ self.label_Resolution.setObjectName("label_Resolution")
+ self.auto_orient = QtWidgets.QCheckBox(self.dockWidgetContents)
+ self.auto_orient.setGeometry(QtCore.QRect(300,70,117, 22))