commit
d8e6cce519
@ -0,0 +1 @@
|
||||
SOURCES/libppd-2.0.0.tar.gz
|
@ -0,0 +1 @@
|
||||
aeb1d4cf4af3acb60d4c527898a77765fef4059b SOURCES/libppd-2.0.0.tar.gz
|
@ -0,0 +1,85 @@
|
||||
diff --git a/ppd/ppd-generator.c b/ppd/ppd-generator.c
|
||||
index a815030..637e7b5 100644
|
||||
--- a/ppd/ppd-generator.c
|
||||
+++ b/ppd/ppd-generator.c
|
||||
@@ -703,7 +703,8 @@ ppdCreatePPDFromIPP2(char *buffer, // I - Filename buffer
|
||||
is_pdf = 1;
|
||||
}
|
||||
#ifdef CUPS_RASTER_HAVE_APPLERASTER
|
||||
- else if (cupsArrayFind(pdl_list, "image/urf"))
|
||||
+ else if (cupsArrayFind(pdl_list, "image/urf") &&
|
||||
+ (ippFindAttribute(supported, "urf-supported", IPP_TAG_KEYWORD) != NULL))
|
||||
{
|
||||
int resStore = 0; // Variable for storing the no. of resolutions in the resolution array
|
||||
int resArray[__INT16_MAX__]; // Creating a resolution array supporting a maximum of 32767 resolutions.
|
||||
@@ -830,44 +831,38 @@ ppdCreatePPDFromIPP2(char *buffer, // I - Filename buffer
|
||||
formatfound = 1;
|
||||
is_pdf = 1;
|
||||
}
|
||||
- else if (cupsArrayFind(pdl_list, "image/pwg-raster"))
|
||||
+ else if (cupsArrayFind(pdl_list, "image/pwg-raster") &&
|
||||
+ ippFindAttribute(supported, "pwg-raster-document-type-supported", IPP_TAG_KEYWORD) != NULL &&
|
||||
+ (attr = ippFindAttribute(supported, "pwg-raster-document-resolution-supported", IPP_TAG_RESOLUTION)) != NULL)
|
||||
{
|
||||
- if ((attr = ippFindAttribute(supported,
|
||||
- "pwg-raster-document-resolution-supported",
|
||||
- IPP_TAG_RESOLUTION)) != NULL)
|
||||
+ current_def = NULL;
|
||||
+ if ((current_res = cfIPPAttrToResolutionArray(attr)) != NULL &&
|
||||
+ cfJoinResolutionArrays(&common_res, ¤t_res, &common_def,
|
||||
+ ¤t_def))
|
||||
{
|
||||
- current_def = NULL;
|
||||
- if ((current_res = cfIPPAttrToResolutionArray(attr)) != NULL &&
|
||||
- cfJoinResolutionArrays(&common_res, ¤t_res, &common_def,
|
||||
- ¤t_def))
|
||||
- {
|
||||
- cupsFilePuts(fp, "*cupsFilter2: \"image/pwg-raster image/pwg-raster 0 -\"\n");
|
||||
- if (formatfound == 0) manual_copies = 1;
|
||||
- formatfound = 1;
|
||||
- is_pwg = 1;
|
||||
- }
|
||||
+ cupsFilePuts(fp, "*cupsFilter2: \"image/pwg-raster image/pwg-raster 0 -\"\n");
|
||||
+ if (formatfound == 0) manual_copies = 1;
|
||||
+ formatfound = 1;
|
||||
+ is_pwg = 1;
|
||||
}
|
||||
}
|
||||
- else if (cupsArrayFind(pdl_list, "application/PCLm"))
|
||||
+ else if (cupsArrayFind(pdl_list, "application/PCLm") &&
|
||||
+ (attr = ippFindAttribute(supported, "pclm-source-resolution-supported", IPP_TAG_RESOLUTION)) != NULL)
|
||||
{
|
||||
- if ((attr = ippFindAttribute(supported, "pclm-source-resolution-supported",
|
||||
- IPP_TAG_RESOLUTION)) != NULL)
|
||||
+ if ((defattr = ippFindAttribute(supported,
|
||||
+ "pclm-source-resolution-default",
|
||||
+ IPP_TAG_RESOLUTION)) != NULL)
|
||||
+ current_def = cfIPPResToResolution(defattr, 0);
|
||||
+ else
|
||||
+ current_def = NULL;
|
||||
+ if ((current_res = cfIPPAttrToResolutionArray(attr)) != NULL &&
|
||||
+ cfJoinResolutionArrays(&common_res, ¤t_res, &common_def,
|
||||
+ ¤t_def))
|
||||
{
|
||||
- if ((defattr = ippFindAttribute(supported,
|
||||
- "pclm-source-resolution-default",
|
||||
- IPP_TAG_RESOLUTION)) != NULL)
|
||||
- current_def = cfIPPResToResolution(defattr, 0);
|
||||
- else
|
||||
- current_def = NULL;
|
||||
- if ((current_res = cfIPPAttrToResolutionArray(attr)) != NULL &&
|
||||
- cfJoinResolutionArrays(&common_res, ¤t_res, &common_def,
|
||||
- ¤t_def))
|
||||
- {
|
||||
- cupsFilePuts(fp, "*cupsFilter2: \"application/PCLm application/PCLm 0 -\"\n");
|
||||
- if (formatfound == 0) manual_copies = 1;
|
||||
- formatfound = 1;
|
||||
- is_pclm = 1;
|
||||
- }
|
||||
+ cupsFilePuts(fp, "*cupsFilter2: \"application/PCLm application/PCLm 0 -\"\n");
|
||||
+ if (formatfound == 0) manual_copies = 1;
|
||||
+ formatfound = 1;
|
||||
+ is_pclm = 1;
|
||||
}
|
||||
}
|
||||
// Legacy formats only if we have no driverless format
|
@ -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)
|
||||
|
||||
|
||||
//
|
@ -0,0 +1,258 @@
|
||||
%global _hardened_build 1
|
||||
|
||||
# don't build libppd-tools until CUPS 3.x drops them
|
||||
%bcond_with tools
|
||||
|
||||
Name: libppd
|
||||
Epoch: 1
|
||||
Version: 2.0.0
|
||||
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
|
||||
# agreement from legal team
|
||||
# https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/message/A7GFSD6M3GYGSI32L2FC5KB22DUAEQI3/
|
||||
License: Apache-2.0 WITH LLVM-exception
|
||||
URL: https://github.com/OpenPrinting/libppd
|
||||
Source0: %{URL}/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
|
||||
# Patches
|
||||
# https://github.com/OpenPrinting/libppd/commit/c7a62e8c4c3
|
||||
# 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
|
||||
BuildRequires: autoconf
|
||||
# for autogen.sh
|
||||
BuildRequires: automake
|
||||
# mostly written in C
|
||||
BuildRequires: gcc
|
||||
# PPD compiler support written in C++
|
||||
BuildRequires: gcc-c++
|
||||
# for autogen.sh
|
||||
BuildRequires: gettext-devel
|
||||
# ghostscript is needed during build due configure check
|
||||
BuildRequires: ghostscript >= 10.0.0
|
||||
# for autosetup
|
||||
BuildRequires: git-core
|
||||
# for autogen.sh
|
||||
BuildRequires: libtool
|
||||
# uses make
|
||||
BuildRequires: make
|
||||
# for pkg-config in SPEC file and in configure
|
||||
BuildRequires: pkgconf-pkg-config
|
||||
# for CUPS API functions
|
||||
BuildRequires: pkgconfig(cups) >= 2.2.2
|
||||
# for filter functions
|
||||
BuildRequires: pkgconfig(libcupsfilters) >= 2.0b3
|
||||
# for rastertops
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
# pdftops has to be in buildroot due configure check
|
||||
BuildRequires: poppler-utils
|
||||
|
||||
%if %{without tools}
|
||||
# libppd exports symbols for compiling PPD compilers, which needs charset
|
||||
# definitions and header files during runtime to generate a PPD file - those
|
||||
# are provided by cups right now - once cups drops them, require libppd-tools
|
||||
Requires: cups
|
||||
%else
|
||||
Requires: %{name}-tools%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
%endif
|
||||
|
||||
# needded for hybrid pdftops filter function - for all legacy printers
|
||||
# except for Brother and Minolta/Konica Minolta, which firmware bugs
|
||||
# doesn't work with pdftops from GS
|
||||
Requires: ghostscript >= 10.0.0
|
||||
# needed for hybrid pdftops filter function - for Brother and Minolta/
|
||||
# Konica Minolta printers
|
||||
Requires: poppler-utils
|
||||
|
||||
|
||||
%description
|
||||
Libppd provides all PPD related function/API which is going
|
||||
to be removed from CUPS 3.X, but are still required for retro-fitting
|
||||
support of legacy printers. The library is meant only for retro-fitting
|
||||
printer applications, any new printer drivers have to be written as
|
||||
native printer application without libppd.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
Requires: cups-devel
|
||||
Requires: libcupsfilters-devel
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries and header files for
|
||||
developing retro-fitting printer applications.
|
||||
|
||||
%if %{with tools}
|
||||
%package tools
|
||||
Summary: PPD compiler tools and definition files
|
||||
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description tools
|
||||
The package contains PPD compiler and definition files needed for generating
|
||||
PPD files from *.drv files.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -S git
|
||||
|
||||
|
||||
%build
|
||||
# generate configuration/compilation files
|
||||
./autogen.sh
|
||||
|
||||
# disable PPD compiler tools for now (until CUPS 3.x drops PPD support) to prevent
|
||||
# conflicts with cups 2.x package
|
||||
%configure\
|
||||
--disable-acroread\
|
||||
--disable-mutool\
|
||||
--disable-rpath\
|
||||
--disable-silent-rules\
|
||||
--disable-static\
|
||||
%if %{with tools}
|
||||
--enable-ppdc-utils\
|
||||
--enable-testppdfile\
|
||||
%else
|
||||
--disable-ppdc-utils\
|
||||
--disable-testppdfile\
|
||||
%endif
|
||||
--with-pdftops=hybrid
|
||||
|
||||
# fix rpmlint error about linking to libraries, but not actually using their functions
|
||||
# it happens when the required libraries uses pkgconfig - pkgconfig file doesn't know
|
||||
# which specific functions our binary calls, so it tells us to link against every
|
||||
# possibilities
|
||||
# https://fedoraproject.org/wiki/Common_Rpmlint_issues#unused-direct-shlib-dependency
|
||||
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
|
||||
|
||||
%make_build
|
||||
|
||||
|
||||
%check
|
||||
make check
|
||||
|
||||
|
||||
%install
|
||||
%make_install
|
||||
find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
||||
|
||||
# remove the license files from doc dir, since we ship them in /usr/share/licenses
|
||||
rm -f %{buildroot}%{_pkgdocdir}/{LICENSE,NOTICE,COPYING}
|
||||
|
||||
# remove INSTALL since it is unnecessary
|
||||
rm -f %{buildroot}%{_pkgdocdir}/INSTALL
|
||||
|
||||
# 1.x was the release were all cups-filters components were together
|
||||
# let only libcupsfilters to carry it
|
||||
rm -f %{buildroot}%{_pkgdocdir}/CHANGES-1.x.md
|
||||
|
||||
# charsets and header files needed for PPD compilation in runtime
|
||||
# are for now shipped by cups - libppd will ship them once cups
|
||||
# drops them
|
||||
%if %{without tools}
|
||||
rm -rf %{buildroot}%{_datadir}/ppdc
|
||||
%endif
|
||||
|
||||
%{?ldconfig_scriptlets}
|
||||
|
||||
|
||||
%files
|
||||
%license LICENSE NOTICE COPYING
|
||||
%doc ABOUT-NLS AUTHORS CHANGES.md README.md
|
||||
%{_libdir}/libppd.so.2*
|
||||
|
||||
%files devel
|
||||
%{_docdir}/%{name}/CONTRIBUTING.md
|
||||
%{_docdir}/%{name}/DEVELOPING.md
|
||||
%dir %{_includedir}/ppd
|
||||
%{_includedir}/ppd/ppd-filter.h
|
||||
%{_includedir}/ppd/ppdc.h
|
||||
%{_includedir}/ppd/ppd.h
|
||||
%{_libdir}/libppd.so
|
||||
%{_libdir}/pkgconfig/libppd.pc
|
||||
|
||||
%if %{with tools}
|
||||
%files tools
|
||||
%{_bindir}/ppdc
|
||||
%{_bindir}/ppdhtml
|
||||
%{_bindir}/ppdi
|
||||
%{_bindir}/ppdmerge
|
||||
%{_bindir}/ppdpo
|
||||
%{_bindir}/testppdfile
|
||||
%dir %{_datadir}/ppdc/
|
||||
%{_datadir}/ppdc/epson.h
|
||||
%{_datadir}/ppdc/font.defs
|
||||
%{_datadir}/ppdc/hp.h
|
||||
%{_datadir}/ppdc/label.h
|
||||
%{_datadir}/ppdc/media.defs
|
||||
%{_datadir}/ppdc/raster.defs
|
||||
%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
|
||||
|
||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1:2.0.0-4
|
||||
- Bump release for June 2024 mass rebuild
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Thu Oct 19 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0.0-1
|
||||
- 2240389 - libppd-2.0.0 is available
|
||||
|
||||
* Wed Sep 20 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc2-4
|
||||
- CVE-2023-4504 libppd: Postscript Parsing Heap Overflow
|
||||
|
||||
* Tue Aug 08 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc2-3
|
||||
- fix printing for PDF+PJL drivers
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0~rc2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Wed Jun 28 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc2-1
|
||||
- 2216565 - libppd-2.0b4 is available
|
||||
|
||||
* Wed May 31 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc1-3
|
||||
- fix printing for printers with reverse output order
|
||||
- fix printing resolutions
|
||||
|
||||
* Mon May 29 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc1-2
|
||||
- 2192912 - [Utax, Kyocera, Brother] pdftops hacks are not applied due missing manufacturer in printer-make-and-model
|
||||
|
||||
* Thu Apr 27 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc1-1
|
||||
- 2.0rc1
|
||||
|
||||
* Wed Mar 15 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~b4-2
|
||||
- fix printing images to Postscript printers
|
||||
|
||||
* Wed Mar 01 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~b4-1
|
||||
- 2.0b4
|
||||
- introduce Epoch because I didn't read FPG carefully...
|
||||
|
||||
* Mon Feb 20 2023 Zdenek Dohnal <zdohnal@redhat.com> - 2.0b3-4
|
||||
- rebuilt with required cups
|
||||
|
||||
* Thu Feb 16 2023 Zdenek Dohnal <zdohnal@redhat.com> - 2.0b3-3
|
||||
- don't use bootstrap for now - koji doesn't seem to see it...
|
||||
|
||||
* Thu Feb 16 2023 Zdenek Dohnal <zdohnal@redhat.com> - 2.0b3-2
|
||||
- bootstrap cups to prevent conflicts for now
|
||||
|
||||
* Wed Feb 01 2023 Zdenek Dohnal <zdohnal@redhat.com> - 2.0b3-1
|
||||
- Initial import
|
Loading…
Reference in new issue