rpms/cups/devel cups-1.3.x.patch, NONE, 1.1 cups-lspp.patch, 1.28, 1.29 cups.spec, 1.384, 1.385 cups-str2650.patch, 1.1, NONE cups-str2664.patch, 1.1, NONE

Tim Waugh (twaugh) fedora-extras-commits at redhat.com
Tue Feb 5 15:37:37 UTC 2008


Author: twaugh

Update of /cvs/pkgs/rpms/cups/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31786

Modified Files:
	cups-lspp.patch cups.spec 
Added Files:
	cups-1.3.x.patch 
Removed Files:
	cups-str2650.patch cups-str2664.patch 
Log Message:
* Tue Feb  5 2008 Tim Waugh <twaugh at redhat.com> 1:1.3.5-4
- Include fixes from svn up to revision 7287.  No longer need str2650 or
  str2664 patches.


cups-1.3.x.patch:

--- NEW FILE cups-1.3.x.patch ---
diff -up cups-1.3.5/cgi-bin/template.c.1.3.x cups-1.3.5/cgi-bin/template.c
--- cups-1.3.5/cgi-bin/template.c.1.3.x	2007-08-15 20:33:36.000000000 +0100
+++ cups-1.3.5/cgi-bin/template.c	2008-02-05 15:08:55.000000000 +0000
@@ -3,7 +3,7 @@
  *
  *   CGI template function.
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -54,6 +54,13 @@ cgiCopyTemplateFile(FILE       *out,	/* 
           tmpl ? tmpl : "(null)");
 
  /*
+  * Range check input...
+  */
+
+  if (!tmpl || !out)
+    return;
+
+ /*
   * Open the template file...
   */
 
diff -up cups-1.3.5/cgi-bin/admin.c.1.3.x cups-1.3.5/cgi-bin/admin.c
--- cups-1.3.5/cgi-bin/admin.c.1.3.x	2007-11-30 07:00:59.000000000 +0000
+++ cups-1.3.5/cgi-bin/admin.c	2008-02-05 15:08:55.000000000 +0000
@@ -3,7 +3,7 @@
  *
  *   Administration CGI for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -1647,14 +1647,15 @@ do_config_server(http_t *http)		/* I - H
     * Allocate memory and load the file into a string buffer...
     */
 
-    buffer = calloc(1, info.st_size + 1);
+    if ((buffer = calloc(1, info.st_size + 1)) != NULL)
+    {
+      cupsFileRead(cupsd, buffer, info.st_size);
+      cgiSetVariable("CUPSDCONF", buffer);
+      free(buffer);
+    }
 
-    cupsFileRead(cupsd, buffer, info.st_size);
     cupsFileClose(cupsd);
 
-    cgiSetVariable("CUPSDCONF", buffer);
-    free(buffer);
-
    /*
     * Then get the default cupsd.conf file and put that into a string as
     * well...
@@ -1665,37 +1666,39 @@ do_config_server(http_t *http)		/* I - H
     if (!stat(filename, &info) && info.st_size < (1024 * 1024) &&
         (cupsd = cupsFileOpen(filename, "r")) != NULL)
     {
-      buffer = calloc(1, 2 * info.st_size + 1);
-      bufend = buffer + 2 * info.st_size - 1;
-
-      for (bufptr = buffer;
-           bufptr < bufend && (ch = cupsFileGetChar(cupsd)) != EOF;)
+      if ((buffer = calloc(1, 2 * info.st_size + 1)) != NULL)
       {
-        if (ch == '\\' || ch == '\"')
-	{
-	  *bufptr++ = '\\';
-	  *bufptr++ = ch;
-	}
-	else if (ch == '\n')
-	{
-	  *bufptr++ = '\\';
-	  *bufptr++ = 'n';
-	}
-	else if (ch == '\t')
+	bufend = buffer + 2 * info.st_size - 1;
+
+	for (bufptr = buffer;
+	     bufptr < bufend && (ch = cupsFileGetChar(cupsd)) != EOF;)
 	{
-	  *bufptr++ = '\\';
-	  *bufptr++ = 't';
+	  if (ch == '\\' || ch == '\"')
+	  {
+	    *bufptr++ = '\\';
+	    *bufptr++ = ch;
+	  }
+	  else if (ch == '\n')
+	  {
+	    *bufptr++ = '\\';
+	    *bufptr++ = 'n';
+	  }
+	  else if (ch == '\t')
+	  {
+	    *bufptr++ = '\\';
+	    *bufptr++ = 't';
+	  }
+	  else if (ch >= ' ')
+	    *bufptr++ = ch;
 	}
-	else if (ch >= ' ')
-	  *bufptr++ = ch;
-      }
 
-      *bufptr = '\0';
+	*bufptr = '\0';
 
-      cupsFileClose(cupsd);
+	cgiSetVariable("CUPSDCONF_DEFAULT", buffer);
+	free(buffer);
+      }
 
-      cgiSetVariable("CUPSDCONF_DEFAULT", buffer);
-      free(buffer);
+      cupsFileClose(cupsd);
     }
 
    /*
@@ -3084,7 +3087,7 @@ do_set_options(http_t *http,		/* I - HTT
     * Binary protocol support...
     */
 
-    if (ppd->protocols && strstr(ppd->protocols, "BCP"))
+    if (ppd && ppd->protocols && strstr(ppd->protocols, "BCP"))
     {
       protocol = ppdFindAttr(ppd, "cupsProtocol", NULL);
 
diff -up cups-1.3.5/cgi-bin/search.c.1.3.x cups-1.3.5/cgi-bin/search.c
--- cups-1.3.5/cgi-bin/search.c.1.3.x	2007-07-11 22:46:42.000000000 +0100
+++ cups-1.3.5/cgi-bin/search.c	2008-02-05 15:08:55.000000000 +0000
@@ -3,7 +3,7 @@
  *
  *   Search routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -53,7 +53,8 @@ cgiCompileSearch(const char *query)	/* I
   * Allocate a regular expression storage structure...
   */
 
-  re = (regex_t *)calloc(1, sizeof(regex_t));
+  if ((re = (regex_t *)calloc(1, sizeof(regex_t))) == NULL)
+    return (NULL);
 
  /*
   * Allocate a buffer to hold the regular expression string, starting
@@ -65,7 +66,11 @@ cgiCompileSearch(const char *query)	/* I
   if (slen < 1024)
     slen = 1024;
 
-  s = (char *)malloc(slen);
+  if ((s = (char *)malloc(slen)) == NULL)
+  {
+    free(re);
+    return (NULL);
+  }
 
  /*
   * Copy the query string to the regular expression, handling basic
@@ -227,7 +232,13 @@ cgiCompileSearch(const char *query)	/* I
         char *lword2;			/* New "last word" */
 
 
-        lword2 = strdup(sword);
+        if ((lword2 = strdup(sword)) == NULL)
+	{
+	  free(lword);
+	  free(s);
+	  free(re);
+	  return (NULL);
+	}
 
         strcpy(sptr, ".*|.*");
 	sptr += 5;
diff -up cups-1.3.5/cgi-bin/ipp-var.c.1.3.x cups-1.3.5/cgi-bin/ipp-var.c
--- cups-1.3.5/cgi-bin/ipp-var.c.1.3.x	2007-07-11 22:46:42.000000000 +0100
+++ cups-1.3.5/cgi-bin/ipp-var.c	2008-02-05 15:08:55.000000000 +0000
@@ -3,7 +3,7 @@
  *
  *   CGI <-> IPP variable routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -158,6 +158,8 @@ cgiGetAttributes(ipp_t      *request,	/*
     for (i = 0; i < num_attrs; i ++)
       free(attrs[i]);
   }
[...7591 lines suppressed...]
+	<li><tt>ribbonWax</tt></li>
+
+	<li><tt>wasteWax</tt></li>
+
+	<li><tt>fuser</tt></li>
+
+	<li><tt>coronaWire</tt></li>
+
+	<li><tt>fuserOilWick</tt></li>
+
+	<li><tt>cleanerUnit</tt></li>
+
+	<li><tt>fuserCleaningPad</tt></li>
+
+	<li><tt>transferUnit</tt></li>
+
+	<li><tt>tonerCartridge</tt></li>
+
+	<li><tt>fuserOiler</tt></li>
+
+	<li><tt>water</tt></li>
+
+	<li><tt>wasteWater</tt></li>
+
+	<li><tt>bindingSupply</tt></li>
+
+	<li><tt>bandingSupply</tt></li>
+
+	<li><tt>stichingWire</tt></li>
+
+	<li><tt>shrinkWrap</tt></li>
+
+	<li><tt>paperWrap</tt></li>
+
+	<li><tt>staples</tt></li>
+
+	<li><tt>inserts</tt></li>
+
+	<li><tt>covers</tt></li>
+
+</ul>
+
 <h4><a name="port-monitor">port-monitor" (name(127))</a></h4>
 
 <p>The port-monitor attribute specifies the port monitor to use when printing
diff -up cups-1.3.5/systemv/cupstestppd.c.1.3.x cups-1.3.5/systemv/cupstestppd.c
--- cups-1.3.5/systemv/cupstestppd.c.1.3.x	2007-11-27 00:09:24.000000000 +0000
+++ cups-1.3.5/systemv/cupstestppd.c	2008-02-05 15:08:55.000000000 +0000
@@ -3,7 +3,7 @@
  *
  *   PPD test program for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -2010,8 +2010,10 @@ check_translations(ppd_file_t *ppd,	/* I
     * This file contains localizations, check them...
     */
 
-    languages = strdup(attr->value);
-    langlist  = cupsArrayNew((cups_array_func_t)strcmp, NULL);
+    if ((languages = strdup(attr->value)) == NULL)
+      return (1);
+
+    langlist = cupsArrayNew((cups_array_func_t)strcmp, NULL);
 
     for (langptr = languages; *langptr;)
     {
diff -up cups-1.3.5/systemv/lpmove.c.1.3.x cups-1.3.5/systemv/lpmove.c
--- cups-1.3.5/systemv/lpmove.c.1.3.x	2007-11-27 00:09:24.000000000 +0000
+++ cups-1.3.5/systemv/lpmove.c	2008-02-05 15:08:55.000000000 +0000
@@ -61,7 +61,6 @@ main(int  argc,				/* I - Number of comm
 
   dest      = NULL;
   dests     = NULL;
-  http      = NULL;
   job       = NULL;
   jobid     = 0;
   num_dests = 0;
@@ -75,8 +74,6 @@ main(int  argc,				/* I - Number of comm
 #ifdef HAVE_SSL
 	    cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
 
-	    if (http)
-	      httpEncryption(http, HTTP_ENCRYPT_REQUIRED);
 #else
             _cupsLangPrintf(stderr,
 	                    _("%s: Sorry, no encryption support compiled in!\n"),
@@ -85,12 +82,6 @@ main(int  argc,				/* I - Number of comm
 	    break;
 
         case 'h' : /* Connect to host */
-	    if (http)
-	    {
-	      httpClose(http);
-	      http = NULL;
-	    }
-
 	    if (argv[i][2] != '\0')
 	      cupsSetServer(argv[i] + 2);
 	    else
@@ -142,17 +133,14 @@ main(int  argc,				/* I - Number of comm
     return (1);
   }
 
-  if (!http)
-  {
-    http = httpConnectEncrypt(cupsServer(), ippPort(), cupsEncryption());
+  http = httpConnectEncrypt(cupsServer(), ippPort(), cupsEncryption());
 
-    if (http == NULL)
-    {
-      _cupsLangPrintf(stderr,
-                      _("lpmove: Unable to connect to server: %s\n"),
-		      strerror(errno));
-      return (1);
-    }
+  if (http == NULL)
+  {
+    _cupsLangPrintf(stderr,
+		    _("lpmove: Unable to connect to server: %s\n"),
+		    strerror(errno));
+    return (1);
   }
 
   return (move_job(http, src, jobid, dest));
diff -up cups-1.3.5/systemv/accept.c.1.3.x cups-1.3.5/systemv/accept.c
--- cups-1.3.5/systemv/accept.c.1.3.x	2007-07-11 22:46:42.000000000 +0100
+++ cups-1.3.5/systemv/accept.c	2008-02-05 15:08:55.000000000 +0000
@@ -4,7 +4,7 @@
  *   "accept", "disable", "enable", and "reject" commands for the Common
  *   UNIX Printing System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -125,8 +125,11 @@ main(int  argc,				/* I - Number of comm
 	    break;
 
         case 'h' : /* Connect to host */
-	    if (http != NULL)
+	    if (http)
+	    {
 	      httpClose(http);
+	      http = NULL;
+	    }
 
 	    if (argv[i][2] != '\0')
 	      cupsSetServer(argv[i] + 2);
diff -up cups-1.3.5/README.txt.1.3.x cups-1.3.5/README.txt
--- cups-1.3.5/README.txt.1.3.x	2007-09-18 21:39:31.000000000 +0100
+++ cups-1.3.5/README.txt	2008-02-05 15:08:55.000000000 +0000
@@ -1,4 +1,4 @@
-README - CUPS v1.3.2 - 2007-09-18
+README - CUPS v1.3.6 - 2008-01-22
 ---------------------------------
 
 Looking for compile instructions?  Read the file "INSTALL.txt"
@@ -153,9 +153,9 @@ PRINTING FILES
 
 LEGAL STUFF
 
-    CUPS is Copyright 2007 by Apple Inc.  CUPS, the CUPS logo, and
-    the Common UNIX Printing System are the trademark property of
-    Apple Inc.
+    CUPS is Copyright 2007-2008 by Apple Inc.  CUPS, the CUPS logo,
+    and the Common UNIX Printing System are the trademark property
+    of Apple Inc.
 
     The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
 
diff -up cups-1.3.5/data/testprint.ps.1.3.x cups-1.3.5/data/testprint.ps
--- cups-1.3.5/data/testprint.ps.1.3.x	2007-07-11 22:46:42.000000000 +0100
+++ cups-1.3.5/data/testprint.ps	2008-02-05 15:08:55.000000000 +0000
@@ -14,7 +14,7 @@
 %
 %   PostScript test page for the Common UNIX Printing System ("CUPS").
 %
-%   Copyright 2007 Apple Inc.
+%   Copyright 2007-2008 Apple Inc.
 %   Copyright 1993-2007 Easy Software Products
 %
 %   These coded instructions, statements, and computer programs are the
@@ -573,10 +573,10 @@ gsave
   pageHeight 8 mul			% Move down...
   2 copy moveto				% Position text
   smallFont setfont			% Font
-  (Copyright 2007 Apple Inc., All Rights Reserved. CUPS and the CUPS logo are the trademark) show
+  (Copyright 2007-2008 Apple Inc., All Rights Reserved. CUPS and the CUPS logo are the) show
   pageHeight 2 add sub			% Move down...
   2 copy moveto				% Position text
-  (property of Apple Inc., 1 Infinite Loop, Cupertino, CA 95014, USA.) show
+  (trademark property of Apple Inc., 1 Infinite Loop, Cupertino, CA 95014, USA.) show
   pageHeight 2 mul 4 add sub		% Move down...
   moveto				% Position text
   (Need help? Contact your operating system vendor or visit "http://www.cups.org/".) show

cups-lspp.patch:

Index: cups-lspp.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups-lspp.patch,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- cups-lspp.patch	13 Nov 2007 14:53:32 -0000	1.28
+++ cups-lspp.patch	5 Feb 2008 15:37:24 -0000	1.29
@@ -1297,7 +1297,7 @@
 +	    {
 +	      if (getfilecon(con->filename, &spoolcon) == -1)
 +	      {
-+		cupsdSendError(con, HTTP_SERVER_ERROR, AUTH_NONE);
++		cupsdSendError(con, HTTP_SERVER_ERROR, CUPSD_AUTH_NONE);
 +		return (cupsdCloseClient(con));
 +	      }
 +	      clicon = context_new(con->scon);
@@ -1305,7 +1305,7 @@
 +	      freecon(spoolcon);
 +	      if (!clicon || !tmpcon)
 +	      {
-+		cupsdSendError(con, HTTP_SERVER_ERROR, AUTH_NONE);
++		cupsdSendError(con, HTTP_SERVER_ERROR, CUPSD_AUTH_NONE);
 +		if (clicon)
 +		  context_free(clicon);
 +		if (tmpcon)
@@ -1320,7 +1320,7 @@
 +		{
 +		  if (context_range_set(tmpcon, cliclearance) == -1)
 +		  {
-+		    cupsdSendError(con, HTTP_SERVER_ERROR, AUTH_NONE);
++		    cupsdSendError(con, HTTP_SERVER_ERROR, CUPSD_AUTH_NONE);
 +		    free(clirange);
 +		    context_free(tmpcon);
 +		    context_free(clicon);
@@ -1331,7 +1331,7 @@
 +		{
 +		  if (context_range_set(tmpcon, (context_range_get(clicon))) == -1)
 +		  {
-+		    cupsdSendError(con, HTTP_SERVER_ERROR, AUTH_NONE);
++		    cupsdSendError(con, HTTP_SERVER_ERROR, CUPSD_AUTH_NONE);
 +		    free(clirange);
 +		    context_free(tmpcon);
 +		    context_free(clicon);
@@ -1342,7 +1342,7 @@
 +	      }
 +	      if (setfilecon(con->filename, context_str(tmpcon)) == -1)
 +	      {
-+		cupsdSendError(con, HTTP_SERVER_ERROR, AUTH_NONE);
++		cupsdSendError(con, HTTP_SERVER_ERROR, CUPSD_AUTH_NONE);
 +		context_free(tmpcon);
 +		context_free(clicon);
 +		return (cupsdCloseClient(con));


Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups.spec,v
retrieving revision 1.384
retrieving revision 1.385
diff -u -r1.384 -r1.385
--- cups.spec	1 Feb 2008 13:33:44 -0000	1.384
+++ cups.spec	5 Feb 2008 15:37:24 -0000	1.385
@@ -6,7 +6,7 @@
 Summary: Common Unix Printing System
 Name: cups
 Version: 1.3.5
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv2
 Group: System Environment/Daemons
 Source: ftp://ftp.easysw.com/pub/cups/test//cups-%{version}-source.tar.bz2
@@ -24,6 +24,7 @@
 Source13: pdftops.conf
 Source14: textonly.filter
 Source15: textonly.ppd
+Patch0: cups-1.3.x.patch
 Patch1: cups-1.1.15-initscript.patch
 Patch2: cups-no-gzip-man.patch
 Patch3: cups-1.1.16-system-auth.patch
@@ -40,12 +41,10 @@
 Patch14: cups-lpr-help.patch
 Patch16: cups-pid.patch
 Patch17: cups-foomatic-recommended.patch
-Patch18: cups-str2650.patch
 Patch19: cups-eggcups.patch
 Patch20: cups-getpass.patch
 Patch21: cups-driverd-timeout.patch
 Patch22: cups-strict-ppd-line-length.patch
-Patch23: cups-str2664.patch
 Patch25: cups-usb-paperout.patch
 Patch100: cups-lspp.patch
 Epoch: 1
@@ -138,6 +137,7 @@
 
 %prep
 %setup -q -n %{name}-%{version}
+%patch0 -p1 -b .1.3.x
 %patch1 -p1 -b .noinit
 %patch2 -p1 -b .no-gzip-man
 %patch3 -p1 -b .system-auth
@@ -154,12 +154,10 @@
 %patch14 -p1 -b .lpr-help
 %patch16 -p1 -b .pid
 %patch17 -p1 -b .foomatic-recommended
-%patch18 -p1 -b .str2650
 %patch19 -p1 -b .eggcups
 %patch20 -p1 -b .getpass
 %patch21 -p1 -b .driverd-timeout
 %patch22 -p1 -b .strict-ppd-line-length
-%patch23 -p1 -b .str2664
 %patch25 -p1 -b .usb-paperout
 
 %if %lspp
@@ -452,6 +450,10 @@
 %{cups_serverbin}/daemon/cups-lpd
 
 %changelog
+* Tue Feb  5 2008 Tim Waugh <twaugh at redhat.com> 1:1.3.5-4
+- Include fixes from svn up to revision 7287.  No longer need str2650 or
+  str2664 patches.
+
 * Fri Feb  1 2008 Tim Waugh <twaugh at redhat.com>
 - Updated initscript for LSB exit codes and actions (bug #246897).
 


--- cups-str2650.patch DELETED ---


--- cups-str2664.patch DELETED ---




More information about the fedora-extras-commits mailing list