rpms/cups/devel cups-eggcups.patch, 1.6, 1.7 cups-lspp.patch, 1.21, 1.22 cups-paps.patch, 1.2, 1.3 cups-serverbin-compat.patch, 1.2, 1.3 cups-usb-paperout.patch, 1.3, 1.4 cups.spec, 1.342, 1.343 cups-af_unix-auth.patch, 1.1, NONE cups-directed-broadcast.patch, 1.3, NONE cups-relro.patch, 1.6, NONE cups-str2109.patch, 1.1, NONE

Tim Waugh (twaugh) fedora-extras-commits at redhat.com
Wed Jul 18 11:50:05 UTC 2007


Author: twaugh

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

Modified Files:
	cups-eggcups.patch cups-lspp.patch cups-paps.patch 
	cups-serverbin-compat.patch cups-usb-paperout.patch cups.spec 
Removed Files:
	cups-af_unix-auth.patch cups-directed-broadcast.patch 
	cups-relro.patch cups-str2109.patch 
Log Message:
* Wed Jul 18 2007 Tim Waugh <twaugh at redhat.com> 1:1.3-0.b1.1
- 1.3b1.  No longer need relro, directed-broadcast, af_unix-auth, or
  str2109 patches.


cups-eggcups.patch:

Index: cups-eggcups.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups-eggcups.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- cups-eggcups.patch	13 Jun 2007 16:15:27 -0000	1.6
+++ cups-eggcups.patch	18 Jul 2007 11:50:02 -0000	1.7
@@ -1,8 +1,8 @@
---- cups-1.2.11/backend/ipp.c.eggcups	2007-04-30 18:18:21.000000000 +0100
-+++ cups-1.2.11/backend/ipp.c	2007-06-13 16:47:06.000000000 +0100
-@@ -54,6 +54,70 @@
- #include <signal.h>
- #include <sys/wait.h>
+--- cups-1.3b1/backend/ipp.c.eggcups	2007-07-11 22:46:42.000000000 +0100
++++ cups-1.3b1/backend/ipp.c	2007-07-18 11:34:16.000000000 +0100
+@@ -57,6 +57,70 @@
+ static char	tmpfilename[1024] = "";	/* Temporary spool file name */
+ static int	job_cancelled = 0;	/* Job cancelled? */
  
 +#if HAVE_DBUS
 +#include <dbus/dbus.h>
@@ -70,9 +70,9 @@
 +#endif /* HAVE_DBUS */
  
  /*
-  * Globals...
-@@ -955,6 +1019,15 @@
-       fprintf(stderr, "NOTICE: Print file accepted - job ID %d.\n", job_id);
+  * Local functions...
+@@ -974,6 +1038,15 @@
+       fprintf(stderr, _("NOTICE: Print file accepted - job ID %d.\n"), job_id);
      }
  
 +#if HAVE_DBUS
@@ -87,48 +87,20 @@
      ippDelete(response);
  
      if (job_cancelled)
---- cups-1.2.11/backend/Makefile.eggcups	2006-10-23 01:26:52.000000000 +0100
-+++ cups-1.2.11/backend/Makefile	2007-06-13 16:47:06.000000000 +0100
-@@ -134,7 +134,7 @@
+--- cups-1.3b1/backend/Makefile.eggcups	2007-07-11 22:46:42.000000000 +0100
++++ cups-1.3b1/backend/Makefile	2007-07-18 11:36:35.000000000 +0100
+@@ -131,7 +131,7 @@
  
  ipp:	ipp.o ../cups/$(LIBCUPS)
  	echo Linking $@...
 -	$(CC) $(LDFLAGS) -o ipp ipp.o $(LIBS)
-+	$(CC) $(LDFLAGS) -o ipp ipp.o $(LIBS) $(DBUSLIBS)
++	$(CC) $(LDFLAGS) -o ipp ipp.o $(LIBS) $(CUPSDLIBS)
  	$(RM) http
  	$(LN) ipp http
  
---- cups-1.2.11/config-scripts/cups-common.m4.eggcups	2007-05-08 22:11:23.000000000 +0100
-+++ cups-1.2.11/config-scripts/cups-common.m4	2007-06-13 16:47:06.000000000 +0100
-@@ -188,6 +188,7 @@
- dnl Extra platform-specific libraries...
- BACKLIBS=""
- CUPSDLIBS=""
-+DBUSLIBS=""
- DBUSDIR=""
- 
- AC_ARG_ENABLE(dbus, [  --enable-dbus           enable DBUS support, default=auto])
-@@ -231,7 +232,8 @@
- 					AC_MSG_RESULT(yes)
- 					AC_DEFINE(HAVE_DBUS)
- 					CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
--					CUPSDLIBS="`$PKGCONFIG --libs dbus-1`"
-+					DBUSLIBS="`$PKGCONFIG --libs dbus-1`"
-+					CUPSDLIBS="$DBUSLIBS"
- 					DBUSDIR="/etc/dbus-1/system.d"
- 					AC_CHECK_LIB(dbus-1,
- 					    dbus_message_iter_init_append,
-@@ -253,6 +255,7 @@
- 
- AC_SUBST(BACKLIBS)
- AC_SUBST(CUPSDLIBS)
-+AC_SUBST(DBUSLIBS)
- AC_SUBST(DBUSDIR)
- 
- dnl New default port definition for IPP...
---- cups-1.2.11/scheduler/subscriptions.c.eggcups	2007-04-10 19:24:19.000000000 +0100
-+++ cups-1.2.11/scheduler/subscriptions.c	2007-06-13 16:48:10.000000000 +0100
-@@ -1321,13 +1321,13 @@
+--- cups-1.3b1/scheduler/subscriptions.c.eggcups	2007-07-11 22:46:42.000000000 +0100
++++ cups-1.3b1/scheduler/subscriptions.c	2007-07-18 11:34:16.000000000 +0100
+@@ -1292,13 +1292,13 @@
      what = "PrinterAdded";
    else if (event & CUPSD_EVENT_PRINTER_DELETED)
      what = "PrinterRemoved";
@@ -144,7 +116,7 @@
    else
      return;
  
-@@ -1363,7 +1363,7 @@
+@@ -1334,7 +1334,7 @@
    dbus_message_append_iter_init(message, &iter);
    if (dest)
      dbus_message_iter_append_string(&iter, dest->name);
@@ -153,13 +125,3 @@
    {
      dbus_message_iter_append_uint32(&iter, job->id);
      dbus_message_iter_append_string(&iter, job->username);
---- cups-1.2.11/Makedefs.in.eggcups	2007-06-13 16:47:06.000000000 +0100
-+++ cups-1.2.11/Makedefs.in	2007-06-13 16:47:06.000000000 +0100
-@@ -124,6 +124,7 @@
- 			@LARGEFILE@ @PTHREAD_FLAGS@ $(OPTIONS)
- COMMONLIBS	=	@LIBS@
- CUPSDLIBS	=	@CUPSDLIBS@
-+DBUSLIBS	=	@DBUSLIBS@
- CXXFLAGS	=	-I.. $(SSLFLAGS) @CPPFLAGS@ @CXXFLAGS@ \
- 			@LARGEFILE@ @PTHREAD_FLAGS@ $(OPTIONS)
- CXXLIBS		=	@CXXLIBS@

cups-lspp.patch:

Index: cups-lspp.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups-lspp.patch,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- cups-lspp.patch	29 Mar 2007 10:30:29 -0000	1.21
+++ cups-lspp.patch	18 Jul 2007 11:50:02 -0000	1.22
@@ -1,25 +1,5 @@
---- cups-1.2.8/Makedefs.in.lspp	2007-03-02 14:06:43.000000000 +0000
-+++ cups-1.2.8/Makedefs.in	2007-03-02 14:06:46.000000000 +0000
-@@ -136,7 +136,7 @@
- 			@LDFLAGS@ @RELROFLAG@ @PIEFLAGS@ $(OPTIM)
- LINKCUPS	=	@LINKCUPS@ $(SSLLIBS)
- LINKCUPSIMAGE	=	@LINKCUPSIMAGE@
--LIBS		=	$(LINKCUPS) $(COMMONLIBS)
-+LIBS		=	$(LINKCUPS) $(COMMONLIBS) @LIBAUDIT@ @LIBSELINUX@
- OPTIM		=	@OPTIM@
- OPTIONS		=
- PAMLIBS		=	@PAMLIBS@
-@@ -239,7 +239,7 @@
- # Rules...
- #
- 
--.SILENT:
-+
- .SUFFIXES:	.1 .1.gz .1m .1m.gz .5 .5.gz .7 .7.gz .8 .8.gz .a .c .cxx .h .man .o .32.o .64.o .gz
- 
- .c.o:
---- /dev/null	2007-03-02 08:56:41.811642143 +0000
-+++ cups-1.2.8/config-scripts/cups-lspp.m4	2007-03-02 14:06:43.000000000 +0000
+--- /dev/null	2007-07-18 08:25:43.728072803 +0100
++++ cups-1.3b1/config-scripts/cups-lspp.m4	2007-07-18 11:40:59.000000000 +0100
 @@ -0,0 +1,36 @@
 +dnl
 +dnl   LSPP code for the Common UNIX Printing System (CUPS).
@@ -57,8 +37,33 @@
 +            ;;
 +    esac
 +fi
---- cups-1.2.8/data/mls	2007-03-02 14:06:43.000000000 +0000
-+++ cups-1.2.4-secheck/data/mls	2007-03-07 10:33:09.000000000 -0500
+--- cups-1.3b1/cups/cups.h.lspp	2007-07-13 02:13:26.000000000 +0100
++++ cups-1.3b1/cups/cups.h	2007-07-18 11:40:59.000000000 +0100
+@@ -15,6 +15,9 @@
+  *   This file is subject to the Apple OS-Developed Software exception.
+  */
+ 
++/* Copyright (C) 2005 Trusted Computer Solutions, Inc. */
++/* (c) Copyright 2005-2006 Hewlett-Packard Development Company, L.P. */
++
+ #ifndef _CUPS_CUPS_H_
+ #  define _CUPS_CUPS_H_
+ 
+@@ -66,6 +69,12 @@
+ #  define CUPS_DATE_ANY		-1
+ 
+ 
++# ifdef WITH_LSPP
++# define MLS_CONFIG "mls"
++# define TE_CONFIG "te"
++# define SELINUX_CONFIG "SELinux"
++# define UNKNOWN_SL "UNKNOWN SL"
++# endif /* WITH_LSPP */
+ /*
+  * Types and structures...
+  */
+--- /dev/null	2007-07-18 08:25:43.728072803 +0100
++++ cups-1.3b1/data/mls	2007-07-18 11:40:59.000000000 +0100
 @@ -0,0 +1,261 @@
 +%!PS-Adobe-3.0
 +%%BoundingBox: 0 0 612 792
