smartmontools/smartmontools.spec
eulerstorage 5c0d047c81 Repackage
2020-01-11 14:27:11 +08:00

129 lines
4.1 KiB
RPMSpec

Name: smartmontools
Version: 6.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
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
Patch6003: 6003-update-smart-drivedb.in-Include-configured-PATH-in-h.patch
Patch6004: 6004-os_linux.cpp-Add-missing-braces-to-3ware-SELinux-cod.patch
Patch6005: 6005-drivedb.h-fix-Innolite-Satadom-D150QV-entry-939.patch
Patch6006: 6006-os_freebsd.cpp-on-error-was-setting-set_nvme_err-to-.patch
Patch6007: 6007-os_linux.cpp-Fix-device-scan-crash-on-missing-proc-d.patch
Patch6008: 6008-smartd.cpp-Always-ignore-failure-of-ATA-SMART-ENABLE.patch
Patch6009: 6009-os_linux.cpp-Fix-d-megaraid-open-crash-on-missing-pr.patch
Patch6010: 6010-os_darwin.cpp-os_freebsd.cpp-fix-return-value-in-err.patch
Patch6011: 6011-ataprint.cpp-Fix-Form-Factor-string-with-bits-set-in.patch
BuildRequires: groff gcc-c++ automake
BuildRequires: libselinux-devel libcap-ng-devel systemd-units
Requires(preun): systemd-units
Requires(post): systemd-units
Requires(postun): systemd-units
%description
smartmontools contains utilities that control and monitor storage
devices using the Self-Monitoring, Analysis and Reporting Technology
(SMART) system build into ATA/SATA and SCSI/SAS hard drives and
solid-state drives. This is used to check the reliability of the
drive and to predict drive failures.
%package help
Summary: Including man files for smartmontools
Requires: man
%description help
This contains man files for the using of smartmontools.
%prep
%autosetup -n %{name}-%{version} -p2
%build
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"
%install
%make_install
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/smartd_warning.d
mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
%preun
%systemd_preun smartd.service
%post
%systemd_post smartd.service
%postun
%systemd_postun_with_restart smartd.service
%files
%doc %{_docdir}/%{name}
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/smartd_warning.d
%config(noreplace) %{_sysconfdir}/%{name}/smartd.conf
%config(noreplace) %{_sysconfdir}/%{name}/smartd_warning.sh
%{_unitdir}/smartd.service
%{_sbindir}/{smartd,update-smart-drivedb,smartctl}
%{_datadir}/%{name}
%{_libexecdir}/%{name}
%{_sharedstatedir}/%{name}
%files help
%{_mandir}/man*/{smart*,update-smart*}
%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
- DESC:openEuler Debranding
* Wed Aug 21 2019 Su Weifeng <suweifeng1@huawei.com> - 1:6.6-5.h2
- Type:other
- ID:NA
- SUG:NA
- DESC:rename patches
* Thu Apr 18 2019 yangzhuangzhuang<yangzhuangzhuang1@huawei.com> - 1:6.6-5.h1
- Type:bugfix
- ID:NA
- SUG:restart
- DESC:os_linux.cpp/os_netbsd.cpp: fix crash on --scan if WITH_NVME_DEVICESC is not set and '-d <type>' is not specified
ataprint.cpp: Fix detection of Device Statistics log with 256 sectors (#922)
drivedb.h: - Western Digital Red: WD80EZZX - USB: WD
update-smart-drivedb.in: Include configured PATH in help and error messages
os_linux.cpp: Add missing braces to 3ware SELinux code
drivedb.h: fix Innolite Satadom D150QV entry (#939)
os_freebsd.cpp: on error was setting set_nvme_err() to 1
os_linux.cpp: Fix device scan crash on missing /proc/devices
smartd.cpp: Always ignore failure of ATA SMART ENABLE command if
os_linux.cpp: Fix '-d megaraid' open crash on missing /proc/devices
os_darwin.cpp, os_freebsd.cpp: fix return value in error paths
ataprint.cpp: Fix Form Factor string with bits set in reserved area
- Package init