Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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 | |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 8 | # v1.9.14 |
| 9 | SRCREV = "4da3080ad4587860e5da73072d6ed54d0052938c" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 10 | SRC_URI = "git://github.com/jirka-h/haveged.git \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 11 | " |
| 12 | S = "${WORKDIR}/git" |
| 13 | |
| 14 | UPSTREAM_CHECK_URI = "https://github.com/jirka-h/haveged/releases" |
| 15 | |
| 16 | inherit autotools update-rc.d systemd |
| 17 | |
| 18 | EXTRA_OECONF = "\ |
| 19 | --enable-nistest=yes \ |
| 20 | --enable-olt=yes \ |
| 21 | --enable-threads=no \ |
| 22 | " |
| 23 | |
| 24 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 25 | PACKAGECONFIG[systemd] = "--enable-init=service.fedora --enable-initdir=${systemd_system_unitdir}, --enable-init=sysv.redhat, systemd" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 26 | |
| 27 | INITSCRIPT_PACKAGES = "${PN}" |
| 28 | INITSCRIPT_NAME = "haveged" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 29 | INITSCRIPT_PARAMS:${PN} = "defaults 9" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 30 | |
| 31 | SYSTEMD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 32 | SYSTEMD_SERVICE:${PN} = "haveged.service" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 33 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 34 | do_install:append() { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 35 | # The exit status is 143 when the service is stopped |
| 36 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 37 | sed -i '/ExecStart/a SuccessExitStatus=143' ${D}${systemd_system_unitdir}/haveged.service |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 38 | # Hybrid systemd-sysvinit distros must install the initscript manually |
| 39 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 40 | install -d ${D}${INIT_D_DIR} |
| 41 | sed -e "s,@SBINDIR@,${sbindir},g" <${S}/init.d/sysv.redhat >${D}${INIT_D_DIR}/haveged |
| 42 | chmod 755 ${D}${INIT_D_DIR}/haveged |
| 43 | fi |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 44 | fi |
| 45 | } |
| 46 | |
| 47 | MIPS_INSTRUCTION_SET = "mips" |