Blame SPECS/watchdog.spec

e8fa8b
Summary:          Software and/or Hardware watchdog daemon
e8fa8b
Name:             watchdog
e8fa8b
Version:          5.16
e8fa8b
Release:          2%{?dist}
e8fa8b
License:          GPLv2+
e8fa8b
e8fa8b
URL:              http://sourceforge.net/projects/watchdog/
e8fa8b
Source0:          http://downloads.sourceforge.net/watchdog/watchdog-%{version}.tar.gz
e8fa8b
Source2:          README.watchdog.ipmi
e8fa8b
Source3:          README.Fedora
e8fa8b
Source4:          watchdog.service
e8fa8b
Source5:          watchdog-ping.service
e8fa8b
e8fa8b
# Fixes building on glibc without RPC.  Sent upstream 2019-02-06.
e8fa8b
Patch1:           0001-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch
e8fa8b
# Fixes potentional mem leak
e8fa8b
Patch2:           0002-mem-leak-verbose.patch
e8fa8b
e8fa8b
# Non-upstream patch to document SELinux support.
e8fa8b
Patch99:          0099-watchdog-5.16-rhseldoc.patch
e8fa8b
e8fa8b
BuildRequires: make
e8fa8b
BuildRequires:    gcc
e8fa8b
BuildRequires:    libtirpc-devel
e8fa8b
BuildRequires:    systemd-units
e8fa8b
# Required because patches touch configure.ac and Makefile.am:
e8fa8b
BuildRequires:    autoconf, automake
e8fa8b
e8fa8b
Requires(post): systemd
e8fa8b
Requires(preun): systemd
e8fa8b
Requires(postun): systemd
e8fa8b
e8fa8b
e8fa8b
%description
e8fa8b
The watchdog program can be used as a powerful software watchdog daemon 
e8fa8b
or may be alternately used with a hardware watchdog device such as the 
e8fa8b
IPMI hardware watchdog driver interface to a resident Baseboard 
e8fa8b
Management Controller (BMC).  watchdog periodically writes to /dev/watchdog; 
e8fa8b
the interval between writes to /dev/watchdog is configurable through settings 
e8fa8b
in the watchdog config file.  This configuration file is also used to 
e8fa8b
set the watchdog to be used as a hardware watchdog instead of its default 
e8fa8b
software watchdog operation.  In either case, if the device is open but not 
e8fa8b
written to within the configured time period, the watchdog timer expiration 
e8fa8b
will trigger a machine reboot. When operating as a software watchdog, the 
e8fa8b
ability to reboot will depend on the state of the machine and interrupts.  
e8fa8b
When operating as a hardware watchdog, the machine will experience a hard 
e8fa8b
reset (or whatever action was configured to be taken upon watchdog timer 
e8fa8b
expiration) initiated by the BMC.
e8fa8b
e8fa8b
 
e8fa8b
%prep
e8fa8b
%setup -q -n %{name}-%{version}
e8fa8b
%patch1 -p1
e8fa8b
%patch2 -p1
e8fa8b
%patch99 -p1 -b .rhseldoc
e8fa8b
autoreconf -i
e8fa8b
e8fa8b
cp %{SOURCE2} .
e8fa8b
cp %{SOURCE3} .
e8fa8b
%if 0%{?rhel}
e8fa8b
mv README.Fedora README.RHEL
e8fa8b
%endif
e8fa8b
e8fa8b
mv README README.orig
e8fa8b
iconv -f ISO-8859-1 -t UTF-8 < README.orig > README
e8fa8b
e8fa8b
e8fa8b
%build
e8fa8b
%configure \
e8fa8b
    CFLAGS="%{__global_cflags} -I/usr/include/tirpc" \
e8fa8b
    LDFLAGS="%{__global_ldflags} -ltirpc"
