Repackage
This commit is contained in:
parent
fd5adad55e
commit
98cf7fa179
@ -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,14 @@
|
||||
Name: smartmontools
|
||||
Version: 6.6
|
||||
Release: 6
|
||||
Release: 7
|
||||
Epoch: 1
|
||||
Summary: S.M.A.R.T. utility toolset
|
||||
License: GPLv2+
|
||||
URL: http://smartmontools.sourceforge.net/
|
||||
|
||||
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
|
||||
Patch6001: 6001-ataprint.cpp-Fix-detection-of-Device-Statistics-log-.patch
|
||||
Patch6002: 6002-drivedb.h.patch
|
||||
@ -53,7 +50,6 @@ This contains man files for the using of smartmontools.
|
||||
|
||||
|
||||
%prep
|
||||
cp %{SOURCE3} .
|
||||
%autosetup -n %{name}-%{version} -p2
|
||||
|
||||
%build
|
||||
@ -61,16 +57,12 @@ autoreconf -i
|
||||
%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"
|
||||
|
||||
sed -i 's|/etc/smartmontools/sysconfig|/etc/sysconfig|g' smartd.service
|
||||
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
|
||||
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}
|
||||
|
||||
%preun
|
||||
@ -88,7 +80,6 @@ mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
|
||||
%dir %{_sysconfdir}/%{name}/smartd_warning.d
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/smartd.conf
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/smartd_warning.sh
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/smartmontools
|
||||
%{_unitdir}/smartd.service
|
||||
%{_sbindir}/{smartd,update-smart-drivedb,smartctl}
|
||||
%{_datadir}/%{name}
|
||||
@ -101,11 +92,17 @@ mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
|
||||
|
||||
|
||||
%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
|
||||
- Type:enhancemnet
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESCi:openEuler Debranding
|
||||
- DESC:openEuler Debranding
|
||||
|
||||
* Wed Aug 21 2019 Su Weifeng <suweifeng1@huawei.com> - 1:6.6-5.h2
|
||||
- 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