Accepting request 637026 from Base:System
OBS-URL: https://build.opensuse.org/request/show/637026 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cronie?expand=0&rev=67
This commit is contained in:
commit
195c3ea19f
@ -1,53 +0,0 @@
|
|||||||
Index: cronie-1.4.11/man/crontab.5
|
|
||||||
===================================================================
|
|
||||||
--- cronie-1.4.11.orig/man/crontab.5
|
|
||||||
+++ cronie-1.4.11/man/crontab.5
|
|
||||||
@@ -213,6 +213,9 @@ Names can also be used for the 'month' a
|
|
||||||
first three letters of the particular day or month (case does not
|
|
||||||
matter). Ranges or lists of names are not allowed.
|
|
||||||
.PP
|
|
||||||
+If the uid of the owner is 0 (root), he can put a "-" as first character of a crontab entry.
|
|
||||||
+This will prevent cron from writing a syslog message about this command getting executed.
|
|
||||||
+.PP
|
|
||||||
The "sixth" field (the rest of the line) specifies the command to be run.
|
|
||||||
The entire command portion of the line, up to a newline or a "%"
|
|
||||||
character, will be executed by /bin/sh or by the shell specified in the
|
|
||||||
Index: cronie-1.4.11/src/entry.c
|
|
||||||
===================================================================
|
|
||||||
--- cronie-1.4.11.orig/src/entry.c
|
|
||||||
+++ cronie-1.4.11/src/entry.c
|
|
||||||
@@ -121,13 +121,18 @@ entry *load_entry(FILE * file, void (*er
|
|
||||||
if (ch == '-') {
|
|
||||||
/* if we are editing system crontab or user uid is 0 (root)
|
|
||||||
* we are allowed to disable logging
|
|
||||||
+ * Otherwise log the attempt, but still execute the command.
|
|
||||||
*/
|
|
||||||
if (pw == NULL || pw->pw_uid == 0)
|
|
||||||
e->flags |= DONT_LOG;
|
|
||||||
else {
|
|
||||||
- log_it("CRON", getpid(), "ERROR", "Only privileged user can disable logging", 0);
|
|
||||||
- ecode = e_option;
|
|
||||||
- goto eof;
|
|
||||||
+ log_it("CRON", getpid(), "ERROR",
|
|
||||||
+ "Only privileged user can disable logging. "
|
|
||||||
+ "In future versions, user lines starting with a dash "
|
|
||||||
+ "will be treated as invalid and won't get executed.", 0);
|
|
||||||
+ /* throw an error when editing a crontab */
|
|
||||||
+ if (error_func)
|
|
||||||
+ (*error_func) (ecodes[(int) e_minute]);
|
|
||||||
}
|
|
||||||
ch = get_char(file);
|
|
||||||
if (ch == EOF)
|
|
||||||
@@ -401,9 +406,9 @@ entry *load_entry(FILE * file, void (*er
|
|
||||||
|
|
||||||
Debug(DPARS, ("load_entry()...returning successfully\n"));
|
|
||||||
|
|
||||||
- /* success, fini, return pointer to the entry we just created...
|
|
||||||
- */
|
|
||||||
- return (e);
|
|
||||||
+ /* success, fini, return pointer to the entry we just created...
|
|
||||||
+ */
|
|
||||||
+ return (e);
|
|
||||||
|
|
||||||
eof:
|
|
||||||
if (e->envp)
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:6c73666102a6b5d35e2eaf1bd06925f2d4b0cef8d3323c37286dda3089a85338
|
|
||||||
size 243384
|
|
3
cronie-1.5.2.tar.gz
Normal file
3
cronie-1.5.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:28cfdc6cc7df304dced6d0d0543767d8d22926f669a28d650c0513c168183eb4
|
||||||
|
size 121604
|
@ -1,13 +0,0 @@
|
|||||||
Index: src/misc.c
|
|
||||||
===================================================================
|
|
||||||
--- src/misc.c.orig
|
|
||||||
+++ src/misc.c
|
|
||||||
@@ -311,6 +311,8 @@ void acquire_daemonlock(int closeflag) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if(NoFork == 1) return; //move along, nothing to do here..
|
|
||||||
+
|
|
||||||
if (fd == -1) {
|
|
||||||
pidfile = _PATH_CRON_PID;
|
|
||||||
/* Initial mode is 0600 to prevent flock() race/DoS. */
|
|
@ -1,3 +1,23 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 17 14:04:46 UTC 2018 - kstreitova@suse.com
|
||||||
|
|
||||||
|
- update to 1.5.2
|
||||||
|
* cronnext: New useful utility to find out time of the next job
|
||||||
|
run.
|
||||||
|
* crond: Avoid creating PID files when crond doesn't fork.
|
||||||
|
* crontab: Do not try to replace the crontab with a directory.
|
||||||
|
* crond: Log startup even when started in non-forking mode.
|
||||||
|
* Multiple small cleanups and fixes.
|
||||||
|
- update Source address
|
||||||
|
- remove cronie-1.4.7-disable_logging.patch and restore the
|
||||||
|
original cronie behaviour (a line starting with a dash in
|
||||||
|
normal user's crontab is handled as incorrect), there was enough
|
||||||
|
time for crontab migration. Manpage part of the patch was applied
|
||||||
|
upstream
|
||||||
|
- remove cronie-nofork-nopid.patch (applied upstream)
|
||||||
|
- pack cronnext utility
|
||||||
|
- call autoreconf
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Nov 30 12:43:52 UTC 2017 - rbrown@suse.com
|
Thu Nov 30 12:43:52 UTC 2017 - rbrown@suse.com
|
||||||
|
|
||||||
|
23
cronie.spec
23
cronie.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cronie
|
# spec file for package cronie
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@ -23,14 +23,13 @@
|
|||||||
|
|
||||||
%define cron_configs %{_sysconfdir}/pam.d/crond %{_sysconfdir}/crontab %{_sysconfdir}/cron.deny
|
%define cron_configs %{_sysconfdir}/pam.d/crond %{_sysconfdir}/crontab %{_sysconfdir}/cron.deny
|
||||||
Name: cronie
|
Name: cronie
|
||||||
Version: 1.5.1
|
Version: 1.5.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Cron Daemon
|
Summary: Cron Daemon
|
||||||
License: BSD-3-Clause and GPL-2.0 and MIT
|
License: BSD-3-Clause AND GPL-2.0-only AND MIT
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
Url: https://github.com/cronie-crond/cronie
|
Url: https://github.com/cronie-crond/%{name}
|
||||||
# temporary location - new releases will be stored on GitHub
|
Source0: https://github.com/cronie-crond/%{name}/archive/%{name}-%{version}.tar.gz
|
||||||
Source0: http://people.redhat.com/tmraz/%{name}/%{name}-%{version}.tar.gz
|
|
||||||
Source2: run-crons
|
Source2: run-crons
|
||||||
Source3: sample.root
|
Source3: sample.root
|
||||||
Source4: deny.sample
|
Source4: deny.sample
|
||||||
@ -46,16 +45,15 @@ Patch3: cronie-pam_config.diff
|
|||||||
Patch4: cronie-nheader_lines.diff
|
Patch4: cronie-nheader_lines.diff
|
||||||
# we use cron.pid instead of crond.pid
|
# we use cron.pid instead of crond.pid
|
||||||
Patch5: cronie-crond_pid.diff
|
Patch5: cronie-crond_pid.diff
|
||||||
# PATCH-FIX-UPSTREAM mention logging disabling for a command in man
|
|
||||||
Patch7: cronie-1.4.7-disable_logging.patch
|
|
||||||
# PATCH-FIX-UPSTREAM use run-crons instead of run-parts for anacron (bnc#689494)
|
# PATCH-FIX-UPSTREAM use run-crons instead of run-parts for anacron (bnc#689494)
|
||||||
Patch8: cronie-anacron-1.4.7-run-crons.patch
|
Patch8: cronie-anacron-1.4.7-run-crons.patch
|
||||||
Patch10: cronie-nofork-nopid.patch
|
|
||||||
Patch12: cronie-piddir.patch
|
Patch12: cronie-piddir.patch
|
||||||
# PATCH-FIX-SUSE the first occurance of "/etc/anacrontab" was replaced by "/etc/crontab"
|
# 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.
|
# in manpage file because the /etc/crontab is still used in SUSE.
|
||||||
Patch13: fix-manpage-replace-anacrontab-with-crontab.patch
|
Patch13: fix-manpage-replace-anacrontab-with-crontab.patch
|
||||||
BuildRequires: audit-devel
|
BuildRequires: audit-devel
|
||||||
|
BuildRequires: autoconf
|
||||||
|
BuildRequires: automake
|
||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
@ -104,14 +102,12 @@ The default settings execute regular jobs by anacron, however this could be
|
|||||||
overloaded in settings.
|
overloaded in settings.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q -n %{name}-%{name}-%{cronie_version}
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4
|
%patch4
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch7 -p1
|
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
cp %{SOURCE7} ./cron_to_cronie.README
|
cp %{SOURCE7} ./cron_to_cronie.README
|
||||||
%patch10
|
|
||||||
%patch12 -p1
|
%patch12 -p1
|
||||||
%patch13 -p1
|
%patch13 -p1
|
||||||
|
|
||||||
@ -119,6 +115,7 @@ cp %{SOURCE7} ./cron_to_cronie.README
|
|||||||
# 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
|
||||||
export CFLAGS="%{optflags} -DCRON_VERSION=\\\"%{version}\\\""
|
export CFLAGS="%{optflags} -DCRON_VERSION=\\\"%{version}\\\""
|
||||||
export LDFLAGS="-Wl,-z,relro,-z,now,-z,defs"
|
export LDFLAGS="-Wl,-z,relro,-z,now,-z,defs"
|
||||||
|
autoreconf -f -i
|
||||||
%configure \
|
%configure \
|
||||||
--with-audit \
|
--with-audit \
|
||||||
--enable-anacron \
|
--enable-anacron \
|
||||||
@ -206,8 +203,10 @@ exit 0
|
|||||||
%{_mandir}/man5/crontab.5%{ext_man}
|
%{_mandir}/man5/crontab.5%{ext_man}
|
||||||
%{_mandir}/man8/cron.8%{ext_man}
|
%{_mandir}/man8/cron.8%{ext_man}
|
||||||
%{_mandir}/man8/crond.8%{ext_man}
|
%{_mandir}/man8/crond.8%{ext_man}
|
||||||
|
%{_mandir}/man1/cronnext.1%{ext_man}
|
||||||
%verify(not mode) %attr (4750,root,trusted) %{_bindir}/crontab
|
%verify(not mode) %attr (4750,root,trusted) %{_bindir}/crontab
|
||||||
%attr (755,root,root) %{_sbindir}/cron
|
%attr (755,root,root) %{_sbindir}/cron
|
||||||
|
%attr (755,root,root) %{_bindir}/cronnext
|
||||||
%{_sbindir}/rccron
|
%{_sbindir}/rccron
|
||||||
%{_libexecdir}/cron
|
%{_libexecdir}/cron
|
||||||
%{_unitdir}/cron.service
|
%{_unitdir}/cron.service
|
||||||
|
Loading…
Reference in New Issue
Block a user