Merge branch 'f20'
This commit is contained in:
commit
5e0ad60bcb
1
.gitignore
vendored
1
.gitignore
vendored
@ -58,3 +58,4 @@ cups-1.4.4-source.tar.bz2
|
||||
/cups-1.7rc1-source.tar.bz2
|
||||
/cups-1.7.0-source.tar.bz2
|
||||
/cups-1.7.1-source.tar.bz2
|
||||
/cups-1.7.2-source.tar.bz2
|
||||
|
BIN
cups-1.7.2-source.tar.bz2.sig
Normal file
BIN
cups-1.7.2-source.tar.bz2.sig
Normal file
Binary file not shown.
@ -1,46 +0,0 @@
|
||||
diff -up cups-1.7.1/backend/dnssd.c.avahi-browse cups-1.7.1/backend/dnssd.c
|
||||
--- cups-1.7.1/backend/dnssd.c.avahi-browse 2012-12-12 20:54:21.000000000 +0000
|
||||
+++ cups-1.7.1/backend/dnssd.c 2014-02-11 12:44:54.785319324 +0000
|
||||
@@ -95,6 +95,7 @@ static int job_canceled = 0;
|
||||
static AvahiSimplePoll *simple_poll = NULL;
|
||||
/* Poll information */
|
||||
static int got_data = 0; /* Got data from poll? */
|
||||
+static int browsers = 0; /* Number of running browsers */
|
||||
#endif /* HAVE_AVAHI */
|
||||
|
||||
|
||||
@@ -345,6 +346,7 @@ main(int argc, /* I - Number of comm
|
||||
return (1);
|
||||
}
|
||||
|
||||
+ browsers = 6;
|
||||
avahi_service_browser_new(client, AVAHI_IF_UNSPEC,
|
||||
AVAHI_PROTO_UNSPEC,
|
||||
"_fax-ipp._tcp", NULL, 0,
|
||||
@@ -559,7 +561,11 @@ main(int argc, /* I - Number of comm
|
||||
fprintf(stderr, "DEBUG: sent=%d, count=%d\n", sent, count);
|
||||
|
||||
if (sent == cupsArrayCount(devices))
|
||||
- break;
|
||||
+#ifdef HAVE_AVAHI
|
||||
+ if (browsers == 0)
|
||||
+ /* All service browsers have finished */
|
||||
+#endif /* HAVE_AVAHI */
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -710,9 +716,12 @@ browse_callback(
|
||||
break;
|
||||
|
||||
case AVAHI_BROWSER_REMOVE:
|
||||
- case AVAHI_BROWSER_ALL_FOR_NOW:
|
||||
case AVAHI_BROWSER_CACHE_EXHAUSTED:
|
||||
break;
|
||||
+
|
||||
+ case AVAHI_BROWSER_ALL_FOR_NOW:
|
||||
+ browsers--;
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
@ -1,25 +1,6 @@
|
||||
diff -up cups-1.7.0/scheduler/Makefile.avahi-no-threaded cups-1.7.0/scheduler/Makefile
|
||||
--- cups-1.7.0/scheduler/Makefile.avahi-no-threaded 2014-01-02 12:05:07.477750519 +0000
|
||||
+++ cups-1.7.0/scheduler/Makefile 2014-01-02 12:05:07.498750621 +0000
|
||||
@@ -17,6 +17,7 @@ include ../Makedefs
|
||||
|
||||
CUPSDOBJS = \
|
||||
auth.o \
|
||||
+ avahi.o \
|
||||
banners.o \
|
||||
cert.o \
|
||||
classes.o \
|
||||
@@ -41,6 +42,7 @@ CUPSDOBJS = \
|
||||
statbuf.o \
|
||||
subscriptions.o \
|
||||
sysman.o \
|
||||
+ timeout.o \
|
||||
tls.o
|
||||
LIBOBJS = \
|
||||
filter.o \
|
||||
diff -up cups-1.7.0/scheduler/avahi.c.avahi-no-threaded cups-1.7.0/scheduler/avahi.c
|
||||
--- cups-1.7.0/scheduler/avahi.c.avahi-no-threaded 2014-01-02 12:05:07.497750616 +0000
|
||||
+++ cups-1.7.0/scheduler/avahi.c 2014-01-02 12:05:07.497750616 +0000
|
||||
diff -up cups-1.7.2/scheduler/avahi.c.avahi-no-threaded cups-1.7.2/scheduler/avahi.c
|
||||
--- cups-1.7.2/scheduler/avahi.c.avahi-no-threaded 2014-04-14 13:56:52.632617316 +0200
|
||||
+++ cups-1.7.2/scheduler/avahi.c 2014-04-14 13:56:52.631617331 +0200
|
||||
@@ -0,0 +1,441 @@
|
||||
+/*
|
||||
+ * "$Id$"
|
||||
@ -462,9 +443,9 @@ diff -up cups-1.7.0/scheduler/avahi.c.avahi-no-threaded cups-1.7.0/scheduler/ava
|
||||
+/*
|
||||
+ * End of "$Id$".
|
||||
+ */
|
||||
diff -up cups-1.7.0/scheduler/avahi.h.avahi-no-threaded cups-1.7.0/scheduler/avahi.h
|
||||
--- cups-1.7.0/scheduler/avahi.h.avahi-no-threaded 2014-01-02 12:05:07.497750616 +0000
|
||||
+++ cups-1.7.0/scheduler/avahi.h 2014-01-02 12:05:07.497750616 +0000
|
||||
diff -up cups-1.7.2/scheduler/avahi.h.avahi-no-threaded cups-1.7.2/scheduler/avahi.h
|
||||
--- cups-1.7.2/scheduler/avahi.h.avahi-no-threaded 2014-04-14 13:56:52.632617316 +0200
|
||||
+++ cups-1.7.2/scheduler/avahi.h 2014-04-14 13:56:52.632617316 +0200
|
||||
@@ -0,0 +1,69 @@
|
||||
+/*
|
||||
+ * "$Id$"
|
||||
@ -535,9 +516,9 @@ diff -up cups-1.7.0/scheduler/avahi.h.avahi-no-threaded cups-1.7.0/scheduler/ava
|
||||
+/*
|
||||
+ * End of "$Id$".
|
||||
+ */
|
||||
diff -up cups-1.7.0/scheduler/cupsd.h.avahi-no-threaded cups-1.7.0/scheduler/cupsd.h
|
||||
--- cups-1.7.0/scheduler/cupsd.h.avahi-no-threaded 2013-05-29 12:51:34.000000000 +0100
|
||||
+++ cups-1.7.0/scheduler/cupsd.h 2014-01-02 12:05:07.497750616 +0000
|
||||
diff -up cups-1.7.2/scheduler/cupsd.h.avahi-no-threaded cups-1.7.2/scheduler/cupsd.h
|
||||
--- cups-1.7.2/scheduler/cupsd.h.avahi-no-threaded 2013-05-29 13:51:34.000000000 +0200
|
||||
+++ cups-1.7.2/scheduler/cupsd.h 2014-04-14 13:56:52.632617316 +0200
|
||||
@@ -119,6 +119,7 @@ extern const char *cups_hstrerror(int);
|
||||
#include "colorman.h"
|
||||
#include "conf.h"
|
||||
@ -592,11 +573,11 @@ diff -up cups-1.7.0/scheduler/cupsd.h.avahi-no-threaded cups-1.7.0/scheduler/cup
|
||||
|
||||
/*
|
||||
* End of "$Id: cupsd.h 10996 2013-05-29 11:51:34Z msweet $".
|
||||
diff -up cups-1.7.0/scheduler/dirsvc.c.avahi-no-threaded cups-1.7.0/scheduler/dirsvc.c
|
||||
--- cups-1.7.0/scheduler/dirsvc.c.avahi-no-threaded 2013-07-26 04:12:37.000000000 +0100
|
||||
+++ cups-1.7.0/scheduler/dirsvc.c 2014-01-02 12:06:27.027137247 +0000
|
||||
@@ -212,7 +212,7 @@ cupsdStartBrowsing(void)
|
||||
}
|
||||
diff -up cups-1.7.2/scheduler/dirsvc.c.avahi-no-threaded cups-1.7.2/scheduler/dirsvc.c
|
||||
--- cups-1.7.2/scheduler/dirsvc.c.avahi-no-threaded 2014-03-05 22:11:32.000000000 +0100
|
||||
+++ cups-1.7.2/scheduler/dirsvc.c 2014-04-14 14:21:11.121344106 +0200
|
||||
@@ -195,7 +195,7 @@ cupsdStartBrowsing(void)
|
||||
cupsdUpdateDNSSDName();
|
||||
|
||||
# else /* HAVE_AVAHI */
|
||||
- if ((DNSSDMaster = avahi_threaded_poll_new()) == NULL)
|
||||
@ -604,16 +585,16 @@ diff -up cups-1.7.0/scheduler/dirsvc.c.avahi-no-threaded cups-1.7.0/scheduler/di
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to create DNS-SD thread.");
|
||||
|
||||
@@ -223,7 +223,7 @@ cupsdStartBrowsing(void)
|
||||
@@ -206,7 +206,7 @@ cupsdStartBrowsing(void)
|
||||
{
|
||||
int error; /* Error code, if any */
|
||||
|
||||
- DNSSDClient = avahi_client_new(avahi_threaded_poll_get(DNSSDMaster), 0,
|
||||
+ DNSSDClient = avahi_client_new(avahi_cups_poll_get(DNSSDMaster), 0,
|
||||
NULL, NULL, &error);
|
||||
- DNSSDClient = avahi_client_new(avahi_threaded_poll_get(DNSSDMaster), AVAHI_CLIENT_NO_FAIL, dnssdClientCallback, NULL, &error);
|
||||
+ DNSSDClient = avahi_client_new(avahi_cups_poll_get(DNSSDMaster), AVAHI_CLIENT_NO_FAIL, dnssdClientCallback, NULL, &error);
|
||||
|
||||
if (DNSSDClient == NULL)
|
||||
@@ -235,11 +235,9 @@ cupsdStartBrowsing(void)
|
||||
{
|
||||
@@ -217,11 +217,9 @@ cupsdStartBrowsing(void)
|
||||
if (FatalErrors & CUPSD_FATAL_BROWSE)
|
||||
cupsdEndProcess(getpid(), 0);
|
||||
|
||||
@ -625,42 +606,58 @@ diff -up cups-1.7.0/scheduler/dirsvc.c.avahi-no-threaded cups-1.7.0/scheduler/di
|
||||
- avahi_threaded_poll_start(DNSSDMaster);
|
||||
}
|
||||
# endif /* HAVE_DNSSD */
|
||||
}
|
||||
@@ -606,7 +604,7 @@ dnssdClientCallback(
|
||||
* Renew Avahi client...
|
||||
*/
|
||||
|
||||
@@ -748,9 +746,7 @@ dnssdDeregisterInstance(
|
||||
- DNSSDClient = avahi_client_new(avahi_threaded_poll_get(DNSSDMaster), AVAHI_CLIENT_NO_FAIL, dnssdClientCallback, NULL, &error);
|
||||
+ DNSSDClient = avahi_client_new(avahi_cups_poll_get(DNSSDMaster), AVAHI_CLIENT_NO_FAIL, dnssdClientCallback, NULL, &error);
|
||||
|
||||
if (!DNSSDClient)
|
||||
{
|
||||
@@ -670,13 +668,7 @@ dnssdDeregisterInstance(
|
||||
DNSServiceRefDeallocate(*srv);
|
||||
|
||||
# else /* HAVE_AVAHI */
|
||||
- avahi_threaded_poll_lock(DNSSDMaster);
|
||||
- if (!from_callback)
|
||||
- avahi_threaded_poll_lock(DNSSDMaster);
|
||||
-
|
||||
avahi_entry_group_free(*srv);
|
||||
- avahi_threaded_poll_unlock(DNSSDMaster);
|
||||
-
|
||||
- if (!from_callback)
|
||||
- avahi_threaded_poll_unlock(DNSSDMaster);
|
||||
# endif /* HAVE_DNSSD */
|
||||
|
||||
*srv = NULL;
|
||||
@@ -1045,14 +1041,10 @@ dnssdRegisterInstance(
|
||||
@@ -997,16 +989,10 @@ dnssdRegisterInstance(
|
||||
(void)commit;
|
||||
|
||||
# else /* HAVE_AVAHI */
|
||||
- avahi_threaded_poll_lock(DNSSDMaster);
|
||||
- if (!from_callback)
|
||||
- avahi_threaded_poll_lock(DNSSDMaster);
|
||||
-
|
||||
if (!*srv)
|
||||
*srv = avahi_entry_group_new(DNSSDClient, dnssdRegisterCallback, NULL);
|
||||
if (!*srv)
|
||||
{
|
||||
- avahi_threaded_poll_unlock(DNSSDMaster);
|
||||
- if (!from_callback)
|
||||
- avahi_threaded_poll_unlock(DNSSDMaster);
|
||||
-
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "DNS-SD registration of \"%s\" failed: %s",
|
||||
name, dnssdErrorString(avahi_client_errno(DNSSDClient)));
|
||||
return (0);
|
||||
@@ -1167,8 +1159,6 @@ dnssdRegisterInstance(
|
||||
@@ -1121,9 +1107,6 @@ dnssdRegisterInstance(
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG, "DNS-SD commit of \"%s\" failed.",
|
||||
name);
|
||||
}
|
||||
-
|
||||
- avahi_threaded_poll_unlock(DNSSDMaster);
|
||||
- if (!from_callback)
|
||||
- avahi_threaded_poll_unlock(DNSSDMaster);
|
||||
# endif /* HAVE_DNSSD */
|
||||
|
||||
if (error)
|
||||
@@ -1335,12 +1325,10 @@ dnssdStop(void)
|
||||
@@ -1294,12 +1277,10 @@ dnssdStop(void)
|
||||
DNSSDMaster = NULL;
|
||||
|
||||
# else /* HAVE_AVAHI */
|
||||
@ -674,9 +671,9 @@ diff -up cups-1.7.0/scheduler/dirsvc.c.avahi-no-threaded cups-1.7.0/scheduler/di
|
||||
DNSSDMaster = NULL;
|
||||
# endif /* HAVE_DNSSD */
|
||||
|
||||
diff -up cups-1.7.0/scheduler/dirsvc.h.avahi-no-threaded cups-1.7.0/scheduler/dirsvc.h
|
||||
--- cups-1.7.0/scheduler/dirsvc.h.avahi-no-threaded 2013-05-29 12:51:34.000000000 +0100
|
||||
+++ cups-1.7.0/scheduler/dirsvc.h 2014-01-02 12:05:07.498750621 +0000
|
||||
diff -up cups-1.7.2/scheduler/dirsvc.h.avahi-no-threaded cups-1.7.2/scheduler/dirsvc.h
|
||||
--- cups-1.7.2/scheduler/dirsvc.h.avahi-no-threaded 2013-05-29 13:51:34.000000000 +0200
|
||||
+++ cups-1.7.2/scheduler/dirsvc.h 2014-04-14 13:56:52.633617302 +0200
|
||||
@@ -51,7 +51,7 @@ VAR cups_array_t *DNSSDPrinters VALUE(NU
|
||||
VAR DNSServiceRef DNSSDMaster VALUE(NULL);
|
||||
/* Master DNS-SD service reference */
|
||||
@ -686,10 +683,10 @@ diff -up cups-1.7.0/scheduler/dirsvc.h.avahi-no-threaded cups-1.7.0/scheduler/di
|
||||
/* Master polling interface for Avahi */
|
||||
VAR AvahiClient *DNSSDClient VALUE(NULL);
|
||||
/* Client information */
|
||||
diff -up cups-1.7.0/scheduler/main.c.avahi-no-threaded cups-1.7.0/scheduler/main.c
|
||||
--- cups-1.7.0/scheduler/main.c.avahi-no-threaded 2014-01-02 12:05:07.477750519 +0000
|
||||
+++ cups-1.7.0/scheduler/main.c 2014-01-02 12:05:07.498750621 +0000
|
||||
@@ -155,6 +155,10 @@ main(int argc, /* I - Number of comm
|
||||
diff -up cups-1.7.2/scheduler/main.c.avahi-no-threaded cups-1.7.2/scheduler/main.c
|
||||
--- cups-1.7.2/scheduler/main.c.avahi-no-threaded 2014-04-14 13:56:52.600617782 +0200
|
||||
+++ cups-1.7.2/scheduler/main.c 2014-04-14 13:56:52.634617287 +0200
|
||||
@@ -134,6 +134,10 @@ main(int argc, /* I - Number of comm
|
||||
int launchd_idle_exit;
|
||||
/* Idle exit on select timeout? */
|
||||
#endif /* HAVE_LAUNCHD */
|
||||
@ -700,7 +697,7 @@ diff -up cups-1.7.0/scheduler/main.c.avahi-no-threaded cups-1.7.0/scheduler/main
|
||||
|
||||
|
||||
#ifdef HAVE_GETEUID
|
||||
@@ -596,6 +600,14 @@ main(int argc, /* I - Number of comm
|
||||
@@ -583,6 +587,14 @@ main(int argc, /* I - Number of comm
|
||||
|
||||
httpInitialize();
|
||||
|
||||
@ -715,7 +712,7 @@ diff -up cups-1.7.0/scheduler/main.c.avahi-no-threaded cups-1.7.0/scheduler/main
|
||||
cupsdStartServer();
|
||||
|
||||
/*
|
||||
@@ -917,6 +929,16 @@ main(int argc, /* I - Number of comm
|
||||
@@ -904,6 +916,16 @@ main(int argc, /* I - Number of comm
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
@ -732,7 +729,7 @@ diff -up cups-1.7.0/scheduler/main.c.avahi-no-threaded cups-1.7.0/scheduler/main
|
||||
#ifndef __APPLE__
|
||||
/*
|
||||
* Update the network interfaces once a minute...
|
||||
@@ -1897,6 +1919,10 @@ select_timeout(int fds) /* I - Number
|
||||
@@ -1884,6 +1906,10 @@ select_timeout(int fds) /* I - Number
|
||||
cupsd_job_t *job; /* Job information */
|
||||
cupsd_subscription_t *sub; /* Subscription information */
|
||||
const char *why; /* Debugging aid */
|
||||
@ -743,7 +740,7 @@ diff -up cups-1.7.0/scheduler/main.c.avahi-no-threaded cups-1.7.0/scheduler/main
|
||||
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2, "select_timeout: JobHistoryUpdate=%ld",
|
||||
@@ -1942,6 +1968,19 @@ select_timeout(int fds) /* I - Number
|
||||
@@ -1929,6 +1955,19 @@ select_timeout(int fds) /* I - Number
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
@ -763,9 +760,28 @@ diff -up cups-1.7.0/scheduler/main.c.avahi-no-threaded cups-1.7.0/scheduler/main
|
||||
/*
|
||||
* Check whether we are accepting new connections...
|
||||
*/
|
||||
diff -up cups-1.7.0/scheduler/timeout.c.avahi-no-threaded cups-1.7.0/scheduler/timeout.c
|
||||
--- cups-1.7.0/scheduler/timeout.c.avahi-no-threaded 2014-01-02 12:05:07.498750621 +0000
|
||||
+++ cups-1.7.0/scheduler/timeout.c 2014-01-02 12:05:07.498750621 +0000
|
||||
diff -up cups-1.7.2/scheduler/Makefile.avahi-no-threaded cups-1.7.2/scheduler/Makefile
|
||||
--- cups-1.7.2/scheduler/Makefile.avahi-no-threaded 2014-04-14 13:56:52.600617782 +0200
|
||||
+++ cups-1.7.2/scheduler/Makefile 2014-04-14 13:56:52.631617331 +0200
|
||||
@@ -17,6 +17,7 @@ include ../Makedefs
|
||||
|
||||
CUPSDOBJS = \
|
||||
auth.o \
|
||||
+ avahi.o \
|
||||
banners.o \
|
||||
cert.o \
|
||||
classes.o \
|
||||
@@ -41,6 +42,7 @@ CUPSDOBJS = \
|
||||
statbuf.o \
|
||||
subscriptions.o \
|
||||
sysman.o \
|
||||
+ timeout.o \
|
||||
tls.o
|
||||
LIBOBJS = \
|
||||
filter.o \
|
||||
diff -up cups-1.7.2/scheduler/timeout.c.avahi-no-threaded cups-1.7.2/scheduler/timeout.c
|
||||
--- cups-1.7.2/scheduler/timeout.c.avahi-no-threaded 2014-04-14 13:56:52.634617287 +0200
|
||||
+++ cups-1.7.2/scheduler/timeout.c 2014-04-14 13:56:52.634617287 +0200
|
||||
@@ -0,0 +1,235 @@
|
||||
+/*
|
||||
+ * "$Id$"
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -up cups-1.6.3/config-scripts/cups-compiler.m4.full-relro cups-1.6.3/config-scripts/cups-compiler.m4
|
||||
--- cups-1.6.3/config-scripts/cups-compiler.m4.full-relro 2013-08-15 12:40:51.965747766 +0100
|
||||
+++ cups-1.6.3/config-scripts/cups-compiler.m4 2013-08-15 12:42:15.083630332 +0100
|
||||
@@ -171,7 +171,7 @@ if test -n "$GCC"; then
|
||||
# The -z relro option is provided by the Linux linker command to
|
||||
# make relocatable data read-only.
|
||||
if test x$enable_relro = xyes; then
|
||||
- RELROFLAGS="-Wl,-z,relro"
|
||||
+ RELROFLAGS="-Wl,-z,relro,-z,now"
|
||||
fi
|
||||
;;
|
||||
esac
|
@ -411,14 +411,6 @@ diff -up cups-1.7.1/Makedefs.in.lspp cups-1.7.1/Makedefs.in
|
||||
diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
--- cups-1.7.1/scheduler/client.c.lspp 2013-09-27 16:09:25.000000000 +0200
|
||||
+++ cups-1.7.1/scheduler/client.c 2014-01-08 18:43:27.298821568 +0100
|
||||
@@ -41,6 +41,7 @@
|
||||
* valid_host() - Is the Host: field valid?
|
||||
* write_file() - Send a file via HTTP.
|
||||
* write_pipe() - Flag that data is available on the CGI pipe.
|
||||
+ * client_pid_to_auid() - Get the audit login uid of the client.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -49,6 +50,7 @@
|
||||
|
||||
#include "cupsd.h"
|
||||
@ -1825,15 +1817,6 @@ diff -up cups-1.7.1/scheduler/job.h.lspp cups-1.7.1/scheduler/job.h
|
||||
diff -up cups-1.7.1/scheduler/main.c.lspp cups-1.7.1/scheduler/main.c
|
||||
--- cups-1.7.1/scheduler/main.c.lspp 2014-01-08 18:43:27.265822025 +0100
|
||||
+++ cups-1.7.1/scheduler/main.c 2014-01-08 18:43:27.308821430 +0100
|
||||
@@ -38,6 +38,8 @@
|
||||
* usage() - Show scheduler usage.
|
||||
*/
|
||||
|
||||
+/* (c) Copyright 2005-2006 Hewlett-Packard Development Company, L.P. */
|
||||
+
|
||||
/*
|
||||
* Include necessary headers...
|
||||
*/
|
||||
@@ -80,6 +82,9 @@
|
||||
# include <sys/param.h>
|
||||
#endif /* HAVE_SYS_PARAM_H */
|
||||
|
@ -1,46 +0,0 @@
|
||||
diff -up cups-1.7.1/cups/dest.c.str4332 cups-1.7.1/cups/dest.c
|
||||
--- cups-1.7.1/cups/dest.c.str4332 2014-03-06 11:01:32.539652971 +0000
|
||||
+++ cups-1.7.1/cups/dest.c 2014-03-06 11:01:41.567696560 +0000
|
||||
@@ -891,6 +891,10 @@ cupsEnumDests(
|
||||
num_dests; /* Number of destinations */
|
||||
cups_dest_t *dests = NULL, /* Destinations */
|
||||
*dest; /* Current destination */
|
||||
+ const char *defprinter; /* Default printer */
|
||||
+ char name[1024], /* Copy of printer name */
|
||||
+ *instance, /* Pointer to instance name */
|
||||
+ *user_default; /* User default printer */
|
||||
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
|
||||
int count, /* Number of queries started */
|
||||
remaining; /* Remainder of timeout */
|
||||
@@ -936,6 +940,31 @@ cupsEnumDests(
|
||||
num_dests = _cupsGetDests(CUPS_HTTP_DEFAULT, IPP_OP_CUPS_GET_PRINTERS, NULL,
|
||||
&dests, type, mask);
|
||||
|
||||
+ if ((user_default = _cupsUserDefault(name, sizeof(name))) != NULL)
|
||||
+ defprinter = name;
|
||||
+ else if ((defprinter = cupsGetDefault2(CUPS_HTTP_DEFAULT)) != NULL)
|
||||
+ {
|
||||
+ strlcpy(name, defprinter, sizeof(name));
|
||||
+ defprinter = name;
|
||||
+ }
|
||||
+
|
||||
+ if (defprinter)
|
||||
+ {
|
||||
+ /*
|
||||
+ * Separate printer and instance name...
|
||||
+ */
|
||||
+
|
||||
+ if ((instance = strchr(name, '/')) != NULL)
|
||||
+ *instance++ = '\0';
|
||||
+
|
||||
+ /*
|
||||
+ * Lookup the printer and instance and make it the default...
|
||||
+ */
|
||||
+
|
||||
+ if ((dest = cupsGetDest(name, instance, num_dests, dests)) != NULL)
|
||||
+ dest->is_default = 1;
|
||||
+ }
|
||||
+
|
||||
for (i = num_dests, dest = dests;
|
||||
i > 0 && (!cancel || !*cancel);
|
||||
i --, dest ++)
|
@ -1,31 +0,0 @@
|
||||
diff -up cups-1.7.1/scheduler/client.c.str4366 cups-1.7.1/scheduler/client.c
|
||||
--- cups-1.7.1/scheduler/client.c.str4366 2014-03-06 10:56:08.501062334 +0000
|
||||
+++ cups-1.7.1/scheduler/client.c 2014-03-06 10:56:26.223150784 +0000
|
||||
@@ -3010,6 +3010,17 @@ cupsdWriteClient(cupsd_client_t *con) /*
|
||||
con->file_ready = 0;
|
||||
}
|
||||
|
||||
+ bytes = (ssize_t)(sizeof(con->header) - (size_t)con->header_used);
|
||||
+
|
||||
+ if (!con->pipe_pid && bytes > con->http.data_remaining)
|
||||
+ {
|
||||
+ /*
|
||||
+ * Limit GET bytes to original size of file (STR #3265)...
|
||||
+ */
|
||||
+
|
||||
+ bytes = (ssize_t)con->http.data_remaining;
|
||||
+ }
|
||||
+
|
||||
if (con->response && con->response->state != IPP_DATA)
|
||||
{
|
||||
int wused = con->http.wused; /* Previous write buffer use */
|
||||
@@ -3052,8 +3063,7 @@ cupsdWriteClient(cupsd_client_t *con) /*
|
||||
con->http.fd, (int)bytes, con->http.state,
|
||||
CUPS_LLCAST con->http.data_remaining);
|
||||
}
|
||||
- else if ((bytes = read(con->file, con->header + con->header_used,
|
||||
- sizeof(con->header) - con->header_used)) > 0)
|
||||
+ else if ((bytes = read(con->file, con->header + con->header_used, (size_t)bytes)) > 0)
|
||||
{
|
||||
con->header_used += bytes;
|
||||
|
@ -1,20 +0,0 @@
|
||||
diff -up cups-1.7.1/cups/dest.c.str4380 cups-1.7.1/cups/dest.c
|
||||
--- cups-1.7.1/cups/dest.c.str4380 2014-03-05 13:09:02.211609453 +0000
|
||||
+++ cups-1.7.1/cups/dest.c 2014-03-05 13:09:58.871858297 +0000
|
||||
@@ -953,11 +953,11 @@ cupsEnumDests(
|
||||
* Get Bonjour-shared printers...
|
||||
*/
|
||||
|
||||
- data.type = type;
|
||||
- data.mask = mask;
|
||||
- data.devices = cupsArrayNew3((cups_array_func_t)cups_dnssd_compare_devices,
|
||||
- NULL, NULL, 0, NULL,
|
||||
- (cups_afree_func_t)cups_dnssd_free_device);
|
||||
+ data.type = type;
|
||||
+ data.mask = mask;
|
||||
+ data.cb = cb;
|
||||
+ data.user_data = user_data;
|
||||
+ data.devices = cupsArrayNew3((cups_array_func_t)cups_dnssd_compare_devices, NULL, NULL, 0, NULL, (cups_afree_func_t)cups_dnssd_free_device);
|
||||
|
||||
# ifdef HAVE_DNSSD
|
||||
if (DNSServiceCreateConnection(&data.main_ref) != kDNSServiceErr_NoError)
|
@ -1,12 +0,0 @@
|
||||
diff -up cups-1.7.1/cups/request.c.str4386 cups-1.7.1/cups/request.c
|
||||
--- cups-1.7.1/cups/request.c.str4386 2013-07-23 13:33:52.000000000 +0100
|
||||
+++ cups-1.7.1/cups/request.c 2014-03-06 10:58:39.018807898 +0000
|
||||
@@ -261,7 +261,7 @@ cupsDoIORequest(http_t *http, /* I -
|
||||
* Get the server's response...
|
||||
*/
|
||||
|
||||
- if (status != HTTP_STATUS_ERROR)
|
||||
+ if (status <= HTTP_STATUS_CONTINUE || status == HTTP_STATUS_OK)
|
||||
{
|
||||
response = cupsGetResponse(http, resource);
|
||||
status = httpGetStatus(http);
|
@ -211,15 +211,6 @@ diff -up cups-1.7rc1/scheduler/listen.c.systemd-socket cups-1.7rc1/scheduler/lis
|
||||
diff -up cups-1.7rc1/scheduler/main.c.systemd-socket cups-1.7rc1/scheduler/main.c
|
||||
--- cups-1.7rc1/scheduler/main.c.systemd-socket 2013-07-12 11:16:53.212546887 +0200
|
||||
+++ cups-1.7rc1/scheduler/main.c 2013-07-12 11:16:53.261546208 +0200
|
||||
@@ -26,6 +26,8 @@
|
||||
* launchd_checkin() - Check-in with launchd and collect the listening
|
||||
* fds.
|
||||
* launchd_checkout() - Update the launchd KeepAlive file as needed.
|
||||
+ * systemd_checkin() - Check-in with systemd and collect the
|
||||
+ * listening fds.
|
||||
* parent_handler() - Catch USR1/CHLD signals...
|
||||
* process_children() - Process all dead children...
|
||||
* select_timeout() - Calculate the select timeout value.
|
||||
@@ -62,6 +64,10 @@
|
||||
# endif /* !LAUNCH_JOBKEY_SERVICEIPC */
|
||||
#endif /* HAVE_LAUNCH_H */
|
||||
|
79
cups.spec
79
cups.spec
@ -10,10 +10,9 @@
|
||||
Summary: CUPS printing system
|
||||
Name: cups
|
||||
Epoch: 1
|
||||
Version: 1.7.1
|
||||
Release: 11%{?dist}
|
||||
Version: 1.7.2
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Daemons
|
||||
Url: http://www.cups.org/
|
||||
Source: http://www.cups.org/software/%{version}/cups-%{version}-source.tar.bz2
|
||||
# Pixmap for desktop file
|
||||
@ -31,7 +30,6 @@ Source8: macros.cups
|
||||
Patch1: cups-no-gzip-man.patch
|
||||
Patch2: cups-system-auth.patch
|
||||
Patch3: cups-multilib.patch
|
||||
Patch4: cups-str4386.patch
|
||||
Patch5: cups-banners.patch
|
||||
Patch6: cups-serverbin-compat.patch
|
||||
Patch7: cups-no-export-ssllibs.patch
|
||||
@ -55,23 +53,18 @@ Patch24: cups-ricoh-deviceid-oid.patch
|
||||
Patch25: cups-systemd-socket.patch
|
||||
Patch26: cups-lpd-manpage.patch
|
||||
Patch27: cups-avahi-address.patch
|
||||
Patch29: cups-enum-all.patch
|
||||
Patch31: cups-dymo-deviceid.patch
|
||||
Patch32: cups-freebind.patch
|
||||
Patch33: cups-no-gcry.patch
|
||||
Patch34: cups-libusb-quirks.patch
|
||||
Patch35: cups-use-ipp1.1.patch
|
||||
Patch36: cups-avahi-no-threaded.patch
|
||||
Patch37: cups-ipp-multifile.patch
|
||||
Patch38: cups-full-relro.patch
|
||||
Patch39: cups-web-devices-timeout.patch
|
||||
Patch40: cups-final-content-type.patch
|
||||
Patch41: cups-journal.patch
|
||||
Patch42: cups-synconclose.patch
|
||||
Patch43: cups-avahi-browse.patch
|
||||
Patch44: cups-str4380.patch
|
||||
Patch45: cups-str4366.patch
|
||||
Patch46: cups-str4332.patch
|
||||
Patch28: cups-enum-all.patch
|
||||
Patch29: cups-dymo-deviceid.patch
|
||||
Patch30: cups-freebind.patch
|
||||
Patch31: cups-no-gcry.patch
|
||||
Patch32: cups-libusb-quirks.patch
|
||||
Patch33: cups-use-ipp1.1.patch
|
||||
Patch34: cups-avahi-no-threaded.patch
|
||||
Patch35: cups-ipp-multifile.patch
|
||||
Patch36: cups-web-devices-timeout.patch
|
||||
Patch37: cups-final-content-type.patch
|
||||
Patch38: cups-journal.patch
|
||||
Patch39: cups-synconclose.patch
|
||||
|
||||
Patch100: cups-lspp.patch
|
||||
|
||||
@ -199,9 +192,6 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
|
||||
%patch2 -p1 -b .system-auth
|
||||
# Prevent multilib conflict in cups-config script.
|
||||
%patch3 -p1 -b .multilib
|
||||
# libcups: avoid race condition when sending IPP requests (STR #4386,
|
||||
# bug #1072952).
|
||||
%patch4 -p1 -b .str4386
|
||||
# Ignore rpm save/new files in the banners directory.
|
||||
%patch5 -p1 -b .banners
|
||||
# Use compatibility fallback path for ServerBin.
|
||||
@ -250,40 +240,30 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
|
||||
# Use IP address when resolving DNSSD URIs (bug #948288).
|
||||
%patch27 -p1 -b .avahi-address
|
||||
# Return from cupsEnumDests() once all records have been returned.
|
||||
%patch29 -p1 -b .enum-all
|
||||
%patch28 -p1 -b .enum-all
|
||||
# Added IEEE 1284 Device ID for a Dymo device (bug #747866).
|
||||
%patch31 -p1 -b .dymo-deviceid
|
||||
%patch29 -p1 -b .dymo-deviceid
|
||||
# Use IP_FREEBIND socket option when binding listening sockets (bug #970809).
|
||||
%patch32 -p1 -b .freebind
|
||||
%patch30 -p1 -b .freebind
|
||||
# Don't link against libgcrypt needlessly.
|
||||
%patch33 -p1 -b .no-gcry
|
||||
%patch31 -p1 -b .no-gcry
|
||||
# Added libusb quirk for Canon PIXMA MP540 (bug #967873).
|
||||
%patch34 -p1 -b .libusb-quirks
|
||||
%patch32 -p1 -b .libusb-quirks
|
||||
# Default to IPP/1.1 for now (bug #977813).
|
||||
%patch35 -p1 -b .use-ipp1.1
|
||||
%patch33 -p1 -b .use-ipp1.1
|
||||
# Don't use D-Bus from two threads (bug #979748).
|
||||
%patch36 -p1 -b .avahi-no-threaded
|
||||
%patch34 -p1 -b .avahi-no-threaded
|
||||
# Fixes for jobs with multiple files and multiple formats.
|
||||
%patch37 -p1 -b .ipp-multifile
|
||||
# Full relro (bug #996740).
|
||||
%patch38 -p1 -b .full-relro
|
||||
%patch35 -p1 -b .ipp-multifile
|
||||
# Increase web interface get-devices timeout to 10s (bug #996664).
|
||||
%patch39 -p1 -b .web-devices-timeout
|
||||
%patch36 -p1 -b .web-devices-timeout
|
||||
# Reverted upstream change to FINAL_CONTENT_TYPE in order to fix
|
||||
# printing to remote CUPS servers (bug #1010580).
|
||||
%patch40 -p1 -b .final-content-type
|
||||
%patch37 -p1 -b .final-content-type
|
||||
# Allow "journal" log type for log output to system journal.
|
||||
%patch41 -p1 -b .journal
|
||||
%patch38 -p1 -b .journal
|
||||
# Set the default for SyncOnClose to Yes.
|
||||
%patch42 -p1 -b .synconclose
|
||||
# Prevent dnssd backend exiting too early (bug #1026940, STR #4365).
|
||||
%patch43 -p1 -b .avahi-browse
|
||||
# Fix for cupsEnumDest() 'removed' callbacks (bug #1054312, STR #4380).
|
||||
%patch44 -p1 -b .str4380
|
||||
# Prevent feedback loop when fetching error_log over HTTP (STR #4366).
|
||||
%patch45 -p1 -b .str4366
|
||||
# Track local default in cupsEnumDests() (STR #4332).
|
||||
%patch46 -p1 -b .str4332
|
||||
%patch39 -p1 -b .synconclose
|
||||
|
||||
%if %lspp
|
||||
# LSPP support.
|
||||
@ -557,6 +537,7 @@ rm -f %{cups_serverbin}/backend/smb
|
||||
%dir %{_datadir}/%{name}/www
|
||||
%dir %{_datadir}/%{name}/www/ca
|
||||
%dir %{_datadir}/%{name}/www/cs
|
||||
%dir %{_datadir}/%{name}/www/de
|
||||
%dir %{_datadir}/%{name}/www/es
|
||||
%dir %{_datadir}/%{name}/www/fr
|
||||
%dir %{_datadir}/%{name}/www/it
|
||||
@ -569,6 +550,7 @@ rm -f %{cups_serverbin}/backend/smb
|
||||
%doc %{_datadir}/%{name}/www/robots.txt
|
||||
%doc %{_datadir}/%{name}/www/ca/index.html
|
||||
%doc %{_datadir}/%{name}/www/cs/index.html
|
||||
%doc %{_datadir}/%{name}/www/de/index.html
|
||||
%doc %{_datadir}/%{name}/www/es/index.html
|
||||
%doc %{_datadir}/%{name}/www/fr/index.html
|
||||
%doc %{_datadir}/%{name}/www/it/index.html
|
||||
@ -609,6 +591,7 @@ rm -f %{cups_serverbin}/backend/smb
|
||||
%dir %{_datadir}/cups/templates
|
||||
%dir %{_datadir}/cups/templates/ca
|
||||
%dir %{_datadir}/cups/templates/cs
|
||||
%dir %{_datadir}/cups/templates/de
|
||||
%dir %{_datadir}/cups/templates/es
|
||||
%dir %{_datadir}/cups/templates/fr
|
||||
%dir %{_datadir}/cups/templates/it
|
||||
@ -617,6 +600,7 @@ rm -f %{cups_serverbin}/backend/smb
|
||||
%{_datadir}/cups/templates/*.tmpl
|
||||
%{_datadir}/cups/templates/ca/*.tmpl
|
||||
%{_datadir}/cups/templates/cs/*.tmpl
|
||||
%{_datadir}/cups/templates/de/*.tmpl
|
||||
%{_datadir}/cups/templates/es/*.tmpl
|
||||
%{_datadir}/cups/templates/fr/*.tmpl
|
||||
%{_datadir}/cups/templates/it/*.tmpl
|
||||
@ -683,6 +667,9 @@ rm -f %{cups_serverbin}/backend/smb
|
||||
%{_mandir}/man5/ipptoolfile.5.gz
|
||||
|
||||
%changelog
|
||||
* Mon Apr 14 2014 Jiri Popelka <jpopelka@redhat.com> - 1:1.7.2-1
|
||||
- 1.7.2
|
||||
|
||||
* Fri Apr 4 2014 Tim Waugh <twaugh@redhat.com> - 1:1.7.1-11
|
||||
- Log to the system journal by default (bug #1078781).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user