rpms/cups/F-9 cups-lspp.patch,1.30,1.31
Tim Waugh (twaugh)
fedora-extras-commits at redhat.com
Wed May 28 09:03:46 UTC 2008
Author: twaugh
Update of /cvs/pkgs/rpms/cups/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21462
Modified Files:
cups-lspp.patch
Log Message:
Regenerated patch.
cups-lspp.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.30 -r 1.31 cups-lspp.patch
Index: cups-lspp.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-9/cups-lspp.patch,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- cups-lspp.patch 28 May 2008 08:59:58 -0000 1.30
+++ cups-lspp.patch 28 May 2008 09:03:04 -0000 1.31
@@ -1,44 +1,6 @@
---- /dev/null 2007-07-31 09:03:12.827706703 +0100
-+++ cups-1.3rc2/config-scripts/cups-lspp.m4 2007-07-31 12:28:32.000000000 +0100
-@@ -0,0 +1,36 @@
-+dnl
-+dnl LSPP code for the Common UNIX Printing System (CUPS).
-+dnl
-+dnl Copyright 2005-2006 by Hewlett-Packard Development Company, L.P.
-+dnl
-+dnl This program is free software; you can redistribute it and/or modify
-+dnl it under the terms of the GNU General Public License as published by
-+dnl the Free Software Foundation; version 2.
-+dnl
-+dnl This program is distributed in the hope that it will be useful, but
-+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
-+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+dnl General Public License for more details.
-+dnl
-+dnl You should have received a copy of the GNU General Public License
-+dnl along with this program; if not, write to the Free Software Foundation,
-+dnl Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA
-+dnl
-+
-+dnl Are we trying to meet LSPP requirements
-+AC_ARG_ENABLE(lspp, [ --enable-lspp turn on auditing and label support, default=no])
-+
-+if test x"$enable_lspp" != xno; then
-+ case "$uname" in
-+ Linux)
-+ AC_CHECK_LIB(audit,audit_log_user_message, [LIBAUDIT="-laudit" AC_SUBST(LIBAUDIT)])
-+ AC_CHECK_HEADER(libaudit.h)
-+ AC_CHECK_LIB(selinux,getpeercon, [LIBSELINUX="-lselinux" AC_SUBST(LIBSELINUX)])
-+ AC_CHECK_HEADER(selinux/selinux.h)
-+ AC_DEFINE(WITH_LSPP)
-+ ;;
-+ *)
-+ # All others
-+ ;;
-+ esac
-+fi
---- cups-1.3rc2/cups/cups.h.lspp 2007-07-13 02:13:26.000000000 +0100
-+++ cups-1.3rc2/cups/cups.h 2007-07-31 12:28:32.000000000 +0100
+diff -up cups-1.3.7/cups/cups.h.lspp cups-1.3.7/cups/cups.h
+--- cups-1.3.7/cups/cups.h.lspp 2008-02-20 00:32:58.000000000 +0000
++++ cups-1.3.7/cups/cups.h 2008-05-28 10:01:11.000000000 +0100
@@ -15,6 +15,9 @@
* This file is subject to the Apple OS-Developed Software exception.
*/
@@ -49,7 +11,7 @@
#ifndef _CUPS_CUPS_H_
# define _CUPS_CUPS_H_
-@@ -66,6 +69,12 @@
+@@ -66,6 +69,12 @@ extern "C" {
# define CUPS_DATE_ANY -1
@@ -62,1132 +24,1335 @@
/*
* Types and structures...
*/
---- /dev/null 2007-07-31 09:03:12.827706703 +0100
-+++ cups-1.3rc2/data/mls 2007-07-31 12:28:32.000000000 +0100
-@@ -0,0 +1,261 @@
-+%!PS-Adobe-3.0
-+%%BoundingBox: 0 0 612 792
-+%%Pages: 1
-+%%LanguageLevel: 1
-+%%DocumentData: Clean7Bit
-+%%DocumentSuppliedResources: procset bannerprint/1.0
-+%%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman
-+%%Creator: Michael Sweet, Easy Software Products
-+%%CreationDate: May 10, 2000
-+%%Title: Test Page
-+%%EndComments
-+%%BeginProlog
-+%%BeginResource procset bannerprint 1.1 0
-+%
-+% PostScript banner page for the Common UNIX Printing System ("CUPS").
-+%
-+% Copyright 1993-2005 by Easy Software Products
-+%
-+% These coded instructions, statements, and computer programs are the
-+% property of Easy Software Products and are protected by Federal
-+% copyright law. Distribution and use rights are outlined in the file
-+% "LICENSE.txt" which should have been included with this file. If this
-+% file is missing or damaged please contact Easy Software Products
-+% at:
-+%
-+% Attn: CUPS Licensing Information
-+% Easy Software Products
-+% 44141 Airport View Drive, Suite 204
-+% Hollywood, Maryland 20636 USA
-+%
-+% Voice: (301) 373-9600
-+% EMail: cups-info at cups.org
-+% WWW: http://www.cups.org
-+%
-+/CENTER { % Draw centered text
-+ % (name) CENTER -
-+ dup stringwidth pop % Get the width of the string
-+ 0.5 mul neg 0 rmoveto % Shift left 1/2 of the distance
-+ show % Show the string
-+} bind def
-+/RIGHT { % Draw right-justified text
-+ % (name) RIGHT -
-+ dup stringwidth pop % Get the width of the string
-+ neg 0 rmoveto % Shift left the entire distance
-+ show % Show the string
-+} bind def
-+/NUMBER { % Draw a number
-+ % power n NUMBER -
-+ 1 index 1 eq { % power == 1?
-+ round cvi exch pop % Convert "n" to integer
-+ } {
-+ 1 index mul round exch div % Truncate extra decimal places
-+ } ifelse
-+ 100 string cvs show % Convert to a string and show it...
-+} bind def
-+/CUPSLOGO { % Draw the CUPS logo
-+ % height CUPSLOGO
-+ % Start with a big C...
-+ /Helvetica findfont 1 index scalefont setfont
-+ 0 setgray
-+ 0 0 moveto
-+ (C) show
-+
-+ % Then "UNIX Printing System" much smaller...
-+ /Helvetica-Bold findfont 1 index 9 div scalefont setfont
-+ 0.25 mul
-+ dup dup 2.0 mul moveto
-+ (UNIX) show
-+ dup dup 1.6 mul moveto
-+ (Printing) show
-+ dup 1.2 mul moveto
-+ (System) show
-+} bind def
-+/ESPLOGO { % Draw the ESP logo
-+ % height ESPLOGO
-+ % Compute the size of the logo...
-+ 0 0
-+ 2 index 1.5 mul 3 index
-+
-+ % Do the "metallic" fill from 10% black to 40% black...
-+ 1 -0.001 0 {
-+ dup % loopval
-+ -0.15 mul % loopval * -0.15
-+ 0.9 add % 0.9 - loopval * 0.15
-+ setgray % set gray shade
-+
-+ 0 % x
-+ 1 index neg % loopval
-+ 1 add % 1 - loopval
-+ 3 index % height
-+ mul % height * (1 - loopval)
-+ moveto % starting point
-+
-+ dup % loopval
-+ 3 index % width
-+ mul % loopval * width
-+ 2 index % height
-+ lineto % Next point
-+
-+ 0 % x
-+ 2 index % height
-+ lineto % Next point
-+
-+ closepath
-+ fill
-+
-+ dup % loopval
-+ 0.15 mul % loopval * 0.15
-+ 0.6 add % 0.6 + loopval * 0.15
-+ setgray
-+
-+ dup % loopval
-+ neg 1 add % 1 - loopval
-+ 3 index % width
-+ mul % (1 - loopval) * width
-+ 0 % y
-+ moveto % Starting point
-+
-+ 2 index % width
-+ exch % loopval
-+ 2 index % height
-+ mul % loopval * height
-+ lineto % Next point
-+
-+ 1 index % width
-+ 0 % y
-+ lineto % Next point
-+
[...4324 lines suppressed...]
-+ char *rangestr; /* Printer's range if its available */
-+ security_context_t devcon; /* Printer SELinux context */
-+ context_t printercon; /* context_t for the printer */
-+#endif /* WITH_LSPP */
-
-
- DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name,
-@@ -1843,6 +1856,44 @@
- attr->values[1].string.text = _cupsStrAlloc(Classification ?
- Classification : p->job_sheets[1]);
- }
-+#ifdef WITH_LSPP
-+ if (AuditLog != -1)
-+ {
-+ char uri[HTTP_MAX_URI];
-+ audit_message = NULL;
-+ rangestr = NULL;
-+ printercon = 0;
-+ printerfile = strstr(p->device_uri, "/dev/");
-+ if (printerfile == NULL && (strncmp(p->device_uri, "file:/", 6) == 0))
-+ printerfile = strdup(p->device_uri + strlen("file:/"));
++ % Offset page to account for lower-left margin...
++ pageLeft 72 mul
++ pageBottom 72 mul
++ translate
+
-+ if (printerfile != NULL)
-+ {
-+ if (getfilecon(printerfile, &devcon) == -1)
-+ cupsdLogMessage(CUPSD_LOG_ERROR, "cupsdSetPrinterAttrs: Unable to get printer context");
-+ else
-+ {
-+ printercon = context_new(devcon);
-+ freecon(devcon);
-+ }
-+ }
++ % Job information box...
++ pageWidth 36 mul 9 add % x = pageWidth * 1/2 * 72 + 9
++ boxWidth 0.5 mul sub % x-= 1/2 box width
++ pageHeight 30 mul 9 sub % y = pageHeight * 1/2 * 72 - 9
++ boxWidth % w = box width
++ pageHeight 14 mul % h = pageHeight * 1/2 * 72
++ 0.5 setgray rectfill % Draw a shadow
+
-+ if (printercon && context_range_get(printercon))
-+ rangestr = strdup(context_range_get(printercon));
-+ else
-+ rangestr = strdup("unknown");
++ pageWidth 36 mul % x = pageWidth * 1/2 * 72
++ boxWidth 0.5 mul sub % x-= 1/2 box width
++ pageHeight 30 mul % y = pageHeight * 1/4 * 72
++ boxWidth % w = box width
++ pageHeight 14 mul % h = pageHeight * 1/2 * 72
+
-+ cupsdSanitizeURI(p->device_uri, uri, sizeof(uri));
-+ cupsdSetStringf(&audit_message, "printer=%s uri=%s banners=%s,%s range=%s",
-+ p->name, uri, p->job_sheets[0], p->job_sheets[1], rangestr);
-+ audit_log_user_message(AuditLog, AUDIT_LABEL_LEVEL_CHANGE, audit_message,
-+ ServerName, NULL, NULL, 1);
-+ if (printercon)
-+ context_free(printercon);
-+ free(rangestr);
-+ cupsdClearString(&audit_message);
-+ }
-+#endif /* WITH_LSPP */
- }
-
- p->raw = 0;
---- cups-1.3.7/scheduler/job.h.lspp 2008-01-16 22:20:33.000000000 +0000
-+++ cups-1.3.7/scheduler/job.h 2008-05-28 09:44:47.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. */
-+/* (c) Copyright 2005-2006 Hewlett-Packard Development Company, L.P. */
++ 4 copy 1 setgray rectfill % Clear the box to white
++ 0 setgray rectstroke % Draw a black box around it...
+
-+#ifdef WITH_LSPP
-+#include <selinux/selinux.h>
-+#endif /* WITH_LSPP */
++ % Job information text...
++ mediumFont setfont % Medium sized font
+
- /*
- * Job request structure...
- */
-@@ -60,6 +67,10 @@ typedef struct cupsd_job_s
- krb5_ccache ccache; /* Kerberos credential cache */
- 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 */
-+#endif /* WITH_LSPP */
- } cupsd_job_t;
-
-
-@@ -122,7 +133,7 @@ extern void cupsdSetJobHoldUntil(cupsd_
- extern void cupsdSetJobPriority(cupsd_job_t *job, int priority);
- extern void cupsdStopAllJobs(int force);
- extern void cupsdStopJob(cupsd_job_t *job, int force);
--extern int cupsdTimeoutJob(cupsd_job_t *job);
-+extern int cupsdTimeoutJob(cupsd_job_t *job, cupsd_client_t *con);
- extern void cupsdUnloadCompletedJobs(void);
-
-
---- cups-1.3rc2/Makedefs.in.lspp 2007-07-18 20:49:45.000000000 +0100
-+++ cups-1.3rc2/Makedefs.in 2007-07-31 12:28:32.000000000 +0100
-@@ -134,7 +134,7 @@
- LIBCUPSIMAGEORDER = @LIBCUPSIMAGEORDER@
- LINKCUPS = @LINKCUPS@ $(SSLLIBS)
- LINKCUPSIMAGE = @LINKCUPSIMAGE@
--LIBS = $(LINKCUPS) $(COMMONLIBS)
-+LIBS = $(LINKCUPS) $(COMMONLIBS) @LIBAUDIT@ @LIBSELINUX@
- OPTIM = @OPTIM@
- OPTIONS =
- PAMLIBS = @PAMLIBS@
---- cups-1.3rc2/config.h.in.lspp 2007-07-25 01:40:03.000000000 +0100
-+++ cups-1.3rc2/config.h.in 2007-07-31 12:28:32.000000000 +0100
-@@ -537,6 +537,13 @@
- #undef HAVE_REMOVEFILE
-
-
-+/*
-+ * Are we trying to meet LSPP requirements?
-+ */
++ pageWidth 36 mul % x = pageWidth * 1/2 * 72
++ pageHeight 36 mul % y = pageHeight * 1/2 * 72
++ pageHeight 5 mul add % y += 2 lines
++ 2 copy % Copy X & Y
++ moveto
++ (Job ID: ) RIGHT
++ moveto
++ ({printer-name}-{job-id}) show
+
-+#undef WITH_LSPP
++ pageWidth 36 mul % x = pageWidth * 1/2 * 72
++ pageHeight 36 mul % y = pageHeight * 1/2 * 72
++ pageHeight 2 mul add % y += 1 line
++ 2 copy % Copy X & Y
++ moveto
++ (Title: ) RIGHT
++ moveto
++ ({job-name}) show
+
++ pageWidth 36 mul % x = pageWidth * 1/2 * 72
++ pageHeight 36 mul % y = pageHeight * 1/2 * 72
++ pageHeight -1 mul add % y -= 1 line
++ 2 copy % Copy X & Y
++ moveto
++ (Requesting User: ) RIGHT
++ moveto
++ ({job-originating-user-name}) show
+
- #endif /* !_CUPS_CONFIG_H_ */
-
- /*
---- cups-1.3rc2/configure.in.lspp 2007-07-25 00:47:12.000000000 +0100
-+++ cups-1.3rc2/configure.in 2007-07-31 12:28:32.000000000 +0100
-@@ -42,6 +42,8 @@
- sinclude(config-scripts/cups-pdf.m4)
- sinclude(config-scripts/cups-scripting.m4)
-
-+sinclude(config-scripts/cups-lspp.m4)
++ pageWidth 36 mul % x = pageWidth * 1/2 * 72
++ pageHeight 36 mul % y = pageHeight * 1/2 * 72
++ pageHeight -4 mul add % y -= 2 lines
++ 2 copy % Copy X & Y
++ moveto
++ (Billing Info: ) RIGHT
++ moveto
++ ({?job-billing}) show
+
- INSTALL_LANGUAGES=""
- UNINSTALL_LANGUAGES=""
- LANGFILES=""
++ % Then the CUPS logo....
++ gsave
++ pageWidth 4 mul
++ pageWidth 6 mul
++ translate
++ pageWidth 9 mul CUPSLOGO
++ grestore
++
++ % And the ESP logo....
++ gsave
++ pageWidth 59 mul
++ pageWidth 6 mul
++ translate
++ pageWidth 6 mul ESPLOGO
++ grestore
++% Show the page...
++grestore
++showpage
++%
++% End of "$Id$".
++%
++%%EOF
More information about the fedora-extras-commits
mailing list