watchdog/watchdog.spec

167 lines
5.4 KiB
RPMSpec
Raw Normal View History

2009-03-13 09:35:36 +00:00
Summary: Software and/or Hardware watchdog daemon
Name: watchdog
Version: 5.9
Release: 3%{?dist}
2009-03-13 09:35:36 +00:00
License: GPL+
Group: System Environment/Daemons
URL: http://sourceforge.net/projects/watchdog/
2010-01-13 15:24:57 +00:00
Source0: http://downloads.sourceforge.net/watchdog/watchdog-%{version}.tar.gz
2009-03-13 09:35:36 +00:00
Source1: watchdog.init
Source2: README.watchdog.ipmi
Source3: README.Fedora
Source4: watchdog.service
2009-03-13 09:35:36 +00:00
# This was sent upstream as part of a large bundle of cleanups, but
# this part was not applied, so I assume they don't want it.
Patch0: watchdog-5.9-write-warn-unused-result.patch
# Sent upstream on 2011-01-17.
Patch1: watchdog-5.9-cleanups.patch
2009-03-13 09:35:36 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): /sbin/chkconfig
Requires(postun): /sbin/chkconfig
Requires(post): /sbin/service
Requires(postun): /sbin/service
%description
The watchdog program can be used as a powerful software watchdog daemon
or may be alternately used with a hardware watchdog device such as the
IPMI hardware watchdog driver interface to a resident Baseboard
Management Controller (BMC). watchdog periodically writes to /dev/watchdog;
the interval between writes to /dev/watchdog is configurable through settings
in the watchdog sysconfig file. This configuration file is also used to
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
written to within the configured time period, the watchdog timer expiration
will trigger a machine reboot. When operating as a software watchdog, the
ability to reboot will depend on the state of the machine and interrupts.
When operating as a hardware watchdog, the machine will experience a hard
reset (or whatever action was configured to be taken upon watchdog timer
expiration) initiated by the BMC.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
2009-03-13 09:35:36 +00:00
cp %{SOURCE2} .
cp %{SOURCE3} .
mv README README.orig
iconv -f ISO-8859-1 -t UTF-8 < README.orig > README
%build
%configure
make %{?_smp_mflags}
%install
rm -Rf ${RPM_BUILD_ROOT}
install -d -m0755 ${RPM_BUILD_ROOT}%{_sysconfdir}
make DESTDIR=${RPM_BUILD_ROOT} install
install -Dp -m0644 %{name}.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/watchdog
install -Dp -m0755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_initrddir}/watchdog
install -Dp -m0644 %{SOURCE4} ${RPM_BUILD_ROOT}/lib/systemd/system/watchdog.service
2009-03-13 09:35:36 +00:00
%clean
rm -Rf ${RPM_BUILD_ROOT}
%post
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add %{name}
fi
%preun
if [ $1 -eq 0 ]; then
/sbin/service %{name} stop >/dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%postun
if [ $1 -ge 1 ]; then
/sbin/service %{name} condrestart >/dev/null 2>&1
fi
%files
%defattr(-, root, root, -)
%doc AUTHORS ChangeLog COPYING examples/ IAFA-PACKAGE NEWS README TODO README.watchdog.ipmi README.Fedora
%config(noreplace) %{_sysconfdir}/watchdog.conf
%config(noreplace) %{_sysconfdir}/sysconfig/watchdog
%{_sysconfdir}/rc.d/init.d/watchdog
%{_sbindir}/watchdog
%{_sbindir}/wd_identify
2009-03-13 09:35:36 +00:00
%{_sbindir}/wd_keepalive
%{_mandir}/man5/watchdog.conf.5*
%{_mandir}/man8/watchdog.8*
%{_mandir}/man8/wd_identify.8*
2009-03-13 09:35:36 +00:00
%{_mandir}/man8/wd_keepalive.8*
/lib/systemd/system/watchdog.service
2009-03-13 09:35:36 +00:00
%changelog
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Jan 17 2011 Richard W.M. Jones <rjones@redhat.com> - 5.9-1
- New upstream version 5.9 (RHBZ#645541).
- Package new wd_identify program.
- Drop old cleanup patch, most of it is now upstream.
- Add newer cleanup patch, sent upstream.
- Fix some problems with the initscript (RHBZ#523391).
- Add systemd service (file installed but not used) (RHBZ#661220).
2010-01-13 15:24:57 +00:00
* Wed Jan 13 2010 Richard W.M. Jones <rjones@redhat.com> - 5.5-7
- Fix Source0 URL.
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Fri Mar 13 2009 Richard W.M. Jones <rjones@redhat.com> - 5.5-5
- Updated the cleanup patch and sent upstream.
2009-03-13 09:46:32 +00:00
* Fri Mar 13 2009 Richard W.M. Jones <rjones@redhat.com> - 5.5-3
- Remove dubious "cleanup-nfs" patch.
2009-03-13 09:35:36 +00:00
* Thu Mar 5 2009 Richard W.M. Jones <rjones@redhat.com> - 5.5-2
- Use '-' in defattr line instead of explicit file mode.
* Thu Feb 26 2009 Richard W.M. Jones <rjones@redhat.com> - 5.5-1
- New upstream version 5.5.
- Prepared the package for Fedora review.
* Mon Jun 11 2007 Lon Hohberger <lhh@redhat.com> - 5.3.1-7
- Rebuild for RHEL5 Update 1 - Resolves: 227401
* Wed May 30 2007 Konrad Rzeszutek <konradr@redhat.com> - 5.3.1-6
- Fixed the init script file.
* Tue May 29 2007 Konrad Rzeszutek <konradr@redhat.com> - 5.3.1-5
- Fixed a compile warning in nfsmount_xdr file.
* Wed May 23 2007 Konrad Rzeszutek <konradr@redhat.com> - 5.3.1-4
- Fixed rpmlint warnings.
* Wed May 16 2007 Konrad Rzeszutek <konradr@redhat.com> - 5.3.1-3
- Changes to spec, init script and README file per Carol Hebert recommendation.
* Thu Apr 19 2007 Konrad Rzeszutek <konradr@redhat.com> - 5.3.1-2
- Added README.watchdog.ipmi
* Mon Apr 16 2007 Konrad Rzeszutek <konradr@redhat.com> - 5.3.1-1
- Initial copy.