1959242 - hplip-3.21.12 is available

This commit is contained in:
Zdenek Dohnal 2022-01-17 15:55:49 +01:00
parent 7153ae8af4
commit 11664de4a6
15 changed files with 219 additions and 558 deletions

1
.gitignore vendored
View File

@ -103,3 +103,4 @@ hplip-3.10.6.tar.gz
/hplip-3.20.11.tar.gz
/hplip-3.21.2.tar.gz
/hplip-3.21.2-repack.tar.gz
/hplip-3.21.12-repack.tar.gz

View File

@ -1,16 +1,17 @@
diff -up hplip-3.21.2/Makefile.am.libimageprocessor-removal hplip-3.21.2/Makefile.am
--- hplip-3.21.2/Makefile.am.libimageprocessor-removal 2021-02-24 12:38:31.707900421 +0100
+++ hplip-3.21.2/Makefile.am 2021-02-24 12:38:31.735900172 +0100
diff --git a/Makefile.am b/Makefile.am
index f65afea..12317dc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -167,7 +167,7 @@ if !HPLIP_CLASS_DRIVER
dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
endif #HPLIP_CLASS_DRIVER
-dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so
+dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template
dist_noinst_SCRIPTS += dat2drv.py install.py hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv
if !HPLIP_CLASS_DRIVER
@@ -595,7 +595,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilte
dist_noinst_DATA += prnt/ipp-usb/HPLIP.conf
dist_noinst_SCRIPTS += dat2drv.py install.py hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv
@@ -597,7 +597,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp
prnt/hpcups/ImageProcessor.h
hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
@ -19,7 +20,7 @@ diff -up hplip-3.21.2/Makefile.am.libimageprocessor-removal hplip-3.21.2/Makefil
#else
#hpcupsdir = $(cupsfilterdir)
#hpcups_PROGRAMS = hpcups
@@ -685,16 +685,6 @@ endif #HPLIP_CLASS_DRIVER
@@ -687,16 +687,6 @@ endif #HPLIP_CLASS_DRIVER
install-data-hook:
if HPLIP_BUILD
@ -33,80 +34,6 @@ diff -up hplip-3.21.2/Makefile.am.libimageprocessor-removal hplip-3.21.2/Makefil
- chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \
- ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \
- fi
if !HPLIP_CLASS_DRIVER
# If scanner build, add hpaio entry to sane dll.conf.
if [ "$(scan_build)" = "yes" ]; then \
diff -up hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp
--- hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal 2021-02-24 12:38:31.701900474 +0100
+++ hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp 2021-02-24 12:42:49.445720549 +0100
@@ -31,7 +31,6 @@
\*****************************************************************************/
#include "HPCupsFilter.h"
-#include "ImageProcessor.h"
#include <signal.h>
#include <sys/wait.h>
@@ -659,21 +658,8 @@ int HPCupsFilter::processRasterData(cups
snprintf(hpPreProcessedRasterFile, sizeof (hpPreProcessedRasterFile), "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
- image_processor_t* imageProcessor=NULL;
- IMAGE_PROCESSOR_ERROR result;
- //added if condition to check if pinter language is "ljzjstream"
- //If so, then bypass imageprocessing functions while running HPCUPS filter.
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0){
- imageProcessor = imageProcessorCreate();
- }
while (cupsRasterReadHeader2(cups_raster, &cups_header))
{
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0){
- 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) {
@@ -772,14 +758,6 @@ int HPCupsFilter::processRasterData(cups
color_raster = rgbRaster;
black_raster = kRaster;
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0)
- {
- 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
@@ -809,14 +787,6 @@ int HPCupsFilter::processRasterData(cups
}
} // for() loop end
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0)
- {
- result = imageProcessorEndPage(imageProcessor);
- if (result != IPE_SUCCESS){
- dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result);
- }
- }
-
m_Job.NewPage();
if (err != NO_ERROR) {
break;
@@ -832,10 +802,6 @@ int HPCupsFilter::processRasterData(cups
}
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0)
- {
- imageProcessorDestroy(imageProcessor);
- }
unlink(hpPreProcessedRasterFile);
return ret_status;
}
if [ -d "/usr/share/ipp-usb/quirks/" ]; then \
echo "ipp-usb directory exists"; \
cp prnt/ipp-usb/HPLIP.conf /usr/share/ipp-usb/quirks/ ; \

View File