e8fa8b
make %{?_smp_mflags}
e8fa8b
e8fa8b
e8fa8b
%install
e8fa8b
install -d -m0755 ${RPM_BUILD_ROOT}%{_sysconfdir}
e8fa8b
install -d -m0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/watchdog.d
e8fa8b
make DESTDIR=${RPM_BUILD_ROOT} install
e8fa8b
install -Dp -m0644 %{SOURCE4} ${RPM_BUILD_ROOT}%{_unitdir}/watchdog.service
e8fa8b
install -Dp -m0644 %{SOURCE5} ${RPM_BUILD_ROOT}%{_unitdir}/watchdog-ping.service
e8fa8b
install -Dd -m0755 ${RPM_BUILD_ROOT}%{_libexecdir}/watchdog/scripts
e8fa8b
rm %{name}.sysconfig
e8fa8b
e8fa8b
e8fa8b
%post
e8fa8b
%systemd_post watchdog.service
e8fa8b
e8fa8b
%preun 
e8fa8b
%systemd_preun watchdog.service
e8fa8b
%systemd_preun watchdog.ping.service
e8fa8b
e8fa8b
%postun 
e8fa8b
%systemd_postun_with_restart watchdog.service
e8fa8b
%systemd_postun_with_restart watchdog.ping.service
e8fa8b
e8fa8b
%triggerun -- watchdog < 5.9-4
e8fa8b
# Save the current service runlevel info
e8fa8b
# User must manually run systemd-sysv-convert --apply watchdog
e8fa8b
# to migrate them to systemd targets
e8fa8b
/usr/bin/systemd-sysv-convert --save watchdog >/dev/null 2>&1 ||:
e8fa8b
e8fa8b
# Run these because the SysV package being removed won't do them
e8fa8b
/sbin/chkconfig --del watchdog >/dev/null 2>&1 || :
e8fa8b
/bin/systemctl try-restart watchdog.service >/dev/null 2>&1 || :
e8fa8b
/bin/systemctl try-restart watchdog-ping.service >/dev/null 2>&1 || :
e8fa8b
e8fa8b
e8fa8b
%files
e8fa8b
%doc AUTHORS ChangeLog COPYING examples/ IAFA-PACKAGE NEWS README TODO README.watchdog.ipmi
e8fa8b
%if 0%{?rhel}
e8fa8b
%doc README.RHEL
e8fa8b
%else
e8fa8b
%doc README.Fedora
e8fa8b
%endif
e8fa8b
%config(noreplace) %{_sysconfdir}/watchdog.conf
e8fa8b
%{_sysconfdir}/watchdog.d
e8fa8b
%{_sbindir}/watchdog
e8fa8b
%{_sbindir}/wd_identify
e8fa8b
%{_sbindir}/wd_keepalive
e8fa8b
%{_mandir}/man5/watchdog.conf.5*
e8fa8b
%{_mandir}/man8/watchdog.8*
e8fa8b
%{_mandir}/man8/wd_identify.8*
e8fa8b
%{_mandir}/man8/wd_keepalive.8*
e8fa8b
%{_unitdir}/watchdog.service
e8fa8b
%{_unitdir}/watchdog-ping.service
e8fa8b
%{_libexecdir}/watchdog/scripts
e8fa8b
e8fa8b
e8fa8b
%changelog
e8fa8b
* Thu Oct 14 2021 Josef Ridky <jridky@redhat.com> - 5.16-2
e8fa8b
- fix memory leak when verbose mode is on (#1997755)
e8fa8b
e8fa8b
* Tue Aug 10 2021 Josef Ridky <jridky@redhat.com> - 5.16-1
e8fa8b
- New upstream release 5.16
e8fa8b
e8fa8b
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 5.15-13
e8fa8b
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
e8fa8b
  Related: rhbz#1991688
e8fa8b
e8fa8b
* Mon Aug 09 2021 Josef Ridky <jridky@redhat.com> - 5.15-12
e8fa8b
- bump for gating.yaml file
e8fa8b
e8fa8b
* Mon Aug 09 2021 Josef Ridky <jridky@redhat.com> - 5.15-11
e8fa8b
- Rebuild for import to RHEL9 (#1978263)
e8fa8b
e8fa8b
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 5.15-10
e8fa8b
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
e8fa8b
e8fa8b
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.15-9
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
e8fa8b
e8fa8b
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.15-8
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
e8fa8b
e8fa8b
* Mon Feb 03 2020 Václav Doležal <vdolezal@redhat.com> - 5.15-7
e8fa8b
- Clean up old SysV-init related files
e8fa8b
e8fa8b
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.15-6
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
e8fa8b
e8fa8b
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.15-5
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
e8fa8b
e8fa8b
* Wed Feb 06 2019 Richard W.M. Jones <rjones@redhat.com> - 5.15-5
e8fa8b
- Add all upstream patches since 5.15.
e8fa8b
- Fix RPC/libtirpc (again?).
e8fa8b
- Remove .rhsel patch.  Equivalent added upstream in 7310afccc1.
e8fa8b
e8fa8b
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.15-4
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
e8fa8b
e8fa8b
* Mon Dec 03 2018 Josef Ridky <jridky@redhat.com> - 5.15-3
e8fa8b
- update service files (#1542632)
e8fa8b
e8fa8b
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.15-2
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
e8fa8b
e8fa8b
* Tue Feb 13 2018 Richard W.M. Jones <rjones@redhat.com> - 5.15-1
e8fa8b
- Rebase to watchdog 5.15.
e8fa8b
- Remove upstream patches.
e8fa8b
- Modify code to use libtirpc.
e8fa8b
e8fa8b
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.13-19
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e8fa8b
e8fa8b
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.13-18
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
e8fa8b
e8fa8b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.13-17
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e8fa8b
e8fa8b
* Mon Mar 06 2017 Josef Ridky <jridky@redhat.com> - 5.13-16
e8fa8b
- Scriptlets replaced with new systemd macros (#850364)
e8fa8b
e8fa8b
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.13-15
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e8fa8b
e8fa8b
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.13-14
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
e8fa8b
e8fa8b
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.13-13
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
e8fa8b
e8fa8b
* Thu Aug 21 2014 Kevin Fenzi <kevin@scrye.com> - 5.13-12
e8fa8b
- Rebuild for rpm bug 1131960
e8fa8b
e8fa8b
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.13-11
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
e8fa8b
e8fa8b
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.13-10
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
e8fa8b
e8fa8b
* Thu Nov  7 2013 Ales Ledvinka <aledvink@redhat.com> - 5.13-9
e8fa8b
- SELinux: Add /usr/libexec/watchdog/scripts/ for test-bin and repair-bin to inherit from.
e8fa8b
- systemd: service with network available dependency
e8fa8b
- systemd: correct cgroup for realtime settings
e8fa8b
- Document SELinux and systemd.
e8fa8b
e8fa8b
* Thu Oct 24 2013 Ales Ledvinka <aledvink@redhat.com> - 5.13-5
e8fa8b
- SELinux: do not reopen descriptors for reading when only appending.
e8fa8b
e8fa8b
* Fri Aug  9 2013 Richard W.M. Jones <rjones@redhat.com> - 5.13-4
e8fa8b
- Fix License field (software is GPLv2+, not "GPL+").
e8fa8b
e8fa8b
* Thu Aug  8 2013 Richard W.M. Jones <rjones@redhat.com> - 5.13-3
e8fa8b
- Rename README.Fedora to README.RHEL on RHEL.
e8fa8b
e8fa8b
* Tue Jul 30 2013 Richard W.M. Jones <rjones@redhat.com> - 5.13-2
e8fa8b
- Enable /etc/watchdog.d directory for storing test binaries
e8fa8b
  (RHBZ#657750, RHBZ#831190).
e8fa8b
- Missing BR systemd-units.
e8fa8b
- Update .gitignore.
e8fa8b
- Drop Group line, not required by modern RPM.
e8fa8b
e8fa8b
* Thu May 16 2013 Richard W.M. Jones <rjones@redhat.com> - 5.13-1
e8fa8b
- New upstream version 5.13.
e8fa8b
- Various documentation fixes (RHBZ#948883).
e8fa8b
e8fa8b
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.12-3
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e8fa8b
e8fa8b
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.12-2
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e8fa8b
e8fa8b
* Fri Jul 06 2012 Richard W.M. Jones <rjones@redhat.com> - 5.12-1
e8fa8b
- New upstream version 5.12 (RHBZ#837949).
e8fa8b
- Bring specfile up to modern standards.
e8fa8b
- Remove commented sections from previous commit.
e8fa8b
- Remove both patches (equivalent changes now upstream).
e8fa8b
e8fa8b
* Wed Mar 14 2012 Jon Ciesla <limburgher@gmail.com> - 5.9-4
e8fa8b
- Migrate to systemd, BZ 661220.
e8fa8b
e8fa8b
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.9-3
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e8fa8b
e8fa8b
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.9-2
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e8fa8b
e8fa8b
* Mon Jan 17 2011 Richard W.M. Jones <rjones@redhat.com> - 5.9-1
e8fa8b
- New upstream version 5.9 (RHBZ#645541).
e8fa8b
- Package new wd_identify program.
e8fa8b
- Drop old cleanup patch, most of it is now upstream.
e8fa8b
- Add newer cleanup patch, sent upstream.
e8fa8b
- Fix some problems with the initscript (RHBZ#523391).
e8fa8b
- Add systemd service (file installed but not used) (RHBZ#661220).
e8fa8b
e8fa8b
* Wed Jan 13 2010 Richard W.M. Jones <rjones@redhat.com> - 5.5-7
e8fa8b
- Fix Source0 URL.
e8fa8b
e8fa8b
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.5-6
e8fa8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
e8fa8b
e8fa8b
* Fri Mar 13 2009 Richard W.M. Jones <rjones@redhat.com> - 5.5-5
e8fa8b
- Updated the cleanup patch and sent upstream.
e8fa8b
e8fa8b
* Fri Mar 13 2009 Richard W.M. Jones <rjones@redhat.com> - 5.5-3
e8fa8b
- Remove dubious "cleanup-nfs" patch.
e8fa8b
e8fa8b
* Thu Mar  5 2009 Richard W.M. Jones <rjones@redhat.com> - 5.5-2
e8fa8b
- Use '-' in defattr line instead of explicit file mode.
e8fa8b
e8fa8b
* Thu Feb 26 2009 Richard W.M. Jones <rjones@redhat.com> - 5.5-1
e8fa8b
- New upstream version 5.5.
e8fa8b
- Prepared the package for Fedora review.
e8fa8b
e8fa8b
* Mon Jun 11  2007 Lon Hohberger <lhh@redhat.com> - 5.3.1-7
e8fa8b
- Rebuild for RHEL5 Update 1 - Resolves: 227401
e8fa8b
e8fa8b
* Wed May 30  2007 Konrad Rzeszutek <konradr@redhat.com> - 5.3.1-6
e8fa8b
- Fixed the init script file.
e8fa8b
e8fa8b
* Tue May 29  2007 Konrad Rzeszutek <konradr@redhat.com> - 5.3.1-5
e8fa8b
- Fixed a compile warning in nfsmount_xdr file.
e8fa8b
e8fa8b
* Wed May 23  2007 Konrad Rzeszutek <konradr@redhat.com> - 5.3.1-4
e8fa8b
- Fixed rpmlint warnings.
e8fa8b
e8fa8b
* Wed May 16  2007 Konrad Rzeszutek <konradr@redhat.com> - 5.3.1-3
e8fa8b
- Changes to spec, init script and README file per Carol Hebert recommendation.
e8fa8b
e8fa8b
* Thu Apr 19  2007 Konrad Rzeszutek <konradr@redhat.com> - 5.3.1-2
e8fa8b
- Added README.watchdog.ipmi
e8fa8b
e8fa8b
* Mon Apr 16  2007 Konrad Rzeszutek <konradr@redhat.com> - 5.3.1-1
e8fa8b
- Initial copy.