use configure option instead of downstream, cups-browsed.conf editing, patch
This commit is contained in:
parent
63ff06c16a
commit
f282cc8514
@ -0,0 +1,90 @@
|
||||
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
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -up cups-filters-1.16.1/utils/cups-browsed.conf.in.createall cups-filters-1.16.1/utils/cups-browsed.conf.in
|
||||
--- cups-filters-1.16.1/utils/cups-browsed.conf.in.createall 2018-01-02 17:17:51.555941155 +0100
|
||||
+++ cups-filters-1.16.1/utils/cups-browsed.conf.in 2018-01-02 17:19:49.651048564 +0100
|
||||
@@ -359,7 +359,7 @@ BrowseRemoteProtocols @BROWSEREMOTEPROTO
|
||||
|
||||
# LocalQueueNamingRemoteCUPS DNS-SD
|
||||
# LocalQueueNamingRemoteCUPS MakeModel
|
||||
-# LocalQueueNamingRemoteCUPS RemoteName
|
||||
+LocalQueueNamingRemoteCUPS RemoteName
|
||||
# LocalQueueNamingIPPPrinter DNS-SD
|
||||
# LocalQueueNamingIPPPrinter MakeModel
|
||||
|
@ -4,7 +4,7 @@
|
||||
Summary: OpenPrinting CUPS filters and backends
|
||||
Name: cups-filters
|
||||
Version: 1.27.5
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
|
||||
# For a breakdown of the licensing, see COPYING file
|
||||
# GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*,
|
||||
@ -20,8 +20,9 @@ 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
|
||||
|
||||
# set defaults in cups-browsed.conf
|
||||
Patch01: cups-filters-createall.patch
|
||||
# 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
|
||||
# Links in man page is wrong - it shows 'cups-browsed' in path, but we
|
||||
# have 'cups-filters' in path, because it is shipped in 'cups-filters' package
|
||||
# instead of 'cups-browsed' as Ubuntu does. I can repack the project later,
|
||||
@ -148,7 +149,7 @@ This is the development package for OpenPrinting CUPS filters and backends.
|
||||
%setup -q
|
||||
|
||||
# set LocalQueueNamingRemoteCUPS and CreateIPPPrinterQueues by default
|
||||
%patch01 -p1 -b .createall
|
||||
%patch01 -p1 -b .add-configure-local-queues
|
||||
# links in manpage
|
||||
%patch02 -p1 -b .manpage
|
||||
%patch03 -p1 -b .remove-queues-on-restart
|
||||
@ -172,6 +173,8 @@ This is the development package for OpenPrinting CUPS filters and backends.
|
||||
# --disable-silent-rules - verbose build output
|
||||
# --disable-mutool - mupdf is retired in Fedora, use qpdf
|
||||
# --enable-pclm - support for pclm language
|
||||
# --with-remote-cups-local-queue-naming=RemoteName - name created local queues, which point to
|
||||
# remote CUPS queue, by its name from the server
|
||||
|
||||
%configure --disable-static \
|
||||
--disable-silent-rules \
|
||||
@ -180,7 +183,8 @@ This is the development package for OpenPrinting CUPS filters and backends.
|
||||
--with-rcdir=no \
|
||||
--disable-mutool \
|
||||
--enable-driverless \
|
||||
--enable-pclm
|
||||
--enable-pclm \
|
||||
--with-remote-cups-local-queue-naming=RemoteName
|
||||
|
||||
%make_build
|
||||
|
||||
@ -320,6 +324,9 @@ done
|
||||
%{_libdir}/libfontembed.so
|
||||
|
||||
%changelog
|
||||
* Fri Aug 21 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.5-7
|
||||
- use configure option instead of downstream, cups-browsed.conf editing, patch
|
||||
|
||||
* Wed Aug 19 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.5-6
|
||||
- 1867412 - cups-browsed leaks memory
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user