1954524 - cups-browsed doesn't save "*-default" options
This commit is contained in:
parent
0ffeb35189
commit
3f27a10b68
@ -0,0 +1,29 @@
|
||||
From 144322be6e06ff12f101fc35e472d62978861e28 Mon Sep 17 00:00:00 2001
|
||||
From: Till Kamppeter <till.kamppeter@gmail.com>
|
||||
Date: Thu, 15 Apr 2021 14:26:44 +0200
|
||||
Subject: [PATCH] cups-browsed: Always save "...-default" option entries from
|
||||
printers.conf
|
||||
|
||||
(cherry picked from commit cdd61132e1719a88dd8006c65e8e260c1aaa02e4)
|
||||
---
|
||||
utils/cups-browsed.c | 4 +---
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
|
||||
index bffd1e09..0c335055 100644
|
||||
--- a/utils/cups-browsed.c
|
||||
+++ b/utils/cups-browsed.c
|
||||
@@ -5648,9 +5648,7 @@ record_printer_options(const char *printer) {
|
||||
strcasecmp(key + strlen(key) - strlen(*ptr) + 1, *ptr + 1) == 0))
|
||||
break;
|
||||
if (*ptr != NULL) {
|
||||
- if (strcasecmp(key, CUPS_BROWSED_DEST_PRINTER "-default") != 0 &&
|
||||
- (ppdname == NULL ||
|
||||
- strncasecmp(key + strlen(key) - 8, "-default", 8))) {
|
||||
+ if (strcasecmp(key, CUPS_BROWSED_DEST_PRINTER "-default") != 0) {
|
||||
ippAttributeString(attr, buf, sizeof(buf));
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
c = buf;
|
||||
--
|
||||
2.30.2
|
||||
|
@ -1,63 +0,0 @@
|
||||
From a5dd51e25842c7499917f00e53228695fd113826 Mon Sep 17 00:00:00 2001
|
||||
From: Till Kamppeter <till.kamppeter@gmail.com>
|
||||
Date: Thu, 21 Jan 2021 15:50:26 +0100
|
||||
Subject: [PATCH] libcupsfilters: In the PPD generator really give priority to
|
||||
Apple Raster against PDF
|
||||
|
||||
(cherry picked from commit bcd1aedeecb83fe9499d1d0c3dc0dab1ea32811c)
|
||||
---
|
||||
cupsfilters/ppdgenerator.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/cupsfilters/ppdgenerator.c b/cupsfilters/ppdgenerator.c
|
||||
index 4e163836..ebc2ee1c 100644
|
||||
--- a/cupsfilters/ppdgenerator.c
|
||||
+++ b/cupsfilters/ppdgenerator.c
|
||||
@@ -1951,7 +1951,7 @@ ppdCreateFromIPP2(char *buffer, /* I - Filename buffer */
|
||||
formatfound = 1;
|
||||
is_pdf = 1;
|
||||
} else if (cupsArrayFind(pdl_list, "application/pdf")) {
|
||||
- cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/pdf 100 -\"\n");
|
||||
+ cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/pdf 200 -\"\n");
|
||||
manual_copies = 0;
|
||||
formatfound = 1;
|
||||
is_pdf = 1;
|
||||
@@ -2030,7 +2030,7 @@ ppdCreateFromIPP2(char *buffer, /* I - Filename buffer */
|
||||
if ((current_res = ippResolutionListToArray(attr)) != NULL &&
|
||||
joinResolutionArrays(&common_res, ¤t_res, &common_def,
|
||||
¤t_def)) {
|
||||
- cupsFilePuts(fp, "*cupsFilter2: \"application/PCLm application/PCLm 200 -\"\n");
|
||||
+ cupsFilePuts(fp, "*cupsFilter2: \"application/PCLm application/PCLm 300 -\"\n");
|
||||
if (formatfound == 0) manual_copies = 1;
|
||||
formatfound = 1;
|
||||
is_pclm = 1;
|
||||
@@ -2049,7 +2049,7 @@ ppdCreateFromIPP2(char *buffer, /* I - Filename buffer */
|
||||
/* We put a high cost factor here as if a printer supports also
|
||||
another format, like PWG or Apple Raster, we prefer it, as some
|
||||
PCL-XL printers have bugs in their PCL-XL interpreters */
|
||||
- cupsFilePrintf(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/vnd.hp-pclxl 300 gstopxl\"\n");
|
||||
+ cupsFilePrintf(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/vnd.hp-pclxl 400 gstopxl\"\n");
|
||||
if (formatfound == 0) manual_copies = 1;
|
||||
formatfound = 1;
|
||||
}
|
||||
@@ -2058,7 +2058,7 @@ ppdCreateFromIPP2(char *buffer, /* I - Filename buffer */
|
||||
/* We put a high cost factor here as if a printer supports also
|
||||
another format, like PWG or Apple Raster, we prefer it, as many
|
||||
PostScript printers have bugs in their PostScript interpreters */
|
||||
- cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-postscript application/postscript 500 -\"\n");
|
||||
+ cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-postscript application/postscript 600 -\"\n");
|
||||
if (formatfound == 0) manual_copies = 0;
|
||||
formatfound = 1;
|
||||
}
|
||||
@@ -2067,7 +2067,7 @@ ppdCreateFromIPP2(char *buffer, /* I - Filename buffer */
|
||||
another format, like PWG or Apple Raster, we prefer it, as there
|
||||
are some printers, like HP inkjets which report to accept PCL
|
||||
but do not support PCL 5c/e or PCL-XL */
|
||||
- cupsFilePrintf(fp, "*cupsFilter2: \"application/vnd.cups-raster application/vnd.hp-pcl 700 rastertopclx\"\n");
|
||||
+ cupsFilePrintf(fp, "*cupsFilter2: \"application/vnd.cups-raster application/vnd.hp-pcl 800 rastertopclx\"\n");
|
||||
if (formatfound == 0) manual_copies = 1;
|
||||
formatfound = 1;
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
@ -4,7 +4,7 @@
|
||||
Summary: OpenPrinting CUPS filters and backends
|
||||
Name: cups-filters
|
||||
Version: 1.28.7
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
|
||||
# For a breakdown of the licensing, see COPYING file
|
||||
# GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*,
|
||||
@ -21,7 +21,9 @@ Url: http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups
|
||||
Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz
|
||||
|
||||
# backported from upstream
|
||||
#Patch01: 0001-libcupsfilters-In-the-PPD-generator-really-give-prio.patch
|
||||
# 1954524 - cups-browsed doesn't save "*-default" options
|
||||
# upstream https://github.com/OpenPrinting/cups-filters/commit/cdd61132e1719a88dd8006c65e8e260c1aaa02e4
|
||||
Patch01: 0001-cups-browsed-Always-save-.-default-option-entries-fr.patch
|
||||
|
||||
|
||||
# autogen.sh
|
||||
@ -349,6 +351,9 @@ done
|
||||
%{_libdir}/pkgconfig/libfontembed.pc
|
||||
|
||||
%changelog
|
||||
* Wed Apr 28 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-7
|
||||
- 1954524 - cups-browsed doesn't save "*-default" options
|
||||
|
||||
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.28.7-6
|
||||
- Rebuilt for updated systemd-rpm-macros
|
||||
See https://pagure.io/fesco/issue/2583.
|
||||
|
Loading…
Reference in New Issue
Block a user