@@ -321,8 +326,8 @@
 +% End of "$Id$".
 +%
 +%%EOF
---- cups-1.2.8/data/selinux	2007-03-02 14:06:43.000000000 +0000
-+++ cups-1.2.4-secheck/data/selinux	2007-03-07 10:33:09.000000000 -0500
+--- /dev/null	2007-07-18 08:25:43.728072803 +0100
++++ cups-1.3b1/data/selinux	2007-07-18 11:40:59.000000000 +0100
 @@ -0,0 +1,261 @@
 +%!PS-Adobe-3.0
 +%%BoundingBox: 0 0 612 792
@@ -585,9 +590,9 @@
 +% End of "$Id$".
 +%
 +%%EOF
---- cups-1.2.8/data/Makefile.lspp	2006-03-19 03:23:34.000000000 +0000
-+++ cups-1.2.8/data/Makefile	2007-03-02 14:06:43.000000000 +0000
-@@ -34,7 +34,10 @@
+--- cups-1.3b1/data/Makefile.lspp	2007-07-11 22:46:42.000000000 +0100
++++ cups-1.3b1/data/Makefile	2007-07-18 11:40:59.000000000 +0100
+@@ -25,7 +25,10 @@
  		secret \
  		standard \
  		topsecret \
@@ -599,8 +604,8 @@
  
  CHARMAPS =	\
  		euc-cn.txt \
---- cups-1.2.8/data/te	2007-03-02 14:06:43.000000000 +0000
-+++ cups-1.2.4-secheck/data/te	2007-03-07 10:33:09.000000000 -0500
+--- /dev/null	2007-07-18 08:25:43.728072803 +0100
++++ cups-1.3b1/data/te	2007-07-18 11:40:59.000000000 +0100
 @@ -0,0 +1,261 @@
 +%!PS-Adobe-3.0
 +%%BoundingBox: 0 0 612 792
@@ -863,63 +868,181 @@
 +% End of "$Id$".
 +%
 +%%EOF
---- cups-1.2.8/config.h.in.lspp	2007-02-06 16:04:25.000000000 +0000
-+++ cups-1.2.8/config.h.in	2007-03-02 14:06:43.000000000 +0000
-@@ -468,6 +468,13 @@
- #undef HAVE_APPLETALK_AT_PROTO_H
+--- cups-1.3b1/filter/common.c.lspp	2007-07-11 22:46:42.000000000 +0100
++++ cups-1.3b1/filter/common.c	2007-07-18 11:40:59.000000000 +0100
+@@ -30,6 +30,12 @@
+  * Include necessary headers...
+  */
  
++#include "config.h"
++#ifdef WITH_LSPP
++#define _GNU_SOURCE
++#include <string.h>
++#endif /* WITH_LSPP */
++
+ #include "common.h"
+ #include <locale.h>
  
