[Pkg-cups-devel] r344 - in cupsys/branches/cups-1.2/debian: .

Kenshi Muto kmuto at costa.debian.org
Wed Aug 9 11:02:01 UTC 2006


Author: kmuto
Date: Wed Aug  9 11:01:59 2006
New Revision: 344

Added:
   cupsys/branches/cups-1.2/debian/patches/00_r5809.dpatch   (contents, props changed)
Modified:
   cupsys/branches/cups-1.2/debian/changelog
   cupsys/branches/cups-1.2/debian/patches/00list

Log:
r5809

Modified: cupsys/branches/cups-1.2/debian/changelog
==============================================================================
--- cupsys/branches/cups-1.2/debian/changelog	(original)
+++ cupsys/branches/cups-1.2/debian/changelog	Wed Aug  9 11:01:59 2006
@@ -1,6 +1,8 @@
 cupsys (1.2.2-2) UNRELEASED; urgency=high
 
   [ Kenshi Muto ]
+  * Apply upstream svn change r5809.
+    - BrowseRelay didn't work on Debian (closes: #372855)
   * libcupsys2 conflicts cupsys version 1.1.
     libcupsys2 version 1.2 changed its private API. This breaks
     old cupsys 1.1, but we believe cupsys is only one application

Added: cupsys/branches/cups-1.2/debian/patches/00_r5809.dpatch
==============================================================================
--- (empty file)
+++ cupsys/branches/cups-1.2/debian/patches/00_r5809.dpatch	Wed Aug  9 11:01:59 2006
@@ -0,0 +1,1039 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 00_r5809.dpatch by Kenshi Muto <kmuto at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad cupsys-1.2.2~/CHANGES.txt cupsys-1.2.2/CHANGES.txt
+--- cupsys-1.2.2~/CHANGES.txt	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/CHANGES.txt	2006-08-09 10:51:06.000000000 +0000
+@@ -1,6 +1,30 @@
+-CHANGES.txt - 2006-07-18
++CHANGES.txt - 2006-08-07
+ ------------------------
+ 
++CHANGES IN CUPS V1.2.3
++
++	- cupstestppd didn't report the actual misspelling of the
++	  1284DeviceID attribute (STR #1849) 
++	- BrowseRelay didn't work on Debian (STR #1887)
++	- configure --without-languages didn't work (STR #1879)
++	- Manually added remote printers did not work (STR #1881)
++	- The <cups/backend.h> header was not installed.
++	- Updated the build files for Autoconf 2.60 (STR #1853)
++	- The scheduler incorrectly terminated the polling
++	  processes after receiving a partial log line.
++	- The cups-lpd mini-daemon reported "No printer-state
++	  attribute found" errors when reporting the queue status
++	  (PR #6250, STR #1821)
++	- SNMP backend improvements (STR #1737, STR #1742, STR
++	  #1790, STR #1835)
++	- The scheduler erroneously reported an error with the
++	  CGI pipe (STR #1860)
++	- Fixed HP-UX compile problems (STR #1858, STR #1859)
++	- cupstestppd crashed with some PPD files (STR #1864)
++	- The <cups/dir.h> and <cups/file.h> header files did not
++	  work with C++.
++
++
+ CHANGES IN CUPS V1.2.2
+ 
+ 	- Documentation updates (STR #1765, STR #1780)
+diff -urNad cupsys-1.2.2~/Makedefs.in cupsys-1.2.2/Makedefs.in
+--- cupsys-1.2.2~/Makedefs.in	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/Makedefs.in	2006-08-09 10:51:06.000000000 +0000
+@@ -174,12 +174,16 @@
+ # We have to define these first because autoconf uses ${prefix}
+ # and ${exec_prefix} for most of the other directories...
+ #
++# The "datarootdir" variable may not get defined if you are using
++# a version of autoconf prior to 2.60.
++#
+ # This is immediately followed by definition in ALL CAPS for the
+ # needed directories...
+ #
+ 
+ bindir		=	@bindir@
+ datadir		=	@datadir@
++datarootdir	=	@datarootdir@
+ exec_prefix	=	@exec_prefix@
+ includedir	=	@includedir@
+ infodir		=	@infodir@
+diff -urNad cupsys-1.2.2~/README.txt cupsys-1.2.2/README.txt
+--- cupsys-1.2.2~/README.txt	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/README.txt	2006-08-09 10:51:06.000000000 +0000
+@@ -1,4 +1,4 @@
+-README - CUPS v1.2.0 - 2006-05-08
++README - CUPS v1.2.3 - 2006-07-20
+ ---------------------------------
+ 
+ Looking for compile instructions?  Read the file "INSTALL.txt"
+diff -urNad cupsys-1.2.2~/backend/backend-private.h cupsys-1.2.2/backend/backend-private.h
+--- cupsys-1.2.2~/backend/backend-private.h	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/backend/backend-private.h	2006-08-09 10:51:06.000000000 +0000
+@@ -45,9 +45,9 @@
+  * C++ magic...
+  */
+ 
+-#  ifdef _cplusplus
++#  ifdef __cplusplus
+ extern "C" {
+-#  endif /* _cplusplus */
++#  endif /* __cplusplus */
+ 
+ 
+ /*
+@@ -62,9 +62,9 @@
+ extern ssize_t	backendRunLoop(int print_fd, int device_fd, int use_bc);
+ 
+ 
+-#  ifdef _cplusplus
++#  ifdef __cplusplus
+ }
+-#  endif /* _cplusplus */
++#  endif /* __cplusplus */
+ #endif /* !_CUPS_BACKEND_PRIVATE_H_ */
+ 
+ 
+diff -urNad cupsys-1.2.2~/backend/runloop.c cupsys-1.2.2/backend/runloop.c
+--- cupsys-1.2.2~/backend/runloop.c	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/backend/runloop.c	2006-08-09 10:51:06.000000000 +0000
+@@ -33,7 +33,11 @@
+  */
+ 
+ #include "backend-private.h"
+-#include <sys/select.h>
++#ifdef __hpux
++#  include <sys/time.h>
++#else
++#  include <sys/select.h>
++#endif /* __hpux */
+ 
+ 
+ /*
+diff -urNad cupsys-1.2.2~/backend/snmp.c cupsys-1.2.2/backend/snmp.c
+--- cupsys-1.2.2~/backend/snmp.c	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/backend/snmp.c	2006-08-09 10:51:06.000000000 +0000
+@@ -52,6 +52,7 @@
+  *                               packed integer value.
+  *   compare_cache()           - Compare two cache entries.
+  *   debug_printf()            - Display some debugging information.
++ *   do_request()              - Do a non-blocking IPP request.
+  *   fix_make_model()          - Fix common problems in the make-and-model
+  *                               string.
+  *   free_array()              - Free an array of strings.
+@@ -59,7 +60,7 @@
+  *   get_interface_addresses() - Get the broadcast address(es) associated
+  *                               with an interface.
+  *   hex_debug()               - Output hex debugging data...
+- *   list_devices()            - List all of the devices we found...
++ *   list_device()             - List a device we found...
+  *   open_snmp_socket()        - Open the SNMP broadcast socket.
+  *   password_cb()             - Handle authentication requests.
+  *   probe_device()            - Probe a device to discover whether it is a
+@@ -194,6 +195,13 @@
+ 
+ 
+ /*
++ * Private CUPS API to set the last error...
++ */
++
++extern void	_cupsSetError(ipp_status_t status, const char *message);
++
++
++/*
+  * Local functions...
+  */
+ 
+@@ -238,6 +246,8 @@
+ static int		asn1_size_packed(int integer);
+ static int		compare_cache(snmp_cache_t *a, snmp_cache_t *b);
+ static void		debug_printf(const char *format, ...);
++static ipp_t		*do_request(http_t *http, ipp_t *request,
++			            const char *resource);
+ static void		fix_make_model(char *make_model,
+ 			               const char *old_make_model,
+ 				       int make_model_size);
+@@ -245,7 +255,7 @@
+ static void		free_cache(void);
+ static http_addrlist_t	*get_interface_addresses(const char *ifname);
+ static void		hex_debug(unsigned char *buffer, size_t len);
+-static void		list_devices(void);
++static void		list_device(snmp_cache_t *cache);
+ static int		open_snmp_socket(void);
+ static const char	*password_cb(const char *prompt);
+ static void		probe_device(snmp_cache_t *device);
+@@ -278,6 +288,7 @@
+ static unsigned		DeviceTypeRequest;
+ static unsigned		DeviceDescRequest;
+ static int		HostNameLookups = 0;
++static int		MaxRunTime = 10;
+ static struct timeval	StartTime;
+ 
+ 
+@@ -330,12 +341,6 @@
+   scan_devices(fd);
+ 
+  /*
+-  * Display the results...
+-  */
+-
+-  list_devices();
+-
+- /*
+   * Close, free, and return with no errors...
+   */
+ 
+@@ -384,7 +389,7 @@
+ 
+   debug_printf("DEBUG: add_cache(addr=%p, addrname=\"%s\", uri=\"%s\", "
+                   "id=\"%s\", make_and_model=\"%s\")\n",
+-               addr, addrname, uri ? uri : "(null)", id ? id :  "(null)",
++               addr, addrname, uri ? uri : "(null)", id ? id : "(null)",
+ 	       make_and_model ? make_and_model : "(null)");
+ 
+   temp = calloc(1, sizeof(snmp_cache_t));
+@@ -402,6 +407,9 @@
+     temp->make_and_model = strdup(make_and_model);
+ 
+   cupsArrayAdd(Devices, temp);
++
++  if (uri)
++    list_device(temp);
+ }
+ 
+ 
+@@ -1228,6 +1236,173 @@
+ 
+ 
+ /*
++ * 'do_request()' - Do a non-blocking IPP request.
++ */
++
++static ipp_t *				/* O - Response data or NULL */
++do_request(http_t     *http,		/* I - HTTP connection to server */
++           ipp_t      *request,		/* I - IPP request */
++           const char *resource)	/* I - HTTP resource for POST */
++{
++  ipp_t		*response;		/* IPP response data */
++  http_status_t	status;			/* Status of HTTP request */
++  ipp_state_t	state;			/* State of IPP processing */
++
++
++ /*
++  * Setup the HTTP variables needed...
++  */
++
++  httpClearFields(http);
++  httpSetLength(http, ippLength(request));
++  httpSetField(http, HTTP_FIELD_CONTENT_TYPE, "application/ipp");
++
++ /*
++  * Do the POST request...
++  */
++
++  debug_printf("DEBUG: %.3f POST %s...\n", run_time(), resource);
++
++  if (httpPost(http, resource))
++  {
++    if (httpReconnect(http))
++    {
++      _cupsSetError(IPP_DEVICE_ERROR, "Unable to reconnect");
++      return (NULL);
++    }
++    else if (httpPost(http, resource))
++    {
++      _cupsSetError(IPP_GONE, "Unable to POST");
++      return (NULL);
++    }
++  }
++
++ /*
++  * Send the IPP data...
++  */
++
++  request->state = IPP_IDLE;
++  status         = HTTP_CONTINUE;
++
++  while ((state = ippWrite(http, request)) != IPP_DATA)
++    if (state == IPP_ERROR)
++    {
++      status = HTTP_ERROR;
++      break;
++    }
++    else if (httpCheck(http))
++    {
++      if ((status = httpUpdate(http)) != HTTP_CONTINUE)
++	break;
++    }
++
++ /*
++  * Get the server's return status...
++  */
++
++  debug_printf("DEBUG: %.3f Getting response...\n", run_time());
++
++  while (status == HTTP_CONTINUE)
++    if (httpWait(http, 1000))
++      status = httpUpdate(http);
++    else
++    {
++      status      = HTTP_ERROR;
++      http->error = ETIMEDOUT;
++    }
++
++  if (status != HTTP_OK)
++  {
++   /*
++    * Flush any error message...
++    */
++
++    httpFlush(http);
++    response = NULL;
++  }
++  else
++  {
++   /*
++    * Read the response...
++    */
++
++    response = ippNew();
++
++    while ((state = ippRead(http, response)) != IPP_DATA)
++      if (state == IPP_ERROR)
++      {
++       /*
++        * Delete the response...
++	*/
++
++	ippDelete(response);
++	response = NULL;
++
++        _cupsSetError(IPP_SERVICE_UNAVAILABLE, strerror(errno));
++	break;
++      }
++  }
++
++ /*
++  * Delete the original request and return the response...
++  */
++  
++  ippDelete(request);
++
++  if (response)
++  {
++    ipp_attribute_t	*attr;		/* status-message attribute */
++
++
++    attr = ippFindAttribute(response, "status-message", IPP_TAG_TEXT);
++
++    _cupsSetError(response->request.status.status_code,
++                   attr ? attr->values[0].string.text :
++		       ippErrorString(response->request.status.status_code));
++  }
++  else if (status != HTTP_OK)
++  {
++    switch (status)
++    {
++      case HTTP_NOT_FOUND :
++          _cupsSetError(IPP_NOT_FOUND, httpStatus(status));
++	  break;
++
++      case HTTP_UNAUTHORIZED :
++          _cupsSetError(IPP_NOT_AUTHORIZED, httpStatus(status));
++	  break;
++
++      case HTTP_FORBIDDEN :
++          _cupsSetError(IPP_FORBIDDEN, httpStatus(status));
++	  break;
++
++      case HTTP_BAD_REQUEST :
++          _cupsSetError(IPP_BAD_REQUEST, httpStatus(status));
++	  break;
++
++      case HTTP_REQUEST_TOO_LARGE :
++          _cupsSetError(IPP_REQUEST_VALUE, httpStatus(status));
++	  break;
++
++      case HTTP_NOT_IMPLEMENTED :
++          _cupsSetError(IPP_OPERATION_NOT_SUPPORTED, httpStatus(status));
++	  break;
++
++      case HTTP_NOT_SUPPORTED :
++          _cupsSetError(IPP_VERSION_NOT_SUPPORTED, httpStatus(status));
++	  break;
++
++      default :
++	  _cupsSetError(IPP_SERVICE_UNAVAILABLE, httpStatus(status));
++	  break;
++    }
++  }
++
++  return (response);
++}
++
++
++/*
+  * 'fix_make_model()' - Fix common problems in the make-and-model string.
+  */
+ 
+@@ -1422,24 +1597,18 @@
+ 
+ 
+ /*
+- * 'list_devices()' - List all of the devices we found...
++ * 'list_device()' - List a device we found...
+  */
+ 
+ static void
+-list_devices(void)
++list_device(snmp_cache_t *cache)	/* I - Cached device */
+ {
+-  snmp_cache_t	*cache;			/* Cached device */
+-
+-
+-  for (cache = (snmp_cache_t *)cupsArrayFirst(Devices);
+-       cache;
+-       cache = (snmp_cache_t *)cupsArrayNext(Devices))
+-    if (cache->uri)
+-      printf("network %s \"%s\" \"%s %s\" \"%s\"\n",
+-             cache->uri,
+-	     cache->make_and_model ? cache->make_and_model : "Unknown",
+-	     cache->make_and_model ? cache->make_and_model : "Unknown",
+-	     cache->addrname, cache->id ? cache->id : "");
++  if (cache->uri)
++    printf("network %s \"%s\" \"%s %s\" \"%s\"\n",
++           cache->uri,
++	   cache->make_and_model ? cache->make_and_model : "Unknown",
++	   cache->make_and_model ? cache->make_and_model : "Unknown",
++	   cache->addrname, cache->id ? cache->id : "");
+ }
+ 
+ 
+@@ -1551,8 +1720,6 @@
+ 			};
+ 
+ 
+-    debug_printf("DEBUG: %s supports IPP!\n", device->addrname);
+-
+    /*
+     * Use non-blocking IO...
+     */
+@@ -1569,6 +1736,13 @@
+          i ++)
+     {
+      /*
++      * Stop early if we are out of time...
++      */
++
++      if (MaxRunTime > 0 && run_time() >= MaxRunTime)
++        break;
++
++     /*
+       * Don't look past /ipp if we have found a working URI...
+       */
+ 
+@@ -1578,16 +1752,14 @@
+       httpAssembleURI(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
+                       device->addrname, 631, resources[i]);
+ 
+-      debug_printf("DEBUG: Trying %s (num_uris=%d)\n", uri, num_uris);
+-
+       request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES);
+ 
+       ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
+                    NULL, uri);
+ 
+-      response = cupsDoRequest(http, request, resources[i]);
++      response = do_request(http, request, resources[i]);
+ 
+-      debug_printf("DEBUG: %s %s (%s)\n", uri,
++      debug_printf("DEBUG: %.3f %s %s (%s)\n", run_time(), uri,
+         	   ippErrorString(cupsLastError()), cupsLastErrorString());
+ 
+       if (response && response->request.status.status_code == IPP_OK)
+@@ -1726,6 +1898,7 @@
+   int		linenum;		/* Line number */
+   const char	*cups_serverroot;	/* CUPS_SERVERROOT env var */
+   const char	*debug;			/* CUPS_DEBUG_LEVEL env var */
++  const char	*runtime;		/* CUPS_MAX_RUN_TIME env var */
+ 
+ 
+  /*
+@@ -1741,6 +1914,9 @@
+   if ((debug = getenv("CUPS_DEBUG_LEVEL")) != NULL)
+     DebugLevel = atoi(debug);
+ 
++  if ((runtime = getenv("CUPS_MAX_RUN_TIME")) != NULL)
++    MaxRunTime = atoi(runtime);
++
+  /*
+   * Find the snmp.conf file...
+   */
+@@ -1777,6 +1953,8 @@
+ 	                  !strcasecmp(value, "yes") ||
+ 	                  !strcasecmp(value, "true") ||
+ 	                  !strcasecmp(value, "double");
++      else if (!strcasecmp(line, "MaxRunTime"))
++        MaxRunTime = atoi(value);
+       else
+         fprintf(stderr, "ERROR: Unknown directive %s on line %d of %s!\n",
+ 	        line, linenum, filename);
+@@ -2075,7 +2253,9 @@
+   for (device = (snmp_cache_t *)cupsArrayFirst(Devices);
+        device;
+        device = (snmp_cache_t *)cupsArrayNext(Devices))
+-    if (!device->uri)
++    if (MaxRunTime > 0 && run_time() >= MaxRunTime)
++      break;
++    else if (!device->uri)
+       probe_device(device);
+ 
+   debug_printf("DEBUG: %.3f Scan complete!\n", run_time());
+@@ -2211,6 +2391,8 @@
+ 
+     device->make_and_model = strdup(make_model);
+   }
++
++  list_device(device);
+ }
+ 
+ 
+diff -urNad cupsys-1.2.2~/config-scripts/cups-defaults.m4 cupsys-1.2.2/config-scripts/cups-defaults.m4
+--- cupsys-1.2.2~/config-scripts/cups-defaults.m4	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/config-scripts/cups-defaults.m4	2006-08-09 10:51:06.000000000 +0000
+@@ -25,7 +25,9 @@
+ 
+ dnl Default langugages...
+ AC_ARG_WITH(languages, [  --with-languages        set installed languages, default="de es ja pl sv" ],
+-	LANGUAGES="$withval",
++	if test "x$withval" != xno; then
++		LANGUAGES="$withval"
++	fi,
+ 	LANGUAGES="de es ja pl sv")
+ AC_SUBST(LANGUAGES)
+ 
+diff -urNad cupsys-1.2.2~/config-scripts/cups-directories.m4 cupsys-1.2.2/config-scripts/cups-directories.m4
+--- cupsys-1.2.2~/config-scripts/cups-directories.m4	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/config-scripts/cups-directories.m4	2006-08-09 10:51:06.000000000 +0000
+@@ -57,6 +57,15 @@
+ 	sharedstatedir="/usr/com"
+ fi
+ 
++dnl Fix "datarootdir" variable if it hasn't been specified...
++if test "$datarootdir" = "\${prefix}/share"; then
++	if test "$prefix" = "/"; then
++		datarootdir="/usr/share"
++	else
++		datarootdir="$prefix/share"
++	fi
++fi
++
+ dnl Fix "datadir" variable if it hasn't been specified...
+ if test "$datadir" = "\${prefix}/share"; then
+ 	if test "$prefix" = "/"; then
+@@ -64,6 +73,8 @@
+ 	else
+ 		datadir="$prefix/share"
+ 	fi
++elif test "$datadir" = "\${datarootdir}"; then
++	datadir="$datarootdir"
+ fi
+ 
+ dnl Fix "includedir" variable if it hasn't been specified...
+diff -urNad cupsys-1.2.2~/config-scripts/cups-manpages.m4 cupsys-1.2.2/config-scripts/cups-manpages.m4
+--- cupsys-1.2.2~/config-scripts/cups-manpages.m4	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/config-scripts/cups-manpages.m4	2006-08-09 10:51:06.000000000 +0000
+@@ -3,7 +3,7 @@
+ dnl
+ dnl   Manpage stuff for the Common UNIX Printing System (CUPS).
+ dnl
+-dnl   Copyright 1997-2005 by Easy Software Products, all rights reserved.
++dnl   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ dnl
+ dnl   These coded instructions, statements, and computer programs are the
+ dnl   property of Easy Software Products and are protected by Federal
+@@ -23,6 +23,12 @@
+ dnl
+ 
+ dnl Fix "mandir" variable...
++if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"; then
++	# New GNU "standards" break previous ones, so make sure we use
++	# the right default location for the operating system...
++	mandir="\${prefix}/man"
++fi
++
+ if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then
+ 	case "$uname" in
+         	Darwin* | Linux | GNU | *BSD* | AIX*)
+diff -urNad cupsys-1.2.2~/configure.in cupsys-1.2.2/configure.in
+--- cupsys-1.2.2~/configure.in	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/configure.in	2006-08-09 10:51:06.000000000 +0000
+@@ -54,9 +54,17 @@
+ 	INSTALL_LANGUAGES="install-languages"
+ 	UNINSTALL_LANGUAGES="uninstall-languages"
+ 	for lang in $LANGUAGES; do
+-		LANGFILES="$LANGFILES doc/$lang/index.html"
+-		LANGFILES="$LANGFILES templates/$lang/edit-config.tmpl"
+-		LANGFILES="$LANGFILES templates/$lang/header.tmpl"
++		if test -f doc/$lang/index.html.in; then
++			LANGFILES="$LANGFILES doc/$lang/index.html"
++		fi
++
++		if test -f templates/$lang/edit-config.tmpl.in; then
++			LANGFILES="$LANGFILES templates/$lang/edit-config.tmpl"
++		fi
++
++		if test -f templates/$lang/header.tmpl.in; then
++			LANGFILES="$LANGFILES templates/$lang/header.tmpl"
++		fi
+ 	done
+ fi
+ 
+diff -urNad cupsys-1.2.2~/cups/Makefile cupsys-1.2.2/cups/Makefile
+--- cupsys-1.2.2~/cups/Makefile	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/cups/Makefile	2006-08-09 10:51:06.000000000 +0000
+@@ -93,6 +93,7 @@
+ HEADERS	=	\
+ 		adminutil.h \
+ 		array.h \
++		backend.h \
+ 		cups.h \
+ 		dir.h \
+ 		file.h \
+diff -urNad cupsys-1.2.2~/cups/cups.h cupsys-1.2.2/cups/cups.h
+--- cupsys-1.2.2~/cups/cups.h	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/cups/cups.h	2006-08-09 10:51:06.000000000 +0000
+@@ -61,10 +61,10 @@
+  * Constants...
+  */
+ 
+-#  define CUPS_VERSION		1.0200
++#  define CUPS_VERSION		1.0203
+ #  define CUPS_VERSION_MAJOR	1
+ #  define CUPS_VERSION_MINOR	2
+-#  define CUPS_VERSION_PATCH	0
++#  define CUPS_VERSION_PATCH	3
+ #  define CUPS_DATE_ANY		-1
+ 
+ 
+diff -urNad cupsys-1.2.2~/cups/dir.h cupsys-1.2.2/cups/dir.h
+--- cupsys-1.2.2~/cups/dir.h	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/cups/dir.h	2006-08-09 10:51:06.000000000 +0000
+@@ -5,7 +5,7 @@
+  *
+  *   This set of APIs abstracts enumeration of directory entries.
+  *
+- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
++ *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+  *
+  *   These coded instructions, statements, and computer programs are the
+  *   property of Easy Software Products and are protected by Federal
+@@ -39,9 +39,9 @@
+  * C++ magic...
+  */
+ 
+-#  ifdef _cplusplus
++#  ifdef __cplusplus
+ extern "C" {
+-#  endif /* _cplusplus */
++#  endif /* __cplusplus */
+ 
+ 
+ /*
+@@ -67,9 +67,9 @@
+ extern void		cupsDirRewind(cups_dir_t *dp);
+ 
+ 
+-#  ifdef _cplusplus
++#  ifdef __cplusplus
+ }
+-#  endif /* _cplusplus */
++#  endif /* __cplusplus */
+ #endif /* !_CUPS_DIR_H_ */
+ 
+ /*
+diff -urNad cupsys-1.2.2~/cups/file.h cupsys-1.2.2/cups/file.h
+--- cupsys-1.2.2~/cups/file.h	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/cups/file.h	2006-08-09 10:51:06.000000000 +0000
+@@ -8,7 +8,7 @@
+  *   our own file functions allows us to provide transparent support of
+  *   gzip'd print files, PPD files, etc.
+  *
+- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
++ *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+  *
+  *   These coded instructions, statements, and computer programs are the
+  *   property of Easy Software Products and are protected by Federal
+@@ -47,9 +47,9 @@
+  * C++ magic...
+  */
+ 
+-#  ifdef _cplusplus
++#  ifdef __cplusplus
+ extern "C" {
+-#  endif /* _cplusplus */
++#  endif /* __cplusplus */
+ 
+ 
+ /*
+@@ -103,9 +103,9 @@
+ extern ssize_t		cupsFileWrite(cups_file_t *fp, const char *buf, size_t bytes);
+ 
+ 
+-#  ifdef _cplusplus
++#  ifdef __cplusplus
+ }
+-#  endif /* _cplusplus */
++#  endif /* __cplusplus */
+ #endif /* !_CUPS_FILE_H_ */
+ 
+ /*
+diff -urNad cupsys-1.2.2~/cups/http.h cupsys-1.2.2/cups/http.h
+--- cupsys-1.2.2~/cups/http.h	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/cups/http.h	2006-08-09 10:51:06.000000000 +0000
+@@ -39,8 +39,8 @@
+ #    include <winsock2.h>
+ #    include <ws2tcpip.h>
+ #  else
+-#    ifdef __sgi /* IRIX needs this for IPv6 support!?! */
+-#      define INET6
++#    ifdef __sgi
++#      define INET6			/* IRIX IPv6 support... */
+ #    endif /* __sgi */
+ #    include <unistd.h>
+ #    include <sys/time.h>
+@@ -53,6 +53,9 @@
+ #    if !defined(__APPLE__) || !defined(TCP_NODELAY)
+ #      include <netinet/tcp.h>
+ #    endif /* !__APPLE__ || !TCP_NODELAY */
++#    if defined(AF_UNIX) && !defined(AF_LOCAL)
++#      define AF_LOCAL AF_UNIX		/* Older UNIX's have old names... */
++#    endif /* AF_UNIX && !AF_LOCAL */
+ #    ifdef AF_LOCAL
+ #      include <sys/un.h>
+ #    endif /* AF_LOCAL */
+diff -urNad cupsys-1.2.2~/cups/language.c cupsys-1.2.2/cups/language.c
+--- cupsys-1.2.2~/cups/language.c	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/cups/language.c	2006-08-09 10:51:06.000000000 +0000
+@@ -1288,6 +1288,8 @@
+ 	  *d = *d * 8 + *s - '0';
+ 	  s ++;
+ 	}
++
++	d ++;
+       }
+       else
+       {
+diff -urNad cupsys-1.2.2~/cups/transcode.c cupsys-1.2.2/cups/transcode.c
+--- cupsys-1.2.2~/cups/transcode.c	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/cups/transcode.c	2006-08-09 10:51:06.000000000 +0000
+@@ -1142,7 +1142,7 @@
+  */
+ 
+ 
+-void *					/* O - Charset map pointer */
++static void *				/* O - Charset map pointer */
+ get_charmap(
+     const cups_encoding_t encoding)	/* I - Encoding */
+ {
+diff -urNad cupsys-1.2.2~/cups-config.in cupsys-1.2.2/cups-config.in
+--- cupsys-1.2.2~/cups-config.in	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/cups-config.in	2006-08-09 10:51:06.000000000 +0000
+@@ -32,6 +32,7 @@
+ includedir=@includedir@
+ libdir=@libdir@
+ imagelibdir=@libdir@
++datarootdir=@datadir@
+ datadir=@datadir@
+ sysconfdir=@sysconfdir@
+ cups_datadir=@CUPS_DATADIR@
+diff -urNad cupsys-1.2.2~/doc/help/ref-snmp-conf.html cupsys-1.2.2/doc/help/ref-snmp-conf.html
+--- cupsys-1.2.2~/doc/help/ref-snmp-conf.html	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/doc/help/ref-snmp-conf.html	2006-08-09 10:51:06.000000000 +0000
+@@ -96,5 +96,22 @@
+ 
+ <P>The default setting is <VAR>off</VAR>.</P>
+ 
++<H2 CLASS="title"><A NAME="MaxRunTime">MaxRunTime</A></H2>
++
++<H3>Examples</H3>
++
++<PRE CLASS="command">
++MaxRunTime 10
++MaxRunTime 300
++</PRE>
++
++<H3>Description</H3>
++
++<P>The <CODE>MaxRunTime</CODE> directive specifies the maxium
++number of seconds that the SNMP backend will spend looking for
++printer devices on the network.</P>
++
++<P>The default setting is <VAR>10</VAR>.</P>
++
+ </BODY>
+ </HTML>
+diff -urNad cupsys-1.2.2~/man/cups-snmp.conf.man cupsys-1.2.2/man/cups-snmp.conf.man
+--- cupsys-1.2.2~/man/cups-snmp.conf.man	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/man/cups-snmp.conf.man	2006-08-09 10:51:06.000000000 +0000
+@@ -21,7 +21,7 @@
+ .\"       EMail: cups-info at cups.org
+ .\"         WWW: http://www.cups.org
+ .\"
+-.TH snmp.conf 5 "Common UNIX Printing System" "18 April 2006" "Easy Software Products"
++.TH snmp.conf 5 "Common UNIX Printing System" "31 July 2006" "Easy Software Products"
+ .SH NAME
+ snmp.conf \- snmp configuration file for cups
+ .SH DESCRIPTION
+@@ -68,6 +68,11 @@
+ Specifies whether the addresses of printers should be converted
+ to hostnames or left as numeric IP addresses. The default is
+ "off".
++.TP 5
++MaxRunTime \fIseconds\fR
++.br
++Specifies the maximum number of seconds that the SNMP backend
++will scan the network for printers.
+ .SH SEE ALSO
+ http://localhost:631/help
+ .SH COPYRIGHT
+diff -urNad cupsys-1.2.2~/packaging/cups.list.in cupsys-1.2.2/packaging/cups.list.in
+--- cupsys-1.2.2~/packaging/cups.list.in	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/packaging/cups.list.in	2006-08-09 10:51:06.000000000 +0000
+@@ -122,6 +122,7 @@
+ $prefix=@prefix@
+ $exec_prefix=@exec_prefix@
+ $bindir=@bindir@
++$datarootdir=@datarootdir@
+ $datadir=@datadir@
+ $includedir=@includedir@
+ $infodir=@infodir@
+@@ -342,7 +343,7 @@
+ 
+ # Data files
+ %subpackage de
+-f 0644 root sys $LOCALEDIR/es/cups_de.po locale/cups_de.po
++f 0644 root sys $LOCALEDIR/de/cups_de.po locale/cups_de.po
+ %subpackage es
+ f 0644 root sys $LOCALEDIR/es/cups_es.po locale/cups_es.po
+ %subpackage ja
+diff -urNad cupsys-1.2.2~/scheduler/cups-lpd.c cupsys-1.2.2/scheduler/cups-lpd.c
+--- cupsys-1.2.2~/scheduler/cups-lpd.c	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/scheduler/cups-lpd.c	2006-08-09 10:51:06.000000000 +0000
+@@ -471,7 +471,7 @@
+ 
+     request = ippNewRequest(CUPS_GET_PRINTERS);
+ 
+-    ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
++    ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
+                   "requested-attributes",
+ 		  (int)(sizeof(requested) / sizeof(requested[0])),
+                   NULL, requested);
+@@ -597,7 +597,7 @@
+     ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
+         	 NULL, uri);
+ 
+-    ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
++    ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
+                   "requested-attributes",
+ 		  (int)(sizeof(requested) / sizeof(requested[0])),
+                   NULL, requested);
+diff -urNad cupsys-1.2.2~/scheduler/cups-polld.c cupsys-1.2.2/scheduler/cups-polld.c
+--- cupsys-1.2.2~/scheduler/cups-polld.c	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/scheduler/cups-polld.c	2006-08-09 10:51:06.000000000 +0000
+@@ -260,6 +260,7 @@
+   * Do the request and get back a response...
+   */
+ 
++  seconds  = time(NULL);
+   response = cupsDoRequest(http, request, "/");
+ 
+   if (cupsLastError() > IPP_OK_CONFLICT)
+@@ -285,7 +286,6 @@
+     fprintf(stderr, "DEBUG: %s Found %d printers.\n", prefix, max_count);
+ 
+     count     = 0;
+-    seconds   = time(NULL);
+     max_count = max_count / interval + 1;
+ 
+    /*
+diff -urNad cupsys-1.2.2~/scheduler/dirsvc.c cupsys-1.2.2/scheduler/dirsvc.c
+--- cupsys-1.2.2~/scheduler/dirsvc.c	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/scheduler/dirsvc.c	2006-08-09 10:51:06.000000000 +0000
+@@ -1468,7 +1468,7 @@
+     if (cupsdCheckAuth(address, srcname, len, 1, &(Relays[i].from)))
+       if (sendto(BrowseSocket, packet, bytes, 0,
+                  (struct sockaddr *)&(Relays[i].to),
+-		 sizeof(http_addr_t)) <= 0)
++		 httpAddrLength(&(Relays[i].to))) <= 0)
+       {
+ 	cupsdLogMessage(CUPSD_LOG_ERROR,
+ 	                "cupsdUpdateCUPSBrowse: sendto failed for relay %d - %s.",
+@@ -1609,7 +1609,7 @@
+     if (!strchr(PollStatusBuffer->buffer, '\n'))
+       break;
+ 
+-  if (ptr == NULL)
++  if (ptr == NULL && errno)
+   {
+    /*
+     * All polling processes have died; stop polling...
+@@ -2566,7 +2566,7 @@
+ 
+ 	  sendto(BrowseSocket, packet, bytes, 0,
+ 		 (struct sockaddr *)&(iface->broadcast),
+-		 sizeof(struct sockaddr_in));
++		 httpAddrLength(&(iface->broadcast)));
+         }
+       }
+       else if ((iface = cupsdNetIFFind(b->iface)) != NULL)
+@@ -2607,7 +2607,7 @@
+ 
+ 	  sendto(BrowseSocket, packet, bytes, 0,
+ 		 (struct sockaddr *)&(iface->broadcast),
+-		 sizeof(struct sockaddr_in));
++		 httpAddrLength(&(iface->broadcast)));
+         }
+       }
+     }
+@@ -2628,7 +2628,7 @@
+ 
+       if (sendto(BrowseSocket, packet, bytes, 0,
+ 		 (struct sockaddr *)&(b->to),
+-		 sizeof(struct sockaddr_in)) <= 0)
++		 httpAddrLength(&(b->to))) <= 0)
+       {
+        /*
+         * Unable to send browse packet, so remove this address from the
+diff -urNad cupsys-1.2.2~/scheduler/job.c cupsys-1.2.2/scheduler/job.c
+--- cupsys-1.2.2~/scheduler/job.c	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/scheduler/job.c	2006-08-09 10:51:06.000000000 +0000
+@@ -1728,7 +1728,7 @@
+       break;
+   }
+ 
+-  if (ptr == NULL)
++  if (ptr == NULL && errno)
+   {
+    /*
+     * See if all of the filters and the backend have returned their
+@@ -3018,7 +3018,8 @@
+   envp[envc ++] = device_uri;
+   envp[envc ++] = printer_name;
+ 
+-  if ((filter = (mime_filter_t *)cupsArrayLast(filters)) != NULL)
++  if (!remote_job &&
++      (filter = (mime_filter_t *)cupsArrayLast(filters)) != NULL)
+   {
+     snprintf(final_content_type, sizeof(final_content_type),
+              "FINAL_CONTENT_TYPE=%s/%s",
+diff -urNad cupsys-1.2.2~/scheduler/mime.h cupsys-1.2.2/scheduler/mime.h
+--- cupsys-1.2.2~/scheduler/mime.h	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/scheduler/mime.h	2006-08-09 10:51:06.000000000 +0000
+@@ -34,9 +34,9 @@
+  * C++ magic...
+  */
+ 
+-#  ifdef _cplusplus
++#  ifdef __cplusplus
+ extern "C" {
+-#  endif /* _cplusplus */
++#  endif /* __cplusplus */
+ 
+ 
+ /*
+@@ -147,9 +147,9 @@
+ extern mime_filter_t	*mimeNextFilter(mime_t *mime);
+ extern int		mimeNumFilters(mime_t *mime);
+ 
+-#  ifdef _cplusplus
++#  ifdef __cplusplus
+ }
+-#  endif /* _cplusplus */
++#  endif /* __cplusplus */
+ #endif /* !_CUPS_MIME_H_ */
+ 
+ /*
+diff -urNad cupsys-1.2.2~/scheduler/statbuf.c cupsys-1.2.2/scheduler/statbuf.c
+--- cupsys-1.2.2~/scheduler/statbuf.c	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/scheduler/statbuf.c	2006-08-09 10:51:06.000000000 +0000
+@@ -141,6 +141,13 @@
+ 
+ 
+  /*
++  * Clear the errno variable since not all systems clear it after a
++  * successful read...
++  */
++
++  errno = 0;
++
++ /*
+   * Check if the buffer already contains a full line...
+   */
+ 
+@@ -172,6 +179,7 @@
+ 
+       *loglevel = CUPSD_LOG_NONE;
+       line[0]   = '\0';
++      errno     = 0;
+ 
+       return (line);
+     }
+diff -urNad cupsys-1.2.2~/systemv/cupstestppd.c cupsys-1.2.2/systemv/cupstestppd.c
+--- cupsys-1.2.2~/systemv/cupstestppd.c	2006-08-09 10:49:14.000000000 +0000
++++ cupsys-1.2.2/systemv/cupstestppd.c	2006-08-09 10:51:06.000000000 +0000
+@@ -306,9 +306,9 @@
+       * Look for default keywords with no matching option...
+       */
+ 
+-      for (i = 0; i < ppd->num_attrs; i ++)
++      for (j = 0; j < ppd->num_attrs; j ++)
+       {
+-	attr = ppd->attrs[i];
++	attr = ppd->attrs[j];
+ 
+         if (!strcmp(attr->name, "DefaultColorSpace") ||
+ 	    !strcmp(attr->name, "DefaultFont") ||
+@@ -327,11 +327,11 @@
+ 	    * Check that the default option value matches a choice...
+ 	    */
+ 
+-	    for (j = 0; j < option->num_choices; j ++)
+-	      if (!strcmp(option->choices[j].choice, attr->value))
++	    for (k = 0; k < option->num_choices; k ++)
++	      if (!strcmp(option->choices[k].choice, attr->value))
+ 	        break;
+ 
+-            if (j >= option->num_choices)
++            if (k >= option->num_choices)
+ 	    {
+ 	      if (verbose >= 0)
+ 	      {
+@@ -1184,9 +1184,10 @@
+ 	  if (!errors && !verbose)
+ 	    _cupsLangPuts(stdout, _(" FAIL\n"));
+ 
+-	  _cupsLangPuts(stdout,
+-	                _("      **FAIL**  1284DeviceId must be 1284DeviceID!\n"
+-			  "                REF: Page 72, section 5.5\n"));
++	  _cupsLangPrintf(stdout,
++	                  _("      **FAIL**  %s must be 1284DeviceID!\n"
++			    "                REF: Page 72, section 5.5\n"),
++			  attr->name);
+         }
+ 
+ 	errors ++;
+@@ -1205,9 +1206,9 @@
+ 	* Look for default keywords with no corresponding option...
+ 	*/
+ 
+-	for (i = 0; i < ppd->num_attrs; i ++)
++	for (j = 0; j < ppd->num_attrs; j ++)
+ 	{
+-	  attr = ppd->attrs[i];
++	  attr = ppd->attrs[j];
+ 
+           if (!strcmp(attr->name, "DefaultColorSpace") ||
+ 	      !strcmp(attr->name, "DefaultColorSep") ||

Modified: cupsys/branches/cups-1.2/debian/patches/00list
==============================================================================
--- cupsys/branches/cups-1.2/debian/patches/00list	(original)
+++ cupsys/branches/cups-1.2/debian/patches/00list	Wed Aug  9 11:01:59 2006
@@ -1,4 +1,4 @@
-#00_r5754.dpatch
+00_r5809.dpatch
 02_configure.dpatch
 #03_manext.dpatch
 03_clean.dpatch



More information about the Pkg-cups-devel mailing list