diff options
Diffstat (limited to 'meta/recipes-extended/cronie/cronie_1.4.8.bb')
-rw-r--r-- | meta/recipes-extended/cronie/cronie_1.4.8.bb | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-extended/cronie/cronie_1.4.8.bb b/meta/recipes-extended/cronie/cronie_1.4.8.bb new file mode 100644 index 0000000000..4cfdfadf6f --- /dev/null +++ b/meta/recipes-extended/cronie/cronie_1.4.8.bb | |||
@@ -0,0 +1,74 @@ | |||
1 | SUMMARY = "Cron daemon for executing programs at set times" | ||
2 | DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \ | ||
3 | specified programs at scheduled times and related tools. It is based on the \ | ||
4 | original cron and has security and configuration enhancements like the \ | ||
5 | ability to use pam and SELinux." | ||
6 | HOMEPAGE = "https://fedorahosted.org/cronie/" | ||
7 | BUGTRACKER = "mmaslano@redhat.com" | ||
8 | |||
9 | # Internet Systems Consortium License | ||
10 | LICENSE = "ISC & BSD" | ||
11 | LIC_FILES_CHKSUM = "file://COPYING;md5=963ea0772a2adbdcd607a9b2ec320c11 \ | ||
12 | file://src/cron.h;endline=20;md5=b425c334265026177128353a142633b4 \ | ||
13 | file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9" | ||
14 | |||
15 | SECTION = "utils" | ||
16 | |||
17 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
18 | PR = "r0" | ||
19 | |||
20 | SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \ | ||
21 | file://crond.init \ | ||
22 | file://crontab \ | ||
23 | ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" | ||
24 | |||
25 | PAM_SRC_URI = "file://crond_pam_config.patch" | ||
26 | |||
27 | |||
28 | SRC_URI[md5sum] = "9b1d2ce6db8d1883e06635f437170657" | ||
29 | SRC_URI[sha256sum] = "a3b910876f255712f1a5c364b74f34b0ceac9f6f3bbc45e854c5722785f513b3" | ||
30 | |||
31 | inherit autotools update-rc.d | ||
32 | |||
33 | EXTRA_OECONF += "\ | ||
34 | ${@base_contains('DISTRO_FEATURES', 'pam', '--with-libpam', '--without-libpam', d)}" | ||
35 | |||
36 | INITSCRIPT_NAME = "crond" | ||
37 | INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ." | ||
38 | |||
39 | do_install_append () { | ||
40 | install -d ${D}${sysconfdir}/sysconfig/ | ||
41 | install -d ${D}${sysconfdir}/init.d/ | ||
42 | install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond | ||
43 | install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond | ||
44 | |||
45 | # below are necessary for a complete cron environment | ||
46 | install -d ${D}${localstatedir}/spool/cron | ||
47 | install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/ | ||
48 | mkdir -p ${D}${sysconfdir}/cron.d | ||
49 | mkdir -p ${D}${sysconfdir}/cron.hourly | ||
50 | mkdir -p ${D}${sysconfdir}/cron.daily | ||
51 | mkdir -p ${D}${sysconfdir}/cron.weekly | ||
52 | mkdir -p ${D}${sysconfdir}/cron.monthly | ||
53 | } | ||
54 | |||
55 | FILES_${PN} += "${sysconfdir}/cron*" | ||
56 | |||
57 | pkg_postinst_${PN} () { | ||
58 | if [ "x$D" != "x" ] ; then | ||
59 | exit 1 | ||
60 | fi | ||
61 | |||
62 | # below setting is necessary to allow normal user using crontab | ||
63 | |||
64 | # add 'crontab' group and setgid for crontab binary | ||
65 | grep crontab /etc/group || addgroup crontab | ||
66 | chown root:crontab /usr/bin/crontab | ||
67 | chmod 2755 /usr/bin/crontab | ||
68 | |||
69 | # allow 'crontab' group write to /var/spool/cron | ||
70 | chown root:crontab /var/spool/cron | ||
71 | chmod 770 /var/spool/cron | ||
72 | |||
73 | chmod 600 /etc/crontab | ||
74 | } | ||