-+/*
-+ * Are we trying to meet LSPP requirements?
-+ */
+@@ -312,6 +318,18 @@
+ {
+   const char	*classification;	/* CLASSIFICATION environment variable */
+   const char	*ptr;			/* Temporary string pointer */
++#ifdef WITH_LSPP
++  int           i,                      /* counter */
++                n,                      /* counter */
++                lines,                  /* number of lines needed */
++                line_len,               /* index into tmp_label */
++                label_len,              /* length of the label in characters */
++                label_index,            /* index into the label */
++                longest,                /* length of the longest line */
++                longest_line,           /* index to the longest line */
++                max_width;              /* maximum width in characters */
++  char          **wrapped_label;        /* label with line breaks */
++#endif /* WITH_LSPP */
+ 
+ 
+  /*
+@@ -334,6 +352,124 @@
+     return;
+   }
+ 
++#ifdef WITH_LSPP
++  if (strncmp(classification, "LSPP:", 5) == 0 && label == NULL)
++  {
++   /*
++    * Based on the 12pt fixed width font below determine the max_width
++    */
++    max_width = width / 8;
++    longest_line = 0;
++    longest = 0;
++    classification += 5; // Skip the "LSPP:"
++    label_len = strlen(classification);
 +
-+#undef WITH_LSPP
++    if (label_len > max_width)
++    {
++      lines = 1 + (int)(label_len / max_width);
++      line_len = (int)(label_len / lines);
++      wrapped_label = malloc(sizeof(wrapped_label) * lines);
++      label_index = i = n = 0;
++      while (classification[label_index])
++      {
++        if ((label_index + line_len) > label_len)
++          break;
++        switch (classification[label_index + line_len + i])
++        {
++          case ':':
++          case ',':
++          case '-':
++            i++;
++            wrapped_label[n++] = strndup(&classification[label_index], (line_len + i));
++            label_index += line_len + i;
++            i = 0;
++            break;
++          default:
++            i++;
++            break;
++        }
++        if ((i + line_len) == max_width)
++        {
++          wrapped_label[n++] = strndup(&(classification[label_index]), (line_len + i));
++          label_index = label_index + line_len + i;
++          i = 0;
++        }
++      }
++      wrapped_label[n] = strndup(&classification[label_index], label_len - label_index);
++    }
++    else
++    {
++      lines = 1;
++      wrapped_label = malloc(sizeof(wrapped_label));
++      wrapped_label[0] = (char*)classification;
++    }
 +
++    for (n = 0; n < lines; n++ )
++    {
++      printf("userdict/ESPp%c(", ('a' + n));
++      for (ptr = wrapped_label[n], i = 0; *ptr; ptr ++, i++)
++        if (*ptr < 32 || *ptr > 126)
++          printf("\\%03o", *ptr);
++        else
++        {
++          if (*ptr == '(' || *ptr == ')' || *ptr == '\\')
++            putchar('\\');
 +
- #endif /* !_CUPS_CONFIG_H_ */
- 
- /*
---- cups-1.2.8/configure.in.lspp	2006-12-06 20:10:16.000000000 +0000
-+++ cups-1.2.8/configure.in	2007-03-02 14:06:43.000000000 +0000
-@@ -48,6 +48,8 @@
- sinclude(config-scripts/cups-pdf.m4)
- sinclude(config-scripts/cups-scripting.m4)
- 
-+sinclude(config-scripts/cups-lspp.m4)
++          printf("%c", *ptr);
++        }
++      if (i > longest)
++      {
++        longest = i;
++        longest_line = n;
++      }
++      printf(")put\n");
++    }
 +
- INSTALL_LANGUAGES=""
- UNINSTALL_LANGUAGES=""
- LANGFILES=""
---- cups-1.2.8/cups/cups.h.lspp	2007-01-10 16:23:06.000000000 +0000
-+++ cups-1.2.8/cups/cups.h	2007-03-02 14:06:43.000000000 +0000
-@@ -24,6 +24,9 @@
-  *   This file is subject to the Apple OS-Developed Software exception.
-  */
- 
-+/* Copyright (C) 2005 Trusted Computer Solutions, Inc. */
-+/* (c) Copyright 2005-2006 Hewlett-Packard Development Company, L.P. */
++   /*
++    * For LSPP use a fixed width font so that line wrapping can be calculated
++    */
 +
- #ifndef _CUPS_CUPS_H_
- #  define _CUPS_CUPS_H_
- 
-@@ -75,6 +78,12 @@
- #  define CUPS_DATE_ANY		-1
++    puts("userdict/ESPlf /Nimbus-Mono findfont 12 scalefont put");
++
++   /*
++    * Finally, the procedure to write the labels on the page...
++    */
++
++    printf("userdict/ESPwl{\n"
++           "  ESPlf setfont\n");
++    printf("  ESPp%c stringwidth pop dup 12 add exch -0.5 mul %.0f add\n ",
++           'a' + longest_line, width * 0.5f);
++    for (n = 1; n < lines; n++)
++      printf(" dup");
++    printf("\n  1 setgray\n");
++    printf("  dup 6 sub %.0f %d index %.0f ESPrf\n",
++           (bottom - 2.0), (2 + lines), 6.0 + (16.0 * lines));
++    printf("  dup 6 sub %.0f %d index %.0f ESPrf\n",
++           (top - 6.0 - (16.0 * lines)), (2 + lines), 4.0 + (16.0 * lines));
++    printf("  0 setgray\n");
++    printf("  dup 6 sub %.0f %d index %.0f ESPrs\n",
++           (bottom - 2.0), (2 + lines), 6.0 + (16.0 * lines));
++    printf("  dup 6 sub %.0f %d index %.0f ESPrs\n",
++           (top - 6.0 - (16.0 * lines)), (2 + lines), 4.0 + (16.0 * lines));
++    for (n = 0; n < lines; n ++)
++    {
++      printf("  dup %.0f moveto ESPp%c show\n",
++             bottom + 6.0 + ((lines - (n+1)) * 16.0), 'a' + n);
++      printf("  %.0f moveto ESPp%c show\n", top + 2.0 - ((n + 1) * 16.0), 'a' + n);
++    }
++    printf("  pop\n"
++           "}bind put\n");
++
++   /*
++    * Do some clean up at the end of the LSPP special case
++    */
++    free(wrapped_label);
++
++  }
++  else
++  {
++#endif /* !WITH_LSPP */
++  
+  /*
+   * Set the classification + page label string...
+   */
+@@ -414,7 +550,10 @@
+   printf("  %.0f moveto ESPpl show\n", top - 14.0);
+   puts("pop");
+   puts("}bind put");
++  }
++#ifdef WITH_LSPP
+ }
++#endif /* WITH_LSPP */
  
  
-+# ifdef WITH_LSPP
-+# define MLS_CONFIG "mls"
-+# define TE_CONFIG "te"
-+# define SELINUX_CONFIG "SELinux"
-+# define UNKNOWN_SL "UNKNOWN SL"
-+# endif /* WITH_LSPP */
  /*
-  * Types and structures...
-  */
---- cups-1.2.8/scheduler/client.h.lspp	2007-01-22 22:04:43.000000000 +0000
-+++ cups-1.2.8/scheduler/client.h	2007-03-02 14:06:43.000000000 +0000
-@@ -22,6 +22,13 @@
-  *         WWW: http://www.cups.org
-  */
+--- cups-1.3b1/scheduler/client.h.lspp	2007-07-11 22:46:42.000000000 +0100
++++ cups-1.3b1/scheduler/client.h	2007-07-18 12:11:40.000000000 +0100
+@@ -17,6 +17,13 @@
+ #  include <Security/Authorization.h>
+ #endif /* HAVE_AUTHORIZATION_H */
  
 +/* Copyright (C) 2005 Trusted Computer Solutions, Inc. */
 +/* (c) Copyright 2005-2006 Hewlett-Packard Development Company, L.P. */
@@ -931,10 +1054,10 @@
  /*
   * HTTP client structure...
   */
-@@ -56,6 +63,10 @@
-   http_addr_t		clientaddr;	/* Client address */
-   char			servername[256];/* Server name for connection */
-   int			serverport;	/* Server port for connection */
+@@ -62,6 +69,10 @@
+ #ifdef HAVE_AUTHORIZATION_H
+   AuthorizationRef	authref;	/* Authorization ref */
+ #endif /* HAVE_AUTHORIZATION_H */
 +#ifdef WITH_LSPP
 +  security_context_t	scon;		/* Security context of connection */
 +  uid_t			auid;		/* Audit loginuid of the client */
@@ -942,19 +1065,19 @@
  };
  
  #define HTTP(con) &((con)->http)
-@@ -120,6 +131,9 @@
+@@ -127,6 +138,9 @@
  extern void	cupsdStopListening(void);
  extern void	cupsdUpdateCGI(void);
- extern int	cupsdWriteClient(cupsd_client_t *con);
+ extern void	cupsdWriteClient(cupsd_client_t *con);
 +#ifdef WITH_LSPP
 +extern uid_t	client_pid_to_auid(pid_t clipid);
 +#endif /* WITH_LSPP */
  
  
  /*
---- cups-1.2.8/scheduler/conf.c	2007-03-02 14:06:43.000000000 +0000
-+++ cups-1.2.4-secheck/scheduler/conf.c	2007-03-07 11:22:58.000000000 -0500
-@@ -35,6 +35,7 @@
+--- cups-1.3b1/scheduler/conf.c.lspp	2007-07-18 11:40:59.000000000 +0100
++++ cups-1.3b1/scheduler/conf.c	2007-07-18 12:13:21.000000000 +0100
+@@ -26,6 +26,7 @@
   *   read_configuration()     - Read a configuration file.
   *   read_location()          - Read a <Location path> definition.
   *   read_policy()            - Read a <Policy name> definition.
@@ -962,7 +1085,7 @@
   */
  
  /*
-@@ -60,6 +61,9 @@
+@@ -48,6 +49,9 @@
  #  define INADDR_NONE	0xffffffff
  #endif /* !INADDR_NONE */
  
@@ -972,18 +1095,18 @@
  
  /*
   * Configuration variable structure...
-@@ -161,6 +165,10 @@
+@@ -159,6 +163,10 @@
+ #  if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS)
    { "ServerKey",		&ServerKey,		CUPSD_VARTYPE_STRING },
  #  endif /* HAVE_LIBSSL || HAVE_GNUTLS */
- #endif /* HAVE_SSL */
 +#ifdef WITH_LSPP
 +  { "AuditLog",			&AuditLog,		CUPSD_VARTYPE_INTEGER },
 +  { "PerPageLabels",		&PerPageLabels,		CUPSD_VARTYPE_BOOLEAN },
 +#endif /* WITH_LSPP */
- #ifdef HAVE_LAUNCHD
-   { "LaunchdTimeout",		&LaunchdTimeout,	CUPSD_VARTYPE_INTEGER },
-   { "LaunchdConf",		&LaunchdConf,		CUPSD_VARTYPE_STRING },
-@@ -223,6 +231,9 @@
+ #endif /* HAVE_SSL */
+   { "ServerName",		&ServerName,		CUPSD_VARTYPE_STRING },
+   { "ServerRoot",		&ServerRoot,		CUPSD_VARTYPE_STRING },
+@@ -349,6 +357,9 @@
  		*old_requestroot;	/* Old RequestRoot */
    const char	*tmpdir;		/* TMPDIR environment variable */
    struct stat	tmpinfo;		/* Temporary directory info */
@@ -993,7 +1116,7 @@
  
  
   /*
-@@ -470,6 +481,25 @@
+@@ -610,6 +621,25 @@
  
    RunUser = getuid();
  
@@ -1019,7 +1142,7 @@
   /*
    * See if the ServerName is an IP address...
    */
-@@ -777,11 +807,23 @@
+@@ -921,11 +951,23 @@
    if (MaxActiveJobs > (MaxFDs / 3))
      MaxActiveJobs = MaxFDs / 3;
  
@@ -1044,7 +1167,7 @@
  
   /*
    * Update the MaxClientsPerHost value, as needed...
-@@ -3295,6 +3337,18 @@
+@@ -3379,6 +3421,18 @@
    return (0);
  }
  
@@ -1063,18 +1186,15 @@
  
  /*
   * End of "$Id$".
---- cups-1.2.8/scheduler/client.c.lspp	2007-02-07 20:54:37.000000000 +0000
-+++ cups-1.2.8/scheduler/client.c	2007-03-02 14:06:43.000000000 +0000
-@@ -44,12 +44,17 @@
-  *   make_certificate()      - Make a self-signed SSL/TLS certificate.
+--- cups-1.3b1/scheduler/client.c.lspp	2007-07-14 01:16:39.000000000 +0100
++++ cups-1.3b1/scheduler/client.c	2007-07-18 12:15:06.000000000 +0100
+@@ -39,12 +39,14 @@
   *   pipe_command()          - Pipe the output of a command to the remote client.
   *   write_file()            - Send a file via HTTP.
+  *   write_pipe()            - Flag that data is available on the CGI pipe.
 + *   client_pid_to_auid()    - Get the audit login uid of the client.
   */
  
