summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/cronie/cronie_1.4.12.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/cronie/cronie_1.4.12.bb')
-rw-r--r--meta/recipes-extended/cronie/cronie_1.4.12.bb80
1 files changed, 80 insertions, 0 deletions
diff --git a/meta/recipes-extended/cronie/cronie_1.4.12.bb b/meta/recipes-extended/cronie/cronie_1.4.12.bb
new file mode 100644
index 0000000000..e40475662d
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie_1.4.12.bb
@@ -0,0 +1,80 @@
1SUMMARY = "Cron daemon for executing programs at set times"
2DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \
3specified programs at scheduled times and related tools. It is based on the \
4original cron and has security and configuration enhancements like the \
5ability to use pam and SELinux."
6HOMEPAGE = "https://fedorahosted.org/cronie/"
7BUGTRACKER = "mmaslano@redhat.com"
8
9# Internet Systems Consortium License
10LICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & GPLv2+"
11LIC_FILES_CHKSUM = "file://COPYING;md5=dd2a592170760e1386c769e1043b3722 \
12 file://src/cron.c;endline=20;md5=b425c334265026177128353a142633b4 \
13 file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9"
14
15SECTION = "utils"
16
17SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
18 file://crond.init \
19 file://crontab \
20 file://crond.service \
21 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
22
23PAM_SRC_URI = "file://crond_pam_config.patch"
24PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
25
26SRC_URI[md5sum] = "199db91e514a4d75e3222d69874b132f"
27SRC_URI[sha256sum] = "0f5c9bf32f352599451c4ca0d6bc076d19e73ecfa5a90b34ecfe47c918c8bafd"
28
29inherit autotools update-rc.d useradd systemd
30
31PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
32
33PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit,"
34PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}"
35
36INITSCRIPT_NAME = "crond"
37INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
38
39USERADD_PACKAGES = "${PN}"
40GROUPADD_PARAM_${PN} = "--system crontab"
41
42SYSTEMD_SERVICE_${PN} = "crond.service"
43
44do_install_append () {
45 install -d ${D}${sysconfdir}/sysconfig/
46 install -d ${D}${sysconfdir}/init.d/
47 install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond
48 install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond
49
50 # install systemd unit files
51 install -d ${D}${systemd_unitdir}/system
52 install -m 0644 ${WORKDIR}/crond.service ${D}${systemd_unitdir}/system
53 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
54 -e 's,@SBINDIR@,${sbindir},g' \
55 ${D}${systemd_unitdir}/system/crond.service
56
57 # below are necessary for a complete cron environment
58 install -d ${D}${localstatedir}/spool/cron
59 install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/
60 mkdir -p ${D}${sysconfdir}/cron.d
61 mkdir -p ${D}${sysconfdir}/cron.hourly
62 mkdir -p ${D}${sysconfdir}/cron.daily
63 mkdir -p ${D}${sysconfdir}/cron.weekly
64 mkdir -p ${D}${sysconfdir}/cron.monthly
65 touch ${D}${sysconfdir}/cron.deny
66
67 # below setting is necessary to allow normal user using crontab
68
69 # setgid for crontab binary
70 chown root:crontab ${D}${bindir}/crontab
71 chmod 2755 ${D}${bindir}/crontab
72
73 # allow 'crontab' group write to /var/spool/cron
74 chown root:crontab ${D}${localstatedir}/spool/cron
75 chmod 770 ${D}${localstatedir}/spool/cron
76
77 chmod 600 ${D}${sysconfdir}/crontab
78}
79
80FILES_${PN} += "${sysconfdir}/cron*"