1.28.2
This commit is contained in:
parent
91fd1dacc7
commit
3b950f0025
1
.gitignore
vendored
1
.gitignore
vendored
@ -99,3 +99,4 @@
|
||||
/cups-filters-1.27.4.tar.xz
|
||||
/cups-filters-1.27.5.tar.xz
|
||||
/cups-filters-1.28.1.tar.xz
|
||||
/cups-filters-1.28.2.tar.xz
|
||||
|
@ -1,165 +0,0 @@
|
||||
From ffce73c94f92c9a1b193858b96399e319268a1fa Mon Sep 17 00:00:00 2001
|
||||
From: Till Kamppeter <till.kamppeter@gmail.com>
|
||||
Date: Thu, 27 Aug 2020 15:45:22 +0200
|
||||
Subject: [PATCH] libcupsfilters: Removed all signal handling and global
|
||||
variables from get_printer_attributes() and ippfind_based_uri_converter()
|
||||
|
||||
(cherry picked from commit 23a9dc4010cefe239b8393e4500eb834b0f5ee32)
|
||||
---
|
||||
cupsfilters/ipp.c | 86 ++++-------------------------------------------
|
||||
1 file changed, 6 insertions(+), 80 deletions(-)
|
||||
|
||||
diff --git a/cupsfilters/ipp.c b/cupsfilters/ipp.c
|
||||
index c9138fe2..21861a59 100644
|
||||
--- a/cupsfilters/ipp.c
|
||||
+++ b/cupsfilters/ipp.c
|
||||
@@ -36,25 +36,24 @@
|
||||
#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
|
||||
#define HAVE_CUPS_1_6 1
|
||||
#endif
|
||||
-static int debug = 0;
|
||||
-static int job_canceled = 0;
|
||||
-static void cancel_job(int sig);
|
||||
|
||||
enum resolve_uri_converter_type /**** Resolving DNS-SD based URI ****/
|
||||
{
|
||||
CUPS_BACKEND_URI_CONVERTER = -1,
|
||||
IPPFIND_BASED_CONVERTER_FOR_PRINT_URI = 0,
|
||||
IPPFIND_BASED_CONVERTER_FOR_FAX_URI = 1
|
||||
-} ;
|
||||
+};
|
||||
+
|
||||
static int
|
||||
convert_to_port(char *a)
|
||||
{
|
||||
int port = 0;
|
||||
- for( int i = 0; i<strlen(a); i++)
|
||||
+ for (int i = 0; i<strlen(a); i++)
|
||||
port = port*10 + (a[i] - '0');
|
||||
-
|
||||
+
|
||||
return (port);
|
||||
}
|
||||
+
|
||||
void
|
||||
log_printf(char *log,
|
||||
const char *format, ...)
|
||||
@@ -232,38 +231,7 @@ get_printer_attributes5(http_t *http_printer,
|
||||
"uri-security-supported"
|
||||
};
|
||||
|
||||
-#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
|
||||
- struct sigaction action; /* Actions for POSIX signals */
|
||||
-#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
|
||||
-
|
||||
- /*
|
||||
- * Make sure status messages are not buffered...
|
||||
- */
|
||||
-
|
||||
- setbuf(stderr, NULL);
|
||||
-
|
||||
- /*
|
||||
- * Ignore broken pipe signals...
|
||||
- */
|
||||
-
|
||||
- signal(SIGPIPE, SIG_IGN);
|
||||
-
|
||||
- /*
|
||||
- * Register a signal handler to cleanly cancel a job.
|
||||
- */
|
||||
-
|
||||
-#ifdef HAVE_SIGSET /* Use System V signals over POSIX to avoid bugs */
|
||||
- sigset(SIGTERM, cancel_job);
|
||||
-#elif defined(HAVE_SIGACTION)
|
||||
- memset(&action, 0, sizeof(action));
|
||||
- sigemptyset(&action.sa_mask);
|
||||
- action.sa_handler = cancel_job;
|
||||
- sigaction(SIGTERM, &action, NULL);
|
||||
-#else
|
||||
- signal(SIGTERM, cancel_job);
|
||||
-#endif /* HAVE_SIGSET */
|
||||
-
|
||||
- /* Expect a device capable of standard IPP Everywhere*/
|
||||
+ /* Expect a device capable of standard IPP Everywhere */
|
||||
if (driverless_info != NULL)
|
||||
*driverless_info = FULL_DRVLESS;
|
||||
|
||||
@@ -549,10 +517,6 @@ ippfind_based_uri_converter (const char *uri, int is_fax)
|
||||
goto error;
|
||||
}
|
||||
|
||||
- if (debug)
|
||||
- fprintf(stderr, "DEBUG: Started %s (PID %d)\n", ippfind_argv[0],
|
||||
- ippfind_pid);
|
||||
-
|
||||
dup2(post_proc_pipe[0], 0);
|
||||
close(post_proc_pipe[0]);
|
||||
close(post_proc_pipe[1]);
|
||||
@@ -617,10 +581,6 @@ ippfind_based_uri_converter (const char *uri, int is_fax)
|
||||
*/
|
||||
|
||||
while ((wait_pid = wait(&wait_status)) < 0 && errno == EINTR) {
|
||||
- if (job_canceled) {
|
||||
- kill(ippfind_pid, SIGTERM);
|
||||
- job_canceled = 0;
|
||||
- }
|
||||
}
|
||||
|
||||
if (wait_pid < 0)
|
||||
@@ -635,34 +595,12 @@ ippfind_based_uri_converter (const char *uri, int is_fax)
|
||||
if (wait_status) {
|
||||
if (WIFEXITED(wait_status)) {
|
||||
exit_status = WEXITSTATUS(wait_status);
|
||||
-
|
||||
- if (debug)
|
||||
- fprintf(stderr, "DEBUG: PID %d (%s) stopped with status %d!\n",
|
||||
- wait_pid,
|
||||
- (wait_pid == ippfind_pid ? "ippfind" : "Unknown process"),
|
||||
- exit_status);
|
||||
-
|
||||
if (wait_pid == ippfind_pid && exit_status <= 2)
|
||||
exit_status = 0;
|
||||
} else if (WTERMSIG(wait_status) == SIGTERM) {
|
||||
- if (debug)
|
||||
- fprintf(stderr,
|
||||
- "DEBUG: PID %d (%s) was terminated normally with signal %d!\n",
|
||||
- wait_pid,
|
||||
- (wait_pid == ippfind_pid ? "ippfind" : "Unknown process"),
|
||||
- exit_status);
|
||||
} else {
|
||||
exit_status = WTERMSIG(wait_status);
|
||||
- if (debug)
|
||||
- fprintf(stderr, "DEBUG: PID %d (%s) crashed on signal %d!\n",
|
||||
- wait_pid,
|
||||
- (wait_pid == ippfind_pid ? "ippfind" : "Unknown process"),
|
||||
- exit_status);
|
||||
}
|
||||
- } else {
|
||||
- if (debug)
|
||||
- fprintf(stderr, "DEBUG: PID %d (%s) exited with no errors.\n",wait_pid,
|
||||
- (wait_pid == ippfind_pid ? "ippfind" :"Unknown process"));
|
||||
}
|
||||
}
|
||||
if (is_fax && !output_of_fax_uri) {
|
||||
@@ -679,18 +617,6 @@ ippfind_based_uri_converter (const char *uri, int is_fax)
|
||||
error:
|
||||
return (NULL);
|
||||
}
|
||||
-
|
||||
-/*
|
||||
- * 'cancel_job()' - Flag the job as canceled.
|
||||
- */
|
||||
-
|
||||
-static void
|
||||
-cancel_job(int sig) /* I - Signal number (unused) */
|
||||
-{
|
||||
- (void)sig;
|
||||
-
|
||||
- job_canceled = 1;
|
||||
-}
|
||||
|
||||
|
||||
#endif /* HAVE_CUPS_1_6 */
|
||||
--
|
||||
2.26.2
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
Summary: OpenPrinting CUPS filters and backends
|
||||
Name: cups-filters
|
||||
Version: 1.28.1
|
||||
Release: 2%{?dist}
|
||||
Version: 1.28.2
|
||||
Release: 1%{?dist}
|
||||
|
||||
# For a breakdown of the licensing, see COPYING file
|
||||
# GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*,
|
||||
@ -20,7 +20,6 @@ License: GPLv2 and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2+ and MIT and BSD with
|
||||
Url: http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters
|
||||
Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz
|
||||
|
||||
Patch01: 0001-libcupsfilters-Removed-all-signal-handling-and-globa.patch
|
||||
|
||||
Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
@ -348,6 +347,9 @@ done
|
||||
%{_libdir}/libfontembed.so
|
||||
|
||||
%changelog
|
||||
* Tue Sep 15 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.2-1
|
||||
- 1.28.2
|
||||
|
||||
* Thu Sep 03 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.1-2
|
||||
- revert previous commit - systemd-resolved doesn't work with avahi right now
|
||||
because missing link in NetworkManager
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (cups-filters-1.28.1.tar.xz) = 23f6fa31e2c64aaa1b7321280bb92dffb25456289c21aa91aec46afca80a8b4e9ea6697ed5ed574d4bbb0c2ab790618cc926d46bb35f2eec576d0ab88a0f2aff
|
||||
SHA512 (cups-filters-1.28.2.tar.xz) = aa5f075927286a8278259025aa5baf95445809a83b88e2d4654e8f0a124012591b045df115294242fae60a283d983d6cdbaafc6a51224af30a7e56b58d831da5
|
||||
|
Loading…
Reference in New Issue
Block a user