-+/* Copyright (C) 2005 Trusted Computer Solutions, Inc. */
-+/* (c) Copyright 2005-2006 Hewlett-Packard Development Company, L.P. */
-+
  /*
   * Include necessary headers...
   */
@@ -1083,7 +1203,7 @@
  #include <cups/http-private.h>
  #include "cupsd.h"
  
-@@ -81,6 +86,12 @@
+@@ -76,6 +78,12 @@
  #  include <gnutls/x509.h>
  #endif /* HAVE_GNUTLS */
  
@@ -1096,7 +1216,7 @@
  
  /*
   * Local functions...
-@@ -339,6 +350,57 @@
+@@ -335,6 +343,57 @@
      }
    }
  
@@ -1154,7 +1274,7 @@
  #ifdef AF_INET6
    if (con->http.hostaddr->addr.sa_family == AF_INET6)
      cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdAcceptClient: %d from %s:%d (IPv6)",
-@@ -729,6 +791,13 @@
+@@ -717,6 +776,13 @@
    mime_type_t		*type;		/* MIME type of file */
    cupsd_printer_t	*p;		/* Printer */
    static unsigned	request_id = 0;	/* Request ID for temp files */
@@ -1168,71 +1288,71 @@
  
  
    status = HTTP_CONTINUE;
-@@ -1832,6 +1901,63 @@
- 	  fchmod(con->file, 0640);
- 	  fchown(con->file, RunUser, Group);
-           fcntl(con->file, F_SETFD, fcntl(con->file, F_GETFD) | FD_CLOEXEC);
-+#ifdef WITH_LSPP
-+          if (strncmp(con->scon, UNKNOWN_SL, strlen(UNKNOWN_SL)) != 0)
-+          {
-+            if (getfilecon(con->filename, &spoolcon) == -1)
-+            {
-+              cupsdSendError(con, HTTP_SERVER_ERROR);
-+              return (cupsdCloseClient(con));
-+            }
-+            clicon = context_new(con->scon);
-+            tmpcon = context_new(spoolcon);
-+            freecon(spoolcon);
-+            if (!clicon || !tmpcon)
-+            {
-+              cupsdSendError(con, HTTP_SERVER_ERROR);
-+              if (clicon)
-+                context_free(clicon);
-+              if (tmpcon)
-+                context_free(tmpcon);
-+              return (cupsdCloseClient(con));
-+            }
-+            clirange = strdup(context_range_get(clicon));
-+            if ((cliclearance = strtok(clirange, "-")) != NULL)
-+            {
-+              if (context_range_set(tmpcon, cliclearance) == -1)
-+              {
-+                cupsdSendError(con, HTTP_SERVER_ERROR);
-+                free(clirange);
-+                context_free(tmpcon);
-+                context_free(clicon);
-+                return (cupsdCloseClient(con));
-+              }
-+            }
-+            else
-+            {
-+              if (context_range_set(tmpcon, (context_range_get(clicon))) == -1)
-+              {
-+                cupsdSendError(con, HTTP_SERVER_ERROR);
-+                free(clirange);
-+                context_free(tmpcon);
-+                context_free(clicon);
-+                return (cupsdCloseClient(con));
-+              }
-+            }
-+            free(clirange);
-+            if (setfilecon(con->filename, context_str(tmpcon)) == -1)
-+            {
-+              cupsdSendError(con, HTTP_SERVER_ERROR);
-+              context_free(tmpcon);
-+              context_free(clicon);
-+              return (cupsdCloseClient(con));
-+            }
-+            cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdReadClient: %s set to %s", 
-+                            con->filename, context_str(tmpcon));
-+            context_free(tmpcon);
-+            context_free(clicon);
-+          }
+@@ -1989,6 +2055,63 @@
+ 	    fchmod(con->file, 0640);
+ 	    fchown(con->file, RunUser, Group);
+             fcntl(con->file, F_SETFD, fcntl(con->file, F_GETFD) | FD_CLOEXEC);
++#ifdef WITH_LSPP
++	    if (strncmp(con->scon, UNKNOWN_SL, strlen(UNKNOWN_SL)) != 0)
++	    {
++	      if (getfilecon(con->filename, &spoolcon) == -1)
++	      {
++		cupsdSendError(con, HTTP_SERVER_ERROR, AUTH_NONE);
++		return (cupsdCloseClient(con));
++	      }
++	      clicon = context_new(con->scon);
++	      tmpcon = context_new(spoolcon);
++	      freecon(spoolcon);
++	      if (!clicon || !tmpcon)
++	      {
++		cupsdSendError(con, HTTP_SERVER_ERROR, AUTH_NONE);
++		if (clicon)
++		  context_free(clicon);
++		if (tmpcon)
++		  context_free(tmpcon);
++		return (cupsdCloseClient(con));
++	      }
++	      clirange = strdup(context_range_get(clicon));
++	      if ((cliclearance = strtok(clirange, "-")) != NULL)
++	      {
++		if (context_range_set(tmpcon, cliclearance) == -1)
++		{
++		  cupsdSendError(con, HTTP_SERVER_ERROR, AUTH_NONE);
++		  free(clirange);
++		  context_free(tmpcon);
++		  context_free(clicon);
++		  return (cupsdCloseClient(con));
++		}
++	      }
++	      else
++	      {
++		if (context_range_set(tmpcon, (context_range_get(clicon))) == -1)
++		{
++		  cupsdSendError(con, HTTP_SERVER_ERROR, AUTH_NONE);
++		  free(clirange);
++		  context_free(tmpcon);
++		  context_free(clicon);
++		  return (cupsdCloseClient(con));
++		}
++	      }
++	      free(clirange);
++	      if (setfilecon(con->filename, context_str(tmpcon)) == -1)
++	      {
++		cupsdSendError(con, HTTP_SERVER_ERROR, AUTH_NONE);
++		context_free(tmpcon);
++		context_free(clicon);
++		return (cupsdCloseClient(con));
++	      }
++	      cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdReadClient: %s set to %s", 
++			      con->filename, context_str(tmpcon));
++	      context_free(tmpcon);
++	      context_free(clicon);
++	    }
 +#endif /* WITH_LSPP */
- 	}
+ 	  }
  
- 	if (con->http.state != HTTP_POST_SEND)
-@@ -3906,6 +4032,50 @@
+ 	  if (con->http.state != HTTP_POST_SEND)
+@@ -4144,6 +4267,50 @@
  #endif /* HAVE_SSL */
  
  
@@ -1283,9 +1403,9 @@
  /*
   * 'pipe_command()' - Pipe the output of a command to the remote client.
   */
---- cups-1.2.8/scheduler/main.c.lspp	2007-03-02 14:06:43.000000000 +0000
-+++ cups-1.2.8/scheduler/main.c	2007-03-02 14:06:43.000000000 +0000
-@@ -49,6 +49,8 @@
+--- cups-1.3b1/scheduler/main.c.lspp	2007-07-18 11:40:59.000000000 +0100
++++ cups-1.3b1/scheduler/main.c	2007-07-18 11:40:59.000000000 +0100
+@@ -35,6 +35,8 @@
   *   usage()                   - Show scheduler usage.
   */
  
@@ -1294,9 +1414,9 @@
  /*
   * Include necessary headers...
   */
-@@ -71,6 +73,9 @@
- #  include <notify.h>
- #endif /* HAVE_NOTIFY_H */
+@@ -72,6 +74,9 @@
+ #  include <dlfcn.h>
+ #endif /* __APPLE__ && HAVE_DLFCN_H */
  
 +#ifdef WITH_LSPP
 +#  include <libaudit.h>
@@ -1304,7 +1424,7 @@
  
  /*
   * Local functions...
-@@ -156,6 +161,9 @@
+@@ -149,6 +154,9 @@
    int			launchd_idle_exit;
  					/* Idle exit on select timeout? */
  #endif	/* HAVE_LAUNCHD */
@@ -1314,7 +1434,7 @@
  
  
   /*
-@@ -366,6 +374,25 @@
+@@ -367,6 +375,25 @@
  #endif /* DEBUG */
    }
  
@@ -1340,9 +1460,9 @@
   /*
    * Set the timezone info...
    */
-@@ -1154,6 +1181,11 @@
-   free(input);
-   free(output);
+@@ -981,6 +1008,11 @@
+ 
+   cupsdStopSelect();
  
 +#ifdef WITH_LSPP
 +  if (AuditLog != -1)
@@ -1352,9 +1472,9 @@
    return (!stop_scheduler);
  }
  
