Compare commits
	
		
			No commits in common. "c8s" and "c9-beta" have entirely different histories.
		
	
	
		
	
		
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,2 +1 @@ | |||||||
| /watchdog-5.15.tar.gz | SOURCES/watchdog-5.16.tar.gz | ||||||
| /watchdog-5.16.tar.gz |  | ||||||
|  | |||||||
							
								
								
									
										1
									
								
								.watchdog.metadata
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.watchdog.metadata
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | 22eb80e1d29ba5b8c98d644d8358e2cf6535bcf1 SOURCES/watchdog-5.16.tar.gz | ||||||
| @ -73,19 +73,39 @@ index 9b7c6e7..052b1e1 100644 | |||||||
|  .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 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 | ||||||
|  |   | ||||||
|  | @@ -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="
 | ||||||
|  | +# 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 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
 | diff --git a/watchdog.conf.5 b/watchdog.conf.5
 | ||||||
| index edf7c8b..2803fee 100644
 | index edf7c8b..72c3bc2 100644
 | ||||||
| --- a/watchdog.conf.5
 | --- a/watchdog.conf.5
 | ||||||
| +++ b/watchdog.conf.5
 | +++ b/watchdog.conf.5
 | ||||||
| @@ -47,7 +47,7 @@ Be careful not to this parameter too low. To set a value less then the
 |  | ||||||
|  predefined minimal value of 2, you have to use the \-f command line option. |  | ||||||
|  .TP |  | ||||||
|  min-memory = <minpage> |  | ||||||
| -Set the minimal amount of memory that has to stay free. Note that
 |  | ||||||
| +Set the minimal amount of virtual memory that has to stay free. Note that
 |  | ||||||
|  this is in memory pages (4kB on x86). Default value is 0 pages which means |  | ||||||
|  this test is disabled. The page size is taken from the system include files. |  | ||||||
|  The usable memory is computed from MemFree + Buffers + Cached since buffer |  | ||||||
| @@ -130,6 +130,7 @@ pidfile = <pidfilename>
 | @@ -130,6 +130,7 @@ pidfile = <pidfilename>
 | ||||||
|  Set pidfile name for daemon test mode. |  Set pidfile name for daemon test mode. | ||||||
|  This option can be given as often as you like to check several daemons, assuming |  This option can be given as often as you like to check several daemons, assuming | ||||||
| @ -120,28 +140,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 |  | ||||||
| @ -1,23 +1,30 @@ | |||||||
| Summary:          Software and/or Hardware watchdog daemon | Summary:          Software and/or Hardware watchdog daemon | ||||||
| Name:             watchdog | Name:             watchdog | ||||||
| Version:          5.16 | Version:          5.16 | ||||||
| Release:          1%{?dist} | Release:          2%{?dist} | ||||||
| License:          GPLv2+ | License:          GPLv2+ | ||||||
| 
 | 
 | ||||||
| URL:              http://sourceforge.net/projects/watchdog/ | URL:              http://sourceforge.net/projects/watchdog/ | ||||||
| Source0:          http://downloads.sourceforge.net/watchdog/watchdog-%{version}.tar.gz | Source0:          http://downloads.sourceforge.net/watchdog/watchdog-%{version}.tar.gz | ||||||
| Source1:          watchdog.init |  | ||||||
| Source2:          README.watchdog.ipmi | Source2:          README.watchdog.ipmi | ||||||
| Source3:          README.Fedora | Source3:          README.Fedora | ||||||
| Source4:          watchdog.service | Source4:          watchdog.service | ||||||
| Source5:          watchdog-ping.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 | Patch2:           0002-mem-leak-verbose.patch | ||||||
| Patch4:           0004-watchdog-5.13-rhseldoc.patch |  | ||||||
| 
 | 
 | ||||||
|  | # Non-upstream patch to document SELinux support. | ||||||
|  | Patch99:          0099-watchdog-5.16-rhseldoc.patch | ||||||
|  | 
 | ||||||
|  | BuildRequires: make | ||||||
|  | BuildRequires:    gcc | ||||||
| BuildRequires:    libtirpc-devel | BuildRequires:    libtirpc-devel | ||||||
| BuildRequires:    systemd-units | BuildRequires:    systemd-units | ||||||
|  | # Required because patches touch configure.ac and Makefile.am: | ||||||
|  | BuildRequires:    autoconf, automake | ||||||
| 
 | 
 | ||||||
