- Spec file cleanup by Robert Scheck <redhat@linuxnetz.de> (#170959)
- manual release numbering - remove bogus patch of non-installed file - only non-removable drives should be added to smartd.conf - smartd.conf should be owned (#171498)
This commit is contained in:
parent
bb500ef0f8
commit
c4cbeb9679
@ -35,7 +35,9 @@ print """# /etc/smartd.conf
|
|||||||
# But send an email in this case"""
|
# But send an email in this case"""
|
||||||
|
|
||||||
for drive in drives:
|
for drive in drives:
|
||||||
print "/dev/%s -H -m root@localhost" % drive.device
|
fh=open("/sys/block/%s/removable" % drive.device)
|
||||||
|
if fh.read(1) == '0':
|
||||||
|
print "/dev/%s -H -m root@localhost" % drive.device
|
||||||
|
|
||||||
print """
|
print """
|
||||||
# First two SCSI disks. This will monitor everything that smartd can
|
# First two SCSI disks. This will monitor everything that smartd can
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
Summary: Tools for monitoring SMART capable hard disks.
|
Summary: Tools for monitoring SMART capable hard disks
|
||||||
Name: smartmontools
|
Name: smartmontools
|
||||||
Version: 5.33
|
Version: 5.33
|
||||||
Release: %(R="$Revision: 1.8 $"; RR="${R##: }"; echo ${RR%%?})
|
Release: 2
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
License: GPL
|
License: GPL
|
||||||
Source0: smartmontools-%{version}.tar.gz
|
URL: http://smartmontools.sourceforge.net/
|
||||||
|
Source0: http://dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz
|
||||||
Source1: smartd.initd
|
Source1: smartd.initd
|
||||||
Source2: smartd-conf.py
|
Source2: smartd-conf.py
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
Prereq: /sbin/chkconfig /sbin/service
|
PreReq: /sbin/chkconfig /sbin/service
|
||||||
Requires: fileutils kudzu
|
Requires: fileutils kudzu
|
||||||
BuildPreReq: readline-devel ncurses-devel /usr/bin/aclocal /usr/bin/automake /usr/bin/autoconf util-linux groff gettext
|
BuildRequires: readline-devel ncurses-devel /usr/bin/aclocal /usr/bin/automake /usr/bin/autoconf util-linux groff gettext
|
||||||
Obsoletes: kernel-utils
|
Obsoletes: kernel-utils
|
||||||
ExclusiveArch: i386 x86_64 ia64 ppc ppc64
|
ExclusiveArch: i386 x86_64 ia64 ppc ppc64
|
||||||
|
|
||||||
Patch1: smartmontools-smartd.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The smartmontools package contains two utility programs (smartctl
|
The smartmontools package contains two utility programs (smartctl
|
||||||
and smartd) to control and monitor storage systems using the Self-
|
and smartd) to control and monitor storage systems using the Self-
|
||||||
@ -25,45 +24,35 @@ into most modern ATA and SCSI hard disks. In many cases, these
|
|||||||
utilities will provide advanced warning of disk degradation and
|
utilities will provide advanced warning of disk degradation and
|
||||||
failure.
|
failure.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -c -a 0
|
%setup -q
|
||||||
%patch1 -p0
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}/usr/sbin
|
|
||||||
mkdir -p %{buildroot}/usr/man
|
|
||||||
mkdir -p %{buildroot}/etc/rc.d/init.d
|
|
||||||
mkdir -p %{buildroot}/etc/sysconfig
|
|
||||||
|
|
||||||
cd smartmontools-%{version}
|
|
||||||
%configure
|
%configure
|
||||||
make CFLAGS="$RPM_OPT_FLAGS -fpie -pie -Wl,-z,relro,-z,now" DESTDIR=$RPM_BUILD_ROOT smartd smartctl install
|
make CFLAGS="$RPM_OPT_FLAGS -fpie" LDFLAGS="-pie -Wl,-z,relro,-z,now"
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}/usr/share/man/man{1,8}
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
|
|
||||||
cd smartmontools-%{version}
|
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/smartd.conf
|
||||||
rm -f %{buildroot}/etc/smartd.conf
|
rm -f examplescripts/Makefile*
|
||||||
rm -f %{buildroot}/etc/rc.d/init.d/smartd.conf
|
install -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/smartd
|
||||||
install %{SOURCE1} %{buildroot}/etc/rc.d/init.d/smartd
|
install -D -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_sbindir}/smartd-conf.py
|
||||||
install %{SOURCE2} %{buildroot}/usr/sbin/smartd-conf.py
|
|
||||||
|
|
||||||
chmod -R a-s %{buildroot}
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%attr(0644,root,root) %{_mandir}/*/*
|
%doc AUTHORS CHANGELOG COPYING INSTALL NEWS README
|
||||||
/usr/sbin/smartd
|
%doc TODO WARNINGS examplescripts smartd.conf
|
||||||
/usr/sbin/smartctl
|
%{_sbindir}/smartd
|
||||||
/usr/sbin/smartd-conf.py*
|
%{_sbindir}/smartctl
|
||||||
/etc/rc.d/init.d/smartd
|
%{_sbindir}/smartd-conf.py*
|
||||||
%doc /usr/share/doc/smartmontools-%{version}
|
%{_sysconfdir}/rc.d/init.d/smartd
|
||||||
|
%{_mandir}/man?/smart*.*
|
||||||
|
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/smartd.conf
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ "$1" = "0" ] ; then
|
if [ "$1" = "0" ] ; then
|
||||||
@ -80,6 +69,13 @@ exit 0
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 3 2005 Tomas Mraz <tmraz@redhat.com> 1:5.33-2
|
||||||
|
- Spec file cleanup by Robert Scheck <redhat@linuxnetz.de> (#170959)
|
||||||
|
- manual release numbering
|
||||||
|
- remove bogus patch of non-installed file
|
||||||
|
- only non-removable drives should be added to smartd.conf
|
||||||
|
- smartd.conf should be owned (#171498)
|
||||||
|
|
||||||
* Tue Oct 25 2005 Dave Jones <davej@redhat.com>
|
* Tue Oct 25 2005 Dave Jones <davej@redhat.com>
|
||||||
- Add comments to generated smartd.conf (#135397)
|
- Add comments to generated smartd.conf (#135397)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user