@ -1,6 +1,7 @@
diff -up hplip-3.20.3/base/tui.py.keyserver hplip-3.20.3/base/tui.py
--- hplip-3.20.3/base/tui.py.keyserver 2020-03-10 09:01:53.000000000 +0100
+++ hplip-3.20.3/base/tui.py 2020-04-07 08:44:44.319710001 +0200
diff --git a/base/tui.py b/base/tui.py
index 99bda7b..0f90f92 100644
--- a/base/tui.py
+++ b/base/tui.py
@@ -241,6 +241,7 @@ class ProgressMeter(object):
sys.stdout.write(y)
@ -9,30 +10,25 @@ diff -up hplip-3.20.3/base/tui.py.keyserver hplip-3.20.3/base/tui.py
self.prev_length = len(y)
self.spinner_pos = (self.spinner_pos + 1) % 8
diff -up hplip-3.20.3/base/validation.py.keyserver hplip-3.20.3/base/validation.py
--- hplip-3.20.3/base/validation.py.keyserver 2020-03-10 09:01:53.000000000 +0100
+++ hplip-3.20.3/base/validation.py 2020-04-07 08:45:46.657132415 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# (c) Copyright 2015 HP Development Company, L.P.
diff --git a/base/validation.py b/base/validation.py
index ee6b05a..5e955dc 100644
--- a/base/validation.py
+++ b/base/validation.py
@@ -42,8 +42,11 @@ class DigiSign_Verification(object):
class GPG_Verification(DigiSign_Verification):
- def __init__(self, pgp_site = 'pgp.mit.edu', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9):
- self.__pgp_site = pgp_site
+ def __init__(self, keyservers = ['pool.sks-keyservers.net',
+ 'keyserver.ubuntu.com',
+ 'sks-keyservers.net', 'pgp.mit.edu'],
+ def __init__(self, keyservers = ['keyserver.ubuntu.com',
+ 'pgp.surf.nl',
+ 'pgp.mit.edu'],
+ key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9):
+ self.__keyservers = keyservers
self.__key = key
self.__gpg = utils.which('gpg',True)
@@ -82,13 +85,18 @@ class GPG_Verification(DigiSign_Verifica
@@ -82,13 +85,18 @@ class GPG_Verification(DigiSign_Verification):
def __acquire_gpg_key(self):

View File

@ -1,18 +1,18 @@
diff -up hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.logdir hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp
--- hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.logdir 2021-02-19 07:46:48.334843864 +0100
+++ hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp 2021-02-19 07:48:18.052963216 +0100
@@ -656,7 +656,7 @@ int HPCupsFilter::processRasterData(cups
diff -up hplip-3.21.12/prnt/hpcups/HPCupsFilter.cpp.logdir hplip-3.21.12/prnt/hpcups/HPCupsFilter.cpp
--- hplip-3.21.12/prnt/hpcups/HPCupsFilter.cpp.logdir 2022-01-12 11:27:25.509348511 +0100
+++ hplip-3.21.12/prnt/hpcups/HPCupsFilter.cpp 2022-01-12 11:29:11.507661838 +0100
@@ -669,7 +669,7 @@ int HPCupsFilter::processRasterData(cups
char hpPreProcessedRasterFile[MAX_FILE_PATH_LEN]; //temp file needed to store raster data with swaped pages.
- sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
+ snprintf(hpPreProcessedRasterFile, sizeof (hpPreProcessedRasterFile), "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
image_processor_t* imageProcessor=NULL;
IMAGE_PROCESSOR_ERROR result;
diff -up hplip-3.21.2/prnt/hpcups/SystemServices.cpp.logdir hplip-3.21.2/prnt/hpcups/SystemServices.cpp
--- hplip-3.21.2/prnt/hpcups/SystemServices.cpp.logdir 2021-02-15 00:55:21.000000000 +0100
+++ hplip-3.21.2/prnt/hpcups/SystemServices.cpp 2021-02-19 07:46:48.334843864 +0100
#ifndef DISABLE_IMAGEPROCESSOR
image_processor_t* imageProcessor=NULL;
IMAGE_PROCESSOR_ERROR result;
diff -up hplip-3.21.12/prnt/hpcups/SystemServices.cpp.logdir hplip-3.21.12/prnt/hpcups/SystemServices.cpp
--- hplip-3.21.12/prnt/hpcups/SystemServices.cpp.logdir 2021-12-13 10:07:36.000000000 +0100
+++ hplip-3.21.12/prnt/hpcups/SystemServices.cpp 2022-01-12 11:27:25.509348511 +0100
@@ -38,7 +38,7 @@ SystemServices::SystemServices(int iLogL
if (iLogLevel & SAVE_OUT_FILE)
{

View File

@ -1,15 +1,15 @@
diff -up hplip-3.20.6/cups_drv.inc.missing-drivers hplip-3.20.6/cups_drv.inc
--- hplip-3.20.6/cups_drv.inc.missing-drivers 2020-06-09 13:23:14.000000000 +0200
+++ hplip-3.20.6/cups_drv.inc 2020-06-17 13:49:39.110952720 +0200
@@ -407,6 +407,7 @@ cups_ppd_printers = \
diff -up hplip-3.21.12/cups_drv.inc.missing-drivers hplip-3.21.12/cups_drv.inc
--- hplip-3.21.12/cups_drv.inc.missing-drivers 2021-12-13 10:09:00.000000000 +0100
+++ hplip-3.21.12/cups_drv.inc 2022-01-12 17:28:24.033378078 +0100
@@ -411,6 +411,7 @@ cups_ppd_printers = \
ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \
ppd/hpcups/hp-laserjet_cp1025.ppd.gz \
ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \
+ ppd/hpcups/hp-laserjet_cp_1025nw.ppd.gz \
ppd/hpcups/hp-laserjet_m1005.ppd.gz \
ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \
ppd/hpcups/hp-laserjet_m1120_mfp.ppd.gz \
@@ -520,6 +521,7 @@ cups_ppd_printers = \
ppd/hpcups/hp-laserjet_m109-m112.ppd.gz \
@@ -527,6 +528,7 @@ cups_ppd_printers = \
ppd/hpcups/hp-laserjet_professional_p1607dn.ppd.gz \
ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \
ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \
@ -17,9 +17,9 @@ diff -up hplip-3.20.6/cups_drv.inc.missing-drivers hplip-3.20.6/cups_drv.inc
ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \
ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \
ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \
diff -up hplip-3.20.6/data/models/models.dat.missing-drivers hplip-3.20.6/data/models/models.dat
--- hplip-3.20.6/data/models/models.dat.missing-drivers 2020-06-17 13:49:39.080953000 +0200
+++ hplip-3.20.6/data/models/models.dat 2020-06-17 13:49:39.120952626 +0200
diff -up hplip-3.21.12/data/models/models.dat.missing-drivers hplip-3.21.12/data/models/models.dat
--- hplip-3.21.12/data/models/models.dat.missing-drivers 2022-01-12 17:24:45.491790543 +0100
+++ hplip-3.21.12/data/models/models.dat 2022-01-12 17:24:45.509790591 +0100
@@ -2104,7 +2104,7 @@ usb-pid=411
usb-vid=3f0
wifi-config=0
@ -532,18 +532,18 @@ diff -up hplip-3.20.6/data/models/models.dat.missing-drivers hplip-3.20.6/data/m
[hp_laserjet_professional_p1102]
align-type=0
clean-type=0
diff -up hplip-3.20.6/Makefile.in.missing-drivers hplip-3.20.6/Makefile.in
--- hplip-3.20.6/Makefile.in.missing-drivers 2020-06-09 13:23:20.000000000 +0200
+++ hplip-3.20.6/Makefile.in 2020-06-17 13:49:39.110952720 +0200
@@ -1571,6 +1571,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase
diff -up hplip-3.21.12/Makefile.in.missing-drivers hplip-3.21.12/Makefile.in
--- hplip-3.21.12/Makefile.in.missing-drivers 2021-12-13 10:09:02.000000000 +0100
+++ hplip-3.21.12/Makefile.in 2022-01-12 17:29:11.983506989 +0100
@@ -1613,6 +1613,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase
ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \
ppd/hpcups/hp-laserjet_cp1025.ppd.gz \
ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \
+ ppd/hpcups/hp-laserjet_cp_1025nw.ppd.gz \
ppd/hpcups/hp-laserjet_m1005.ppd.gz \
ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \
ppd/hpcups/hp-laserjet_m1120_mfp.ppd.gz \
@@ -1685,6 +1686,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase
ppd/hpcups/hp-laserjet_m109-m112.ppd.gz \
@@ -1730,6 +1731,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase
ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \
ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \
ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \
@ -551,15 +551,15 @@ diff -up hplip-3.20.6/Makefile.in.missing-drivers hplip-3.20.6/Makefile.in
ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \
ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \
ppd/hpcups/hp-neverstop_laser_100x.ppd.gz \
@@ -3961,6 +3963,7 @@ dist_unrel_DATA =
@@ -4080,6 +4082,7 @@ dist_unrel_DATA =
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp1025.ppd.gz \
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \
+@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp_1025nw.ppd.gz \
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m1005.ppd.gz \
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m1120_mfp.ppd.gz \
@@ -4074,6 +4077,7 @@ dist_unrel_DATA =
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m109-m112.ppd.gz \
@@ -4196,6 +4199,7 @@ dist_unrel_DATA =
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1607dn.ppd.gz \
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \
@ -567,10 +567,10 @@ diff -up hplip-3.20.6/Makefile.in.missing-drivers hplip-3.20.6/Makefile.in
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \
diff -up hplip-3.20.6/prnt/drv/hpcups.drv.in.missing-drivers hplip-3.20.6/prnt/drv/hpcups.drv.in
--- hplip-3.20.6/prnt/drv/hpcups.drv.in.missing-drivers 2020-06-17 13:49:39.009953663 +0200
+++ hplip-3.20.6/prnt/drv/hpcups.drv.in 2020-06-17 13:51:49.576733820 +0200
@@ -22319,6 +22319,14 @@ Group "RLT/HP Real Life Technologies"
diff -up hplip-3.21.12/prnt/drv/hpcups.drv.in.missing-drivers hplip-3.21.12/prnt/drv/hpcups.drv.in
--- hplip-3.21.12/prnt/drv/hpcups.drv.in.missing-drivers 2022-01-12 17:24:45.451790435 +0100
+++ hplip-3.21.12/prnt/drv/hpcups.drv.in 2022-01-12 17:24:45.514790605 +0100
@@ -22693,6 +22693,14 @@ Group "RLT/HP Real Life Technologies"
Attribute "Product" "" "(HP LaserJet Professional p1102s Printer)"
}
{
@ -585,7 +585,7 @@ diff -up hplip-3.20.6/prnt/drv/hpcups.drv.in.missing-drivers hplip-3.20.6/prnt/d
ModelName "HP LaserJet Professional p1106"
Attribute "NickName" "" "HP LaserJet Professional p1106, hpcups $Version"
Attribute "ShortNickName" "" "HP LJ Pro p1106 hpijs"
@@ -22752,6 +22760,14 @@ Group "RLT/HP Real Life Technologies"
@@ -23126,6 +23134,14 @@ Group "RLT/HP Real Life Technologies"
PCFileName "hp-laserjet_cp1025nw.ppd"
Attribute "Product" "" "(HP LaserJet Pro cp1025nw Color Printer Series)"
}

View File

@ -1,9 +1,8 @@
diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py
index 4d7c1b8..1af8d85 100755
--- a/installer/pluginhandler.py
+++ b/installer/pluginhandler.py
@@ -164,7 +164,7 @@ class PluginHandle(object):
for src, trg, link in copies:
diff -up hplip-3.21.12/installer/pluginhandler.py.missing-links hplip-3.21.12/installer/pluginhandler.py
--- hplip-3.21.12/installer/pluginhandler.py.missing-links 2022-01-12 16:55:39.761934879 +0100
+++ hplip-3.21.12/installer/pluginhandler.py 2022-01-12 17:22:33.367435334 +0100
@@ -167,7 +167,7 @@ class PluginHandle(object):
continue
if link != "":
if not utils.check_library(link):
- self.__plugin_state = PLUGIN_FILES_CORRUPTED

View File

@ -1,21 +1,12 @@
diff --git a/base/password.py b/base/password.py
index bff9f80..d4aac78 100644
--- a/base/password.py
+++ b/base/password.py
@@ -97,13 +97,15 @@ def get_distro_name():
diff -up hplip-3.21.12/base/password.py.osname-mismatch hplip-3.21.12/base/password.py
--- hplip-3.21.12/base/password.py.osname-mismatch 2022-01-14 08:36:11.413431048 +0100
+++ hplip-3.21.12/base/password.py 2022-01-14 09:14:57.315230889 +0100
@@ -105,7 +105,7 @@ def get_distro_name():
os_name = name.read().strip()
name.close()
- os_name = os_name.lower()
+ os_name = os_name.lower().replace(' ','')
if 'MX' in distro_release_name:
os_name = "mxlinux"
if "redhatenterprise" in os_name:
os_name = 'rhel'
elif "suse" in os_name:
os_name = 'suse'
elif "arch" in os_name:
os_name = 'manjarolinux'
+ elif "fedora" in os_name:
+ os_name = 'fedora'
return os_name

View File

@ -11,16 +11,3 @@ index 2b8c447..38dca63 100644
# call mapping function
printable=tag_entry[1](values)
else:
diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py
index 48b248f..aa911a5 100644
--- a/ui5/devmgr5.py
+++ b/ui5/devmgr5.py
@@ -1267,7 +1267,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
def ActionsList_clicked(self, item):
if item is not None and self.click_lock is not item:
self.click_lock = item
- if item.cmd and isinstance(item.cmd, collections.Callable):
+ if item.cmd and isinstance(item.cmd, collections.abc.Callable):
dlg = item.cmd()
self.sendMessage('', '', EVENT_DEVICE_STOP_POLLING)
try:

View File

@ -1,76 +0,0 @@
diff --git a/io/mudext/hpmudext.c b/io/mudext/hpmudext.c
index dca3e9d..dfcd22a 100644
--- a/io/mudext/hpmudext.c
+++ b/io/mudext/hpmudext.c
@@ -24,6 +24,8 @@ Authors: Don Welch, David Suffield, Naga Samrat Chowdary Narla
\*****************************************************************************/
+#define PY_SSIZE_T_CLEAN
+
#include <Python.h>
#include <stdarg.h>
#include "hpmud.h"
@@ -187,14 +189,22 @@ static PyObject *write_channel(PyObject *self, PyObject *args)
HPMUD_CHANNEL cd;
int timeout = 30;
char * buf;
- int buf_size = 0;
+ Py_ssize_t buf_size = 0;
+ int buf_size_asInt = 0;
int bytes_written = 0;
if (!PyArg_ParseTuple(args, "iis#|i", &dd, &cd, &buf, &buf_size, &timeout))
return NULL;
+ if (buf_size < INT_MIN)
+ buf_size_asInt = INT_MIN;
+ else if (buf_size > INT_MAX)
+ buf_size_asInt = INT_MAX;
+ else
+ buf_size_asInt = (int)buf_size;
+
Py_BEGIN_ALLOW_THREADS
- result = hpmud_write_channel(dd, cd, buf, buf_size, timeout, &bytes_written);
+ result = hpmud_write_channel(dd, cd, buf, buf_size_asInt, timeout, &bytes_written);
Py_END_ALLOW_THREADS
return Py_BuildValue("(ii)", result, bytes_written);
@@ -231,14 +241,22 @@ static PyObject *set_pml(PyObject *self, PyObject *args)
char * oid;
int type;
char * data;
- int data_size;
+ Py_ssize_t data_size = 0;
+ int data_size_asInt = 0;
int pml_result;
if (!PyArg_ParseTuple(args, "iisis#", &dd, &cd, &oid, &type, &data, &data_size))
return NULL;
+ if (data_size < INT_MIN)
+ data_size_asInt = INT_MIN;
+ else if (data_size > INT_MAX)
+ data_size_asInt = INT_MAX;
+ else
+ data_size_asInt = (int)data_size;
+
Py_BEGIN_ALLOW_THREADS
- result = hpmud_set_pml(dd, cd, oid, type, (void *)data, data_size, &pml_result);
+ result = hpmud_set_pml(dd, cd, oid, type, (void *)data, data_size_asInt, &pml_result);
Py_END_ALLOW_THREADS
return Py_BuildValue("(ii)", result, pml_result);
diff --git a/scan/scanext/scanext.c b/scan/scanext/scanext.c
index 1e6b514..597abd8 100755
--- a/scan/scanext/scanext.c
+++ b/scan/scanext/scanext.c
@@ -45,6 +45,8 @@ PERFORMANCE OF THIS SOFTWARE.
*******************************************************************/
+#define PY_SSIZE_T_CLEAN
+
/* _ScanDevice objects */
#include "Python.h"

View File

@ -1,59 +0,0 @@
diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py
index aa911a5..a650017 100644
--- a/ui5/devmgr5.py
+++ b/ui5/devmgr5.py
@@ -1688,7 +1688,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
def createStatusLevelGraphic(self, percent, agent_type, w=100, h=18):
if percent:
- fw = w/100*percent
+ fw = int(w/100*percent)
else:
fw = 0
@@ -1706,12 +1706,12 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
pp.fillRect(0, 0, fw, h, QBrush(QColor(map[0])))
elif map_len == 2:
- h2 = h / 2
+ h2 = int(h / 2)
pp.fillRect(0, 0, fw, h2, QBrush(QColor(map[0])))
pp.fillRect(0, h2, fw, h, QBrush(QColor(map[1])))
elif map_len == 3:
- h3 = h / 3
+ h3 = int(h / 3)
h23 = 2 * h3
pp.fillRect(0, 0, fw, h3, QBrush(QColor(map[0])))
pp.fillRect(0, h3, fw, h23, QBrush(QColor(map[1])))
@@ -1725,8 +1725,8 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
pp.setPen(Qt.white)
# 75% ticks
- w1 = 3 * w / 4
- h6 = h / 6
+ w1 = int(3 * w / 4)
+ h6 = int(h / 6)
pp.drawLine(w1, 0, w1, h6)
pp.drawLine(w1, h, w1, h-h6)
@@ -1735,8 +1735,8 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
pp.setPen(Qt.white)
# 50% ticks
- w2 = w / 2
- h4 = h / 4
+ w2 = int(w / 2)
+ h4 = int(h / 4)
pp.drawLine(w2, 0, w2, h4)
pp.drawLine(w2, h, w2, h-h4)
@@ -1745,7 +1745,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
pp.setPen(Qt.white)
# 25% ticks
- w4 = w / 4
+ w4 = int(w / 4)
pp.drawLine(w4, 0, w4, h6)
pp.drawLine(w4, h, w4, h-h6)

View File

@ -1,93 +0,0 @@
diff --git a/copier/copier.py b/copier/copier.py
index a595baa..7794f48 100644
--- a/copier/copier.py
+++ b/copier/copier.py
@@ -73,13 +73,13 @@ class PMLCopyDevice(device.Device):
def isCopyActive(self):
if self.copy_thread is not None:
- return self.copy_thread.isAlive()
+ return self.copy_thread.is_alive()
else:
return False
def waitForCopyThread(self):
if self.copy_thread is not None and \
- self.copy_thread.isAlive():
+ self.copy_thread.is_alive():
self.copy_thread.join()
diff --git a/fax/fax.py b/fax/fax.py
index 3d69226..0878a64 100644
--- a/fax/fax.py
+++ b/fax/fax.py
@@ -478,13 +478,13 @@ class FaxDevice(device.Device):
def isSendFaxActive(self):
if self.send_fax_thread is not None:
- return self.send_fax_thread.isAlive()
+ return self.send_fax_thread.is_alive()
else:
return False
def waitForSendFaxThread(self):
if self.send_fax_thread is not None and \
- self.send_fax_thread.isAlive():
+ self.send_fax_thread.is_alive():
try:
self.send_fax_thread.join()
diff --git a/fax/pmlfax.py b/fax/pmlfax.py
index b68ff6a..b1020d0 100644
--- a/fax/pmlfax.py
+++ b/fax/pmlfax.py
@@ -179,13 +179,13 @@ class PMLFaxDevice(FaxDevice):
def isUploadLogActive(self):
if self.upload_log_thread is not None:
- return self.upload_log_thread.isAlive()
+ return self.upload_log_thread.is_alive()
else:
return False
def waitForUploadLogThread(self):
if self.upload_log_thread is not None and \
- self.upload_log_thread.isAlive():
+ self.upload_log_thread.is_alive():
self.upload_log_thread.join()
diff --git a/scan/sane.py b/scan/sane.py
index b6c4acd..e8f8db8 100755
--- a/scan/sane.py
+++ b/scan/sane.py
@@ -378,14 +378,14 @@ class ScanDevice:
def isScanActive(self):
if self.scan_thread is not None:
- return self.scan_thread.isAlive() and self.scan_thread.scan_active
+ return self.scan_thread.is_alive() and self.scan_thread.scan_active
else:
return False
def waitForScanDone(self):
if self.scan_thread is not None and \
- self.scan_thread.isAlive() and \
+ self.scan_thread.is_alive() and \
self.scan_thread.scan_active:
try:
@@ -398,9 +398,9 @@ class ScanDevice:
#time.sleep(0.5)
if self.scan_thread is not None:
while True:
- #print self.scan_thread.isAlive()
+ #print self.scan_thread.is_alive()
#print self.scan_thread.scan_active
- if self.scan_thread.isAlive() and \
+ if self.scan_thread.is_alive() and \
self.scan_thread.scan_active:
return

View File

@ -1,12 +0,0 @@
diff --git a/prnt/hpcups/CommonDefinitions.h b/prnt/hpcups/CommonDefinitions.h
index 082aec9..86763d4 100644
--- a/prnt/hpcups/CommonDefinitions.h
+++ b/prnt/hpcups/CommonDefinitions.h
@@ -48,7 +48,6 @@
#include <syslog.h>
#include <assert.h>
#include <time.h>
-#include <sys/timeb.h>
#include <string.h>
#ifndef _GNU_SOURCE

View File

@ -6,8 +6,8 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 3.21.2
Release: 15%{?dist}
Version: 3.21.12
Release: 1%{?dist}
License: GPLv2+ and MIT and BSD and IJG and GPLv2+ with exceptions and ISC
Url: https://developers.hp.com/hp-linux-imaging-and-printing
@ -46,45 +46,45 @@ Patch15: hplip-ppd-ImageableArea.patch
Patch16: hplip-scan-tmp.patch
Patch17: hplip-log-stderr.patch
Patch18: hplip-avahi-parsing.patch
Patch20: hplip-dj990c-margin.patch
Patch21: hplip-strncpy.patch
Patch22: hplip-no-write-bytecode.patch
Patch23: hplip-silence-ioerror.patch
Patch24: hplip-3165-sourceoption.patch
Patch25: hplip-noernie.patch
Patch26: hplip-appdata.patch
Patch27: hplip-check-cups.patch
Patch30: hplip-typo.patch
Patch19: hplip-dj990c-margin.patch
Patch20: hplip-strncpy.patch
Patch21: hplip-no-write-bytecode.patch
Patch22: hplip-silence-ioerror.patch
Patch23: hplip-sourceoption.patch
Patch24: hplip-noernie.patch
Patch25: hplip-appdata.patch
Patch26: hplip-check-cups.patch
Patch27: hplip-typo.patch
# python3 - recent HP release removed encoding/decoding to utf-8 in fax/pmlfax.py -
# that results in text string going into translate function in base/utils.py, which
# expects binary string because of parameters. Remove this patch if base/utils.py
# code gets fixed.
Patch31: hplip-use-binary-str.patch
Patch28: hplip-use-binary-str.patch
# m278-m281 doesn't work correctly again
Patch32: hplip-error-print.patch
Patch33: hplip-hpfax-importerror-print.patch
Patch34: hplip-wifisetup.patch
Patch29: hplip-error-print.patch
Patch30: hplip-hpfax-importerror-print.patch
Patch31: hplip-wifisetup.patch
# pgp.mit.edu keyserver got bad connection, so we need to have pool of keyservers
# to choose (Bz#1641100, launchpad#1799212)
Patch35: hplip-keyserver.patch
Patch32: hplip-keyserver.patch
# QMessagebox call was copy-pasted from Qt4 version, but Qt5 has different arguments,
# This patch solves most of them
Patch36: 0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch
Patch33: 0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch
# HP upstream introduced new binary blob, which is not open-source, so it violates
# FPG by two ways - shipping binary blob and non open source code - so it needs to be removed.
# Patch is taken from Debian.
Patch37: 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
Patch34: 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
# In hplip-3.18.10 some parts of UI code was commented out, which leaved hp-toolbox
# unusable (crashed on the start). The patch removes usages of variables, which were
# commented out.
# The patch is taken from Debian.
Patch38: 0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch
Patch35: 0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch
# hp-setup crashed when user wanted to define a path to PPD file. It was due
# byte + string variables incompatibility and it is fixed by decoding the
# bytes-like variable
# part of https://bugzilla.redhat.com/show_bug.cgi?id=1666076
# reported upstream https://bugs.launchpad.net/hplip/+bug/1814272
Patch39: hplip-add-ppd-crash.patch
Patch36: hplip-add-ppd-crash.patch
# external scripts, which are downloaded and run by hp-plugin, try to create links
# in non-existing dirs. These scripts ignore errors, so plugin is installed fine
# but then internal hp-plugin can check for plugin state, where links are checked too.
@ -93,67 +93,67 @@ Patch39: hplip-add-ppd-crash.patch
# because their external scripts try to create links in non-existing dirs.
# Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1671513
# Reported upstream: https://bugs.launchpad.net/hplip/+bug/1814574
Patch40: hplip-missing-links.patch
Patch37: hplip-missing-links.patch
# change in 3.18.9 in scanext.c caused broken scanning for HP LaserJet 3052. Since I cannot figure
# it out what author wanted by the change (it sets option number 9 to true, but different handles
# have different options, so I'm not sure what author wanted to set).
# Remove the change for now, it works for user and me.
Patch41: hplip-hplj-3052.patch
Patch38: hplip-hplj-3052.patch
# hpmud parses mdns txt record badly
# upstream tickets: https://bugs.launchpad.net/hplip/+bug/1797501
# https://bugs.launchpad.net/hplip/+bug/1817214
# https://bugs.launchpad.net/hplip/+bug/1821932
# with no response from upstream
# Patch taken from Debian https://lists.debian.org/debian-printing/2018/11/msg00049.html
Patch42: hplip-hpmud-string-parse.patch
Patch39: hplip-hpmud-string-parse.patch
# Part of https://bugzilla.redhat.com/show_bug.cgi?id=1694663
# It was found out that specific device needs plugin for scanning
# Reported upstream as https://bugs.launchpad.net/hplip/+bug/1822762
Patch43: hplip-m278-m281-needs-plugin.patch
Patch40: hplip-m278-m281-needs-plugin.patch
# hpcups crashes when a printer needs a plugin and does not have one installed
# it crashes in destructor, because pointer is not initialized
# bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1695716
# reported upstream
Patch44: hplip-hpcups-crash.patch
Patch41: hplip-hpcups-crash.patch
# Fixing the issues found by coverity scan
# reported upstream https://bugs.launchpad.net/hplip/+bug/1808145
Patch45: hplip-covscan.patch
Patch42: hplip-covscan.patch
# Segfault during logging to syslog because argument are switched
# bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1727162
# upstream https://bugs.launchpad.net/hplip/+bug/1837846
Patch46: hplip-logging-segfault.patch
Patch43: hplip-logging-segfault.patch
# Traceback in hp-systray when there are no resource
# wanted to report upstream, but launchpad ends with timeout error
# bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1738321
Patch47: hplip-systray-blockerror.patch
Patch44: hplip-systray-blockerror.patch
# several printers were removed in 3.19.1, but actually someone still uses them
# reported upstream https://bugs.launchpad.net/hplip/+bug/1843592
# bugzillas 1742949, 1740132, 1739855
Patch48: hplip-missing-drivers.patch
Patch45: hplip-missing-drivers.patch
# laserjet 2200 and other devices have different device id than HP expects...
# https://bugzilla.redhat.com/show_bug.cgi?id=1772698
# reported upstream https://bugs.launchpad.net/hplip/+bug/1853002
Patch49: hplip-model-mismatch.patch
Patch46: hplip-model-mismatch.patch
# sixext has problems with python3 strings (bz#1573430)
# reported https://bugs.launchpad.net/bugs/1480152
Patch50: hplip-unicodeerror.patch
Patch47: hplip-unicodeerror.patch
# error with new gcc, already reported in upstream as
# https://bugs.launchpad.net/hplip/+bug/1836735
Patch51: hplip-fix-Wreturn-type-warning.patch
Patch48: hplip-fix-Wreturn-type-warning.patch
# upstream check for python clears OS build system
# CFLAGS
# https://bugs.launchpad.net/hplip/+bug/1879445
Patch52: hplip-configure-python.patch
Patch49: hplip-configure-python.patch
# taken from hplip upstream report - toolbox uses deprecated method
# setMargin(), which generates an exception, resulting in a infinite loop
# of request on cupsd
# https://bugs.launchpad.net/hplip/+bug/1880275
Patch53: hplip-dialog-infinite-loop.patch
Patch50: hplip-dialog-infinite-loop.patch
# searching algorithm did not expect '-' in model name and thought it is a new PDL
# it resulted in incorrect PPD match, so e.g. hpijs driver was used instead of hpcups
# bug: https://bugzilla.redhat.com/show_bug.cgi?id=1590014
# reported upstream: https://bugs.launchpad.net/hplip/+bug/1881587
Patch54: hplip-find-driver.patch
Patch51: hplip-find-driver.patch
# hp-clean didn't work for Photosmart C1410 because it was comparing
# string length with buffer size for string object, which is different,
# causing cleaning to fail - the fix is to make the object bytes-like,
@ -162,61 +162,88 @@ Patch54: hplip-find-driver.patch
# for the device, but there can be similar issues with other devices
# bug https://bugzilla.redhat.com/show_bug.cgi?id=1833308
# reported upstream https://bugs.launchpad.net/hplip/+bug/1882193
Patch55: hplip-clean-ldl.patch
Patch52: hplip-clean-ldl.patch
# 3.20.6 turned off requirement for most devices which needed it
# - it will cause malfunction of printing and scanning for them
# https://bugs.launchpad.net/hplip/+bug/1883898
Patch56: hplip-revert-plugins.patch
# python3.9 removes threading.Thread.isAlive() and it is substituted
# by threading.Thread.is_alive()
# https://bugzilla.redhat.com/show_bug.cgi?id=1861055
# reported upstream https://bugs.launchpad.net/fedora/+bug/1889280
Patch57: hplip-thread-isalive-removed.patch
# glibc moved timeb.h into compat package and it will be removed in the future
# the code doesn't use anything from timeb.h, so it is safe to remove it
# reported upstream https://bugs.launchpad.net/hplip/+bug/1900977
Patch58: hplip-timeb-removed.patch
Patch53: hplip-revert-plugins.patch
# non-sudoers cannot authenticate
# reported upstream https://bugs.launchpad.net/hplip/+bug/1904888
Patch59: hplip-check-userperms.patch
Patch54: hplip-check-userperms.patch
# 1919556 - hp-fab crashed: QFileDialog.getOpenFileName is not used correctly
# getOpenFileName returns a tuple, but hp-fab expects a simple variable
# reported upstream as https://bugs.launchpad.net/hplip/+bug/1914743
Patch60: hplip-fab-import.patch
Patch55: hplip-fab-import.patch
# if an user tries to install scanner via hp-setup (printer/fax utility)
# it fails further down - break out earlier with a message
# reported upstream as https://bugs.launchpad.net/hplip/+bug/1916114
Patch61: hplip-hpsetup-noscanjets.patch
Patch56: hplip-hpsetup-noscanjets.patch
# 1951922 - hp-systray doesn't support a valid --qt5 option
# reported upstream https://bugs.launchpad.net/hplip/+bug/1925480
Patch62: hplip-systray-qt5.patch
Patch57: hplip-systray-qt5.patch
# 1963114 - patch for hplip firmware load timeout fix
# reported upstream https://bugs.launchpad.net/hplip/+bug/1922404
Patch63: hplip-hpfirmware-timeout.patch
# 1976465 - [hplip] PY_SSIZE_T_CLEAN macro must be defined for '#' formats
# reported upstream https://bugs.launchpad.net/hplip/+bug/1933973
Patch64: hplip-pyssizet_clean.patch
Patch58: hplip-hpfirmware-timeout.patch
# 1985251 - Incorrect permission for gpg directory
# reported upstream https://bugs.launchpad.net/hplip/+bug/1938442
Patch65: hplip-gpgdir-perms.patch
Patch59: hplip-gpgdir-perms.patch
# 1987141 - hp-plugin installs malformed udev files
# reported upstream https://bugs.launchpad.net/hplip/+bug/1847477
Patch66: hplip-plugin-udevissues.patch
Patch60: hplip-plugin-udevissues.patch
# reported upstream https://bugs.launchpad.net/hplip/+bug/1938504
Patch67: hplip-osname-mismatch.patch
Patch61: hplip-osname-mismatch.patch
# 2015428 - python3.10 has Callable in collections.abc
# reported as https://bugs.launchpad.net/hplip/+bug/1948801
Patch68: hplip-py310-collections-abc.patch
# 2015428 - python3.10 doesn't do an implicit conversion when passing decimals
# fractions and others to an integer argument
# reported as https://bugs.launchpad.net/hplip/+bug/1948801
Patch69: hplip-qt5-convert2int.patch
Patch62: hplip-py310-collections-abc.patch
%if 0%{?fedora} || 0%{?rhel} <= 8
# mention hplip-gui if you want to have GUI
Patch1000: hplip-fedora-gui.patch
%endif
# uses automatic creation of configure
BuildRequires: autoconf
# uses automatic creation of Makefile
BuildRequires: automake
# Make sure we get postscriptdriver tags - need cups and python3-cups.
BuildRequires: cups
BuildRequires: python3-cups
# uses functions from CUPS in filters, backends and libraries defining them
BuildRequires: cups-devel
# gcc and gcc-c++ are no longer in buildroot by default
# gcc is needed for compilation of HPAIO scanning backend, HP implementation of
# IPP and MDNS protocols, hpps driver, hp backend, hpip (image processing
# library), multipoint transport driver hpmud
BuildRequires: gcc
# gcc-c++ is needed for hpijs, hpcups drivers
BuildRequires: gcc-c++
# support for JPEG file formats in hp-scan
BuildRequires: libjpeg-devel
# uses libtool for autorconf
BuildRequires: libtool
# implements support for USB devices
BuildRequires: libusb1-devel
# uses make
BuildRequires: make
# SLP device discovery is based on SNMP
BuildRequires: net-snmp-devel
# wasn't able to find out why, but SO libraries in hplip-libs require them...
BuildRequires: openssl-devel
# supports mDNS device discovery via Avahi
BuildRequires: pkgconfig(avahi-client)
BuildRequires: pkgconfig(avahi-core)
# implements C Python extensions like hpmudext, cupsext, scanext
BuildRequires: python3-devel
# SANE backend hpaio uses function from SANE API
BuildRequires: sane-backends-devel
BuildRequires: pkgconfig(dbus-1)
# macros: %%{_tmpfilesdir}, %%{_udevrulesdir}
BuildRequires: systemd
%if 0%{?rhel} <= 8 || 0%{?fedora}
# needed for desktop file validation in spec file
BuildRequires: desktop-file-utils
%endif
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%if 0%{?rhel} <= 8 || 0%{?fedora}
@ -236,42 +263,14 @@ Requires: libsane-hpaio
Requires: tar
# require usbutils, hp-diagnose_queues needs lsusb
Requires: usbutils
# uses avahi-browse for discovering IPP-over-USB printers
Recommends: avahi-tools
# require coreutils, because timeout binary is needed in post scriptlet,
# because hpcups-update-ppds script can freeze in certain situation and
# stop the update
Requires(post): coreutils
# gcc and gcc-c++ are no longer in buildroot by default
# gcc is needed for compilation of HPAIO scanning backend, HP implementation of
# IPP and MDNS protocols, hpps driver, hp backend, hpip (image processing
# library), multipoint transport driver hpmud
BuildRequires: gcc
# gcc-c++ is needed for hpijs, hpcups drivers
BuildRequires: gcc-c++
# uses make
BuildRequires: make
BuildRequires: autoconf automake libtool
BuildRequires: net-snmp-devel
BuildRequires: pkgconfig(avahi-client)
BuildRequires: pkgconfig(avahi-core)
BuildRequires: cups-devel
BuildRequires: python3-devel
BuildRequires: libjpeg-devel
BuildRequires: desktop-file-utils
BuildRequires: libusb1-devel
BuildRequires: openssl-devel
BuildRequires: sane-backends-devel
BuildRequires: pkgconfig(dbus-1)
# Make sure we get postscriptdriver tags - need cups and python3-cups.
BuildRequires: cups
BuildRequires: python3-cups
# macros: %%{_tmpfilesdir}, %%{_udevrulesdir}
BuildRequires: systemd
%description
The Hewlett-Packard Linux Imaging and Printing Project provides
@ -402,127 +401,118 @@ done
%patch18 -p1 -b .parsing
# Fixed left/right margins for HP DeskJet 990C (LP #1405212).
%patch20 -p1 -b .dj990c-margin
%patch19 -p1 -b .dj990c-margin
# Fixed uses of strncpy throughout.
%patch21 -p1 -b .strncpy
%patch20 -p1 -b .strncpy
# Don't try to write bytecode cache for hpfax backend (bug #1192761)
# or hp-config_usb_printer (bug #1266903)
# or hpps filter (bug #1241548).
%patch22 -p1 -b .no-write-bytecode
%patch21 -p1 -b .no-write-bytecode
# Ignore IOError when logging output (bug #712537).
%patch23 -p1 -b .silence-ioerror
%patch22 -p1 -b .silence-ioerror
# [abrt] hplip: hp-scan:663:<module>:NameError: name 'source_option' is not defined (bug #1341304)
%patch24 -p1 -b .sourceoption
%patch23 -p1 -b .sourceoption
# hplip license problem (bug #1364711)
%patch25 -p1 -b .no-ernie
%patch24 -p1 -b .no-ernie
# hplip appdata
%patch26 -p1 -b .appdata
%patch25 -p1 -b .appdata
# hp-check shows 'CUPS incompatible or not running' even if CUPS is running (bug #1456467)
%patch27 -p1 -b .check-cups
%patch26 -p1 -b .check-cups
# hp-firmware:NameError: name 'INTERACTIVE_MODE4' is not defined (bug #1533869)
%patch30 -p1 -b .typo
%patch27 -p1 -b .typo
%patch31 -p1 -b .use-binary-str
%patch28 -p1 -b .use-binary-str
# TypeError: 'Error' object does not support indexing (bug #1564770)
# upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1718129
# in python2 it was possible to acces Exception message by index [0].
# in python3 this is no longer possible and it causes TypeError.
%patch32 -p1 -b .error-print-fix
%patch29 -p1 -b .error-print-fix
# TypeError: not all arguments converted during string formatting (bug #1566938)
# upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/616450
# bug caused by more arguments than argument specifiers in formatted string
%patch33 -p1 -b .hpfax-import-error-print
%patch30 -p1 -b .hpfax-import-error-print
# 'WifiSetupDialog' object has no attribute 'wifiobj' (bug #1626877)
# upstream bug: https://bugs.launchpad.net/hplip/+bug/1752060
# bug caused by typo in wifisetupdialog wifiObj property call
%patch34 -p1 -b .wifisetup-bad-call-fix
%patch31 -p1 -b .wifisetup-bad-call-fix
# have pool of keyservers to choose
%patch35 -p1 -b .keyserver
%patch32 -p1 -b .keyserver
# TypeError: argument 5 has unexpected type 'StandardButtons' (bug #1594602)
# upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1745383
# bug caused by typo in QMessageBox constructor call
# this patch fixes more of those typos - some fixed by tkorbar, some taken from ubuntu fix
%patch36 -p1 -b .qmsgbox-typos-fix
%patch33 -p1 -b .qmsgbox-typos-fix
# removal of non open source code, taken from ubuntu
%patch37 -p1 -b .libimageprocessor-removal
%patch34 -p1 -b .libimageprocessor-removal
%{_bindir}/rm prnt/hpcups/libImageProcessor-x86*
%patch38 -p1 -b .toolbox-crash
%patch35 -p1 -b .toolbox-crash
# part of https://bugzilla.redhat.com/show_bug.cgi?id=1666076
%patch39 -p1 -b .add-ppd-crash
%patch36 -p1 -b .add-ppd-crash
# 1671513 - after 'successful' plugin installation it is not installed
%patch40 -p1 -b .missing-links
%patch37 -p1 -b .missing-links
# 1684434 - Scanning broken for HP LaserJet 3052
%patch41 -p1 -b .hp-laserjet-3052-broken-scanning
%patch38 -p1 -b .hp-laserjet-3052-broken-scanning
# 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 1)
%patch42 -p1 -b .hpmud-string-parse
%patch39 -p1 -b .hpmud-string-parse
# 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 2)
%patch43 -p1 -b .m278-m281-needs-plugin
%patch40 -p1 -b .m278-m281-needs-plugin
# 1695716 - hpcups crashes in Compressor destructor
%patch44 -p1 -b .hpcups-crash
%patch41 -p1 -b .hpcups-crash
# fixing issues found by coverity scan
%patch45 -p1 -b .covscan
%patch42 -p1 -b .covscan
# segfault during logging (1727162)
%patch46 -p1 -b .logging-segfault
%patch43 -p1 -b .logging-segfault
# 1738321 - [abrt] hp-systray:BlockingIOError: [Errno 11] Resource temporarily unavailable
%patch47 -p1 -b .systray-blockerror
%patch44 -p1 -b .systray-blockerror
# 1742949, 1740132, 1739855 - missing drivers
%patch48 -p1 -b .missing-drivers
%patch45 -p1 -b .missing-drivers
# 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat
%patch49 -p1 -b .model-mismatch
%patch46 -p1 -b .model-mismatch
# 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes
%patch50 -p1 -b .unicodeerror
%patch51 -p1 -b .Wreturn-fix
%patch52 -p1 -b .configure-python
%patch53 -p1 -b .dialog-infinite-loop
%patch47 -p1 -b .unicodeerror
%patch48 -p1 -b .Wreturn-fix
%patch49 -p1 -b .configure-python
%patch50 -p1 -b .dialog-infinite-loop
# 1590014 - hplip PPD search doesn't expect '-' in device name
%patch54 -p1 -b .find-driver
%patch51 -p1 -b .find-driver
# 1833308 - hp-clean cannot clean HP PSC1410 - Device I/O error
%patch55 -p1 -b .clean-ldl
%patch56 -p1 -b .revert-plugins
# 1861055 - hplip: remove threading.Thread.isAlive method calls - use threading.Thread.is_alive()
%patch57 -p1 -b .thread-isalive-removed
# timed.h is removed from glibc
%patch58 -p1 -b .timed-removed
%patch52 -p1 -b .clean-ldl
%patch53 -p1 -b .revert-plugins
# 1899410 - non-sudoers cannot authenticate because of bad username in prompt
%patch59 -p1 -b .check-userperms
%patch54 -p1 -b .check-userperms
# 1919556 - hp-fab crashed: QFileDialog.getOpenFileName is not used correctly
%patch60 -p1 -b .fab-import
%patch55 -p1 -b .fab-import
# if an user tries to install scanner via hp-setup (printer/fax utility)
# it fails further down - break out earlier with a message
%patch61 -p1 -b .hpsetup-noscanjets
%patch56 -p1 -b .hpsetup-noscanjets
# 1951922 - hp-systray doesn't support a valid --qt5 option
%patch62 -p1 -b .systray-qt5
%patch57 -p1 -b .systray-qt5
# 1963114 - patch for hplip firmware load timeout fix
%patch63 -p1 -b .hpfirmware-timeout
# 1976465 - [hplip] PY_SSIZE_T_CLEAN macro must be defined for '#' formats
%patch64 -p1 -b .pyssizet_clean
%patch58 -p1 -b .hpfirmware-timeout
# 1985251 - Incorrect permission for gpg directory
%patch65 -p1 -b .gpgdir-perms
%patch59 -p1 -b .gpgdir-perms
# 1987141 - hp-plugin installs malformed udev files
%patch66 -p1 -b .hpplugin-udevperms
%patch60 -p1 -b .hpplugin-udevperms
# upstream bug https://bugs.launchpad.net/hplip/+bug/1938504
%patch67 -p1 -b .osname-mismatch
%patch61 -p1 -b .osname-mismatch
# 2015428 - python3.10 has Callable in collections.abc
%patch68 -p1 -b .abc
# 2015428 - python3.10 doesn't do an implicit conversion when passing decimals
# fractions and others to an integer argument
%patch69 -p1 -b .qt5-convert2int.patch
%patch62 -p1 -b .abc
%if 0%{?fedora} || 0%{?rhel} <= 8
# mention hplip-gui should be installed if you want GUI
@ -553,13 +543,19 @@ sed -i 's|^AM_INIT_AUTOMAKE|AM_INIT_AUTOMAKE([foreign])|g' configure.in
autoreconf --verbose --force --install
%configure \
--enable-scan-build --enable-gui-build --enable-fax-build \
--disable-foomatic-rip-hplip-install --enable-pp-build \
--disable-qt4 --enable-qt5 \
--enable-hpcups-install --enable-cups-drv-install \
--enable-fax-build \
--enable-foomatic-drv-install \
--enable-gui-build \
--enable-hpcups-install \
--enable-hpijs-install \
--disable-policykit --with-mimedir=%{_datadir}/cups/mime PYTHON=%{__python3}
--enable-pp-build \
--enable-qt5 \
--enable-scan-build \
--disable-foomatic-rip-hplip-install \
--disable-imageProcessor-build \
--disable-policykit \
--disable-qt4 \
--with-mimedir=%{_datadir}/cups/mime PYTHON=%{__python3}
%make_build
@ -713,6 +709,7 @@ 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.
@ -871,6 +868,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
%changelog
* Fri Jan 14 2022 Zdenek Dohnal <zdohnal@redhat.com> - 3.21.12-1
- 1959242 - hplip-3.21.12 is available
* Fri Dec 03 2021 Zdenek Dohnal <zdohnal@redhat.com> - 3.21.2-15
- 2028697 - hp-setup trackbacks when hplip-gui RPM is not installed

View File

@ -1 +1 @@
SHA512 (hplip-3.21.2-repack.tar.gz) = 294947275e9df31100496a84da2b8a17aa07d12ed7d9e622cd4e68082b4a42f59a20177cca91f42d410bcb31f183fd0c8474d8077c177a565c0eea26134b2418
SHA512 (hplip-3.21.12-repack.tar.gz) = 56e9f2c5949712625c99129629391fb15e09bd485a0cb343b6482be92726b75e6079f0f9d6fe8f8d2d453d4407b6a8efc3cf31018c97ff36f8b6da11db7d0df5