2018955 - RFE: Implement IdleExitTimeout configuration during build

Resolves: rhbz#2018955
This commit is contained in:
Zdenek Dohnal 2021-11-29 12:44:23 +01:00
parent f4c99f4a13
commit e60ed1262a
2 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,33 @@
diff -up cups-2.3.3op2/conf/cupsd.conf.in.idleexittimeout cups-2.3.3op2/conf/cupsd.conf.in
--- cups-2.3.3op2/conf/cupsd.conf.in.idleexittimeout 2021-02-01 22:10:25.000000000 +0100
+++ cups-2.3.3op2/conf/cupsd.conf.in 2021-11-29 11:37:02.426407322 +0100
@@ -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 -up cups-2.3.3op2/config-scripts/cups-defaults.m4.idleexittimeout cups-2.3.3op2/config-scripts/cups-defaults.m4
--- cups-2.3.3op2/config-scripts/cups-defaults.m4.idleexittimeout 2021-11-29 11:37:02.426407322 +0100
+++ cups-2.3.3op2/config-scripts/cups-defaults.m4 2021-11-29 11:39:16.629262421 +0100
@@ -461,3 +461,16 @@ esac
AC_SUBST(CUPS_WEBIF)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF)
+
+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])

View File

@ -17,7 +17,7 @@ Summary: CUPS printing system
Name: cups
Epoch: 1
Version: 2.3.3%{OP_VER}
Release: 10%{?dist}
Release: 11%{?dist}
License: ASL 2.0
Url: http://www.cups.org/
# Apple stopped uploading the new versions into github, use OpenPrinting fork
@ -88,6 +88,8 @@ Patch20: cups-restart-job-hold-until.patch
Patch21: cups-fstack-strong.patch
# 2019842 - Add more warning messages about drivers going deprecated
Patch22: cups-deprecate-drivers.patch
# 2018955 - RFE: Implement IdleExitTimeout configuration during build
Patch23: 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
@ -307,6 +309,8 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in
%patch21 -p1 -b .fstack-strong
# 2019842 - Add more warning messages about drivers going deprecated
%patch22 -p1 -b .deprecate-warnings
# 2018955 - RFE: Implement IdleExitTimeout configuration during build
%patch23 -p1 -b .idleexittimeout
%if %{lspp}
@ -356,6 +360,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.
@ -706,6 +713,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
- 2018955 - RFE: Implement IdleExitTimeout configuration during build
* Fri Nov 12 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3op2-11
- 2019842 - Add more warning messages about drivers going deprecated