---- cups-1.2.8/scheduler/conf.h	2007-03-02 14:06:43.000000000 +0000
-+++ cups-1.2.4-secheck/scheduler/conf.h	2007-03-07 11:22:58.000000000 -0500
-@@ -191,6 +191,12 @@
+--- cups-1.3b1/scheduler/conf.h.lspp	2007-07-18 11:40:59.000000000 +0100
++++ cups-1.3b1/scheduler/conf.h	2007-07-18 11:40:59.000000000 +0100
+@@ -190,6 +190,12 @@
  					/* Server key file */
  #  endif /* HAVE_LIBSSL || HAVE_GNUTLS */
  #endif /* HAVE_SSL */
@@ -1367,19 +1487,19 @@
  
  #ifdef HAVE_LAUNCHD
  VAR int			LaunchdTimeout		VALUE(DEFAULT_TIMEOUT);
-@@ -213,6 +219,9 @@
- ;
- extern int	cupsdLogPage(cupsd_job_t *job, const char *page);
+@@ -208,6 +214,9 @@
+ 					/* System group auth key */
+ #endif /* HAVE_AUTHORIZATION_H */
  
 +#ifdef WITH_LSPP
 +extern int	is_lspp_config(void);
 +#endif /* WITH_LSPP */
  
  /*
-  * End of "$Id$".
---- cups-1.2.8/scheduler/ipp.c.lspp	2007-03-02 14:06:43.000000000 +0000
-+++ cups-1.2.8/scheduler/ipp.c	2007-03-02 14:06:57.000000000 +0000
-@@ -41,6 +41,7 @@
+  * Prototypes...
+--- cups-1.3b1/scheduler/ipp.c.lspp	2007-07-18 11:40:59.000000000 +0100
++++ cups-1.3b1/scheduler/ipp.c	2007-07-18 12:16:58.000000000 +0100
+@@ -36,6 +36,7 @@
   *   cancel_all_jobs()           - Cancel all print jobs.
   *   cancel_job()                - Cancel a print job.
   *   cancel_subscription()       - Cancel a subscription.
@@ -1387,7 +1507,7 @@
   *   check_quotas()              - Check quotas for a printer and user.
   *   copy_attribute()            - Copy a single attribute.
   *   copy_attrs()                - Copy attributes from one request to another.
-@@ -95,6 +96,9 @@
+@@ -93,6 +94,9 @@
   *   validate_user()             - Validate the user for the request.
   */
  
@@ -1397,9 +1517,9 @@
  /*
   * Include necessary headers...
   */
-@@ -105,6 +109,14 @@
- #  include <paper.h>
- #endif /* HAVE_LIBPAPER */
+@@ -120,6 +124,14 @@
+ #  endif /* HAVE_MEMBERSHIPPRIV_H */
+ #endif /* __APPLE__ */
  
 +#ifdef WITH_LSPP
 +#include <libaudit.h>
@@ -1412,7 +1532,7 @@
  
  /*
   * Local functions...
-@@ -130,6 +142,9 @@
+@@ -144,6 +156,9 @@
  static void	cancel_all_jobs(cupsd_client_t *con, ipp_attribute_t *uri);
  static void	cancel_job(cupsd_client_t *con, ipp_attribute_t *uri);
  static void	cancel_subscription(cupsd_client_t *con, int id);
@@ -1422,7 +1542,7 @@
  static int	check_quotas(cupsd_client_t *con, cupsd_printer_t *p);
  static ipp_attribute_t	*copy_attribute(ipp_t *to, ipp_attribute_t *attr,
  		                        int quickcopy);
-@@ -1159,6 +1174,21 @@
+@@ -1228,6 +1243,21 @@
    int		kbytes;			/* Size of print file */
    int		i;			/* Looping var */
    int		lowerpagerange;		/* Page range bound */
@@ -1443,8 +1563,8 @@
 +#endif /* WITH_LSPP */
  
  
-   cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %s)", con,
-@@ -1335,6 +1365,127 @@
+   cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))",
+@@ -1422,6 +1452,127 @@
      return (NULL);
    }
  
@@ -1453,7 +1573,7 @@
 +  {
 +    if (!con->scon || strncmp(con->scon, UNKNOWN_SL, strlen(UNKNOWN_SL)) == 0)
 +    {
-+      cupsdLogMessage(CUPSD_LOG_ERROR, "add_job: missing classification for connection \'%s\'!", dest);
++      cupsdLogMessage(CUPSD_LOG_ERROR, "add_job: missing classification for connection \'%s\'!", printer->name);
 +      send_ipp_status(con, IPP_INTERNAL_ERROR, _("Missing required secuirty attributes."));
 +      return (NULL);
 +    }
@@ -1569,10 +1689,10 @@
 +  }
 +#endif /* WITH_LSPP */
 +
-   job->dtype   = dtype;
+   job->dtype   = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT |
+                                   CUPS_PRINTER_REMOTE);
    job->attrs   = con->request;
-   con->request = ippNewRequest(job->attrs->request.op.operation_id);
-@@ -1530,6 +1681,29 @@
+@@ -1638,6 +1789,29 @@
        attr->values[0].string.text = _cupsStrAlloc(printer->job_sheets[0]);
        attr->values[1].string.text = _cupsStrAlloc(printer->job_sheets[1]);
      }
@@ -1602,7 +1722,7 @@
  
      job->job_sheets = attr;
  
-@@ -1560,6 +1734,9 @@
+@@ -1668,6 +1842,9 @@
  	                		    "job-sheets=\"%s,none\", "
  					    "job-originating-user-name=\"%s\"",
  	        	 job->id, Classification, job->username);
@@ -1612,7 +1732,7 @@
  	}
  	else if (attr->num_values == 2 &&
  	         strcmp(attr->values[0].string.text,
-@@ -1578,6 +1755,9 @@
+@@ -1686,6 +1863,9 @@
  					    "job-originating-user-name=\"%s\"",
  	        	 job->id, attr->values[0].string.text,
  			 attr->values[1].string.text, job->username);
@@ -1622,7 +1742,7 @@
  	}
  	else if (strcmp(attr->values[0].string.text, Classification) &&
  	         strcmp(attr->values[0].string.text, "none") &&
-@@ -1598,6 +1778,9 @@
+@@ -1706,6 +1886,9 @@
  			    "job-originating-user-name=\"%s\"",
  	        	    job->id, attr->values[0].string.text,
  			    attr->values[1].string.text, job->username);
@@ -1632,7 +1752,7 @@
          }
        }
        else if (strcmp(attr->values[0].string.text, Classification) &&
-@@ -1638,9 +1821,52 @@
+@@ -1746,9 +1929,52 @@
  	                  "job-sheets=\"%s\", "
  			  "job-originating-user-name=\"%s\"",
  	        	 job->id, Classification, job->username);
@@ -1685,7 +1805,7 @@
     /*
      * See if we need to add the starting sheet...
      */
-@@ -3142,6 +3368,103 @@
+@@ -3297,6 +3523,103 @@
  }
  
  
@@ -1789,7 +1909,7 @@
  /*
   * 'check_quotas()' - Check quotas for a printer and user.
   */
-@@ -3490,6 +3813,15 @@
+@@ -3823,6 +4146,15 @@
    char		attrname[255],		/* Name of attribute */
  		*s;			/* Pointer into name */
    ipp_attribute_t *attr;		/* Attribute */
