packages: cups/cups-branch.diff, cups/cups.spec 1.4.1
arekm
arekm at pld-linux.org
Sat Sep 12 19:20:16 CEST 2009
Author: arekm Date: Sat Sep 12 17:20:16 2009 GMT
Module: packages Tag: HEAD
---- Log message:
1.4.1
---- Files affected:
packages/cups:
cups-branch.diff (1.1 -> 1.2) , cups.spec (1.267 -> 1.268)
---- Diffs:
================================================================
Index: packages/cups/cups-branch.diff
diff -u packages/cups/cups-branch.diff:1.1 packages/cups/cups-branch.diff:1.2
--- packages/cups/cups-branch.diff:1.1 Sun Sep 6 13:26:02 2009
+++ packages/cups/cups-branch.diff Sat Sep 12 19:20:11 2009
@@ -1,1436 +0,0 @@
-Index: conf/cupsd.conf.in
-===================================================================
---- conf/cupsd.conf.in (.../tags/release-1.4.0) (wersja 8809)
-+++ conf/cupsd.conf.in (.../branches/branch-1.4) (wersja 8809)
-@@ -1,9 +1,8 @@
- #
- # "$Id$"
- #
--# Sample configuration file for the Common UNIX Printing System (CUPS)
--# scheduler. See "man cupsd.conf" for a complete description of this
--# file.
-+# Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a
-+# complete description of this file.
- #
-
- # Log general information in error_log - change "@CUPS_LOG_LEVEL@" to "debug"
-Index: conf/mime.types
-===================================================================
---- conf/mime.types (.../tags/release-1.4.0) (wersja 8809)
-+++ conf/mime.types (.../branches/branch-1.4) (wersja 8809)
-@@ -95,7 +95,7 @@
-
- image/gif gif string(0,GIF87a) string(0,GIF89a)
- image/png png string(0,<89>PNG)
--image/jpeg jpeg jpg jpe string(0,<FFD8FF>) &&\
-+image/jpeg jpeg jpg jpe string(0,<FFD8FF>) +\
- (char(3,0xe0) char(3,0xe1) char(3,0xe2) char(3,0xe3)\
- char(3,0xe4) char(3,0xe5) char(3,0xe6) char(3,0xe7)\
- char(3,0xe8) char(3,0xe9) char(3,0xea) char(3,0xeb)\
-@@ -114,7 +114,7 @@
-
- #image/fpx fpx
- image/x-alias pix short(8,8) short(8,24)
--image/x-bitmap bmp string(0,BM) && !printable(2,14)
-+image/x-bitmap bmp string(0,BM) + !printable(2,14)
- image/x-icon ico
-
- ########################################################################
-Index: backend/runloop.c
-===================================================================
---- backend/runloop.c (.../tags/release-1.4.0) (wersja 8809)
-+++ backend/runloop.c (.../branches/branch-1.4) (wersja 8809)
-@@ -147,7 +147,7 @@
- int snmp_fd, /* I - SNMP socket or -1 if none */
- http_addr_t *addr, /* I - Address of device */
- int use_bc, /* I - Use back-channel? */
-- void (*side_cb)(int, int, int, http_addr_t *, int))
-+ int (*side_cb)(int, int, int, http_addr_t *, int))
- /* I - Side-channel callback */
- {
- int nfds; /* Maximum file descriptor value + 1 */
-@@ -274,7 +274,8 @@
- * loop since it may have read from print_fd...
- */
-
-- (*side_cb)(print_fd, device_fd, snmp_fd, addr, use_bc);
-+ if ((*side_cb)(print_fd, device_fd, snmp_fd, addr, use_bc))
-+ side_cb = NULL;
- continue;
- }
-
-Index: backend/backend-private.h
-===================================================================
---- backend/backend-private.h (.../tags/release-1.4.0) (wersja 8809)
-+++ backend/backend-private.h (.../branches/branch-1.4) (wersja 8809)
-@@ -276,16 +276,16 @@
- extern int backendGetMakeModel(const char *device_id,
- char *make_model,
- int make_model_size);
--extern void backendNetworkSideCB(int print_fd, int device_fd,
-+extern int backendNetworkSideCB(int print_fd, int device_fd,
- int snmp_fd, http_addr_t *addr,
- int use_bc);
- extern ssize_t backendRunLoop(int print_fd, int device_fd, int snmp_fd,
- http_addr_t *addr, int use_bc,
-- void (*side_cb)(int print_fd,
-- int device_fd,
-- int snmp_fd,
-- http_addr_t *addr,
-- int use_bc));
-+ int (*side_cb)(int print_fd,
-+ int device_fd,
-+ int snmp_fd,
-+ http_addr_t *addr,
-+ int use_bc));
- extern int backendSNMPSupplies(int snmp_fd, http_addr_t *addr,
- int *page_count,
- int *printer_state);
-Index: backend/usb-libusb.c
-===================================================================
---- backend/usb-libusb.c (.../tags/release-1.4.0) (wersja 8809)
-+++ backend/usb-libusb.c (.../branches/branch-1.4) (wersja 8809)
-@@ -179,7 +179,12 @@
- }
-
- if (pfds[1].revents & POLLIN)
-- tbytes += side_cb(printer, print_fd);
-+ {
-+ if ((bytes = side_cb(printer, print_fd)) < 0)
-+ pfds[1].events = 0; /* Filter has gone away... */
-+ else
-+ tbytes += bytes;
-+ }
- }
- }
-
-@@ -745,10 +750,7 @@
- datalen = sizeof(data);
-
- if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
-- {
-- _cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
-- return (0);
-- }
-+ return (-1);
-
- switch (command)
- {
-Index: backend/usb-unix.c
-===================================================================
---- backend/usb-unix.c (.../tags/release-1.4.0) (wersja 8809)
-+++ backend/usb-unix.c (.../branches/branch-1.4) (wersja 8809)
-@@ -36,7 +36,7 @@
- */
-
- static int open_device(const char *uri, int *use_bc);
--static void side_cb(int print_fd, int device_fd, int snmp_fd,
-+static int side_cb(int print_fd, int device_fd, int snmp_fd,
- http_addr_t *addr, int use_bc);
-
-
-@@ -579,10 +579,7 @@
- datalen = sizeof(data);
-
- if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
-- {
-- _cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
-- return;
-- }
-+ return (-1);
-
- switch (command)
- {
-@@ -625,7 +622,7 @@
- break;
- }
-
-- cupsSideChannelWrite(command, status, data, datalen, 1.0);
-+ return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
- }
-
-
-Index: backend/usb-darwin.c
-===================================================================
---- backend/usb-darwin.c (.../tags/release-1.4.0) (wersja 8809)
-+++ backend/usb-darwin.c (.../branches/branch-1.4) (wersja 8809)
-@@ -292,9 +292,8 @@
- #if defined(__i386__) || defined(__x86_64__)
- static pid_t child_pid; /* Child PID */
- static void run_legacy_backend(int argc, char *argv[], int fd); /* Starts child backend process running as a ppc executable */
--#endif /* __i386__ || __x86_64__ */
--static int job_canceled = 0; /* Was the job canceled? */
- static void sigterm_handler(int sig); /* SIGTERM handler */
-+#endif /* __i386__ || __x86_64__ */
-
- #ifdef PARSE_PS_ERRORS
- static const char *next_line (const char *buffer);
-@@ -461,9 +460,9 @@
- fputs("STATE: -connecting-to-device\n", stderr);
-
- /*
-- * Now that we are "connected" to the port, catch SIGTERM so that we
-+ * Now that we are "connected" to the port, ignore SIGTERM so that we
- * can finish out any page data the driver sends (e.g. to eject the
-- * current page... Only catch SIGTERM if we are printing data from
-+ * current page... Only ignore SIGTERM if we are printing data from
- * stdin (otherwise you can't cancel raw jobs...)
- */
-
-@@ -475,7 +474,7 @@
- memset(&action, 0, sizeof(action));
-
- sigemptyset(&action.sa_mask);
-- action.sa_handler = sigterm_handler;
-+ action.sa_handler = SIG_IGN;
- sigaction(SIGTERM, &action, NULL);
- }
-
-@@ -725,7 +724,7 @@
- fprintf(stderr, "DEBUG: USB class driver Abort returned %x\n",
- err);
-
-- status = job_canceled ? CUPS_BACKEND_FAILED : CUPS_BACKEND_STOP;
-+ status = CUPS_BACKEND_FAILED;
- break;
- }
- else if (bytes > 0)
-@@ -944,7 +943,7 @@
- datalen = sizeof(data);
-
- if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
-- continue;
-+ break;
-
- switch (command)
- {
-@@ -2020,9 +2019,7 @@
-
- exit(exitstatus);
- }
--#endif /* __i386__ || __x86_64__ */
-
--
- /*
- * 'sigterm_handler()' - SIGTERM handler.
- */
-@@ -2030,7 +2027,8 @@
- static void
- sigterm_handler(int sig) /* I - Signal */
- {
--#if defined(__i386__) || defined(__x86_64__)
-+ /* If we started a child process pass the signal on to it...
-+ */
- if (child_pid)
- {
- /*
-@@ -2052,16 +2050,11 @@
- exit(CUPS_BACKEND_STOP);
- }
- }
--#endif /* __i386__ || __x86_64__ */
--
-- /*
-- * Otherwise just flag that the job has been canceled...
-- */
--
-- job_canceled = 1;
- }
-
-+#endif /* __i386__ || __x86_64__ */
-
-+
- #ifdef PARSE_PS_ERRORS
- /*
- * 'next_line()' - Find the next line in a buffer.
-Index: backend/serial.c
-===================================================================
---- backend/serial.c (.../tags/release-1.4.0) (wersja 8809)
-+++ backend/serial.c (.../branches/branch-1.4) (wersja 8809)
-@@ -84,7 +84,7 @@
- */
-
- static void list_devices(void);
--static void side_cb(int print_fd, int device_fd, int use_bc);
-+static int side_cb(int print_fd, int device_fd, int use_bc);
-
-
- /*
-@@ -109,7 +109,8 @@
- sep; /* Option separator */
- int port; /* Port number (not used) */
- int copies; /* Number of copies to print */
-- int print_fd, /* Print file */
-+ int side_eof = 0, /* Saw EOF on side-channel? */
-+ print_fd, /* Print file */
- device_fd; /* Serial device */
- int nfds; /* Maximum file descriptor value + 1 */
- fd_set input, /* Input set for reading */
-@@ -558,7 +559,7 @@
- if (!print_bytes)
- FD_SET(print_fd, &input);
- FD_SET(device_fd, &input);
-- if (!print_bytes)
-+ if (!print_bytes && !side_eof)
- FD_SET(CUPS_SC_FD, &input);
-
- FD_ZERO(&output);
-@@ -579,7 +580,8 @@
- * loop since it may have read from print_fd...
- */
-
-- side_cb(print_fd, device_fd, 1);
-+ if (side_cb(print_fd, device_fd, 1))
-+ side_eof = 1;
- continue;
- }
-
-@@ -1278,7 +1280,7 @@
- * 'side_cb()' - Handle side-channel requests...
- */
-
--static void
-+static int /* O - 0 on success, -1 on error */
- side_cb(int print_fd, /* I - Print file */
- int device_fd, /* I - Device file */
- int use_bc) /* I - Using back-channel? */
-@@ -1292,11 +1294,7 @@
- datalen = sizeof(data);
-
- if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
-- {
-- _cupsLangPuts(stderr,
-- _("WARNING: Failed to read side-channel request!\n"));
-- return;
-- }
-+ return (-1);
-
- switch (command)
- {
-@@ -1323,7 +1321,7 @@
- break;
- }
-
-- cupsSideChannelWrite(command, status, data, datalen, 1.0);
-+ return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
- }
-
-
-Index: backend/snmp-supplies.c
-===================================================================
---- backend/snmp-supplies.c (.../tags/release-1.4.0) (wersja 8809)
-+++ backend/snmp-supplies.c (.../branches/branch-1.4) (wersja 8809)
-@@ -229,8 +229,11 @@
- packet.object_type != CUPS_ASN1_OCTET_STRING)
- return (-1);
-
-- new_state = (packet.object_value.string.bytes[0] << 8) |
-- packet.object_value.string.bytes[1];
-+ if (packet.object_value.string.num_bytes == 2)
-+ new_state = (packet.object_value.string.bytes[0] << 8) |
-+ packet.object_value.string.bytes[1];
-+ else
-+ new_state = 0;
-
- if (current_state < 0)
- change_state = 0xffff;
-Index: backend/pap.c
-===================================================================
---- backend/pap.c (.../tags/release-1.4.0) (wersja 8809)
-+++ backend/pap.c (.../branches/branch-1.4) (wersja 8809)
-@@ -1278,7 +1278,7 @@
- * 'sidechannel_request()' - Handle side-channel requests.
- */
-
--static void
-+static int
- sidechannel_request()
- {
- cups_sc_command_t command; /* Request command */
-@@ -1289,32 +1289,29 @@
- datalen = sizeof(data);
-
- if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
-- {
-- fputs(_("WARNING: Failed to read side-channel request!\n"), stderr);
-- return;
-- }
-+ return (-1);
-
- switch (command)
- {
- case CUPS_SC_CMD_GET_BIDI: /* Is the connection bidirectional? */
- data[0] = 1;
-- cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0);
-+ return (cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0));
- break;
-
- case CUPS_SC_CMD_GET_STATE: /* Return device state */
- data[0] = CUPS_SC_STATE_ONLINE;
-- cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0);
-+ return (cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0));
- break;
-
- case CUPS_SC_CMD_DRAIN_OUTPUT: /* Drain all pending output */
- case CUPS_SC_CMD_SOFT_RESET: /* Do a soft reset */
- case CUPS_SC_CMD_GET_DEVICE_ID: /* Return IEEE-1284 device ID */
- default:
-- cupsSideChannelWrite(command, CUPS_SC_STATUS_NOT_IMPLEMENTED,
-- NULL, 0, 1.0);
-+ return (cupsSideChannelWrite(command, CUPS_SC_STATUS_NOT_IMPLEMENTED,
-+ NULL, 0, 1.0));
- break;
- }
-- return;
-+ return (0);
- }
-
-
-Index: backend/ipp.c
-===================================================================
---- backend/ipp.c (.../tags/release-1.4.0) (wersja 8809)
-+++ backend/ipp.c (.../branches/branch-1.4) (wersja 8809)
-@@ -45,6 +45,8 @@
-
- static char *password = NULL; /* Password for device URI */
- static int password_tries = 0; /* Password tries */
-+static const char *auth_info_required = "none";
-+ /* New auth-info-required value */
- #ifdef __APPLE__
- static char pstmpname[1024] = ""; /* Temporary PostScript file name */
- #endif /* __APPLE__ */
-@@ -1049,16 +1051,21 @@
- _cupsLangPrintf(stderr, _("ERROR: Print file was not accepted (%s)!\n"),
- cupsLastErrorString());
-
-- if (ipp_status == IPP_NOT_AUTHORIZED)
-+ if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN)
- {
- fprintf(stderr, "DEBUG: WWW-Authenticate=\"%s\"\n",
- httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE));
-
-+ /*
-+ * Normal authentication goes through the password callback, which sets
-+ * auth_info_required to "username,password". Kerberos goes directly
-+ * through GSSAPI, so look for Negotiate in the WWW-Authenticate header
-+ * here and set auth_info_required as needed...
-+ */
-+
- if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE),
- "Negotiate", 9))
-- fputs("ATTR: auth-info-required=negotiate\n", stderr);
-- else
-- fputs("ATTR: auth-info-required=username,password\n", stderr);
-+ auth_info_required = "negotiate";
- }
- }
- }
-@@ -1239,6 +1246,19 @@
- break;
- }
- }
-+ else
-+ {
-+ /*
-+ * If the printer does not return a job-state attribute, it does not
-+ * conform to the IPP specification - break out immediately and fail
-+ * the job...
-+ */
-+
-+ fputs("DEBUG: No job-state available from printer - stopping queue.\n",
-+ stderr);
-+ ipp_status = IPP_INTERNAL_ERROR;
-+ break;
-+ }
- }
-
- ippDelete(response);
-@@ -1283,7 +1303,16 @@
- page_count > start_count)
- fprintf(stderr, "PAGE: total %d\n", page_count - start_count);
-
-+#ifdef HAVE_GSSAPI
- /*
-+ * See if we used Kerberos at all...
-+ */
-+
-+ if (http->gssctx)
-+ auth_info_required = "negotiate";
-+#endif /* HAVE_GSSAPI */
-+
-+ /*
- * Free memory...
- */
-
-@@ -1315,8 +1344,12 @@
- * Return the queue status...
- */
-
-- if (ipp_status == IPP_NOT_AUTHORIZED)
-+ fprintf(stderr, "ATTR: auth-info-required=%s\n", auth_info_required);
-+
-+ if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN)
- return (CUPS_BACKEND_AUTH_REQUIRED);
-+ else if (ipp_status == IPP_INTERNAL_ERROR)
-+ return (CUPS_BACKEND_STOP);
- else if (ipp_status > IPP_OK_CONFLICT)
- return (CUPS_BACKEND_FAILED);
- else
-@@ -1517,6 +1550,12 @@
- {
- (void)prompt;
-
-+ /*
-+ * Remember that we need to authenticate...
-+ */
-+
-+ auth_info_required = "username,password";
-+
- if (password && *password && password_tries < 3)
- {
- password_tries ++;
-@@ -1526,23 +1565,10 @@
- else
- {
- /*
-- * If there is no password set in the device URI, return the
-- * "authentication required" exit code...
-+ * Give up after 3 tries or if we don't have a password to begin with...
- */
-
-- if (tmpfilename[0])
-- unlink(tmpfilename);
--
--#ifdef __APPLE__
-- if (pstmpname[0])
-- unlink(pstmpname);
--#endif /* __APPLE__ */
--
-- fputs("ATTR: auth-info-required=username,password\n", stderr);
--
-- exit(CUPS_BACKEND_AUTH_REQUIRED);
--
-- return (NULL); /* Eliminate compiler warning */
-+ return (NULL);
- }
- }
-
-Index: backend/network.c
-===================================================================
---- backend/network.c (.../tags/release-1.4.0) (wersja 8809)
-+++ backend/network.c (.../branches/branch-1.4) (wersja 8809)
-@@ -61,7 +61,7 @@
- * 'backendNetworkSideCB()' - Handle common network side-channel commands.
- */
-
--void
-+int /* O - -1 on error, 0 on success */
- backendNetworkSideCB(
- int print_fd, /* I - Print file or -1 */
- int device_fd, /* I - Device file or -1 */
-@@ -79,10 +79,7 @@
- datalen = sizeof(data);
-
- if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
-- {
-- _cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
-- return;
-- }
-+ return (-1);
-
- switch (command)
- {
-@@ -284,7 +281,7 @@
- break;
- }
-
-- cupsSideChannelWrite(command, status, data, datalen, 1.0);
-+ return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
- }
-
-
-Index: backend/parallel.c
-===================================================================
---- backend/parallel.c (.../tags/release-1.4.0) (wersja 8809)
-+++ backend/parallel.c (.../branches/branch-1.4) (wersja 8809)
-@@ -59,7 +59,7 @@
- */
-
- static void list_devices(void);
--static void side_cb(int print_fd, int device_fd, int snmp_fd,
-+static int side_cb(int print_fd, int device_fd, int snmp_fd,
- http_addr_t *addr, int use_bc);
-
-
-@@ -615,7 +615,7 @@
- * 'side_cb()' - Handle side-channel requests...
- */
-
--static void
-+static int /* O - 0 on success, -1 on error */
- side_cb(int print_fd, /* I - Print file */
- int device_fd, /* I - Device file */
- int snmp_fd, /* I - SNMP socket (unused) */
-@@ -634,10 +634,7 @@
- datalen = sizeof(data);
-
- if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
-- {
-- _cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
-- return;
-- }
-+ return (-1);
-
- switch (command)
- {
-@@ -680,7 +677,7 @@
- break;
- }
-
-- cupsSideChannelWrite(command, status, data, datalen, 1.0);
-+ return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cups/cups-branch.diff?r1=1.1&r2=1.2&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cups/cups.spec?r1=1.267&r2=1.268&f=u
More information about the pld-cvs-commit
mailing list