blob: 5325ccafdad3535b81b1d1e47bbb93bd294ea01c [file] [log] [blame]
Patrick Williamsc0f7c042017-02-23 20:41:17 -06001SUMMARY = "Software watchdog"
2DESCRIPTION = "Watchdog is a daemon that checks if your system is still \
3working. If programs in user space are not longer executed \
4it will reboot the system."
5HOMEPAGE = "http://watchdog.sourceforge.net/"
6BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194"
7
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008LICENSE = "GPL-2.0-or-later"
Andrew Geissler1e34c2d2020-05-29 16:02:59 -05009LIC_FILES_CHKSUM = "file://COPYING;md5=084236108b1d4a9851bf5213fea586fd"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060010
11SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
Brad Bishop316dfdd2018-06-25 12:45:53 -040012 file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013 file://watchdog.init \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060014 file://wd_keepalive.init \
Andrew Geissler4c19ea12020-10-27 13:52:24 -050015 file://0001-wd_keepalive.service-use-run-instead-of-var-run.patch \
Patrick Williams92b42cb2022-09-03 06:53:57 -050016 file://0001-shutdown-Do-not-guard-sys-quota.h-sys-swap.h-and-sys.patch \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060017"
18
Andrew Geissler1e34c2d2020-05-29 16:02:59 -050019SRC_URI[md5sum] = "1b4f51cabc64d1bee2fce7cdd626831f"
20SRC_URI[sha256sum] = "b8e7c070e1b72aee2663bdc13b5cc39f76c9232669cfbb1ac0adc7275a3b019d"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060021
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060022# Can be dropped when the output next changes, avoids failures after
23# reproducibility issues
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060024
Patrick Williamsc0f7c042017-02-23 20:41:17 -060025UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/"
26UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
27
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080028inherit autotools update-rc.d systemd pkgconfig
Patrick Williamsc0f7c042017-02-23 20:41:17 -060029
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080030EXTRA_OECONF += " --disable-nfs "
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060031CACHED_CONFIGUREVARS += "ac_cv_path_PATH_SENDMAIL=${sbindir}/sendmail"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060032
33INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive"
34
Patrick Williams213cb262021-08-07 19:21:33 -050035INITSCRIPT_NAME:${PN} = "watchdog"
36INITSCRIPT_PARAMS:${PN} = "start 25 1 2 3 4 5 . stop 85 0 6 ."
Patrick Williamsc0f7c042017-02-23 20:41:17 -060037
Patrick Williams213cb262021-08-07 19:21:33 -050038INITSCRIPT_NAME:${PN}-keepalive = "wd_keepalive"
39INITSCRIPT_PARAMS:${PN}-keepalive = "start 25 1 2 3 4 5 . stop 85 0 6 ."
Patrick Williamsc0f7c042017-02-23 20:41:17 -060040
Brad Bishop316dfdd2018-06-25 12:45:53 -040041SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive"
Patrick Williams213cb262021-08-07 19:21:33 -050042SYSTEMD_SERVICE:${PN} = "watchdog.service"
43SYSTEMD_SERVICE:${PN}-keepalive = "wd_keepalive.service"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080044# When using systemd, consider making use of internal watchdog support of systemd.
45# See RuntimeWatchdogSec in /etc/systemd/system.conf.
46SYSTEMD_AUTO_ENABLE = "disable"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060047
Patrick Williams213cb262021-08-07 19:21:33 -050048do_install:append() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050049 install -d ${D}${systemd_system_unitdir}
50 install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir}
51 install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir}
52
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080053 install -Dm 0755 ${WORKDIR}/watchdog.init ${D}/${sysconfdir}/init.d/watchdog
Brad Bishopd7bf8c12018-02-25 22:55:05 -050054 install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive
55
56 # watchdog.conf is provided by the watchdog-config recipe
57 rm ${D}${sysconfdir}/watchdog.conf
Patrick Williamsc0f7c042017-02-23 20:41:17 -060058}
59
60PACKAGES =+ "${PN}-keepalive"
61
Patrick Williams213cb262021-08-07 19:21:33 -050062FILES:${PN}-keepalive = " \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060063 ${sysconfdir}/init.d/wd_keepalive \
Brad Bishop316dfdd2018-06-25 12:45:53 -040064 ${systemd_system_unitdir}/wd_keepalive.service \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060065 ${sbindir}/wd_keepalive \
66"
67
Patrick Williams213cb262021-08-07 19:21:33 -050068RDEPENDS:${PN} += "${PN}-config"
69RRECOMMENDS:${PN} += "kernel-module-softdog"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050070
Patrick Williams213cb262021-08-07 19:21:33 -050071RDEPENDS:${PN}-keepalive += "${PN}-config"
72RCONFLICTS:${PN}-keepalive += "${PN}"
73RRECOMMENDS:${PN}-keepalive += "kernel-module-softdog"