summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/watchdog
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2016-06-03 12:15:02 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-04 14:13:35 +0100
commit0fb7a435852ab03210e0f23b944f6f8e6688f9fc (patch)
treed8f0fce4dba7c67b6ad332e9e02a9509c4d441be /meta/recipes-extended/watchdog
parentd2d5bf5c68d78647e287491fe75d28fbcfc10411 (diff)
downloadpoky-0fb7a435852ab03210e0f23b944f6f8e6688f9fc.tar.gz
watchdog: update to 5.15
Removed patches are all merged upstream. (From OE-Core rev: e25b27c89dd13f5a311b49a974b4410e7993ddae) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/watchdog')
-rw-r--r--meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch99
-rw-r--r--meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch79
-rw-r--r--meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch27
-rw-r--r--meta/recipes-extended/watchdog/watchdog_5.15.bb (renamed from meta/recipes-extended/watchdog/watchdog_5.14.bb)7
4 files changed, 2 insertions, 210 deletions
diff --git a/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch b/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch
deleted file mode 100644
index 8afed5c0db..0000000000
--- a/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch
+++ /dev/null
@@ -1,99 +0,0 @@
1From 83ec34df357218a1c9cfc13a23d3367d333652c3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 30 Dec 2015 01:01:15 +0000
4Subject: [PATCH] Fix build issues found with non glibc C libraries
5
6Add time.h for getting time_t definition
7limits.h for PATH_MAX
8linux/param.h for EXEC_PAGESIZE
9Replace deprecated MNTTAB with _PATH_MNTTAB
10include ext2_mnt.h for MNTOPT_USRQUOTA and MNTOPT_GRPQUOTA and
11MNTTYPE_EXT2
12Include sys/types.h for u_char definition
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16
17Upstream-Status: Submitted
18
19 include/extern.h | 1 +
20 src/configfile.c | 1 +
21 src/memory.c | 3 +++
22 src/net.c | 1 +
23 src/shutdown.c | 3 ++-
24 5 files changed, 8 insertions(+), 1 deletion(-)
25
26diff --git a/include/extern.h b/include/extern.h
27index 21db11b..04b16bc 100644
28--- a/include/extern.h
29+++ b/include/extern.h
30@@ -3,6 +3,7 @@
31
32 #include <netinet/in.h>
33 #include <stdio.h>
34+#include <time.h>
35
36 #include "logmessage.h"
37 #include "xmalloc.h"
38diff --git a/src/configfile.c b/src/configfile.c
39index be5d7b3..7c1d1dd 100644
40--- a/src/configfile.c
41+++ b/src/configfile.c
42@@ -16,6 +16,7 @@
43 #include <errno.h>
44 #include <string.h>
45 #include <dirent.h>
46+#include <limits.h>
47 #include <sys/stat.h>
48
49 #include "extern.h"
50diff --git a/src/memory.c b/src/memory.c
51index e9607e4..b5e08aa 100644
52--- a/src/memory.c
53+++ b/src/memory.c
54@@ -21,6 +21,9 @@
55 #include <sys/stat.h>
56 #include <sys/param.h>
57 #include <sys/mman.h>
58+#ifdef __linux__
59+#include <linux/param.h>
60+#endif
61
62 #include "extern.h"
63 #include "watch_err.h"
64diff --git a/src/net.c b/src/net.c
65index 21823ae..8930caf 100644
66--- a/src/net.c
67+++ b/src/net.c
68@@ -17,6 +17,7 @@
69 #include <string.h>
70 #include <unistd.h> /* for gethostname() etc */
71 #include <netdb.h> /* for gethostbyname() */
72+#include <sys/types.h>
73 #include <sys/param.h> /* for MAXHOSTNAMELEN */
74 #include <sys/socket.h>
75 #include <netinet/in.h>
76diff --git a/src/shutdown.c b/src/shutdown.c
77index 74aafa5..46b99cf 100644
78--- a/src/shutdown.c
79+++ b/src/shutdown.c
80@@ -25,6 +25,7 @@
81
82 #include "watch_err.h"
83 #include "extern.h"
84+#include "ext2_mnt.h"
85
86 #if defined __GLIBC__
87 #include "ext2_mnt.h"
88@@ -123,7 +124,7 @@ static void mnt_off()
89 FILE *fp;
90 struct mntent *mnt;
91
92- fp = setmntent(MNTTAB, "r");
93+ fp = setmntent(_PATH_MNTTAB, "r");
94 /* in some rare cases fp might be NULL so be careful */
95 while (fp != NULL && ((mnt = getmntent(fp)) != (struct mntent *)0)) {
96 /* First check if swap */
97--
982.6.4
99
diff --git a/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch b/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch
deleted file mode 100644
index 14ab9c56ab..0000000000
--- a/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch
+++ /dev/null
@@ -1,79 +0,0 @@
1Fix ping mode failure
2
3Upstream-Status: Pending
4
5When watchdog works on ping mode, the system will be rebooted since
6watchdog can not receive the expected ECOREPLY on a setting interval.
7
8Ping mode uses a raw socket to send a ECO packet, then uses select()
9to wait and recvfrom() to receive the ECOREPLY packet, if select()
10shows the data is ready, and the data is not the expected ECOREPLY,
11and waiting time is not overdue, it will continue use select() and
12recvfrom().
13
14Problem is that the raw socket can receive any icmp packets, if we do
15not set filters, and there are many icmp packets on socket, this
16program will not find its interested ECOREPLY packet in a special
17interval, which makes the ping mode fail.
18
19
20Other program is that watchdog sometime can not reach the call of
21recvfrom to try to receive packets since tv_sec of struct timeval
22of select parameter is 0.
23
24The timeout of select() is the result of ping interval minusing the
25time of calling gettimeofday spending, when ping interval is 1 second,
26and the call of gettimeofday() spends several useconds, the tv_sec of
27struct timeval of select parameter must be 0, at that condition, we
28should it is valid of tv_sec of struct timeval of select parameter be 0
29
30Signed-off-by: Roy.Li <rongqing.li@windriver.com>
31---
32 src/net.c | 2 +-
33 src/watchdog.c | 5 ++++-
34 2 files changed, 5 insertions(+), 2 deletions(-)
35
36Index: watchdog-5.14/src/watchdog.c
37===================================================================
38--- watchdog-5.14.orig/src/watchdog.c
39+++ watchdog-5.14/src/watchdog.c
40@@ -24,6 +24,7 @@
41 #include <sys/types.h>
42 #include <sys/ioctl.h>
43 #include <linux/oom.h>
44+#include <linux/icmp.h>
45 #include <linux/watchdog.h>
46 #include <string.h>
47
48Index: watchdog-5.14/src/net.c
49===================================================================
50--- watchdog-5.14.orig/src/net.c
51+++ watchdog-5.14/src/net.c
52@@ -11,7 +11,8 @@
53 #include <errno.h>
54 #include <sys/time.h>
55 #include <netinet/ip.h>
56-#include <netinet/ip_icmp.h>
57+#include <linux/icmp.h>
58+//#include <netinet/ip_icmp.h>
59 #include <fcntl.h>
60 #include <string.h>
61 #include <unistd.h> /* for gethostname() etc */
62@@ -179,6 +180,9 @@ int open_netcheck(struct list *tlist)
63 {
64 struct list *act;
65 int hold = 0;
66+ struct icmp_filter filt;
67+ filt.data = ~(1<<ICMP_ECHOREPLY);
68+
69
70 if (tlist != NULL) {
71 for (act = tlist; act != NULL; act = act->next) {
72@@ -202,6 +206,7 @@ int open_netcheck(struct list *tlist)
73 fatal_error(EX_SYSERR, "error opening socket (%s)", strerror(errno));
74 }
75
76+ setsockopt(net->sock_fp, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt));
77 /* this is necessary for broadcast pings to work */
78 (void)setsockopt(net->sock_fp, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold));
79
diff --git a/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch b/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch
deleted file mode 100644
index 2fad3a112f..0000000000
--- a/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1Fix out of tree build support:
2
3| installing /etc/watchdog.conf
4| /bin/mkdir -p '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man5'
5| /bin/mkdir -p '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man8'
6| /usr/bin/install -c -m 644 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/watchdog.conf.5 '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man5'
7| /usr/bin/install -c -m 644 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/watchdog.8 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/wd_keepalive.8 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/wd_identify.8 '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man8'
8| /usr/bin/install: cannot stat `watchdog.conf': No such file or directory
9| make[2]: *** [install-etc-local] Error 1
10
11Upstream-Status: Pending
12
13RP 2013/03/21
14
15Index: watchdog-5.13/Makefile.am
16===================================================================
17--- watchdog-5.13.orig/Makefile.am 2013-02-01 11:15:44.000000000 +0000
18+++ watchdog-5.13/Makefile.am 2013-03-21 11:59:35.637139031 +0000
19@@ -16,7 +16,7 @@
20 else \
21 echo "installing $(CONFIG_FILENAME)"; \
22 $(mkinstalldirs) `dirname $(DESTDIR)$(CONFIG_FILENAME)`; \
23- $(INSTALL_DATA) watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \
24+ $(INSTALL_DATA) $(srcdir)/watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \
25 fi
26
27 install-data-local: install-etc-local
diff --git a/meta/recipes-extended/watchdog/watchdog_5.14.bb b/meta/recipes-extended/watchdog/watchdog_5.15.bb
index 7330238972..76a3b427c8 100644
--- a/meta/recipes-extended/watchdog/watchdog_5.14.bb
+++ b/meta/recipes-extended/watchdog/watchdog_5.15.bb
@@ -9,15 +9,12 @@ LICENSE = "GPL-2.0+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569" 9LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569"
10 10
11SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ 11SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
12 file://fixsepbuild.patch \
13 file://fix-ping-failure.patch \
14 file://watchdog-init.patch \ 12 file://watchdog-init.patch \
15 file://watchdog-conf.patch \ 13 file://watchdog-conf.patch \
16 file://0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch \
17" 14"
18 15
19SRC_URI[md5sum] = "5b2dba0c593942f4acc100bca0d560c4" 16SRC_URI[md5sum] = "678c32f6f35a0492c9c1b76b4aa88828"
20SRC_URI[sha256sum] = "620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1" 17SRC_URI[sha256sum] = "ffdc865137ad5d8e53664bd22bad4de6ca136d1b4636720320cb52af0c18947c"
21 18
22UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/" 19UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/"
23UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/" 20UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"