From 73d26c19234c2c537dece717a321f1d1e2bfa07a Mon Sep 17 00:00:00 2001 From: Josef Ridky Date: Mon, 3 Dec 2018 08:49:58 +0100 Subject: [PATCH 01/23] Resolves: #1542632 - remove deprecated rows from service file --- watchdog-ping.service | 1 - watchdog.service | 1 - watchdog.spec | 5 ++++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/watchdog-ping.service b/watchdog-ping.service index da403c9..1ae93b1 100644 --- a/watchdog-ping.service +++ b/watchdog-ping.service @@ -6,7 +6,6 @@ Conflicts=watchdog.service [Service] Type=forking ExecStart=/usr/sbin/watchdog -ControlGroup=cpu:/ [Install] WantedBy=multi-user.target diff --git a/watchdog.service b/watchdog.service index 3c36a08..e5847b9 100644 --- a/watchdog.service +++ b/watchdog.service @@ -6,7 +6,6 @@ Description=watchdog daemon [Service] Type=forking ExecStart=/usr/sbin/watchdog -ControlGroup=cpu:/ [Install] WantedBy=multi-user.target diff --git a/watchdog.spec b/watchdog.spec index a93359c..789fe93 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.15 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/watchdog/ @@ -119,6 +119,9 @@ install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts %changelog +* Mon Dec 03 2018 Josef Ridky - 5.15-3 +- update service files (#1542632) + * Sat Jul 14 2018 Fedora Release Engineering - 5.15-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From ef13aca6fa33e22953c803e018a73dc6df2927ec Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 11:33:05 +0000 Subject: [PATCH 02/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- watchdog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index 789fe93..4a5c8ec 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.15 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/watchdog/ @@ -119,6 +119,9 @@ install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 5.15-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Mon Dec 03 2018 Josef Ridky - 5.15-3 - update service files (#1542632) From ebeefbbb7ed07c9bfdff7a9d818a6f43e366c096 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 6 Feb 2019 13:34:29 +0000 Subject: [PATCH 03/23] Add all upstream patches since 5.15. Fix RPC/libtirpc (again?). Remove .rhsel patch. Equivalent added upstream in 7310afccc1. --- ...param.h-for-EXEC_PAGESIZE-definition.patch | 28 +++ ...ake-watchdog-refresh-settimeout-work.patch | 153 +++++++++++++++ 0003-Ignore-build-products-in-GIT.patch | 66 +++++++ 0003-watchdog-5.13-rhsel.patch | 34 ---- ...mpile-with-musl-when-nfs-is-disabled.patch | 32 +++ 0005-Rename-READ_ENUM-to-READ_YESNO.patch | 64 ++++++ ...ake-IT87-fix-up-automatic-by-default.patch | 183 ++++++++++++++++++ 0007-Synced-Debian-files-with-5.15-2.patch | 116 +++++++++++ 0008-Fix-automated-CentOS-7-build.patch | 58 ++++++ ...atchdog-configuration-file-corruptio.patch | 101 ++++++++++ ...or-another-RPC-library-for-XDR-heade.patch | 57 ++++++ watchdog.spec | 35 +++- 12 files changed, 889 insertions(+), 38 deletions(-) create mode 100644 0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch create mode 100644 0002-Generalize-and-make-watchdog-refresh-settimeout-work.patch create mode 100644 0003-Ignore-build-products-in-GIT.patch delete mode 100644 0003-watchdog-5.13-rhsel.patch create mode 100644 0004-Compile-with-musl-when-nfs-is-disabled.patch create mode 100644 0005-Rename-READ_ENUM-to-READ_YESNO.patch create mode 100644 0006-Make-IT87-fix-up-automatic-by-default.patch create mode 100644 0007-Synced-Debian-files-with-5.15-2.patch create mode 100644 0008-Fix-automated-CentOS-7-build.patch create mode 100644 0009-Bugfix-against-watchdog-configuration-file-corruptio.patch create mode 100644 0010-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch diff --git a/0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch b/0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch new file mode 100644 index 0000000..35eadf1 --- /dev/null +++ b/0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch @@ -0,0 +1,28 @@ +From c5cb4e1a0339844ae3f55ff1dc4a716c28012f05 Mon Sep 17 00:00:00 2001 +From: Paul Crawford +Date: Tue, 28 Jun 2016 18:08:48 +0100 +Subject: [PATCH 01/10] Include linux/param.h for EXEC_PAGESIZE definition + +Musl does not include linux/param.h whereas glibc does, so it fails +to build on musl. Patch supplied by Khem Raj +--- + src/watchdog.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/watchdog.c b/src/watchdog.c +index acf6450..486384a 100644 +--- a/src/watchdog.c ++++ b/src/watchdog.c +@@ -26,6 +26,9 @@ + #include /* For EXEC_PAGESIZE */ + #include + #include ++#ifdef __linux__ ++#include ++#endif + #include + + #include +-- +2.20.1 + diff --git a/0002-Generalize-and-make-watchdog-refresh-settimeout-work.patch b/0002-Generalize-and-make-watchdog-refresh-settimeout-work.patch new file mode 100644 index 0000000..f31af9a --- /dev/null +++ b/0002-Generalize-and-make-watchdog-refresh-settimeout-work.patch @@ -0,0 +1,153 @@ +From 00cf0b0afc7cac797713276435322aeacd6020cb Mon Sep 17 00:00:00 2001 +From: "Maciej S. Szmigiero" +Date: Fri, 16 Dec 2016 23:18:00 +0100 +Subject: [PATCH 02/10] Generalize and make watchdog refresh "settimeout" + workaround configurable + +Commit 0d156df287656 introduced a workaround for a bug in the kernel +it87_wdt driver, where on some boards the watchdog timer wasn't refreshed +correctly. The workaround was to set its timeout again every refresh. + +However, this workaround was introduced unconditionally for every user of +the it87_wdt driver. +Currently, this kernel bug is supposed to be fixed ( by kernel commit +0bcd0b6a47431 ) so let's revert to old behavior by default so we by +coincidence don't mask future bugs and also comply with the kernel watchdog +API. + +Let's also print an informational message for an user how to re-enable the +workaround in case this driver bug wasn't fixed completely or the user +has an older kernel version without the fix. + +This change also makes this workaround available generically in case +a similar problem occurs in future in some other driver. +--- + include/extern.h | 1 + + src/configfile.c | 3 +++ + src/keep_alive.c | 20 +++++++++++--------- + watchdog.conf | 3 +++ + watchdog.conf.5 | 6 ++++++ + 5 files changed, 24 insertions(+), 9 deletions(-) + +diff --git a/include/extern.h b/include/extern.h +index f00e4cf..cbf97fd 100644 +--- a/include/extern.h ++++ b/include/extern.h +@@ -91,6 +91,7 @@ extern char *logdir; + extern char *heartbeat; + extern int hbstamps; + ++extern int refresh_use_settimeout; + extern int realtime; + + extern struct list *tr_bin_list; +diff --git a/src/configfile.c b/src/configfile.c +index a0996e2..10bbc69 100644 +--- a/src/configfile.c ++++ b/src/configfile.c +@@ -28,6 +28,7 @@ static void add_test_binaries(const char *path); + #define ADMIN "admin" + #define CHANGE "change" + #define DEVICE "watchdog-device" ++#define DEVICE_USE_SETTIMEOUT "watchdog-refresh-use-settimeout" + #define DEVICE_TIMEOUT "watchdog-timeout" + #define FILENAME "file" + #define INTERFACE "interface" +@@ -95,6 +96,7 @@ char *logdir = "/var/log/watchdog"; + char *heartbeat = NULL; + int hbstamps = 300; + ++int refresh_use_settimeout = FALSE; + int realtime = FALSE; + + /* Self-repairing binaries list */ +@@ -206,6 +208,7 @@ void read_config(char *configfile) + } else if (READ_INT(LOGTICK, &logtick) == 0) { + ticker = logtick; + } else if (READ_STRING(DEVICE, &devname) == 0) { ++ } else if (READ_ENUM(DEVICE_USE_SETTIMEOUT, &refresh_use_settimeout) == 0) { + } else if (READ_INT(DEVICE_TIMEOUT, &dev_timeout) == 0) { + } else if (READ_LIST(TEMP, &temp_list) == 0) { + } else if (READ_INT(MAXTEMP, &maxtemp) == 0) { +diff --git a/src/keep_alive.c b/src/keep_alive.c +index 2f77665..a57b0b5 100644 +--- a/src/keep_alive.c ++++ b/src/keep_alive.c +@@ -29,7 +29,6 @@ + + static int watchdog_fd = -1; + static int timeout_used = TIMER_MARGIN; +-static int Refresh_using_ioctl = FALSE; + + /* + * Open the watchdog timer (if name non-NULL) and set the time-out value (if non-zero). +@@ -68,16 +67,19 @@ int open_watchdog(char *name, int timeout) + /* The IT8728 on Gigabyte motherboard (and similar) would trip due to the normal + * refresh in the device driver failing to reset the timer for no obvious reason + * (though the normal operation used the Consumer IR sender to refresh via an +- * interrupt - also a non-obvious method!) so this work-around simply sets the +- * time-out every refresh operation. ++ * interrupt - also a non-obvious method!) so let's warn users of these ++ * watchdogs and direct them to a workaround option. + * +- * See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/932381 ++ * See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/932381 and ++ * https://bugzilla.kernel.org/show_bug.cgi?id=42801 + * + */ +- Refresh_using_ioctl = FALSE; +- if (strcmp("IT87 WDT", (char *)ident.identity) == 0) { +- Refresh_using_ioctl = TRUE; +- log_message(LOG_INFO, "Running IT87 module fix-up"); ++ if (!refresh_use_settimeout && strcmp("IT87 WDT", (char *)ident.identity) == 0) { ++ log_message(LOG_INFO, ++ "IT87 watchdog detected, if watchdog trips by itself when the first timeout interval elapses " ++ "try updating to the latest kernel"); ++ log_message(LOG_INFO, "if this does not help please report a kernel bug (not this package bug!) " ++ "and try using watchdog-refresh-use-settimeout=yes config option as a workaround"); + } + + return rv; +@@ -163,7 +165,7 @@ int keep_alive(void) + if (watchdog_fd == -1) + return (ENOERR); + +- if (Refresh_using_ioctl) { ++ if (refresh_use_settimeout) { + int timeout = timeout_used; + if (ioctl(watchdog_fd, WDIOC_SETTIMEOUT, &timeout) < 0) { + err = errno; +diff --git a/watchdog.conf b/watchdog.conf +index 3ccdb97..dcd59ce 100644 +--- a/watchdog.conf ++++ b/watchdog.conf +@@ -29,6 +29,9 @@ + #repair-maximum = 1 + + #watchdog-device = /dev/watchdog ++# If your watchdog trips by itself when the first timeout interval elapses try ++# uncommenting the line below ++#watchdog-refresh-use-settimeout = yes + + # Defaults compiled into the binary + #temperature-sensor = +diff --git a/watchdog.conf.5 b/watchdog.conf.5 +index 5af519d..4e5155a 100644 +--- a/watchdog.conf.5 ++++ b/watchdog.conf.5 +@@ -64,6 +64,12 @@ Set the watchdog device name, typically /dev/watchdog. Default is to disable + keep alive support. This should be tested by running the daemon from the + command line before configuring it to start automatically on booting. + .TP ++watchdog-refresh-use-settimeout = ++Refresh watchdog timer by setting its timeout instead of using a normal watchdog ++refresh operation. ++Might help if your watchdog trips by itself when the first timeout interval ++elapses. ++.TP + watchdog-timeout = + Set the watchdog device timeout during startup. If not set, a default is used + that should be set to the kernel timer margin at compile time. +-- +2.20.1 + diff --git a/0003-Ignore-build-products-in-GIT.patch b/0003-Ignore-build-products-in-GIT.patch new file mode 100644 index 0000000..39af455 --- /dev/null +++ b/0003-Ignore-build-products-in-GIT.patch @@ -0,0 +1,66 @@ +From de06f50eee35e3ea0daaf77d21e8888f8d8753ad Mon Sep 17 00:00:00 2001 +From: Paul Crawford +Date: Wed, 21 Dec 2016 22:00:51 +0000 +Subject: [PATCH 03/10] Ignore build products in GIT + +- Added a .gitignore file to list those files we do not track in GIT + +- Based on pull request by Maciej S. Szmigiero: + + Currently, after doing checkout and build 'git status' on the + source tree returns a lot of untracked files. Their presence + makes it harder to spot actual tree changes, so let's make + the noise disappear from 'git status' by adding proper .gitignore + files. +--- + .gitignore | 38 ++++++++++++++++++++++++++++++++++++++ + 1 file changed, 38 insertions(+) + create mode 100644 .gitignore + +diff --git a/.gitignore b/.gitignore +new file mode 100644 +index 0000000..db2baeb +--- /dev/null ++++ b/.gitignore +@@ -0,0 +1,38 @@ ++# Ignore hidden/backup/compilation files ++ ++.* ++*.o ++*~ ++ ++# However don't ignore this file ++ ++!/.gitignore ++ ++# Ignore the build programs ++ ++src/watchdog ++src/wd_identify ++src/wd_keepalive ++ ++# Ignore remaining files create/modified by the steps: ++# autoreconf -i ++# ./configure ++# make ++ ++Makefile ++Makefile.in ++aclocal.m4 ++autom4te.cache/ ++compile ++config.log ++config.status ++configure ++depcomp ++include/config.h ++include/config.h.in ++include/stamp-h1 ++install-sh ++missing ++src/Makefile ++src/Makefile.in ++ +-- +2.20.1 + diff --git a/0003-watchdog-5.13-rhsel.patch b/0003-watchdog-5.13-rhsel.patch deleted file mode 100644 index 49a7ecd..0000000 --- a/0003-watchdog-5.13-rhsel.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -ur watchdog-5.15.old/src/test_binary.c watchdog-5.15/src/test_binary.c ---- watchdog-5.15.old/src/test_binary.c 2016-02-26 12:05:00.000000000 +0000 -+++ watchdog-5.15/src/test_binary.c 2018-02-13 08:51:27.292750445 +0000 -@@ -263,11 +263,11 @@ - * to cause trouble, so make them go to their respective files */ - strcpy(filename_buf, logdir); - strcat(filename_buf, "/test-bin.stdout"); -- if (!freopen(filename_buf, "a+", stdout)) -+ if (!freopen(filename_buf, "a", stdout)) - exit(errno); - strcpy(filename_buf, logdir); - strcat(filename_buf, "/test-bin.stderr"); -- if (!freopen(filename_buf, "a+", stderr)) -+ if (!freopen(filename_buf, "a", stderr)) - exit(errno); - - /* now start binary */ -diff -ur watchdog-5.15.old/src/watchdog.c watchdog-5.15/src/watchdog.c ---- watchdog-5.15.old/src/watchdog.c 2016-02-26 12:05:00.000000000 +0000 -+++ watchdog-5.15/src/watchdog.c 2018-02-13 08:51:43.747738628 +0000 -@@ -86,11 +86,11 @@ - * So make stdout and stderr go to their respective files */ - strcpy(filename_buf, logdir); - strcat(filename_buf, "/repair-bin.stdout"); -- if (!freopen(filename_buf, "a+", stdout)) -+ if (!freopen(filename_buf, "a", stdout)) - exit(errno); - strcpy(filename_buf, logdir); - strcat(filename_buf, "/repair-bin.stderr"); -- if (!freopen(filename_buf, "a+", stderr)) -+ if (!freopen(filename_buf, "a", stderr)) - exit(errno); - - /* now start binary */ diff --git a/0004-Compile-with-musl-when-nfs-is-disabled.patch b/0004-Compile-with-musl-when-nfs-is-disabled.patch new file mode 100644 index 0000000..9162c3f --- /dev/null +++ b/0004-Compile-with-musl-when-nfs-is-disabled.patch @@ -0,0 +1,32 @@ +From f52c40680f0aad44b9ae16648803453ec00cbb2c Mon Sep 17 00:00:00 2001 +From: Paul Crawford +Date: Fri, 30 Dec 2016 15:55:45 +0000 +Subject: [PATCH 04/10] Compile with musl when nfs is disabled + +musl does by default not ship with rpc headers. The watchdog should +not require rpc headers when nfs support is disabled. + +Patch by Felix Janda +--- + include/sundries.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/sundries.h b/include/sundries.h +index 4379982..98c489a 100644 +--- a/include/sundries.h ++++ b/include/sundries.h +@@ -9,9 +9,11 @@ + #include + #include + #include ++#if HAVE_NFS + #if !defined(bool_t) && !defined(__GLIBC__) + #include + #endif ++#endif + + extern int mount_mount_quiet; + extern int mount_verbose; +-- +2.20.1 + diff --git a/0005-Rename-READ_ENUM-to-READ_YESNO.patch b/0005-Rename-READ_ENUM-to-READ_YESNO.patch new file mode 100644 index 0000000..8dc24e2 --- /dev/null +++ b/0005-Rename-READ_ENUM-to-READ_YESNO.patch @@ -0,0 +1,64 @@ +From 2878f90d6f50e7243038f4b1221654f18b2bd475 Mon Sep 17 00:00:00 2001 +From: Paul Crawford +Date: Fri, 30 Dec 2016 16:01:15 +0000 +Subject: [PATCH 05/10] Rename READ_ENUM to READ_YESNO + +- Previously we only has a single enumerated choice - the Boolean + yes/no option in the config file. + +- In preparation for having yes/no/auto we should make this more + obvious. +--- + src/configfile.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/configfile.c b/src/configfile.c +index 10bbc69..809e39a 100644 +--- a/src/configfile.c ++++ b/src/configfile.c +@@ -128,7 +128,7 @@ READ_LIST_END() + + #define READ_INT(name, iv) read_int_func( arg, val, name, 0, 0, iv) + #define READ_STRING(name, str) read_string_func( arg, val, name, Read_allow_blank, str) +-#define READ_ENUM(name, iv) read_enumerated_func(arg, val, name, Yes_No_list, iv) ++#define READ_YESNO(name, iv) read_enumerated_func(arg, val, name, Yes_No_list, iv) + #define READ_LIST(name, list) read_list_func( arg, val, name, 0, list) + + /* +@@ -195,7 +195,7 @@ void read_config(char *configfile) + } else if (READ_INT(PINGCOUNT, &pingcount) == 0) { + } else if (READ_LIST(PING, &target_list) == 0) { + } else if (READ_LIST(INTERFACE, &iface_list) == 0) { +- } else if (READ_ENUM(REALTIME, &realtime) == 0) { ++ } else if (READ_YESNO(REALTIME, &realtime) == 0) { + } else if (READ_INT(PRIORITY, &schedprio) == 0) { + } else if (READ_STRING(REPAIRBIN, &repair_bin) == 0) { + } else if (READ_INT(REPAIRTIMEOUT, &repair_timeout) == 0) { +@@ -208,7 +208,7 @@ void read_config(char *configfile) + } else if (READ_INT(LOGTICK, &logtick) == 0) { + ticker = logtick; + } else if (READ_STRING(DEVICE, &devname) == 0) { +- } else if (READ_ENUM(DEVICE_USE_SETTIMEOUT, &refresh_use_settimeout) == 0) { ++ } else if (READ_YESNO(DEVICE_USE_SETTIMEOUT, &refresh_use_settimeout) == 0) { + } else if (READ_INT(DEVICE_TIMEOUT, &dev_timeout) == 0) { + } else if (READ_LIST(TEMP, &temp_list) == 0) { + } else if (READ_INT(MAXTEMP, &maxtemp) == 0) { +@@ -219,12 +219,12 @@ void read_config(char *configfile) + } else if (READ_INT(ALLOCMEM, &minalloc) == 0) { + } else if (READ_STRING(LOGDIR, &logdir) == 0) { + } else if (READ_STRING(TESTDIR, &test_dir) == 0) { +- } else if (READ_ENUM(SOFTBOOT, &softboot) == 0) { +- } else if (READ_ENUM(TEMPPOWEROFF, &temp_poweroff) == 0) { ++ } else if (READ_YESNO(SOFTBOOT, &softboot) == 0) { ++ } else if (READ_YESNO(TEMPPOWEROFF, &temp_poweroff) == 0) { + } else if (READ_INT(SIGTERM_DELAY, &sigterm_delay) == 0) { + } else if (READ_INT(RETRYTIMEOUT, &retry_timeout) == 0) { + } else if (READ_INT(REPAIRMAX, &repair_max) == 0) { +- } else if (READ_ENUM(VERBOSE, &verbose) == 0) { ++ } else if (READ_YESNO(VERBOSE, &verbose) == 0) { + } else { + log_message(LOG_WARNING, "Ignoring invalid option at line %d of config file: %s=%s", linecount, arg, val); + } +-- +2.20.1 + diff --git a/0006-Make-IT87-fix-up-automatic-by-default.patch b/0006-Make-IT87-fix-up-automatic-by-default.patch new file mode 100644 index 0000000..6821c02 --- /dev/null +++ b/0006-Make-IT87-fix-up-automatic-by-default.patch @@ -0,0 +1,183 @@ +From 25fa3156526d2e4e1a9bc84a160bf7850107bf27 Mon Sep 17 00:00:00 2001 +From: Paul Crawford +Date: Fri, 30 Dec 2016 16:39:16 +0000 +Subject: [PATCH 06/10] Make IT87 fix-up automatic by default + +- Update 00cf0b0 from Maciej S. Szmigiero proposed making the IT87 + style of fix something that is set only by the configuration file, + however, for many users with the buggy IT87 driver this will cause + problems. + +- This change make the choice a 3 state one: + + NO = never use ioctl-based refresh (old way, and in keeping + with the kernel API guidelines for watchdog use). + + YES = always use the ioctl-based refresh (i.e set timer every + time, instead of writing to /dev/watchdog). Might be + useful if another driver module is found to share same + sort of bug as the IT87 module. + + AUTO = check for IT87 and use ioctl-based method if found. This + is the same basec behaviour as before update 00cf0b0 but + the choice for yes/no now supported. +--- + include/extern.h | 4 ++++ + src/configfile.c | 12 ++++++++++-- + src/keep_alive.c | 43 ++++++++++++++++++++++++++++++++----------- + watchdog.conf.5 | 8 ++++---- + 4 files changed, 50 insertions(+), 17 deletions(-) + +diff --git a/include/extern.h b/include/extern.h +index cbf97fd..6d4ba5e 100644 +--- a/include/extern.h ++++ b/include/extern.h +@@ -59,6 +59,10 @@ struct list { + #define FALSE 0 + #endif + ++#define ENUM_NO 0 ++#define ENUM_YES 1 ++#define ENUM_AUTO 2 ++ + #define TS_SIZE 12 + + /* === External variables === */ +diff --git a/src/configfile.c b/src/configfile.c +index 809e39a..29e3464 100644 +--- a/src/configfile.c ++++ b/src/configfile.c +@@ -96,7 +96,7 @@ char *logdir = "/var/log/watchdog"; + char *heartbeat = NULL; + int hbstamps = 300; + +-int refresh_use_settimeout = FALSE; ++int refresh_use_settimeout = ENUM_AUTO; + int realtime = FALSE; + + /* Self-repairing binaries list */ +@@ -120,6 +120,13 @@ READ_LIST_ADD("yes", 1) + READ_LIST_END() + }; + ++static const read_list_t YN_Auto_list[] = { ++READ_LIST_ADD("no", ENUM_NO) ++READ_LIST_ADD("yes", ENUM_YES) ++READ_LIST_ADD("auto", ENUM_AUTO) ++READ_LIST_END() ++}; ++ + /* Use the macros below to simplify the parsing function. For now we don't use the + * integer range checking (0=0 so not checked), and assume all strings can be blank and + * enumerated choices are Yes/No, but in future we could add such settings to the #define'd +@@ -129,6 +136,7 @@ READ_LIST_END() + #define READ_INT(name, iv) read_int_func( arg, val, name, 0, 0, iv) + #define READ_STRING(name, str) read_string_func( arg, val, name, Read_allow_blank, str) + #define READ_YESNO(name, iv) read_enumerated_func(arg, val, name, Yes_No_list, iv) ++#define READ_YN_AUTO(name, iv) read_enumerated_func(arg, val, name, YN_Auto_list, iv) + #define READ_LIST(name, list) read_list_func( arg, val, name, 0, list) + + /* +@@ -208,7 +216,7 @@ void read_config(char *configfile) + } else if (READ_INT(LOGTICK, &logtick) == 0) { + ticker = logtick; + } else if (READ_STRING(DEVICE, &devname) == 0) { +- } else if (READ_YESNO(DEVICE_USE_SETTIMEOUT, &refresh_use_settimeout) == 0) { ++ } else if (READ_YN_AUTO(DEVICE_USE_SETTIMEOUT, &refresh_use_settimeout) == 0) { + } else if (READ_INT(DEVICE_TIMEOUT, &dev_timeout) == 0) { + } else if (READ_LIST(TEMP, &temp_list) == 0) { + } else if (READ_INT(MAXTEMP, &maxtemp) == 0) { +diff --git a/src/keep_alive.c b/src/keep_alive.c +index a57b0b5..6e721d9 100644 +--- a/src/keep_alive.c ++++ b/src/keep_alive.c +@@ -29,6 +29,7 @@ + + static int watchdog_fd = -1; + static int timeout_used = TIMER_MARGIN; ++static int Refresh_using_ioctl = FALSE; + + /* + * Open the watchdog timer (if name non-NULL) and set the time-out value (if non-zero). +@@ -67,19 +68,39 @@ int open_watchdog(char *name, int timeout) + /* The IT8728 on Gigabyte motherboard (and similar) would trip due to the normal + * refresh in the device driver failing to reset the timer for no obvious reason + * (though the normal operation used the Consumer IR sender to refresh via an +- * interrupt - also a non-obvious method!) so let's warn users of these +- * watchdogs and direct them to a workaround option. ++ * interrupt - also a non-obvious method!) so this work-around simply sets the ++ * time-out every refresh operation. + * +- * See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/932381 and +- * https://bugzilla.kernel.org/show_bug.cgi?id=42801 ++ * See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/932381 ++ * Also https://bugzilla.kernel.org/show_bug.cgi?id=42801 + * + */ +- if (!refresh_use_settimeout && strcmp("IT87 WDT", (char *)ident.identity) == 0) { +- log_message(LOG_INFO, +- "IT87 watchdog detected, if watchdog trips by itself when the first timeout interval elapses " +- "try updating to the latest kernel"); +- log_message(LOG_INFO, "if this does not help please report a kernel bug (not this package bug!) " +- "and try using watchdog-refresh-use-settimeout=yes config option as a workaround"); ++ ++ Refresh_using_ioctl = FALSE; ++ ++ switch (refresh_use_settimeout) { ++ case ENUM_NO: ++ /* Set to "no" so never use ioctl mode. */ ++ break; ++ ++ case ENUM_YES: ++ /* Set to "yes" so always use ioctl mode. */ ++ Refresh_using_ioctl = TRUE; ++ log_message(LOG_INFO, "Running ioctl-based refresh"); ++ break; ++ ++ case ENUM_AUTO: ++ /* Set to "auto" to decide based on driver identity. */ ++ Refresh_using_ioctl = FALSE; ++ if (strcmp("IT87 WDT", (char *)ident.identity) == 0) { ++ Refresh_using_ioctl = TRUE; ++ log_message(LOG_INFO, "Running IT87 module fix-up"); ++ } ++ break; ++ ++ default: ++ log_message(LOG_ERR, "Unknown ioctl selection mode (%d)", refresh_use_settimeout); ++ break; + } + + return rv; +@@ -165,7 +186,7 @@ int keep_alive(void) + if (watchdog_fd == -1) + return (ENOERR); + +- if (refresh_use_settimeout) { ++ if (Refresh_using_ioctl) { + int timeout = timeout_used; + if (ioctl(watchdog_fd, WDIOC_SETTIMEOUT, &timeout) < 0) { + err = errno; +diff --git a/watchdog.conf.5 b/watchdog.conf.5 +index 4e5155a..709c36e 100644 +--- a/watchdog.conf.5 ++++ b/watchdog.conf.5 +@@ -64,11 +64,11 @@ Set the watchdog device name, typically /dev/watchdog. Default is to disable + keep alive support. This should be tested by running the daemon from the + command line before configuring it to start automatically on booting. + .TP +-watchdog-refresh-use-settimeout = ++watchdog-refresh-use-settimeout = + Refresh watchdog timer by setting its timeout instead of using a normal watchdog +-refresh operation. +-Might help if your watchdog trips by itself when the first timeout interval +-elapses. ++refresh operation. Might help if your watchdog trips by itself when the first ++timeout interval elapses. Default is 'auto' for IT87 fix-up but this can be ++disabled with 'no' or forced for other modules with 'yes'. + .TP + watchdog-timeout = + Set the watchdog device timeout during startup. If not set, a default is used +-- +2.20.1 + diff --git a/0007-Synced-Debian-files-with-5.15-2.patch b/0007-Synced-Debian-files-with-5.15-2.patch new file mode 100644 index 0000000..032f626 --- /dev/null +++ b/0007-Synced-Debian-files-with-5.15-2.patch @@ -0,0 +1,116 @@ +From 62face90fe89ea1dc88b6b093f4921e47461f48d Mon Sep 17 00:00:00 2001 +From: Michael Meskes +Date: Fri, 20 Jan 2017 14:02:17 +0100 +Subject: [PATCH 07/10] Synced Debian files with 5.15-2 + +--- + debian/changelog | 9 +++++++++ + debian/control | 2 +- + debian/po/nl.po | 3 --- + debian/po/ru.po | 8 ++------ + debian/rules | 9 +++++---- + 5 files changed, 17 insertions(+), 14 deletions(-) + +diff --git a/debian/changelog b/debian/changelog +index fd436d8..1559626 100644 +--- a/debian/changelog ++++ b/debian/changelog +@@ -1,3 +1,12 @@ ++watchdog (5.15-2) unstable; urgency=medium ++ ++ * Fix FTCBFS: Let dh_auto_configure pass --host to ./configure ++ (Closes: #851231) Thanks to Helmut Grohne ++ * Bumped Standards-Version to 3.9.8, no changes needed. ++ * Enabled bindnow linker flag. ++ ++ -- Michael Meskes Fri, 20 Jan 2017 13:31:26 +0100 ++ + watchdog (5.15-1) unstable; urgency=medium + + * New upstream version. +diff --git a/debian/control b/debian/control +index a9f8a68..625f820 100644 +--- a/debian/control ++++ b/debian/control +@@ -3,7 +3,7 @@ Section: admin + Priority: extra + Maintainer: Michael Meskes + Build-Depends: debhelper (>= 9), po-debconf (>= 0.5.0), dh-systemd (>= 1.5) +-Standards-Version: 3.9.6 ++Standards-Version: 3.9.8 + Homepage: http://watchdog.sourceforge.net + + Package: watchdog +diff --git a/debian/po/nl.po b/debian/po/nl.po +index 9f9d657..73d1d28 100644 +--- a/debian/po/nl.po ++++ b/debian/po/nl.po +@@ -45,9 +45,6 @@ msgstr "Na het stoppen van watchdog wd_keepalive starten?" + #. Type: boolean + #. Description + #: ../templates:3001 +-#| msgid "" +-#| "Please specify whether watchdog should be started as part of the boot " +-#| "process. This can be changed later by editing /etc/default/watchdog." + msgid "" + "Please specify whether stopping watchdog should start wd_keepalive to keep " + "on triggering the watchdog device. This can be changed later by editing /etc/" +diff --git a/debian/po/ru.po b/debian/po/ru.po +index 6b2208c..211e4d8 100644 +--- a/debian/po/ru.po ++++ b/debian/po/ru.po +@@ -44,17 +44,14 @@ msgstr "Запускать wd_keepalive после остановки watchdog?" + #. Type: boolean + #. Description + #: ../templates:3001 +-#| msgid "" +-#| "Please specify whether watchdog should be started as part of the boot " +-#| "process. This can be changed later by editing /etc/default/watchdog." + msgid "" + "Please specify whether stopping watchdog should start wd_keepalive to keep " + "on triggering the watchdog device. This can be changed later by editing /etc/" + "default/watchdog." + msgstr "" + "Укажите, нужно ли при остановке watchdog запускать wd_keepalive, чтобы " +-"оставить рабочим устройство watchdog. Это можно " +-"изменить позже отредактировав файл /etc/default/watchdog." ++"оставить рабочим устройство watchdog. Это можно изменить позже " ++"отредактировав файл /etc/default/watchdog." + + #. Type: boolean + #. Description +@@ -91,4 +88,3 @@ msgstr "" + "Укажите модули, которые нужно загрузить перед запуском watchdog. Модуль " + "'softdog' обычно подходит для всех случаев. Введите 'none', если не хотите, " + "чтобы сценарий загружал модуль." +- +diff --git a/debian/rules b/debian/rules +index 2ca0797..0ece076 100755 +--- a/debian/rules ++++ b/debian/rules +@@ -1,9 +1,10 @@ + #!/usr/bin/make -f + + SHELL = /bin/bash +-CFLAGS = $(shell dpkg-buildflags --get CFLAGS) +-CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) +-LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) ++export DEB_BUILD_MAINT_OPTIONS=hardening=+all ++CFLAGS = `dpkg-buildflags --get CFLAGS` ++CPPFLAGS = `dpkg-buildflags --get CPPFLAGS` ++LDFLAGS = `dpkg-buildflags --get LDFLAGS` + + build: build-arch build-indep + build-arch: build-stamp +@@ -14,7 +15,7 @@ build-stamp: Makefile + touch build + + Makefile: +- CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" ./configure --prefix=/usr \ ++ CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" dh_auto_configure -- \ + --with-configfile=/etc/watchdog.conf + + clean: Makefile +-- +2.20.1 + diff --git a/0008-Fix-automated-CentOS-7-build.patch b/0008-Fix-automated-CentOS-7-build.patch new file mode 100644 index 0000000..ed74a84 --- /dev/null +++ b/0008-Fix-automated-CentOS-7-build.patch @@ -0,0 +1,58 @@ +From d7f483a0bc6214258098894daabc2ce590ca41fc Mon Sep 17 00:00:00 2001 +From: Paul Crawford +Date: Mon, 31 Jul 2017 16:18:53 +0100 +Subject: [PATCH 08/10] Fix automated CentOS 7 build + +- Apply changes from Marcus Furlong to fix automated CentOS 7 build + +- Update URLs to https and fix download address from sourceforge +--- + redhat/watchdog.spec | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/redhat/watchdog.spec b/redhat/watchdog.spec +index a13730a..85a0164 100644 +--- a/redhat/watchdog.spec ++++ b/redhat/watchdog.spec +@@ -5,8 +5,8 @@ Release: 2%{?dist} + License: GPL+ + Group: System Environment/Daemons + +-URL: http://sourceforge.net/projects/watchdog/ +-Source0: http://dl.sf.net/watchdog/watchdog-%{version}.tar.gz ++URL: https://sourceforge.net/projects/watchdog/ ++Source0: https://downloads.sourceforge.net/project/watchdog/watchdog/%{version}/watchdog-%{version}.tar.gz + Source1: watchdog.init + Source2: README.watchdog.ipmi + Source3: README.Fedora +@@ -61,8 +61,6 @@ make %{?_smp_mflags} + rm -Rf ${RPM_BUILD_ROOT} + install -d -m0755 ${RPM_BUILD_ROOT}%{_sysconfdir} + make DESTDIR=${RPM_BUILD_ROOT} install +-install -Dp -m0644 %{name}.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/watchdog +-install -Dp -m0755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_initrddir}/watchdog + + %clean + rm -Rf ${RPM_BUILD_ROOT} +@@ -91,7 +89,6 @@ fi + %defattr(-, root, root, -) + %doc AUTHORS ChangeLog COPYING examples/ IAFA-PACKAGE NEWS README TODO README.watchdog.ipmi README.Fedora + %config(noreplace) %{_sysconfdir}/watchdog.conf +-%config(noreplace) %{_sysconfdir}/sysconfig/watchdog + %{_sysconfdir}/rc.d/init.d/watchdog + %{_sbindir}/watchdog + %{_sbindir}/wd_keepalive +@@ -101,6 +98,10 @@ fi + + + %changelog ++* Tue Dec 13 2016 Paul Crawford - 5.15 ++- Apply changes from Marcus Furlong to fix automated CentOS 7 build ++- Update URLs to https and fix download address from sourceforge ++ + * Thu Mar 5 2009 Richard W.M. Jones - 5.5-2 + - Use '-' in defattr line instead of explicit file mode. + +-- +2.20.1 + diff --git a/0009-Bugfix-against-watchdog-configuration-file-corruptio.patch b/0009-Bugfix-against-watchdog-configuration-file-corruptio.patch new file mode 100644 index 0000000..49b46e2 --- /dev/null +++ b/0009-Bugfix-against-watchdog-configuration-file-corruptio.patch @@ -0,0 +1,101 @@ +From 7310afccc11070fd4207a41881401d619dd113b1 Mon Sep 17 00:00:00 2001 +From: Paul Crawford +Date: Mon, 31 Jul 2017 16:36:10 +0100 +Subject: [PATCH 09/10] Bugfix against watchdog configuration file corruption + +- Apply the bugfix/patch against watchdog configuration file + corruption during runtime by Greg Vishnepolsky greg@armis.com + +- Modify from Greg's patch to include the permission mode and to + declare the new fd variables immediately after the opening brace. + +- Greg provided the follow description: + +The following patch fixes a bug where writes/prints (out of a test +binary) that are intended for stdout/stderr may instead be written +to other files (like the watchdog configuration files). + +The bug lies in the call to "freopen" on "stdout" when the actual +FD (1) for stdout had been previously closed by the daemon. Instead +this FD could have been re-used (for instance, for opening watchdog +configuration files). Thus any prints out of the daemon/test binaries +will be erroneously written into it. +--- + src/test_binary.c | 13 +++++++++++-- + src/watchdog.c | 13 +++++++++++-- + 2 files changed, 22 insertions(+), 4 deletions(-) + +diff --git a/src/test_binary.c b/src/test_binary.c +index 2211f9e..a58c107 100644 +--- a/src/test_binary.c ++++ b/src/test_binary.c +@@ -3,6 +3,7 @@ + #endif + + #include ++#include + #include + #include + #include +@@ -258,16 +259,24 @@ int check_bin(char *tbinary, int timeout, int version) + + child_pid = fork(); + if (!child_pid) { ++ int test_stdout_fd, test_stderr_fd; + + /* Don't want the stdout and stderr of our test program + * to cause trouble, so make them go to their respective files */ + strcpy(filename_buf, logdir); + strcat(filename_buf, "/test-bin.stdout"); +- if (!freopen(filename_buf, "a+", stdout)) ++ test_stdout_fd = open(filename_buf, O_WRONLY|O_CREAT|O_APPEND, S_IWUSR|S_IRUSR|S_IRGRP); ++ if (test_stdout_fd == -1) + exit(errno); ++ if (dup2(test_stdout_fd, fileno(stdout)) == -1) ++ exit(errno); ++ + strcpy(filename_buf, logdir); + strcat(filename_buf, "/test-bin.stderr"); +- if (!freopen(filename_buf, "a+", stderr)) ++ test_stderr_fd = open(filename_buf, O_WRONLY|O_CREAT|O_APPEND, S_IWUSR|S_IRUSR|S_IRGRP); ++ if (test_stderr_fd == -1) ++ exit(errno); ++ if (dup2(test_stderr_fd, fileno(stderr)) == -1) + exit(errno); + + /* now start binary */ +diff --git a/src/watchdog.c b/src/watchdog.c +index 486384a..a69dba4 100644 +--- a/src/watchdog.c ++++ b/src/watchdog.c +@@ -84,16 +84,25 @@ static int repair(char *rbinary, int result, char *name, int version) + + child_pid = fork(); + if (!child_pid) { ++ int repair_stdout_fd, repair_stderr_fd; ++ + /* Don't want the stdin and stdout of our repair program + * to cause trouble. + * So make stdout and stderr go to their respective files */ + strcpy(filename_buf, logdir); + strcat(filename_buf, "/repair-bin.stdout"); +- if (!freopen(filename_buf, "a+", stdout)) ++ repair_stdout_fd = open(filename_buf, O_WRONLY|O_CREAT|O_APPEND, S_IWUSR|S_IRUSR|S_IRGRP); ++ if (repair_stdout_fd == -1) + exit(errno); ++ if (dup2(repair_stdout_fd, fileno(stdout)) == -1) ++ exit(errno); ++ + strcpy(filename_buf, logdir); + strcat(filename_buf, "/repair-bin.stderr"); +- if (!freopen(filename_buf, "a+", stderr)) ++ repair_stderr_fd = open(filename_buf, O_WRONLY|O_CREAT|O_APPEND, S_IWUSR|S_IRUSR|S_IRGRP); ++ if (repair_stderr_fd == -1) ++ exit(errno); ++ if (dup2(repair_stderr_fd, fileno(stderr)) == -1) + exit(errno); + + /* now start binary */ +-- +2.20.1 + diff --git a/0010-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch b/0010-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch new file mode 100644 index 0000000..8a3a8b8 --- /dev/null +++ b/0010-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch @@ -0,0 +1,57 @@ +From 93f5334052cf14ae1149aa0f0b3178137eec01dd Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 6 Feb 2019 13:25:47 +0000 +Subject: [PATCH 10/10] Choose libtirpc or another RPC library for XDR headers + and library. + +Signed-off-by: Richard W.M. Jones +--- + configure.ac | 20 ++++++++++++++++++++ + src/Makefile.am | 2 ++ + 2 files changed, 22 insertions(+) + +diff --git a/configure.ac b/configure.ac +index f100829..4220411 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -156,4 +156,24 @@ AC_ARG_WITH(randomseed, + AC_MSG_RESULT("/var/run/random-seed") + ]) + ++# Check for an RPC library, starting with libtirpc. ++PKG_CHECK_MODULES([RPC], [libtirpc], [], [ ++ # If we don't have libtirpc, then we must have and ++ # some library to link to in libdir. ++ RPC_CFLAGS="" ++ AC_CHECK_HEADER([rpc/rpc.h],[],[ ++ AC_MSG_ERROR([XDR header files are required]) ++ ], ++ [#include ]) ++ ++ old_LIBS="$LIBS" ++ LIBS="" ++ AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl]) ++ RPC_LIBS="$LIBS" ++ LIBS="$old_LIBS" ++ ++ AC_SUBST([RPC_CFLAGS]) ++ AC_SUBST([RPC_LIBS]) ++]) ++ + AC_OUTPUT([Makefile src/Makefile]) +diff --git a/src/Makefile.am b/src/Makefile.am +index 4ecfd97..7f63be5 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -6,6 +6,8 @@ watchdog_SOURCES = file_stat.c file_table.c fstab.c iface.c ifdown.c keep_alive. + temp.c test_binary.c umount.c version.c watchdog.c \ + logmessage.c xmalloc.c heartbeat.c lock_mem.c daemon-pid.c configfile.c \ + errorcodes.c read-conf.c sigterm.c ++watchdog_CFLAGS = $(RPC_CFLAGS) ++watchdog_LDADD = $(RPC_LIBS) + + wd_keepalive_SOURCES = wd_keepalive.c logmessage.c lock_mem.c daemon-pid.c xmalloc.c \ + configfile.c keep_alive.c read-conf.c sigterm.c +-- +2.20.1 + diff --git a/watchdog.spec b/watchdog.spec index 4a5c8ec..228b34e 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -12,8 +12,21 @@ Source3: README.Fedora Source4: watchdog.service Source5: watchdog-ping.service -Patch3: 0003-watchdog-5.13-rhsel.patch -Patch4: 0004-watchdog-5.13-rhseldoc.patch +# Upstream patches since 5.15. +Patch1: 0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch +Patch2: 0002-Generalize-and-make-watchdog-refresh-settimeout-work.patch +Patch3: 0003-Ignore-build-products-in-GIT.patch +Patch4: 0004-Compile-with-musl-when-nfs-is-disabled.patch +Patch5: 0005-Rename-READ_ENUM-to-READ_YESNO.patch +Patch6: 0006-Make-IT87-fix-up-automatic-by-default.patch +Patch7: 0007-Synced-Debian-files-with-5.15-2.patch +Patch8: 0008-Fix-automated-CentOS-7-build.patch +Patch9: 0009-Bugfix-against-watchdog-configuration-file-corruptio.patch +# Fixes building on glibc without RPC. Sent upstream 2019-02-06. +Patch10: 0010-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch + +# Non-upstream patch to document SELinux support. +Patch99: 0004-watchdog-5.13-rhseldoc.patch BuildRequires: gcc BuildRequires: libtirpc-devel @@ -43,8 +56,17 @@ expiration) initiated by the BMC. %prep %setup -q -n %{name}-%{version} -%patch3 -p1 -b .rhsel -%patch4 -p1 -b .rhseldoc +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch99 -p1 -b .rhseldoc cp %{SOURCE2} . cp %{SOURCE3} . @@ -119,6 +141,11 @@ install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts %changelog +* Wed Feb 06 2019 Richard W.M. Jones - 5.15-5 +- Add all upstream patches since 5.15. +- Fix RPC/libtirpc (again?). +- Remove .rhsel patch. Equivalent added upstream in 7310afccc1. + * Sun Feb 03 2019 Fedora Release Engineering - 5.15-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 08331a63103507fbebbce30c4bfe30fb65f3f524 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 6 Feb 2019 13:48:46 +0000 Subject: [PATCH 04/23] Run autoreconf after applying patches. --- watchdog.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/watchdog.spec b/watchdog.spec index 228b34e..9031c30 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -31,6 +31,8 @@ Patch99: 0004-watchdog-5.13-rhseldoc.patch BuildRequires: gcc BuildRequires: libtirpc-devel BuildRequires: systemd-units +# Required because patches touch configure.ac and Makefile.am: +BuildRequires: autoconf, automake Requires(post): systemd Requires(preun): systemd @@ -67,6 +69,7 @@ expiration) initiated by the BMC. %patch9 -p1 %patch10 -p1 %patch99 -p1 -b .rhseldoc +autoreconf -i cp %{SOURCE2} . cp %{SOURCE3} . From 91c763e15dd3b657b727034d3c8e41b2ca791387 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jul 2019 03:17:52 +0000 Subject: [PATCH 05/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- watchdog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index 9031c30..ec2d74f 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.15 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/watchdog/ @@ -144,6 +144,9 @@ install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts %changelog +* Sat Jul 27 2019 Fedora Release Engineering - 5.15-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Wed Feb 06 2019 Richard W.M. Jones - 5.15-5 - Add all upstream patches since 5.15. - Fix RPC/libtirpc (again?). From adaf5ab865a97ea295df7385a26e9e8b767eef4f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 31 Jan 2020 03:29:54 +0000 Subject: [PATCH 06/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- watchdog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index ec2d74f..faa5bae 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.15 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/watchdog/ @@ -144,6 +144,9 @@ install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts %changelog +* Fri Jan 31 2020 Fedora Release Engineering - 5.15-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Sat Jul 27 2019 Fedora Release Engineering - 5.15-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From b7ef892b138524e84bfa29e6be61e81eaad88c1d Mon Sep 17 00:00:00 2001 From: Vaclav Dolezal Date: Thu, 30 Jan 2020 15:38:36 +0100 Subject: [PATCH 07/23] Clean up old SysV-init related files --- watchdog.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/watchdog.spec b/watchdog.spec index faa5bae..40497be 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,12 +1,11 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.15 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/watchdog/ Source0: http://downloads.sourceforge.net/watchdog/watchdog-%{version}.tar.gz -Source1: watchdog.init Source2: README.watchdog.ipmi Source3: README.Fedora Source4: watchdog.service @@ -45,7 +44,7 @@ or may be alternately used with a hardware watchdog device such as the IPMI hardware watchdog driver interface to a resident Baseboard Management Controller (BMC). watchdog periodically writes to /dev/watchdog; the interval between writes to /dev/watchdog is configurable through settings -in the watchdog sysconfig file. This configuration file is also used to +in the watchdog config file. This configuration file is also used to set the watchdog to be used as a hardware watchdog instead of its default software watchdog operation. In either case, if the device is open but not written to within the configured time period, the watchdog timer expiration @@ -92,10 +91,10 @@ make %{?_smp_mflags} install -d -m0755 ${RPM_BUILD_ROOT}%{_sysconfdir} install -d -m0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/watchdog.d make DESTDIR=${RPM_BUILD_ROOT} install -install -Dp -m0644 %{name}.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/watchdog install -Dp -m0644 %{SOURCE4} ${RPM_BUILD_ROOT}%{_unitdir}/watchdog.service install -Dp -m0644 %{SOURCE5} ${RPM_BUILD_ROOT}%{_unitdir}/watchdog-ping.service install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts +rm %{name}.sysconfig %post @@ -129,7 +128,6 @@ install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts %doc README.Fedora %endif %config(noreplace) %{_sysconfdir}/watchdog.conf -%config(noreplace) %{_sysconfdir}/sysconfig/watchdog %{_sysconfdir}/watchdog.d %{_sbindir}/watchdog %{_sbindir}/wd_identify @@ -144,6 +142,9 @@ install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts %changelog +* Mon Feb 03 2020 Václav Doležal - 5.15-7 +- Clean up old SysV-init related files + * Fri Jan 31 2020 Fedora Release Engineering - 5.15-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 86347a9b61b87a398333d219c564254c0ab7bbe6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 13:58:41 +0000 Subject: [PATCH 08/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- watchdog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index 40497be..0e27d87 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.15 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/watchdog/ @@ -142,6 +142,9 @@ rm %{name}.sysconfig %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 5.15-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Mon Feb 03 2020 Václav Doležal - 5.15-7 - Clean up old SysV-init related files From 824d2943a09d7c045a132a0bae0784b9e14f1021 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Jan 2021 00:49:45 +0000 Subject: [PATCH 09/23] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- watchdog.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/watchdog.spec b/watchdog.spec index 0e27d87..f0331cb 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -27,6 +27,7 @@ Patch10: 0010-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch # Non-upstream patch to document SELinux support. Patch99: 0004-watchdog-5.13-rhseldoc.patch +BuildRequires: make BuildRequires: gcc BuildRequires: libtirpc-devel BuildRequires: systemd-units From 5943f1dad63bed603089791f708772f2a034339a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 23:19:59 +0000 Subject: [PATCH 10/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- watchdog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index f0331cb..9ae409f 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.15 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/watchdog/ @@ -143,6 +143,9 @@ rm %{name}.sysconfig %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 5.15-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 5.15-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From d42c8c992eeb543ebbfc10bca3da927df3b9347c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Mar 2021 16:12:02 +0100 Subject: [PATCH 11/23] Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. --- watchdog.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index 9ae409f..28322ec 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.15 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/watchdog/ @@ -143,6 +143,10 @@ rm %{name}.sysconfig %changelog +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 5.15-10 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + * Wed Jan 27 2021 Fedora Release Engineering - 5.15-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From e50e0e82e974b71910196fb4373dc4df08b288fc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 20:46:05 +0000 Subject: [PATCH 12/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- watchdog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index 28322ec..0193aba 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.15 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/watchdog/ @@ -143,6 +143,9 @@ rm %{name}.sysconfig %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 5.15-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 5.15-10 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. From d7d8b27d08ffe2a3d0ab986ad34f90a10977dcbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=98=C3=ADdk=C3=BD?= Date: Tue, 10 Aug 2021 13:25:40 +0200 Subject: [PATCH 13/23] New upstream release --- ...or-another-RPC-library-for-XDR-heade.patch | 43 ++++ ...param.h-for-EXEC_PAGESIZE-definition.patch | 28 --- ...ake-watchdog-refresh-settimeout-work.patch | 153 --------------- 0003-Ignore-build-products-in-GIT.patch | 66 ------- ...mpile-with-musl-when-nfs-is-disabled.patch | 32 --- 0005-Rename-READ_ENUM-to-READ_YESNO.patch | 64 ------ ...ake-IT87-fix-up-automatic-by-default.patch | 183 ------------------ 0007-Synced-Debian-files-with-5.15-2.patch | 116 ----------- 0008-Fix-automated-CentOS-7-build.patch | 58 ------ ...atchdog-configuration-file-corruptio.patch | 101 ---------- ...or-another-RPC-library-for-XDR-heade.patch | 57 ------ ...patch => 0099-watchdog-5.16-rhseldoc.patch | 70 ++++--- sources | 2 +- watchdog.spec | 30 +-- 14 files changed, 89 insertions(+), 914 deletions(-) create mode 100644 0001-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch delete mode 100644 0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch delete mode 100644 0002-Generalize-and-make-watchdog-refresh-settimeout-work.patch delete mode 100644 0003-Ignore-build-products-in-GIT.patch delete mode 100644 0004-Compile-with-musl-when-nfs-is-disabled.patch delete mode 100644 0005-Rename-READ_ENUM-to-READ_YESNO.patch delete mode 100644 0006-Make-IT87-fix-up-automatic-by-default.patch delete mode 100644 0007-Synced-Debian-files-with-5.15-2.patch delete mode 100644 0008-Fix-automated-CentOS-7-build.patch delete mode 100644 0009-Bugfix-against-watchdog-configuration-file-corruptio.patch delete mode 100644 0010-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch rename 0004-watchdog-5.13-rhseldoc.patch => 0099-watchdog-5.16-rhseldoc.patch (73%) diff --git a/0001-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch b/0001-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch new file mode 100644 index 0000000..9ac8501 --- /dev/null +++ b/0001-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch @@ -0,0 +1,43 @@ +From 80468a84ea3044a5227c57a258dc6e508c88d468 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 6 Feb 2019 13:25:47 +0000 +Subject: [PATCH] Choose libtirpc or another RPC library for XDR headers and + library. + +Signed-off-by: Richard W.M. Jones +--- + configure.ac | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 4294146..be62260 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -158,4 +158,24 @@ AC_ARG_WITH(randomseed, + AC_MSG_RESULT("/var/run/random-seed") + ]) + ++# Check for an RPC library, starting with libtirpc. ++PKG_CHECK_MODULES([RPC], [libtirpc], [], [ ++ # If we don't have libtirpc, then we must have and ++ # some library to link to in libdir. ++ RPC_CFLAGS="" ++ AC_CHECK_HEADER([rpc/rpc.h],[],[ ++ AC_MSG_ERROR([XDR header files are required]) ++ ], ++ [#include ]) ++ ++ old_LIBS="$LIBS" ++ LIBS="" ++ AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl]) ++ RPC_LIBS="$LIBS" ++ LIBS="$old_LIBS" ++ ++ AC_SUBST([RPC_CFLAGS]) ++ AC_SUBST([RPC_LIBS]) ++]) ++ + AC_OUTPUT([Makefile src/Makefile]) +-- +2.31.1 + diff --git a/0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch b/0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch deleted file mode 100644 index 35eadf1..0000000 --- a/0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c5cb4e1a0339844ae3f55ff1dc4a716c28012f05 Mon Sep 17 00:00:00 2001 -From: Paul Crawford -Date: Tue, 28 Jun 2016 18:08:48 +0100 -Subject: [PATCH 01/10] Include linux/param.h for EXEC_PAGESIZE definition - -Musl does not include linux/param.h whereas glibc does, so it fails -to build on musl. Patch supplied by Khem Raj ---- - src/watchdog.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/watchdog.c b/src/watchdog.c -index acf6450..486384a 100644 ---- a/src/watchdog.c -+++ b/src/watchdog.c -@@ -26,6 +26,9 @@ - #include /* For EXEC_PAGESIZE */ - #include - #include -+#ifdef __linux__ -+#include -+#endif - #include - - #include --- -2.20.1 - diff --git a/0002-Generalize-and-make-watchdog-refresh-settimeout-work.patch b/0002-Generalize-and-make-watchdog-refresh-settimeout-work.patch deleted file mode 100644 index f31af9a..0000000 --- a/0002-Generalize-and-make-watchdog-refresh-settimeout-work.patch +++ /dev/null @@ -1,153 +0,0 @@ -From 00cf0b0afc7cac797713276435322aeacd6020cb Mon Sep 17 00:00:00 2001 -From: "Maciej S. Szmigiero" -Date: Fri, 16 Dec 2016 23:18:00 +0100 -Subject: [PATCH 02/10] Generalize and make watchdog refresh "settimeout" - workaround configurable - -Commit 0d156df287656 introduced a workaround for a bug in the kernel -it87_wdt driver, where on some boards the watchdog timer wasn't refreshed -correctly. The workaround was to set its timeout again every refresh. - -However, this workaround was introduced unconditionally for every user of -the it87_wdt driver. -Currently, this kernel bug is supposed to be fixed ( by kernel commit -0bcd0b6a47431 ) so let's revert to old behavior by default so we by -coincidence don't mask future bugs and also comply with the kernel watchdog -API. - -Let's also print an informational message for an user how to re-enable the -workaround in case this driver bug wasn't fixed completely or the user -has an older kernel version without the fix. - -This change also makes this workaround available generically in case -a similar problem occurs in future in some other driver. ---- - include/extern.h | 1 + - src/configfile.c | 3 +++ - src/keep_alive.c | 20 +++++++++++--------- - watchdog.conf | 3 +++ - watchdog.conf.5 | 6 ++++++ - 5 files changed, 24 insertions(+), 9 deletions(-) - -diff --git a/include/extern.h b/include/extern.h -index f00e4cf..cbf97fd 100644 ---- a/include/extern.h -+++ b/include/extern.h -@@ -91,6 +91,7 @@ extern char *logdir; - extern char *heartbeat; - extern int hbstamps; - -+extern int refresh_use_settimeout; - extern int realtime; - - extern struct list *tr_bin_list; -diff --git a/src/configfile.c b/src/configfile.c -index a0996e2..10bbc69 100644 ---- a/src/configfile.c -+++ b/src/configfile.c -@@ -28,6 +28,7 @@ static void add_test_binaries(const char *path); - #define ADMIN "admin" - #define CHANGE "change" - #define DEVICE "watchdog-device" -+#define DEVICE_USE_SETTIMEOUT "watchdog-refresh-use-settimeout" - #define DEVICE_TIMEOUT "watchdog-timeout" - #define FILENAME "file" - #define INTERFACE "interface" -@@ -95,6 +96,7 @@ char *logdir = "/var/log/watchdog"; - char *heartbeat = NULL; - int hbstamps = 300; - -+int refresh_use_settimeout = FALSE; - int realtime = FALSE; - - /* Self-repairing binaries list */ -@@ -206,6 +208,7 @@ void read_config(char *configfile) - } else if (READ_INT(LOGTICK, &logtick) == 0) { - ticker = logtick; - } else if (READ_STRING(DEVICE, &devname) == 0) { -+ } else if (READ_ENUM(DEVICE_USE_SETTIMEOUT, &refresh_use_settimeout) == 0) { - } else if (READ_INT(DEVICE_TIMEOUT, &dev_timeout) == 0) { - } else if (READ_LIST(TEMP, &temp_list) == 0) { - } else if (READ_INT(MAXTEMP, &maxtemp) == 0) { -diff --git a/src/keep_alive.c b/src/keep_alive.c -index 2f77665..a57b0b5 100644 ---- a/src/keep_alive.c -+++ b/src/keep_alive.c -@@ -29,7 +29,6 @@ - - static int watchdog_fd = -1; - static int timeout_used = TIMER_MARGIN; --static int Refresh_using_ioctl = FALSE; - - /* - * Open the watchdog timer (if name non-NULL) and set the time-out value (if non-zero). -@@ -68,16 +67,19 @@ int open_watchdog(char *name, int timeout) - /* The IT8728 on Gigabyte motherboard (and similar) would trip due to the normal - * refresh in the device driver failing to reset the timer for no obvious reason - * (though the normal operation used the Consumer IR sender to refresh via an -- * interrupt - also a non-obvious method!) so this work-around simply sets the -- * time-out every refresh operation. -+ * interrupt - also a non-obvious method!) so let's warn users of these -+ * watchdogs and direct them to a workaround option. - * -- * See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/932381 -+ * See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/932381 and -+ * https://bugzilla.kernel.org/show_bug.cgi?id=42801 - * - */ -- Refresh_using_ioctl = FALSE; -- if (strcmp("IT87 WDT", (char *)ident.identity) == 0) { -- Refresh_using_ioctl = TRUE; -- log_message(LOG_INFO, "Running IT87 module fix-up"); -+ if (!refresh_use_settimeout && strcmp("IT87 WDT", (char *)ident.identity) == 0) { -+ log_message(LOG_INFO, -+ "IT87 watchdog detected, if watchdog trips by itself when the first timeout interval elapses " -+ "try updating to the latest kernel"); -+ log_message(LOG_INFO, "if this does not help please report a kernel bug (not this package bug!) " -+ "and try using watchdog-refresh-use-settimeout=yes config option as a workaround"); - } - - return rv; -@@ -163,7 +165,7 @@ int keep_alive(void) - if (watchdog_fd == -1) - return (ENOERR); - -- if (Refresh_using_ioctl) { -+ if (refresh_use_settimeout) { - int timeout = timeout_used; - if (ioctl(watchdog_fd, WDIOC_SETTIMEOUT, &timeout) < 0) { - err = errno; -diff --git a/watchdog.conf b/watchdog.conf -index 3ccdb97..dcd59ce 100644 ---- a/watchdog.conf -+++ b/watchdog.conf -@@ -29,6 +29,9 @@ - #repair-maximum = 1 - - #watchdog-device = /dev/watchdog -+# If your watchdog trips by itself when the first timeout interval elapses try -+# uncommenting the line below -+#watchdog-refresh-use-settimeout = yes - - # Defaults compiled into the binary - #temperature-sensor = -diff --git a/watchdog.conf.5 b/watchdog.conf.5 -index 5af519d..4e5155a 100644 ---- a/watchdog.conf.5 -+++ b/watchdog.conf.5 -@@ -64,6 +64,12 @@ Set the watchdog device name, typically /dev/watchdog. Default is to disable - keep alive support. This should be tested by running the daemon from the - command line before configuring it to start automatically on booting. - .TP -+watchdog-refresh-use-settimeout = -+Refresh watchdog timer by setting its timeout instead of using a normal watchdog -+refresh operation. -+Might help if your watchdog trips by itself when the first timeout interval -+elapses. -+.TP - watchdog-timeout = - Set the watchdog device timeout during startup. If not set, a default is used - that should be set to the kernel timer margin at compile time. --- -2.20.1 - diff --git a/0003-Ignore-build-products-in-GIT.patch b/0003-Ignore-build-products-in-GIT.patch deleted file mode 100644 index 39af455..0000000 --- a/0003-Ignore-build-products-in-GIT.patch +++ /dev/null @@ -1,66 +0,0 @@ -From de06f50eee35e3ea0daaf77d21e8888f8d8753ad Mon Sep 17 00:00:00 2001 -From: Paul Crawford -Date: Wed, 21 Dec 2016 22:00:51 +0000 -Subject: [PATCH 03/10] Ignore build products in GIT - -- Added a .gitignore file to list those files we do not track in GIT - -- Based on pull request by Maciej S. Szmigiero: - - Currently, after doing checkout and build 'git status' on the - source tree returns a lot of untracked files. Their presence - makes it harder to spot actual tree changes, so let's make - the noise disappear from 'git status' by adding proper .gitignore - files. ---- - .gitignore | 38 ++++++++++++++++++++++++++++++++++++++ - 1 file changed, 38 insertions(+) - create mode 100644 .gitignore - -diff --git a/.gitignore b/.gitignore -new file mode 100644 -index 0000000..db2baeb ---- /dev/null -+++ b/.gitignore -@@ -0,0 +1,38 @@ -+# Ignore hidden/backup/compilation files -+ -+.* -+*.o -+*~ -+ -+# However don't ignore this file -+ -+!/.gitignore -+ -+# Ignore the build programs -+ -+src/watchdog -+src/wd_identify -+src/wd_keepalive -+ -+# Ignore remaining files create/modified by the steps: -+# autoreconf -i -+# ./configure -+# make -+ -+Makefile -+Makefile.in -+aclocal.m4 -+autom4te.cache/ -+compile -+config.log -+config.status -+configure -+depcomp -+include/config.h -+include/config.h.in -+include/stamp-h1 -+install-sh -+missing -+src/Makefile -+src/Makefile.in -+ --- -2.20.1 - diff --git a/0004-Compile-with-musl-when-nfs-is-disabled.patch b/0004-Compile-with-musl-when-nfs-is-disabled.patch deleted file mode 100644 index 9162c3f..0000000 --- a/0004-Compile-with-musl-when-nfs-is-disabled.patch +++ /dev/null @@ -1,32 +0,0 @@ -From f52c40680f0aad44b9ae16648803453ec00cbb2c Mon Sep 17 00:00:00 2001 -From: Paul Crawford -Date: Fri, 30 Dec 2016 15:55:45 +0000 -Subject: [PATCH 04/10] Compile with musl when nfs is disabled - -musl does by default not ship with rpc headers. The watchdog should -not require rpc headers when nfs support is disabled. - -Patch by Felix Janda ---- - include/sundries.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/include/sundries.h b/include/sundries.h -index 4379982..98c489a 100644 ---- a/include/sundries.h -+++ b/include/sundries.h -@@ -9,9 +9,11 @@ - #include - #include - #include -+#if HAVE_NFS - #if !defined(bool_t) && !defined(__GLIBC__) - #include - #endif -+#endif - - extern int mount_mount_quiet; - extern int mount_verbose; --- -2.20.1 - diff --git a/0005-Rename-READ_ENUM-to-READ_YESNO.patch b/0005-Rename-READ_ENUM-to-READ_YESNO.patch deleted file mode 100644 index 8dc24e2..0000000 --- a/0005-Rename-READ_ENUM-to-READ_YESNO.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 2878f90d6f50e7243038f4b1221654f18b2bd475 Mon Sep 17 00:00:00 2001 -From: Paul Crawford -Date: Fri, 30 Dec 2016 16:01:15 +0000 -Subject: [PATCH 05/10] Rename READ_ENUM to READ_YESNO - -- Previously we only has a single enumerated choice - the Boolean - yes/no option in the config file. - -- In preparation for having yes/no/auto we should make this more - obvious. ---- - src/configfile.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/configfile.c b/src/configfile.c -index 10bbc69..809e39a 100644 ---- a/src/configfile.c -+++ b/src/configfile.c -@@ -128,7 +128,7 @@ READ_LIST_END() - - #define READ_INT(name, iv) read_int_func( arg, val, name, 0, 0, iv) - #define READ_STRING(name, str) read_string_func( arg, val, name, Read_allow_blank, str) --#define READ_ENUM(name, iv) read_enumerated_func(arg, val, name, Yes_No_list, iv) -+#define READ_YESNO(name, iv) read_enumerated_func(arg, val, name, Yes_No_list, iv) - #define READ_LIST(name, list) read_list_func( arg, val, name, 0, list) - - /* -@@ -195,7 +195,7 @@ void read_config(char *configfile) - } else if (READ_INT(PINGCOUNT, &pingcount) == 0) { - } else if (READ_LIST(PING, &target_list) == 0) { - } else if (READ_LIST(INTERFACE, &iface_list) == 0) { -- } else if (READ_ENUM(REALTIME, &realtime) == 0) { -+ } else if (READ_YESNO(REALTIME, &realtime) == 0) { - } else if (READ_INT(PRIORITY, &schedprio) == 0) { - } else if (READ_STRING(REPAIRBIN, &repair_bin) == 0) { - } else if (READ_INT(REPAIRTIMEOUT, &repair_timeout) == 0) { -@@ -208,7 +208,7 @@ void read_config(char *configfile) - } else if (READ_INT(LOGTICK, &logtick) == 0) { - ticker = logtick; - } else if (READ_STRING(DEVICE, &devname) == 0) { -- } else if (READ_ENUM(DEVICE_USE_SETTIMEOUT, &refresh_use_settimeout) == 0) { -+ } else if (READ_YESNO(DEVICE_USE_SETTIMEOUT, &refresh_use_settimeout) == 0) { - } else if (READ_INT(DEVICE_TIMEOUT, &dev_timeout) == 0) { - } else if (READ_LIST(TEMP, &temp_list) == 0) { - } else if (READ_INT(MAXTEMP, &maxtemp) == 0) { -@@ -219,12 +219,12 @@ void read_config(char *configfile) - } else if (READ_INT(ALLOCMEM, &minalloc) == 0) { - } else if (READ_STRING(LOGDIR, &logdir) == 0) { - } else if (READ_STRING(TESTDIR, &test_dir) == 0) { -- } else if (READ_ENUM(SOFTBOOT, &softboot) == 0) { -- } else if (READ_ENUM(TEMPPOWEROFF, &temp_poweroff) == 0) { -+ } else if (READ_YESNO(SOFTBOOT, &softboot) == 0) { -+ } else if (READ_YESNO(TEMPPOWEROFF, &temp_poweroff) == 0) { - } else if (READ_INT(SIGTERM_DELAY, &sigterm_delay) == 0) { - } else if (READ_INT(RETRYTIMEOUT, &retry_timeout) == 0) { - } else if (READ_INT(REPAIRMAX, &repair_max) == 0) { -- } else if (READ_ENUM(VERBOSE, &verbose) == 0) { -+ } else if (READ_YESNO(VERBOSE, &verbose) == 0) { - } else { - log_message(LOG_WARNING, "Ignoring invalid option at line %d of config file: %s=%s", linecount, arg, val); - } --- -2.20.1 - diff --git a/0006-Make-IT87-fix-up-automatic-by-default.patch b/0006-Make-IT87-fix-up-automatic-by-default.patch deleted file mode 100644 index 6821c02..0000000 --- a/0006-Make-IT87-fix-up-automatic-by-default.patch +++ /dev/null @@ -1,183 +0,0 @@ -From 25fa3156526d2e4e1a9bc84a160bf7850107bf27 Mon Sep 17 00:00:00 2001 -From: Paul Crawford -Date: Fri, 30 Dec 2016 16:39:16 +0000 -Subject: [PATCH 06/10] Make IT87 fix-up automatic by default - -- Update 00cf0b0 from Maciej S. Szmigiero proposed making the IT87 - style of fix something that is set only by the configuration file, - however, for many users with the buggy IT87 driver this will cause - problems. - -- This change make the choice a 3 state one: - - NO = never use ioctl-based refresh (old way, and in keeping - with the kernel API guidelines for watchdog use). - - YES = always use the ioctl-based refresh (i.e set timer every - time, instead of writing to /dev/watchdog). Might be - useful if another driver module is found to share same - sort of bug as the IT87 module. - - AUTO = check for IT87 and use ioctl-based method if found. This - is the same basec behaviour as before update 00cf0b0 but - the choice for yes/no now supported. ---- - include/extern.h | 4 ++++ - src/configfile.c | 12 ++++++++++-- - src/keep_alive.c | 43 ++++++++++++++++++++++++++++++++----------- - watchdog.conf.5 | 8 ++++---- - 4 files changed, 50 insertions(+), 17 deletions(-) - -diff --git a/include/extern.h b/include/extern.h -index cbf97fd..6d4ba5e 100644 ---- a/include/extern.h -+++ b/include/extern.h -@@ -59,6 +59,10 @@ struct list { - #define FALSE 0 - #endif - -+#define ENUM_NO 0 -+#define ENUM_YES 1 -+#define ENUM_AUTO 2 -+ - #define TS_SIZE 12 - - /* === External variables === */ -diff --git a/src/configfile.c b/src/configfile.c -index 809e39a..29e3464 100644 ---- a/src/configfile.c -+++ b/src/configfile.c -@@ -96,7 +96,7 @@ char *logdir = "/var/log/watchdog"; - char *heartbeat = NULL; - int hbstamps = 300; - --int refresh_use_settimeout = FALSE; -+int refresh_use_settimeout = ENUM_AUTO; - int realtime = FALSE; - - /* Self-repairing binaries list */ -@@ -120,6 +120,13 @@ READ_LIST_ADD("yes", 1) - READ_LIST_END() - }; - -+static const read_list_t YN_Auto_list[] = { -+READ_LIST_ADD("no", ENUM_NO) -+READ_LIST_ADD("yes", ENUM_YES) -+READ_LIST_ADD("auto", ENUM_AUTO) -+READ_LIST_END() -+}; -+ - /* Use the macros below to simplify the parsing function. For now we don't use the - * integer range checking (0=0 so not checked), and assume all strings can be blank and - * enumerated choices are Yes/No, but in future we could add such settings to the #define'd -@@ -129,6 +136,7 @@ READ_LIST_END() - #define READ_INT(name, iv) read_int_func( arg, val, name, 0, 0, iv) - #define READ_STRING(name, str) read_string_func( arg, val, name, Read_allow_blank, str) - #define READ_YESNO(name, iv) read_enumerated_func(arg, val, name, Yes_No_list, iv) -+#define READ_YN_AUTO(name, iv) read_enumerated_func(arg, val, name, YN_Auto_list, iv) - #define READ_LIST(name, list) read_list_func( arg, val, name, 0, list) - - /* -@@ -208,7 +216,7 @@ void read_config(char *configfile) - } else if (READ_INT(LOGTICK, &logtick) == 0) { - ticker = logtick; - } else if (READ_STRING(DEVICE, &devname) == 0) { -- } else if (READ_YESNO(DEVICE_USE_SETTIMEOUT, &refresh_use_settimeout) == 0) { -+ } else if (READ_YN_AUTO(DEVICE_USE_SETTIMEOUT, &refresh_use_settimeout) == 0) { - } else if (READ_INT(DEVICE_TIMEOUT, &dev_timeout) == 0) { - } else if (READ_LIST(TEMP, &temp_list) == 0) { - } else if (READ_INT(MAXTEMP, &maxtemp) == 0) { -diff --git a/src/keep_alive.c b/src/keep_alive.c -index a57b0b5..6e721d9 100644 ---- a/src/keep_alive.c -+++ b/src/keep_alive.c -@@ -29,6 +29,7 @@ - - static int watchdog_fd = -1; - static int timeout_used = TIMER_MARGIN; -+static int Refresh_using_ioctl = FALSE; - - /* - * Open the watchdog timer (if name non-NULL) and set the time-out value (if non-zero). -@@ -67,19 +68,39 @@ int open_watchdog(char *name, int timeout) - /* The IT8728 on Gigabyte motherboard (and similar) would trip due to the normal - * refresh in the device driver failing to reset the timer for no obvious reason - * (though the normal operation used the Consumer IR sender to refresh via an -- * interrupt - also a non-obvious method!) so let's warn users of these -- * watchdogs and direct them to a workaround option. -+ * interrupt - also a non-obvious method!) so this work-around simply sets the -+ * time-out every refresh operation. - * -- * See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/932381 and -- * https://bugzilla.kernel.org/show_bug.cgi?id=42801 -+ * See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/932381 -+ * Also https://bugzilla.kernel.org/show_bug.cgi?id=42801 - * - */ -- if (!refresh_use_settimeout && strcmp("IT87 WDT", (char *)ident.identity) == 0) { -- log_message(LOG_INFO, -- "IT87 watchdog detected, if watchdog trips by itself when the first timeout interval elapses " -- "try updating to the latest kernel"); -- log_message(LOG_INFO, "if this does not help please report a kernel bug (not this package bug!) " -- "and try using watchdog-refresh-use-settimeout=yes config option as a workaround"); -+ -+ Refresh_using_ioctl = FALSE; -+ -+ switch (refresh_use_settimeout) { -+ case ENUM_NO: -+ /* Set to "no" so never use ioctl mode. */ -+ break; -+ -+ case ENUM_YES: -+ /* Set to "yes" so always use ioctl mode. */ -+ Refresh_using_ioctl = TRUE; -+ log_message(LOG_INFO, "Running ioctl-based refresh"); -+ break; -+ -+ case ENUM_AUTO: -+ /* Set to "auto" to decide based on driver identity. */ -+ Refresh_using_ioctl = FALSE; -+ if (strcmp("IT87 WDT", (char *)ident.identity) == 0) { -+ Refresh_using_ioctl = TRUE; -+ log_message(LOG_INFO, "Running IT87 module fix-up"); -+ } -+ break; -+ -+ default: -+ log_message(LOG_ERR, "Unknown ioctl selection mode (%d)", refresh_use_settimeout); -+ break; - } - - return rv; -@@ -165,7 +186,7 @@ int keep_alive(void) - if (watchdog_fd == -1) - return (ENOERR); - -- if (refresh_use_settimeout) { -+ if (Refresh_using_ioctl) { - int timeout = timeout_used; - if (ioctl(watchdog_fd, WDIOC_SETTIMEOUT, &timeout) < 0) { - err = errno; -diff --git a/watchdog.conf.5 b/watchdog.conf.5 -index 4e5155a..709c36e 100644 ---- a/watchdog.conf.5 -+++ b/watchdog.conf.5 -@@ -64,11 +64,11 @@ Set the watchdog device name, typically /dev/watchdog. Default is to disable - keep alive support. This should be tested by running the daemon from the - command line before configuring it to start automatically on booting. - .TP --watchdog-refresh-use-settimeout = -+watchdog-refresh-use-settimeout = - Refresh watchdog timer by setting its timeout instead of using a normal watchdog --refresh operation. --Might help if your watchdog trips by itself when the first timeout interval --elapses. -+refresh operation. Might help if your watchdog trips by itself when the first -+timeout interval elapses. Default is 'auto' for IT87 fix-up but this can be -+disabled with 'no' or forced for other modules with 'yes'. - .TP - watchdog-timeout = - Set the watchdog device timeout during startup. If not set, a default is used --- -2.20.1 - diff --git a/0007-Synced-Debian-files-with-5.15-2.patch b/0007-Synced-Debian-files-with-5.15-2.patch deleted file mode 100644 index 032f626..0000000 --- a/0007-Synced-Debian-files-with-5.15-2.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 62face90fe89ea1dc88b6b093f4921e47461f48d Mon Sep 17 00:00:00 2001 -From: Michael Meskes -Date: Fri, 20 Jan 2017 14:02:17 +0100 -Subject: [PATCH 07/10] Synced Debian files with 5.15-2 - ---- - debian/changelog | 9 +++++++++ - debian/control | 2 +- - debian/po/nl.po | 3 --- - debian/po/ru.po | 8 ++------ - debian/rules | 9 +++++---- - 5 files changed, 17 insertions(+), 14 deletions(-) - -diff --git a/debian/changelog b/debian/changelog -index fd436d8..1559626 100644 ---- a/debian/changelog -+++ b/debian/changelog -@@ -1,3 +1,12 @@ -+watchdog (5.15-2) unstable; urgency=medium -+ -+ * Fix FTCBFS: Let dh_auto_configure pass --host to ./configure -+ (Closes: #851231) Thanks to Helmut Grohne -+ * Bumped Standards-Version to 3.9.8, no changes needed. -+ * Enabled bindnow linker flag. -+ -+ -- Michael Meskes Fri, 20 Jan 2017 13:31:26 +0100 -+ - watchdog (5.15-1) unstable; urgency=medium - - * New upstream version. -diff --git a/debian/control b/debian/control -index a9f8a68..625f820 100644 ---- a/debian/control -+++ b/debian/control -@@ -3,7 +3,7 @@ Section: admin - Priority: extra - Maintainer: Michael Meskes - Build-Depends: debhelper (>= 9), po-debconf (>= 0.5.0), dh-systemd (>= 1.5) --Standards-Version: 3.9.6 -+Standards-Version: 3.9.8 - Homepage: http://watchdog.sourceforge.net - - Package: watchdog -diff --git a/debian/po/nl.po b/debian/po/nl.po -index 9f9d657..73d1d28 100644 ---- a/debian/po/nl.po -+++ b/debian/po/nl.po -@@ -45,9 +45,6 @@ msgstr "Na het stoppen van watchdog wd_keepalive starten?" - #. Type: boolean - #. Description - #: ../templates:3001 --#| msgid "" --#| "Please specify whether watchdog should be started as part of the boot " --#| "process. This can be changed later by editing /etc/default/watchdog." - msgid "" - "Please specify whether stopping watchdog should start wd_keepalive to keep " - "on triggering the watchdog device. This can be changed later by editing /etc/" -diff --git a/debian/po/ru.po b/debian/po/ru.po -index 6b2208c..211e4d8 100644 ---- a/debian/po/ru.po -+++ b/debian/po/ru.po -@@ -44,17 +44,14 @@ msgstr "Запускать wd_keepalive после остановки watchdog?" - #. Type: boolean - #. Description - #: ../templates:3001 --#| msgid "" --#| "Please specify whether watchdog should be started as part of the boot " --#| "process. This can be changed later by editing /etc/default/watchdog." - msgid "" - "Please specify whether stopping watchdog should start wd_keepalive to keep " - "on triggering the watchdog device. This can be changed later by editing /etc/" - "default/watchdog." - msgstr "" - "Укажите, нужно ли при остановке watchdog запускать wd_keepalive, чтобы " --"оставить рабочим устройство watchdog. Это можно " --"изменить позже отредактировав файл /etc/default/watchdog." -+"оставить рабочим устройство watchdog. Это можно изменить позже " -+"отредактировав файл /etc/default/watchdog." - - #. Type: boolean - #. Description -@@ -91,4 +88,3 @@ msgstr "" - "Укажите модули, которые нужно загрузить перед запуском watchdog. Модуль " - "'softdog' обычно подходит для всех случаев. Введите 'none', если не хотите, " - "чтобы сценарий загружал модуль." -- -diff --git a/debian/rules b/debian/rules -index 2ca0797..0ece076 100755 ---- a/debian/rules -+++ b/debian/rules -@@ -1,9 +1,10 @@ - #!/usr/bin/make -f - - SHELL = /bin/bash --CFLAGS = $(shell dpkg-buildflags --get CFLAGS) --CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) --LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) -+export DEB_BUILD_MAINT_OPTIONS=hardening=+all -+CFLAGS = `dpkg-buildflags --get CFLAGS` -+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS` -+LDFLAGS = `dpkg-buildflags --get LDFLAGS` - - build: build-arch build-indep - build-arch: build-stamp -@@ -14,7 +15,7 @@ build-stamp: Makefile - touch build - - Makefile: -- CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" ./configure --prefix=/usr \ -+ CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" dh_auto_configure -- \ - --with-configfile=/etc/watchdog.conf - - clean: Makefile --- -2.20.1 - diff --git a/0008-Fix-automated-CentOS-7-build.patch b/0008-Fix-automated-CentOS-7-build.patch deleted file mode 100644 index ed74a84..0000000 --- a/0008-Fix-automated-CentOS-7-build.patch +++ /dev/null @@ -1,58 +0,0 @@ -From d7f483a0bc6214258098894daabc2ce590ca41fc Mon Sep 17 00:00:00 2001 -From: Paul Crawford -Date: Mon, 31 Jul 2017 16:18:53 +0100 -Subject: [PATCH 08/10] Fix automated CentOS 7 build - -- Apply changes from Marcus Furlong to fix automated CentOS 7 build - -- Update URLs to https and fix download address from sourceforge ---- - redhat/watchdog.spec | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/redhat/watchdog.spec b/redhat/watchdog.spec -index a13730a..85a0164 100644 ---- a/redhat/watchdog.spec -+++ b/redhat/watchdog.spec -@@ -5,8 +5,8 @@ Release: 2%{?dist} - License: GPL+ - Group: System Environment/Daemons - --URL: http://sourceforge.net/projects/watchdog/ --Source0: http://dl.sf.net/watchdog/watchdog-%{version}.tar.gz -+URL: https://sourceforge.net/projects/watchdog/ -+Source0: https://downloads.sourceforge.net/project/watchdog/watchdog/%{version}/watchdog-%{version}.tar.gz - Source1: watchdog.init - Source2: README.watchdog.ipmi - Source3: README.Fedora -@@ -61,8 +61,6 @@ make %{?_smp_mflags} - rm -Rf ${RPM_BUILD_ROOT} - install -d -m0755 ${RPM_BUILD_ROOT}%{_sysconfdir} - make DESTDIR=${RPM_BUILD_ROOT} install --install -Dp -m0644 %{name}.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/watchdog --install -Dp -m0755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_initrddir}/watchdog - - %clean - rm -Rf ${RPM_BUILD_ROOT} -@@ -91,7 +89,6 @@ fi - %defattr(-, root, root, -) - %doc AUTHORS ChangeLog COPYING examples/ IAFA-PACKAGE NEWS README TODO README.watchdog.ipmi README.Fedora - %config(noreplace) %{_sysconfdir}/watchdog.conf --%config(noreplace) %{_sysconfdir}/sysconfig/watchdog - %{_sysconfdir}/rc.d/init.d/watchdog - %{_sbindir}/watchdog - %{_sbindir}/wd_keepalive -@@ -101,6 +98,10 @@ fi - - - %changelog -+* Tue Dec 13 2016 Paul Crawford - 5.15 -+- Apply changes from Marcus Furlong to fix automated CentOS 7 build -+- Update URLs to https and fix download address from sourceforge -+ - * Thu Mar 5 2009 Richard W.M. Jones - 5.5-2 - - Use '-' in defattr line instead of explicit file mode. - --- -2.20.1 - diff --git a/0009-Bugfix-against-watchdog-configuration-file-corruptio.patch b/0009-Bugfix-against-watchdog-configuration-file-corruptio.patch deleted file mode 100644 index 49b46e2..0000000 --- a/0009-Bugfix-against-watchdog-configuration-file-corruptio.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 7310afccc11070fd4207a41881401d619dd113b1 Mon Sep 17 00:00:00 2001 -From: Paul Crawford -Date: Mon, 31 Jul 2017 16:36:10 +0100 -Subject: [PATCH 09/10] Bugfix against watchdog configuration file corruption - -- Apply the bugfix/patch against watchdog configuration file - corruption during runtime by Greg Vishnepolsky greg@armis.com - -- Modify from Greg's patch to include the permission mode and to - declare the new fd variables immediately after the opening brace. - -- Greg provided the follow description: - -The following patch fixes a bug where writes/prints (out of a test -binary) that are intended for stdout/stderr may instead be written -to other files (like the watchdog configuration files). - -The bug lies in the call to "freopen" on "stdout" when the actual -FD (1) for stdout had been previously closed by the daemon. Instead -this FD could have been re-used (for instance, for opening watchdog -configuration files). Thus any prints out of the daemon/test binaries -will be erroneously written into it. ---- - src/test_binary.c | 13 +++++++++++-- - src/watchdog.c | 13 +++++++++++-- - 2 files changed, 22 insertions(+), 4 deletions(-) - -diff --git a/src/test_binary.c b/src/test_binary.c -index 2211f9e..a58c107 100644 ---- a/src/test_binary.c -+++ b/src/test_binary.c -@@ -3,6 +3,7 @@ - #endif - - #include -+#include - #include - #include - #include -@@ -258,16 +259,24 @@ int check_bin(char *tbinary, int timeout, int version) - - child_pid = fork(); - if (!child_pid) { -+ int test_stdout_fd, test_stderr_fd; - - /* Don't want the stdout and stderr of our test program - * to cause trouble, so make them go to their respective files */ - strcpy(filename_buf, logdir); - strcat(filename_buf, "/test-bin.stdout"); -- if (!freopen(filename_buf, "a+", stdout)) -+ test_stdout_fd = open(filename_buf, O_WRONLY|O_CREAT|O_APPEND, S_IWUSR|S_IRUSR|S_IRGRP); -+ if (test_stdout_fd == -1) - exit(errno); -+ if (dup2(test_stdout_fd, fileno(stdout)) == -1) -+ exit(errno); -+ - strcpy(filename_buf, logdir); - strcat(filename_buf, "/test-bin.stderr"); -- if (!freopen(filename_buf, "a+", stderr)) -+ test_stderr_fd = open(filename_buf, O_WRONLY|O_CREAT|O_APPEND, S_IWUSR|S_IRUSR|S_IRGRP); -+ if (test_stderr_fd == -1) -+ exit(errno); -+ if (dup2(test_stderr_fd, fileno(stderr)) == -1) - exit(errno); - - /* now start binary */ -diff --git a/src/watchdog.c b/src/watchdog.c -index 486384a..a69dba4 100644 ---- a/src/watchdog.c -+++ b/src/watchdog.c -@@ -84,16 +84,25 @@ static int repair(char *rbinary, int result, char *name, int version) - - child_pid = fork(); - if (!child_pid) { -+ int repair_stdout_fd, repair_stderr_fd; -+ - /* Don't want the stdin and stdout of our repair program - * to cause trouble. - * So make stdout and stderr go to their respective files */ - strcpy(filename_buf, logdir); - strcat(filename_buf, "/repair-bin.stdout"); -- if (!freopen(filename_buf, "a+", stdout)) -+ repair_stdout_fd = open(filename_buf, O_WRONLY|O_CREAT|O_APPEND, S_IWUSR|S_IRUSR|S_IRGRP); -+ if (repair_stdout_fd == -1) - exit(errno); -+ if (dup2(repair_stdout_fd, fileno(stdout)) == -1) -+ exit(errno); -+ - strcpy(filename_buf, logdir); - strcat(filename_buf, "/repair-bin.stderr"); -- if (!freopen(filename_buf, "a+", stderr)) -+ repair_stderr_fd = open(filename_buf, O_WRONLY|O_CREAT|O_APPEND, S_IWUSR|S_IRUSR|S_IRGRP); -+ if (repair_stderr_fd == -1) -+ exit(errno); -+ if (dup2(repair_stderr_fd, fileno(stderr)) == -1) - exit(errno); - - /* now start binary */ --- -2.20.1 - diff --git a/0010-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch b/0010-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch deleted file mode 100644 index 8a3a8b8..0000000 --- a/0010-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 93f5334052cf14ae1149aa0f0b3178137eec01dd Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 6 Feb 2019 13:25:47 +0000 -Subject: [PATCH 10/10] Choose libtirpc or another RPC library for XDR headers - and library. - -Signed-off-by: Richard W.M. Jones ---- - configure.ac | 20 ++++++++++++++++++++ - src/Makefile.am | 2 ++ - 2 files changed, 22 insertions(+) - -diff --git a/configure.ac b/configure.ac -index f100829..4220411 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -156,4 +156,24 @@ AC_ARG_WITH(randomseed, - AC_MSG_RESULT("/var/run/random-seed") - ]) - -+# Check for an RPC library, starting with libtirpc. -+PKG_CHECK_MODULES([RPC], [libtirpc], [], [ -+ # If we don't have libtirpc, then we must have and -+ # some library to link to in libdir. -+ RPC_CFLAGS="" -+ AC_CHECK_HEADER([rpc/rpc.h],[],[ -+ AC_MSG_ERROR([XDR header files are required]) -+ ], -+ [#include ]) -+ -+ old_LIBS="$LIBS" -+ LIBS="" -+ AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl]) -+ RPC_LIBS="$LIBS" -+ LIBS="$old_LIBS" -+ -+ AC_SUBST([RPC_CFLAGS]) -+ AC_SUBST([RPC_LIBS]) -+]) -+ - AC_OUTPUT([Makefile src/Makefile]) -diff --git a/src/Makefile.am b/src/Makefile.am -index 4ecfd97..7f63be5 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -6,6 +6,8 @@ watchdog_SOURCES = file_stat.c file_table.c fstab.c iface.c ifdown.c keep_alive. - temp.c test_binary.c umount.c version.c watchdog.c \ - logmessage.c xmalloc.c heartbeat.c lock_mem.c daemon-pid.c configfile.c \ - errorcodes.c read-conf.c sigterm.c -+watchdog_CFLAGS = $(RPC_CFLAGS) -+watchdog_LDADD = $(RPC_LIBS) - - wd_keepalive_SOURCES = wd_keepalive.c logmessage.c lock_mem.c daemon-pid.c xmalloc.c \ - configfile.c keep_alive.c read-conf.c sigterm.c --- -2.20.1 - diff --git a/0004-watchdog-5.13-rhseldoc.patch b/0099-watchdog-5.16-rhseldoc.patch similarity index 73% rename from 0004-watchdog-5.13-rhseldoc.patch rename to 0099-watchdog-5.16-rhseldoc.patch index 3ccaf23..decb8a8 100644 --- a/0004-watchdog-5.13-rhseldoc.patch +++ b/0099-watchdog-5.16-rhseldoc.patch @@ -1,7 +1,8 @@ -diff -ur watchdog-5.15.old/watchdog.8 watchdog-5.15/watchdog.8 ---- watchdog-5.15.old/watchdog.8 2016-02-26 12:05:00.000000000 +0000 -+++ watchdog-5.15/watchdog.8 2018-02-13 08:54:00.860681339 +0000 -@@ -215,6 +215,7 @@ +diff --git a/watchdog.8 b/watchdog.8 +index 9b7c6e7..052b1e1 100644 +--- a/watchdog.8 ++++ b/watchdog.8 +@@ -216,6 +216,7 @@ by .BR watchdog . So you can for instance restart the server from your .IR repair-binary . @@ -9,7 +10,7 @@ diff -ur watchdog-5.15.old/watchdog.8 watchdog-5.15/watchdog.8 .PP .B watchdog will try periodically to fork itself to see whether the process -@@ -241,6 +242,8 @@ +@@ -242,6 +243,8 @@ a given interface for traffic. If no traffic arrives the network is considered unreachable causing a soft reboot or action from the repair binary. .PP @@ -18,7 +19,7 @@ diff -ur watchdog-5.15.old/watchdog.8 watchdog-5.15/watchdog.8 .B watchdog can run an external command for user-defined tests. A return code not equal 0 means an error occurred and watchdog should react. If the external command is -@@ -350,6 +353,9 @@ +@@ -348,6 +351,9 @@ Child process did not return in time. 246 Free for personal watchdog-specific use (was \-10 as an unsigned 8\-bit number). @@ -28,7 +29,7 @@ diff -ur watchdog-5.15.old/watchdog.8 watchdog-5.15/watchdog.8 .TP 245 Reserved for an unknown result, for example a slow background test that is -@@ -377,6 +383,9 @@ +@@ -375,6 +381,9 @@ repair-maximum controls the number of successive repair attempts that report 0 (i.e. success) but fail to clear the tested fault. If this is exceeded then a reboot takes place. If set to zero then a reboot can always be blocked by the repair program reporting success. @@ -38,7 +39,7 @@ diff -ur watchdog-5.15.old/watchdog.8 watchdog-5.15/watchdog.8 .SH "TEST DIRECTORY" Executables placed in the test directory are discovered by watchdog on startup and are automatically executed. They are bounded time-wise by -@@ -415,6 +424,27 @@ +@@ -413,6 +422,27 @@ As for the repair binary, the configuration parameter repair-maximum also controls the number of successive repair attempts that report success (return 0) but fail to clear the fault. @@ -66,27 +67,30 @@ diff -ur watchdog-5.15.old/watchdog.8 watchdog-5.15/watchdog.8 .SH BUGS None known so far. .SH AUTHORS -@@ -433,4 +463,4 @@ +@@ -431,4 +461,4 @@ The watchdog device. The pid file of the running .BR watchdog . .SH "SEE ALSO" -.BR watchdog.conf (5) +.BR watchdog.conf (5), systemd.unit (5) -diff -ur watchdog-5.15.old/watchdog.conf watchdog-5.15/watchdog.conf ---- watchdog-5.15.old/watchdog.conf 2016-02-26 12:05:00.000000000 +0000 -+++ watchdog-5.15/watchdog.conf 2018-02-13 08:52:18.899721271 +0000 -@@ -16,6 +16,8 @@ - #min-memory = 1 - #allocatable-memory = 1 - +diff --git a/watchdog.conf b/watchdog.conf +index 207da3e..7dd3cb3 100644 +--- a/watchdog.conf ++++ b/watchdog.conf +@@ -75,7 +75,9 @@ priority = 1 + # If you have a custom binary/script to handle errors then uncomment + # this line and provide the path. For 'v1' test binary files they also + # handle error cases. +- +# With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/ ++ +# or /etc/watchdog.d/ for your test-binary and repair-binary configuration. #repair-binary = /usr/sbin/repair #repair-timeout = 60 - #test-binary = -@@ -45,5 +47,12 @@ - realtime = yes - priority = 1 + +@@ -175,6 +177,13 @@ priority = 1 + #temperature-sensor = + #max-temperature = 90 +# When using custom service pid check with custom service +# systemd unit file please be aware the "Requires=" @@ -95,20 +99,22 @@ diff -ur watchdog-5.15.old/watchdog.conf watchdog-5.15/watchdog.conf +# in the custom service unit file may be the desired operation instead. +# See man 5 systemd.unit for more details. +# - # Check if rsyslogd is still running by enabling the following line - #pidfile = /var/run/rsyslogd.pid -diff -ur watchdog-5.15.old/watchdog.conf.5 watchdog-5.15/watchdog.conf.5 ---- watchdog-5.15.old/watchdog.conf.5 2016-02-26 12:05:00.000000000 +0000 -+++ watchdog-5.15/watchdog.conf.5 2018-02-13 08:52:18.898721271 +0000 -@@ -105,6 +105,7 @@ - pidfile = - Set pidfile name for server test mode. - This option can be given as often as you like to check several servers. + # Check for a running process/daemon by its PID file. For example, + # check if rsyslogd is still running by enabling the following line: + +diff --git a/watchdog.conf.5 b/watchdog.conf.5 +index edf7c8b..72c3bc2 100644 +--- a/watchdog.conf.5 ++++ b/watchdog.conf.5 +@@ -130,6 +130,7 @@ pidfile = + Set pidfile name for daemon test mode. + This option can be given as often as you like to check several daemons, assuming + they write their post-forking PID to the specified files. +See the Systemd section in watchdog (8) for more information. .TP ping = Set IPv4 address for ping mode. -@@ -119,6 +120,8 @@ +@@ -147,6 +148,8 @@ aliased IP interfaces. .TP test-binary = Execute the given binary to do some user defined tests. @@ -117,7 +123,7 @@ diff -ur watchdog-5.15.old/watchdog.conf.5 watchdog-5.15/watchdog.conf.5 .TP test-timeout = User defined tests may only run for seconds. Set to 0 for unlimited. -@@ -126,6 +129,8 @@ +@@ -154,6 +157,8 @@ User defined tests may only run for seconds. Set to 0 for unlimited. repair-binary = Execute the given binary in case of a problem instead of shutting down the system. @@ -126,7 +132,7 @@ diff -ur watchdog-5.15.old/watchdog.conf.5 watchdog-5.15/watchdog.conf.5 .TP repair-timeout = repair command may only run for seconds. Set to 0 for 'unlimited', but -@@ -156,6 +161,7 @@ +@@ -188,6 +193,7 @@ Set the schedule priority for realtime mode passed to sched_setscheduler(). .TP test-directory = Set the directory to run user test/repair scripts. Default is '/etc/watchdog.d' diff --git a/sources b/sources index 78f5706..14567dd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (watchdog-5.15.tar.gz) = a675cfadf3296d583b9163193297038fb19459daf7c6681289392d613e775e75b7afd42a3e01b136a955f25b2f45818033b56e10de9050075d7dc015535a6e75 +SHA512 (watchdog-5.16.tar.gz) = 1c9c921570ec7ddc3e4ff88b2029f1c3865277e547fb8970575df4b61fdf1f06f443f49ad09f11c29d913ca7d6ab05c5b19ec049ac218a8bcebd20b1bf5f0bbd diff --git a/watchdog.spec b/watchdog.spec index 0193aba..7a84a0e 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog -Version: 5.15 -Release: 11%{?dist} +Version: 5.16 +Release: 1%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/watchdog/ @@ -11,21 +11,11 @@ Source3: README.Fedora Source4: watchdog.service Source5: watchdog-ping.service -# Upstream patches since 5.15. -Patch1: 0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch -Patch2: 0002-Generalize-and-make-watchdog-refresh-settimeout-work.patch -Patch3: 0003-Ignore-build-products-in-GIT.patch -Patch4: 0004-Compile-with-musl-when-nfs-is-disabled.patch -Patch5: 0005-Rename-READ_ENUM-to-READ_YESNO.patch -Patch6: 0006-Make-IT87-fix-up-automatic-by-default.patch -Patch7: 0007-Synced-Debian-files-with-5.15-2.patch -Patch8: 0008-Fix-automated-CentOS-7-build.patch -Patch9: 0009-Bugfix-against-watchdog-configuration-file-corruptio.patch # Fixes building on glibc without RPC. Sent upstream 2019-02-06. -Patch10: 0010-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch +Patch1: 0001-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch # Non-upstream patch to document SELinux support. -Patch99: 0004-watchdog-5.13-rhseldoc.patch +Patch99: 0099-watchdog-5.16-rhseldoc.patch BuildRequires: make BuildRequires: gcc @@ -59,15 +49,6 @@ expiration) initiated by the BMC. %prep %setup -q -n %{name}-%{version} %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 %patch99 -p1 -b .rhseldoc autoreconf -i @@ -143,6 +124,9 @@ rm %{name}.sysconfig %changelog +* Tue Aug 10 2021 Josef Ridky - 5.16-1 +- New upstream release 5.16 + * Fri Jul 23 2021 Fedora Release Engineering - 5.15-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From c7152d55c92b026111fab3d55ce657211961e7e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=98=C3=ADdk=C3=BD?= Date: Thu, 14 Oct 2021 09:47:33 +0200 Subject: [PATCH 14/23] Resolves: #2013934 - fix mem leak when verbose mode is on --- 0002-mem-leak-verbose.patch | 19 +++++++++++++++++++ watchdog.spec | 12 +++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 0002-mem-leak-verbose.patch diff --git a/0002-mem-leak-verbose.patch b/0002-mem-leak-verbose.patch new file mode 100644 index 0000000..2341c4b --- /dev/null +++ b/0002-mem-leak-verbose.patch @@ -0,0 +1,19 @@ +diff -ruNp a/src/run-as-child.c b/src/run-as-child.c +--- a/src/run-as-child.c 2021-10-14 08:17:04.556107815 +0200 ++++ b/src/run-as-child.c 2021-10-14 08:36:23.686706344 +0200 +@@ -98,8 +98,14 @@ int exec_as_func(int flags, void *ptr) + /* Create single string with all command line options. */ + int ii = 1; + char *opt = strdup(":"); ++ char *tempOpt; + while (opt != NULL && arg[ii] != NULL) { +- opt = realloc(opt, strlen(opt) + strlen(arg[ii]) + 2); ++ tempOpt = realloc(opt, strlen(opt) + strlen(arg[ii]) + 2); ++ if (tempOpt != NULL){ ++ opt = tempOpt; ++ } else { ++ break; ++ } + opt = strcat(opt, " "); + opt = strcat(opt, arg[ii]); + ii++; diff --git a/watchdog.spec b/watchdog.spec index 7a84a0e..ba6a7a8 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.16 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/watchdog/ @@ -12,10 +12,12 @@ Source4: watchdog.service Source5: watchdog-ping.service # Fixes building on glibc without RPC. Sent upstream 2019-02-06. -Patch1: 0001-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch +Patch1: 0001-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch +# Fixes potentional mem leak +Patch2: 0002-mem-leak-verbose.patch # Non-upstream patch to document SELinux support. -Patch99: 0099-watchdog-5.16-rhseldoc.patch +Patch99: 0099-watchdog-5.16-rhseldoc.patch BuildRequires: make BuildRequires: gcc @@ -49,6 +51,7 @@ expiration) initiated by the BMC. %prep %setup -q -n %{name}-%{version} %patch1 -p1 +%patch2 -p1 %patch99 -p1 -b .rhseldoc autoreconf -i @@ -124,6 +127,9 @@ rm %{name}.sysconfig %changelog +* Thu Oct 14 2021 Josef Ridky - 5.16-2 +- fix memory leak when verbose mode is on + * Tue Aug 10 2021 Josef Ridky - 5.16-1 - New upstream release 5.16 From 0f6dd0badf232648451bdc2d305587b2c974b6ce Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 04:16:51 +0000 Subject: [PATCH 15/23] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- watchdog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index ba6a7a8..5c903bf 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.16 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/watchdog/ @@ -127,6 +127,9 @@ rm %{name}.sysconfig %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 5.16-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Thu Oct 14 2021 Josef Ridky - 5.16-2 - fix memory leak when verbose mode is on From b5c189d723f6e316c168a6db36dc51bc76a728ce Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 12:13:08 +0000 Subject: [PATCH 16/23] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- watchdog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index 5c903bf..3edde03 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.16 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/watchdog/ @@ -127,6 +127,9 @@ rm %{name}.sysconfig %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 5.16-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Sat Jan 22 2022 Fedora Release Engineering - 5.16-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From fd7d9fcd493c970b27a9f3e4c14389b700fedf17 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 06:36:57 +0000 Subject: [PATCH 17/23] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- watchdog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index 3edde03..7d081ff 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.16 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/watchdog/ @@ -127,6 +127,9 @@ rm %{name}.sysconfig %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 5.16-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Jul 23 2022 Fedora Release Engineering - 5.16-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 8c60d03457395edc3d51fe08da14cb06ee58b8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=98=C3=ADdk=C3=BD?= Date: Wed, 19 Jul 2023 09:26:19 +0200 Subject: [PATCH 18/23] Migrate to SPDX license format --- watchdog.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/watchdog.spec b/watchdog.spec index 7d081ff..8aa913c 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,8 +1,8 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.16 -Release: 5%{?dist} -License: GPLv2+ +Release: 6%{?dist} +License: GPL-2.0-or-later URL: http://sourceforge.net/projects/watchdog/ Source0: http://downloads.sourceforge.net/watchdog/watchdog-%{version}.tar.gz @@ -50,9 +50,9 @@ expiration) initiated by the BMC. %prep %setup -q -n %{name}-%{version} -%patch1 -p1 -%patch2 -p1 -%patch99 -p1 -b .rhseldoc +%patch 1 -p1 +%patch 2 -p1 +%patch 99 -p1 -b .rhseldoc autoreconf -i cp %{SOURCE2} . @@ -127,6 +127,9 @@ rm %{name}.sysconfig %changelog +* Wed Jul 19 2023 Josef Ridky - 5.16-6 +- Migrate to SPDX license format + * Sat Jan 21 2023 Fedora Release Engineering - 5.16-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 060e2370f4db16a6f5618badaa22990afb0775e9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 17:59:06 +0000 Subject: [PATCH 19/23] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- watchdog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index 8aa913c..103ca1d 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.16 -Release: 6%{?dist} +Release: 7%{?dist} License: GPL-2.0-or-later URL: http://sourceforge.net/projects/watchdog/ @@ -127,6 +127,9 @@ rm %{name}.sysconfig %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 5.16-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed Jul 19 2023 Josef Ridky - 5.16-6 - Migrate to SPDX license format From 59ccc300e722d5d4d4f8cde4bb36f9cff571d7c2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 08:24:07 +0000 Subject: [PATCH 20/23] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- watchdog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index 103ca1d..83d1638 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.16 -Release: 7%{?dist} +Release: 8%{?dist} License: GPL-2.0-or-later URL: http://sourceforge.net/projects/watchdog/ @@ -127,6 +127,9 @@ rm %{name}.sysconfig %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 5.16-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jul 22 2023 Fedora Release Engineering - 5.16-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From fa618ab4106626826c6c8554b94a9ceeb53764ba Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 09:08:12 +0000 Subject: [PATCH 21/23] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- watchdog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index 83d1638..6c5d50b 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.16 -Release: 8%{?dist} +Release: 9%{?dist} License: GPL-2.0-or-later URL: http://sourceforge.net/projects/watchdog/ @@ -127,6 +127,9 @@ rm %{name}.sysconfig %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 5.16-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Sat Jan 27 2024 Fedora Release Engineering - 5.16-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 2cbd160eb447735823f8badac5c9aeb63104b58d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 14:46:12 +0000 Subject: [PATCH 22/23] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- watchdog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index 6c5d50b..18c15c9 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.16 -Release: 9%{?dist} +Release: 10%{?dist} License: GPL-2.0-or-later URL: http://sourceforge.net/projects/watchdog/ @@ -127,6 +127,9 @@ rm %{name}.sysconfig %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 5.16-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sat Jul 20 2024 Fedora Release Engineering - 5.16-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From ce77741d5e731451a40dd1f5b8e833ffcf080be0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 20:17:47 +0000 Subject: [PATCH 23/23] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- watchdog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watchdog.spec b/watchdog.spec index 18c15c9..7eca885 100644 --- a/watchdog.spec +++ b/watchdog.spec @@ -1,7 +1,7 @@ Summary: Software and/or Hardware watchdog daemon Name: watchdog Version: 5.16 -Release: 10%{?dist} +Release: 11%{?dist} License: GPL-2.0-or-later URL: http://sourceforge.net/projects/watchdog/ @@ -127,6 +127,9 @@ rm %{name}.sysconfig %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 5.16-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sun Jan 19 2025 Fedora Release Engineering - 5.16-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild