c4cbeb9
Summary:	Tools for monitoring SMART capable hard disks
c842d3d
Name:		smartmontools
7045766
Version:	5.38
ea34e72
Release: 	6%{?dist}
1dbcbdf
Epoch:		1
c842d3d
Group:		System Environment/Base
7d9c446
License:	GPLv2+
c4cbeb9
URL:		http://smartmontools.sourceforge.net/
00e7554
Source0:	http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
1cb1c2b
Source1:	smartd.initd
e97b2bc
Source2:	smartmontools.sysconf
7045766
Patch1:		smartmontools-5.38-cloexec.patch
7045766
Patch2:     smartmontools-5.37-addrinfo.patch
1666bb9
Patch3:     smartmontools-5.38-perc.patch
1666bb9
Patch4:     smartmontools-5.38-selinux.patch
00e7554
c4cbeb9
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
c4cbeb9
PreReq:		/sbin/chkconfig /sbin/service
7dcc630
Requires:	fileutils mailx
6991910
BuildRequires: readline-devel ncurses-devel /usr/bin/aclocal /usr/bin/automake /usr/bin/autoconf util-linux groff gettext
6991910
BuildRequires: libselinux-devel
93c1823
Obsoletes:	kernel-utils
7d9c446
ExclusiveArch:	i386 x86_64 %{arm} ia64 ppc ppc64
93c1823
93c1823
%description
c842d3d
The smartmontools package contains two utility programs (smartctl
c842d3d
and smartd) to control and monitor storage systems using the Self-
c842d3d
Monitoring, Analysis and Reporting Technology System (SMART) built
e97b2bc
into most modern ATA and SCSI hard disks. In many cases, these
c842d3d
utilities will provide advanced warning of disk degradation and
c842d3d
failure.
93c1823
93c1823
%prep
c4cbeb9
%setup -q
41fd970
%patch1 -p1 -b .cloexec
7045766
%patch2 -p1 -b .addrinfo
1666bb9
%patch3 -p1 -b .perc
1666bb9
%patch4 -p1 -b .selinux
93c1823
93c1823
%build
7256996
./autogen.sh
1666bb9
%configure --with-selinux
ea34e72
make CXXFLAGS="$RPM_OPT_FLAGS -fpie" LDFLAGS="-pie -Wl,-z,relro,-z,now"
93c1823
93c1823
%install
c4cbeb9
rm -rf $RPM_BUILD_ROOT
c4cbeb9
make DESTDIR=$RPM_BUILD_ROOT install
93c1823
f3ee0eb
#rm -f $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/smartd.conf
c4cbeb9
rm -f examplescripts/Makefile*
1cb1c2b
install -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/smartd
e97b2bc
install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/smartmontools
f3ee0eb
93c1823
%clean
c4cbeb9
rm -rf $RPM_BUILD_ROOT
93c1823
93c1823
%preun
93c1823
if [ "$1" = "0" ] ; then
58a0b16
 /sbin/service smartd stop >/dev/null 2>&1
93c1823
 /sbin/chkconfig --del smartd
93c1823
fi
Florian La Roche bf0178d
exit 0
93c1823
93c1823
%post
93c1823
/sbin/chkconfig --add smartd
93c1823
46405b8
%triggerpostun -- kernel-utils
46405b8
/sbin/chkconfig --add smartd
46405b8
exit 0
46405b8
7dcc630
%files
7dcc630
%defattr(-,root,root)
7dcc630
%doc AUTHORS CHANGELOG COPYING INSTALL NEWS README
7dcc630
%doc TODO WARNINGS examplescripts smartd.conf
7dcc630
%{_sbindir}/smartd
7dcc630
%{_sbindir}/smartctl
7dcc630
%{_sysconfdir}/rc.d/init.d/smartd
7dcc630
%{_mandir}/man?/smart*.*
f3ee0eb
# %ghost %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/smartd.conf
f3ee0eb
%config(noreplace) %{_sysconfdir}/smartd.conf
7dcc630
%config(noreplace) %{_sysconfdir}/sysconfig/smartmontools
7dcc630
93c1823
%changelog
ea34e72
* Fri Aug 08 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-6
ea34e72
- correct CXXFLAGS so the PIE code is produced
ea34e72
e97b2bc
* Mon May 12 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-5
e97b2bc
- remove config subpackage
e97b2bc
6991910
* Mon May 05 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-4.1
6991910
- add libselinux-devel to BR
6991910
1666bb9
* Mon May 05 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-4
1666bb9
- fix #232218 character devices /dev/twa* for 3ware 9000 series RAID
1666bb9
  controllers are not created
