SHA256
1
0
forked from pool/cronie

Accepting request 1138167 from Base:System

OBS-URL: https://build.opensuse.org/request/show/1138167
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cronie?expand=0&rev=90
This commit is contained in:
Ana Guerrero 2024-01-15 21:15:31 +00:00 committed by Git OBS Bridge
commit 0b82a21a0a
3 changed files with 37 additions and 1 deletions

View File

@ -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> Sat Nov 11 15:17:43 UTC 2023 - Andrea Manzini <andrea.manzini@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package cronie # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # 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 Patch13: fix-manpage-replace-anacrontab-with-crontab.patch
# PATCH-FEATURE-OPENSUSE user common-session-nonlogin # PATCH-FEATURE-OPENSUSE user common-session-nonlogin
Patch14: cronie-pam_config-nonlogin.diff 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: audit-devel
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
@ -109,6 +111,7 @@ cp %{SOURCE7} ./cron_to_cronie.README
%if 0%{?suse_version} > 1500 %if 0%{?suse_version} > 1500
%patch14 -p1 %patch14 -p1
%endif %endif
%patch15 -p1
%build %build
# fill macro CRON_VERSION it is used in top three lines of crontab file,should be reworked # fill macro CRON_VERSION it is used in top three lines of crontab file,should be reworked

View 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