mdadm/mdadm.spec
Neil Brown 4e64570fc4 - New upstream release 4.0
Multiple bugfixes and various enhancements
  including IMSM support for bad blocks and 4K block devices.
  (FATE#321941)
- 0001-Generic-support-for-consistency-policy-and-PPL.patch
- 0002-Detail-show-consistency-policy.patch
- 0003-imsm-PPL-support.patch
- 0004-super1-PPL-support.patch
- 0005-Add-ppl-and-no-ppl-options-for-update.patch
- 0006-Grow-support-consistency-policy-change.patch
   Add support for Partial Parity Logs
   (FATE#321941)
- 0007-udev-md-raid-assembly.rules-Skip-non-ready-devices.patch
   (bsc#956236)
- 0008-Retry-HOT_REMOVE_DISK-a-few-times.patch
   (bsc#808647)
- 0009-Introduce-sys_hot_remove_disk.patch
   (bsc#974154)
- 0010-Add-force-flag-to-hot_remove_disk.patch
   (bsc#808647)
- 0011-Detail-handle-non-existent-arrays-better.patch
   (bsc#966773)

OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=147
2017-03-27 03:26:19 +00:00

149 lines
4.9 KiB
RPMSpec

#
# spec file for package mdadm
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: mdadm
Version: 4.0
Release: 0
BuildRequires: binutils-devel
BuildRequires: groff
BuildRequires: pkgconfig
BuildRequires: sgmltool
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(udev)
PreReq: %fillup_prereq /sbin/mkinitrd coreutils
Recommends: cron
Recommends: smtp_daemon
Url: http://www.kernel.org/pub/linux/utils/raid/mdadm/
Summary: Utility for Configuring MD Setup
License: GPL-2.0
Group: System/Base
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: https://www.kernel.org/pub/linux/utils/raid/mdadm/%{name}-%{version}.tar.xz
Source1: Software-RAID.HOWTO.tar.bz2
Source2: sysconfig.mdadm
Source3: cron.d.mdadm
Source7: mdadm.cron
Patch0: 0002-The-mdcheck-script-now-adds-messages-to-the-system.patch
Patch1: 0001-Generic-support-for-consistency-policy-and-PPL.patch
Patch2: 0002-Detail-show-consistency-policy.patch
Patch3: 0003-imsm-PPL-support.patch
Patch4: 0004-super1-PPL-support.patch
Patch5: 0005-Add-ppl-and-no-ppl-options-for-update.patch
Patch6: 0006-Grow-support-consistency-policy-change.patch
Patch7: 0007-udev-md-raid-assembly.rules-Skip-non-ready-devices.patch
Patch8: 0008-Retry-HOT_REMOVE_DISK-a-few-times.patch
Patch9: 0009-Introduce-sys_hot_remove_disk.patch
Patch10: 0010-Add-force-flag-to-hot_remove_disk.patch
Patch11: 0011-Detail-handle-non-existent-arrays-better.patch
%define _udevdir %(pkg-config --variable=udevdir udev)
%define _systemdshutdowndir %{_unitdir}/../system-shutdown
%description
Mdadm is a program that can be used to control Linux md devices. It is
intended to provide all the functionality of the mdtools and raidtools
programs but with a very different interface.
%prep
%setup -q -a1
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%build
make %{?_smp_mflags} CC="%__cc" CXFLAGS="$RPM_OPT_FLAGS -Wno-error" SUSE=yes
cd Software-RAID.HOWTO
sgml2html Software-RAID.HOWTO.sgml
sgml2txt Software-RAID.HOWTO.sgml
%install
make install install-systemd install-udev DESTDIR=%{buildroot} SYSTEMD_DIR=%{_unitdir} UDEVDIR=%{_udevdir} SUSE=yes
rm -rf %{buildroot}/lib/udev
install -d %{buildroot}%{_var}/adm/fillup-templates
install -d %{buildroot}/usr/share/mdadm
install -m 755 misc/mdcheck %{buildroot}/usr/share/mdadm/mdcheck
install -d %{buildroot}/etc/cron.daily
install -d %{buildroot}/etc/cron.d
install -m 755 %{S:7} %{buildroot}/etc/cron.daily/mdadm
install -m 644 %{S:3} %{buildroot}/etc/cron.d/mdadm
install -m 644 %{S:2} %{buildroot}%{_var}/adm/fillup-templates/
install -d %{buildroot}%{_systemdshutdowndir}
install -d %{buildroot}%{_sbindir}
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcmdmonitor
%define services mdmonitor.service
%pre
%service_add_pre %services
%post
%service_add_post %services
%{?regenerate_initrd_post}
%fillup_only
%preun
%service_del_preun %services mdmon@.service mdadm-last-resort@.service mdadm-grow-continue@.service
%postun
%service_del_postun %services
%{?regenerate_initrd_post}
%posttrans
%{?regenerate_initrd_posttrans}
%files
%defattr(-,root,root)
%doc COPYING ChangeLog README.initramfs TODO mdadm.conf-example mkinitramfs
%doc Software-RAID.HOWTO/Software-RAID.HOWTO*{.txt,.html}
%doc %{_mandir}/man?/*
/sbin/*
%{_sbindir}/rcmdmonitor
%dir /usr/share/mdadm
/usr/share/mdadm/*
%{_var}/adm/fillup-templates/sysconfig.mdadm
%{_udevdir}/rules.d/63-md-raid-arrays.rules
%{_udevdir}/rules.d/64-md-raid-assembly.rules
%dir /etc/cron.daily
/etc/cron.daily/mdadm
%dir /etc/cron.d
%config /etc/cron.d/mdadm
# %%{_systemdshutdowndir}/ is not owned by all versions of systemd-mini.
# But we really do not want to pull in a full systemd, so we rather just own
# that directory by ourselves too. After all, this is allowed.
%dir %{_systemdshutdowndir}
%{_systemdshutdowndir}/mdadm.shutdown
%{_unitdir}/mdmon@.service
%{_unitdir}/mdmonitor.service
%{_unitdir}/mdadm-last-resort@.timer
%{_unitdir}/mdadm-last-resort@.service
%{_unitdir}/mdadm-grow-continue@.service
%dir %{_unitdir}/../scripts
%{_unitdir}/../scripts/mdadm_env.sh
%changelog