1666bb9
1666bb9
* Thu Mar 27 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-3
1666bb9
- don't attempt to query DELL PERC controllers -- they'd go offline
1666bb9
64c7371
* Tue Mar 18 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-2
64c7371
- fix FD_CLOEXEC on SCSI device file descriptors not being set
64c7371
7045766
* Mon Mar 10 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-1
7045766
- new upstream version
7045766
80148f4
* Tue Feb 12 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-8.5
80148f4
- rebuild (gcc-4.3)
80148f4
084e3ed
* Tue Jan 15 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-8.4
084e3ed
- change '-d ata' to '-d sat' in the config script for SATA drives
084e3ed
f3ee0eb
* Wed Dec 12 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-8.3
f3ee0eb
- fix #375791 - parameter warning for smartd in logwatch output
f3ee0eb
4ac28c5
* Wed Oct 31 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-8.2
4ac28c5
- rebuild (one more error in autogen.sh)
4ac28c5
58a262e
* Wed Oct 31 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-8.1
58a262e
- fix build with new automake
58a262e
7256996
* Wed Oct 31 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-8
7256996
- fix #359561 - typo in smartd-conf.py causes smartd to skip all disks
7256996
7256996
* Mon Oct 15 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-7.1
7256996
- improved patch for getaddrinfo
7256996
658bb27
* Fri Oct 12 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-7
658bb27
- replace gethostbyname with getaddrinfo
658bb27
b021c51
* Tue Sep 04 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-6
b021c51
- fix #271741 - smartd-conf.py should allow customization of parameters
b021c51
- fix #253753 - service starting by default, perhaps shouldn't
b021c51
- update initscript (related #247058 - initscript review)
b021c51
7d9c446
* Mon Aug 20 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-5
7d9c446
- add support for 24 disks on 3ware RAID controllers (related #252055)
7d9c446
- fix #245442 - add %%{arm} to smartmontools's set of build archs
7d9c446
- update license tag
7d9c446
7dcc630
* Thu Jun 21 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-4
7dcc630
- fix #241389 - smartd-conf.py pulls in a big dependency chain, so
7dcc630
  build a separate config package
7dcc630
  
9c270d7
* Tue Jun 05 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-3
9c270d7
- fix #241385 - smartmontools missing dependency on mailx
9c270d7
- fix #241388 - unneeded smartd-conf.py[co] installed in /usr/sbin
9c270d7
f97a52a
* Wed Mar  7 2007 Vitezslav Crhonek <vcrhonek@redhat.com> - 1:5.37-2
f97a52a
- re-add cloexec patch
f97a52a
- re-add one erased changelog entry
f97a52a
- compile with -fpie (instead of -fpic)
f97a52a
1cb1c2b
* Tue Feb 27 2007 Vitezslav Crhonek <vcrhonek@redhat.com> - 1:5.37-1
1cb1c2b
- new upstream version
7e063ef
41fd970
* Thu Feb 22 2007 Tomas Mraz <tmraz@redhat.com> - 1:5.36-8
41fd970
- enable SMART on disks when smartd-conf.py runs (fix
41fd970
  by Calvin Ostrum) (#214502)
41fd970
58a0b16
* Mon Feb 12 2007 Tomas Mraz <tmraz@redhat.com> - 1:5.36-7
58a0b16
- redirect service script output to null (#224566)
58a0b16
Florian La Roche bf0178d
* Sun Feb 11 2007 Florian La Roche <laroche@redhat.com> - 1:5.36-6
Florian La Roche bf0178d
- make sure the preun script does not fail
Florian La Roche bf0178d
1c05ce5
* Tue Nov  7 2006 Tomas Mraz <tmraz@redhat.com> - 1:5.36-5
9b83439
- set cloexec on device descriptor so it doesn't leak to sendmail (#214182)
9b83439
- fixed minor bug in initscript (#213683)
9b83439
- backported SATA disk detection from upstream
9b83439
e746d6d
* Fri Aug 18 2006 Jesse Keating <jkeating@redhat.com> - 1:5.36-3
e746d6d
- rebuilt with latest binutils to pick up 64K -z commonpagesize on ppc*
e746d6d
  (#203001)
e746d6d
9230586
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1:5.36-2.1
9230586
- rebuild
9230586
c4ce392
* Tue Jun 27 2006 Tomas Mraz <tmraz@redhat.com> - 1:5.36-2
c4ce392
- kudzu is deprecated, replace it with HAL (#195752)
c4ce392
- moved later in the boot process so haldaemon is already running
c4ce392
  when drives are being detected
c4ce392
00e7554
* Thu May 11 2006 Tomas Mraz <tmraz@redhat.com> - 1:5.36-1
00e7554
- new upstream version
00e7554
- included patch with support for cciss controllers (#191288)
00e7554
3e097ff
* Tue May  2 2006 Tomas Mraz <tmraz@redhat.com> - 1:5.33-8
3e097ff
- regenerate smartd.conf on every startup if the config file
3e097ff
  is autogenerated (#190065)
3e097ff
a2e4329
* Fri Mar 24 2006 Tomas Mraz <tmraz@redhat.com> - 1:5.33-7
a2e4329
- add missing quotes to /etc/sysconfig/smartmontools
a2e4329
438b809
* Wed Mar 22 2006 Tomas Mraz <tmraz@redhat.com> - 1:5.33-6
438b809
- test SATA drives correctly
438b809
b34dd23
* Wed Mar 22 2006 Tomas Mraz <tmraz@redhat.com> - 1:5.33-5
b34dd23
- add default /etc/sysconfig/smartmontools file
b34dd23
- ignore errors on startup (#186130)
b34dd23
- test drive for SMART support before adding it to smartd.conf
b34dd23
f53d683
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1:5.33-4.2
f53d683
- bump again for double-long bug on ppc(64)
f53d683
9f0b8ab
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1:5.33-4.1
9f0b8ab
- rebuilt for new gcc4.1 snapshot and glibc changes
9f0b8ab
d7e97a1
* Fri Dec 16 2005 Tomas Mraz <tmraz@redhat.com> 1:5.33-4
d7e97a1
- mail should be sent to root not root@localhost (#174252)
70c54dd
396edfa
* Fri Nov 25 2005 Tomas Mraz <tmraz@redhat.com> 1:5.33-3
396edfa
- add libata disks with -d ata if the libata version
396edfa
  is new enough otherwise do not add them (#145859, #174095)
396edfa
c4cbeb9
* Thu Nov  3 2005 Tomas Mraz <tmraz@redhat.com> 1:5.33-2
c4cbeb9
- Spec file cleanup by Robert Scheck <redhat@linuxnetz.de> (#170959)
c4cbeb9
- manual release numbering
c4cbeb9
- remove bogus patch of non-installed file
c4cbeb9
- only non-removable drives should be added to smartd.conf
c4cbeb9
- smartd.conf should be owned (#171498)
c4cbeb9
57394e3
* Tue Oct 25 2005 Dave Jones <davej@redhat.com>
57394e3
- Add comments to generated smartd.conf (#135397)
57394e3
c9877c5
* Thu Aug 04 2005 Karsten Hopp <karsten@redhat.de>
c9877c5
- package all python files
c9877c5
269a99e
* Tue Mar  1 2005 Dave Jones <davej@redhat.com>
269a99e
- Rebuild for gcc4
269a99e
4a4cf3e
* Wed Feb  9 2005 Dave Jones <davej@redhat.com>
4a4cf3e
- Build on PPC32 too (#147090)
4a4cf3e
93c1823
* Sat Dec 18 2004 Dave Jones <davej@redhat.com>
93c1823
- Initial packaging, based upon kernel-utils.
93c1823