@@ -1805,7 +1925,7 @@
  
  
    cupsdLogMessage(CUPSD_LOG_DEBUG2, "copy_banner(%p[%d], %p[%d], %s)",
-@@ -3523,6 +3855,77 @@
+@@ -3857,6 +4189,77 @@
  
    fchmod(cupsFileNumber(out), 0640);
    fchown(cupsFileNumber(out), RunUser, Group);
@@ -1883,7 +2003,7 @@
  
   /*
    * Try the localized banner file under the subdirectory...
-@@ -3617,6 +4020,24 @@
+@@ -3951,6 +4354,24 @@
        else
          s = attrname;
  
@@ -1908,7 +2028,7 @@
        if (!strcmp(s, "printer-name"))
        {
          cupsFilePuts(out, job->dest);
-@@ -5295,6 +5716,22 @@
+@@ -5671,6 +6092,22 @@
      return;
    }
  
@@ -1931,7 +2051,7 @@
   /*
    * Copy attributes...
    */
-@@ -5492,6 +5929,11 @@
+@@ -5870,6 +6307,11 @@
      if (count > 0)
        ippAddSeparator(con->response);
  
@@ -1943,30 +2063,7 @@
      count ++;
  
      cupsdLogMessage(CUPSD_LOG_DEBUG2, "get_jobs: count = %d", count);
-@@ -7880,12 +8322,22 @@
-     * See if we need to add the ending sheet...
-     */
- 
-+#ifdef WITH_LSPP
-+    if (printer &&
-+        ( is_lspp_config() ||
-+        !(printer->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT)) ) &&
-+        (attr = ippFindAttribute(job->attrs, "job-sheets",
-+	                         IPP_TAG_ZERO)) != NULL &&
-+        attr->num_values > 1)
-+    {
-+#else /* !WITH_LSPP */
-     if (printer &&
-         !(printer->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT)) &&
-         (attr = ippFindAttribute(job->attrs, "job-sheets",
- 	                         IPP_TAG_ZERO)) != NULL &&
-         attr->num_values > 1)
-     {
-+#endif /* WITH_LSPP */
-      /*
-       * Yes...
-       */
-@@ -9158,6 +9610,11 @@
+@@ -9848,6 +10290,11 @@
  
    strlcpy(username, get_username(con), userlen);
  
@@ -1978,10 +2075,10 @@
   /*
    * Check the username against the owner...
    */
---- cups-1.2.8/scheduler/job.c	2007-03-02 14:06:43.000000000 +0000
-+++ cups-1.2.4-secheck/scheduler/job.c	2007-03-07 11:22:58.000000000 -0500
-@@ -68,6 +68,9 @@
-  *   unload_job()               - Unload a job from memory.
+--- cups-1.3b1/scheduler/job.c.lspp	2007-07-18 11:40:59.000000000 +0100
++++ cups-1.3b1/scheduler/job.c	2007-07-18 11:40:59.000000000 +0100
+@@ -60,6 +60,9 @@
+  *   update_job_attrs()         - Update the job-printer-* attributes.
   */
  
 +/* Copyright (C) 2005 Trusted Computer Solutions, Inc. */
@@ -1990,7 +2087,7 @@
  /*
   * Include necessary headers...
   */
-@@ -77,6 +80,14 @@
+@@ -69,6 +72,14 @@
  #include <cups/backend.h>
  #include <cups/dir.h>
  
@@ -2005,8 +2102,8 @@
  
  /*
   * Local globals...
-@@ -1030,6 +1041,23 @@
-     cupsdSetString(&job->dest, dest);
+@@ -1056,6 +1067,23 @@
+     return;
    }
  
 +#ifdef WITH_LSPP
@@ -2029,7 +2126,7 @@
    job->sheets     = ippFindAttribute(job->attrs, "job-media-sheets-completed",
                                       IPP_TAG_INTEGER);
    job->job_sheets = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME);
-@@ -1339,6 +1367,13 @@
+@@ -1406,6 +1434,13 @@
  {
    char		filename[1024];		/* Job control filename */
    cups_file_t	*fp;			/* Job file */
@@ -2043,7 +2140,7 @@
  
  
    cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p",
-@@ -1357,6 +1392,72 @@
+@@ -1424,6 +1459,72 @@
    fchmod(cupsFileNumber(fp), 0600);
    fchown(cupsFileNumber(fp), RunUser, Group);
  
@@ -2116,7 +2213,7 @@
    job->attrs->state = IPP_IDLE;
  
    if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL,
-@@ -2486,6 +2587,21 @@
+@@ -2422,6 +2523,21 @@
  					/* RIP_MAX_CACHE env variable */
    static char		*options = NULL;/* Full list of options */
    static int		optlength = 0;	/* Length of option buffer */
@@ -2137,10 +2234,10 @@
 +#endif /* WITH_LSPP */
  
  
-   cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job: id = %d, file = %d/%d",
-@@ -2745,6 +2861,106 @@
- 
-   cupsdLogMessage(CUPSD_LOG_DEBUG, "banner_page = %d", banner_page);
+   cupsdLogMessage(CUPSD_LOG_DEBUG2, "[Job %d] start_job: file = %d/%d",
+@@ -2673,6 +2789,106 @@
+           fcntl(job->side_pipes[1], F_GETFL) | O_NONBLOCK);
+   }
  
 +#ifdef WITH_LSPP
 +  if (is_lspp_config())
@@ -2243,10 +2340,10 @@
 +#endif /* WITH_LSPP */
 +
   /*
-   * Building the options string is harder than it needs to be, but
-   * for the moment we need to pass strings for command-line args and
-@@ -2840,6 +3056,18 @@
-          banner_page)
+   * Determine if we are printing a banner page or not...
+   */
+@@ -2813,6 +3029,18 @@
+ 	  banner_page)
          continue;
  
 +#ifdef WITH_LSPP
@@ -2264,7 +2361,7 @@
       /*
        * Otherwise add them to the list...
        */
-@@ -3055,6 +3283,67 @@
+@@ -3029,6 +3257,67 @@
      envp[envc ++] = final_content_type;
    }
  
@@ -2332,9 +2429,9 @@
    if (Classification && !banner_page)
    {
      if ((attr = ippFindAttribute(job->attrs, "job-sheets",
---- cups-1.2.8/scheduler/printers.c.lspp	2007-03-02 14:06:43.000000000 +0000
-+++ cups-1.2.8/scheduler/printers.c	2007-03-02 14:06:43.000000000 +0000
-@@ -57,6 +57,8 @@
+--- cups-1.3b1/scheduler/printers.c.lspp	2007-07-18 11:40:59.000000000 +0100
++++ cups-1.3b1/scheduler/printers.c	2007-07-18 11:40:59.000000000 +0100
+@@ -50,6 +50,8 @@
   *                                 printing desktop tools.
   */
  
@@ -2343,7 +2440,7 @@
  /*
   * Include necessary headers...
   */
-@@ -79,6 +81,10 @@
+@@ -73,6 +75,10 @@
  static void	write_irix_state(cupsd_printer_t *p);
  #endif /* __sgi */
  
@@ -2354,9 +2451,9 @@
  
  /*
   * 'cupsdAddPrinter()' - Add a printer to the system.
-@@ -1472,6 +1478,13 @@
- 		  "two-sided-long-edge",
- 		  "two-sided-short-edge"
+@@ -1700,6 +1706,13 @@
+ 		{			/* No authentication */
+ 		  "none"
  		};
 +#ifdef WITH_LSPP
 +  char		*audit_message;		/* Audit message string */
@@ -2368,7 +2465,7 @@
  
  
    DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name,
-@@ -1579,6 +1592,44 @@
+@@ -1843,6 +1856,44 @@
        attr->values[1].string.text = _cupsStrAlloc(Classification ?
  	                                   Classification : p->job_sheets[1]);
      }
@@ -2412,11 +2509,11 @@
 +#endif /* WITH_LSPP */
    }
  
-   printer_type = p->type;
---- cups-1.2.8/scheduler/job.h.lspp	2006-09-19 21:11:08.000000000 +0100
-+++ cups-1.2.8/scheduler/job.h	2007-03-02 14:06:43.000000000 +0000
-@@ -22,6 +22,13 @@
-  *         WWW: http://www.cups.org
+   p->raw    = 0;
+--- cups-1.3b1/scheduler/job.h.lspp	2007-07-12 23:58:17.000000000 +0100
++++ cups-1.3b1/scheduler/job.h	2007-07-18 12:17:36.000000000 +0100
+@@ -13,6 +13,13 @@
+  *   file is missing or damaged, see the license at "http://www.cups.org/".
   */
  
 +/* Copyright (C) 2005 Trusted Computer Solutions, Inc. */
@@ -2429,10 +2526,10 @@
  /*
   * Job request structure...
   */
-@@ -55,6 +62,10 @@
-   int			status;		/* Status code from filters */
-   cupsd_printer_t	*printer;	/* Printer this job is assigned to */
-   int			tries;		/* Number of tries for this job */
+@@ -59,6 +66,10 @@
+ #ifdef HAVE_GSSAPI
+   char			*ccname;	/* KRB5CCNAME environment variable */
+ #endif /* HAVE_GSSAPI */
 +#ifdef WITH_LSPP
 +  security_context_t	scon;		/* Security context of job */
 +  uid_t			auid;		/* Audit loginuid for this job */
@@ -2440,173 +2537,50 @@
  } cupsd_job_t;
  
  
---- cups-1.2.4-base/filter/common.c	2007-03-12 16:55:55.000000000 -0400
-+++ cups-1.2.4/filter/common.c	2007-03-12 16:53:14.000000000 -0400
-@@ -38,6 +38,12 @@
-  * Include necessary headers...
-  */
+--- cups-1.3b1/Makedefs.in.lspp	2007-07-11 22:46:42.000000000 +0100
++++ cups-1.3b1/Makedefs.in	2007-07-18 11:40:59.000000000 +0100
+@@ -133,7 +133,7 @@
+ LIBCUPSORDER	=	@LIBCUPSORDER@
+ LINKCUPS	=	@LINKCUPS@ $(SSLLIBS)
+ LINKCUPSIMAGE	=	@LINKCUPSIMAGE@
+-LIBS		=	$(LINKCUPS) $(COMMONLIBS)
++LIBS		=	$(LINKCUPS) $(COMMONLIBS) @LIBAUDIT@ @LIBSELINUX@
+ OPTIM		=	@OPTIM@
+ OPTIONS		=
+ PAMLIBS		=	@PAMLIBS@
+@@ -240,7 +240,7 @@
+ # Rules...
+ #
  
