Cleanup spec, use %%licenece, drop old sys-v migration bits

This commit is contained in:
Peter Robinson 2018-07-04 14:17:20 +01:00
parent 3670e47a52
commit 9cf96bee0a

View File

@ -1,7 +1,10 @@
Summary: The mdadm program controls Linux md devices (software RAID arrays)
Name: mdadm
Version: 4.0
Release: 6%{?dist}
Release: 7%{?dist}
Summary: The mdadm program controls Linux md devices (software RAID arrays)
URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/
License: GPLv2+
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz
Source1: mdmonitor.init
Source2: raid-check
@ -19,17 +22,12 @@ Patch95: replace-snprintf-with-strncpy-at-some-places.patch
Patch96: specify-enough-length-when-write-to-buffer.patch
Patch97: mdadm-3.3-udev.patch
Patch98: mdadm-2.5.2-static.patch
URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/
License: GPLv2+
Group: System Environment/Base
Obsoletes: mdctl,raidtools
Obsoletes: mdadm-sysvinit
Conflicts: dracut < 034-1
Requires(post): systemd-units chkconfig coreutils
BuildRequires: systemd-units binutils-devel
Requires(preun): systemd-units
Requires(postun): systemd-units coreutils
BuildRequires: systemd binutils-devel
Requires: libreport-filesystem
Requires(post): systemd coreutils
Requires(preun): systemd
Requires(postun): systemd coreutils
%define _hardened_build 1
@ -55,7 +53,6 @@ file can be used to help with some common tasks.
make %{?_smp_mflags} CXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" SYSCONFDIR="%{_sysconfdir}" mdadm mdmon
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} MANDIR=%{_mandir} BINDIR=%{_sbindir} SYSTEMD_DIR=%{_unitdir} install install-systemd
install -Dp -m 755 %{SOURCE2} %{buildroot}%{_sbindir}/raid-check
install -Dp -m 644 %{SOURCE3} %{buildroot}%{_udevrulesdir}/65-md-incremental.rules
@ -87,15 +84,9 @@ install -m644 %{SOURCE8} %{buildroot}/etc/libreport/events.d
%postun
%systemd_postun_with_restart mdmonitor.service
%triggerun -- %{name} < 3.2.2-3
%{_bindir}/systemd-sysv-convert --save mdmonitor >/dev/null 2>&1 || :
/bin/systemctl --no-reload enable mdmonitor.service >/dev/null 2>&1 || :
/sbin/chkconfig --del mdmonitor >/dev/null 2>&1 || :
/bin/systemctl try-restart mdmonitor.service >/dev/null 2>&1 || :
%files
%defattr(-,root,root,-)
%doc TODO ChangeLog mdadm.conf-example COPYING misc/*
%license COPYING
%doc TODO ChangeLog mdadm.conf-example misc/*
%{_udevrulesdir}/*
%{_sbindir}/*
%{_unitdir}/*
@ -108,6 +99,9 @@ install -m644 %{SOURCE8} %{buildroot}/etc/libreport/events.d
/etc/libreport/events.d/*
%changelog
* Wed Jul 4 2018 Peter Robinson <pbrobinson@fedoraproject.org> 4.0-7
- Cleanup spec, use %%licenece, drop old sys-v migration bits
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild