haveged_1.9.14.bb 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. SUMMARY = "haveged - A simple entropy daemon"
  2. DESCRIPTION = "The haveged project is an attempt to provide an easy-to-use, unpredictable random number generator based upon an adaptation of the HAVEGE algorithm. Haveged was created to remedy low-entropy conditions in the Linux random device that can occur under some workloads, especially on headless servers."
  3. AUTHOR = "Gary Wuertz"
  4. HOMEPAGE = "http://www.issihosts.com/haveged/index.html"
  5. LICENSE = "GPLv3"
  6. LIC_FILES_CHKSUM="file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
  7. # v1.9.14
  8. SRCREV = "4da3080ad4587860e5da73072d6ed54d0052938c"
  9. SRC_URI = "git://github.com/jirka-h/haveged.git \
  10. "
  11. S = "${WORKDIR}/git"
  12. UPSTREAM_CHECK_URI = "https://github.com/jirka-h/haveged/releases"
  13. inherit autotools update-rc.d systemd
  14. EXTRA_OECONF = "\
  15. --enable-nistest=yes \
  16. --enable-olt=yes \
  17. --enable-threads=no \
  18. "
  19. PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
  20. PACKAGECONFIG[systemd] = "--enable-init=service.fedora --enable-initdir=${systemd_system_unitdir}, --enable-init=sysv.redhat, systemd"
  21. INITSCRIPT_PACKAGES = "${PN}"
  22. INITSCRIPT_NAME = "haveged"
  23. INITSCRIPT_PARAMS_${PN} = "defaults 9"
  24. SYSTEMD_PACKAGES = "${PN}"
  25. SYSTEMD_SERVICE_${PN} = "haveged.service"
  26. do_install_append() {
  27. # The exit status is 143 when the service is stopped
  28. if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
  29. sed -i '/ExecStart/a SuccessExitStatus=143' ${D}${systemd_system_unitdir}/haveged.service
  30. # Hybrid systemd-sysvinit distros must install the initscript manually
  31. if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
  32. install -d ${D}${INIT_D_DIR}
  33. sed -e "s,@SBINDIR@,${sbindir},g" <${S}/init.d/sysv.redhat >${D}${INIT_D_DIR}/haveged
  34. chmod 755 ${D}${INIT_D_DIR}/haveged
  35. fi
  36. fi
  37. }
  38. MIPS_INSTRUCTION_SET = "mips"