- Updated to svn8404.

This commit is contained in:
Tim Waugh 2009-03-05 13:31:30 +00:00
parent 9b9807ecb6
commit a1088d096f
12 changed files with 556 additions and 1287 deletions

View File

@ -36,3 +36,4 @@ cups-1.3.8-source.tar.bz2
cups-1.3.9-source.tar.bz2
cups-1.4b1-source.tar.bz2
cups-1.4b2-source.tar.bz2
cups-1.4b2-svn8404-source.tar.bz2

View File

@ -1,9 +1,9 @@
diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
--- cups-1.4b2/backend/dnssd.c.avahi 2008-10-07 20:10:35.000000000 +0100
+++ cups-1.4b2/backend/dnssd.c 2009-02-12 13:14:34.000000000 +0000
@@ -20,7 +20,8 @@
* browse_local_callback() - Browse local devices.
* compare_devices() - Compare two devices.
diff -up cups-1.4b2-svn8404/backend/dnssd.c.avahi cups-1.4b2-svn8404/backend/dnssd.c
--- cups-1.4b2-svn8404/backend/dnssd.c.avahi 2009-03-05 10:54:00.000000000 +0000
+++ cups-1.4b2-svn8404/backend/dnssd.c 2009-03-05 11:15:28.000000000 +0000
@@ -22,7 +22,8 @@
* exec_backend() - Execute the backend that corresponds to the
* resolved service name.
* get_device() - Create or update a device.
- * query_callback() - Process query data.
+ * query_callback() - Process query data from DNS-SD
@ -11,7 +11,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
* unquote() - Unquote a name string.
*/
@@ -30,7 +31,16 @@
@@ -32,7 +33,16 @@
#include "backend-private.h"
#include <cups/array.h>
@ -29,7 +29,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
/*
@@ -49,7 +59,9 @@ typedef enum
@@ -51,7 +61,9 @@ typedef enum
typedef struct
{
@ -39,7 +39,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
char *name, /* Service name */
*domain, /* Domain name */
*fullName, /* Full name */
@@ -65,6 +77,26 @@ typedef struct
@@ -67,6 +79,26 @@ typedef struct
* Local functions...
*/
@ -66,7 +66,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
static void browse_callback(DNSServiceRef sdRef,
DNSServiceFlags flags,
uint32_t interfaceIndex,
@@ -80,12 +112,6 @@ static void browse_local_callback(DNSSe
@@ -82,12 +114,6 @@ static void browse_local_callback(DNSSe
const char *regtype,
const char *replyDomain,
void *context);
@ -79,7 +79,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
static void query_callback(DNSServiceRef sdRef,
DNSServiceFlags flags,
uint32_t interfaceIndex,
@@ -94,7 +120,31 @@ static void query_callback(DNSServiceRe
@@ -96,7 +122,31 @@ static void query_callback(DNSServiceRe
uint16_t rrclass, uint16_t rdlen,
const void *rdata, uint32_t ttl,
void *context);
@ -111,7 +111,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
/*
@@ -106,6 +156,16 @@ main(int argc, /* I - Number of comm
@@ -108,6 +158,16 @@ main(int argc, /* I - Number of comm
char *argv[]) /* I - Command-line arguments */
{
const char *name; /* Backend name */
@ -128,7 +128,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
DNSServiceRef main_ref, /* Main service reference */
fax_ipp_ref, /* IPP fax service reference */
ipp_ref, /* IPP service reference */
@@ -117,11 +177,7 @@ main(int argc, /* I - Number of comm
@@ -119,12 +179,7 @@ main(int argc, /* I - Number of comm
pdl_datastream_ref, /* AppSocket service reference */
printer_ref, /* LPD service reference */
riousbprint_ref; /* Remote IO service reference */
@ -137,11 +137,12 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
- struct timeval timeout; /* Timeout for select() */
- cups_array_t *devices; /* Device array */
- cups_device_t *device; /* Current device */
- char uriName[1024]; /* Unquoted fullName for URI */
+#endif /* !HAVE_AVAHI */
/*
@@ -161,6 +217,48 @@ main(int argc, /* I - Number of comm
@@ -164,6 +219,48 @@ main(int argc, /* I - Number of comm
* Browse for different kinds of printers...
*/
@ -190,7 +191,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
if (DNSServiceCreateConnection(&main_ref) != kDNSServiceErr_NoError)
{
perror("ERROR: Unable to create service connection");
@@ -212,6 +310,7 @@ main(int argc, /* I - Number of comm
@@ -215,6 +312,7 @@ main(int argc, /* I - Number of comm
riousbprint_ref = main_ref;
DNSServiceBrowse(&riousbprint_ref, kDNSServiceFlagsShareConnection, 0,
"_riousbprint._tcp", NULL, browse_callback, devices);
@ -198,7 +199,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
/*
* Loop until we are killed...
@@ -219,6 +318,25 @@ main(int argc, /* I - Number of comm
@@ -222,6 +320,25 @@ main(int argc, /* I - Number of comm
for (;;)
{
@ -224,7 +225,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
FD_ZERO(&input);
FD_SET(fd, &input);
@@ -238,11 +356,19 @@ main(int argc, /* I - Number of comm
@@ -241,11 +358,19 @@ main(int argc, /* I - Number of comm
}
else
{
@ -244,7 +245,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
cups_device_t *best; /* Best matching device */
char device_uri[1024]; /* Device URI */
int count; /* Number of queries */
@@ -255,6 +381,7 @@ main(int argc, /* I - Number of comm
@@ -258,6 +383,7 @@ main(int argc, /* I - Number of comm
best = NULL, count = 0;
device;
device = (cups_device_t *)cupsArrayNext(devices))
@ -252,7 +253,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
if (!device->ref && !device->sent)
{
/*
@@ -283,14 +410,19 @@ main(int argc, /* I - Number of comm
@@ -286,14 +412,19 @@ main(int argc, /* I - Number of comm
count ++;
}
}
@ -273,7 +274,31 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
if (!best)
best = device;
@@ -332,6 +464,204 @@ main(int argc, /* I - Number of comm
@@ -301,11 +432,9 @@ main(int argc, /* I - Number of comm
strcasecmp(best->domain, device->domain))
{
unquote(uriName, best->fullName, sizeof(uriName));
-
httpAssembleURI(HTTP_URI_CODING_ALL, device_uri, sizeof(device_uri),
schemes[best->type], NULL, uriName, 0,
best->cups_shared ? "/cups" : "/");
-
cupsBackendReport("network", device_uri, best->make_and_model,
best->name, NULL, NULL);
best->sent = 1;
@@ -325,11 +454,9 @@ main(int argc, /* I - Number of comm
if (best)
{
unquote(uriName, best->fullName, sizeof(uriName));
-
httpAssembleURI(HTTP_URI_CODING_ALL, device_uri, sizeof(device_uri),
schemes[best->type], NULL, uriName, 0,
best->cups_shared ? "/cups" : "/");
-
cupsBackendReport("network", device_uri, best->make_and_model,
best->name, NULL, NULL);
best->sent = 1;
@@ -339,6 +466,204 @@ main(int argc, /* I - Number of comm
}
@ -478,7 +503,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
/*
* 'browse_callback()' - Browse devices.
*/
@@ -420,6 +750,7 @@ browse_local_callback(
@@ -427,6 +752,7 @@ browse_local_callback(
device->fullName);
device->sent = 1;
}
@ -486,7 +511,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
/*
@@ -518,18 +849,7 @@ get_device(cups_array_t *devices, /* I -
@@ -525,18 +851,7 @@ get_device(cups_array_t *devices, /* I -
key.name = (char *)serviceName;
key.domain = (char *)replyDomain;
@ -506,7 +531,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
for (device = cupsArrayFind(devices, &key);
device;
@@ -559,13 +879,20 @@ get_device(cups_array_t *devices, /* I -
@@ -566,13 +881,20 @@ get_device(cups_array_t *devices, /* I -
* Set the "full name" of this service, which is used for queries...
*/
@ -527,7 +552,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
/*
* 'query_callback()' - Process query data.
*/
@@ -584,12 +911,21 @@ query_callback(
@@ -591,12 +913,21 @@ query_callback(
uint32_t ttl, /* I - Time-to-live */
void *context) /* I - Devices array */
{
@ -553,7 +578,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
fprintf(stderr, "DEBUG2: query_callback(sdRef=%p, flags=%x, "
"interfaceIndex=%d, errorCode=%d, fullName=\"%s\", "
@@ -610,7 +946,6 @@ query_callback(
@@ -617,7 +948,6 @@ query_callback(
* Lookup the service in the devices array.
*/
@ -561,7 +586,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
key.name = name;
unquote(name, fullName, sizeof(name));
@@ -635,88 +970,111 @@ query_callback(
@@ -642,88 +972,111 @@ query_callback(
else
key.type = CUPS_DEVICE_RIOUSBPRINT;
@ -712,7 +737,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
if ((ptr = strchr(model, ',')) != NULL)
*ptr = '\0';
@@ -742,7 +1100,7 @@ query_callback(
@@ -749,7 +1102,7 @@ query_callback(
if ((device->type == CUPS_DEVICE_IPP ||
device->type == CUPS_DEVICE_PRINTER) &&
@ -721,7 +746,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
{
/*
* This is a CUPS printer!
@@ -758,8 +1116,7 @@ query_callback(
@@ -765,8 +1118,7 @@ query_callback(
}
}
@ -731,7 +756,7 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
}
@@ -797,6 +1154,35 @@ unquote(char *dst, /* I - Destina
@@ -804,6 +1156,35 @@ unquote(char *dst, /* I - Destina
}
@ -765,11 +790,11 @@ diff -up cups-1.4b2/backend/dnssd.c.avahi cups-1.4b2/backend/dnssd.c
+
+
/*
* End of "$Id: dnssd.c 8023 2008-10-07 19:10:35Z mike $".
* End of "$Id$".
*/
diff -up cups-1.4b2/config.h.in.avahi cups-1.4b2/config.h.in
--- cups-1.4b2/config.h.in.avahi 2008-09-08 23:03:01.000000000 +0100
+++ cups-1.4b2/config.h.in 2009-02-12 13:13:51.000000000 +0000
diff -up cups-1.4b2-svn8404/config.h.in.avahi cups-1.4b2-svn8404/config.h.in
--- cups-1.4b2-svn8404/config.h.in.avahi 2009-02-19 17:56:47.000000000 +0000
+++ cups-1.4b2-svn8404/config.h.in 2009-03-05 11:15:28.000000000 +0000
@@ -344,6 +344,13 @@
@ -784,9 +809,9 @@ diff -up cups-1.4b2/config.h.in.avahi cups-1.4b2/config.h.in
* Do we have <sys/ioctl.h>?
*/
diff -up cups-1.4b2/config-scripts/cups-dnssd.m4.avahi cups-1.4b2/config-scripts/cups-dnssd.m4
--- cups-1.4b2/config-scripts/cups-dnssd.m4.avahi 2008-08-29 23:19:39.000000000 +0100
+++ cups-1.4b2/config-scripts/cups-dnssd.m4 2009-02-12 13:13:51.000000000 +0000
diff -up cups-1.4b2-svn8404/config-scripts/cups-dnssd.m4.avahi cups-1.4b2-svn8404/config-scripts/cups-dnssd.m4
--- cups-1.4b2-svn8404/config-scripts/cups-dnssd.m4.avahi 2009-02-19 17:56:46.000000000 +0000
+++ cups-1.4b2-svn8404/config-scripts/cups-dnssd.m4 2009-03-05 11:15:28.000000000 +0000
@@ -27,6 +27,21 @@ AC_ARG_WITH(dnssd-includes, [ --with-dn
DNSSDLIBS=""
DNSSD_BACKEND=""
@ -809,9 +834,9 @@ diff -up cups-1.4b2/config-scripts/cups-dnssd.m4.avahi cups-1.4b2/config-scripts
if test x$enable_dnssd != xno; then
AC_CHECK_HEADER(dns_sd.h, [
case "$uname" in
diff -up cups-1.4b2/cups/http-support.c.avahi cups-1.4b2/cups/http-support.c
--- cups-1.4b2/cups/http-support.c.avahi 2008-12-10 05:03:11.000000000 +0000
+++ cups-1.4b2/cups/http-support.c 2009-02-12 13:18:24.000000000 +0000
diff -up cups-1.4b2-svn8404/cups/http-support.c.avahi cups-1.4b2-svn8404/cups/http-support.c
--- cups-1.4b2-svn8404/cups/http-support.c.avahi 2009-02-19 17:56:46.000000000 +0000
+++ cups-1.4b2-svn8404/cups/http-support.c 2009-03-05 11:15:28.000000000 +0000
@@ -53,6 +53,11 @@
#ifdef HAVE_DNSSD
# include <dns_sd.h>
@ -852,7 +877,7 @@ diff -up cups-1.4b2/cups/http-support.c.avahi cups-1.4b2/cups/http-support.c
/*
* 'httpAssembleURI()' - Assemble a uniform resource identifier from its
@@ -1337,11 +1363,22 @@ _httpResolveURI(
@@ -1343,11 +1369,22 @@ _httpResolveURI(
if (strstr(hostname, "._tcp"))
{
@ -876,7 +901,7 @@ diff -up cups-1.4b2/cups/http-support.c.avahi cups-1.4b2/cups/http-support.c
/*
* Separate the hostname into service name, registration type, and domain...
@@ -1379,8 +1416,13 @@ _httpResolveURI(
@@ -1385,8 +1422,13 @@ _httpResolveURI(
if (domain)
*domain++ = '\0';
@ -890,7 +915,7 @@ diff -up cups-1.4b2/cups/http-support.c.avahi cups-1.4b2/cups/http-support.c
resolved_uri[0] = '\0';
@@ -1394,6 +1436,7 @@ _httpResolveURI(
@@ -1400,6 +1442,7 @@ _httpResolveURI(
_cupsLangPuts(stderr, _("INFO: Looking for printer...\n"));
}
@ -898,10 +923,10 @@ diff -up cups-1.4b2/cups/http-support.c.avahi cups-1.4b2/cups/http-support.c
if (DNSServiceResolve(&ref, 0, 0, hostname, regtype, domain,
resolve_callback,
&uribuf) == kDNSServiceErr_NoError)
@@ -1409,16 +1452,49 @@ _httpResolveURI(
@@ -1414,17 +1457,49 @@ _httpResolveURI(
}
else
uri = NULL;
+#else
+ if ((simple_poll = avahi_simple_poll_new ()) != NULL)
+ {
@ -934,27 +959,23 @@ diff -up cups-1.4b2/cups/http-support.c.avahi cups-1.4b2/cups/http-support.c
+ avahi_simple_poll_free (simple_poll);
+ }
+#endif
+
if (log)
if (logit)
fputs("STATE: -connecting-to-device\n", stderr);
-#else
- /*
- * No DNS-SD support...
- */
-
+#else /* HAVE_DNSSD || HAVE_AVAHI */
+ /*
+ * No DNS-SD support...
+ */
+
/*
* No DNS-SD support...
*/
uri = NULL;
-#endif /* HAVE_DNSSD */
+#endif /* HAVE_DNSSD || HAVE_AVAHI */
if (log && !uri)
if (logit && !uri)
_cupsLangPuts(stderr, _("Unable to find printer!\n"));
@@ -1623,6 +1699,105 @@ resolve_callback(
@@ -1629,6 +1704,105 @@ resolve_callback(
}
#endif /* HAVE_DNSSD */
@ -1059,4 +1080,4 @@ diff -up cups-1.4b2/cups/http-support.c.avahi cups-1.4b2/cups/http-support.c
+
/*
* End of "$Id: http-support.c 8179 2008-12-10 05:03:11Z mike $".
* End of "$Id$".

View File

@ -1,13 +0,0 @@
diff -up cups-1.4b2/CHANGES.txt.local-protocols cups-1.4b2/CHANGES.txt
diff -up cups-1.4b2/conf/cupsd.conf.in.local-protocols cups-1.4b2/conf/cupsd.conf.in
--- cups-1.4b2/conf/cupsd.conf.in.local-protocols 2009-01-09 16:47:15.000000000 +0000
+++ cups-1.4b2/conf/cupsd.conf.in 2009-01-27 14:46:59.000000000 +0000
@@ -23,7 +23,7 @@ Listen localhost:@DEFAULT_IPP_PORT@
Browsing On
BrowseOrder allow,deny
BrowseAllow all
-BrowseLocalProtocols @CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS@
+BrowseLocalProtocols @CUPS_BROWSE_LOCAL_PROTOCOLS@
# Default authentication type, when authentication is required...
DefaultAuthType Basic

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +1,12 @@
--- cups-1.2.1/config-scripts/cups-ssl.m4.no-export-ssllibs 2006-06-15 13:12:59.000000000 +0100
+++ cups-1.2.1/config-scripts/cups-ssl.m4 2006-06-15 13:13:09.000000000 +0100
@@ -109,7 +109,7 @@
diff -up cups-1.4b2-svn8404/config-scripts/cups-ssl.m4.no-export-ssllibs cups-1.4b2-svn8404/config-scripts/cups-ssl.m4
--- cups-1.4b2-svn8404/config-scripts/cups-ssl.m4.no-export-ssllibs 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/config-scripts/cups-ssl.m4 2009-03-05 11:12:59.000000000 +0000
@@ -110,7 +110,7 @@ fi
AC_SUBST(SSLFLAGS)
AC_SUBST(SSLLIBS)
AC_SUBST(ENCRYPTION_REQUIRED)
-EXPORT_SSLLIBS="$SSLLIBS"
+EXPORT_SSLLIBS=""
AC_SUBST(EXPORT_SSLLIBS)
--- cups-1.2.1/configure.no-export-ssllibs 2006-06-15 13:13:42.000000000 +0100
+++ cups-1.2.1/configure 2006-06-15 13:13:48.000000000 +0100
@@ -12343,7 +12343,7 @@
-EXPORT_SSLLIBS="$SSLLIBS"
+EXPORT_SSLLIBS=""

View File

@ -1,9 +1,10 @@
--- cups-1.2svn-r5102/config-scripts/cups-manpages.m4.no-gzip-man 2006-02-13 02:46:10.000000000 +0000
+++ cups-1.2svn-r5102/config-scripts/cups-manpages.m4 2006-02-17 09:55:45.000000000 +0000
@@ -80,10 +80,10 @@
diff -up cups-1.4b2-svn8404/config-scripts/cups-manpages.m4.no-gzip-man cups-1.4b2-svn8404/config-scripts/cups-manpages.m4
--- cups-1.4b2-svn8404/config-scripts/cups-manpages.m4.no-gzip-man 2009-01-16 08:58:42.000000000 +0000
+++ cups-1.4b2-svn8404/config-scripts/cups-manpages.m4 2009-03-05 11:11:12.000000000 +0000
@@ -69,10 +69,10 @@ case "$uname" in
;;
Linux* | GNU*)
# Linux and GNU Hurd
Linux* | GNU* | Darwin*)
# Linux, GNU Hurd, and Mac OS X
- MAN1EXT=1.gz
- MAN5EXT=5.gz
- MAN7EXT=7.gz

View File

@ -1,9 +1,9 @@
diff -up cups-1.4b1/scheduler/conf.c.serverbin-compat cups-1.4b1/scheduler/conf.c
--- cups-1.4b1/scheduler/conf.c.serverbin-compat 2008-10-08 17:34:03.000000000 +0100
+++ cups-1.4b1/scheduler/conf.c 2008-11-11 15:39:11.000000000 +0000
@@ -432,6 +432,9 @@ cupsdReadConfiguration(void)
cupsdSetString(&ServerName, httpGetHostname(NULL, temp, sizeof(temp)));
cupsdSetStringf(&ServerAdmin, "root@%s", temp);
diff -up cups-1.4b2-svn8404/scheduler/conf.c.serverbin-compat cups-1.4b2-svn8404/scheduler/conf.c
--- cups-1.4b2-svn8404/scheduler/conf.c.serverbin-compat 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/conf.c 2009-03-05 11:08:57.000000000 +0000
@@ -436,6 +436,9 @@ cupsdReadConfiguration(void)
cupsdClearString(&ServerName);
cupsdClearString(&ServerAdmin);
cupsdSetString(&ServerBin, CUPS_SERVERBIN);
+#ifdef __x86_64__
+ cupsdSetString(&ServerBin_compat, "/usr/lib64/cups");
@ -11,7 +11,7 @@ diff -up cups-1.4b1/scheduler/conf.c.serverbin-compat cups-1.4b1/scheduler/conf.
cupsdSetString(&RequestRoot, CUPS_REQUESTS);
cupsdSetString(&CacheDir, CUPS_CACHEDIR);
cupsdSetString(&DataDir, CUPS_DATADIR);
@@ -1187,7 +1190,12 @@ cupsdReadConfiguration(void)
@@ -1217,7 +1220,12 @@ cupsdReadConfiguration(void)
* Read the MIME type and conversion database...
*/
@ -24,10 +24,10 @@ diff -up cups-1.4b1/scheduler/conf.c.serverbin-compat cups-1.4b1/scheduler/conf.
snprintf(mimedir, sizeof(mimedir), "%s/mime", DataDir);
MimeDatabase = mimeLoadTypes(NULL, mimedir);
diff -up cups-1.4b1/scheduler/conf.h.serverbin-compat cups-1.4b1/scheduler/conf.h
--- cups-1.4b1/scheduler/conf.h.serverbin-compat 2008-09-19 21:03:36.000000000 +0100
+++ cups-1.4b1/scheduler/conf.h 2008-11-11 15:35:13.000000000 +0000
@@ -89,6 +89,10 @@ VAR char *ConfigurationFile VALUE(NULL)
diff -up cups-1.4b2-svn8404/scheduler/conf.h.serverbin-compat cups-1.4b2-svn8404/scheduler/conf.h
--- cups-1.4b2-svn8404/scheduler/conf.h.serverbin-compat 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/conf.h 2009-03-05 11:08:57.000000000 +0000
@@ -95,6 +95,10 @@ VAR char *ConfigurationFile VALUE(NULL)
/* Root directory for scheduler */
*ServerBin VALUE(NULL),
/* Root directory for binaries */
@ -38,9 +38,9 @@ diff -up cups-1.4b1/scheduler/conf.h.serverbin-compat cups-1.4b1/scheduler/conf.
*StateDir VALUE(NULL),
/* Root directory for state data */
*RequestRoot VALUE(NULL),
diff -up cups-1.4b1/scheduler/env.c.serverbin-compat cups-1.4b1/scheduler/env.c
--- cups-1.4b1/scheduler/env.c.serverbin-compat 2008-06-18 23:31:26.000000000 +0100
+++ cups-1.4b1/scheduler/env.c 2008-11-11 15:35:13.000000000 +0000
diff -up cups-1.4b2-svn8404/scheduler/env.c.serverbin-compat cups-1.4b2-svn8404/scheduler/env.c
--- cups-1.4b2-svn8404/scheduler/env.c.serverbin-compat 2009-02-17 17:45:27.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/env.c 2009-03-05 11:08:57.000000000 +0000
@@ -86,8 +86,13 @@ cupsdInitEnv(void)
cupsdSetEnv("LD_LIBRARY_PATH", NULL);
cupsdSetEnv("LD_PRELOAD", NULL);
@ -55,10 +55,10 @@ diff -up cups-1.4b1/scheduler/env.c.serverbin-compat cups-1.4b1/scheduler/env.c
cupsdSetEnv("SERVER_ADMIN", ServerAdmin);
cupsdSetEnv("SHLIB_PATH", NULL);
cupsdSetEnv("SOFTWARE", CUPS_MINIMAL);
diff -up cups-1.4b1/scheduler/ipp.c.serverbin-compat cups-1.4b1/scheduler/ipp.c
--- cups-1.4b1/scheduler/ipp.c.serverbin-compat 2008-10-27 21:54:12.000000000 +0000
+++ cups-1.4b1/scheduler/ipp.c 2008-11-11 15:41:25.000000000 +0000
@@ -2515,9 +2515,18 @@ add_printer(cupsd_client_t *con, /* I -
diff -up cups-1.4b2-svn8404/scheduler/ipp.c.serverbin-compat cups-1.4b2-svn8404/scheduler/ipp.c
--- cups-1.4b2-svn8404/scheduler/ipp.c.serverbin-compat 2009-03-05 10:54:00.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/ipp.c 2009-03-05 11:08:57.000000000 +0000
@@ -2541,9 +2541,18 @@ add_printer(cupsd_client_t *con, /* I -
* Could not find device in list!
*/
@ -77,10 +77,10 @@ diff -up cups-1.4b1/scheduler/ipp.c.serverbin-compat cups-1.4b1/scheduler/ipp.c
}
}
diff -up cups-1.4b1/scheduler/job.c.serverbin-compat cups-1.4b1/scheduler/job.c
--- cups-1.4b1/scheduler/job.c.serverbin-compat 2008-10-21 01:02:45.000000000 +0100
+++ cups-1.4b1/scheduler/job.c 2008-11-11 15:35:13.000000000 +0000
@@ -3267,8 +3267,32 @@ start_job(cupsd_job_t *job, /* I -
diff -up cups-1.4b2-svn8404/scheduler/job.c.serverbin-compat cups-1.4b2-svn8404/scheduler/job.c
--- cups-1.4b2-svn8404/scheduler/job.c.serverbin-compat 2009-03-05 10:54:00.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/job.c 2009-03-05 11:08:57.000000000 +0000
@@ -966,8 +966,32 @@ cupsdContinueJob(cupsd_job_t *job) /* I
i ++, filter = (mime_filter_t *)cupsArrayNext(filters))
{
if (filter->filter[0] != '/')
@ -115,10 +115,10 @@ diff -up cups-1.4b1/scheduler/job.c.serverbin-compat cups-1.4b1/scheduler/job.c
else
strlcpy(command, filter->filter, sizeof(command));
@@ -3414,6 +3438,28 @@ start_job(cupsd_job_t *job, /* I -
{
sscanf(printer->device_uri, "%254[^:]", method);
snprintf(command, sizeof(command), "%s/backend/%s", ServerBin, method);
@@ -1113,6 +1137,28 @@ cupsdContinueJob(cupsd_job_t *job) /* I
cupsdClosePipe(job->print_pipes);
cupsdClosePipe(job->back_pipes);
cupsdClosePipe(job->side_pipes);
+#ifdef __x86_64__
+ if (access(command, F_OK))
+ {
@ -142,12 +142,12 @@ diff -up cups-1.4b1/scheduler/job.c.serverbin-compat cups-1.4b1/scheduler/job.c
+ }
+#endif /* __x86_64__ */
/*
* See if the backend needs to run as root...
diff -up cups-1.4b1/scheduler/printers.c.serverbin-compat cups-1.4b1/scheduler/printers.c
--- cups-1.4b1/scheduler/printers.c.serverbin-compat 2008-10-10 06:28:15.000000000 +0100
+++ cups-1.4b1/scheduler/printers.c 2008-11-11 15:35:13.000000000 +0000
@@ -985,9 +985,19 @@ cupsdLoadAllPrinters(void)
close(job->status_pipes[1]);
job->status_pipes[1] = -1;
diff -up cups-1.4b2-svn8404/scheduler/printers.c.serverbin-compat cups-1.4b2-svn8404/scheduler/printers.c
--- cups-1.4b2-svn8404/scheduler/printers.c.serverbin-compat 2009-03-05 10:54:00.000000000 +0000
+++ cups-1.4b2-svn8404/scheduler/printers.c 2009-03-05 11:09:46.000000000 +0000
@@ -1021,9 +1021,19 @@ cupsdLoadAllPrinters(void)
* Backend does not exist, stop printer...
*/
@ -167,9 +167,9 @@ diff -up cups-1.4b1/scheduler/printers.c.serverbin-compat cups-1.4b1/scheduler/p
}
}
@@ -3448,6 +3458,12 @@ add_printer_filter(
@@ -3580,6 +3590,12 @@ add_printer_filter(
if (access(filename, X_OK))
if (stat(filename, &fileinfo))
{
+#ifdef __x86_64__
+ snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin_compat,
@ -179,14 +179,14 @@ diff -up cups-1.4b1/scheduler/printers.c.serverbin-compat cups-1.4b1/scheduler/p
+#endif /* __x86_64__ */
snprintf(p->state_message, sizeof(p->state_message),
"Filter \"%s\" for printer \"%s\" not available: %s",
program, p->name, strerror(errno));
@@ -3455,6 +3471,9 @@ add_printer_filter(
cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, 0);
filename, p->name, strerror(errno));
@@ -3587,6 +3603,9 @@ add_printer_filter(
cupsdLogMessage(CUPSD_LOG_ERROR, "%s", p->state_message);
return;
+#ifdef __x86_64__
+ }
+#endif /* __x86_64__ */
}
}
/*

View File

@ -1,14 +0,0 @@
diff -up cups-1.4b2/CHANGES-1.3.txt.str3059 cups-1.4b2/CHANGES-1.3.txt
diff -up cups-1.4b2/scheduler/type.c.str3059 cups-1.4b2/scheduler/type.c
--- cups-1.4b2/scheduler/type.c.str3059 2008-07-11 23:46:21.000000000 +0100
+++ cups-1.4b2/scheduler/type.c 2009-01-28 17:40:23.000000000 +0000
@@ -188,8 +188,7 @@ mimeAddTypeRule(mime_type_t *mt, /* I -
else if (*rule == '+' && current != NULL)
{
if (logic != MIME_MAGIC_AND &&
- current != NULL && current->prev != NULL &&
- current->prev->prev != NULL)
+ current != NULL && current->prev != NULL)
{
/*
* OK, we have more than 1 rule in the current tree level... Make a

View File

@ -1,17 +0,0 @@
diff -up cups-1.4b2/cups/encode.c.str3077 cups-1.4b2/cups/encode.c
--- cups-1.4b2/cups/encode.c.str3077 2008-12-15 17:54:11.000000000 +0000
+++ cups-1.4b2/cups/encode.c 2009-01-28 16:58:01.000000000 +0000
@@ -69,10 +69,10 @@ static const _ipp_option_t ipp_options[]
{ 0, "hue-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 1, "include-schemes", IPP_TAG_NAME, IPP_TAG_OPERATION },
{ 0, "job-impressions", IPP_TAG_INTEGER, IPP_TAG_JOB },
- { 0, "job-k-limit", IPP_TAG_INTEGER, IPP_TAG_JOB },
- { 0, "job-page-limit", IPP_TAG_INTEGER, IPP_TAG_JOB },
+ { 0, "job-k-limit", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
+ { 0, "job-page-limit", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 0, "job-priority", IPP_TAG_INTEGER, IPP_TAG_JOB },
- { 0, "job-quota-period", IPP_TAG_INTEGER, IPP_TAG_JOB },
+ { 0, "job-quota-period", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 1, "job-sheets", IPP_TAG_NAME, IPP_TAG_JOB },
{ 1, "job-sheets-default", IPP_TAG_NAME, IPP_TAG_PRINTER },
{ 0, "job-uuid", IPP_TAG_URI, IPP_TAG_JOB },

View File

@ -1,245 +0,0 @@
diff -up cups-1.4b2/scheduler/job.c.str3078 cups-1.4b2/scheduler/job.c
--- cups-1.4b2/scheduler/job.c.str3078 2009-01-28 16:59:45.000000000 +0000
+++ cups-1.4b2/scheduler/job.c 2009-01-28 17:00:04.000000000 +0000
@@ -1049,7 +1049,7 @@ cupsdLoadAllJobs(void)
* 'cupsdLoadJob()' - Load a single job...
*/
-void
+int /* O - 1 on success, 0 on failure */
cupsdLoadJob(cupsd_job_t *job) /* I - Job */
{
char jobfile[1024]; /* Job filename */
@@ -1067,14 +1067,14 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
if (job->state_value > IPP_JOB_STOPPED)
job->access_time = time(NULL);
- return;
+ return (1);
}
if ((job->attrs = ippNew()) == NULL)
{
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Ran out of memory for job attributes!", job->id);
- return;
+ return (0);
}
/*
@@ -1089,9 +1089,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Unable to open job control file \"%s\" - %s!",
job->id, jobfile, strerror(errno));
- ippDelete(job->attrs);
- job->attrs = NULL;
- return;
+ goto error;
}
if (ippReadIO(fp, (ipp_iocb_t)cupsFileRead, 1, NULL, job->attrs) != IPP_DATA)
@@ -1100,10 +1098,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
"[Job %d] Unable to read job control file \"%s\"!", job->id,
jobfile);
cupsFileClose(fp);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
cupsFileClose(fp);
@@ -1117,10 +1112,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Missing or bad time-at-creation attribute in "
"control file!", job->id);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
if ((job->state = ippFindAttribute(job->attrs, "job-state",
@@ -1129,10 +1121,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Missing or bad job-state attribute in control "
"file!", job->id);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
job->state_value = (ipp_jstate_t)job->state->values[0].integer;
@@ -1145,10 +1134,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] No job-printer-uri attribute in control file!",
job->id);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
if ((dest = cupsdValidateDest(attr->values[0].string.text, &(job->dtype),
@@ -1157,10 +1143,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Unable to queue job for destination \"%s\"!",
job->id, attr->values[0].string.text);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
cupsdSetString(&job->dest, dest);
@@ -1170,10 +1153,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Unable to queue job for destination \"%s\"!",
job->id, job->dest);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
job->sheets = ippFindAttribute(job->attrs, "job-media-sheets-completed",
@@ -1188,10 +1168,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Missing or bad job-priority attribute in "
"control file!", job->id);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
job->priority = attr->values[0].integer;
@@ -1205,10 +1182,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Missing or bad job-originating-user-name "
"attribute in control file!", job->id);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
cupsdSetString(&job->username, attr->values[0].string.text);
@@ -1277,7 +1251,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Ran out of memory for job file types!",
job->id);
- return;
+ return (1);
}
job->compressions = compressions;
@@ -1335,6 +1309,18 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
}
job->access_time = time(NULL);
+ return (1);
+
+ /*
+ * If we get here then something bad happened...
+ */
+
+ error:
+
+ ippDelete(job->attrs);
+ job->attrs = NULL;
+ unlink(jobfile);
+ return (0);
}
diff -up cups-1.4b2/scheduler/job.h.str3078 cups-1.4b2/scheduler/job.h
--- cups-1.4b2/scheduler/job.h.str3078 2008-08-28 21:38:13.000000000 +0100
+++ cups-1.4b2/scheduler/job.h 2009-01-28 17:00:04.000000000 +0000
@@ -3,7 +3,7 @@
*
* Print job definitions for the Common UNIX Printing System (CUPS) scheduler.
*
- * Copyright 2007-2008 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -117,7 +117,7 @@ extern int cupsdGetPrinterJobCount(cons
extern int cupsdGetUserJobCount(const char *username);
extern void cupsdHoldJob(cupsd_job_t *job);
extern void cupsdLoadAllJobs(void);
-extern void cupsdLoadJob(cupsd_job_t *job);
+extern int cupsdLoadJob(cupsd_job_t *job);
extern void cupsdMoveJob(cupsd_job_t *job, cupsd_printer_t *p);
extern void cupsdReleaseJob(cupsd_job_t *job);
extern void cupsdRestartJob(cupsd_job_t *job);
diff -up cups-1.4b2/scheduler/quotas.c.str3078 cups-1.4b2/scheduler/quotas.c
--- cups-1.4b2/scheduler/quotas.c.str3078 2007-09-12 22:09:49.000000000 +0100
+++ cups-1.4b2/scheduler/quotas.c 2009-01-28 17:00:04.000000000 +0000
@@ -3,7 +3,7 @@
*
* Quota routines for the Common UNIX Printing System (CUPS).
*
- * Copyright 2007 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -155,10 +155,22 @@ cupsdUpdateQuota(
job;
job = (cupsd_job_t *)cupsArrayNext(Jobs))
{
+ /*
+ * We only care about the current printer/class and user...
+ */
+
if (strcasecmp(job->dest, p->name) != 0 ||
strcasecmp(job->username, q->username) != 0)
continue;
+ /*
+ * Make sure attributes are loaded; we always call cupsdLoadJob() to ensure
+ * the access_time member is updated so the job isn't unloaded right away...
+ */
+
+ if (!cupsdLoadJob(job))
+ continue;
+
if ((attr = ippFindAttribute(job->attrs, "time-at-completion",
IPP_TAG_INTEGER)) == NULL)
if ((attr = ippFindAttribute(job->attrs, "time-at-processing",
@@ -166,11 +178,22 @@ cupsdUpdateQuota(
attr = ippFindAttribute(job->attrs, "time-at-creation",
IPP_TAG_INTEGER);
- if (attr == NULL)
- break;
+ if (!attr)
+ {
+ /*
+ * This should never happen since cupsdLoadJob() checks for
+ * time-at-creation, but if it does just ignore this job...
+ */
+
+ continue;
+ }
if (attr->values[0].integer < curtime)
{
+ /*
+ * This job is too old to count towards the quota, ignore it...
+ */
+
if (JobAutoPurge)
cupsdCancelJob(job, 1, IPP_JOB_CANCELED);

View File

@ -1,4 +1,5 @@
%define pre b2
%define svn -svn8404
%define initdir /etc/rc.d/init.d
%define use_alternatives 1
%define lspp 1
@ -7,10 +8,10 @@
Summary: Common Unix Printing System
Name: cups
Version: 1.4
Release: 0.%{pre}.7%{?dist}.1
Release: 0.%{pre}.8%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source: ftp://ftp.easysw.com/pub/cups/test//cups-%{version}%{?pre}-source.tar.bz2
Source: ftp://ftp.easysw.com/pub/cups/test//cups-%{version}%{?pre}%{?svn}-source.tar.bz2
Source1: cups.init
Source2: cupsprinter.png
Source4: pstopdf
@ -37,7 +38,6 @@ Patch11: cups-direct-usb.patch
Patch12: cups-lpr-help.patch
Patch13: cups-peercred.patch
Patch14: cups-pid.patch
Patch15: cups-local-protocols.patch
Patch16: cups-eggcups.patch
Patch17: cups-getpass.patch
Patch18: cups-driverd-timeout.patch
@ -45,9 +45,6 @@ Patch19: cups-strict-ppd-line-length.patch
Patch20: cups-logrotate.patch
Patch21: cups-usb-paperout.patch
Patch22: cups-build.patch
Patch23: cups-str3077.patch
Patch24: cups-str3078.patch
Patch25: cups-str3059.patch
Patch26: cups-avahi.patch
Patch27: cups-missing-devices.patch
Patch100: cups-lspp.patch
@ -166,7 +163,7 @@ UNIX® operating systems. This is the package that provices a PHP
module.
%prep
%setup -q -n %{name}-%{version}%{?pre}
%setup -q -n %{name}-%{version}%{?pre}%{?svn}
%patch1 -p1 -b .no-gzip-man
%patch2 -p1 -b .system-auth
%patch3 -p1 -b .multilib
@ -181,7 +178,6 @@ module.
%patch12 -p1 -b .lpr-help
%patch13 -p1 -b .peercred
%patch14 -p1 -b .pid
%patch15 -p1 -b .local-protocols
%patch16 -p1 -b .eggcups
%patch17 -p1 -b .getpass
%patch18 -p1 -b .driverd-timeout
@ -189,9 +185,6 @@ module.
%patch20 -p1 -b .logrotate
%patch21 -p1 -b .usb-paperout
%patch22 -p1 -b .build
%patch23 -p1 -b .str3077
%patch24 -p1 -b .str3078
%patch25 -p1 -b .str3059
%patch26 -p1 -b .avahi
%patch27 -p1 -b .missing-devices
@ -384,12 +377,20 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %{_sysconfdir}/logrotate.d/cups
%config(noreplace) %{_sysconfdir}/portreserve/%{name}
%dir %{_datadir}/%{name}/www
%dir %{_datadir}/%{name}/www/es
%dir %{_datadir}/%{name}/www/ja
%dir %{_datadir}/%{name}/www/pl
%dir %{_datadir}/%{name}/www/ru
%config(noreplace) %{_datadir}/%{name}/www/favicon.*
%config(noreplace) %{_datadir}/%{name}/www/images
%config(noreplace) %{_datadir}/%{name}/www/*.css
%config(noreplace) %doc %{_datadir}/%{name}/www/index.html
%config(noreplace) %doc %{_datadir}/%{name}/www/help
%config(noreplace) %doc %{_datadir}/%{name}/www/robots.txt
%config(noreplace) %doc %{_datadir}/%{name}/www/es/index.html
%config(noreplace) %doc %{_datadir}/%{name}/www/ja/index.html
%config(noreplace) %doc %{_datadir}/%{name}/www/pl/index.html
%config(noreplace) %doc %{_datadir}/%{name}/www/ru/index.html
%config(noreplace) %{initdir}/cups
%{_bindir}/cupstestppd
%{_bindir}/cupstestdsc
@ -420,6 +421,9 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_datadir}/cups/templates
%config(noreplace) %{_datadir}/cups/templates/*.tmpl
%config(noreplace) %{_datadir}/cups/templates/es/*.tmpl
%config(noreplace) %{_datadir}/cups/templates/ja/*.tmpl
%config(noreplace) %{_datadir}/cups/templates/pl/*.tmpl
%config(noreplace) %{_datadir}/cups/templates/ru/*.tmpl
%{_datadir}/locale/*
%{_datadir}/ppd
%dir %attr(1770,root,lp) /var/spool/cups/tmp
@ -461,6 +465,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/php/modules/*.so
%changelog
* Thu Mar 5 2009 Tim Waugh <twaugh@redhat.com> 1:1.4-0.b2.8
- Updated to svn8404.
* Wed Feb 25 2009 Tim Waugh <twaugh@redhat.com>
- Added 'Should-Start: portreserve' to the initscript (part of bug #487250).

View File

@ -1,2 +1,2 @@
b0bb017098e8e76b8a25e666c41ce540 postscript.ppd.gz
23f540e6145e4ab3298700d9f496bcd1 cups-1.4b2-source.tar.bz2
f520304d497111b8421e12a408a8bcda cups-1.4b2-svn8404-source.tar.bz2