diff options
Diffstat (limited to 'meta/recipes-extended/watchdog')
3 files changed, 67 insertions, 24 deletions
diff --git a/meta/recipes-extended/watchdog/watchdog-config.bb b/meta/recipes-extended/watchdog/watchdog-config.bb index 8bf40f0f0e..17151ced5e 100644 --- a/meta/recipes-extended/watchdog/watchdog-config.bb +++ b/meta/recipes-extended/watchdog/watchdog-config.bb | |||
@@ -5,7 +5,7 @@ the system." | |||
5 | HOMEPAGE = "http://watchdog.sourceforge.net/" | 5 | HOMEPAGE = "http://watchdog.sourceforge.net/" |
6 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194" | 6 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194" |
7 | 7 | ||
8 | LICENSE = "MIT-X" | 8 | LICENSE = "MIT" |
9 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | 9 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
10 | 10 | ||
11 | SRC_URI = " \ | 11 | SRC_URI = " \ |
@@ -13,8 +13,18 @@ SRC_URI = " \ | |||
13 | file://watchdog.conf \ | 13 | file://watchdog.conf \ |
14 | " | 14 | " |
15 | 15 | ||
16 | S = "${WORKDIR}/sources" | ||
17 | UNPACKDIR = "${S}" | ||
18 | |||
19 | # The default value is 60 seconds when null. | ||
20 | WATCHDOG_TIMEOUT ??= "" | ||
21 | |||
16 | do_install() { | 22 | do_install() { |
17 | install -Dm 0644 ${WORKDIR}/watchdog.default ${D}${sysconfdir}/default/watchdog | 23 | install -Dm 0644 ${UNPACKDIR}/watchdog.default ${D}${sysconfdir}/default/watchdog |
18 | install -Dm 0644 ${WORKDIR}/watchdog.conf ${D}${sysconfdir}/watchdog.conf | 24 | install -Dm 0644 ${UNPACKDIR}/watchdog.conf ${D}${sysconfdir}/watchdog.conf |
25 | |||
26 | if [ -n "${WATCHDOG_TIMEOUT}" ]; then | ||
27 | echo "watchdog-timeout = ${WATCHDOG_TIMEOUT}" >> ${D}/etc/watchdog.conf | ||
28 | fi | ||
19 | } | 29 | } |
20 | 30 | ||
diff --git a/meta/recipes-extended/watchdog/watchdog/0001-shutdown-Do-not-guard-sys-quota.h-sys-swap.h-and-sys.patch b/meta/recipes-extended/watchdog/watchdog/0001-shutdown-Do-not-guard-sys-quota.h-sys-swap.h-and-sys.patch new file mode 100644 index 0000000000..8c419e1d11 --- /dev/null +++ b/meta/recipes-extended/watchdog/watchdog/0001-shutdown-Do-not-guard-sys-quota.h-sys-swap.h-and-sys.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From ca1d379fa13c4055d42d2ff3a647b4397768efcd Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 23 Aug 2022 19:23:26 -0700 | ||
4 | Subject: [PATCH] shutdown: Do not guard sys/quota.h sys/swap.h and | ||
5 | sys/reboot.h with __GLIBC__ | ||
6 | |||
7 | These headers are provided by uclibc/musl/glibc and bionic so we can | ||
8 | assume they are not needed to be glibc specific includes. This also | ||
9 | ensures that we get proper declaration of reboot() API | ||
10 | |||
11 | Upstream-Status: Submitted [https://sourceforge.net/p/watchdog/patches/12/] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | src/shutdown.c | 4 ---- | ||
15 | 1 file changed, 4 deletions(-) | ||
16 | |||
17 | diff --git a/src/shutdown.c b/src/shutdown.c | ||
18 | index 1d9a857..6aea0d0 100644 | ||
19 | --- a/src/shutdown.c | ||
20 | +++ b/src/shutdown.c | ||
21 | @@ -29,13 +29,9 @@ | ||
22 | #include "extern.h" | ||
23 | #include "ext2_mnt.h" | ||
24 | |||
25 | -#if defined __GLIBC__ | ||
26 | #include <sys/quota.h> | ||
27 | #include <sys/swap.h> | ||
28 | #include <sys/reboot.h> | ||
29 | -#else /* __GLIBC__ */ | ||
30 | -#include <linux/quota.h> | ||
31 | -#endif /* __GLIBC__ */ | ||
32 | |||
33 | #include <unistd.h> | ||
34 | |||
35 | -- | ||
36 | 2.37.2 | ||
37 | |||
diff --git a/meta/recipes-extended/watchdog/watchdog_5.16.bb b/meta/recipes-extended/watchdog/watchdog_5.16.bb index 19e94757c7..c88ea08ade 100644 --- a/meta/recipes-extended/watchdog/watchdog_5.16.bb +++ b/meta/recipes-extended/watchdog/watchdog_5.16.bb | |||
@@ -5,7 +5,7 @@ it will reboot the system." | |||
5 | HOMEPAGE = "http://watchdog.sourceforge.net/" | 5 | HOMEPAGE = "http://watchdog.sourceforge.net/" |
6 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194" | 6 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194" |
7 | 7 | ||
8 | LICENSE = "GPL-2.0+" | 8 | LICENSE = "GPL-2.0-or-later" |
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=084236108b1d4a9851bf5213fea586fd" | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=084236108b1d4a9851bf5213fea586fd" |
10 | 10 | ||
11 | SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ | 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ |
@@ -13,6 +13,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ | |||
13 | file://watchdog.init \ | 13 | file://watchdog.init \ |
14 | file://wd_keepalive.init \ | 14 | file://wd_keepalive.init \ |
15 | file://0001-wd_keepalive.service-use-run-instead-of-var-run.patch \ | 15 | file://0001-wd_keepalive.service-use-run-instead-of-var-run.patch \ |
16 | file://0001-shutdown-Do-not-guard-sys-quota.h-sys-swap.h-and-sys.patch \ | ||
16 | " | 17 | " |
17 | 18 | ||
18 | SRC_URI[md5sum] = "1b4f51cabc64d1bee2fce7cdd626831f" | 19 | SRC_URI[md5sum] = "1b4f51cabc64d1bee2fce7cdd626831f" |
@@ -20,42 +21,37 @@ SRC_URI[sha256sum] = "b8e7c070e1b72aee2663bdc13b5cc39f76c9232669cfbb1ac0adc7275a | |||
20 | 21 | ||
21 | # Can be dropped when the output next changes, avoids failures after | 22 | # Can be dropped when the output next changes, avoids failures after |
22 | # reproducibility issues | 23 | # reproducibility issues |
23 | PR = "r1" | ||
24 | 24 | ||
25 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/" | 25 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/" |
26 | UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/" | 26 | UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/" |
27 | 27 | ||
28 | inherit autotools update-rc.d systemd pkgconfig | 28 | inherit autotools update-rc.d systemd pkgconfig |
29 | 29 | ||
30 | DEPENDS += "libtirpc" | ||
31 | CFLAGS += "-I${STAGING_INCDIR}/tirpc" | ||
32 | LDFLAGS += "-ltirpc" | ||
33 | |||
34 | EXTRA_OECONF += " --disable-nfs " | 30 | EXTRA_OECONF += " --disable-nfs " |
35 | CACHED_CONFIGUREVARS += "ac_cv_path_PATH_SENDMAIL=${sbindir}/sendmail" | 31 | CACHED_CONFIGUREVARS += "ac_cv_path_PATH_SENDMAIL=${sbindir}/sendmail" |
36 | 32 | ||
37 | INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive" | 33 | INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive" |
38 | 34 | ||
39 | INITSCRIPT_NAME_${PN} = "watchdog" | 35 | INITSCRIPT_NAME:${PN} = "watchdog" |
40 | INITSCRIPT_PARAMS_${PN} = "start 25 1 2 3 4 5 . stop 85 0 6 ." | 36 | INITSCRIPT_PARAMS:${PN} = "start 25 1 2 3 4 5 . stop 85 0 6 ." |
41 | 37 | ||
42 | INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive" | 38 | INITSCRIPT_NAME:${PN}-keepalive = "wd_keepalive" |
43 | INITSCRIPT_PARAMS_${PN}-keepalive = "start 25 1 2 3 4 5 . stop 85 0 6 ." | 39 | INITSCRIPT_PARAMS:${PN}-keepalive = "start 25 1 2 3 4 5 . stop 85 0 6 ." |
44 | 40 | ||
45 | SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive" | 41 | SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive" |
46 | SYSTEMD_SERVICE_${PN} = "watchdog.service" | 42 | SYSTEMD_SERVICE:${PN} = "watchdog.service" |
47 | SYSTEMD_SERVICE_${PN}-keepalive = "wd_keepalive.service" | 43 | SYSTEMD_SERVICE:${PN}-keepalive = "wd_keepalive.service" |
48 | # When using systemd, consider making use of internal watchdog support of systemd. | 44 | # When using systemd, consider making use of internal watchdog support of systemd. |
49 | # See RuntimeWatchdogSec in /etc/systemd/system.conf. | 45 | # See RuntimeWatchdogSec in /etc/systemd/system.conf. |
50 | SYSTEMD_AUTO_ENABLE = "disable" | 46 | SYSTEMD_AUTO_ENABLE = "disable" |
51 | 47 | ||
52 | do_install_append() { | 48 | do_install:append() { |
53 | install -d ${D}${systemd_system_unitdir} | 49 | install -d ${D}${systemd_system_unitdir} |
54 | install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir} | 50 | install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir} |
55 | install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir} | 51 | install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir} |
56 | 52 | ||
57 | install -Dm 0755 ${WORKDIR}/watchdog.init ${D}/${sysconfdir}/init.d/watchdog | 53 | install -Dm 0755 ${UNPACKDIR}/watchdog.init ${D}/${sysconfdir}/init.d/watchdog |
58 | install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive | 54 | install -Dm 0755 ${UNPACKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive |
59 | 55 | ||
60 | # watchdog.conf is provided by the watchdog-config recipe | 56 | # watchdog.conf is provided by the watchdog-config recipe |
61 | rm ${D}${sysconfdir}/watchdog.conf | 57 | rm ${D}${sysconfdir}/watchdog.conf |
@@ -63,15 +59,15 @@ do_install_append() { | |||
63 | 59 | ||
64 | PACKAGES =+ "${PN}-keepalive" | 60 | PACKAGES =+ "${PN}-keepalive" |
65 | 61 | ||
66 | FILES_${PN}-keepalive = " \ | 62 | FILES:${PN}-keepalive = " \ |
67 | ${sysconfdir}/init.d/wd_keepalive \ | 63 | ${sysconfdir}/init.d/wd_keepalive \ |
68 | ${systemd_system_unitdir}/wd_keepalive.service \ | 64 | ${systemd_system_unitdir}/wd_keepalive.service \ |
69 | ${sbindir}/wd_keepalive \ | 65 | ${sbindir}/wd_keepalive \ |
70 | " | 66 | " |
71 | 67 | ||
72 | RDEPENDS_${PN} += "${PN}-config" | 68 | RDEPENDS:${PN} += "${PN}-config" |
73 | RRECOMMENDS_${PN} += "kernel-module-softdog" | 69 | RRECOMMENDS:${PN} += "kernel-module-softdog" |
74 | 70 | ||
75 | RDEPENDS_${PN}-keepalive += "${PN}-config" | 71 | RDEPENDS:${PN}-keepalive += "${PN}-config" |
76 | RCONFLICTS_${PN}-keepalive += "${PN}" | 72 | RCONFLICTS:${PN}-keepalive += "${PN}" |
77 | RRECOMMENDS_${PN}-keepalive += "kernel-module-softdog" | 73 | RRECOMMENDS:${PN}-keepalive += "kernel-module-softdog" |