Blame SPECS/smartmontools.spec

565282
Summary:	Tools for monitoring SMART capable hard disks
565282
Name:		smartmontools
565282
Version:	6.2
22b944
Release:	8%{?dist}
565282
Epoch:		1
565282
Group:		System Environment/Base
565282
License:	GPLv2+
565282
URL:		http://smartmontools.sourceforge.net/
565282
Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
565282
Source2:	smartmontools.sysconf
565282
Source4:	smartdnotify
565282
565282
#fedora/rhel specific
565282
Patch1:		smartmontools-5.38-defaultconf.patch
ba800d
#from upstream, rhbz#1212582
ba800d
Patch2: smartmontools-6.4-fdleak.patch
ba800d
#from upstream, rhbz#1294999
ba800d
Patch3: smartmontools-6.2-discovermore.patch
ba800d
Patch4: smartmontools-6.2-httpsdrivedb.patch
ba800d
Patch5: smartmontools-6.2-drivedbman.patch
22b944
Patch6: smartmontools-6.2-up2datedrivedb.patch
565282
565282
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
565282
Requires:	fileutils mailx chkconfig
565282
#new rpm does not handle this (yet?)
565282
#Requires(triggerun):	systemd-units
565282
Requires(post):		systemd-units
565282
Requires(preun):	systemd-units
565282
Requires(postun):	systemd-units
565282
BuildRequires:	readline-devel ncurses-devel automake util-linux groff gettext
565282
BuildRequires:	libselinux-devel libcap-ng-devel
565282
BuildRequires:	systemd-units
565282
565282
%description
565282
The smartmontools package contains two utility programs (smartctl
565282
and smartd) to control and monitor storage systems using the Self-
565282
Monitoring, Analysis and Reporting Technology System (SMART) built
565282
into most modern ATA and SCSI hard disks. In many cases, these
565282
utilities will provide advanced warning of disk degradation and
565282
failure.
565282
565282
%prep
565282
%setup -q 
565282
%patch1 -p1 -b .defaultconf
ba800d
%patch2 -p1 -b .fdleak
ba800d
%patch3 -p1 -b .discovermore
ba800d
%patch4 -p1 -b .httpsdrivedb
ba800d
%patch5 -p1 -b .drivedbman
22b944
%patch6 -p1 -b .up2datedrivedb
565282
565282
# fix encoding
565282
for fe in AUTHORS ChangeLog
565282
do
565282
  iconv -f iso-8859-1 -t utf-8 <$fe >$fe.new
565282
  touch -r $fe $fe.new
565282
  mv -f $fe.new $fe
