diff options
author | Michael R Sweet <msweet@msweet.org> | 2020-11-14 09:38:09 -0500 |
---|---|---|
committer | Michael R Sweet <msweet@msweet.org> | 2020-11-14 09:38:09 -0500 |
commit | 956623c7efe5dbbf7a95fed1089fc15a96c6d76f (patch) | |
tree | fbcfb43595335c3850a2cc7a15006bb85f019776 | |
parent | 6447a0fc328d806b6bbc54901ac88bcfc585f965 (diff) |
Add --with-error-policy configure option (Issue #38)
-rw-r--r-- | CHANGES-OPENPRINTING.md | 1 | ||||
-rw-r--r-- | conf/cupsd.conf.in | 3 | ||||
-rw-r--r-- | config-scripts/cups-defaults.m4 | 7 | ||||
-rw-r--r-- | config.h.in | 9 | ||||
-rwxr-xr-x | configure | 34 | ||||
-rw-r--r-- | scheduler/conf.c | 2 | ||||
-rw-r--r-- | vcnet/config.h | 12 | ||||
-rw-r--r-- | xcode/config.h | 12 |
8 files changed, 75 insertions, 5 deletions
diff --git a/CHANGES-OPENPRINTING.md b/CHANGES-OPENPRINTING.md index 1566865cd..f2f449961 100644 --- a/CHANGES-OPENPRINTING.md +++ b/CHANGES-OPENPRINTING.md @@ -26,6 +26,7 @@ Changes in CUPS v2.3.3op1 - The scheduler no longer adds the local hostname to the ServerAlias list (Issue #32) - Added `--with-max-log-size` configure option (Issue #35) +- Added `--with-error-policy` configure option (Issue #38) - IPP Everywhere PPDs could have an "unknown" default InputSlot (Issue #44) - The `httpAddrListen` function now uses a listen backlog of 128. - Added USB quirks (Apple issue #5789, #5823, #5831) diff --git a/conf/cupsd.conf.in b/conf/cupsd.conf.in index 3aa5086b7..09059dc4c 100644 --- a/conf/cupsd.conf.in +++ b/conf/cupsd.conf.in @@ -11,6 +11,9 @@ LogLevel @CUPS_LOG_LEVEL@ # Specifies the maximum size of the log files before they are rotated. The value "0" disables log rotation. MaxLogSize @CUPS_MAX_LOG_SIZE@ +# Default error policy for printers +ErrorPolicy @CUPS_ERROR_POLICY@ + # Only listen for connections from the local machine. Listen localhost:@DEFAULT_IPP_PORT@ @CUPS_LISTEN_DOMAINSOCKET@ diff --git a/config-scripts/cups-defaults.m4 b/config-scripts/cups-defaults.m4 index 83dfe5851..b6051778d 100644 --- a/config-scripts/cups-defaults.m4 +++ b/config-scripts/cups-defaults.m4 @@ -100,6 +100,13 @@ AC_ARG_WITH(max_log_size, [ --with-max-log-size set default MaxLogSize valu AC_SUBST(CUPS_MAX_LOG_SIZE) AC_DEFINE_UNQUOTED(CUPS_DEFAULT_MAX_LOG_SIZE, "$CUPS_MAX_LOG_SIZE") +dnl Default ErrorPolicy +AC_ARG_WITH(error_policy, [ --with-error-policy set default ErrorPolicy value, default=stop-printer], + CUPS_MAX_LOG_SIZE="$withval", + CUPS_MAX_LOG_SIZE="stop-printer") +AC_SUBST(CUPS_ERROR_POLICY) +AC_DEFINE_UNQUOTED(CUPS_DEFAULT_ERROR_POLICY, "$CUPS_ERROR_POLICY") + dnl Default FatalErrors AC_ARG_WITH(fatal_errors, [ --with-fatal-errors set default FatalErrors value, default=config], CUPS_FATAL_ERRORS="$withval", diff --git a/config.h.in b/config.h.in index 1c2d7a826..6a197ecc5 100644 --- a/config.h.in +++ b/config.h.in @@ -1,6 +1,7 @@ /* * Configuration file for CUPS. * + * Copyright 2020 by Michael R Sweet * Copyright 2007-2019 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * @@ -45,6 +46,7 @@ #define CUPS_DEFAULT_LOG_LEVEL "warn" #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "actions" +#define CUPS_DEFAULT_MAX_LOG_SIZE "1m" /* @@ -86,6 +88,13 @@ /* + * Default ErrorPolicy value... + */ + +#define CUPS_DEFAULT_ERROR_POLICY "stop-printer" + + +/* * Default MaxCopies value... */ @@ -646,6 +646,8 @@ CUPS_PAGE_LOG_FORMAT CUPS_ACCESS_LOG_LEVEL CUPS_LOG_LEVEL CUPS_FATAL_ERRORS +CUPS_ERROR_POLICY +CUPS_MAX_LOG_SIZE CUPS_LOG_FILE_PERM CUPS_CUPSD_FILE_PERM CUPS_CONFIG_FILE_PERM @@ -895,6 +897,8 @@ with_exe_file_perm with_config_file_perm with_cupsd_file_perm with_log_file_perm +with_max_log_size +with_error_policy with_fatal_errors with_log_level with_access_log_level @@ -1619,6 +1623,8 @@ Optional Packages: --with-config-file-perm set default ConfigFilePerm value, default=0640 --with-cupsd-file-perm set default cupsd permissions, default=0500 --with-log-file-perm set default LogFilePerm value, default=0644 + --with-max-log-size set default MaxLogSize value, default=1m + --with-error-policy set default ErrorPolicy value, default=stop-printer --with-fatal-errors set default FatalErrors value, default=config --with-log-level set default LogLevel value, default=warn --with-access-log-level set default AccessLogLevel value, default=none @@ -9372,6 +9378,34 @@ _ACEOF +# Check whether --with-max_log_size was given. +if test "${with_max_log_size+set}" = set; then : + withval=$with_max_log_size; CUPS_MAX_LOG_SIZE="$withval" +else + CUPS_MAX_LOG_SIZE="1m" +fi + + +cat >>confdefs.h <<_ACEOF +#define CUPS_DEFAULT_MAX_LOG_SIZE "$CUPS_MAX_LOG_SIZE" +_ACEOF + + + +# Check whether --with-error_policy was given. +if test "${with_error_policy+set}" = set; then : + withval=$with_error_policy; CUPS_MAX_LOG_SIZE="$withval" +else + CUPS_MAX_LOG_SIZE="stop-printer" +fi + + +cat >>confdefs.h <<_ACEOF +#define CUPS_DEFAULT_ERROR_POLICY "$CUPS_ERROR_POLICY" +_ACEOF + + + # Check whether --with-fatal_errors was given. if test "${with_fatal_errors+set}" = set; then : withval=$with_fatal_errors; CUPS_FATAL_ERRORS="$withval" diff --git a/scheduler/conf.c b/scheduler/conf.c index 755cef536..839cd6866 100644 --- a/scheduler/conf.c +++ b/scheduler/conf.c @@ -752,7 +752,7 @@ cupsdReadConfiguration(void) cupsdSetString(&LPDConfigFile, CUPS_DEFAULT_LPD_CONFIG_FILE); cupsdSetString(&SMBConfigFile, CUPS_DEFAULT_SMB_CONFIG_FILE); - cupsdSetString(&ErrorPolicy, "stop-printer"); + cupsdSetString(&ErrorPolicy, CUPS_DEFAULT_ERROR_POLICY); JobHistory = DEFAULT_HISTORY; JobFiles = DEFAULT_FILES; diff --git a/vcnet/config.h b/vcnet/config.h index 76fc7fd5f..5e105c826 100644 --- a/vcnet/config.h +++ b/vcnet/config.h @@ -97,8 +97,8 @@ typedef unsigned long useconds_t; * Version of software... */ -#define CUPS_SVERSION "CUPS v2.3.3" -#define CUPS_MINIMAL "CUPS/2.3.3" +#define CUPS_SVERSION "CUPS v2.3.3op1" +#define CUPS_MINIMAL "CUPS/2.3.3op1" /* @@ -126,6 +126,7 @@ typedef unsigned long useconds_t; #define CUPS_DEFAULT_LOG_LEVEL "warn" #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "none" +#define CUPS_DEFAULT_MAX_LOG_SIZE "1m" /* @@ -167,6 +168,13 @@ typedef unsigned long useconds_t; /* + * Default ErrorPolicy value... + */ + +#define CUPS_DEFAULT_ERROR_POLICY "stop-printer" + + +/* * Default MaxCopies value... */ diff --git a/xcode/config.h b/xcode/config.h index 5953431a3..7a3f98aa9 100644 --- a/xcode/config.h +++ b/xcode/config.h @@ -18,8 +18,8 @@ * Version of software... */ -#define CUPS_SVERSION "CUPS v2.3.3" -#define CUPS_MINIMAL "CUPS/2.3.3" +#define CUPS_SVERSION "CUPS v2.3.3op1" +#define CUPS_MINIMAL "CUPS/2.3.3op1" /* @@ -47,6 +47,7 @@ #define CUPS_DEFAULT_LOG_LEVEL "warn" #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "none" +#define CUPS_DEFAULT_MAX_LOG_SIZE "1m" /* @@ -88,6 +89,13 @@ /* + * Default ErrorPolicy value... + */ + +#define CUPS_DEFAULT_ERROR_POLICY "stop-printer" + + +/* * Default MaxCopies value... */ |