Rebase to watchdog 5.15.
- Remove upstream patches.
This commit is contained in:
parent
7ece7ef168
commit
6acb020ccc
@ -1,54 +0,0 @@
|
||||
From 2053c6f5f1c597637d4791af4c34eeac144e7802 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 16 May 2013 12:57:33 +0100
|
||||
Subject: [PATCH 1/2] watchdog: Clearer --help output.
|
||||
|
||||
Document all the (non-obsolete) options in the --help output,
|
||||
including long variants.
|
||||
|
||||
The new output is:
|
||||
|
||||
./src/watchdog: unrecognized option '--help'
|
||||
watchdog version 5.13, usage:
|
||||
watchdog [options]
|
||||
options:
|
||||
-F | --foreground run in foreground
|
||||
-f | --force don't sanity-check config
|
||||
-c | --config-file <file> specify location of config file
|
||||
-s | --sync sync filesystem
|
||||
-b | --softboot soft-boot on error
|
||||
-q | --no-action do not reboot or halt
|
||||
-v | --verbose verbose messages
|
||||
---
|
||||
src/watchdog.c | 14 ++++++++++----
|
||||
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/watchdog.c b/src/watchdog.c
|
||||
index 6f93de8..2231f8a 100644
|
||||
--- a/src/watchdog.c
|
||||
+++ b/src/watchdog.c
|
||||
@@ -103,11 +103,17 @@ int mlocked = FALSE, realtime = FALSE;
|
||||
static void usage(void)
|
||||
{
|
||||
fprintf(stderr, "%s version %d.%d, usage:\n", progname, MAJOR_VERSION, MINOR_VERSION);
|
||||
+ fprintf(stderr, "%s [options]\n", progname);
|
||||
+ fprintf(stderr, "options:\n");
|
||||
+ fprintf(stderr, " -F | --foreground run in foreground\n");
|
||||
+ fprintf(stderr, " -f | --force don't sanity-check config\n");
|
||||
+ fprintf(stderr, " -c | --config-file <file> specify location of config file\n");
|
||||
+ fprintf(stderr, " -s | --sync sync filesystem\n");
|
||||
+ fprintf(stderr, " -b | --softboot soft-boot on error\n");
|
||||
+ fprintf(stderr, " -q | --no-action do not reboot or halt\n");
|
||||
#if USE_SYSLOG
|
||||
- fprintf(stderr, "%s [-F] [-f] [-c <config_file>] [-v] [-s] [-b] [-q]\n", progname);
|
||||
-#else /* USE_SYSLOG */
|
||||
- fprintf(stderr, "%s [-F] [-f] [-c <config_file>] [-s] [-b] [-q]\n", progname);
|
||||
-#endif /* USE_SYSLOG */
|
||||
+ fprintf(stderr, " -v | --verbose verbose messages\n");
|
||||
+#endif
|
||||
exit(1);
|
||||
}
|
||||
|
||||
--
|
||||
1.8.1.4
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 1c5937a9f852293459f26813f3f166d6650af44f Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 16 May 2013 13:01:11 +0100
|
||||
Subject: [PATCH 2/2] wd_identify, wd_keepalive: Document -c/--config-file in
|
||||
--help output.
|
||||
|
||||
---
|
||||
src/wd_identify.c | 2 +-
|
||||
src/wd_keepalive.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/wd_identify.c b/src/wd_identify.c
|
||||
index 4eb71fd..41ba0ac 100644
|
||||
--- a/src/wd_identify.c
|
||||
+++ b/src/wd_identify.c
|
||||
@@ -31,7 +31,7 @@ char *devname = NULL, *progname = NULL;
|
||||
static void usage(void)
|
||||
{
|
||||
fprintf(stderr, "%s version %d.%d, usage:\n", progname, MAJOR_VERSION, MINOR_VERSION);
|
||||
- fprintf(stderr, "%s \n", progname);
|
||||
+ fprintf(stderr, "%s [-c | --config-file <config_file>]\n", progname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
diff --git a/src/wd_keepalive.c b/src/wd_keepalive.c
|
||||
index 960036a..18e8698 100644
|
||||
--- a/src/wd_keepalive.c
|
||||
+++ b/src/wd_keepalive.c
|
||||
@@ -57,7 +57,7 @@ int mlocked = FALSE, realtime = FALSE;
|
||||
static void usage(void)
|
||||
{
|
||||
fprintf(stderr, "%s version %d.%d, usage:\n", progname, MAJOR_VERSION, MINOR_VERSION);
|
||||
- fprintf(stderr, "%s \n", progname);
|
||||
+ fprintf(stderr, "%s [-c | --config-file <config_file>]\n", progname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
--
|
||||
1.8.1.4
|
||||
|
@ -1,34 +1,34 @@
|
||||
diff -up watchdog-5.13/src/test_binary.c.rhsel watchdog-5.13/src/test_binary.c
|
||||
--- watchdog-5.13/src/test_binary.c.rhsel 2013-10-24 15:53:53.375647812 +0200
|
||||
+++ watchdog-5.13/src/test_binary.c 2013-10-24 15:54:05.201666469 +0200
|
||||
@@ -101,11 +101,11 @@ int check_bin(char *tbinary, time_t time
|
||||
* 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);
|
||||
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 -up watchdog-5.13/src/watchdog.c.rhsel watchdog-5.13/src/watchdog.c
|
||||
--- watchdog-5.13/src/watchdog.c.rhsel 2013-10-24 15:58:09.245051038 +0200
|
||||
+++ watchdog-5.13/src/watchdog.c 2013-10-24 15:58:15.958061605 +0200
|
||||
@@ -148,11 +148,11 @@ static int repair(char *rbinary, int res
|
||||
* 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 -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 */
|
||||
/* now start binary */
|
||||
|
@ -1,47 +1,47 @@
|
||||
diff -up ./watchdog.8.rhseldoc ./watchdog.8
|
||||
--- ./watchdog.8.rhseldoc 2013-02-01 12:15:44.000000000 +0100
|
||||
+++ ./watchdog.8 2013-11-07 14:57:52.460258672 +0100
|
||||
@@ -190,6 +190,7 @@ by
|
||||
.BR watchdog .
|
||||
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 @@
|
||||
.BR watchdog .
|
||||
So you can for instance restart the server from your
|
||||
.IR repair-binary .
|
||||
+See the Systemd section below for additinal information.
|
||||
.PP
|
||||
.B watchdog
|
||||
.B watchdog
|
||||
will try periodically to fork itself to see whether the process
|
||||
@@ -216,6 +217,8 @@ a given interface for traffic. If no tra
|
||||
considered unreachable causing a soft reboot or action from the
|
||||
@@ -241,6 +242,8 @@
|
||||
considered unreachable causing a soft reboot or action from the
|
||||
repair binary.
|
||||
.PP
|
||||
+To start the watchdog when network is available see the Systemd section below.
|
||||
+.PP
|
||||
.B watchdog can run an external command for user-defined tests. A return code
|
||||
not equal 0 means an error occured and watchdog should react. If the external
|
||||
command is killed by an uncaught signal this is considered an error by watchdog
|
||||
@@ -317,6 +320,9 @@ Child process did not return in time.
|
||||
.TP
|
||||
\-10
|
||||
Free for personal use.
|
||||
.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 @@
|
||||
246
|
||||
Free for personal watchdog-specific use (was \-10 as an unsigned 8\-bit
|
||||
number).
|
||||
+.PP
|
||||
+With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
|
||||
+for your test-binary configuration.
|
||||
.SH "REPAIR BINARY"
|
||||
The repair binary is started with one parameter: the error number that
|
||||
caused
|
||||
@@ -333,6 +339,9 @@ are using the real-time properties since
|
||||
.B watchdog
|
||||
will wait for
|
||||
the return of this binary before proceeding.
|
||||
.TP
|
||||
245
|
||||
Reserved for an unknown result, for example a slow background test that is
|
||||
@@ -377,6 +383,9 @@
|
||||
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.
|
||||
+.PP
|
||||
+With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
|
||||
+for your repair-binary configuration.
|
||||
.SH "TEST DIRECTORY"
|
||||
Executables placed in the test directory are discovered by watchdog on
|
||||
Executables placed in the test directory are discovered by watchdog on
|
||||
startup and are automatically executed. They are bounded time-wise by
|
||||
@@ -365,6 +374,27 @@ return a non-zero value so the machine w
|
||||
Note that the watchdog daemon may interpret and act upon any of the reserved
|
||||
return codes noted in the Check Binary section prior to calling a given
|
||||
command in "repair" mode.
|
||||
@@ -415,6 +424,27 @@
|
||||
repair-maximum
|
||||
also controls the number of successive repair attempts that report success
|
||||
(return 0) but fail to clear the fault.
|
||||
+.SH SYSTEMD
|
||||
+To start watchdog after the network is available:
|
||||
+.PP
|
||||
@ -66,62 +66,25 @@ diff -up ./watchdog.8.rhseldoc ./watchdog.8
|
||||
.SH BUGS
|
||||
None known so far.
|
||||
.SH AUTHORS
|
||||
@@ -383,4 +413,4 @@ The watchdog device.
|
||||
The pid file of the running
|
||||
@@ -433,4 +463,4 @@
|
||||
The pid file of the running
|
||||
.BR watchdog .
|
||||
.SH "SEE ALSO"
|
||||
-.BR watchdog.conf (5)
|
||||
+.BR watchdog.conf (5), systemd.unit (5)
|
||||
diff -up ./watchdog.conf.5.rhseldoc ./watchdog.conf.5
|
||||
--- ./watchdog.conf.5.rhseldoc 2013-02-01 12:15:44.000000000 +0100
|
||||
+++ ./watchdog.conf.5 2013-11-07 14:51:20.358128245 +0100
|
||||
@@ -84,6 +84,7 @@ no matter what.
|
||||
pidfile = <pidfilename>
|
||||
Set pidfile name for server test mode.
|
||||
This option can be given as often as you like to check several servers.
|
||||
+See the Systemd section in watchdog (8) for more information.
|
||||
.TP
|
||||
ping = <ip-addr>
|
||||
Set IP address for ping mode.
|
||||
@@ -97,6 +98,8 @@ interfaces.
|
||||
.TP
|
||||
test-binary = <testbin>
|
||||
Execute the given binary to do some user defined tests.
|
||||
+With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
|
||||
+for your test-binary configuration.
|
||||
.TP
|
||||
test-timeout = <timeout in seconds>
|
||||
User defined tests may only run for <timeout> seconds. Set to 0 for unlimited.
|
||||
@@ -104,6 +107,8 @@ User defined tests may only run for <tim
|
||||
repair-binary = <repbin>
|
||||
Execute the given binary in case of a problem instead of shutting down the
|
||||
system.
|
||||
+With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
|
||||
+for your repair-binary configuration.
|
||||
.TP
|
||||
repair-timeout = <timeout in seconds>
|
||||
repair command may only run for <timeout> seconds. Set to 0 for unlimited.
|
||||
@@ -122,6 +127,7 @@ Set the schedule priority for realtime m
|
||||
.TP
|
||||
test-directory = <test directory>
|
||||
Set the directory to run user test/repair scripts. Default is '/etc/watchdog.d'
|
||||
+The /etc/watchdog.d/ is recognized by SELinux policy.
|
||||
See the Test Directory section in watchdog(8) for more information.
|
||||
.TP
|
||||
log-dir = <log directory>
|
||||
diff -up ./watchdog.conf.rhseldoc ./watchdog.conf
|
||||
--- ./watchdog.conf.rhseldoc 2013-02-01 12:15:44.000000000 +0100
|
||||
+++ ./watchdog.conf 2013-11-07 14:47:49.955156208 +0100
|
||||
@@ -15,6 +15,8 @@
|
||||
# To get the real size, check how large the pagesize is on your machine.
|
||||
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
|
||||
|
||||
+# 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 =
|
||||
#test-binary =
|
||||
@@ -37,6 +39,13 @@
|
||||
#repair-timeout = 60
|
||||
#test-binary =
|
||||
@@ -45,5 +47,12 @@
|
||||
realtime = yes
|
||||
priority = 1
|
||||
|
||||
@ -133,5 +96,41 @@ diff -up ./watchdog.conf.rhseldoc ./watchdog.conf
|
||||
+# See man 5 systemd.unit for more details.
|
||||
+#
|
||||
# Check if rsyslogd is still running by enabling the following line
|
||||
#pidfile = /var/run/rsyslogd.pid
|
||||
|
||||
#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 = <pidfilename>
|
||||
Set pidfile name for server test mode.
|
||||
This option can be given as often as you like to check several servers.
|
||||
+See the Systemd section in watchdog (8) for more information.
|
||||
.TP
|
||||
ping = <ip-addr>
|
||||
Set IPv4 address for ping mode.
|
||||
@@ -119,6 +120,8 @@
|
||||
.TP
|
||||
test-binary = <testbin>
|
||||
Execute the given binary to do some user defined tests.
|
||||
+With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
|
||||
+for your test-binary configuration.
|
||||
.TP
|
||||
test-timeout = <timeout in seconds>
|
||||
User defined tests may only run for <timeout> seconds. Set to 0 for unlimited.
|
||||
@@ -126,6 +129,8 @@
|
||||
repair-binary = <repbin>
|
||||
Execute the given binary in case of a problem instead of shutting down the
|
||||
system.
|
||||
+With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
|
||||
+for your repair-binary configuration.
|
||||
.TP
|
||||
repair-timeout = <timeout in seconds>
|
||||
repair command may only run for <timeout> seconds. Set to 0 for 'unlimited', but
|
||||
@@ -156,6 +161,7 @@
|
||||
.TP
|
||||
test-directory = <test directory>
|
||||
Set the directory to run user test/repair scripts. Default is '/etc/watchdog.d'
|
||||
+The /etc/watchdog.d/ is recognized by SELinux policy.
|
||||
See the Test Directory section in watchdog(8) for more information.
|
||||
.TP
|
||||
log-dir = <log directory>
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
153455f008f1cf8f65f6ad9586a21ff1 watchdog-5.13.tar.gz
|
||||
SHA512 (watchdog-5.15.tar.gz) = a675cfadf3296d583b9163193297038fb19459daf7c6681289392d613e775e75b7afd42a3e01b136a955f25b2f45818033b56e10de9050075d7dc015535a6e75
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: Software and/or Hardware watchdog daemon
|
||||
Name: watchdog
|
||||
Version: 5.13
|
||||
Release: 19%{?dist}
|
||||
Version: 5.15
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+
|
||||
|
||||
URL: http://sourceforge.net/projects/watchdog/
|
||||
@ -12,10 +12,6 @@ Source3: README.Fedora
|
||||
Source4: watchdog.service
|
||||
Source5: watchdog-ping.service
|
||||
|
||||
# Documentation fixes (RHBZ#948883).
|
||||
# Sent upstream on 2013-05-16.
|
||||
Patch1: 0001-watchdog-Clearer-help-output.patch
|
||||
Patch2: 0002-wd_identify-wd_keepalive-Document-c-config-file-in-h.patch
|
||||
Patch3: 0003-watchdog-5.13-rhsel.patch
|
||||
Patch4: 0004-watchdog-5.13-rhseldoc.patch
|
||||
|
||||
@ -45,8 +41,6 @@ expiration) initiated by the BMC.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch1 -p1 -b .help
|
||||
%patch2 -p1 -b .keepalive
|
||||
%patch3 -p1 -b .rhsel
|
||||
%patch4 -p1 -b .rhseldoc
|
||||
|
||||
@ -121,6 +115,10 @@ install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Feb 13 2018 Richard W.M. Jones <rjones@redhat.com> - 5.15-1
|
||||
- Rebase to watchdog 5.15.
|
||||
- Remove upstream patches.
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.13-19
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user