1.28.1 - added driverless fax support

This commit is contained in:
Zdenek Dohnal 2020-08-28 08:40:06 +02:00
parent 649f2110e9
commit 47bca23058
9 changed files with 220 additions and 515 deletions

1
.gitignore vendored
View File

@ -98,3 +98,4 @@
/cups-filters-1.27.3.tar.xz
/cups-filters-1.27.4.tar.xz
/cups-filters-1.27.5.tar.xz
/cups-filters-1.28.1.tar.xz

View File

@ -1,90 +0,0 @@
From c2373316af1891f3a2d4af94052f12d2b4c88c49 Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Fri, 21 Aug 2020 08:39:28 +0200
Subject: [PATCH] configure.ac: Add configure option for local queues naming
for remote CUPS queues
---
configure.ac | 30 +++++++++++++++++++++++++++---
utils/cups-browsed.c | 10 +++++++++-
2 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 580b107d..20899740 100644
--- a/configure.ac
+++ b/configure.ac
@@ -850,6 +850,29 @@ PKG_CHECK_EXISTS([liblouis], [
AM_CONDITIONAL(ENABLE_BRAILLE, test "x$enable_braille" = xyes)
AC_SUBST(TABLESDIR)
+# =========================================
+# Local queue naming for remote CUPS queues
+# =========================================
+AC_ARG_WITH([remote-cups-local-queue-naming],
+ [AS_HELP_STRING([--with-remote-cups-local-queue-naming=DNS-SD|MakeModel|RemoteName], [Choose the origin of local queue naming for remote CUPS queues, default based on DNS-SD ID])],
+ [case "x$withval" in
+ "xMakeModel")
+ REMOTE_CUPS_LOCAL_QUEUE_NAMING="MakeModel"
+ AC_DEFINE([NAMING_MAKE_MODEL], [1], [Define that we create local queues for remote CUPS queues based on printer Make-Model])
+ ;;
+ "xRemoteName")
+ REMOTE_CUPS_LOCAL_QUEUE_NAMING="RemoteName"
+ AC_DEFINE([NAMING_REMOTE_NAME], [1], [Define that we create local queues for remote CUPS queues based on their print queue name on the server])
+ ;;
+ *)
+ REMOTE_CUPS_LOCAL_QUEUE_NAMING="DNS-SD"
+ AC_DEFINE([NAMING_DNSSD], [1], [Define that we create local queues for remote CUPS queues based on DNS-SD name])
+ ;;
+ esac],
+ [REMOTE_CUPS_LOCAL_QUEUE_NAMING="DNS-SD"
+ AC_DEFINE([NAMING_DNSSD], [1], [Define that we create local queues for remote CUPS queues based on DNS-SD name])]
+)
+
# =========================================================
# Select a different shell instead of the default /bin/bash
# =========================================================
@@ -919,9 +942,9 @@ AC_OUTPUT
AC_MSG_NOTICE([
==============================================================================
Environment settings:
- CFLAGS: ${CFLAGS}
- CXXFLAGS: ${CXXFLAGS}
- LDFLAGS: ${LDFLAGS}
+ CFLAGS: ${CFLAGS}
+ CXXFLAGS: ${CXXFLAGS}
+ LDFLAGS: ${LDFLAGS}
Build configuration:
cups-config: ${with_cups_config}
font directory: ${sysconfdir}/${FONTDIR}
@@ -955,6 +978,7 @@ Build configuration:
driverless: ${enable_driverless}
apple-raster: ${APPLE_RASTER_FILTER}
pclm: ${enable_pclm}
+ local queue naming for remote CUPS queues: ${REMOTE_CUPS_LOCAL_QUEUE_NAMING}
all ipp printer auto-setup: ${enable_auto_setup_all}
only driverless auto-setup: ${enable_auto_setup_driverless_only}
only local auto-setup: ${enable_auto_setup_local_only}
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
index 9f0e7b92..64675e1c 100644
--- a/utils/cups-browsed.c
+++ b/utils/cups-browsed.c
@@ -443,7 +443,15 @@ static unsigned int HttpRemoteTimeout = 10;
static unsigned int HttpMaxRetries = 5;
static unsigned int DNSSDBasedDeviceURIs = 1;
static ip_based_uris_t IPBasedDeviceURIs = IP_BASED_URIS_NO;
-static local_queue_naming_t LocalQueueNamingRemoteCUPS=LOCAL_QUEUE_NAMING_DNSSD;
+#ifdef NAMING_MAKE_MODEL
+static local_queue_naming_t LocalQueueNamingRemoteCUPS = LOCAL_QUEUE_NAMING_MAKE_MODEL;
+#else
+# ifdef NAMING_REMOTE_NAME
+static local_queue_naming_t LocalQueueNamingRemoteCUPS = LOCAL_QUEUE_NAMING_REMOTE_NAME;
+# else
+static local_queue_naming_t LocalQueueNamingRemoteCUPS = LOCAL_QUEUE_NAMING_DNSSD;
+# endif
+#endif
static local_queue_naming_t LocalQueueNamingIPPPrinter=LOCAL_QUEUE_NAMING_DNSSD;
static unsigned int OnlyUnsupportedByCUPS = 0;
static unsigned int UseCUPSGeneratedPPDs = 0;
--
2.26.2

View File

@ -1,31 +0,0 @@
From 6b650f45b21e306db482221223584497a710b54d Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Mon, 15 Jun 2020 14:55:31 +0200
Subject: [PATCH] cups-browsed.8: Remove mentions of README and AUTHORS files
---
utils/cups-browsed.8 | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/utils/cups-browsed.8 b/utils/cups-browsed.8
index cc8374ce..73c2f686 100644
--- a/utils/cups-browsed.8
+++ b/utils/cups-browsed.8
@@ -96,12 +96,8 @@ that clients running cups 1.6.x plus \fBcups-browsed\fP can use the CUPS
broadcasts from servers with cups 1.5.x. As with browsing of Bonjour
broadcasts, the created local raw queues are available to applications
and command line tools.
+.PP
+This manual page was written for the Debian Project, but it may be used by others.
.SH SEE ALSO
\fBcups-browsed.conf\fP(5)
-.PP
-/usr/share/doc/\fBcups-browsed\fP/README.gz
-.SH AUTHOR
-The authors of \fBcups-browsed\fP are listed in /usr/share/doc/\fBcups-browsed\fP/AUTHORS.
-.PP
-This manual page was written for the Debian Project, but it may be used by others.
--
2.26.2

View File

@ -1,311 +0,0 @@
From ee288bfdf0b6f3778d3962087ae8d5fb1890215a Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Tue, 18 Aug 2020 08:01:08 +0200
Subject: [PATCH] cups-browsed.c: Fix several memory leaks
---
utils/cups-browsed.c | 126 ++++++++++++++++++++++++++++++++++++++-----
1 file changed, 113 insertions(+), 13 deletions(-)
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
index c5eec9fd..885783ee 100644
--- a/utils/cups-browsed.c
+++ b/utils/cups-browsed.c
@@ -1409,9 +1409,15 @@ void add_mimetype_attributes(char* cluster_name, ipp_t **merged_attributes)
ippAddStrings(*merged_attributes, IPP_TAG_PRINTER,IPP_TAG_MIMETYPE,
attributes[attr_no], num_value, NULL,
(const char * const *)values);
+
+ for (int k = 0; k < i; k++) {
+ free(values[k]);
+ values[k] = NULL;
+ }
}
+ cupsArrayDelete(list);
+ list = NULL;
}
- cupsArrayDelete(list);
}
/*add_tagzero_attributes - Adds attribute to the merged_attribute variable for
@@ -1476,9 +1482,15 @@ void add_tagzero_attributes(char* cluster_name, ipp_t **merged_attributes)
IPP_CONST_TAG(IPP_TAG_KEYWORD),
attributes[attr_no], num_value, NULL,
(const char * const *)values);
+
+ for (int k = 0; k < i; k++) {
+ free(values[k]);
+ values[k] = NULL;
+ }
}
+ cupsArrayDelete(list);
+ list = NULL;
}
- cupsArrayDelete(list);
}
/*add_keyword_attributes - Adds attributes to the merged_attribute variable for
@@ -1540,9 +1552,15 @@ void add_keyword_attributes(char* cluster_name, ipp_t **merged_attributes)
ippAddStrings(*merged_attributes, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
attributes[attr_no], num_value, NULL,
(const char * const *)values);
+
+ for (int k = 0; k < i; k++) {
+ free(values[k]);
+ values[k] = NULL;
+ }
}
+ cupsArrayDelete(list);
+ list = NULL;
}
- cupsArrayDelete(list);
}
/*add_enum_attributes - Adds attributes to the merged_attribute variable for
@@ -1552,7 +1570,7 @@ void add_enum_attributes(char* cluster_name, ipp_t **merged_attributes)
{
int count, i, value;
remote_printer_t *p;
- char *str;
+ char *str = NULL;
char *q;
cups_array_t *list;
ipp_attribute_t *attr;
@@ -1600,8 +1618,14 @@ void add_enum_attributes(char* cluster_name, ipp_t **merged_attributes)
ippAddIntegers(*merged_attributes, IPP_TAG_PRINTER,IPP_TAG_ENUM,
attributes[attr_no], num_value,values);
}
+
+ if (str != NULL) {
+ free(str);
+ str = NULL;
+ }
+ cupsArrayDelete(list);
+ list = NULL;
}
- cupsArrayDelete(list);
}
/*add_margin_attribute - Adds margin attributes to the merged_attribute variable for the cluster.*/
@@ -1657,8 +1681,14 @@ void add_margin_attributes(char* cluster_name, ipp_t **merged_attributes)
ippAddIntegers(*merged_attributes, IPP_TAG_PRINTER,IPP_TAG_INTEGER,
attributes[attr_no], num_value,values);
}
+
+ if (str != NULL) {
+ free(str);
+ str = NULL;
+ }
+ cupsArrayDelete(list);
+ list = NULL;
}
- cupsArrayDelete(list);
}
/*add_resolution_attributes - Adds resolution attributes to the merged_attribute
@@ -1710,8 +1740,9 @@ void add_resolution_attributes(char* cluster_name, ipp_t **merged_attributes)
attributes[attr_no], num_resolution,
IPP_RES_PER_INCH, xres, yres);
}
+ cupsArrayDelete(res_array);
+ res_array = NULL;
}
- cupsArrayDelete(res_array);
}
/*add_mediasize_attribute - Adds media sizes to the merged_attribute for the
@@ -1810,7 +1841,11 @@ void add_mediasize_attributes(char* cluster_name, ipp_t **merged_attributes)
}
}
}
+
+ free(temp);
+ free(temp_range);
cupsArrayDelete(sizes);
+ cupsArrayDelete(size_ranges);
}
/*add_mediadatabase_attribute - Adds media-col-database attributes for the
@@ -1928,6 +1963,8 @@ add_mediadatabase_attributes(char* cluster_name, ipp_t **merged_attributes)
}
}
}
+
+ free(temp);
cupsArrayDelete(media_database);
}
@@ -1974,8 +2011,11 @@ void add_jobpresets_attribute(char* cluster_name, ipp_t ** merged_attributes)
}
}
- if (num_preset == 0)
+ if (num_preset == 0) {
+ cupsArrayDelete(list);
+ cupsArrayDelete(added_presets);
return;
+ }
preset_attribute = ippAddCollections(*merged_attributes, IPP_TAG_PRINTER,
"job-presets-supported", num_preset,
@@ -1998,6 +2038,9 @@ void add_jobpresets_attribute(char* cluster_name, ipp_t ** merged_attributes)
}
}
}
+
+ cupsArrayDelete(list);
+ cupsArrayDelete(added_presets);
}
/* get_pagesize: Function returns the standard/custom page size using
@@ -2029,6 +2072,8 @@ static cups_array_t* get_pagesize(ipp_t *printer_attributes)
cupsArrayAdd(page_media, ppdsizename);
}
free(ppdsizename);
+ cupsArrayDelete(sizes);
+
return page_media;
}
@@ -2669,8 +2714,14 @@ cups_array_t* get_cluster_sizes(char* cluster_name)
}
}
}
+
+ cupsArrayDelete(sizes);
+ sizes = NULL;
}
}
+
+ cupsArrayDelete(sizes_ppdname);
+
return cluster_sizes;
}
@@ -2718,6 +2769,9 @@ cups_array_t* generate_cluster_conflicts(char* cluster_name,
cupsArrayAdd(pagesizes, ppdsizename);
}
cluster_options[i] = pagesizes;
+
+ cupsArrayDelete(sizes);
+ sizes = NULL;
}
}
@@ -2774,10 +2828,21 @@ cups_array_t* generate_cluster_conflicts(char* cluster_name,
cupsArrayAdd(conflict_pairs, constraint);
}
}
+
+ cupsArrayDelete(printer_second_options);
+ printer_second_options = NULL;
}
}
+
+ cupsArrayDelete(printer_first_options);
+ printer_first_options = NULL;
}
}
+
+ for(i = 0; i < no_of_ppd_keywords; i ++) {
+ cupsArrayDelete(cluster_options[i]);
+ }
+
free(ppdsizename);
return conflict_pairs;
}
@@ -3010,6 +3075,8 @@ void get_cluster_default_attributes(ipp_t** merged_attributes,
temp->bottom_margin,
temp->media_source, temp->media_type);
ippSetCollection(*merged_attributes, &media_col_default, 0, current_media);
+
+ free(temp);
}
/*Finding the default colormodel for the cluster*/
@@ -3691,7 +3758,8 @@ get_printer_uuid(http_t *http_printer,
const char* raw_uri)
{
ipp_t *response = NULL;
- ipp_attribute_t *attr;
+ ipp_attribute_t *attr = NULL;
+ char * uuid = NULL;
const char * const pattrs[] = {
"printer-uuid",
@@ -3713,13 +3781,18 @@ get_printer_uuid(http_t *http_printer,
}
attr = ippFindAttribute(response, "printer-uuid", IPP_TAG_URI);
+
+
if (attr)
- return (ippGetString(attr, 0, NULL) + 9);
+ uuid = ippGetString(attr, 0, NULL) + 9;
else {
debug_printf ("Printer with URI %s: Cannot read \"printer-uuid\" IPP attribute!\n",
raw_uri);
- return NULL;
}
+
+ ippDelete(response);
+
+ return uuid;
}
static void
@@ -8114,6 +8187,19 @@ gboolean update_cups_queues(gpointer unused) {
ppdfile = strdup(buffer);
}
}
+
+ if (num_cluster_printers != 1) {
+ free(default_pagesize);
+ default_pagesize = NULL;
+ free(make_model);
+ make_model = NULL;
+ cupsArrayDelete(conflicts);
+ conflicts = NULL;
+ ippDelete(printer_attributes);
+ printer_attributes = NULL;
+ cupsArrayDelete(sizes);
+ sizes = NULL;
+ }
} else if (IPPPrinterQueueType == PPD_NO) {
ppdfile = NULL;
@@ -8430,6 +8516,19 @@ gboolean update_cups_queues(gpointer unused) {
}
}
}
+
+ if (num_cluster_printers != 1) {
+ free(default_pagesize);
+ default_pagesize = NULL;
+ free(make_model);
+ make_model = NULL;
+ cupsArrayDelete(conflicts);
+ conflicts = NULL;
+ ippDelete(printer_attributes);
+ printer_attributes = NULL;
+ cupsArrayDelete(sizes);
+ sizes = NULL;
+ }
} else {
/* Device URI: using implicitclass backend for IPP network printer */
httpAssembleURI(HTTP_URI_CODING_ALL, device_uri, sizeof(device_uri),
@@ -8531,8 +8630,9 @@ gboolean update_cups_queues(gpointer unused) {
cupsFilePrintf(out, "%s\n", line);
}
/* Save the NickName of the PPD to check whether external
- manipulations of the print queue have replaced the PPD */
- if (!strncmp(line, "*NickName:", 10)) {
+ manipulations of the print queue have replaced the PPD.
+ Check whether nickname is defined too */
+ if (!strncmp(line, "*NickName:", 10) && p->nickname == NULL) {
ptr = strchr(line, '"');
if (ptr) {
ptr ++;
--
2.26.2

View File

@ -0,0 +1,165 @@
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

View File

@ -1,13 +0,0 @@
diff --git a/cupsfilters/ppdgenerator.c b/cupsfilters/ppdgenerator.c
index 55801af..428a23e 100644
--- a/cupsfilters/ppdgenerator.c
+++ b/cupsfilters/ppdgenerator.c
@@ -2062,7 +2062,7 @@ ppdCreateFromIPP2(char *buffer, /* I - Filename buffer */
format, we need to create multiple copies on the client. We add a line to
the PPD which tells the pdftopdf filter to generate the copies */
if (manual_copies == 1)
- cupsFilePuts(fp, "*cupsManualCopies: true\n");
+ cupsFilePuts(fp, "*cupsManualCopies: True\n");
/* No resolution requirements by any of the supported PDLs?
Use "printer-resolution-supported" attribute */

View File

@ -1,45 +0,0 @@
diff --git a/configure.ac b/configure.ac
index 3c3d68ad..4e2ee330 100644
--- a/configure.ac
+++ b/configure.ac
@@ -850,6 +850,16 @@ PKG_CHECK_EXISTS([liblouis], [
AM_CONDITIONAL(ENABLE_BRAILLE, test "x$enable_braille" = xyes)
AC_SUBST(TABLESDIR)
+# ===============================================
+# Should we keep generated queues after shutdown?
+# ===============================================
+AC_ARG_ENABLE(saving-created-queues, AS_HELP_STRING([--enable-saving-created-queues], [enable saving created queues during shutdown]),
+ [SAVING_CREATED_QUEUES=$enableval],[SAVING_CREATED_QUEUES="no"])
+
+AS_IF([test "x$SAVING_CREATED_QUEUES" != "xno"],
+ [AC_DEFINE([SAVING_CREATED_QUEUES], [1], [Define whether we save queues during shutdown])]
+)
+
# =========================================
# Local queue naming for remote CUPS queues
# =========================================
@@ -979,6 +989,7 @@ Build configuration:
apple-raster: ${APPLE_RASTER_FILTER}
pclm: ${enable_pclm}
local queue naming for remote CUPS queues: ${REMOTE_CUPS_LOCAL_QUEUE_NAMING}
+ keep generated queues during shutdown: ${SAVING_CREATED_QUEUES}
all ipp printer auto-setup: ${enable_auto_setup_all}
only driverless auto-setup: ${enable_auto_setup_driverless_only}
only local auto-setup: ${enable_auto_setup_local_only}
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
index 59e3c269..00039c49 100644
--- a/utils/cups-browsed.c
+++ b/utils/cups-browsed.c
@@ -466,7 +466,11 @@ static create_ipp_printer_queues_t CreateIPPPrinterQueues = IPP_PRINTERS_DRIVERL
static create_ipp_printer_queues_t CreateIPPPrinterQueues = IPP_PRINTERS_ALL;
#endif
#endif
+#ifdef SAVING_CREATED_QUEUES
static unsigned int KeepGeneratedQueuesOnShutdown = 1;
+#else
+static unsigned int KeepGeneratedQueuesOnShutdown = 0;
+#endif
static ipp_queue_type_t IPPPrinterQueueType = PPD_YES;
static int NewIPPPrinterQueuesShared = 0;
static int AutoClustering = 1;

View File

@ -3,8 +3,8 @@
Summary: OpenPrinting CUPS filters and backends
Name: cups-filters
Version: 1.27.5
Release: 7%{?dist}
Version: 1.28.1
Release: 1%{?dist}
# For a breakdown of the licensing, see COPYING file
# GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*,
@ -20,18 +20,7 @@ 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
# add configure option for local_queue_naming for remote CUPS queues
# backported from upstream
Patch01: 0001-configure.ac-Add-configure-option-for-local-queues-n.patch
# remove bad paths in man page, backported from upstream
Patch02: 0001-cups-browsed.8-Remove-mentions-of-README-and-AUTHORS.patch
# upstream decided on keep queues after restart - IMO it causes more issues than it
# solves https://github.com/OpenPrinting/cups-filters/issues/241
Patch03: cups-filters-remove-queues-on-restart.patch
# backported from upstream, copies were ignored because typo in ppdgenerator
Patch04: cups-filters-manual-copies.patch
# 1867412 - cups-browsed leaks memory, backported from upstream
Patch05: 0001-cups-browsed.c-Fix-several-memory-leaks.patch
Patch01: 0001-libcupsfilters-Removed-all-signal-handling-and-globa.patch
Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
@ -44,6 +33,8 @@ Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
BuildRequires: gcc
# gcc-c++ for pdftoopvp, pdftopdf
BuildRequires: gcc-c++
# for autosetup
BuildRequires: git
BuildRequires: cups-devel
BuildRequires: pkgconf-pkg-config
@ -143,15 +134,7 @@ This package provides cupsfilters and fontembed libraries.
This is the development package for OpenPrinting CUPS filters and backends.
%prep
%setup -q
# set LocalQueueNamingRemoteCUPS and CreateIPPPrinterQueues by default
%patch01 -p1 -b .add-configure-local-queues
# links in manpage
%patch02 -p1 -b .manpage
%patch03 -p1 -b .remove-queues-on-restart
%patch04 -p1 -b .manual-copies
%patch05 -p1 -b .sizes-leak
%autosetup -S git
%build
# work-around Rpath
@ -253,7 +236,47 @@ done
%{_pkgdocdir}/AUTHORS
%{_pkgdocdir}/NEWS
%config(noreplace) %{_sysconfdir}/cups/cups-browsed.conf
%attr(0755,root,root) %{_cups_serverbin}/filter/*
%{_cups_serverbin}/filter/cgmtopdf
%{_cups_serverbin}/filter/cmxtopdf
%{_cups_serverbin}/filter/emftopdf
%{_cups_serverbin}/filter/imagetoubrl
%{_cups_serverbin}/filter/svgtopdf
%{_cups_serverbin}/filter/textbrftoindexv4
%{_cups_serverbin}/filter/vectortoubrl
%{_cups_serverbin}/filter/wmftopdf
%{_cups_serverbin}/filter/xfigtopdf
%attr(0755,root,root) %{_cups_serverbin}/filter/bannertopdf
%attr(0755,root,root) %{_cups_serverbin}/filter/brftoembosser
%attr(0755,root,root) %{_cups_serverbin}/filter/brftopagedbrf
%attr(0755,root,root) %{_cups_serverbin}/filter/commandtoescpx
%attr(0755,root,root) %{_cups_serverbin}/filter/commandtopclx
%attr(0755,root,root) %{_cups_serverbin}/filter/foomatic-rip
%attr(0755,root,root) %{_cups_serverbin}/filter/gstopdf
%attr(0755,root,root) %{_cups_serverbin}/filter/gstopxl
%attr(0755,root,root) %{_cups_serverbin}/filter/gstoraster
%attr(0755,root,root) %{_cups_serverbin}/filter/imagetobrf
%attr(0755,root,root) %{_cups_serverbin}/filter/imagetopdf
%attr(0755,root,root) %{_cups_serverbin}/filter/imagetops
%attr(0755,root,root) %{_cups_serverbin}/filter/imagetoraster
%attr(0755,root,root) %{_cups_serverbin}/filter/imageubrltoindexv3
%attr(0755,root,root) %{_cups_serverbin}/filter/imageubrltoindexv4
%attr(0755,root,root) %{_cups_serverbin}/filter/musicxmltobrf
%attr(0755,root,root) %{_cups_serverbin}/filter/pdftopdf
%attr(0755,root,root) %{_cups_serverbin}/filter/pdftops
%attr(0755,root,root) %{_cups_serverbin}/filter/pdftoraster
%attr(0755,root,root) %{_cups_serverbin}/filter/rastertoescpx
%attr(0755,root,root) %{_cups_serverbin}/filter/rastertopclm
%attr(0755,root,root) %{_cups_serverbin}/filter/rastertopclx
%attr(0755,root,root) %{_cups_serverbin}/filter/rastertopdf
%attr(0755,root,root) %{_cups_serverbin}/filter/rastertops
%attr(0755,root,root) %{_cups_serverbin}/filter/sys5ippprinter
%attr(0755,root,root) %{_cups_serverbin}/filter/textbrftoindexv3
%attr(0755,root,root) %{_cups_serverbin}/filter/texttobrf
%attr(0755,root,root) %{_cups_serverbin}/filter/texttopdf
%attr(0755,root,root) %{_cups_serverbin}/filter/texttops
%attr(0755,root,root) %{_cups_serverbin}/filter/texttotext
%attr(0755,root,root) %{_cups_serverbin}/filter/vectortobrf
%attr(0755,root,root) %{_cups_serverbin}/filter/vectortopdf
# all backends needs to be run only as root because of kerberos
%attr(0700,root,root) %{_cups_serverbin}/backend/parallel
# Serial backend needs to run as root (bug #212577#c4).
@ -266,8 +289,11 @@ done
%attr(0700,root,root) %{_cups_serverbin}/backend/cups-brf
%{_bindir}/foomatic-rip
%{_bindir}/driverless
%{_bindir}/driverless-fax
%{_cups_serverbin}/backend/driverless
%{_cups_serverbin}/backend/driverless-fax
%{_cups_serverbin}/driver/driverless
%{_cups_serverbin}/driver/driverless-fax
%{_datadir}/cups/banners
%{_datadir}/cups/braille
%{_datadir}/cups/charsets
@ -321,6 +347,9 @@ done
%{_libdir}/libfontembed.so
%changelog
* Thu Aug 27 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.1-1
- 1.28.1 - added driverless fax support
* Fri Aug 21 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.5-7
- use configure option instead of downstream, cups-browsed.conf editing, patch
- the exact path in cups-browsed manpage was removed, use the patch removing it instead of downstream one

View File

@ -1 +1 @@
SHA512 (cups-filters-1.27.5.tar.xz) = 8bc917b2a168add1062d091d02d99c39d72861c0d0cb1242c34b2bf117c9943e7fdc1fe002de7cde4cb1919fbce41073adc34916c328fc99e66e389b0a4fe103
SHA512 (cups-filters-1.28.1.tar.xz) = 23f6fa31e2c64aaa1b7321280bb92dffb25456289c21aa91aec46afca80a8b4e9ea6697ed5ed574d4bbb0c2ab790618cc926d46bb35f2eec576d0ab88a0f2aff