-+#include "config.h"
-+#ifdef WITH_LSPP
-+#define _GNU_SOURCE
-+#include <string.h>
-+#endif /* WITH_LSPP */
+-.SILENT:
 +
- #include "common.h"
- #include <locale.h>
- 
-@@ -319,6 +325,18 @@
- {
-   const char	*classification;	/* CLASSIFICATION environment variable */
-   const char	*ptr;			/* Temporary string pointer */
-+#ifdef WITH_LSPP
-+  int           i,                      /* counter */
-+                n,                      /* counter */
-+                lines,                  /* number of lines needed */
-+                line_len,               /* index into tmp_label */
-+                label_len,              /* length of the label in characters */
-+                label_index,            /* index into the label */
-+                longest,                /* length of the longest line */
-+                longest_line,           /* index to the longest line */
-+                max_width;              /* maximum width in characters */
-+  char          **wrapped_label;        /* label with line breaks */
-+#endif /* WITH_LSPP */
+ .SUFFIXES:	.1 .1.gz .1m .1m.gz .5 .5.gz .7 .7.gz .8 .8.gz .a .c .cxx .h .man .o .32.o .64.o .gz
  
+ .c.o:
+--- cups-1.3b1/config.h.in.lspp	2007-07-11 22:46:42.000000000 +0100
++++ cups-1.3b1/config.h.in	2007-07-18 11:40:59.000000000 +0100
+@@ -529,6 +529,13 @@
+ #undef HAVE_SYS_UCRED_H
  
-  /*
-@@ -341,6 +359,124 @@
-     return;
-   }
  
-+#ifdef WITH_LSPP
-+  if (strncmp(classification, "LSPP:", 5) == 0 && label == NULL)
-+  {
-+   /*
-+    * Based on the 12pt fixed width font below determine the max_width
-+    */
-+    max_width = width / 8;
-+    longest_line = 0;
-+    longest = 0;
-+    classification += 5; // Skip the "LSPP:"
-+    label_len = strlen(classification);
-+
-+    if (label_len > max_width)
-+    {
-+      lines = 1 + (int)(label_len / max_width);
-+      line_len = (int)(label_len / lines);
-+      wrapped_label = malloc(sizeof(wrapped_label) * lines);
-+      label_index = i = n = 0;
-+      while (classification[label_index])
-+      {
-+        if ((label_index + line_len) > label_len)
-+          break;
-+        switch (classification[label_index + line_len + i])
-+        {
-+          case ':':
-+          case ',':
-+          case '-':
-+            i++;
-+            wrapped_label[n++] = strndup(&classification[label_index], (line_len + i));
-+            label_index += line_len + i;
-+            i = 0;
-+            break;
-+          default:
-+            i++;
-+            break;
-+        }
-+        if ((i + line_len) == max_width)
-+        {
-+          wrapped_label[n++] = strndup(&(classification[label_index]), (line_len + i));
-+          label_index = label_index + line_len + i;
-+          i = 0;
-+        }
-+      }
-+      wrapped_label[n] = strndup(&classification[label_index], label_len - label_index);
-+    }
-+    else
-+    {
-+      lines = 1;
-+      wrapped_label = malloc(sizeof(wrapped_label));
-+      wrapped_label[0] = (char*)classification;
-+    }
-+
-+    for (n = 0; n < lines; n++ )
-+    {
-+      printf("userdict/ESPp%c(", ('a' + n));
-+      for (ptr = wrapped_label[n], i = 0; *ptr; ptr ++, i++)
-+        if (*ptr < 32 || *ptr > 126)
-+          printf("\\%03o", *ptr);
-+        else
-+        {
-+          if (*ptr == '(' || *ptr == ')' || *ptr == '\\')
-+            putchar('\\');
-+
-+          printf("%c", *ptr);
-+        }
-+      if (i > longest)
-+      {
-+        longest = i;
-+        longest_line = n;
-+      }
-+      printf(")put\n");
-+    }
-+
-+   /*
-+    * For LSPP use a fixed width font so that line wrapping can be calculated
-+    */
-+
-+    puts("userdict/ESPlf /Nimbus-Mono findfont 12 scalefont put");
-+
-+   /*
-+    * Finally, the procedure to write the labels on the page...
-+    */
++/*
++ * Are we trying to meet LSPP requirements?
++ */
 +
-+    printf("userdict/ESPwl{\n"
-+           "  ESPlf setfont\n");
-+    printf("  ESPp%c stringwidth pop dup 12 add exch -0.5 mul %.0f add\n ",
-+           'a' + longest_line, width * 0.5f);
-+    for (n = 1; n < lines; n++)
-+      printf(" dup");
-+    printf("\n  1 setgray\n");
-+    printf("  dup 6 sub %.0f %d index %.0f ESPrf\n",
-+           (bottom - 2.0), (2 + lines), 6.0 + (16.0 * lines));
-+    printf("  dup 6 sub %.0f %d index %.0f ESPrf\n",
-+           (top - 6.0 - (16.0 * lines)), (2 + lines), 4.0 + (16.0 * lines));
-+    printf("  0 setgray\n");
-+    printf("  dup 6 sub %.0f %d index %.0f ESPrs\n",
-+           (bottom - 2.0), (2 + lines), 6.0 + (16.0 * lines));
-+    printf("  dup 6 sub %.0f %d index %.0f ESPrs\n",
-+           (top - 6.0 - (16.0 * lines)), (2 + lines), 4.0 + (16.0 * lines));
-+    for (n = 0; n < lines; n ++)
-+    {
-+      printf("  dup %.0f moveto ESPp%c show\n",
-+             bottom + 6.0 + ((lines - (n+1)) * 16.0), 'a' + n);
-+      printf("  %.0f moveto ESPp%c show\n", top + 2.0 - ((n + 1) * 16.0), 'a' + n);
-+    }
-+    printf("  pop\n"
-+           "}bind put\n");
++#undef WITH_LSPP
 +
-+   /*
-+    * Do some clean up at the end of the LSPP special case
-+    */
-+    free(wrapped_label);
 +
-+  }
-+  else
-+  {
-+#endif /* !WITH_LSPP */
-+  
-  /*
-   * Set the classification + page label string...
-   */
-@@ -421,7 +557,10 @@
-   printf("  %.0f moveto ESPpl show\n", top - 14.0);
-   puts("pop");
-   puts("}bind put");
-+  }
-+#ifdef WITH_LSPP
- }
-+#endif /* WITH_LSPP */
- 
+ #endif /* !_CUPS_CONFIG_H_ */
  
  /*
+--- cups-1.3b1/configure.in.lspp	2007-07-11 22:46:42.000000000 +0100
++++ cups-1.3b1/configure.in	2007-07-18 11:40:59.000000000 +0100
+@@ -42,6 +42,8 @@
+ sinclude(config-scripts/cups-pdf.m4)
+ sinclude(config-scripts/cups-scripting.m4)
+ 
++sinclude(config-scripts/cups-lspp.m4)
++
+ INSTALL_LANGUAGES=""
+ UNINSTALL_LANGUAGES=""
+ LANGFILES=""

cups-paps.patch:

Index: cups-paps.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups-paps.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cups-paps.patch	29 Jun 2006 21:48:30 -0000	1.2
+++ cups-paps.patch	18 Jul 2007 11:50:02 -0000	1.3
@@ -1,13 +1,11 @@
---- cups-1.2.1/conf/mime.convs.paps	2006-04-14 20:21:03.000000000 +0100
-+++ cups-1.2.1/conf/mime.convs	2006-06-29 15:12:57.000000000 +0100
-@@ -50,8 +50,8 @@
+--- cups-1.3b1/conf/mime.convs.in.paps	2007-07-18 11:31:28.000000000 +0100
++++ cups-1.3b1/conf/mime.convs.in	2007-07-18 11:31:47.000000000 +0100
+@@ -45,7 +45,7 @@
  application/x-csource	application/postscript	33	texttops
  application/x-perl	application/postscript	33	texttops
  application/x-shell	application/postscript	33	texttops
 -text/plain		application/postscript	33	texttops
--text/html		application/postscript	33	texttops
 +text/plain		application/postscript	33	texttopaps
-+text/html		application/postscript	33	texttopaps
+ text/html		application/postscript	33	texttops
  image/gif		application/vnd.cups-postscript	66	imagetops
  image/png		application/vnd.cups-postscript	66	imagetops
- image/jpeg		application/vnd.cups-postscript	66	imagetops

cups-serverbin-compat.patch:

Index: cups-serverbin-compat.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups-serverbin-compat.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cups-serverbin-compat.patch	7 Jun 2006 13:12:22 -0000	1.2
+++ cups-serverbin-compat.patch	18 Jul 2007 11:50:02 -0000	1.3
@@ -6,7 +6,7 @@
  
 +#ifdef __x86_64__
 +       snprintf(srcfile, sizeof(srcfile), "%s/backend/%s", ServerBin_compat,
-+		 method);
++		 scheme);
 +	if (access(srcfile, X_OK))
 +	  {
 +#endif /* __x86_64__ */

