1999955 - Printing of banner before PCL file only prints banner

Resolves: rhbz#1999955
This commit is contained in:
Zdenek Dohnal 2021-11-03 12:36:20 +01:00
parent e3dcbb40c3
commit 78540759cb
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

@ -80,6 +80,8 @@ Patch16: cups-cleanfiles.patch
Patch17: cups-validate-1st.patch
# 2018948 - Unauthenticated users can't move print jobs in Web UI
Patch18: 0001-cgi-bin-ipp-var.c-Use-guest-user-for-Move-Job-when-n.patch
# 1999955 - Printing of banner before PCL file only prints banner
Patch19: 0001-scheduler-job.c-use-gziptoany-for-raw-files-not-just.patch
##### Patches removed because IMHO they aren't no longer needed
##### but still I'll leave them in git in case their removal
@ -291,6 +293,8 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in
%patch17 -p1 -b .validate-retry
# 2018948 - Unauthenticated users can't move print jobs in Web UI
%patch18 -p1 -b .move-job
# 1999955 - Printing of banner before PCL file only prints banner
%patch19 -p1 -b .banner-rawfiles
%if %{lspp}
@ -690,6 +694,7 @@ rm -f %{cups_serverbin}/backend/smb
%changelog
* Wed Nov 03 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3op2-9
- 2018948 - Unauthenticated users can't move print jobs in Web UI
- 1999955 - Printing of banner before PCL file only prints banner
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:2.3.3op2-8
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags