From 6242ccd8e7ab2b6438cd7beb9a88bfd99fe19ffa Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 1 Dec 2021 08:55:09 +0100 Subject: [PATCH] 2018951 - RFE: Implement TimeoutStartSec configuration during build Resolves: rhbz#2018951 --- ...emd-timeoutstartsec-configure-option.patch | 33 +++++++++++++++++++ cups.spec | 9 +++++ 2 files changed, 42 insertions(+) create mode 100644 0001-Add-with-systemd-timeoutstartsec-configure-option.patch diff --git a/0001-Add-with-systemd-timeoutstartsec-configure-option.patch b/0001-Add-with-systemd-timeoutstartsec-configure-option.patch new file mode 100644 index 0000000..222e766 --- /dev/null +++ b/0001-Add-with-systemd-timeoutstartsec-configure-option.patch @@ -0,0 +1,33 @@ +diff -up cups-2.3.3op2/config-scripts/cups-defaults.m4.conf-timeoutstartsec cups-2.3.3op2/config-scripts/cups-defaults.m4 +--- cups-2.3.3op2/config-scripts/cups-defaults.m4.conf-timeoutstartsec 2021-11-29 13:50:14.568976028 +0100 ++++ cups-2.3.3op2/config-scripts/cups-defaults.m4 2021-11-29 13:51:02.785567762 +0100 +@@ -482,3 +482,18 @@ AC_ARG_WITH([idle_exit_timeout], AS_HELP + ]) + + AC_SUBST([EXIT_TIMEOUT]) ++ ++dnl set TimeoutStartSec for cups.service ++dnl - if used as --without-*, it sets TimeoutStartSec to infinity ++AC_ARG_WITH([systemd-timeoutstartsec], ++ AS_HELP_STRING([--with-systemd-timeoutstartsec], ++ [set TimeoutStartSec value in cups.service, default=default value in systemd]), [ ++ AS_IF([ test "x$withval" = "xno" ], [ ++ TIMEOUTSTARTSEC="TimeoutStartSec=infinity" ++ ], [ ++ TIMEOUTSTARTSEC="TimeoutStartSec=$withval" ++ ]) ++], [ ++ TIMEOUTSTARTSEC="" ++]) ++AC_SUBST([TIMEOUTSTARTSEC]) +diff -up cups-2.3.3op2/scheduler/cups.service.in.conf-timeoutstartsec cups-2.3.3op2/scheduler/cups.service.in +--- cups-2.3.3op2/scheduler/cups.service.in.conf-timeoutstartsec 2021-11-29 13:50:14.551976172 +0100 ++++ cups-2.3.3op2/scheduler/cups.service.in 2021-11-29 13:50:14.568976028 +0100 +@@ -8,6 +8,7 @@ Requires=cups.socket + ExecStart=@sbindir@/cupsd -l + Type=notify + Restart=on-failure ++@TIMEOUTSTARTSEC@ + + [Install] + Also=cups.socket cups.path diff --git a/cups.spec b/cups.spec index cac69c9..265c1b3 100644 --- a/cups.spec +++ b/cups.spec @@ -90,6 +90,9 @@ Patch21: cups-fstack-strong.patch Patch22: cups-deprecate-drivers.patch # 2018955 - RFE: Implement IdleExitTimeout configuration during build Patch23: 0001-Add-with-idle-exit-timeout-configure-option.patch +# 2018951 - RFE: Implement TimeoutStartSec configuration during build +Patch24: 0001-Add-with-systemd-timeoutstartsec-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 @@ -311,6 +314,8 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in %patch22 -p1 -b .deprecate-warnings # 2018955 - RFE: Implement IdleExitTimeout configuration during build %patch23 -p1 -b .idleexittimeout +# 2018951 - RFE: Implement TimeoutStartSec configuration during build +%patch24 -p1 -b .conf-timeoutstartsec %if %{lspp} @@ -362,6 +367,7 @@ export LDFLAGS="$LDFLAGS $RPM_LD_FLAGS -Wall -fstack-clash-protection -D_FORTIFY --enable-sync-on-close \ %if 0%{?rhel} --without-idle-exit-timeout \ + --without-systemd-timeoutstartsec \ %endif localedir=%{_datadir}/locale @@ -713,6 +719,9 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man7/ippeveps.7.gz %changelog +* Wed Dec 01 2021 Zdenek Dohnal - 1:2.3.3op2-11 +- 2018951 - RFE: Implement TimeoutStartSec configuration during build + * Mon Nov 29 2021 Zdenek Dohnal - 1:2.3.3op2-11 - 2018955 - RFE: Implement IdleExitTimeout configuration during build