| Requires(post): systemd | Requires(post): systemd | ||||||
| Requires(preun): systemd | Requires(preun): systemd | ||||||
| @ -30,7 +37,7 @@ or may be alternately used with a hardware watchdog device such as the | |||||||
| IPMI hardware watchdog driver interface to a resident Baseboard  | IPMI hardware watchdog driver interface to a resident Baseboard  | ||||||
| Management Controller (BMC).  watchdog periodically writes to /dev/watchdog;  | Management Controller (BMC).  watchdog periodically writes to /dev/watchdog;  | ||||||
| the interval between writes to /dev/watchdog is configurable through settings  | 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  | 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  | software watchdog operation.  In either case, if the device is open but not  | ||||||
| written to within the configured time period, the watchdog timer expiration  | written to within the configured time period, the watchdog timer expiration  | ||||||
| @ -43,9 +50,10 @@ expiration) initiated by the BMC. | |||||||
|   |   | ||||||
| %prep | %prep | ||||||
| %setup -q -n %{name}-%{version} | %setup -q -n %{name}-%{version} | ||||||
| %patch1 -p1 -b .xdr-header | %patch1 -p1 | ||||||
| %patch2 -p1 -b .verbose | %patch2 -p1 | ||||||
| %patch4 -p1 -b .rhseldoc | %patch99 -p1 -b .rhseldoc | ||||||
|  | autoreconf -i | ||||||
| 
 | 
 | ||||||
