Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 1 | SUMMARY = "Software watchdog" |
| 2 | DESCRIPTION = "Watchdog is a daemon that checks if your system is still \ |
| 3 | working. If programs in user space are not longer executed \ |
| 4 | it will reboot the system." |
| 5 | HOMEPAGE = "http://watchdog.sourceforge.net/" |
| 6 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194" |
| 7 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 8 | LICENSE = "GPL-2.0-or-later" |
Andrew Geissler | 1e34c2d | 2020-05-29 16:02:59 -0500 | [diff] [blame] | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=084236108b1d4a9851bf5213fea586fd" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 10 | |
| 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 12 | file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 13 | file://watchdog.init \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 14 | file://wd_keepalive.init \ |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 15 | file://0001-wd_keepalive.service-use-run-instead-of-var-run.patch \ |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 16 | file://0001-shutdown-Do-not-guard-sys-quota.h-sys-swap.h-and-sys.patch \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 17 | " |
| 18 | |
Andrew Geissler | 1e34c2d | 2020-05-29 16:02:59 -0500 | [diff] [blame] | 19 | SRC_URI[md5sum] = "1b4f51cabc64d1bee2fce7cdd626831f" |
| 20 | SRC_URI[sha256sum] = "b8e7c070e1b72aee2663bdc13b5cc39f76c9232669cfbb1ac0adc7275a3b019d" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 21 | |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 22 | # Can be dropped when the output next changes, avoids failures after |
| 23 | # reproducibility issues |
| 24 | PR = "r1" |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 25 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 26 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/" |
| 27 | UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/" |
| 28 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 29 | inherit autotools update-rc.d systemd pkgconfig |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 30 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 31 | EXTRA_OECONF += " --disable-nfs " |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 32 | CACHED_CONFIGUREVARS += "ac_cv_path_PATH_SENDMAIL=${sbindir}/sendmail" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 33 | |
| 34 | INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive" |
| 35 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 36 | INITSCRIPT_NAME:${PN} = "watchdog" |
| 37 | INITSCRIPT_PARAMS:${PN} = "start 25 1 2 3 4 5 . stop 85 0 6 ." |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 38 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 39 | INITSCRIPT_NAME:${PN}-keepalive = "wd_keepalive" |
| 40 | INITSCRIPT_PARAMS:${PN}-keepalive = "start 25 1 2 3 4 5 . stop 85 0 6 ." |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 41 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 42 | SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 43 | SYSTEMD_SERVICE:${PN} = "watchdog.service" |
| 44 | SYSTEMD_SERVICE:${PN}-keepalive = "wd_keepalive.service" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 45 | # When using systemd, consider making use of internal watchdog support of systemd. |
| 46 | # See RuntimeWatchdogSec in /etc/systemd/system.conf. |
| 47 | SYSTEMD_AUTO_ENABLE = "disable" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 48 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 49 | do_install:append() { |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 50 | install -d ${D}${systemd_system_unitdir} |
| 51 | install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir} |
| 52 | install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir} |
| 53 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 54 | install -Dm 0755 ${WORKDIR}/watchdog.init ${D}/${sysconfdir}/init.d/watchdog |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 55 | install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive |
| 56 | |
| 57 | # watchdog.conf is provided by the watchdog-config recipe |
| 58 | rm ${D}${sysconfdir}/watchdog.conf |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | PACKAGES =+ "${PN}-keepalive" |
| 62 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 63 | FILES:${PN}-keepalive = " \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 64 | ${sysconfdir}/init.d/wd_keepalive \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 65 | ${systemd_system_unitdir}/wd_keepalive.service \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 66 | ${sbindir}/wd_keepalive \ |
| 67 | " |
| 68 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 69 | RDEPENDS:${PN} += "${PN}-config" |
| 70 | RRECOMMENDS:${PN} += "kernel-module-softdog" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 71 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 72 | RDEPENDS:${PN}-keepalive += "${PN}-config" |
| 73 | RCONFLICTS:${PN}-keepalive += "${PN}" |
| 74 | RRECOMMENDS:${PN}-keepalive += "kernel-module-softdog" |