From 5beb8d8c14be24c73b7f6583bee8bf3f4465ceba Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 6 Aug 2024 14:18:33 +0200 Subject: [PATCH] RHEL-52980 fix deciding page sizes by changing delta for difference Resolves: RHEL-52980 --- libppd-fix-delta-for-sizes.patch | 26 ++++++++++++++++++++++++++ libppd.spec | 9 ++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 libppd-fix-delta-for-sizes.patch diff --git a/libppd-fix-delta-for-sizes.patch b/libppd-fix-delta-for-sizes.patch new file mode 100644 index 0000000..6eabf85 --- /dev/null +++ b/libppd-fix-delta-for-sizes.patch @@ -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) + + + // diff --git a/libppd.spec b/libppd.spec index 78533ed..8d56813 100644 --- a/libppd.spec +++ b/libppd.spec @@ -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 - 1:2.0.0-6 +- RHEL-52980 fix deciding page sizes by changing delta for difference + * Wed Jul 17 2024 Zdenek Dohnal - 1:2.0.0-5 - RHEL-25803 libppd - backport fix for PWG printer support