summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2016-11-17 22:51:33 +0100
committerThomas Deutschmann <whissi@gentoo.org>2016-11-17 23:00:08 +0100
commit531e27c45e1f413da44d8a51ece0f59e454586fb (patch)
tree2a077d0fab93ba1ff7874d91c1488897da5268fd /sys-process/fcron/files
parentsys-process/fcron: Add myself as maintainer (diff)
downloadgentoo-531e27c45e1f413da44d8a51ece0f59e454586fb.tar.gz
gentoo-531e27c45e1f413da44d8a51ece0f59e454586fb.tar.bz2
gentoo-531e27c45e1f413da44d8a51ece0f59e454586fb.zip
sys-process/fcron: Bumped to v3.2.1
EBuild changes: =============== - Migrated to EAPI=6. - Automagic on sys-process/audit removed. (Bug #540446) - Previously we did only install cronjobs which remove lastrun lock files however we did not install a cronjob which actually called "run-crons" in the default systab when using USE=-system-crontab with the result that we never actually executed any cronjob from /etc/cron.{hourly,daily,weekly,monthly}. This was fixed by adding the missing job. (Bug #464278) - Default systab rewritten to clarify the purpose of /etc/crontab when the package was built with USE=system-crontab. (Bug #466900, #467316) - Systab commands are now using absolute path. (Bug #525242) - OpenRC runscript updated - Shebang updated to use openrc-run. (Bug #573846) - Multi instance support fixed which was broken due to missing quotes in getconfig(). (Bug #520264, #533786) - Runscript now "use clock" instead of "need clock". (Bug #546138) - Runscript is now more reliable because it waits 1000ms per default to ensure that fcron daemon is really up and running and has not terminated due to a problem. Gentoo-Bug: https://bugs.gentoo.org/464278 Gentoo-Bug: https://bugs.gentoo.org/466900 Gentoo-Bug: https://bugs.gentoo.org/467316 Gentoo-Bug: https://bugs.gentoo.org/520264 Gentoo-Bug: https://bugs.gentoo.org/525242 Gentoo-Bug: https://bugs.gentoo.org/533786 Gentoo-Bug: https://bugs.gentoo.org/540446 Gentoo-Bug: https://bugs.gentoo.org/546138 Gentoo-Bug: https://bugs.gentoo.org/573846 Package-Manager: portage-2.3.2
Diffstat (limited to 'sys-process/fcron/files')
-rw-r--r--sys-process/fcron/files/crontab.226
-rw-r--r--sys-process/fcron/files/fcron-3.2.1-configure-fix-audit-parameter-check.patch30
-rw-r--r--sys-process/fcron/files/fcron.init.473
3 files changed, 129 insertions, 0 deletions
diff --git a/sys-process/fcron/files/crontab.2 b/sys-process/fcron/files/crontab.2
new file mode 100644
index 000000000000..4f2048f03de8
--- /dev/null
+++ b/sys-process/fcron/files/crontab.2
@@ -0,0 +1,26 @@
+# /etc/crontab:
+# This is fcron's special systab and *not* root's crontab!
+
+# Global variables
+SHELL=/bin/bash
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+MAILTO=root
+HOME=/
+
+# "run-crons" from sys-process/cronbase package doesn't allow selective
+# runs like "run-parts" from sys-apps/debianutils. So every time
+# "run-crons" gets executed it loops through
+# /etc/cron.{hourly,daily,weekly,monthly} and executes one after another if
+# lastrun lock file isn't in place.
+# Without fcron's "serial(true)" option it would be possible that a lastrun
+# lock file which should have been removed still exists when "run-crons"
+# starts so that a promptly execution of all cronjobs isn't always
+# guaranteed.
+
+!serial(true)
+00 * * * * /bin/rm -f /var/spool/cron/lastrun/cron.hourly
+00 00 * * * /bin/rm -f /var/spool/cron/lastrun/cron.daily
+00 00 * * 6 /bin/rm -f /var/spool/cron/lastrun/cron.weekly
+00 00 1 * * /bin/rm -f /var/spool/cron/lastrun/cron.monthly
+*/10 * * * * /usr/bin/test -x /usr/sbin/run-crons && /usr/sbin/run-crons
+!serial(false)
diff --git a/sys-process/fcron/files/fcron-3.2.1-configure-fix-audit-parameter-check.patch b/sys-process/fcron/files/fcron-3.2.1-configure-fix-audit-parameter-check.patch
new file mode 100644
index 000000000000..b4166ff9d7e3
--- /dev/null
+++ b/sys-process/fcron/files/fcron-3.2.1-configure-fix-audit-parameter-check.patch
@@ -0,0 +1,30 @@
+From cc7a684862fee31c442c49d6a537d86979c23220 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Thu, 17 Nov 2016 17:19:35 +0100
+Subject: [PATCH] configure: Fix --with-audit parameter check
+
+Due to a missing "$" the variable "$useaudit" was never checked for
+0 value with the result that you cannot disable building against
+libaudit.
+
+Gentoo-Bug: https://bugs.gentoo.org/540446
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 7e7634f..708d1dd 100644
+--- a/configure.in
++++ b/configure.in
+@@ -822,7 +822,7 @@ AC_ARG_WITH(audit,
+ ;;
+ esac ]
+ )
+-if test useaudit = "0"; then
++if test "$useaudit" = 0; then
+ AC_MSG_RESULT(no)
+ elif test "$useaudit" = "1" && test "$auditavail" != 1; then
+ useaudit=0
+--
+2.10.2
+
diff --git a/sys-process/fcron/files/fcron.init.4 b/sys-process/fcron/files/fcron.init.4
new file mode 100644
index 000000000000..e2441ee13bca
--- /dev/null
+++ b/sys-process/fcron/files/fcron.init.4
@@ -0,0 +1,73 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+FCRON_INSTANCE="${SVCNAME##*.}"
+
+if [[ -n "${FCRON_INSTANCE}" && "${SVCNAME}" != "fcron" ]]; then
+ FCRON_CONFIGFILE="/etc/fcron/fcron.${FCRON_INSTANCE}.conf"
+else
+ FCRON_CONFIGFILE="/etc/fcron/fcron.conf"
+fi
+
+getconfig() {
+ local key="$1"
+ local value_default="$2"
+ local value=
+
+ if service_started; then
+ value="$(service_get_value ${key})"
+ fi
+
+ if [[ -z "${value}" && -r "${FCRON_CONFIGFILE}" ]]; then
+ value="$(sed -n -e 's:^'"${key}"'[ \t]*=[ \t]*::p' "${FCRON_CONFIGFILE}")"
+ fi
+
+ if [[ -z "${value}" ]]; then
+ # Value not explicitly set in the configfile or configfile does not exist
+ # or is not readable
+ echo "${value_default}"
+ else
+ echo "${value}"
+ fi
+
+ return 0
+}
+
+depend() {
+ config "${FCRON_CONFIGFILE}"
+
+ use clock logger
+ need hostname
+
+ # provide the cron service if we are the main instance
+ [[ "${SVCNAME}" == "fcron" ]] && provide cron
+}
+
+command="/usr/libexec/fcron"
+command_args="-c \"${FCRON_CONFIGFILE}\""
+start_stop_daemon_args=${FCRON_SSDARGS:-"--wait 1000"}
+pidfile="$(getconfig pidfile /run/fcron.pid)"
+fcrontabs="$(getconfig fcrontabs /var/spool/fcron)"
+required_files="${FCRON_CONFIGFILE}"
+
+extra_started_commands="reload"
+
+reload() {
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+}
+
+start_pre() {
+ checkpath --file "${FCRON_CONFIGFILE}" --owner root:fcron --mode 0640
+
+ if [[ ! -d "${fcrontabs}" ]]; then
+ ebegin "Creating missing spooldir '${fcrontabs}'"
+ ${command} --newspooldir "${fcrontabs}"
+ eend $?
+ fi
+}
+
+start_post() {
+ service_set_value fcrontabs "${fcrontabs}"
+}