tmraz pushed to cronie (master). "Two small fixes. (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Tue Apr 21 13:40:18 UTC 2015
>From bb7b26ebbb3a16c093341e0a1e87e9877925fcfa Mon Sep 17 00:00:00 2001
From: Tomas Mraz <tmraz at fedoraproject.org>
Date: Tue, 21 Apr 2015 15:40:08 +0200
Subject: Two small fixes.
- mark the 0hourly and dailyjobs crontabs as config
- do not add already existing orphan on reload
diff --git a/cronie-1.4.12-refresh-users.patch b/cronie-1.4.12-refresh-users.patch
index 5e7dbb4..ab681a9 100644
--- a/cronie-1.4.12-refresh-users.patch
+++ b/cronie-1.4.12-refresh-users.patch
@@ -74,6 +74,51 @@ index 901a655..d8b2978 100644
}
}
}
+diff -up cronie-1.4.11/src/database.c.refresh-users cronie-1.4.11/src/database.c
+--- cronie-1.4.11/src/database.c.refresh-users 2013-07-18 14:27:08.000000000 +0200
++++ cronie-1.4.11/src/database.c 2015-04-21 15:20:03.768846359 +0200
+@@ -152,10 +152,41 @@ check_orphans(cron_db *db) {
+ }
+ }
+
++static int
++find_orphan(const char *uname, const char *fname, const char *tabname) {
++ orphan *o;
++
++ for (o = orphans; o != NULL; o = o->next) {
++ if (uname && o->uname) {
++ if (strcmp(uname, o->uname) != 0)
++ continue;
++ } else if (uname != o->uname)
++ continue;
++
++ if (fname && o->fname) {
++ if (strcmp(fname, o->fname) != 0)
++ continue;
++ } else if (fname != o->fname)
++ continue;
++
++ if (tabname && o->tabname) {
++ if (strcmp(tabname, o->tabname) != 0)
++ continue;
++ } else if (tabname != o->tabname)
++ continue;
++ return 1;
++ }
++
++ return 0;
++}
++
+ static void
+ add_orphan(const char *uname, const char *fname, const char *tabname) {
+ orphan *o;
+
++ if (find_orphan(uname, fname, tabname))
++ return;
++
+ o = calloc(1, sizeof(*o));
+ if (o == NULL)
+ return;
diff --git a/src/entry.c b/src/entry.c
index fa69524..3638207 100644
--- a/src/entry.c
diff --git a/cronie.spec b/cronie.spec
index 66574bb..0695370 100644
--- a/cronie.spec
+++ b/cronie.spec
@@ -6,7 +6,7 @@
Summary: Cron daemon for executing programs at set times
Name: cronie
Version: 1.4.12
-Release: 5%{?dist}
+Release: 6%{?dist}
License: MIT and BSD and ISC and GPLv2+
Group: System Environment/Base
URL: https://fedorahosted.org/cronie
@@ -187,7 +187,7 @@ exit 0
%endif
%config(noreplace) %{_sysconfdir}/sysconfig/crond
%config(noreplace) %{_sysconfdir}/cron.deny
-%attr(0644,root,root) %{_sysconfdir}/cron.d/0hourly
+%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cron.d/0hourly
%attr(0644,root,root) /lib/systemd/system/crond.service
%files anacron
@@ -202,9 +202,13 @@ exit 0
%{_mandir}/man8/anacron.*
%files noanacron
-%attr(0644,root,root) %{_sysconfdir}/cron.d/dailyjobs
+%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cron.d/dailyjobs
%changelog
+* Tue Apr 21 2015 Tomáš Mráz <tmraz at redhat.com> - 1.4.12-6
+- mark the 0hourly and dailyjobs crontabs as config
+- do not add already existing orphan on reload
+
* Tue Feb 3 2015 Tomáš Mráz <tmraz at redhat.com> - 1.4.12-5
- correct the permissions of the anacron timestamp files
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/cronie.git/commit/?h=master&id=bb7b26ebbb3a16c093341e0a1e87e9877925fcfa
More information about the scm-commits
mailing list