From d47e634478011f5f594fa9a7d9e36521e53a318d Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mar 05 2013 16:45:29 +0000 Subject: Documentation fixes from STR #4223 (bug #915981). Resolves: rhbz#915981 (cherry picked from commit 19635ac1b10a6573f556960655793a343ebeefec) --- diff --git a/cups-str4223.patch b/cups-str4223.patch index 567add7..c45ba89 100644 --- a/cups-str4223.patch +++ b/cups-str4223.patch @@ -193,7 +193,14 @@ diff -up cups-1.5.4/configure.in.str4223 cups-1.5.4/configure.in conf/cupsd.conf conf/mime.convs conf/pam.std -@@ -82,6 +83,7 @@ AC_OUTPUT(Makedefs +@@ -76,12 +77,14 @@ AC_OUTPUT(Makedefs + data/cups.socket + data/cups.path + desktop/cups.desktop ++ doc/help/ref-cups-files-conf.html + doc/help/ref-cupsd-conf.html + doc/help/standard.html + doc/index.html man/client.conf.man man/cups-deviced.man man/cups-driverd.man @@ -215,8 +222,45 @@ diff -up cups-1.5.4/conf/Makefile.str4223 cups-1.5.4/conf/Makefile diff -up cups-1.5.4/doc/help/ref-cupsd-conf.html.in.str4223 cups-1.5.4/doc/help/ref-cupsd-conf.html.in --- cups-1.5.4/doc/help/ref-cupsd-conf.html.in.str4223 2012-01-30 21:40:21.000000000 +0000 -+++ cups-1.5.4/doc/help/ref-cupsd-conf.html.in 2012-12-06 12:52:04.945832647 +0000 -@@ -191,82 +191,6 @@ HREF="#Location">Location + + +-

AccessLog

+- +-

Examples

+- +-
+-AccessLog /var/log/cups/access_log
+-AccessLog /var/log/cups/access_log-%s
+-AccessLog syslog
+-
+- +-

Description

+- +-

The AccessLog directive sets the name of the +-access log file. If the filename is not absolute then it is +-assumed to be relative to the ServerRoot directory. The +-access log file is stored in "common log format" and can be used +-by any web access reporting tool to generate a report on CUPS +-server activity.

+- +-

The server name can be included in the filename by using +-%s in the name.

+- +-

The special name "syslog" can be used to send the access +-information to the system log instead of a plain file.

+- +-

The default access log file is +-@CUPS_LOGDIR@/access_log.

+- +- +

AccessLogLevel

+ +

Examples

+@@ -191,82 +161,6 @@ HREF="#Location">LocationLimit section.

@@ -299,7 +343,299 @@ diff -up cups-1.5.4/doc/help/ref-cupsd-conf.html.in.str4223 cups-1.5.4/doc/help/

AuthType

Examples

-@@ -2544,65 +2468,6 @@ purged.

+@@ -898,40 +792,6 @@ used.

+

The default is to not allow classification overrides.

+ + +-

CUPS 1.1.15ConfigFilePerm

+- +-

Examples

+- +-
+-ConfigFilePerm 0644
+-ConfigFilePerm 0640
+-
+- +-

Description

+- +-

The ConfigFilePerm directive specifies the permissions to use when the scheduler writes configuration and cache files, typically in response to IPP or HTTP requests. The default is @CUPS_CONFIG_FILE_PERM@.

+- +-
Note: +- +-

The permissions for the printers.conf file are always masked to only allow access from the scheduler user (typically root). This is done because printer device URIs sometimes contain sensitive authentication information that should not be generally known on the system. There is no way to disable this security feature.

+- +-
+- +- +-

DataDir

+- +-

Examples

+- +-
+-DataDir /usr/share/cups
+-
+- +-

Description

+- +-

The DataDir directive sets the directory to use +-for data files.

+- +- +

CUPS 1.2/Mac OS X 10.5DefaultAuthType

+ +

Examples

+@@ -1113,32 +973,6 @@ causes the update to occur as soon as po + milliseconds.

+ + +-

DocumentRoot

+- +-

Examples

+- +-
+-DocumentRoot /usr/share/doc/cups
+-DocumentRoot /foo/bar/doc/cups
+-
+- +-

Description

+- +-

