cronie_1.5.1.bb 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 = "https://bugzilla.redhat.com"
  8. # Internet Systems Consortium License
  9. LICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & GPLv2+"
  10. LIC_FILES_CHKSUM = "file://COPYING;md5=dd2a592170760e1386c769e1043b3722 \
  11. file://src/cron.c;endline=20;md5=b425c334265026177128353a142633b4 \
  12. file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9"
  13. SECTION = "utils"
  14. SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
  15. file://crond.init \
  16. file://crontab \
  17. file://crond.service \
  18. ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
  19. PAM_SRC_URI = "file://crond_pam_config.patch"
  20. PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
  21. SRC_URI[md5sum] = "910e6effcc032998b0a49fbd46322e18"
  22. SRC_URI[sha256sum] = "6c73666102a6b5d35e2eaf1bd06925f2d4b0cef8d3323c37286dda3089a85338"
  23. inherit autotools update-rc.d useradd systemd
  24. PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
  25. PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit,"
  26. PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}"
  27. INITSCRIPT_NAME = "crond"
  28. INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
  29. USERADD_PACKAGES = "${PN}"
  30. GROUPADD_PARAM_${PN} = "--system crontab"
  31. SYSTEMD_SERVICE_${PN} = "crond.service"
  32. do_install_append () {
  33. install -d ${D}${sysconfdir}/sysconfig/
  34. install -d ${D}${sysconfdir}/init.d/
  35. install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond
  36. install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond
  37. # install systemd unit files
  38. install -d ${D}${systemd_unitdir}/system
  39. install -m 0644 ${WORKDIR}/crond.service ${D}${systemd_unitdir}/system
  40. sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
  41. -e 's,@SBINDIR@,${sbindir},g' \
  42. ${D}${systemd_unitdir}/system/crond.service
  43. # below are necessary for a complete cron environment
  44. install -d ${D}${localstatedir}/spool/cron
  45. install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/
  46. mkdir -p ${D}${sysconfdir}/cron.d
  47. mkdir -p ${D}${sysconfdir}/cron.hourly
  48. mkdir -p ${D}${sysconfdir}/cron.daily
  49. mkdir -p ${D}${sysconfdir}/cron.weekly
  50. mkdir -p ${D}${sysconfdir}/cron.monthly
  51. touch ${D}${sysconfdir}/cron.deny
  52. # below setting is necessary to allow normal user using crontab
  53. # setgid for crontab binary
  54. chown root:crontab ${D}${bindir}/crontab
  55. chmod 2755 ${D}${bindir}/crontab
  56. # allow 'crontab' group write to /var/spool/cron
  57. chown root:crontab ${D}${localstatedir}/spool/cron
  58. chmod 770 ${D}${localstatedir}/spool/cron
  59. chmod 600 ${D}${sysconfdir}/crontab
  60. }
  61. FILES_${PN} += "${sysconfdir}/cron*"
  62. CONFFILES_${PN} += "${sysconfdir}/crontab"