c4cbeb9
Summary:	Tools for monitoring SMART capable hard disks
c842d3d
Name:		smartmontools
f988122
Version:	5.39
2576b79
Release:	2%{?dist}
1dbcbdf
Epoch:		1
c842d3d
Group:		System Environment/Base
7d9c446
License:	GPLv2+
c4cbeb9
URL:		http://smartmontools.sourceforge.net/
2576b79
Source0:	http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
1cb1c2b
Source1:	smartd.initd
e97b2bc
Source2:	smartmontools.sysconf
f988122
2576b79
#fedora/rhel specific
7fa6ab9
Patch1:		smartmontools-5.38-defaultconf.patch
2576b79
2576b79
#libcap-ng new feature, testing for now
7fa6ab9
Patch2:		smartmontools-5.38-lowcap.patch
f988122
2576b79
#fix some post-5.39 regressions, taken from upstream, for sm <= 5.39
2576b79
Patch3:		smartmontools-5.39-regrfix.patch
2576b79
87f7cd8
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
87f7cd8
Requires:	fileutils mailx chkconfig initscripts
073a9db
BuildRequires:	readline-devel ncurses-devel automake util-linux groff gettext
0c4121f
BuildRequires:	libselinux-devel libcap-ng-devel
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
2ff7b71
%setup -q
7fa6ab9
%patch1 -p1 -b .defaultconf
7fa6ab9
%patch2 -p1 -b .lowcap
2576b79
%patch3 -p2 -b .regrfix
93c1823
0c4121f
# fix encoding
0c4121f
for fe in AUTHORS CHANGELOG
0c4121f
do
0c4121f
  iconv -f iso-8859-1 -t utf-8 <$fe >$fe.new
0c4121f
  touch -r $fe $fe.new
0c4121f
  mv -f $fe.new $fe
0c4121f
done
0c4121f
93c1823
%build
6b05469
ln -s CHANGELOG ChangeLog
2576b79
autoreconf -i
6b05469
%configure --with-selinux --with-libcap-ng=yes
e7da263
%ifarch sparc64
e7da263
make CXXFLAGS="$RPM_OPT_FLAGS -fPIE" LDFLAGS="-pie -Wl,-z,relro,-z,now"
e7da263
%else
ea34e72
make CXXFLAGS="$RPM_OPT_FLAGS -fpie" LDFLAGS="-pie -Wl,-z,relro,-z,now"
e7da263
%endif
0c4121f
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*
0c4121f
chmod a-x -R examplescripts/*
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
93c1823
93c1823
%post
93c1823
/sbin/chkconfig --add smartd
93c1823
7dcc630
%files
87f7cd8
%defattr(-,root,root,-)
7dcc630
%doc AUTHORS CHANGELOG COPYING INSTALL NEWS README
7dcc630
%doc TODO WARNINGS examplescripts smartd.conf
7dcc630
%{_sbindir}/smartd
7dcc630
%{_sbindir}/smartctl
0c4121f
%{_initddir}/smartd
7dcc630
%{_mandir}/man?/smart*.*
f3ee0eb
%config(noreplace) %{_sysconfdir}/smartd.conf
7dcc630
%config(noreplace) %{_sysconfdir}/sysconfig/smartmontools
7dcc630
93c1823
%changelog
2576b79
* Wed Jan 20 2010 Michal Hlavinka <mhlavink@redhat.com> - 1:5.39-2
2576b79
- fix DEVICESCAN -d sat
2576b79
- fix directive '-l selftest'
2576b79
- fix option '-q, --quietmode'
2576b79
2ff7b71
* Wed Dec 10 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.39-1
2ff7b71
- update to 5.39
2ff7b71
f988122
* Wed Dec 02 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.39-0.1.rc1
f988122
- update to 5.39-rc1
f988122
073a9db
* Wed Nov 25 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-25.20091119svn
073a9db
- spec cleanup
073a9db
c0b08a2
* Mon Nov 23 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-24.20091119svn
c0b08a2
- move powermode option from sysconfig to smartd.conf (#539760)
c0b08a2
7fa6ab9
* Thu Nov 19 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-23.20091119svn
7fa6ab9
- update to svn snapshot 2009-11-19
7fa6ab9
- remove upstreamed patches
7fa6ab9
0c4121f
* Mon Nov 02 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-22
0c4121f
- spec cleanup
0c4121f
0c4121f
* Mon Oct 12 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-21 
5ec8254
- warn about disabled mail only if capabilities are enabled
5ec8254
b6eb325
* Fri Oct 09 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-20
b6eb325
- fix init script for case when no action was specified
b6eb325
9cd7b15
* Fri Oct 09 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-19
9cd7b15
- make init script lsb compliant (#528016)
9cd7b15
33812af
* Mon Oct 05 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-18
33812af
- bump release for rebuild
33812af
2ba6d85
* Mon Oct 05 2009 Michal Hlaivnka <mhlavink@redhat.com> - 1:5.38-17
2ba6d85
- make capabilities optional
2ba6d85
- fix capabilities for 3ware contollers (#526626)
2ba6d85
5501583
* Wed Aug 26 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-16
5501583
- extend capability scanning devices
5501583
6b05469
* Wed Aug 26 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-15
6b05469
- updated patch for lower capabilities (#517728)
6b05469
- added buildrequires libcap-ng-devel
6b05469
1a8b53a
* Fri Aug 21 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-14
1a8b53a
- drop all unnecessary capabilities (#517728)
1a8b53a
4cad88f
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:5.38-13
4cad88f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
4cad88f
d11a22a
* Thu Jun 11 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-12
951cf98
- drop autogen call 
d11a22a
e7da263
* Sat Apr 11 2009 Dennis Gilmore <dennis@ausil.us> - 1:5.38-11
e7da263
- remove ExclusiveArch use -fPIE on sparc64  
e7da263
- tested builds on sparcv9 sparc64 and s390x
e7da263
87f7cd8
* Mon Mar 09 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-10
87f7cd8
- cleanup for merge review
87f7cd8
2f93695
* Fri Feb 27 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1:5.38-9
2f93695
- fix ExclusiveArch
2f93695
0361724
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:5.38-8
0361724
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
0361724
a856d70
* Mon Aug 11 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-7
a856d70
- fix #458549 - obsolete smartmontools-config
a856d70
- change the default configuration file
a856d70
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