The DocumentRoot directive specifies the location +-of web content for the HTTP server in CUPS. If an absolute path +-is not specified then it is assumed to be relative to the ServerRoot directory. The +-default directory is @CUPS_DOCROOT@.

+- +-

Documents are first looked up in a sub-directory for the +-primary language requested by the client (e.g. +-@CUPS_DOCROOT@/fr/...) and then directly under +-the DocumentRoot directory (e.g. +-@CUPS_DOCROOT@/...), so it is possible to +-localize the web content by providing subdirectories for each +-language needed.

+- +- +

Encryption

+ +

Examples

+@@ -1161,31 +995,6 @@ encryption settings for that location. T + IfRequested for all locations.

+ + +-

ErrorLog

+- +-

Examples

+- +-
+-ErrorLog /var/log/cups/error_log
+-ErrorLog /var/log/cups/error_log-%s
+-ErrorLog syslog
+-
+- +-

Description

+- +-

The ErrorLog directive sets the name of the error +-log file. If the filename is not absolute then it is assumed to +-be relative to the ServerRoot directory. The +-default error log file is @CUPS_LOGDIR@/error_log.

+- +-

The server name can be included in the filename by using +-%s in the name.

+- +-

The special name "syslog" can be used to send the error +-information to the system log instead of a plain file.

+- +- +

CUPS 1.3/Mac OS X 10.5ErrorPolicy

+ +

Examples

+@@ -1225,90 +1034,6 @@ printer.

+ + + +-

CUPS 1.4/Mac OS X 10.6FatalErrors

+- +-

Examples

+- +-
+-FatalErrors none
+-FatalErrors all
+-FatalErrors browse
+-FatalErrors config
+-FatalErrors listen
+-FatalErrors log
+-FatalErrors permissions
+-FatalErrors all -permissions
+-FatalErrors config permissions log
+-
+- +-

Description

+- +-

The FatalErrors directive determines whether certain kinds of +-errors are fatal. The following kinds of errors are currently recognized:

+- +- +- +-

Multiple errors can be listed, and the form "-kind" can be used with +-all to remove specific kinds of errors. The default setting is +-@CUPS_FATAL_ERRORS@.

+- +- +-

CUPS 1.1.18FileDevice

+- +-

Examples

+- +-
+-FileDevice Yes
+-FileDevice No
+-
+- +-

Description

+- +-

The FileDevice directive determines whether the +-scheduler allows new printers to be added using device URIs of +-the form file:/filename. File devices are most often +-used to test new printer drivers and do not support raw file +-printing.

+- +-

The default setting is No.

+- +-
Note: +- +-

File devices are managed by the scheduler. Since the +-scheduler normally runs as the root user, file devices +-can be used to overwrite system files and potentially +-gain unauthorized access to the system. If you must +-create printers using file devices, we recommend that +-you set the FileDevice directive to +-Yes for only as long as you need to add the +-printers to the system, and then reset the directive to +-No.

+- +-
+- +- +

CUPS 1.1.3FilterLimit

+ +

Examples

+@@ -1353,39 +1078,6 @@ value to assign to filter processes. The + is 0.

+ + +-

CUPS 1.1.3FontPath

+- +-

Examples

+- +-
+-FontPath /foo/bar/fonts
+-FontPath /usr/share/cups/fonts:/foo/bar/fonts
+-
+- +-

Description

+- +-

The FontPath directive specifies the font path to +-use when searching for fonts. The default font path is +-/usr/share/cups/fonts.

+- +- +-

Group

+- +-

Examples

+- +-
+-Group lp
+-Group nobody
+-
+- +-

Description

+- +-

The Group directive specifies the UNIX group that +-filter and CGI programs run as. The default group is +-system-specific but is usually lp or +-nobody.

+- +- +

CUPS 1.1.10HideImplicitMembers

+ +

Examples

+@@ -2030,22 +1722,6 @@ error occurs during printing. The defaul + disables debugging history entirely and is not recommended.

+ + +-

CUPS 1.1.15LogFilePerm

+- +-

Examples

+- +-
+-LogFilePerm 0644
+-LogFilePerm 0600
+-
+- +-

Description

+- +-

The LogFilePerm directive specifies the +-permissions to use when writing log files. The default +-is @CUPS_LOG_FILE_PERM@.

+- +- +

LogLevel

