Accepting request 1138166 from home:dspinella:branches:Base:System
- Fix anacron not working when /etc/default/anacron does not exist, fixes bsc#1218377 * test-for-etc-default-anacron.patch OBS-URL: https://build.opensuse.org/request/show/1138166 OBS-URL: https://build.opensuse.org/package/show/Base:System/cronie?expand=0&rev=215
This commit is contained in:
parent
38f2ab9b25
commit
08b459752f
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 11 17:52:56 UTC 2024 - Danilo Spinella <danilo.spinella@suse.com>
|
||||
|
||||
- Fix anacron not working when /etc/default/anacron does not exist,
|
||||
fixes bsc#1218377
|
||||
* test-for-etc-default-anacron.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 11 15:17:43 UTC 2023 - Andrea Manzini <andrea.manzini@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package cronie
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -48,6 +48,8 @@ Patch5: cronie-crond_pid.diff
|
||||
Patch13: fix-manpage-replace-anacrontab-with-crontab.patch
|
||||
# PATCH-FEATURE-OPENSUSE user common-session-nonlogin
|
||||
Patch14: cronie-pam_config-nonlogin.diff
|
||||
# PATCH-FIX-UPSTREAM danilo.spinella@suse.com bsc#1218377
|
||||
Patch15: test-for-etc-default-anacron.patch
|
||||
BuildRequires: audit-devel
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -109,6 +111,7 @@ cp %{SOURCE7} ./cron_to_cronie.README
|
||||
%if 0%{?suse_version} > 1500
|
||||
%patch14 -p1
|
||||
%endif
|
||||
%patch15 -p1
|
||||
|
||||
%build
|
||||
# fill macro CRON_VERSION it is used in top three lines of crontab file,should be reworked
|
||||
|
26
test-for-etc-default-anacron.patch
Normal file
26
test-for-etc-default-anacron.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 7700b1465d32ddb1d3988e9af852af6f0f5cd66e Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Mon, 16 Oct 2023 10:14:33 +0200
|
||||
Subject: [PATCH] re-introduce the test for existence of file
|
||||
|
||||
If the file does not exist it exits early with error... Let's source
|
||||
only if files acutually does exist. We still have a sane default.
|
||||
---
|
||||
contrib/0anacron | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/contrib/0anacron b/contrib/0anacron
|
||||
index 090219a..5379e41 100644
|
||||
--- a/contrib/0anacron
|
||||
+++ b/contrib/0anacron
|
||||
@@ -8,7 +8,9 @@ if [ `date +%Y%m%d` = "$day" ]; then
|
||||
fi
|
||||
|
||||
# Check whether run on battery should be allowed
|
||||
-. /etc/default/anacron
|
||||
+if test -r /etc/default/anacron; then
|
||||
+ . /etc/default/anacron
|
||||
+fi
|
||||
|
||||
if [ "$ANACRON_RUN_ON_BATTERY_POWER" != "yes" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user