2018957 - RFE: Implement IdleExitTimeout configuration during build
This commit is contained in:
parent
456f9aa151
commit
9c645390cf
54
0001-Add-with-idle-exit-timeout-configure-option.patch
Normal file
54
0001-Add-with-idle-exit-timeout-configure-option.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From d3bf52f5dc9e465faba69a85eeed5b64916efddd Mon Sep 17 00:00:00 2001
|
||||
From: Zdenek Dohnal <zdohnal@redhat.com>
|
||||
Date: Mon, 29 Nov 2021 09:30:26 +0100
|
||||
Subject: [PATCH] Add --with-idle-exit-timeout configure option
|
||||
|
||||
The option enables setting IdleExitTimeout to a desired value - f.e.
|
||||
setting to zero will disable automatic shutdown, which is useful on servers,
|
||||
where cupsd is expected to run even if there is no web interface, no jobs
|
||||
and CUPS doesn't share queues.
|
||||
---
|
||||
CHANGES.md | 1 +
|
||||
conf/cupsd.conf.in | 3 +++
|
||||
config-scripts/cups-defaults.m4 | 13 +++++++++++++
|
||||
configure | 30 ++++++++++++++++++++++++++++++
|
||||
4 files changed, 47 insertions(+)
|
||||
|
||||
diff --git a/conf/cupsd.conf.in b/conf/cupsd.conf.in
|
||||
index 03d1d5df5..b25884907 100644
|
||||
--- a/conf/cupsd.conf.in
|
||||
+++ b/conf/cupsd.conf.in
|
||||
@@ -28,6 +28,9 @@ DefaultAuthType Basic
|
||||
# Web interface setting...
|
||||
WebInterface @CUPS_WEBIF@
|
||||
|
||||
+# Timeout after cupsd exits if idle (applied only if cupsd runs on-demand - with -l)
|
||||
+IdleExitTimeout @EXIT_TIMEOUT@
|
||||
+
|
||||
# Restrict access to the server...
|
||||
<Location />
|
||||
Order allow,deny
|
||||
diff --git a/config-scripts/cups-defaults.m4 b/config-scripts/cups-defaults.m4
|
||||
index 240a95229..9420e1510 100644
|
||||
--- a/config-scripts/cups-defaults.m4
|
||||
+++ b/config-scripts/cups-defaults.m4
|
||||
@@ -428,3 +428,16 @@ AS_IF([test $CUPS_WEBIF = Yes || test $CUPS_BROWSING = Yes], [
|
||||
SYSTEMD_WANTED_BY="$SYSTEMD_WANTED_BY multi-user.target"], [
|
||||
])
|
||||
AC_SUBST([SYSTEMD_WANTED_BY])
|
||||
+
|
||||
+dnl Set default value of IdleExitTimeout
|
||||
+AC_ARG_WITH([idle_exit_timeout], AS_HELP_STRING([--with-idle-exit-timeout], [set the default value for IdleExitTimeout, default=60]), [
|
||||
+ AS_IF([test "x$withval" = "xno"], [
|
||||
+ EXIT_TIMEOUT=0
|
||||
+ ], [
|
||||
+ EXIT_TIMEOUT=$withval
|
||||
+ ])
|
||||
+], [
|
||||
+ EXIT_TIMEOUT=60
|
||||
+])
|
||||
+
|
||||
+AC_SUBST([EXIT_TIMEOUT])
|
||||
--
|
||||
2.31.1
|
||||
|
12
cups.spec
12
cups.spec
@ -17,7 +17,7 @@ Summary: CUPS printing system
|
||||
Name: cups
|
||||
Epoch: 1
|
||||
Version: 2.3.3%{OP_VER}
|
||||
Release: 11%{?dist}
|
||||
Release: 12%{?dist}
|
||||
License: ASL 2.0
|
||||
Url: https://openprinting.github.io/cups/
|
||||
# Apple stopped uploading the new versions into github, use OpenPrinting fork
|
||||
@ -99,6 +99,8 @@ Patch24: cups-deprecate-drivers.patch
|
||||
Patch25: cups-fstack-strong.patch
|
||||
# Applying DigestOptions to MD5 Digest authentication defined by RFC 2069
|
||||
Patch26: 0001-cups-http-support.c-Apply-DigestOptions-to-RFC-2069-.patch
|
||||
# 2018957 - RFE: Implement IdleExitTimeout configuration during build
|
||||
Patch27: 0001-Add-with-idle-exit-timeout-configure-option.patch
|
||||
|
||||
##### Patches removed because IMHO they aren't no longer needed
|
||||
##### but still I'll leave them in git in case their removal
|
||||
@ -326,6 +328,8 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in
|
||||
%patch25 -p1 -b .fstack-strong
|
||||
# apply DigestOptions for MD5 Digest authentication defined by RFC 2069
|
||||
%patch26 -p1 -b .no-digest-rfc2069
|
||||
# 2018957 - RFE: Implement IdleExitTimeout configuration during build
|
||||
%patch27 -p1 -b .conf-idleexittimeout
|
||||
|
||||
|
||||
%if %{lspp}
|
||||
@ -374,6 +378,9 @@ export LDFLAGS="$LDFLAGS $RPM_LD_FLAGS -Wall -fstack-clash-protection -D_FORTIFY
|
||||
--enable-page-logging \
|
||||
--with-rundir=%{_rundir}/cups \
|
||||
--enable-sync-on-close \
|
||||
%if 0%{?rhel}
|
||||
--without-idle-exit-timeout \
|
||||
%endif
|
||||
localedir=%{_datadir}/locale
|
||||
|
||||
# If we got this far, all prerequisite libraries must be here.
|
||||
@ -698,6 +705,9 @@ rm -f %{cups_serverbin}/backend/smb
|
||||
%{_mandir}/man7/ippeveps.7.gz
|
||||
|
||||
%changelog
|
||||
* Mon Nov 29 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3op2-11
|
||||
- 2018957 - RFE: Implement IdleExitTimeout configuration during build
|
||||
|
||||
* Mon Nov 22 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3op2-11
|
||||
- turn off MD5 Digest authentication by default, because MD5 is marked insecure
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user