cups-usb-paperout.patch:

Index: cups-usb-paperout.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups-usb-paperout.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cups-usb-paperout.patch	4 Jul 2007 12:21:44 -0000	1.3
+++ cups-usb-paperout.patch	18 Jul 2007 11:50:02 -0000	1.4
@@ -1,7 +1,7 @@
---- cups-1.2.10/backend/runloop.c.usb-paperout	2006-12-06 20:10:16.000000000 +0000
-+++ cups-1.2.10/backend/runloop.c	2007-07-04 12:12:00.000000000 +0100
-@@ -40,6 +40,14 @@
- #endif /* __hpux */
+--- cups-1.3b1/backend/runloop.c.usb-paperout	2007-07-11 22:46:42.000000000 +0100
++++ cups-1.3b1/backend/runloop.c	2007-07-18 11:40:45.000000000 +0100
+@@ -135,6 +135,14 @@
+ }
  
  
 +#ifdef __linux
@@ -15,7 +15,7 @@
  /*
   * 'backendRunLoop()' - Read and write print and back-channel data.
   */
-@@ -64,6 +72,9 @@
+@@ -161,6 +169,9 @@
  #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
    struct sigaction action;		/* Actions for POSIX signals */
  #endif /* HAVE_SIGACTION && !HAVE_SIGSET */
@@ -24,19 +24,19 @@
 +#endif /* __linux */
  
  
-   fprintf(stderr, "DEBUG: backendRunLoop(print_fd=%d, device_fd=%d, use_bc=%d)\n",
-@@ -110,8 +121,6 @@
+   fprintf(stderr,
+@@ -210,8 +221,6 @@
      FD_ZERO(&input);
      if (!print_bytes)
        FD_SET(print_fd, &input);
 -    if (use_bc)
 -      FD_SET(device_fd, &input);
+     if (side_cb)
+       FD_SET(CUPS_SC_FD, &input);
  
-     FD_ZERO(&output);
-     if (print_bytes || !use_bc)
-@@ -119,7 +128,10 @@
+@@ -221,7 +230,10 @@
  
-     if (use_bc)
+     if (use_bc || side_cb)
      {
 -      if (select(nfds, &input, &output, NULL, NULL) < 0)
 +      struct timeval fives;
@@ -46,7 +46,7 @@
        {
         /*
  	* Pause printing to clear any pending errors...
-@@ -141,14 +153,24 @@
+@@ -256,14 +268,24 @@
      * Check if we have back-channel data ready...
      */
  
@@ -77,7 +77,7 @@
        }
      }
  
-@@ -219,6 +241,10 @@
+@@ -334,6 +356,10 @@
  	    offline = 1;
  	  }
  	}
@@ -87,8 +87,8 @@
 +	}
  	else if (errno != EAGAIN && errno != EINTR && errno != ENOTTY)
  	{
- 	  perror("ERROR: Unable to write print data");
-@@ -227,6 +253,9 @@
+ 	  fprintf(stderr, _("ERROR: Unable to write print data: %s\n"),
+@@ -343,6 +369,9 @@
        }
        else
        {
@@ -98,7 +98,7 @@
          if (paperout)
  	{
  	  fputs("STATE: -media-empty-error\n", stderr);
-@@ -247,7 +276,42 @@
+@@ -363,7 +392,42 @@
  	total_bytes += bytes;
        }
      }
@@ -141,9 +141,9 @@
  
   /*
    * Return with success...
---- cups-1.2.10/backend/usb-unix.c.usb-paperout	2007-07-04 12:11:46.000000000 +0100
-+++ cups-1.2.10/backend/usb-unix.c	2007-07-04 12:11:46.000000000 +0100
-@@ -39,6 +39,11 @@
+--- cups-1.3b1/backend/usb-unix.c.usb-paperout	2007-07-18 11:39:32.000000000 +0100
++++ cups-1.3b1/backend/usb-unix.c	2007-07-18 11:39:32.000000000 +0100
+@@ -31,6 +31,11 @@
  #include "ieee1284.c"
  #include <sys/select.h>
  
@@ -155,7 +155,7 @@
  
  /*
   * Local functions...
-@@ -70,6 +75,11 @@
+@@ -63,6 +68,11 @@
    (void)argc;
    (void)argv;
  
@@ -167,7 +167,7 @@
   /*
    * Open the USB port device...
    */
-@@ -150,6 +160,12 @@
+@@ -156,6 +166,12 @@
  
    tcsetattr(device_fd, TCSANOW, &opts);
  


Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups.spec,v
retrieving revision 1.342
retrieving revision 1.343
diff -u -r1.342 -r1.343
--- cups.spec	13 Jul 2007 09:17:56 -0000	1.342
+++ cups.spec	18 Jul 2007 11:50:02 -0000	1.343
@@ -2,14 +2,15 @@
 %define use_alternatives 1
 %define lspp 1
 %define cups_serverbin %{_exec_prefix}/lib/cups
+%define cups_beta b1
 
 Summary: Common Unix Printing System
 Name: cups
-Version: 1.2.12
-Release: 1%{?dist}
+Version: 1.3
+Release: 0.%{cups_beta}.1%{?dist}
 License: GPL
 Group: System Environment/Daemons
-Source: ftp://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
+Source: ftp://ftp.easysw.com/pub/cups/test//cups-%{version}%{cups_beta}-source.tar.bz2
 Source1: cups.init
 Source2: cupsprinter.png
 Source4: pstopdf
@@ -38,13 +39,9 @@
 Patch13: cups-direct-usb.patch
 Patch14: cups-lpr-help.patch
 Patch16: cups-pid.patch
-Patch17: cups-relro.patch
-Patch18: cups-directed-broadcast.patch
 Patch19: cups-eggcups.patch
 Patch20: cups-getpass.patch
 Patch21: cups-driverd-timeout.patch
-Patch22: cups-af_unix-auth.patch
-Patch24: cups-str2109.patch
 Patch25: cups-usb-paperout.patch
 Patch100: cups-lspp.patch
 Epoch: 1
@@ -130,7 +127,7 @@
 lpd emulation.
 
 %prep
-%setup -q -n %{name}-%{version}
+%setup -q -n %{name}-%{version}%{cups_beta}
 %patch1 -p1 -b .noinit
 %patch2 -p1 -b .no-gzip-man
 %patch3 -p1 -b .system-auth
@@ -146,13 +143,9 @@
 %patch13 -p1 -b .direct-usb
 %patch14 -p1 -b .lpr-help
 %patch16 -p1 -b .pid
-%patch17 -p1 -b .relro
-%patch18 -p1 -b .directed-broadcast
 %patch19 -p1 -b .eggcups
 %patch20 -p1 -b .getpass
 %patch21 -p1 -b .driverd-timeout
-%patch22 -p1 -b .af_unix-auth
-%patch24 -p1 -b .str2109
 %patch25 -p1 -b .usb-paperout
 
 %if %lspp
@@ -176,7 +169,7 @@
 %if %lspp
 	--enable-lspp \
 %endif
-	--with-log-file-perm=0600 --enable-pie
+	--with-log-file-perm=0600 --enable-pie --enable-relro
 
 # If we got this far, all prerequisite libraries must be here.
 make
@@ -372,6 +365,7 @@
 %{_docdir}/cups-%{version}/es
 %{_docdir}/cups-%{version}/et
 %{_docdir}/cups-%{version}/fr
+%{_docdir}/cups-%{version}/he
 %{_docdir}/cups-%{version}/it
 %{_docdir}/cups-%{version}/ja
 %{_docdir}/cups-%{version}/pl
@@ -441,6 +435,10 @@
 %{cups_serverbin}/daemon/cups-lpd
 
 %changelog
+* Wed Jul 18 2007 Tim Waugh <twaugh at redhat.com> 1:1.3-0.b1.1
+- 1.3b1.  No longer need relro, directed-broadcast, af_unix-auth, or
+  str2109 patches.
+
 * Fri Jul 13 2007 Tim Waugh <twaugh at redhat.com> 1:1.2.12-1
 - 1.2.12.  No longer need adminutil or str2408 patches.
 


--- cups-af_unix-auth.patch DELETED ---


--- cups-directed-broadcast.patch DELETED ---


--- cups-relro.patch DELETED ---


--- cups-str2109.patch DELETED ---




More information about the fedora-extras-commits mailing list