summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2012-10-25 20:54:15 +0200
committerDidier Raboud <odyx@debian.org>2012-10-25 20:54:15 +0200
commit3110980a1c47466ca52fdf23835a9774786311d6 (patch)
tree5363353962bdaf95ab94d7e42972e0d3627df7cb
parent505bb5aeae558718c3acafc63797fc652368279f (diff)
downloadcups-upstream/1.4.6.tar.gz
Imported Upstream version 1.4.6upstream/1.4.6
-rw-r--r--CHANGES.txt13
-rw-r--r--INSTALL.txt2
-rw-r--r--README.txt4
-rw-r--r--config-scripts/cups-common.m46
-rwxr-xr-xconfigure4
-rw-r--r--cups/adminutil.c79
-rw-r--r--cups/cups.h8
-rw-r--r--doc/help/kerberos.html2
-rw-r--r--doc/help/spec-ppd.html4
-rw-r--r--filter/pstops.c19
-rw-r--r--packaging/cups.spec4
-rw-r--r--ppdc/Makefile8
-rw-r--r--scheduler/job.c13
-rwxr-xr-xtest/run-stp-tests.sh72
14 files changed, 142 insertions, 96 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 4170e43e..919b905b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,17 @@
-CHANGES.txt - 2010-11-11
+CHANGES.txt - 2011-01-06
------------------------
+CHANGES IN CUPS V1.4.6
+
+ - Fixed a "make check" issue on Solaris (STR #3729)
+ - Regression: The pstops filter did not support landscape printing of
+ PostScript files (STR #3722)
+ - The scheduler killed retried (fax) jobs after restarting them
+ (STR #3697)
+ - The cupsAdminSetServerSettings() function disabled sharing when
+ debug logging was enabled (STR #3712)
+
+
CHANGES IN CUPS V1.4.5
- Documentation fixes (STR #3542, STR #3650)
diff --git a/INSTALL.txt b/INSTALL.txt
index 01842f98..2e8dab82 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -1,4 +1,4 @@
-INSTALL - CUPS v1.4.5 - 2010-11-11
+INSTALL - CUPS v1.4.6 - 2011-01-06
----------------------------------
This file describes how to compile and install CUPS from source code. For more
diff --git a/README.txt b/README.txt
index 2bdd8aa1..03aa3d1b 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-README - CUPS v1.4.4 - 2010-11-11
+README - CUPS v1.4.6 - 2011-01-06
---------------------------------
Looking for compile instructions? Read the file "INSTALL.txt"
@@ -150,7 +150,7 @@ PRINTING FILES
LEGAL STUFF
- CUPS is Copyright 2007-2010 by Apple Inc. CUPS and the CUPS logo are
+ CUPS is Copyright 2007-2011 by Apple Inc. CUPS and the CUPS logo are
trademarks of Apple Inc.
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4
index 7bbfb906..f846746f 100644
--- a/config-scripts/cups-common.m4
+++ b/config-scripts/cups-common.m4
@@ -1,5 +1,5 @@
dnl
-dnl "$Id: cups-common.m4 9259 2010-08-13 04:11:46Z mike $"
+dnl "$Id: cups-common.m4 9377 2010-11-17 19:59:14Z mike $"
dnl
dnl Common configuration stuff for CUPS.
dnl
@@ -20,7 +20,7 @@ dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)
dnl Version number information...
-CUPS_VERSION=1.4.5
+CUPS_VERSION=1.4.6
CUPS_REVISION=
#if test -z "$CUPS_REVISION" -a -d .svn; then
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
@@ -370,5 +370,5 @@ AC_SUBST(FONTS)
AC_SUBST(LEGACY_BACKENDS)
dnl
-dnl End of "$Id: cups-common.m4 9259 2010-08-13 04:11:46Z mike $".
+dnl End of "$Id: cups-common.m4 9377 2010-11-17 19:59:14Z mike $".
dnl
diff --git a/configure b/configure
index 4f4defd8..9fae25c8 100755
--- a/configure
+++ b/configure
@@ -1989,7 +1989,7 @@ esac
ac_config_headers="$ac_config_headers config.h"
-CUPS_VERSION=1.4.5
+CUPS_VERSION=1.4.6
CUPS_REVISION=
#if test -z "$CUPS_REVISION" -a -d .svn; then
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
@@ -23217,7 +23217,7 @@ do
cat >>$CONFIG_STATUS <<_ACEOF
# First, check the format of the line:
cat >"\$tmp/defines.sed" <<\\CEOF
-/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
+/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*/b def
/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
b
:def
diff --git a/cups/adminutil.c b/cups/adminutil.c
index 196b03a6..c6ea2dae 100644
--- a/cups/adminutil.c
+++ b/cups/adminutil.c
@@ -1,5 +1,5 @@
/*
- * "$Id: adminutil.c 9282 2010-08-31 15:56:40Z mike $"
+ * "$Id: adminutil.c 9376 2010-11-17 19:58:22Z mike $"
*
* Administration utility API definitions for the Common UNIX Printing
* System (CUPS).
@@ -17,16 +17,14 @@
*
* Contents:
*
- * cupsAdminCreateWindowsPPD() - Create the Windows PPD file for a printer.
- * cupsAdminExportSamba() - Export a printer to Samba.
- * cupsAdminGetServerSettings() - Get settings from the server.
- * _cupsAdminGetServerSettings() - Get settings from the server (private).
- * cupsAdminSetServerSettings() - Set settings on the server.
- * _cupsAdminSetServerSettings() - Set settings on the server (private).
- * do_samba_command() - Do a SAMBA command.
- * get_cupsd_conf() - Get the current cupsd.conf file.
- * invalidate_cupsd_cache() - Invalidate the cached cupsd.conf settings.
- * write_option() - Write a CUPS option to a PPD file.
+ * cupsAdminCreateWindowsPPD() - Create the Windows PPD file for a printer.
+ * cupsAdminExportSamba() - Export a printer to Samba.
+ * cupsAdminGetServerSettings() - Get settings from the server.
+ * cupsAdminSetServerSettings() - Set settings on the server.
+ * do_samba_command() - Do a SAMBA command.
+ * get_cupsd_conf() - Get the current cupsd.conf file.
+ * invalidate_cupsd_cache() - Invalidate the cached cupsd.conf settings.
+ * write_option() - Write a CUPS option to a PPD file.
*/
/*
@@ -50,12 +48,6 @@
* Local functions...
*/
-extern int _cupsAdminGetServerSettings(http_t *http,
- int *num_settings,
- cups_option_t **settings);
-extern int _cupsAdminSetServerSettings(http_t *http,
- int num_settings,
- cups_option_t *settings);
static int do_samba_command(const char *command,
const char *address,
const char *subcommand,
@@ -1024,7 +1016,7 @@ cupsAdminGetServerSettings(
&& *value != '/'
#endif /* AF_LOCAL */
#ifdef AF_INET6
- && strcmp(value, "::1")
+ && strcmp(value, "[::1]")
#endif /* AF_INET6 */
)
remote_access = 1;
@@ -1284,12 +1276,18 @@ cupsAdminSetServerSettings(
else
old_debug_logging = 0;
+ DEBUG_printf(("1cupsAdminSetServerSettings: old debug_logging=%d",
+ old_debug_logging));
+
if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ADMIN, cupsd_num_settings,
cupsd_settings)) != NULL)
old_remote_admin = atoi(val);
else
old_remote_admin = 0;
+ DEBUG_printf(("1cupsAdminSetServerSettings: old remote_admin=%d",
+ old_remote_admin));
+
if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ANY, cupsd_num_settings,
cupsd_settings)) != NULL)
remote_any = atoi(val);
@@ -1305,18 +1303,27 @@ cupsAdminSetServerSettings(
else
old_remote_printers = 1;
+ DEBUG_printf(("1cupsAdminSetServerSettings: old remote_printers=%d",
+ old_remote_printers));
+
if ((val = cupsGetOption(CUPS_SERVER_SHARE_PRINTERS, cupsd_num_settings,
cupsd_settings)) != NULL)
old_share_printers = atoi(val);
else
old_share_printers = 0;
+ DEBUG_printf(("1cupsAdminSetServerSettings: old share_printers=%d",
+ old_share_printers));
+
if ((val = cupsGetOption(CUPS_SERVER_USER_CANCEL_ANY, cupsd_num_settings,
cupsd_settings)) != NULL)
old_user_cancel_any = atoi(val);
else
old_user_cancel_any = 0;
+ DEBUG_printf(("1cupsAdminSetServerSettings: old user_cancel_any=%d",
+ old_user_cancel_any));
+
cupsFreeOptions(cupsd_num_settings, cupsd_settings);
/*
@@ -1340,16 +1347,22 @@ cupsAdminSetServerSettings(
else
debug_logging = -1;
+ DEBUG_printf(("1cupsAdminSetServerSettings: debug_logging=%d",
+ debug_logging));
+
if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ANY, num_settings,
settings)) != NULL)
remote_any = atoi(val);
+ DEBUG_printf(("1cupsAdminSetServerSettings: remote_any=%d",
+ remote_any));
+
if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ADMIN, num_settings,
settings)) != NULL)
{
remote_admin = atoi(val);
- if (remote_admin == old_remote_admin && remote_any < 0)
+ if (remote_admin == old_remote_admin)
{
/*
* No change to this setting...
@@ -1361,6 +1374,9 @@ cupsAdminSetServerSettings(
else
remote_admin = -1;
+ DEBUG_printf(("1cupsAdminSetServerSettings: remote_admin=%d",
+ remote_admin));
+
if ((val = cupsGetOption(CUPS_SERVER_REMOTE_PRINTERS, num_settings,
settings)) != NULL)
{
@@ -1378,12 +1394,15 @@ cupsAdminSetServerSettings(
else
remote_printers = -1;
+ DEBUG_printf(("1cupsAdminSetServerSettings: remote_printers=%d",
+ remote_printers));
+
if ((val = cupsGetOption(CUPS_SERVER_SHARE_PRINTERS, num_settings,
settings)) != NULL)
{
share_printers = atoi(val);
- if (share_printers == old_share_printers && remote_any < 0)
+ if (share_printers == old_share_printers)
{
/*
* No change to this setting...
@@ -1395,6 +1414,9 @@ cupsAdminSetServerSettings(
else
share_printers = -1;
+ DEBUG_printf(("1cupsAdminSetServerSettings: share_printers=%d",
+ share_printers));
+
if ((val = cupsGetOption(CUPS_SERVER_USER_CANCEL_ANY, num_settings,
settings)) != NULL)
{
@@ -1412,6 +1434,9 @@ cupsAdminSetServerSettings(
else
user_cancel_any = -1;
+ DEBUG_printf(("1cupsAdminSetServerSettings: user_cancel_any=%d",
+ user_cancel_any));
+
/*
* Create a temporary file for the new cupsd.conf file...
*/
@@ -1463,7 +1488,7 @@ cupsAdminSetServerSettings(
while (cupsFileGetConf(cupsd, line, sizeof(line), &value, &linenum))
{
if ((!strcasecmp(line, "Port") || !strcasecmp(line, "Listen")) &&
- (remote_admin >= 0 || remote_any >= 0 || share_printers >= 0))
+ (remote_admin >= 0 || remote_any > 0 || share_printers >= 0))
{
if (!wrote_port_listen)
{
@@ -1678,7 +1703,7 @@ cupsAdminSetServerSettings(
remote_any > 0 ? "all" : "@LOCAL");
}
else if (in_root_location &&
- (remote_admin >= 0 || remote_any >= 0 || share_printers >= 0))
+ (remote_admin >= 0 || remote_any > 0 || share_printers >= 0))
{
wrote_root_location = 1;
@@ -1780,7 +1805,7 @@ cupsAdminSetServerSettings(
in_cancel_job = 0;
}
else if ((((in_admin_location || in_conf_location || in_root_location) &&
- (remote_admin >= 0 || remote_any >= 0)) ||
+ (remote_admin >= 0 || remote_any > 0)) ||
(in_root_location && share_printers >= 0)) &&
(!strcasecmp(line, "Allow") || !strcasecmp(line, "Deny") ||
!strcasecmp(line, "Order")))
@@ -1826,7 +1851,7 @@ cupsAdminSetServerSettings(
/*
* Record the non-policy, non-location directives that we find
* in the server settings, since we cache this info and record it
- * in _cupsAdminGetServerSettings()...
+ * in cupsAdminGetServerSettings()...
*/
cupsd_num_settings = cupsAddOption(line, value, cupsd_num_settings,
@@ -1885,7 +1910,7 @@ cupsAdminSetServerSettings(
}
if (!wrote_port_listen &&
- (remote_admin >= 0 || remote_any >= 0 || share_printers >= 0))
+ (remote_admin >= 0 || remote_any > 0 || share_printers >= 0))
{
if (remote_admin > 0 || remote_any > 0 || share_printers > 0)
{
@@ -1906,7 +1931,7 @@ cupsAdminSetServerSettings(
}
if (!wrote_root_location &&
- (remote_admin >= 0 || remote_any >= 0 || share_printers >= 0))
+ (remote_admin >= 0 || remote_any > 0 || share_printers >= 0))
{
if (remote_admin > 0 && share_printers > 0)
cupsFilePuts(temp,
@@ -2430,5 +2455,5 @@ write_option(cups_file_t *dstfp, /* I - PPD file */
/*
- * End of "$Id: adminutil.c 9282 2010-08-31 15:56:40Z mike $".
+ * End of "$Id: adminutil.c 9376 2010-11-17 19:58:22Z mike $".
*/
diff --git a/cups/cups.h b/cups/cups.h
index 20a8d8b2..f6bfb394 100644
--- a/cups/cups.h
+++ b/cups/cups.h
@@ -1,5 +1,5 @@
/*
- * "$Id: cups.h 9171 2010-06-22 03:18:27Z mike $"
+ * "$Id: cups.h 9377 2010-11-17 19:59:14Z mike $"
*
* API definitions for CUPS.
*
@@ -61,10 +61,10 @@ extern "C" {
* Constants...
*/
-# define CUPS_VERSION 1.0405
+# define CUPS_VERSION 1.0406
# define CUPS_VERSION_MAJOR 1
# define CUPS_VERSION_MINOR 4
-# define CUPS_VERSION_PATCH 5
+# define CUPS_VERSION_PATCH 6
# define CUPS_BC_FD 3 /* Back-channel file descriptor for select/poll */
# define CUPS_DATE_ANY (time_t)-1
@@ -336,5 +336,5 @@ extern http_status_t cupsWriteRequestData(http_t *http, const char *buffer,
#endif /* !_CUPS_CUPS_H_ */
/*
- * End of "$Id: cups.h 9171 2010-06-22 03:18:27Z mike $".
+ * End of "$Id: cups.h 9377 2010-11-17 19:59:14Z mike $".
*/
diff --git a/doc/help/kerberos.html b/doc/help/kerberos.html
index 941867fc..62c19eb0 100644
--- a/doc/help/kerberos.html
+++ b/doc/help/kerberos.html
@@ -113,7 +113,7 @@ converted to just "user" for purposes of user and group checks.</P>
<P>In order to support printing to a shared printer, CUPS has to ask the KDC
for a copy of your credentials (this is called delegation) that can be sent to
-the remote server for authenticatation. Delegation only works when the system
+the remote server for authentication. Delegation only works when the system
has a stable hostname which maps to the current address of the system, which
is why you need a static IP address or DHCP that updates the DNS entry for your
system.</P>
diff --git a/doc/help/spec-ppd.html b/doc/help/spec-ppd.html
index 8d400575..1acd847d 100644
--- a/doc/help/spec-ppd.html
+++ b/doc/help/spec-ppd.html
@@ -8,7 +8,7 @@
</head>
<body>
<!--
- "$Id: spec-ppd.html 9170 2010-06-22 03:06:13Z mike $"
+ "$Id: spec-ppd.html 9406 2010-12-08 07:23:22Z mike $"
CUPS PPD extensions specification for CUPS.
@@ -438,7 +438,7 @@ choice followed by testing each option choice to resolve the conflict.</p>
<h3><span class='info'>CUPS 1.4/Mac OS X 10.6</span><a name='cupsUIResolver'>cupsUIResolver</a></h3>
-<p class='summary'>*cupsUIResolution resolver: "*Keyword1 OptionKeyword1 *Keyword2 OptionKeyword2 ..."</p>
+<p class='summary'>*cupsUIResolver resolver: "*Keyword1 OptionKeyword1 *Keyword2 OptionKeyword2 ..."</p>
<p>Specifies two or more options to mark/select to resolve a constraint. The
"resolver" string identifies a particular action to take for one or more
diff --git a/filter/pstops.c b/filter/pstops.c
index 82520ce5..9f15c6c2 100644
--- a/filter/pstops.c
+++ b/filter/pstops.c
@@ -1,5 +1,5 @@
/*
- * "$Id: pstops.c 9286 2010-08-31 18:36:08Z mike $"
+ * "$Id: pstops.c 9376 2010-11-17 19:58:22Z mike $"
*
* PostScript filter for the Common UNIX Printing System (CUPS).
*
@@ -2421,18 +2421,6 @@ set_pstops_options(
doc->new_bounding_box[3] = INT_MIN;
/*
- * See what the source content type is. When printing PostScript content we
- * want to do scaling and orientation, but otherwise we don't want to change
- * anything...
- */
-
- if ((content_type = getenv("CONTENT_TYPE")) == NULL)
- content_type = "application/postscript";
-
- if (!strcasecmp(content_type, "application/postscript"))
- Orientation = 0;
-
- /*
* AP_FIRSTPAGE_* and the corresponding non-first-page options.
*/
@@ -2526,6 +2514,9 @@ set_pstops_options(
* (Only for original PostScript content)
*/
+ if ((content_type = getenv("CONTENT_TYPE")) == NULL)
+ content_type = "application/postscript";
+
if (!strcasecmp(content_type, "application/postscript"))
{
if ((val = cupsGetOption("fitplot", num_options, options)) != NULL &&
@@ -3532,5 +3523,5 @@ write_options(
/*
- * End of "$Id: pstops.c 9286 2010-08-31 18:36:08Z mike $".
+ * End of "$Id: pstops.c 9376 2010-11-17 19:58:22Z mike $".
*/
diff --git a/packaging/cups.spec b/packaging/cups.spec
index 974de6fd..52a581fd 100644
--- a/packaging/cups.spec
+++ b/packaging/cups.spec
@@ -34,12 +34,12 @@
Summary: CUPS
Name: cups
-Version: 1.4.5
+Version: 1.4.6
Release: 1
Epoch: 1
License: GPL
Group: System Environment/Daemons
-Source: http://ftp.easysw.com/pub/cups/1.4.5/cups-1.4.5-source.tar.gz
+Source: http://ftp.easysw.com/pub/cups/1.4.6/cups-1.4.6-source.tar.gz
Url: http://www.cups.org
Packager: Anonymous <anonymous@foo.com>
Vendor: Apple Inc.
diff --git a/ppdc/Makefile b/ppdc/Makefile
index 76b1942a..0288d47c 100644
--- a/ppdc/Makefile
+++ b/ppdc/Makefile
@@ -1,9 +1,9 @@
#
-# "$Id: Makefile 9120 2010-04-23 18:56:34Z mike $"
+# "$Id: Makefile 9423 2011-01-06 22:21:05Z mike $"
#
# Makefile for the CUPS PPD Compiler.
#
-# Copyright 2007-2010 by Apple Inc.
+# Copyright 2007-2011 by Apple Inc.
# Copyright 2002-2006 by Easy Software Products.
#
# These coded instructions, statements, and computer programs are the
@@ -294,7 +294,7 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/libcups.a
./ppdc-static -I ../data sample.drv
./ppdi-static -I ../data -o sample-import.drv ppd/*
./ppdc-static -I ../data -d ppd2 sample-import.drv
- if diff -qr ppd ppd2; then \
+ if diff -r ppd ppd2 >/dev/null; then \
echo PPD import OK; \
else \
echo PPD import FAILED; \
@@ -400,5 +400,5 @@ include Dependencies
#
-# End of "$Id: Makefile 9120 2010-04-23 18:56:34Z mike $".
+# End of "$Id: Makefile 9423 2011-01-06 22:21:05Z mike $".
#
diff --git a/scheduler/job.c b/scheduler/job.c
index a41c0ba0..c259772d 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -1,5 +1,5 @@
/*
- * "$Id: job.c 9337 2010-10-17 04:13:56Z mike $"
+ * "$Id: job.c 9393 2010-11-30 22:35:02Z mike $"
*
* Job management routines for the CUPS scheduler.
*
@@ -294,6 +294,9 @@ cupsdCheckJobs(void)
if (job->kill_time && job->kill_time <= curtime)
{
+ cupsdLogMessage(CUPSD_LOG_ERROR, "[Job %d] Stopping unresponsive job!",
+ job->id);
+
stop_job(job, CUPSD_JOB_FORCE);
continue;
}
@@ -2723,6 +2726,12 @@ finalize_job(cupsd_job_t *job, /* I - Job */
job->profile = NULL;
/*
+ * Clear the unresponsive job watchdog timer...
+ */
+
+ job->kill_time = 0;
+
+ /*
* Close pipes and status buffer...
*/
@@ -4637,5 +4646,5 @@ update_job_attrs(cupsd_job_t *job, /* I - Job to update */
/*
- * End of "$Id: job.c 9337 2010-10-17 04:13:56Z mike $".
+ * End of "$Id: job.c 9393 2010-11-30 22:35:02Z mike $".
*/
diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
index d18eac30..3054c951 100755
--- a/test/run-stp-tests.sh
+++ b/test/run-stp-tests.sh
@@ -1,11 +1,11 @@
#!/bin/sh
#
-# "$Id: run-stp-tests.sh 9258 2010-08-13 01:34:04Z mike $"
+# "$Id: run-stp-tests.sh 9423 2011-01-06 22:21:05Z mike $"
#
# Perform the complete set of IPP compliance tests specified in the
# CUPS Software Test Plan.
#
-# Copyright 2007-2010 by Apple Inc.
+# Copyright 2007-2011 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
@@ -24,10 +24,20 @@ argcount=$#
make
#
+# Solaris has a non-POSIX grep in /bin...
+#
+
+if test -x /usr/xpg4/bin/grep; then
+ GREP=/usr/xpg4/bin/grep
+else
+ GREP=grep
+fi
+
+#
# Figure out the proper echo options...
#
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+if (echo "testing\c"; echo 1,2,3) | $GREP c >/dev/null; then
ac_n=-n
ac_c=
else
@@ -625,7 +635,7 @@ else
fi
# Pages printed on Test1 (within 1 page for timing-dependent cancel issues)
-count=`grep '^Test1 ' /tmp/cups-$user/log/page_log | awk 'BEGIN{count=0}{count=count+$7}END{print count}'`
+count=`$GREP '^Test1 ' /tmp/cups-$user/log/page_log | awk 'BEGIN{count=0}{count=count+$7}END{print count}'`
expected=`expr $pjobs \* 2 + 34`
expected2=`expr $expected + 2`
if test $count -lt $expected -a $count -gt $expected2; then
@@ -638,7 +648,7 @@ else
fi
# Paged printed on Test2
-count=`grep '^Test2 ' /tmp/cups-$user/log/page_log | awk 'BEGIN{count=0}{count=count+$7}END{print count}'`
+count=`$GREP '^Test2 ' /tmp/cups-$user/log/page_log | awk 'BEGIN{count=0}{count=count+$7}END{print count}'`
expected=`expr $pjobs \* 2 + 3`
if test $count != $expected; then
echo "FAIL: Printer 'Test2' produced $count page(s), expected $expected."
@@ -662,11 +672,11 @@ else
fi
# Did CUPS-Get-Default get logged?
-if grep -q CUPS-Get-Default /tmp/cups-$user/log/access_log; then
+if $GREP -q CUPS-Get-Default /tmp/cups-$user/log/access_log; then
echo "FAIL: CUPS-Get-Default logged with 'AccessLogLevel actions'"
echo "<P>FAIL: CUPS-Get-Default logged with 'AccessLogLevel actions'</P>" >>$strfile
echo "<PRE>" >>$strfile
- grep CUPS-Get-Default /tmp/cups-$user/log/access_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+ $GREP CUPS-Get-Default /tmp/cups-$user/log/access_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
fail=`expr $fail + 1`
else
@@ -675,13 +685,13 @@ else
fi
# Emergency log messages
-count=`grep '^X ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^X ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count != 0; then
echo "FAIL: $count emergency messages, expected 0."
- grep '^X ' /tmp/cups-$user/log/error_log
+ $GREP '^X ' /tmp/cups-$user/log/error_log
echo "<P>FAIL: $count emergency messages, expected 0.</P>" >>$strfile
echo "<PRE>" >>$strfile
- grep '^X ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+ $GREP '^X ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
fail=`expr $fail + 1`
else
@@ -690,13 +700,13 @@ else
fi
# Alert log messages
-count=`grep '^A ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^A ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count != 0; then
echo "FAIL: $count alert messages, expected 0."
- grep '^A ' /tmp/cups-$user/log/error_log
+ $GREP '^A ' /tmp/cups-$user/log/error_log
echo "<P>FAIL: $count alert messages, expected 0.</P>" >>$strfile
echo "<PRE>" >>$strfile
- grep '^A ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+ $GREP '^A ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
fail=`expr $fail + 1`
else
@@ -705,13 +715,13 @@ else
fi
# Critical log messages
-count=`grep '^C ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^C ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count != 0; then
echo "FAIL: $count critical messages, expected 0."
- grep '^C ' /tmp/cups-$user/log/error_log
+ $GREP '^C ' /tmp/cups-$user/log/error_log
echo "<P>FAIL: $count critical messages, expected 0.</P>" >>$strfile
echo "<PRE>" >>$strfile
- grep '^C ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+ $GREP '^C ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
fail=`expr $fail + 1`
else
@@ -720,13 +730,13 @@ else
fi
# Error log messages
-count=`grep '^E ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^E ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count != 18; then
echo "FAIL: $count error messages, expected 18."
- grep '^E ' /tmp/cups-$user/log/error_log
+ $GREP '^E ' /tmp/cups-$user/log/error_log
echo "<P>FAIL: $count error messages, expected 18.</P>" >>$strfile
echo "<PRE>" >>$strfile
- grep '^E ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+ $GREP '^E ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
fail=`expr $fail + 1`
else
@@ -735,13 +745,13 @@ else
fi
# Warning log messages
-count=`grep '^W ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^W ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count != 0; then
echo "FAIL: $count warning messages, expected 0."
- grep '^W ' /tmp/cups-$user/log/error_log
+ $GREP '^W ' /tmp/cups-$user/log/error_log
echo "<P>FAIL: $count warning messages, expected 0.</P>" >>$strfile
echo "<PRE>" >>$strfile
- grep '^W ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+ $GREP '^W ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
fail=`expr $fail + 1`
else
@@ -750,13 +760,13 @@ else
fi
# Notice log messages
-count=`grep '^N ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^N ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count != 0; then
echo "FAIL: $count notice messages, expected 0."
- grep '^N ' /tmp/cups-$user/log/error_log
+ $GREP '^N ' /tmp/cups-$user/log/error_log
echo "<P>FAIL: $count notice messages, expected 0.</P>" >>$strfile
echo "<PRE>" >>$strfile
- grep '^N ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+ $GREP '^N ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
fail=`expr $fail + 1`
else
@@ -765,7 +775,7 @@ else
fi
# Info log messages
-count=`grep '^I ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^I ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count = 0; then
echo "FAIL: $count info messages, expected more than 0."
echo "<P>FAIL: $count info messages, expected more than 0.</P>" >>$strfile
@@ -776,7 +786,7 @@ else
fi
# Debug log messages
-count=`grep '^D ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^D ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count = 0; then
echo "FAIL: $count debug messages, expected more than 0."
echo "<P>FAIL: $count debug messages, expected more than 0.</P>" >>$strfile
@@ -787,7 +797,7 @@ else
fi
# Debug2 log messages
-count=`grep '^d ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^d ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count = 0; then
echo "FAIL: $count debug2 messages, expected more than 0."
echo "<P>FAIL: $count debug2 messages, expected more than 0.</P>" >>$strfile
@@ -798,7 +808,7 @@ else
fi
# Page log file...
-if grep -iq 'testfile.pdf na_letter_8.5x11in' /tmp/cups-$user/log/page_log; then
+if $GREP -iq 'testfile.pdf na_letter_8.5x11in' /tmp/cups-$user/log/page_log; then
echo "PASS: page_log formatted correctly."
echo "<P>PASS: page_log formatted correctly.</P>" >>$strfile
else
@@ -815,7 +825,7 @@ echo "</PRE>" >>$strfile
echo "<H2>error_log</H2>" >>$strfile
echo "<PRE>" >>$strfile
-grep -v '^d' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+$GREP -v '^d' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
echo "<H2>page_log</H2>" >>$strfile
@@ -852,5 +862,5 @@ if test $fail != 0; then
fi
#
-# End of "$Id: run-stp-tests.sh 9258 2010-08-13 01:34:04Z mike $"
+# End of "$Id: run-stp-tests.sh 9423 2011-01-06 22:21:05Z mike $"
#