+ +

Examples

+@@ -2350,31 +2026,6 @@ HREF="#Location">LocationLimit section.

+ + +-

PageLog

+- +-

Examples

+- +-
+-PageLog /var/log/cups/page_log
+-PageLog /var/log/cups/page_log-%s
+-PageLog syslog
+-
+- +-

Description

+- +-

The PageLog directive sets the name of the page +-log file. If the filename is not absolute then it is assumed to +-be relative to the ServerRoot directory. The +-default page log file is @CUPS_LOGDIR@/page_log.

+- +-

The server name can be included in the filename by using +-%s in the name.

+- +-

The special name "syslog" can be used to send the page +-information to the system log instead of a plain file.

+- +- +

PageLogFormat

+ +

Examples

+@@ -2544,65 +2195,6 @@ purged.

files as soon as each job is completed, canceled, or aborted.

@@ -365,7 +701,7 @@ diff -up cups-1.5.4/doc/help/ref-cupsd-conf.html.in.str4223 cups-1.5.4/doc/help/

CUPS 1.1.21ReloadTimeout

Examples

-@@ -2619,42 +2484,6 @@ of seconds the scheduler will wait for a +@@ -2619,42 +2211,6 @@ of seconds the scheduler will wait for a before doing a restart. The default is 30 seconds.

@@ -408,7 +744,7 @@ diff -up cups-1.5.4/doc/help/ref-cupsd-conf.html.in.str4223 cups-1.5.4/doc/help/

CUPS 1.1.7Require

Examples

-@@ -2806,64 +2635,6 @@ alternate name with a ServerAlias direct +@@ -2806,64 +2362,6 @@ alternate name with a ServerAlias direct @@ -473,7 +809,7 @@ diff -up cups-1.5.4/doc/help/ref-cupsd-conf.html.in.str4223 cups-1.5.4/doc/help/

ServerName

Examples

-@@ -2880,23 +2651,6 @@ that is reported to clients. By default +@@ -2880,23 +2378,6 @@ that is reported to clients. By default hostname.

@@ -497,7 +833,7 @@ diff -up cups-1.5.4/doc/help/ref-cupsd-conf.html.in.str4223 cups-1.5.4/doc/help/

CUPS 1.1.21ServerTokens

Examples

-@@ -3075,53 +2829,6 @@ subscription values to make private. The +@@ -3075,53 +2556,6 @@ subscription values to make private. The HREF="#Policy">Policy section.

@@ -551,7 +887,7 @@ diff -up cups-1.5.4/doc/help/ref-cupsd-conf.html.in.str4223 cups-1.5.4/doc/help/

Timeout

Examples

-@@ -3160,31 +2867,6 @@ the same printer available from multiple +@@ -3160,31 +2594,6 @@ the same printer available from multiple

The default is @CUPS_USE_NETWORK_DEFAULT@.

@@ -586,7 +922,7 @@ diff -up cups-1.5.4/doc/help/ref-cupsd-conf.html.in.str4223 cups-1.5.4/doc/help/ diff -up cups-1.5.4/doc/help/ref-cups-files-conf.html.in.str4223 cups-1.5.4/doc/help/ref-cups-files-conf.html.in --- cups-1.5.4/doc/help/ref-cups-files-conf.html.in.str4223 2012-12-06 12:52:04.945832647 +0000 +++ cups-1.5.4/doc/help/ref-cups-files-conf.html.in 2012-12-06 12:52:04.945832647 +0000 -@@ -0,0 +1,531 @@ +@@ -0,0 +1,513 @@ + + + @@ -663,24 +999,6 @@ diff -up cups-1.5.4/doc/help/ref-cups-files-conf.html.in.str4223 cups-1.5.4/doc/ +for data files.

+ + -+

CUPS 1.2/OS X 10.5DefaultAuthType

-+ -+

Examples

-+ -+
-+DefaultAuthType Basic
-+DefaultAuthType BasicDigest
-+DefaultAuthType Digest
-+DefaultAuthType Negotiate
-+
-+ -+

Description

-+ -+

The DefaultAuthType directive specifies the type -+of authentication to use for IPP operations that require a -+username. The default is Basic.

-+ -+ +

DocumentRoot

+ +

Examples

