diff --git a/0.18.tar.gz b/0.18.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..50e50a969af4d7ba465019ec71f3d8b12d945a8b Binary files /dev/null and b/0.18.tar.gz differ diff --git a/edac-utils-0.16.tar.bz2 b/edac-utils-0.16.tar.bz2 deleted file mode 100644 index 09f242b9149f6b79c767ae5142a41080c8dc5eee..0000000000000000000000000000000000000000 Binary files a/edac-utils-0.16.tar.bz2 and /dev/null differ diff --git a/edac-utils.spec b/edac-utils.spec index 798260a9c2906380970f4d0f2642b0ab7107a795..d75ee0d740f8ff9ad92fcdba6583a6c1ef75eb49 100644 --- a/edac-utils.spec +++ b/edac-utils.spec @@ -1,93 +1,90 @@ -Name: edac-utils -Version: 0.16 -Release: 20 -Summary: Userspace helper for Linux kernel EDAC drivers -License: GPLv2+ -URL: https://sourceforge.net/projects/edac-utils/ -Source0: https://sourceforge.net/projects/edac-utils/files/edac-utils/%{version}/%{name}-%{version}.tar.bz2 -Source1: edac.service - -ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 -BuildRequires: gcc libsysfs-devel systemd perl-generators - -Requires: hwdata systemd sysfsutils - -%description -EDAC (Error Detection and Correction) is a set of Linux kernel -modules that handle reporting of hardware-related errors. Currently -these modules mainly handle detection of ECC memory errors for many -x86 and x86-64 chipsets and PCI bus parity errors. - -%package devel -Summary: edac libs and headers +Name: edac-utils +Version: 0.18 +Release: 1 +Summary: Userspace helper for kernel EDAC drivers +License: GPLv2+ +URL: https://github.com/grondo/edac-utils + +ExcludeArch: s390x +Source0: https://github.com/grondo/edac-utils/archive/refs/tags/0.18.tar.gz +Source1: edac.service + +%ifarch %{ix86} x86_64 +Requires: dmidecode +%endif +Requires: hwdata +Requires: sysfsutils +Requires: systemd +BuildRequires: gcc +BuildRequires: libsysfs-devel +BuildRequires: make +BuildRequires: perl-generators +BuildRequires: systemd +BuildRequires: systemd-devel + +%description +EDAC is the current set of drivers in the Linux kernel that handle +detection of ECC errors from memory controllers for most chipsets +on i386 and x86_64 architectures. This userspace component consists +of an init script which makes sure EDAC drivers and DIMM labels +are loaded at system startup, as well as a library and utility +for reporting current error counts from the EDAC sysfs files. + +%package devel +Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} -%description devel -headers and libs for %{name}. - -%package_help +%description devel +This package contains the development headers and libraries +for %{name}. %prep -%autosetup -n %{name}-%{version} -p1 +%autosetup -p1 %build -%configure -%make_build +%configure --disable-static +%{make_build} %install -rm -rf %RPM_BUILD_ROOT -%make_install -install -p -D -m 0644 %{SOURCE1} %{buildroot}/usr/lib/systemd/system/edac.service -rm -rf %{buildroot}%{_sysconfdir}/init.d/edac -%delete_la_and_a +%{make_install} +# Remove libtool archive +find %{buildroot} -type f -name "*.la" -delete + +install -D -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/edac.service +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/edac %check make check -%pre +%ldconfig_scriptlets + %post -ldconfig -# first time install -if [ $1 -eq 1 ]; then - systemctl daemon-reload || : -fi +%systemd_post edac.service %preun -ldconfig -# uninstall -if [ $1 -eq 0 ]; then - systemctl stop edac || : - systemctl disable edac || : -fi +%systemd_preun edac.service + %postun -ldconfig -#upgrade, remove old package -if [ $1 -eq 1 ]; then - systemctl daemon-reload - systemctl restart edac > /dev/null || : -fi - -%files -%defattr(-,root,root) -%doc COPYING ChangeLog DISCLAIMER NEWS README -%{_bindir}/* -%{_libdir}/libedac.so.* -%config(noreplace) %{_sysconfdir}/edac/* -%{_prefix}/lib/systemd/system/edac.service +%systemd_postun_with_restart edac.service + +%files +%license COPYING +%doc README NEWS DISCLAIMER %{_sbindir}/edac-ctl +%{_bindir}/edac-util +%{_libdir}/libedac.so.1* +%{_mandir}/*/edac* +%dir %attr(0755,root,root) %{_sysconfdir}/edac +%config(noreplace) %{_sysconfdir}/edac/* +%{_unitdir}/edac.service %files devel -%defattr(-,root,root) -%{_includedir}/edac.h %{_libdir}/libedac.so - -%files help -%defattr(-,root,root) -%doc NEWS README -%{_mandir}/man1/* -%{_mandir}/man3/edac.3.gz -%{_mandir}/man8/edac-ctl.8.gz +%{_includedir}/edac.h %changelog +* Wed Jul 7 2021 chenjian - 0.18-1 +- Update to 0.18-1 + * Tue Aug 13 2019 openEuler Builteam - 0.16-20 - Package init