Accepting request 914974 from Base:System
OBS-URL: https://build.opensuse.org/request/show/914974 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cronie?expand=0&rev=82
This commit is contained in:
commit
dd267f00db
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:22c2a2b22577c0f776c1268d0e0f305c5c041e10155022a345b43b665da0ffe9
|
||||
size 124642
|
3
cronie-1.5.7.tar.gz
Normal file
3
cronie-1.5.7.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:30190b791c79bd72a43eb7cd6fced00be850e2e27e60852dec6dbacb82ecf21e
|
||||
size 148739
|
@ -1,31 +0,0 @@
|
||||
Index: cronie-cronie-1.5.5/contrib/anacrontab
|
||||
===================================================================
|
||||
--- cronie-cronie-1.5.5.orig/contrib/anacrontab
|
||||
+++ cronie-cronie-1.5.5/contrib/anacrontab
|
||||
@@ -11,6 +11,6 @@ RANDOM_DELAY=45
|
||||
START_HOURS_RANGE=3-22
|
||||
|
||||
#period in days delay in minutes job-identifier command
|
||||
-1 5 cron.daily nice run-parts /etc/cron.daily
|
||||
-7 25 cron.weekly nice run-parts /etc/cron.weekly
|
||||
-@monthly 45 cron.monthly nice run-parts /etc/cron.monthly
|
||||
+1 5 cron.daily nice /usr/libexec/cron/run-crons /etc/cron.daily
|
||||
+7 25 cron.weekly nice /usr/libexec/cron/run-crons /etc/cron.weekly
|
||||
+@monthly 45 cron.monthly nice /usr/libexec/cron/run-crons /etc/cron.monthly
|
||||
Index: cronie-cronie-1.5.5/man/anacrontab.5
|
||||
===================================================================
|
||||
--- cronie-cronie-1.5.5.orig/man/anacrontab.5
|
||||
+++ cronie-cronie-1.5.5/man/anacrontab.5
|
||||
@@ -97,9 +97,9 @@ RANDOM_DELAY=30
|
||||
# Anacron jobs will start between 6am and 8am.
|
||||
START_HOURS_RANGE=6-8
|
||||
# delay will be 5 minutes + RANDOM_DELAY for cron.daily
|
||||
-1 5 cron.daily nice run-parts /etc/cron.daily
|
||||
-7 0 cron.weekly nice run-parts /etc/cron.weekly
|
||||
-@monthly 0 cron.monthly nice run-parts /etc/cron.monthly
|
||||
+1 5 cron.daily nice /usr/libexec/cron/run-crons /etc/cron.daily
|
||||
+7 0 cron.weekly nice /usr/libexec/cron/run-crons /etc/cron.weekly
|
||||
+@monthly 0 cron.monthly nice /usr/libexec/cron/run-crons /etc/cron.monthly
|
||||
.fi
|
||||
.SH "SEE ALSO"
|
||||
.BR anacron (8),
|
@ -9,27 +9,23 @@ Index: src/crontab.c
|
||||
-#define NHEADER_LINES 0
|
||||
+#define NHEADER_LINES 3
|
||||
|
||||
#define COMMENT_COLOR "\x1B[34m"
|
||||
#define RESET_COLOR "\033[0m"
|
||||
@@ -394,7 +394,7 @@ static void parse_args(int argc, char *a
|
||||
#define COMMENT_COLOR "\x1B[34m"
|
||||
#define ERROR_COLOR "\x1B[31m"
|
||||
@@ -418,7 +418,7 @@ static void parse_args(int argc, char *a
|
||||
static void list_cmd(void) {
|
||||
char n[MAX_FNAME];
|
||||
FILE *f;
|
||||
- int ch;
|
||||
+ int ch, x;
|
||||
const int is_tty = isatty(STDOUT);
|
||||
const int colorize = isatty(STDOUT) && getenv("NO_COLOR") == NULL;
|
||||
int new_line = 1;
|
||||
|
||||
@@ -411,9 +411,25 @@ static void list_cmd(void) {
|
||||
exit(ERROR_EXIT);
|
||||
}
|
||||
|
||||
- /* file is open. copy to stdout, close.
|
||||
- */
|
||||
Set_LineNum(1)
|
||||
+
|
||||
+ /* ignore the top few comments since we probably put them there.
|
||||
+ */
|
||||
int in_comment = 0;
|
||||
@@ -439,6 +439,22 @@ static void list_cmd(void) {
|
||||
/* file is open. copy to stdout, close.
|
||||
*/
|
||||
Set_LineNum(1);
|
||||
+ /* ignore the top few comments since we probably put them there.
|
||||
+ */
|
||||
+ x = 0;
|
||||
+ while (EOF != (ch = get_char(f))) {
|
||||
+ if ('#' != ch) {
|
||||
@ -37,18 +33,17 @@ Index: src/crontab.c
|
||||
+ break;
|
||||
+ }
|
||||
+ while (EOF != (ch = get_char(f)))
|
||||
+ if (ch == '\n')
|
||||
+ break;
|
||||
+ if (ch == '\n')
|
||||
+ break;
|
||||
+ if (++x >= NHEADER_LINES)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* copy the rest of the crontab (if any) to the stdout.
|
||||
+ */
|
||||
while (EOF != (ch = get_char(f))) {
|
||||
if (is_tty && new_line) {
|
||||
if (ch == '#') {
|
||||
@@ -500,7 +516,7 @@ static void edit_cmd(void) {
|
||||
if (colorize) {
|
||||
if (!in_comment && new_line && ch == '#') {
|
||||
@@ -533,7 +549,7 @@ static void edit_cmd(void) {
|
||||
char n[MAX_FNAME], q[MAX_TEMPSTR];
|
||||
const char *editor;
|
||||
FILE *f;
|
||||
@ -57,20 +52,15 @@ Index: src/crontab.c
|
||||
struct stat statbuf;
|
||||
struct utimbuf utimebuf;
|
||||
WAIT_T waiter;
|
||||
@@ -552,13 +568,25 @@ static void edit_cmd(void) {
|
||||
@@ -585,10 +601,20 @@ static void edit_cmd(void) {
|
||||
}
|
||||
|
||||
Set_LineNum(1)
|
||||
- /*
|
||||
- * NHEADER_LINES processing removed for clarity
|
||||
- * (NHEADER_LINES == 0 in all Red Hat crontabs)
|
||||
- */
|
||||
- /* copy the rest of the crontab (if any) to the temp file.
|
||||
- */
|
||||
- if (EOF != ch)
|
||||
+
|
||||
Set_LineNum(1);
|
||||
- /*
|
||||
- * NHEADER_LINES processing removed for clarity
|
||||
- * (NHEADER_LINES == 0 in all Red Hat crontabs)
|
||||
+ /* ignore the top few comments since we probably put them there.
|
||||
+ */
|
||||
*/
|
||||
+ x = 0;
|
||||
+ while (EOF != (ch = get_char(f))) {
|
||||
+ if ('#' != ch) {
|
||||
@ -79,26 +69,22 @@ Index: src/crontab.c
|
||||
+ }
|
||||
+ while (EOF != (ch = get_char(f)))
|
||||
+ if (ch == '\n')
|
||||
+ break;
|
||||
+ if (++x >= NHEADER_LINES)
|
||||
+ break;
|
||||
+ break;
|
||||
+ if (++x >= NHEADER_LINES)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* copy the rest of the crontab (if any) to the temp file.
|
||||
+ */
|
||||
+ if (EOF != ch)
|
||||
while (EOF != (ch = get_char(f)))
|
||||
putc(ch, NewCrontab);
|
||||
|
||||
@@ -766,6 +794,7 @@ static int replace_cmd(void) {
|
||||
/* copy the rest of the crontab (if any) to the temp file.
|
||||
*/
|
||||
if (EOF != ch)
|
||||
@@ -812,6 +838,7 @@ static int replace_cmd(void) {
|
||||
int ch, fd;
|
||||
int error = 0;
|
||||
entry *e;
|
||||
uid_t file_owner;
|
||||
+ time_t now = time(NULL);
|
||||
char **envp;
|
||||
char *safename;
|
||||
int envs = 0, entries = 0;
|
||||
@@ -796,10 +825,10 @@ static int replace_cmd(void) {
|
||||
|
||||
safename = host_specific_filename("#tmp", "XXXXXXXXXX");
|
||||
@@ -839,10 +866,10 @@ static int replace_cmd(void) {
|
||||
*
|
||||
* VERY IMPORTANT: make sure NHEADER_LINES agrees with this code.
|
||||
*/
|
||||
|
@ -1,3 +1,23 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 30 07:18:09 UTC 2021 - Danilo Spinella <danilo.spinella@suse.com>
|
||||
|
||||
- Change default configuration to use run-parts from debianutils
|
||||
instead of run-crons
|
||||
- Remove cronie-anacron-1.4.7-run-crons.patch to make anacron use
|
||||
run-parts
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat May 8 20:33:29 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 1.5.7:
|
||||
* anacron: Fix problem of anacron not being started on some desktops
|
||||
* crontab: switch off colors if NO_COLOR is set
|
||||
* crontab: crontab without arguments now works if stdin is not a TTY
|
||||
* crond: Fix various issues on loading the crontab databases on startup
|
||||
* anacron: Expand MAILTO and MAILFROM environment variables
|
||||
* crontab: New option to test crontab file syntax without installing it
|
||||
- cronie-nheader_lines.diff: refresh against 1.5.7
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 12 22:08:43 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
||||
%endif
|
||||
Name: cronie
|
||||
Version: 1.5.5
|
||||
Version: 1.5.7
|
||||
Release: 0
|
||||
Summary: Cron Daemon
|
||||
License: BSD-3-Clause AND GPL-2.0-only AND MIT
|
||||
@ -44,8 +44,6 @@ Patch3: cronie-pam_config.diff
|
||||
Patch4: cronie-nheader_lines.diff
|
||||
# we use cron.pid instead of crond.pid
|
||||
Patch5: cronie-crond_pid.diff
|
||||
# PATCH-FIX-UPSTREAM use run-crons instead of run-parts for anacron (bnc#689494)
|
||||
Patch8: cronie-anacron-1.4.7-run-crons.patch
|
||||
Patch12: cronie-piddir.patch
|
||||
# PATCH-FIX-SUSE the first occurance of "/etc/anacrontab" was replaced by "/etc/crontab"
|
||||
# in manpage file because the /etc/crontab is still used in SUSE.
|
||||
@ -60,6 +58,7 @@ BuildRequires: pkgconfig(systemd)
|
||||
Requires: mail
|
||||
Requires(post): %fillup_prereq
|
||||
Requires(post): permissions
|
||||
Requires(post): debianutils
|
||||
Requires(pre): cron
|
||||
Suggests: mailx
|
||||
Conflicts: cron <= 4.1
|
||||
@ -105,7 +104,6 @@ overloaded in settings.
|
||||
%patch3 -p1
|
||||
%patch4
|
||||
%patch5 -p1
|
||||
%patch8 -p1
|
||||
cp %{SOURCE7} ./cron_to_cronie.README
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
|
@ -12,5 +12,8 @@ MAILTO=root
|
||||
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
|
||||
# | | | | |
|
||||
# * * * * * user-name command to be executed
|
||||
-*/15 * * * * root test -x /usr/libexec/cron/run-crons && /usr/libexec/cron/run-crons >/dev/null 2>&1
|
||||
@hourly root run-parts /etc/cron.hourly
|
||||
@daily root run-parts /etc/cron.daily
|
||||
@weekly root run-parts /etc/cron.weekly
|
||||
@monthly root run-parts /etc/cron.monthly
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user