@@ -1130,6 +1448,14 @@ diff -up cups-1.5.4/doc/Makefile.str4223 cups-1.5.4/doc/Makefile # Copyright 1997-2007 by Easy Software Products. # # These coded instructions, statements, and computer programs are the +@@ -105,6 +105,7 @@ HELPFILES = \ + help/ref-classes-conf.html \ + help/ref-client-conf.html \ + help/ref-cupsd-conf.html \ ++ help/ref-cups-files-conf.html \ + help/ref-error_log.html \ + help/ref-mailto-conf.html \ + help/ref-page_log.html \ diff -up cups-1.5.4/locale/cups_da.po.str4223 cups-1.5.4/locale/cups_da.po --- cups-1.5.4/locale/cups_da.po.str4223 2012-03-07 21:38:28.000000000 +0000 +++ cups-1.5.4/locale/cups_da.po 2012-12-06 12:52:23.562877028 +0000 @@ -1608,6 +1934,30 @@ diff -up cups-1.5.4/locale/cups_zh_TW.po.str4223 cups-1.5.4/locale/cups_zh_TW.po #~ msgid "Fuser temperature high!" #~ msgstr "加熱器溫度高!" +diff -up cups-1.5.4/man/cupsctl.man.str4223 cups-1.5.4/man/cupsctl.man +--- cups-1.5.4/man/cupsctl.man.str4223 2011-01-11 03:04:04.000000000 +0000 ++++ cups-1.5.4/man/cupsctl.man 2013-03-05 14:56:43.496345943 +0000 +@@ -12,7 +12,7 @@ + .\" which should have been included with this file. If this file is + .\" file is missing or damaged, see the license at "http://www.cups.org/". + .\" +-.TH cupsctl 8 "CUPS" "10 January 2011" "Apple Inc." ++.TH cupsctl 8 "CUPS" "12 December 2012" "Apple Inc." + .SH NAME + cupsctl \- configure cupsd.conf options + .SH SYNOPSIS +@@ -89,11 +89,6 @@ Disable printer sharing: + .nf + cupsctl --no-shared-printers + .fi +-.LP +-Enable printing using the file: pseudo-device: +-.nf +- cupsctl FileDevice=Yes +-.fi + .SH KNOWN ISSUES + You cannot set the Listen or Port directives using \fIcupsctl\fR. + .SH SEE ALSO diff -up cups-1.5.4/man/cupsd.conf.man.in.str4223 cups-1.5.4/man/cupsd.conf.man.in --- cups-1.5.4/man/cupsd.conf.man.in.str4223 2011-05-18 22:33:35.000000000 +0100 +++ cups-1.5.4/man/cupsd.conf.man.in 2012-12-06 12:52:04.946832650 +0000 @@ -2125,7 +2475,7 @@ diff -up cups-1.5.4/scheduler/client.c.str4223 cups-1.5.4/scheduler/client.c cups_file_t *in, /* Input file */ *out; /* Output file */ char buffer[16384]; /* Copy buffer */ -@@ -3843,13 +3839,8 @@ install_conf_file(cupsd_client_t *con) / +@@ -3843,19 +3839,14 @@ install_conf_file(cupsd_client_t *con) / * Open the new config file... */ @@ -2136,11 +2486,42 @@ diff -up cups-1.5.4/scheduler/client.c.str4223 cups-1.5.4/scheduler/client.c - mode = ConfigFilePerm; - - if ((out = cupsdCreateConfFile(filename, mode)) == NULL) -+ snprintf(filename, sizeof(filename), "%s/cupsd.conf", ServerRoot); -+ if ((out = cupsdCreateConfFile(filename, ConfigFilePerm)) == NULL) ++ if ((out = cupsdCreateConfFile(ConfigurationFile, ConfigFilePerm)) == NULL) { cupsFileClose(in); return (HTTP_SERVER_ERROR); + } + +- cupsdLogMessage(CUPSD_LOG_INFO, "Installing config file \"%s\"...", filename); ++ cupsdLogMessage(CUPSD_LOG_INFO, "Installing config file \"%s\"...", ++ ConfigurationFile); + + /* + * Copy from the request to the new config file... +@@ -3866,12 +3857,12 @@ install_conf_file(cupsd_client_t *con) / + { + cupsdLogMessage(CUPSD_LOG_ERROR, + "Unable to copy to config file \"%s\": %s", +- filename, strerror(errno)); ++ ConfigurationFile, strerror(errno)); + + cupsFileClose(in); + cupsFileClose(out); + +- snprintf(filename, sizeof(filename), "%s%s.N", ServerRoot, con->uri + 11); ++ snprintf(filename, sizeof(filename), "%s.N", ConfigurationFile); + cupsdRemoveFile(filename); + + return (HTTP_SERVER_ERROR); +@@ -3883,7 +3874,7 @@ install_conf_file(cupsd_client_t *con) / + + cupsFileClose(in); + +- if (cupsdCloseCreatedConfFile(out, filename)) ++ if (cupsdCloseCreatedConfFile(out, ConfigurationFile)) + return (HTTP_SERVER_ERROR); + + /* @@ -3894,14 +3885,10 @@ install_conf_file(cupsd_client_t *con) / cupsdClearString(&con->filename); @@ -2292,7 +2673,7 @@ diff -up cups-1.5.4/scheduler/conf.c.str4223 cups-1.5.4/scheduler/conf.c static int read_location(cups_file_t *fp, char *name, int linenum); static int read_policy(cups_file_t *fp, char *name, int linenum); static void set_policy_defaults(cupsd_policy_t *pol); -@@ -708,22 +716,48 @@ cupsdReadConfiguration(void) +@@ -708,21 +716,63 @@ cupsdReadConfiguration(void) cupsdInitEnv(); /* @@ -2307,14 +2688,22 @@ diff -up cups-1.5.4/scheduler/conf.c.str4223 cups-1.5.4/scheduler/conf.c + cupsFileClose(fp); + + if (!status) ++ { ++ if (TestConfigFile) ++ printf("%s contains errors\n", CupsFilesFile); ++ else ++ syslog(LOG_LPR, "Unable to read \"%s\" due to errors.", ++ CupsFilesFile); ++ + return (0); ++ } + } + else if (errno == ENOENT) + cupsdLogMessage(CUPSD_LOG_INFO, "No %s, using defaults.", CupsFilesFile); + else + { -+ cupsdLogMessage(CUPSD_LOG_CRIT, "Unable to open %s: %s", CupsFilesFile, -+ strerror(errno)); ++ syslog(LOG_LPR, "Unable to open \"%s\": %s", CupsFilesFile, ++ strerror(errno)); + return (0); + } + @@ -2327,8 +2716,8 @@ diff -up cups-1.5.4/scheduler/conf.c.str4223 cups-1.5.4/scheduler/conf.c if ((fp = cupsFileOpen(ConfigurationFile, "r")) == NULL) + { -+ cupsdLogMessage(CUPSD_LOG_CRIT, "Unable to open %s: %s", ConfigurationFile, -+ strerror(errno)); ++ syslog(LOG_LPR, "Unable to open \"%s\": %s", ConfigurationFile, ++ strerror(errno)); return (0); + } @@ -2338,15 +2727,22 @@ diff -up cups-1.5.4/scheduler/conf.c.str4223 cups-1.5.4/scheduler/conf.c cupsFileClose(fp); if (!status) - return (0); +- return (0); ++ { ++ if (TestConfigFile) ++ printf("%s contains errors.\n", ConfigurationFile); ++ else ++ syslog(LOG_LPR, "Unable to read \"%s\" due to errors.", ++ ConfigurationFile); - if (!ErrorLog) - cupsdSetString(&ErrorLog, CUPS_LOGDIR "/error_log"); -- ++ return (0); ++ } + RunUser = getuid(); - cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.", -@@ -842,6 +876,13 @@ cupsdReadConfiguration(void) +@@ -842,6 +892,13 @@ cupsdReadConfiguration(void) BrowseACL = cupsdFindLocation("CUPS_INTERNAL_BROWSE_ACL"); /* @@ -2360,7 +2756,18 @@ diff -up cups-1.5.4/scheduler/conf.c.str4223 cups-1.5.4/scheduler/conf.c * Open the system log for cupsd if necessary... */ -@@ -2512,13 +2553,174 @@ parse_protocols(const char *s) /* I - S +@@ -1002,7 +1059,9 @@ cupsdReadConfiguration(void) + Group, 1, 1) < 0 || + cupsdCheckPermissions(ServerRoot, "ssl", 0700, RunUser, + Group, 1, 0) < 0 || +- cupsdCheckPermissions(ServerRoot, "cupsd.conf", ConfigFilePerm, RunUser, ++ cupsdCheckPermissions(ConfigurationFile, NULL, ConfigFilePerm, RunUser, ++ Group, 0, 0) < 0 || ++ cupsdCheckPermissions(CupsFilesFile, NULL, ConfigFilePerm, RunUser, + Group, 0, 0) < 0 || + cupsdCheckPermissions(ServerRoot, "classes.conf", 0600, RunUser, + Group, 0, 0) < 0 || +@@ -2512,13 +2571,174 @@ parse_protocols(const char *s) /* I - S /* @@ -2538,7 +2945,7 @@ diff -up cups-1.5.4/scheduler/conf.c.str4223 cups-1.5.4/scheduler/conf.c int linenum; /* Current line number */ char line[HTTP_MAX_BUFFER], /* Line from file */ -@@ -2528,7 +2730,6 @@ read_configuration(cups_file_t *fp) /* I +@@ -2528,7 +2748,6 @@ read_configuration(cups_file_t *fp) /* I *value, /* Pointer to value */ *valueptr; /* Pointer into value */ int valuelen; /* Length of value */ @@ -2546,7 +2953,7 @@ diff -up cups-1.5.4/scheduler/conf.c.str4223 cups-1.5.4/scheduler/conf.c http_addrlist_t *addrlist, /* Address list */ *addr; /* Current address */ unsigned ip[4], /* Address value */ -@@ -2538,7 +2739,6 @@ read_configuration(cups_file_t *fp) /* I +@@ -2538,7 +2757,6 @@ read_configuration(cups_file_t *fp) /* I cupsd_location_t *location; /* Browse location */ cups_file_t *incfile; /* Include file */ char incname[1024]; /* Include filename */ @@ -2554,7 +2961,7 @@ diff -up cups-1.5.4/scheduler/conf.c.str4223 cups-1.5.4/scheduler/conf.c /* -@@ -2570,7 +2770,7 @@ read_configuration(cups_file_t *fp) /* I +@@ -2570,7 +2788,7 @@ read_configuration(cups_file_t *fp) /* I incname, strerror(errno)); else { @@ -2563,7 +2970,7 @@ diff -up cups-1.5.4/scheduler/conf.c.str4223 cups-1.5.4/scheduler/conf.c cupsFileClose(incfile); } } -@@ -2594,8 +2794,6 @@ read_configuration(cups_file_t *fp) /* I +@@ -2594,8 +2812,6 @@ read_configuration(cups_file_t *fp) /* I if (linenum == 0) return (0); } @@ -2572,7 +2979,7 @@ diff -up cups-1.5.4/scheduler/conf.c.str4223 cups-1.5.4/scheduler/conf.c else if (!_cups_strcasecmp(line, "FaxRetryInterval") && value) { JobRetryInterval = atoi(value); -@@ -3254,81 +3452,6 @@ read_configuration(cups_file_t *fp) /* I +@@ -3254,81 +3470,6 @@ read_configuration(cups_file_t *fp) /* I } } #endif /* HAVE_SSL */ @@ -2654,7 +3061,7 @@ diff -up cups-1.5.4/scheduler/conf.c.str4223 cups-1.5.4/scheduler/conf.c else if (!_cups_strcasecmp(line, "HostNameLookups") && value) { /* -@@ -3407,22 +3530,6 @@ read_configuration(cups_file_t *fp) /* I +@@ -3407,22 +3548,6 @@ read_configuration(cups_file_t *fp) /* I cupsdLogMessage(CUPSD_LOG_WARN, "Unknown LogTimeFormat %s on line %d.", value, linenum); } @@ -2677,7 +3084,7 @@ diff -up cups-1.5.4/scheduler/conf.c.str4223 cups-1.5.4/scheduler/conf.c else if (!_cups_strcasecmp(line, "ServerTokens") && value) { /* -@@ -3548,117 +3655,193 @@ read_configuration(cups_file_t *fp) /* I +@@ -3548,117 +3673,193 @@ read_configuration(cups_file_t *fp) /* I "line %d.", value, linenum); } #endif /* HAVE_SSL */ @@ -2990,6 +3397,67 @@ diff -up cups-1.5.4/scheduler/ipp.c.str4223 cups-1.5.4/scheduler/ipp.c ServerRoot); return; } +diff -up cups-1.5.4/scheduler/log.c.str4223 cups-1.5.4/scheduler/log.c +--- cups-1.5.4/scheduler/log.c.str4223 2013-03-05 14:56:43.374345442 +0000 ++++ cups-1.5.4/scheduler/log.c 2013-03-05 14:56:43.496345943 +0000 +@@ -44,6 +44,22 @@ + static int log_linesize = 0; /* Size of line for output file */ + static char *log_line = NULL; /* Line for output file */ + ++#ifdef HAVE_VSYSLOG ++static const int syslevels[] = /* SYSLOG levels... */ ++ { ++ 0, ++ LOG_EMERG, ++ LOG_ALERT, ++ LOG_CRIT, ++ LOG_ERR, ++ LOG_WARNING, ++ LOG_NOTICE, ++ LOG_INFO, ++ LOG_DEBUG, ++ LOG_DEBUG ++ }; ++#endif /* HAVE_VSYSLOG */ ++ + + /* + * Local functions... +@@ -548,8 +564,12 @@ cupsdLogMessage(int level, /* I - + if ((TestConfigFile || !ErrorLog) && level <= CUPSD_LOG_WARN) + { + va_start(ap, message); ++#ifdef HAVE_VSYSLOG ++ vsyslog(LOG_LPR | syslevels[level], message, ap); ++#else + vfprintf(stderr, message, ap); + putc('\n', stderr); ++#endif /* HAVE_VSYSLOG */ + va_end(ap); + + return (1); +@@ -985,21 +1005,6 @@ cupsdWriteErrorLog(int level, /* + 'D', + 'd' + }; +-#ifdef HAVE_VSYSLOG +- static const int syslevels[] = /* SYSLOG levels... */ +- { +- 0, +- LOG_EMERG, +- LOG_ALERT, +- LOG_CRIT, +- LOG_ERR, +- LOG_WARNING, +- LOG_NOTICE, +- LOG_INFO, +- LOG_DEBUG, +- LOG_DEBUG +- }; +-#endif /* HAVE_VSYSLOG */ + + + #ifdef HAVE_VSYSLOG diff -up cups-1.5.4/scheduler/main.c.str4223 cups-1.5.4/scheduler/main.c --- cups-1.5.4/scheduler/main.c.str4223 2012-12-06 12:52:04.925832587 +0000 +++ cups-1.5.4/scheduler/main.c 2012-12-06 12:52:04.951832665 +0000 @@ -3067,6 +3535,24 @@ diff -up cups-1.5.4/scheduler/main.c.str4223 cups-1.5.4/scheduler/main.c /* * If the user hasn't specified "-f", run in the background... */ +@@ -511,16 +562,10 @@ main(int argc, /* I - Number of comm + */ + + if (!cupsdReadConfiguration()) +- { +- if (TestConfigFile) +- printf("%s contains errors\n", ConfigurationFile); +- else +- syslog(LOG_LPR, "Unable to read configuration file \'%s\' - exiting!", +- ConfigurationFile); + return (1); +- } + else if (TestConfigFile) + { ++ printf("%s is OK\n", CupsFilesFile); + printf("%s is OK\n", ConfigurationFile); + return (0); + } diff -up cups-1.5.4/test/run-stp-tests.sh.str4223 cups-1.5.4/test/run-stp-tests.sh --- cups-1.5.4/test/run-stp-tests.sh.str4223 2012-05-15 15:04:18.000000000 +0100 +++ cups-1.5.4/test/run-stp-tests.sh 2012-12-06 12:52:04.951832665 +0000 diff --git a/cups.spec b/cups.spec index e54f180..11152ba 100644 --- a/cups.spec +++ b/cups.spec @@ -12,7 +12,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.5.4 -Release: 25%{?dist} +Release: 26%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -763,6 +763,9 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man5/ipptoolfile.5.gz %changelog +* Tue Mar 5 2013 Tim Waugh 1:1.5.4-26 +- Documentation fixes from STR #4223 (bug #915981). + * Fri Feb 15 2013 Jiri Popelka 1:1.5.4-25 - Fixed STR #4232 fix (STR #4276).