commit
2e39e3c5e8
@ -1,12 +0,0 @@
|
|||||||
diff -up a/smartmontools-5.38/smartd.conf.defaultconf b/smartmontools-5.38/smartd.conf
|
|
||||||
--- a/smartmontools-5.38/smartd.conf.defaultconf 2008-08-07 12:21:53.000000000 +0200
|
|
||||||
+++ b/smartmontools-5.38/smartd.conf 2008-08-07 12:24:26.000000000 +0200
|
|
||||||
@@ -20,7 +20,7 @@
|
|
||||||
# Directives listed below, which will be applied to all devices that
|
|
||||||
# are found. Most users should comment out DEVICESCAN and explicitly
|
|
||||||
# list the devices that they wish to monitor.
|
|
||||||
-DEVICESCAN
|
|
||||||
+DEVICESCAN -H -m root -M exec /usr/libexec/smartmontools/smartdnotify -n standby,10,q
|
|
||||||
|
|
||||||
# Alternative setting to ignore temperature and power-on hours reports
|
|
||||||
# in syslog.
|
|
||||||
33
smartdnotify
33
smartdnotify
@ -1,33 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
|
|
||||||
# Send mail
|
|
||||||
if which mail >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
echo "$SMARTD_MESSAGE" | mail -s "$SMARTD_FAILTYPE" "$SMARTD_ADDRESS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Notify desktop user
|
|
||||||
MESSAGE="SMART Disk monitor:"
|
|
||||||
case "$SMARTD_FAILTYPE" in
|
|
||||||
"EmailTest"|"Health"|"Temperature"|"Usage")
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# "CurrentPendingSector", // 10
|
|
||||||
# "OfflineUncorrectableSector", // 11
|
|
||||||
# "FailedReadSmartErrorLog", // 7
|
|
||||||
# "ErrorCount", // 4
|
|
||||||
# "FailedReadSmartData", // 6
|
|
||||||
# "FailedHealthCheck", // 5
|
|
||||||
# "FailedOpenDevice", // 9
|
|
||||||
# "SelfTest", // 3
|
|
||||||
# "FailedReadSmartSelfTestLog", // 8
|
|
||||||
exit 0
|
|
||||||
esac
|
|
||||||
|
|
||||||
# direct write to terminals, do not use 'wall', because we don't want its ugly header
|
|
||||||
for t in $(who | awk '{ print $2; }' | grep -e '^tty' -e '^pts/')
|
|
||||||
do
|
|
||||||
echo "$MESSAGE
|
|
||||||
$SMARTD_MESSAGE" >/dev/$t 2>/dev/null ||:
|
|
||||||
done
|
|
||||||
|
|
||||||
@ -1,17 +1,13 @@
|
|||||||
Name: smartmontools
|
Name: smartmontools
|
||||||
Version: 6.6
|
Version: 6.6
|
||||||
Release: 6
|
Release: 7
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: S.M.A.R.T. utility toolset
|
Summary: S.M.A.R.T. utility toolset
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://smartmontools.sourceforge.net/
|
URL: http://smartmontools.sourceforge.net/
|
||||||
|
|
||||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||||
Source1: smartmontools.sysconf
|
|
||||||
Source2: smartdnotify
|
|
||||||
Source3: drivedb.h
|
|
||||||
|
|
||||||
Patch0: 0000-smartmontools-5.38-defaultconf.patch
|
|
||||||
Patch6000: 6000-os_linux.cpp-os_netbsd.cpp-fix-crash-on-scan-if-WITH.patch
|
Patch6000: 6000-os_linux.cpp-os_netbsd.cpp-fix-crash-on-scan-if-WITH.patch
|
||||||
Patch6001: 6001-ataprint.cpp-Fix-detection-of-Device-Statistics-log-.patch
|
Patch6001: 6001-ataprint.cpp-Fix-detection-of-Device-Statistics-log-.patch
|
||||||
Patch6002: 6002-drivedb.h.patch
|
Patch6002: 6002-drivedb.h.patch
|
||||||
@ -53,7 +49,6 @@ This contains man files for the using of smartmontools.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
cp %{SOURCE3} .
|
|
||||||
%autosetup -n %{name}-%{version} -p2
|
%autosetup -n %{name}-%{version} -p2
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -61,16 +56,12 @@ autoreconf -i
|
|||||||
%configure --with-selinux --with-libcap-ng=yes --with-systemdsystemunitdir=%{_unitdir} --sysconfdir=%{_sysconfdir}/%{name}/
|
%configure --with-selinux --with-libcap-ng=yes --with-systemdsystemunitdir=%{_unitdir} --sysconfdir=%{_sysconfdir}/%{name}/
|
||||||
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS -fpie" LDFLAGS="-pie -Wl,-z,relro,-z,now"
|
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS -fpie" LDFLAGS="-pie -Wl,-z,relro,-z,now"
|
||||||
|
|
||||||
sed -i 's|/etc/smartmontools/sysconfig|/etc/sysconfig|g' smartd.service
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/smartd_warning.d
|
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/smartd_warning.d
|
||||||
install -D -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/smartmontools
|
|
||||||
install -D -p -m 755 %{SOURCE2} %{buildroot}%{_libexecdir}/%{name}/smartdnotify
|
|
||||||
mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
|
mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
@ -88,11 +79,9 @@ mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
|
|||||||
%dir %{_sysconfdir}/%{name}/smartd_warning.d
|
%dir %{_sysconfdir}/%{name}/smartd_warning.d
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/smartd.conf
|
%config(noreplace) %{_sysconfdir}/%{name}/smartd.conf
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/smartd_warning.sh
|
%config(noreplace) %{_sysconfdir}/%{name}/smartd_warning.sh
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/smartmontools
|
|
||||||
%{_unitdir}/smartd.service
|
%{_unitdir}/smartd.service
|
||||||
%{_sbindir}/{smartd,update-smart-drivedb,smartctl}
|
%{_sbindir}/{smartd,update-smart-drivedb,smartctl}
|
||||||
%{_datadir}/%{name}
|
%{_datadir}/%{name}
|
||||||
%{_libexecdir}/%{name}
|
|
||||||
%{_sharedstatedir}/%{name}
|
%{_sharedstatedir}/%{name}
|
||||||
|
|
||||||
|
|
||||||
@ -101,11 +90,17 @@ mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 1:6.6-7
|
||||||
|
- Type:enhancemnet
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:Repackage
|
||||||
|
|
||||||
* Wed Aug 21 2019 zhanghaibo <ted.zhang@huawei.com> - 1:6.6-6
|
* Wed Aug 21 2019 zhanghaibo <ted.zhang@huawei.com> - 1:6.6-6
|
||||||
- Type:enhancemnet
|
- Type:enhancemnet
|
||||||
- ID:NA
|
- ID:NA
|
||||||
- SUG:NA
|
- SUG:NA
|
||||||
- DESCi:openEuler Debranding
|
- DESC:openEuler Debranding
|
||||||
|
|
||||||
* Wed Aug 21 2019 Su Weifeng <suweifeng1@huawei.com> - 1:6.6-5.h2
|
* Wed Aug 21 2019 Su Weifeng <suweifeng1@huawei.com> - 1:6.6-5.h2
|
||||||
- Type:other
|
- Type:other
|
||||||
|
|||||||
@ -1,6 +0,0 @@
|
|||||||
# command line options for smartd
|
|
||||||
# Add -s /var/lib/smartmontools to enable state persistence
|
|
||||||
smartd_opts="-q never"
|
|
||||||
|
|
||||||
# autogenerated config file options
|
|
||||||
# smartd_conf_opts="-H -m root"
|
|
||||||
Loading…
x
Reference in New Issue
Block a user