565282
done
565282
565282
%build
565282
autoreconf -i
565282
%configure --with-selinux --with-libcap-ng=yes --with-systemdsystemunitdir=%{_unitdir} --sysconfdir=%{_sysconfdir}/%name/
565282
%ifarch sparc64
565282
make CXXFLAGS="$RPM_OPT_FLAGS -fPIE" LDFLAGS="-pie -Wl,-z,relro,-z,now"
565282
%else
565282
make CXXFLAGS="$RPM_OPT_FLAGS -fpie" LDFLAGS="-pie -Wl,-z,relro,-z,now"
565282
%endif
565282
565282
sed -i 's|/etc/smartmontools/sysconfig|/etc/sysconfig|g' smartd.service
565282
565282
%install
565282
rm -rf $RPM_BUILD_ROOT
565282
make DESTDIR=$RPM_BUILD_ROOT install
565282
565282
rm -f examplescripts/Makefile*
565282
chmod a-x -R examplescripts/*
565282
install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/smartmontools
565282
install -D -p -m 755 %{SOURCE4} $RPM_BUILD_ROOT/%{_libexecdir}/%{name}/smartdnotify
565282
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smartd_warning.d
565282
rm -rf $RPM_BUILD_ROOT/etc/{rc.d,init.d}
565282
rm -rf $RPM_BUILD_ROOT/%{_docdir}/%{name}
565282
565282
%clean
565282
rm -rf $RPM_BUILD_ROOT
565282
565282
%preun
565282
%systemd_preun smartd.service
565282
565282
%pre
565282
if [ $1 = 2 ] # only during update
565282
then
565282
  # for Fedora 19-22
565282
  if [ -f %{_sysconfdir}/smartd.conf -a ! -e %{_sysconfdir}/%name ]
565282
  then
565282
    mkdir -p %{_sysconfdir}/%{name}
565282
    cp -p %{_sysconfdir}/smartd.conf %{_sysconfdir}/%{name}
565282
  fi
565282
fi
565282
565282
%post
565282
%systemd_post smartd.service
565282
565282
%postun
565282
%systemd_postun_with_restart smartd.service
565282
565282
%files
565282
%defattr(-,root,root,-)
565282
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README
565282
%doc TODO WARNINGS examplescripts smartd.conf
565282
%dir %{_sysconfdir}/%name
565282
%dir %{_sysconfdir}/%name/smartd_warning.d
565282
%config(noreplace) %{_sysconfdir}/%{name}/smartd.conf
565282
%config(noreplace) %{_sysconfdir}/%{name}/smartd_warning.sh
565282
%config(noreplace) %{_sysconfdir}/sysconfig/smartmontools
565282
%{_unitdir}/smartd.service
565282
%{_sbindir}/smartd
565282
%{_sbindir}/update-smart-drivedb
565282
%{_sbindir}/smartctl
565282
%{_mandir}/man?/smart*.*
ba800d
%{_mandir}/man8/update-smart-drivedb.8*
565282
%{_libexecdir}/%{name}
565282
%{_datadir}/%{name}
565282
565282
%changelog
22b944
* Sun Mar 26 2017 Michal Hlavinka <mhlavink@redhat.com> - 1:6.2-8
22b944
- use up to date drivedb (#1388510)
22b944
- less scarry messages reported to users (#1340462)
22b944
ba800d
* Wed Sep 07 2016 Michal Hlavinka <mhlavink@redhat.com> - 1:6.2-7
ba800d
- add update-smart-drivedb.8 man page (#1367237)
ba800d
- fix drivedb update url (#1364830)
ba800d
ba800d
* Thu May 05 2016 Michal Hlavinka <mhlavink@redhat.com> - 1:6.2-6
ba800d
- allow to discover more devices (#1294999)
ba800d
ba800d
* Mon May 02 2016 Michal Hlavinka <mhlavink@redhat.com> - 1:6.2-5
ba800d
- do not leak file descriptor when calling mailx (#1212582)
ba800d
7fa937
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1:6.2-4
7fa937
- Mass rebuild 2014-01-24
7fa937
7fa937
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1:6.2-3
7fa937
- Mass rebuild 2013-12-27
7fa937
565282
* Mon Sep 16 2013 Michal Hlavinka <mhlavink@redhat.com> - 1:6.2-2
565282
- smartd service file wrong path to environment file (#1008516)
565282
565282
* Tue Jul 30 2013 Michal Hlavinka <mhlavink@redhat.com> - 1:6.2-1
565282
- smartmontools updated to 6.2
565282
565282
* Mon Jul 22 2013 Michal Hlavinka <mhlavink@redhat.com> - 1:6.1-2
565282
- spec cleanup
565282
565282
* Wed Mar 20 2013 Michal Hlavinka <mhlavink@redhat.com> - 1:6.1-1
565282
- smartmontools updated to 6.1
565282
565282
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:6.0-2
565282
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
565282
565282
* Thu Oct 11 2012 Michal Hlavinka <mhlavink@redhat.com> - 1:6.0-1
565282
- smartmontools updated to 6.0
565282
565282
* Tue Aug 21 2012 Michal Hlavinka <mhlavink@redhat.com> - 1:5.43-3
565282
- use new systemd rpm macros (#850316)
565282
565282
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:5.43-2
565282
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
565282
565282
* Mon Jul 02 2012 Michal Hlavinka <mhlavink@redhat.com> - 1:5.43-1
565282
- smartmontools updated to 5.43
565282
565282
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:5.42-3
565282
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
565282
565282
* Fri Dec 02 2011 Michal Hlavinka <mhlavink@redhat.com> - 1:5.42-2
565282
- enable smartd after installation
565282
565282
* Fri Oct 21 2011 Michal Hlavinka <mhlavink@redhat.com> - 1:5.42-1
565282
- smartmontools updated to 5.42
565282
565282
* Mon Jun 13 2011 Michal Hlavinka <mhlavink@redhat.com> - 1:5.41-2
565282
- make F-14 (sysv init) -> F-15 (systemd) transition more robust
565282
565282
* Fri Jun 10 2011 Michal Hlavinka <mhlavink@redhat.com> - 1:5.41-1
565282
- updated to 5.41
565282
565282
* Mon May 16 2011 Michal Hlavinka <mhlavink@redhat.com> - 1:5.40-10
565282
- fix path to notify script (#675778)
565282
565282
* Fri Mar 11 2011 Michal Hlavinka <mhlavink@redhat.com> - 1:5.40-9
565282
- fix typos in man page
565282
565282
* Fri Mar 04 2011 Michal Hlavinka <mhlavink@redhat.com> - 1:5.40-8
565282
- don't call chkconfig add, we use systemd now
565282
 
565282
* Thu Mar 03 2011 Michal Hlavinka <mhlavink@redhat.com> - 1:5.40-7
565282
- own %%{_datadir}/%%{name} and %%{_libexecdir}/%%{name} dirs
565282
565282
* Thu Feb 17 2011 Michal Hlavinka <mhlavink@redhat.com> - 1:5.40-6
565282
- notify users when disk is failing
565282
565282
* Wed Feb 09 2011 Michal Hlavinka <mhlavink@redhat.com> - 1:5.40-5
565282
- move to systemd
565282
565282
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:5.40-4
565282
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
565282
565282
* Mon Nov 15 2010 Michal Hlavinka <mhlavink@redhat.com> - 1:5.40-3
565282
- megaraid: Fix segfault on non-data commands (#577935)
565282
565282
* Tue Nov 09 2010 Michal Hlavinka <mhlavink@redhat.com> - 1:5.40-2
565282
- don't forget to restart smartd service after update (#651211)
565282
565282
* Mon Oct 18 2010 Michal Hlavinka <mhlavink@redhat.com> - 1:5.40-1
565282
- updated to 5.40 final
565282
565282
* Mon Sep 27 2010 Michal Hlavinka <mhlavink@redhat.com> - 1:5.39.1-2.r3169
565282
- updated to r3169
565282
- ddds riverdb support for new devices (#637171)
565282
565282
* Fri Jan 29 2010 Michal Hlavinka <mhlavink@redhat.com> - 1:5.39.1-1
565282
- updated to 5.39.1
565282
- Fix spin-up of SATA drive if '-n standby' is used.
565282
565282
* Wed Jan 20 2010 Michal Hlavinka <mhlavink@redhat.com> - 1:5.39-2
565282
- fix DEVICESCAN -d sat
565282
- fix directive '-l selftest'
565282
- fix option '-q, --quietmode'
565282
565282
* Thu Dec 10 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.39-1
565282
- update to 5.39
565282
565282
* Wed Dec 02 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.39-0.1.rc1
565282
- update to 5.39-rc1
565282
565282
* Wed Nov 25 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-25.20091119svn
565282
- spec cleanup
565282
565282
* Mon Nov 23 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-24.20091119svn
565282
- move powermode option from sysconfig to smartd.conf (#539760)
565282
565282
* Thu Nov 19 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-23.20091119svn
565282
- update to svn snapshot 2009-11-19
565282
- remove upstreamed patches
565282
565282
* Mon Nov 02 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-22
565282
- spec cleanup
565282
565282
* Mon Oct 12 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-21 
565282
- warn about disabled mail only if capabilities are enabled
565282
565282
* Fri Oct 09 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-20
565282
- fix init script for case when no action was specified
565282
565282
* Fri Oct 09 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-19
565282
- make init script lsb compliant (#528016)
565282
565282
* Mon Oct 05 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-18
565282
- bump release for rebuild
565282
565282
* Mon Oct 05 2009 Michal Hlaivnka <mhlavink@redhat.com> - 1:5.38-17
565282
- make capabilities optional
565282
- fix capabilities for 3ware contollers (#526626)
565282
565282
* Wed Aug 26 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-16
565282
- extend capability scanning devices
565282
565282
* Wed Aug 26 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-15
565282
- updated patch for lower capabilities (#517728)
565282
- added buildrequires libcap-ng-devel
565282
565282
* Fri Aug 21 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-14
565282
- drop all unnecessary capabilities (#517728)
565282
565282
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:5.38-13
565282
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
565282
565282
* Thu Jun 11 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-12
565282
- drop autogen call 
565282
565282
* Sat Apr 11 2009 Dennis Gilmore <dennis@ausil.us> - 1:5.38-11
565282
- remove ExclusiveArch use -fPIE on sparc64  
565282
- tested builds on sparcv9 sparc64 and s390x
565282
565282
* Mon Mar 09 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-10
565282
- cleanup for merge review
565282
565282
* Fri Feb 27 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1:5.38-9
565282
- fix ExclusiveArch
565282
565282
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:5.38-8
565282
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
565282
565282
* Mon Aug 11 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-7
565282
- fix #458549 - obsolete smartmontools-config
565282
- change the default configuration file
565282
565282
* Fri Aug 08 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-6
565282
- correct CXXFLAGS so the PIE code is produced
565282
565282
* Mon May 12 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-5
565282
- remove config subpackage
565282
565282
* Mon May 05 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-4.1
565282
- add libselinux-devel to BR
565282
565282
* Mon May 05 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-4
565282
- fix #232218 character devices /dev/twa* for 3ware 9000 series RAID
565282
  controllers are not created
565282
565282
* Thu Mar 27 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-3
565282
- don't attempt to query DELL PERC controllers -- they'd go offline
565282
565282
* Tue Mar 18 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-2
565282
- fix FD_CLOEXEC on SCSI device file descriptors not being set
565282
565282
* Mon Mar 10 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.38-1
565282
- new upstream version
565282
565282
* Tue Feb 12 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-8.5
565282
- rebuild (gcc-4.3)
565282
565282
* Tue Jan 15 2008 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-8.4
565282
- change '-d ata' to '-d sat' in the config script for SATA drives
565282
565282
* Wed Dec 12 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-8.3
565282
- fix #375791 - parameter warning for smartd in logwatch output
565282
565282
* Wed Oct 31 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-8.2
565282
- rebuild (one more error in autogen.sh)
565282
565282
* Wed Oct 31 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-8.1
565282
- fix build with new automake
565282
565282
* Wed Oct 31 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-8
565282
- fix #359561 - typo in smartd-conf.py causes smartd to skip all disks
565282
565282
* Mon Oct 15 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-7.1
565282
- improved patch for getaddrinfo
565282
565282
* Fri Oct 12 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-7
565282
- replace gethostbyname with getaddrinfo
565282
565282
* Tue Sep 04 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-6
565282
- fix #271741 - smartd-conf.py should allow customization of parameters
565282
- fix #253753 - service starting by default, perhaps shouldn't
565282
- update initscript (related #247058 - initscript review)
565282
565282
* Mon Aug 20 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-5
565282
- add support for 24 disks on 3ware RAID controllers (related #252055)
565282
- fix #245442 - add %%{arm} to smartmontools's set of build archs
565282
- update license tag
565282
565282
* Thu Jun 21 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-4
565282
- fix #241389 - smartd-conf.py pulls in a big dependency chain, so
565282
  build a separate config package
565282
  
565282
* Tue Jun 05 2007 Tomas Smetana <tsmetana@redhat.com> - 1:5.37-3
565282
- fix #241385 - smartmontools missing dependency on mailx
565282
- fix #241388 - unneeded smartd-conf.py[co] installed in /usr/sbin
565282
565282
* Wed Mar  7 2007 Vitezslav Crhonek <vcrhonek@redhat.com> - 1:5.37-2
565282
- re-add cloexec patch
565282
- re-add one erased changelog entry
565282
- compile with -fpie (instead of -fpic)
565282
565282
* Tue Feb 27 2007 Vitezslav Crhonek <vcrhonek@redhat.com> - 1:5.37-1
565282
- new upstream version
565282
565282
* Thu Feb 22 2007 Tomas Mraz <tmraz@redhat.com> - 1:5.36-8
565282
- enable SMART on disks when smartd-conf.py runs (fix
565282
  by Calvin Ostrum) (#214502)
565282
565282
* Mon Feb 12 2007 Tomas Mraz <tmraz@redhat.com> - 1:5.36-7
565282
- redirect service script output to null (#224566)
565282
565282
* Sun Feb 11 2007 Florian La Roche <laroche@redhat.com> - 1:5.36-6
565282
- make sure the preun script does not fail
565282
565282
* Tue Nov  7 2006 Tomas Mraz <tmraz@redhat.com> - 1:5.36-5
565282
- set cloexec on device descriptor so it doesn't leak to sendmail (#214182)
565282
- fixed minor bug in initscript (#213683)
565282
- backported SATA disk detection from upstream
565282
565282
* Fri Aug 18 2006 Jesse Keating <jkeating@redhat.com> - 1:5.36-3
565282
- rebuilt with latest binutils to pick up 64K -z commonpagesize on ppc*
565282
  (#203001)
565282
565282
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1:5.36-2.1
565282
- rebuild
565282
565282
* Tue Jun 27 2006 Tomas Mraz <tmraz@redhat.com> - 1:5.36-2
565282
- kudzu is deprecated, replace it with HAL (#195752)
565282
- moved later in the boot process so haldaemon is already running
565282
  when drives are being detected
565282
565282
* Thu May 11 2006 Tomas Mraz <tmraz@redhat.com> - 1:5.36-1
565282
- new upstream version
565282
- included patch with support for cciss controllers (#191288)
565282
565282
* Tue May  2 2006 Tomas Mraz <tmraz@redhat.com> - 1:5.33-8
565282
- regenerate smartd.conf on every startup if the config file
565282
  is autogenerated (#190065)
565282
565282
* Fri Mar 24 2006 Tomas Mraz <tmraz@redhat.com> - 1:5.33-7
565282
- add missing quotes to /etc/sysconfig/smartmontools
565282
565282
* Wed Mar 22 2006 Tomas Mraz <tmraz@redhat.com> - 1:5.33-6
565282
- test SATA drives correctly
565282
565282
* Wed Mar 22 2006 Tomas Mraz <tmraz@redhat.com> - 1:5.33-5
565282
- add default /etc/sysconfig/smartmontools file
565282
- ignore errors on startup (#186130)
565282
- test drive for SMART support before adding it to smartd.conf
565282
565282
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1:5.33-4.2
565282
- bump again for double-long bug on ppc(64)
565282
565282
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1:5.33-4.1
565282
- rebuilt for new gcc4.1 snapshot and glibc changes
565282
565282
* Fri Dec 16 2005 Tomas Mraz <tmraz@redhat.com> 1:5.33-4
565282
- mail should be sent to root not root@localhost (#174252)
565282
565282
* Fri Nov 25 2005 Tomas Mraz <tmraz@redhat.com> 1:5.33-3
565282
- add libata disks with -d ata if the libata version
565282
  is new enough otherwise do not add them (#145859, #174095)
565282
565282
* Thu Nov  3 2005 Tomas Mraz <tmraz@redhat.com> 1:5.33-2
565282
- Spec file cleanup by Robert Scheck <redhat@linuxnetz.de> (#170959)
565282
- manual release numbering
565282
- remove bogus patch of non-installed file
565282
- only non-removable drives should be added to smartd.conf
565282
- smartd.conf should be owned (#171498)
565282
565282
* Tue Oct 25 2005 Dave Jones <davej@redhat.com>
565282
- Add comments to generated smartd.conf (#135397)
565282
565282
* Thu Aug 04 2005 Karsten Hopp <karsten@redhat.de>
565282
- package all python files
565282
565282
* Tue Mar  1 2005 Dave Jones <davej@redhat.com>
565282
- Rebuild for gcc4
565282
565282
* Wed Feb  9 2005 Dave Jones <davej@redhat.com>
565282
- Build on PPC32 too (#147090)
565282
565282
* Sat Dec 18 2004 Dave Jones <davej@redhat.com>
565282
- Initial packaging, based upon kernel-utils.
565282