RHEL-52980 fix deciding page sizes by changing delta for difference

Resolves: RHEL-52980
This commit is contained in:
Zdenek Dohnal 2024-08-06 14:18:33 +02:00
parent ef27028bde
commit 5beb8d8c14
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,26 @@
diff --git a/ppd/ppd-cache.c b/ppd/ppd-cache.c
index 5aa617c..95fb553 100644
--- a/ppd/ppd-cache.c
+++ b/ppd/ppd-cache.c
@@ -26,7 +26,7 @@
// Macro to test for two almost-equal PWG measurements.
//
-#define _PPD_PWG_EQUIVALENT(x, y) (abs((x)-(y)) < 2)
+#define _PPD_PWG_EQUIVALENT(x, y) (abs((x)-(y)) < 50)
//
// Macros to work around typos in older libcups version
diff --git a/ppd/ppd-ipp.c b/ppd/ppd-ipp.c
index 82db2e1..e698bd6 100644
--- a/ppd/ppd-ipp.c
+++ b/ppd/ppd-ipp.c
@@ -24,7 +24,7 @@
// Macro to test for two almost-equal PWG measurements.
//
-#define _PPD_PWG_EQUIVALENT(x, y) (abs((x)-(y)) < 2)
+#define _PPD_PWG_EQUIVALENT(x, y) (abs((x)-(y)) < 50)
//

View File

@ -6,7 +6,7 @@
Name: libppd
Epoch: 1
Version: 2.0.0
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Library for retro-fitting legacy printer drivers
# the CUPS exception text is the same as LLVM exception, so using that name with
@ -22,6 +22,10 @@ Source0: %{URL}/releases/download/%{version}/%{name}-%{version}.tar.gz
# https://github.com/OpenPrinting/libppd/commit/81e708f5a
# https://github.com/OpenPrinting/libppd/commit/42ce356e8972
Patch001: libppd-check-required-attrs.patch
# RHEL-52980 Fix wrong selection of default page size
# https://github.com/OpenPrinting/libppd/commit/d53abd9
# https://github.com/OpenPrinting/libppd/commit/c9f3e8fc0
Patch002: libppd-fix-delta-for-sizes.patch
# for autogen.sh
@ -194,6 +198,9 @@ rm -rf %{buildroot}%{_datadir}/ppdc
%endif
%changelog
* Tue Aug 06 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0.0-6
- RHEL-52980 fix deciding page sizes by changing delta for difference
* Wed Jul 17 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0.0-5
- RHEL-25803 libppd - backport fix for PWG printer support