Blame SPECS/watchdog.spec

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