1999957 - Printing of banner before PCL file only prints banner

This commit is contained in:
Zdenek Dohnal 2021-11-03 12:05:09 +01:00
parent f5752bae78
commit 950ed1e802
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,38 @@
From 08e9b6e1f8497a8159d6bd7cd6dc96ae79a2e704 Mon Sep 17 00:00:00 2001
From: Bryan Mason <bmason@redhat.com>
Date: Thu, 15 Jul 2021 16:26:27 -0700
Subject: [PATCH] scheduler/job.c: use gziptoany for raw files (not just raw
printers)
---
scheduler/job.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scheduler/job.c b/scheduler/job.c
index d8c2efcc6..b448acda5 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -501,6 +501,7 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
int backroot; /* Run backend as root? */
int pid; /* Process ID of new filter process */
int banner_page; /* 1 if banner page, 0 otherwise */
+ int raw_file; /* 1 if file type is vnd.cups-raw */
int filterfds[2][2] = { { -1, -1 }, { -1, -1 } };
/* Pipes used between filters */
int envc; /* Number of environment variables */
@@ -746,8 +747,11 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
* Add decompression/raw filter as needed...
*/
+ raw_file = !strcmp(job->filetypes[job->current_file]->super, "application") &&
+ !strcmp(job->filetypes[job->current_file]->type, "vnd.cups-raw");
+
if ((job->compressions[job->current_file] && (!job->printer->remote || job->num_files == 1)) ||
- (!job->printer->remote && job->printer->raw && job->num_files > 1))
+ (!job->printer->remote && (job->printer->raw || raw_file) && job->num_files > 1))
{
/*
* Add gziptoany filter to the front of the list...
--
2.31.1

View File

@ -87,6 +87,8 @@ Patch18: 0001-cups.service.in-Add-SYSTEMD_WANTED_BY-variable.patch
Patch19: cups-cleanfiles.patch Patch19: cups-cleanfiles.patch
# 2018950 - Unauthenticated users can't move print jobs in Web UI # 2018950 - Unauthenticated users can't move print jobs in Web UI
Patch20: 0001-cgi-bin-ipp-var.c-Use-guest-user-for-Move-Job-when-n.patch Patch20: 0001-cgi-bin-ipp-var.c-Use-guest-user-for-Move-Job-when-n.patch
# 1999957 - Printing of banner before PCL file only prints banner
Patch21: 0001-scheduler-job.c-use-gziptoany-for-raw-files-not-just.patch
##### Patches removed because IMHO they aren't no longer needed ##### Patches removed because IMHO they aren't no longer needed
##### but still I'll leave them in git in case their removal ##### but still I'll leave them in git in case their removal
@ -302,6 +304,8 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in
%patch19 -p1 -b .cleanfiles %patch19 -p1 -b .cleanfiles
# 2018950 - Unauthenticated users can't move print jobs in Web UI # 2018950 - Unauthenticated users can't move print jobs in Web UI
%patch20 -p1 -b .move-job %patch20 -p1 -b .move-job
# 1999957 - Printing of banner before PCL file only prints banner
%patch21 -p1 -b .banner-rawfile
%if %{lspp} %if %{lspp}
@ -653,6 +657,7 @@ rm -f %{cups_serverbin}/backend/smb
%changelog %changelog
* Wed Nov 03 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3op2-9 * Wed Nov 03 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3op2-9
- 2018950 - Unauthenticated users can't move print jobs in Web UI - 2018950 - Unauthenticated users can't move print jobs in Web UI
- 1999957 - Printing of banner before PCL file only prints banner
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.3.3op2-8 * Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.3.3op2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild