Compare commits
No commits in common. "c8s" and "imports/c8-beta/watchdog-5.15-1.el8" have entirely different histories.
c8s
...
imports/c8
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1 @@
|
|||||||
/watchdog-5.15.tar.gz
|
SOURCES/watchdog-5.15.tar.gz
|
||||||
/watchdog-5.16.tar.gz
|
|
||||||
|
1
.watchdog.metadata
Normal file
1
.watchdog.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
92307c420bf900911e6bae0d022c293ba3092adc SOURCES/watchdog-5.15.tar.gz
|
@ -1,43 +0,0 @@
|
|||||||
From 80468a84ea3044a5227c57a258dc6e508c88d468 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
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 <rjones@redhat.com>
|
|
||||||
---
|
|
||||||
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 <rpc/rpc.h> 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 <rpc/types.h>])
|
|
||||||
+
|
|
||||||
+ 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
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
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++;
|
|
34
SOURCES/0003-watchdog-5.13-rhsel.patch
Normal file
34
SOURCES/0003-watchdog-5.13-rhsel.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
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 */
|
@ -1,8 +1,7 @@
|
|||||||
diff --git a/watchdog.8 b/watchdog.8
|
diff -ur watchdog-5.15.old/watchdog.8 watchdog-5.15/watchdog.8
|
||||||
index 9b7c6e7..052b1e1 100644
|
--- watchdog-5.15.old/watchdog.8 2016-02-26 12:05:00.000000000 +0000
|
||||||
--- a/watchdog.8
|
+++ watchdog-5.15/watchdog.8 2018-02-13 08:54:00.860681339 +0000
|
||||||
+++ b/watchdog.8
|
@@ -215,6 +215,7 @@
|
||||||
@@ -216,6 +216,7 @@ by
|
|
||||||
.BR watchdog .
|
.BR watchdog .
|
||||||
So you can for instance restart the server from your
|
So you can for instance restart the server from your
|
||||||
.IR repair-binary .
|
.IR repair-binary .
|
||||||
@ -10,7 +9,7 @@ index 9b7c6e7..052b1e1 100644
|
|||||||
.PP
|
.PP
|
||||||
.B watchdog
|
.B watchdog
|
||||||
will try periodically to fork itself to see whether the process
|
will try periodically to fork itself to see whether the process
|
||||||
@@ -242,6 +243,8 @@ a given interface for traffic. If no traffic arrives the network is
|
@@ -241,6 +242,8 @@
|
||||||
considered unreachable causing a soft reboot or action from the
|
considered unreachable causing a soft reboot or action from the
|
||||||
repair binary.
|
repair binary.
|
||||||
.PP
|
.PP
|
||||||
@ -19,7 +18,7 @@ index 9b7c6e7..052b1e1 100644
|
|||||||
.B watchdog
|
.B watchdog
|
||||||
can run an external command for user-defined tests. A return code not equal 0
|
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
|
means an error occurred and watchdog should react. If the external command is
|
||||||
@@ -348,6 +351,9 @@ Child process did not return in time.
|
@@ -350,6 +353,9 @@
|
||||||
246
|
246
|
||||||
Free for personal watchdog-specific use (was \-10 as an unsigned 8\-bit
|
Free for personal watchdog-specific use (was \-10 as an unsigned 8\-bit
|
||||||
number).
|
number).
|
||||||
@ -29,7 +28,7 @@ index 9b7c6e7..052b1e1 100644
|
|||||||
.TP
|
.TP
|
||||||
245
|
245
|
||||||
Reserved for an unknown result, for example a slow background test that is
|
Reserved for an unknown result, for example a slow background test that is
|
||||||
@@ -375,6 +381,9 @@ repair-maximum
|
@@ -377,6 +383,9 @@
|
||||||
controls the number of successive repair attempts that report 0 (i.e. success) but
|
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
|
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.
|
to zero then a reboot can always be blocked by the repair program reporting success.
|
||||||
@ -39,7 +38,7 @@ index 9b7c6e7..052b1e1 100644
|
|||||||
.SH "TEST DIRECTORY"
|
.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
|
startup and are automatically executed. They are bounded time-wise by
|
||||||
@@ -413,6 +422,27 @@ As for the repair binary, the configuration parameter
|
@@ -415,6 +424,27 @@
|
||||||
repair-maximum
|
repair-maximum
|
||||||
also controls the number of successive repair attempts that report success
|
also controls the number of successive repair attempts that report success
|
||||||
(return 0) but fail to clear the fault.
|
(return 0) but fail to clear the fault.
|
||||||
@ -67,34 +66,49 @@ index 9b7c6e7..052b1e1 100644
|
|||||||
.SH BUGS
|
.SH BUGS
|
||||||
None known so far.
|
None known so far.
|
||||||
.SH AUTHORS
|
.SH AUTHORS
|
||||||
@@ -431,4 +461,4 @@ The watchdog device.
|
@@ -433,4 +463,4 @@
|
||||||
The pid file of the running
|
The pid file of the running
|
||||||
.BR watchdog .
|
.BR watchdog .
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
-.BR watchdog.conf (5)
|
-.BR watchdog.conf (5)
|
||||||
+.BR watchdog.conf (5), systemd.unit (5)
|
+.BR watchdog.conf (5), systemd.unit (5)
|
||||||
diff --git a/watchdog.conf.5 b/watchdog.conf.5
|
diff -ur watchdog-5.15.old/watchdog.conf watchdog-5.15/watchdog.conf
|
||||||
index edf7c8b..2803fee 100644
|
--- watchdog-5.15.old/watchdog.conf 2016-02-26 12:05:00.000000000 +0000
|
||||||
--- a/watchdog.conf.5
|
+++ watchdog-5.15/watchdog.conf 2018-02-13 08:52:18.899721271 +0000
|
||||||
+++ b/watchdog.conf.5
|
@@ -16,6 +16,8 @@
|
||||||
@@ -47,7 +47,7 @@ Be careful not to this parameter too low. To set a value less then the
|
#min-memory = 1
|
||||||
predefined minimal value of 2, you have to use the \-f command line option.
|
#allocatable-memory = 1
|
||||||
.TP
|
|
||||||
min-memory = <minpage>
|
+# With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/
|
||||||
-Set the minimal amount of memory that has to stay free. Note that
|
+# or /etc/watchdog.d/ for your test-binary and repair-binary configuration.
|
||||||
+Set the minimal amount of virtual memory that has to stay free. Note that
|
#repair-binary = /usr/sbin/repair
|
||||||
this is in memory pages (4kB on x86). Default value is 0 pages which means
|
#repair-timeout = 60
|
||||||
this test is disabled. The page size is taken from the system include files.
|
#test-binary =
|
||||||
The usable memory is computed from MemFree + Buffers + Cached since buffer
|
@@ -45,5 +47,12 @@
|
||||||
@@ -130,6 +130,7 @@ pidfile = <pidfilename>
|
realtime = yes
|
||||||
Set pidfile name for daemon test mode.
|
priority = 1
|
||||||
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.
|
+# When using custom service pid check with custom service
|
||||||
|
+# systemd unit file please be aware the "Requires="
|
||||||
|
+# does dependent service deactivation.
|
||||||
|
+# Using "Before=watchdog.service" or "Before=watchdog-ping.service"
|
||||||
|
+# 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 = <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.
|
+See the Systemd section in watchdog (8) for more information.
|
||||||
.TP
|
.TP
|
||||||
ping = <ip-addr>
|
ping = <ip-addr>
|
||||||
Set IPv4 address for ping mode.
|
Set IPv4 address for ping mode.
|
||||||
@@ -147,6 +148,8 @@ aliased IP interfaces.
|
@@ -119,6 +120,8 @@
|
||||||
.TP
|
.TP
|
||||||
test-binary = <testbin>
|
test-binary = <testbin>
|
||||||
Execute the given binary to do some user defined tests.
|
Execute the given binary to do some user defined tests.
|
||||||
@ -103,7 +117,7 @@ index edf7c8b..2803fee 100644
|
|||||||
.TP
|
.TP
|
||||||
test-timeout = <timeout in seconds>
|
test-timeout = <timeout in seconds>
|
||||||
User defined tests may only run for <timeout> seconds. Set to 0 for unlimited.
|
User defined tests may only run for <timeout> seconds. Set to 0 for unlimited.
|
||||||
@@ -154,6 +157,8 @@ User defined tests may only run for <timeout> seconds. Set to 0 for unlimited.
|
@@ -126,6 +129,8 @@
|
||||||
repair-binary = <repbin>
|
repair-binary = <repbin>
|
||||||
Execute the given binary in case of a problem instead of shutting down the
|
Execute the given binary in case of a problem instead of shutting down the
|
||||||
system.
|
system.
|
||||||
@ -112,7 +126,7 @@ index edf7c8b..2803fee 100644
|
|||||||
.TP
|
.TP
|
||||||
repair-timeout = <timeout in seconds>
|
repair-timeout = <timeout in seconds>
|
||||||
repair command may only run for <timeout> seconds. Set to 0 for 'unlimited', but
|
repair command may only run for <timeout> seconds. Set to 0 for 'unlimited', but
|
||||||
@@ -188,6 +193,7 @@ Set the schedule priority for realtime mode passed to sched_setscheduler().
|
@@ -156,6 +161,7 @@
|
||||||
.TP
|
.TP
|
||||||
test-directory = <test directory>
|
test-directory = <test directory>
|
||||||
Set the directory to run user test/repair scripts. Default is '/etc/watchdog.d'
|
Set the directory to run user test/repair scripts. Default is '/etc/watchdog.d'
|
||||||
@ -120,28 +134,3 @@ index edf7c8b..2803fee 100644
|
|||||||
See the Test Directory section in watchdog(8) for more information.
|
See the Test Directory section in watchdog(8) for more information.
|
||||||
.TP
|
.TP
|
||||||
log-dir = <log directory>
|
log-dir = <log directory>
|
||||||
@@ -202,23 +208,7 @@ large databases or virtual machines might need longer.
|
|
||||||
verbose = <level>
|
|
||||||
This overrides the command line \-\-verbose option. Generally the verbose mode is
|
|
||||||
only enabled for debugging as it creates a lot of syslog chatter, so use this option
|
|
||||||
-with consideration. Zero is "normal" operation (quiet), while 1 is typically used
|
|
||||||
-for debugging. Values of 2 or more usually generate far too many messages.
|
|
||||||
-.TP
|
|
||||||
-heartbeat-file = <filename>
|
|
||||||
-For debugging this allows a rolling set of status values to be kept on disk
|
|
||||||
-.TP
|
|
||||||
-heartbeat-stamps = <interval>
|
|
||||||
-For debugging this sets the number of entries in the <heartbeat-file>
|
|
||||||
-.TP
|
|
||||||
-log-killed-pids = <yes|no>
|
|
||||||
-This acts like enabling 'verbose' logging, but only for a system reboot, where it
|
|
||||||
-enables the logging of the PID values for all processes that are being killed. The
|
|
||||||
-results are written to the killall5.log file in the log directory (if at all
|
|
||||||
-possible) in this case.
|
|
||||||
-Intended for debugging cases where you would like to know what was running at the
|
|
||||||
-point the machine triggered the watchdog, but don't want syslog filling up with the
|
|
||||||
-usual chatter of activity.
|
|
||||||
+with consideration.
|
|
||||||
.SH FILES
|
|
||||||
.TP
|
|
||||||
.I /etc/watchdog.conf
|
|
@ -6,6 +6,7 @@ Conflicts=watchdog.service
|
|||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
ExecStart=/usr/sbin/watchdog
|
ExecStart=/usr/sbin/watchdog
|
||||||
|
ControlGroup=cpu:/
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
@ -6,6 +6,7 @@ Description=watchdog daemon
|
|||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
ExecStart=/usr/sbin/watchdog
|
ExecStart=/usr/sbin/watchdog
|
||||||
|
ControlGroup=cpu:/
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
@ -1,6 +1,6 @@
|
|||||||
Summary: Software and/or Hardware watchdog daemon
|
Summary: Software and/or Hardware watchdog daemon
|
||||||
Name: watchdog
|
Name: watchdog
|
||||||
Version: 5.16
|
Version: 5.15
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
|
|
||||||
@ -12,8 +12,7 @@ Source3: README.Fedora
|
|||||||
Source4: watchdog.service
|
Source4: watchdog.service
|
||||||
Source5: watchdog-ping.service
|
Source5: watchdog-ping.service
|
||||||
|
|
||||||
Patch1: 0001-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch
|
Patch3: 0003-watchdog-5.13-rhsel.patch
|
||||||
Patch2: 0002-mem-leak-verbose.patch
|
|
||||||
Patch4: 0004-watchdog-5.13-rhseldoc.patch
|
Patch4: 0004-watchdog-5.13-rhseldoc.patch
|
||||||
|
|
||||||
BuildRequires: libtirpc-devel
|
BuildRequires: libtirpc-devel
|
||||||
@ -43,8 +42,7 @@ expiration) initiated by the BMC.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
%patch1 -p1 -b .xdr-header
|
%patch3 -p1 -b .rhsel
|
||||||
%patch2 -p1 -b .verbose
|
|
||||||
%patch4 -p1 -b .rhseldoc
|
%patch4 -p1 -b .rhseldoc
|
||||||
|
|
||||||
cp %{SOURCE2} .
|
cp %{SOURCE2} .
|
||||||
@ -120,12 +118,6 @@ install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Feb 23 2023 Josef Ridky <jridky@redhat.com> - 5.16-1
|
|
||||||
- Rebase to version 5.16 (#2149701)
|
|
||||||
|
|
||||||
* Wed Apr 21 2021 Than Ngo <than@redhat.com> - 5.15-2
|
|
||||||
- Resolves: #1846110 - remove deprecated stanza in unit files
|
|
||||||
|
|
||||||
* Tue Feb 13 2018 Richard W.M. Jones <rjones@redhat.com> - 5.15-1
|
* Tue Feb 13 2018 Richard W.M. Jones <rjones@redhat.com> - 5.15-1
|
||||||
- Rebase to watchdog 5.15.
|
- Rebase to watchdog 5.15.
|
||||||
- Remove upstream patches.
|
- Remove upstream patches.
|
@ -1,6 +0,0 @@
|
|||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-8
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
|
Loading…
Reference in New Issue
Block a user