| cp %{SOURCE2} . | cp %{SOURCE2} . | ||||||
| cp %{SOURCE3} . | cp %{SOURCE3} . | ||||||
| @ -68,10 +76,10 @@ make %{?_smp_mflags} | |||||||
| install -d -m0755 ${RPM_BUILD_ROOT}%{_sysconfdir} | install -d -m0755 ${RPM_BUILD_ROOT}%{_sysconfdir} | ||||||
| install -d -m0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/watchdog.d | install -d -m0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/watchdog.d | ||||||
| make DESTDIR=${RPM_BUILD_ROOT} install | 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 %{SOURCE4} ${RPM_BUILD_ROOT}%{_unitdir}/watchdog.service | ||||||
| install -Dp -m0644 %{SOURCE5} ${RPM_BUILD_ROOT}%{_unitdir}/watchdog-ping.service | install -Dp -m0644 %{SOURCE5} ${RPM_BUILD_ROOT}%{_unitdir}/watchdog-ping.service | ||||||
| install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts | install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts | ||||||
|  | rm %{name}.sysconfig | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %post | %post | ||||||
| @ -105,7 +113,6 @@ install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts | |||||||
| %doc README.Fedora | %doc README.Fedora | ||||||
| %endif | %endif | ||||||
| %config(noreplace) %{_sysconfdir}/watchdog.conf | %config(noreplace) %{_sysconfdir}/watchdog.conf | ||||||
| %config(noreplace) %{_sysconfdir}/sysconfig/watchdog |  | ||||||
| %{_sysconfdir}/watchdog.d | %{_sysconfdir}/watchdog.d | ||||||
| %{_sbindir}/watchdog | %{_sbindir}/watchdog | ||||||
| %{_sbindir}/wd_identify | %{_sbindir}/wd_identify | ||||||
| @ -120,11 +127,53 @@ install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
| * Thu Feb 23 2023 Josef Ridky <jridky@redhat.com> - 5.16-1 | * Thu Oct 14 2021 Josef Ridky <jridky@redhat.com> - 5.16-2 | ||||||
| - Rebase to version 5.16 (#2149701) | - fix memory leak when verbose mode is on (#1997755) | ||||||
| 
 | 
 | ||||||
| * Wed Apr 21 2021 Than Ngo <than@redhat.com> - 5.15-2 | * Tue Aug 10 2021 Josef Ridky <jridky@redhat.com> - 5.16-1 | ||||||
| - Resolves: #1846110 - remove deprecated stanza in unit files | - New upstream release 5.16 | ||||||
|  | 
 | ||||||
|  | * Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 5.15-13 | ||||||
|  | - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags | ||||||
|  |   Related: rhbz#1991688 | ||||||
|  | 
 | ||||||
|  | * Mon Aug 09 2021 Josef Ridky <jridky@redhat.com> - 5.15-12 | ||||||
|  | - bump for gating.yaml file | ||||||
|  | 
 | ||||||
|  | * Mon Aug 09 2021 Josef Ridky <jridky@redhat.com> - 5.15-11 | ||||||
|  | - Rebuild for import to RHEL9 (#1978263) | ||||||
|  | 
 | ||||||
|  | * Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 5.15-10 | ||||||
|  | - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 | ||||||
|  | 
 | ||||||
|  | * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.15-9 | ||||||
|  | - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild | ||||||
|  | 
 | ||||||
|  | * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.15-8 | ||||||
|  | - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild | ||||||
|  | 
 | ||||||
|  | * Mon Feb 03 2020 Václav Doležal <vdolezal@redhat.com> - 5.15-7 | ||||||
|  | - Clean up old SysV-init related files | ||||||
|  | 
 | ||||||
|  | * Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.15-6 | ||||||
|  | - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild | ||||||
|  | 
 | ||||||
|  | * Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.15-5 | ||||||
|  | - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild | ||||||
|  | 
 | ||||||
|  | * Wed Feb 06 2019 Richard W.M. Jones <rjones@redhat.com> - 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 <releng@fedoraproject.org> - 5.15-4 | ||||||
|  | - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild | ||||||
|  | 
 | ||||||
|  | * Mon Dec 03 2018 Josef Ridky <jridky@redhat.com> - 5.15-3 | ||||||
|  | - update service files (#1542632) | ||||||
|  | 
 | ||||||
|  | * Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.15-2 | ||||||
|  | - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild | ||||||
| 
 | 
 | ||||||
| * 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. | ||||||
| @ -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} |  | ||||||
							
								
								
									
										1
									
								
								sources
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								sources
									
									
									
									
									
								
							| @ -1 +0,0 @@ | |||||||
| SHA512 (watchdog-5.16.tar.gz) = 1c9c921570ec7ddc3e4ff88b2029f1c3865277e547fb8970575df4b61fdf1f06f443f49ad09f11c29d913ca7d6ab05c5b19ec049ac218a8bcebd20b1bf5f0bbd |  | ||||||
| @ -1,91 +0,0 @@ | |||||||
| #! /bin/sh |  | ||||||
| # |  | ||||||
| # watchdog - a watchdog daemon |  | ||||||
| # |  | ||||||
| # chkconfig: - 27 46 |  | ||||||
| # description: A watchdog daemon |  | ||||||
| # |  | ||||||
| # rc file author: Marc Merlin <marcsoft@merlins.org> |  | ||||||
| #                 Henning P. Schmiedehausen <hps@tanstaafl.de> |  | ||||||
| #                 Richard W.M. Jones <rjones@redhat.com> |  | ||||||
| 
 |  | ||||||
| # Source function library. |  | ||||||
| . /etc/rc.d/init.d/functions |  | ||||||
| 
 |  | ||||||
| [ -x /usr/sbin/watchdog -a -e /etc/watchdog.conf ] || exit 0 |  | ||||||
| 
 |  | ||||||
| VERBOSE="no" |  | ||||||
| if [ -f /etc/sysconfig/watchdog ]; then |  | ||||||
|     . /etc/sysconfig/watchdog |  | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| RETVAL=0 |  | ||||||
| prog=watchdog |  | ||||||
| pidfile=/var/run/watchdog.pid |  | ||||||
| lockfile=/var/lock/subsys/watchdog |  | ||||||
| 
 |  | ||||||
| start() { |  | ||||||
| 
 |  | ||||||
| 	echo -n $"Starting $prog: " |  | ||||||
| 	if [ -n "$(pidofproc $prog)" ]; then |  | ||||||
| 		echo -n $"$prog: already running" |  | ||||||
| 		echo_failure |  | ||||||
| 		echo |  | ||||||
| 		return 1 |  | ||||||
| 	fi |  | ||||||
| 	if [ "$VERBOSE" = "yes" ]; then |  | ||||||
| 	    daemon /usr/sbin/${prog} -v |  | ||||||
| 	else |  | ||||||
| 	    daemon /usr/sbin/${prog} |  | ||||||
|         fi |  | ||||||
| 	RETVAL=$? |  | ||||||
| 	echo |  | ||||||
| 	[ $RETVAL -eq 0 ] && touch $lockfile |  | ||||||
| 	[ $RETVAL -eq 0 ] && echo_success |  | ||||||
| 	[ $RETVAL -ne 0 ] && echo_failure |  | ||||||
| 	return $RETVAL |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| stop() { |  | ||||||
| 	echo -n "Stopping $prog: " |  | ||||||
| 	# We are forcing it to _only_ use -TERM as killproc could use |  | ||||||
| 	# -KILL which would result in BMC timer not being set properly  |  | ||||||
| 	# and reboot the box. |  | ||||||
| 	killproc $prog -TERM |  | ||||||
| 	RETVAL=$? |  | ||||||
| 	echo |  | ||||||
| 	[ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile |  | ||||||
| 	return $RETVAL |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| restart() { |  | ||||||
|   	stop |  | ||||||
| 	sleep 6 |  | ||||||
| 	start |  | ||||||
| }	 |  | ||||||
| 
 |  | ||||||
| case "$1" in |  | ||||||
|   start) |  | ||||||
|   	start |  | ||||||
| 	;; |  | ||||||
|   stop) |  | ||||||
|   	stop |  | ||||||
| 	;; |  | ||||||
|   reload|restart) |  | ||||||
|   	restart |  | ||||||
| 	;; |  | ||||||
|   condrestart) |  | ||||||
|     if [ -f $lockfile ]; then |  | ||||||
| 	restart |  | ||||||
|     fi |  | ||||||
|     ;; |  | ||||||
|   status) |  | ||||||
| 	status $prog |  | ||||||
| 	RETVAL=$? |  | ||||||
| 	;; |  | ||||||
|   *) |  | ||||||
| 	echo $"Usage: $0 {start|stop|restart|status|condrestart}" |  | ||||||
| 	exit 1 |  | ||||||
| esac |  | ||||||
| 
 |  | ||||||
| exit $RETVAL |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user