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."
|
2017-04-03 02:51:47 +00:00
|
|
|
HOMEPAGE = "https://github.com/cronie-crond/cronie/"
|
2015-10-07 03:33:00 +00:00
|
|
|
BUGTRACKER = "https://bugzilla.redhat.com"
|
2010-09-02 14:29:51 +00:00
|
|
|
|
|
|
|
# Internet Systems Consortium License
|
2014-11-11 23:57:43 +00:00
|
|
|
LICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & GPLv2+"
|
|
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=dd2a592170760e1386c769e1043b3722 \
|
2013-08-16 08:30:49 +00:00
|
|
|
file://src/cron.c;endline=20;md5=b425c334265026177128353a142633b4 \
|
2010-09-02 14:29:51 +00:00
|
|
|
file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9"
|
|
|
|
|
|
|
|
SECTION = "utils"
|
|
|
|
|
2017-04-03 02:51:47 +00:00
|
|
|
UPSTREAM_CHECK_URI = "https://github.com/cronie-crond/${BPN}/releases/"
|
|
|
|
|
|
|
|
SRC_URI = "https://github.com/cronie-crond/cronie/releases/download/cronie-${PV}/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 \
|
2014-04-23 09:40:50 +00:00
|
|
|
file://crond.service \
|
2014-04-24 18:59:20 +00:00
|
|
|
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
|
2011-07-20 02:42:28 +00:00
|
|
|
|
|
|
|
PAM_SRC_URI = "file://crond_pam_config.patch"
|
2013-08-23 17:37:17 +00:00
|
|
|
PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
|
2010-09-02 14:29:51 +00:00
|
|
|
|
2016-08-02 15:08:36 +00:00
|
|
|
SRC_URI[md5sum] = "910e6effcc032998b0a49fbd46322e18"
|
|
|
|
SRC_URI[sha256sum] = "6c73666102a6b5d35e2eaf1bd06925f2d4b0cef8d3323c37286dda3089a85338"
|
2010-12-08 04:06:29 +00:00
|
|
|
|
2014-04-23 09:40:50 +00:00
|
|
|
inherit autotools update-rc.d useradd systemd
|
2010-09-02 14:29:51 +00:00
|
|
|
|
2017-02-27 13:02:50 +00:00
|
|
|
PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
|
2013-08-23 17:37:17 +00:00
|
|
|
|
|
|
|
PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit,"
|
|
|
|
PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}"
|
|
|
|
|
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}"
|
2013-04-09 12:27:24 +00:00
|
|
|
GROUPADD_PARAM_${PN} = "--system crontab"
|
2011-11-19 14:55:56 +00:00
|
|
|
|
2014-04-23 09:40:50 +00:00
|
|
|
SYSTEMD_SERVICE_${PN} = "crond.service"
|
|
|
|
|
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
|
|
|
|
2014-04-23 09:40:50 +00:00
|
|
|
# install systemd unit files
|
|
|
|
install -d ${D}${systemd_unitdir}/system
|
|
|
|
install -m 0644 ${WORKDIR}/crond.service ${D}${systemd_unitdir}/system
|
|
|
|
sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
|
|
|
|
-e 's,@SBINDIR@,${sbindir},g' \
|
|
|
|
${D}${systemd_unitdir}/system/crond.service
|
|
|
|
|
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
|
2014-11-19 21:29:53 +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*"
|
2014-11-19 21:29:53 +00:00
|
|
|
CONFFILES_${PN} += "${sysconfdir}/crontab"
|