2010-11-18 23:44:37 +00:00
|
|
|
SUMMARY = "Cron daemon for executing programs at set times"
|
2010-09-02 14:29:51 +00:00
|
|
|
DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \
|
|
|
|
specified programs at scheduled times and related tools. It is based on the \
|
|
|
|
original cron and has security and configuration enhancements like the \
|
|
|
|
ability to use pam and SELinux."
|
|
|
|
HOMEPAGE = "https://fedorahosted.org/cronie/"
|
|
|
|
BUGTRACKER = "mmaslano@redhat.com"
|
|
|
|
|
|
|
|
# Internet Systems Consortium License
|
2011-05-25 21:05:02 +00:00
|
|
|
LICENSE = "ISC & BSD"
|
2010-09-02 14:29:51 +00:00
|
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=963ea0772a2adbdcd607a9b2ec320c11 \
|
|
|
|
file://src/cron.h;endline=20;md5=b425c334265026177128353a142633b4 \
|
|
|
|
file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9"
|
|
|
|
|
|
|
|
SECTION = "utils"
|
|
|
|
|
2011-07-20 02:42:28 +00:00
|
|
|
DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
|
2011-08-20 09:15:50 +00:00
|
|
|
RDEPENDS_${PN} = "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)}"
|
|
|
|
PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
|
|
|
|
|
2013-03-13 16:53:09 +00:00
|
|
|
PR = "r0"
|
2010-09-02 14:29:51 +00:00
|
|
|
|
|
|
|
SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
|
2011-01-26 11:09:14 +00:00
|
|
|
file://crond.init \
|
2011-07-20 02:42:28 +00:00
|
|
|
file://crontab \
|
|
|
|
${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
|
|
|
|
|
|
|
|
PAM_SRC_URI = "file://crond_pam_config.patch"
|
|
|
|
|
2010-09-02 14:29:51 +00:00
|
|
|
|
2013-03-13 16:53:09 +00:00
|
|
|
SRC_URI[md5sum] = "9133195e5e6f824ef460f5ccc533f1b7"
|
|
|
|
SRC_URI[sha256sum] = "bd7f6f118460c452bd1217a24b80fd3c000425d3de28731b98354a81a2133e92"
|
2010-12-08 04:06:29 +00:00
|
|
|
|
2011-11-19 14:55:56 +00:00
|
|
|
inherit autotools update-rc.d useradd
|
2010-09-02 14:29:51 +00:00
|
|
|
|
2011-07-20 02:42:28 +00:00
|
|
|
EXTRA_OECONF += "\
|
2011-08-20 09:15:50 +00:00
|
|
|
${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}"
|
2011-07-20 02:42:28 +00:00
|
|
|
|
2010-09-02 14:29:51 +00:00
|
|
|
INITSCRIPT_NAME = "crond"
|
|
|
|
INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
|
|
|
|
|
2011-11-19 14:55:56 +00:00
|
|
|
USERADD_PACKAGES = "${PN}"
|
|
|
|
GROUPADD_PARAM_${PN} = "crontab"
|
|
|
|
|
2010-09-02 14:29:51 +00:00
|
|
|
do_install_append () {
|
|
|
|
install -d ${D}${sysconfdir}/sysconfig/
|
|
|
|
install -d ${D}${sysconfdir}/init.d/
|
|
|
|
install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond
|
|
|
|
install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond
|
2011-01-26 11:09:14 +00:00
|
|
|
|
|
|
|
# below are necessary for a complete cron environment
|
|
|
|
install -d ${D}${localstatedir}/spool/cron
|
|
|
|
install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/
|
2011-04-21 09:24:29 +00:00
|
|
|
mkdir -p ${D}${sysconfdir}/cron.d
|
2011-01-26 11:09:14 +00:00
|
|
|
mkdir -p ${D}${sysconfdir}/cron.hourly
|
|
|
|
mkdir -p ${D}${sysconfdir}/cron.daily
|
|
|
|
mkdir -p ${D}${sysconfdir}/cron.weekly
|
|
|
|
mkdir -p ${D}${sysconfdir}/cron.monthly
|
2011-08-20 09:15:50 +00:00
|
|
|
touch ${D}${sysconfdir}/cron.deny
|
2011-11-19 14:55:56 +00:00
|
|
|
|
2011-01-26 11:09:14 +00:00
|
|
|
# below setting is necessary to allow normal user using crontab
|
|
|
|
|
2011-11-19 14:55:56 +00:00
|
|
|
# setgid for crontab binary
|
2012-08-05 19:48:34 +00:00
|
|
|
chown root:crontab ${D}${bindir}/crontab
|
|
|
|
chmod 2755 ${D}${bindir}/crontab
|
2011-01-26 11:09:14 +00:00
|
|
|
|
|
|
|
# allow 'crontab' group write to /var/spool/cron
|
2012-08-05 19:48:34 +00:00
|
|
|
chown root:crontab ${D}${localstatedir}/spool/cron
|
|
|
|
chmod 770 ${D}${localstatedir}/spool/cron
|
2011-01-26 11:09:14 +00:00
|
|
|
|
2012-08-05 19:48:34 +00:00
|
|
|
chmod 600 ${D}${sysconfdir}/crontab
|
2010-09-02 14:29:51 +00:00
|
|
|
}
|
2011-11-19 14:55:56 +00:00
|
|
|
|
|
|
|
FILES_${PN} += "${sysconfdir}/cron*"
|
|
|
|
|