2007-01-10 17:49:57 +01:00
|
|
|
#
|
2011-02-18 12:25:57 +01:00
|
|
|
# spec file for package mdadm
|
2007-01-10 17:49:57 +01:00
|
|
|
#
|
2014-01-22 05:59:00 +01:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-10 17:49:57 +01:00
|
|
|
#
|
2008-08-18 00:16:04 +02:00
|
|
|
# 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.
|
|
|
|
|
2007-01-10 17:49:57 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-04-20 10:01:08 +02:00
|
|
|
|
2007-01-10 17:49:57 +01:00
|
|
|
Name: mdadm
|
2013-09-03 07:46:59 +02:00
|
|
|
Version: 3.3
|
2011-12-22 13:42:21 +01:00
|
|
|
Release: 0
|
2012-05-18 09:23:54 +02:00
|
|
|
BuildRequires: binutils-devel
|
2013-06-13 06:16:10 +02:00
|
|
|
BuildRequires: groff
|
2012-11-04 03:24:36 +01:00
|
|
|
BuildRequires: pkgconfig
|
2007-10-25 02:35:29 +02:00
|
|
|
BuildRequires: sgmltool
|
2012-11-04 03:24:36 +01:00
|
|
|
BuildRequires: pkgconfig(libudev)
|
|
|
|
BuildRequires: pkgconfig(systemd)
|
2012-04-20 10:01:08 +02:00
|
|
|
PreReq: %fillup_prereq %insserv_prereq /sbin/mkinitrd
|
2012-06-21 09:26:19 +02:00
|
|
|
Recommends: cron
|
2012-06-25 14:07:01 +02:00
|
|
|
Recommends: smtp_daemon
|
2007-01-10 17:49:57 +01:00
|
|
|
Obsoletes: raidtools
|
2008-10-06 17:46:23 +02:00
|
|
|
Url: http://www.kernel.org/pub/linux/utils/raid/mdadm/
|
2007-01-10 17:49:57 +01:00
|
|
|
Summary: Utility for Configuring MD Setup
|
2013-02-27 23:27:08 +01:00
|
|
|
License: GPL-2.0
|
2011-12-22 13:42:21 +01:00
|
|
|
Group: System/Base
|
2007-01-10 17:49:57 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2013-04-17 10:05:12 +02:00
|
|
|
Source: https://www.kernel.org/pub/linux/utils/raid/mdadm/%{name}-%{version}.tar.bz2
|
2007-01-10 17:49:57 +01:00
|
|
|
Source1: Software-RAID.HOWTO.tar.bz2
|
|
|
|
Source2: sysconfig.mdadm
|
2008-07-25 02:32:37 +02:00
|
|
|
Source5: mkinitrd-setup.sh
|
|
|
|
Source6: mkinitrd-boot.sh
|
2012-05-22 07:18:08 +02:00
|
|
|
Source7: mdadm.cron
|
2013-12-03 04:13:54 +01:00
|
|
|
Source9: systemd-mdadm-last-resort@.timer
|
|
|
|
Source10: systemd-mdadm-last-resort@.service
|
2013-09-13 03:49:53 +02:00
|
|
|
# PATCH-FIX-UPSTREAM config-set-auto_seen-after-processing-the-auto-line.patch upstream-bugfix nfbrown@suse.de
|
|
|
|
Patch1: config-set-auto_seen-after-processing-the-auto-line.patch
|
|
|
|
# PATCH-FIX-UPSTREAM DDF-allow-for-possibility-that-there-is-no-secondary.patch upstream-bugfix nfbrown@suse.de
|
|
|
|
Patch2: DDF-allow-for-possibility-that-there-is-no-secondary.patch
|
|
|
|
# PATCH-FIX-UPSTREAM Make-IRs-and-run-work-properly-for-containers.patch upstream-bugfix nfbrown@suse.de
|
|
|
|
Patch3: Make-IRs-and-run-work-properly-for-containers.patch
|
|
|
|
# PATCH-FIX-UPSTREAM mdmon-honour-offroot-again.patch upstream-bugfix nfbrown@suse.de
|
|
|
|
Patch4: mdmon-honour-offroot-again.patch
|
2013-11-11 01:47:33 +01:00
|
|
|
# PATCH-FIX-UPSTREAM DDF-brief_examine_subarrays_ddf-print-array-name.patch upstream-bugfix nfbrown@suse.de
|
|
|
|
Patch5: DDF-brief_examine_subarrays_ddf-print-array-name.patch
|
|
|
|
# PATCH-FIX-UPSTREAM DDF-factor-out-array-name-generation.patch upstream-bugfix nfbrown@suse.de
|
|
|
|
Patch6: DDF-factor-out-array-name-generation.patch
|
|
|
|
# PATCH-FIX-UPSTREAM DDF-handle-fake-RAIDs-with-changing-subarray-UUIDs.patch upstream-bugfix nfbrown@suse.de
|
|
|
|
Patch7: DDF-handle-fake-RAIDs-with-changing-subarray-UUIDs.patch
|
|
|
|
# PATCH-FIX-UPSTREAM DDF-compare_super_ddf-fix-sequence-number-check.patch upstream-bugfix nfbrown@suse.de
|
|
|
|
Patch8: DDF-compare_super_ddf-fix-sequence-number-check.patch
|
|
|
|
# PATCH-FIX-UPSTREAM Monitor-don-t-set-arrays-dirty-after-transition-to-r.patch upstream-bugfix nfbrown@suse.de
|
|
|
|
Patch9: Monitor-don-t-set-arrays-dirty-after-transition-to-r.patch
|
|
|
|
# PATCH-FIX-UPSTREAM DDF-add_to_super_ddf-be-careful-with-workspace_lba.patch upstream-bugfix nfbrown@suse.de
|
|
|
|
Patch10: DDF-add_to_super_ddf-be-careful-with-workspace_lba.patch
|
|
|
|
# PATCH-FIX-UPSTREAM Monitor-write-meta-data-in-readonly-state-sometimes.patch upstream-bugfix nfbrown@suse.de
|
|
|
|
Patch11: Monitor-write-meta-data-in-readonly-state-sometimes.patch
|
|
|
|
# PATCH-FIX-UPSTREAM Assembe-fix-bug-in-force_array-it-wasn-t-forcing-pro.patch upstream-bugfix nfbrown@suse.de
|
|
|
|
Patch12: Assembe-fix-bug-in-force_array-it-wasn-t-forcing-pro.patch
|
2013-12-03 04:13:54 +01:00
|
|
|
# PATCH-FEATURE-UPSTREAM Restructure-assemble_container_content-and-improve-m.patch bnc#832501 nfbrown@suse.de
|
|
|
|
Patch13: Restructure-assemble_container_content-and-improve-m.patch
|
|
|
|
# PATCH-FEATURE-UPSTREAM Incremental-add-export-handling.patch bnc#832501 nfbrown@suse.de
|
|
|
|
Patch14: Incremental-add-export-handling.patch
|
|
|
|
# PATCH-FEATURE-UPSTREAM udev-rules.degraded bnc#832501 nfbrown@suse.de
|
|
|
|
Patch15: udev-rules.degraded
|
|
|
|
# PATCH-FEATURE-UPSTREAM Incremental-improve-support-for-DEVICE-based-restric.patch bnc#851993 nfbrown@suse.de
|
|
|
|
Patch16: Incremental-improve-support-for-DEVICE-based-restric.patch
|
2013-12-05 00:59:54 +01:00
|
|
|
# PATCH-FIX-UPSTREAM Assemble-Incremental-don-t-hold-O_EXCL-on-mddev-afte.patch nfbrown@suse.de
|
|
|
|
Patch17: Assemble-Incremental-don-t-hold-O_EXCL-on-mddev-afte.patch
|
2014-01-22 05:59:00 +01:00
|
|
|
# PATCH-FIX-UPSTREAM mdmonitor bnc#849523 nfbrown@suse.de
|
|
|
|
Patch18: mdmonitor
|
|
|
|
# PATCH-FIX-UPSTREAM udev-rules-try-mdadm-I-on-change-events.patch bnc#851993 nfbrown@suse.de
|
|
|
|
Patch19: udev-rules-try-mdadm-I-on-change-events.patch
|
|
|
|
# PATCH-FIX-UPSTREAM policy-NULL-path-isn-t-really-acceptable-use-the-dev.patch nfbrown@suse.de
|
|
|
|
Patch20: policy-NULL-path-isn-t-really-acceptable-use-the-dev.patch
|
|
|
|
# PATCH-FIX-UPSTREAM DDF-really-ignore-DDF-metadata-on-partitions.patch nfbrown@suse.de
|
|
|
|
Patch21: DDF-really-ignore-DDF-metadata-on-partitions.patch
|
|
|
|
# PATCH-FIX-UPSTREAM Assemble-avoid-infinite-loop-when-auto-assembling-pa.patch nfbrown@suse.de
|
|
|
|
Patch22: Assemble-avoid-infinite-loop-when-auto-assembling-pa.patch
|
|
|
|
# PATCH-FIX-UPSTREAM DDF-fix-detection-of-failed-devices-during-assembly.patch nfbrown@suse.de
|
|
|
|
Patch23: DDF-fix-detection-of-failed-devices-during-assembly.patch
|
|
|
|
# PATCH-FIX-UPSTREAM Grow-fix-problems-with-prematurely-aborting-of-resha.patch nfbrown@suse.de
|
|
|
|
Patch24: Grow-fix-problems-with-prematurely-aborting-of-resha.patch
|
|
|
|
# PATCH-FIX-UPSTREAM IMSM-don-t-crash-when-creating-an-array-with-missing.patch nfbrown@suse.de
|
|
|
|
Patch25: IMSM-don-t-crash-when-creating-an-array-with-missing.patch
|
|
|
|
# PATCH-FIX-UPSTREAM mdmon-don-t-complain-about-notifying-parent-when-the.patch nfbrown@suse.de
|
|
|
|
Patch26: mdmon-don-t-complain-about-notifying-parent-when-the.patch
|
|
|
|
# PATCH-FIX-UPSTREAM systemd-mdmon-set-IMSM_NO_PLATFORM-1.patch nfbrown@suse.de
|
|
|
|
Patch27: systemd-mdmon-set-IMSM_NO_PLATFORM-1.patch
|
|
|
|
# PATCH-FIX-UPSTREAM mdmon-.service-remove-over-ride-of-Standard-IO.patch nfbrown@suse.de
|
|
|
|
Patch28: mdmon-.service-remove-over-ride-of-Standard-IO.patch
|
2014-04-02 08:19:16 +02:00
|
|
|
# PATCH-FIX-UPSTREAM 0001-Assemble-allow-load_devices-to-change-the-st-which-i.patch bnc#865221 nfbrown@suse.de
|
|
|
|
Patch32: 0001-Assemble-allow-load_devices-to-change-the-st-which-i.patch
|
|
|
|
# PATCH-FIX-UPSTREAM 0002-Assemble-re-arrange-freeing-of-tst-in-load_devices.patch bnc#865221 nfbrown@suse.de
|
|
|
|
Patch33: 0002-Assemble-re-arrange-freeing-of-tst-in-load_devices.patch
|
|
|
|
# PATCH-FIX-UPSTREAM 0003-Assemble-change-load_devices-to-return-most_recent-s.patch bnc#865221 nfbrown@suse.de
|
|
|
|
Patch34: 0003-Assemble-change-load_devices-to-return-most_recent-s.patch
|
|
|
|
# PATCH-FIX-UPSTREAM 0001-mdmon-.service-Change-type-of-process-start-up-to-fo.patch nfbrown@suse.de
|
|
|
|
Patch35: 0001-mdmon-.service-Change-type-of-process-start-up-to-fo.patch
|
|
|
|
# PATCH-FIX-UPSTREAM 0003-Work-around-architectures-having-statfs.f_type-defin.patch nfbrown@suse.de
|
|
|
|
Patch36: 0003-Work-around-architectures-having-statfs.f_type-defin.patch
|
|
|
|
# PATCH-FIX-UPSTREAM 0004-DDF-report-seq-counter-as-events.patch bnc#866660 nfbrown@suse.de
|
|
|
|
Patch37: 0004-DDF-report-seq-counter-as-events.patch
|
|
|
|
# PATCH-FIX-UPSTREAM 0005-DDF-when-first-activating-an-array-record-any-missin.patch bnc#866660 nfbrown@suse.de
|
|
|
|
Patch38: 0005-DDF-when-first-activating-an-array-record-any-missin.patch
|
|
|
|
# PATCH-FIX-UPSTREAM 0001-DDF-mark-missing-on-assembly-device-properly.patch bnc#866660 nfbrown@suse.de
|
|
|
|
Patch39: 0001-DDF-mark-missing-on-assembly-device-properly.patch
|
|
|
|
# PATCH-FIX-UPSTREAM 0002-DDF-guard-against-pdnum-being-negative.patch bnc#866660 nfbrown@suse.de
|
|
|
|
Patch40: 0002-DDF-guard-against-pdnum-being-negative.patch
|
|
|
|
# PATCH-FIX-UPSTREAM 0003-DDF-fix-possible-mdmon-crash-when-updating-metadata.patch bnc#866660 nfbrown@suse.de
|
|
|
|
Patch41: 0003-DDF-fix-possible-mdmon-crash-when-updating-metadata.patch
|
|
|
|
# PATCH-FIX-UPSTREAM 0004-DDF-Don-t-fail-compare_super_ddf-due-to-re-configure.patch bnc#866660 nfbrown@suse.de
|
|
|
|
Patch42: 0004-DDF-Don-t-fail-compare_super_ddf-due-to-re-configure.patch
|
2014-04-08 09:39:43 +02:00
|
|
|
# PATCH-FIX-UPSTREAM 0001-systemd-various-fixes-for-boot-with-container-arrays.patch bnc#866660 nfbrown@suse.de
|
|
|
|
Patch43: 0001-systemd-various-fixes-for-boot-with-container-arrays.patch
|
2013-09-03 07:46:59 +02:00
|
|
|
|
|
|
|
%define _udevdir %(pkg-config --variable=udevdir udev)
|
2013-06-13 06:16:10 +02:00
|
|
|
%define _systemdshutdowndir %{_unitdir}/../system-shutdown
|
2012-11-04 03:24:36 +01:00
|
|
|
|
2007-01-10 17:49:57 +01:00
|
|
|
%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
|
2009-10-03 00:44:49 +02:00
|
|
|
%setup -q -a1
|
2013-09-13 03:49:53 +02:00
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
2013-11-11 01:47:33 +01:00
|
|
|
%patch5 -p1
|
|
|
|
%patch6 -p1
|
|
|
|
%patch7 -p1
|
|
|
|
%patch8 -p1
|
|
|
|
%patch9 -p1
|
|
|
|
%patch10 -p1
|
|
|
|
%patch11 -p1
|
|
|
|
%patch12 -p1
|
2013-12-03 04:13:54 +01:00
|
|
|
%patch13 -p1
|
|
|
|
%patch14 -p1
|
|
|
|
%patch15 -p1
|
|
|
|
%patch16 -p1
|
2013-12-05 00:59:54 +01:00
|
|
|
%patch17 -p1
|
2014-01-22 05:59:00 +01:00
|
|
|
%patch18 -p1
|
|
|
|
%patch19 -p1
|
|
|
|
%patch20 -p1
|
|
|
|
%patch21 -p1
|
|
|
|
%patch22 -p1
|
|
|
|
%patch23 -p1
|
|
|
|
%patch24 -p1
|
|
|
|
%patch25 -p1
|
|
|
|
%patch26 -p1
|
|
|
|
%patch27 -p1
|
|
|
|
%patch28 -p1
|
2014-04-02 08:19:16 +02:00
|
|
|
%patch32 -p1
|
|
|
|
%patch33 -p1
|
|
|
|
%patch34 -p1
|
|
|
|
%patch35 -p1
|
|
|
|
%patch36 -p1
|
|
|
|
%patch37 -p1
|
|
|
|
%patch38 -p1
|
|
|
|
%patch39 -p1
|
|
|
|
%patch40 -p1
|
|
|
|
%patch41 -p1
|
|
|
|
%patch42 -p1
|
2014-04-08 09:39:43 +02:00
|
|
|
%patch43 -p1
|
2007-01-10 17:49:57 +01:00
|
|
|
|
|
|
|
%build
|
2014-01-22 05:59:00 +01:00
|
|
|
make %{?_smp_mflags} CC="%__cc" CXFLAGS="$RPM_OPT_FLAGS -Wno-error" SUSE=yes
|
2007-01-10 17:49:57 +01:00
|
|
|
cd Software-RAID.HOWTO
|
|
|
|
sgml2html Software-RAID.HOWTO.sgml
|
|
|
|
sgml2txt Software-RAID.HOWTO.sgml
|
|
|
|
|
|
|
|
%install
|
2014-01-22 05:59:00 +01:00
|
|
|
make install install-systemd install-udev DESTDIR=%{buildroot} SYSTEMD_DIR=%{_unitdir} UDEVDIR=%{_udevdir} SUSE=yes
|
2012-11-04 03:24:36 +01:00
|
|
|
rm -rf %{buildroot}/lib/udev
|
|
|
|
install -d %{buildroot}%{_var}/adm/fillup-templates
|
2014-01-23 00:46:10 +01:00
|
|
|
install -d %{buildroot}{%{_sbindir}
|
2012-11-04 03:24:36 +01:00
|
|
|
install -d %{buildroot}/lib/mkinitrd/scripts
|
|
|
|
install -m 755 %{S:5} %{buildroot}/lib/mkinitrd/scripts/setup-md.sh
|
|
|
|
install -m 755 %{S:6} %{buildroot}/lib/mkinitrd/scripts/boot-md.sh
|
|
|
|
install -d %{buildroot}/etc/cron.daily
|
|
|
|
install -m 755 %{S:7} %{buildroot}/etc/cron.daily/mdadm
|
|
|
|
install -m 644 %{S:2} %{buildroot}%{_var}/adm/fillup-templates/
|
|
|
|
install -d %{buildroot}%{_systemdshutdowndir}
|
2013-12-03 04:13:54 +01:00
|
|
|
install -m 644 %{S:9} %{buildroot}%{_unitdir}/mdadm-last-resort@.timer
|
|
|
|
install -m 644 %{S:10} %{buildroot}%{_unitdir}/mdadm-last-resort@.service
|
2007-01-10 17:49:57 +01:00
|
|
|
|
|
|
|
%post
|
2008-09-05 21:15:10 +02:00
|
|
|
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
2012-04-20 10:01:08 +02:00
|
|
|
if [ -e /var/lib/no_initrd_recreation_by_suspend ]; then
|
|
|
|
echo "Skipping recreation of existing initial ramdisks, due"
|
|
|
|
echo "to presence of /var/lib/no_initrd_recreation_by_suspend"
|
|
|
|
elif [ -x /sbin/mkinitrd ]; then
|
|
|
|
/sbin/mkinitrd
|
|
|
|
fi
|
|
|
|
|
2014-01-23 10:31:18 +01:00
|
|
|
%fillup_only
|
|
|
|
|
2007-01-10 17:49:57 +01:00
|
|
|
%postun
|
2008-09-05 21:15:10 +02:00
|
|
|
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
2012-04-20 10:01:08 +02:00
|
|
|
if [ -e /var/lib/no_initrd_recreation_by_suspend ]; then
|
|
|
|
echo "Skipping recreation of existing initial ramdisks, due"
|
|
|
|
echo "to presence of /var/lib/no_initrd_recreation_by_suspend"
|
|
|
|
elif [ -x /sbin/mkinitrd ]; then
|
|
|
|
/sbin/mkinitrd
|
|
|
|
fi
|
|
|
|
|
2007-01-10 17:49:57 +01:00
|
|
|
%{insserv_cleanup}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
|
|
|
%clean
|
2012-11-04 03:24:36 +01:00
|
|
|
rm -rf %{buildroot}
|
2007-01-10 17:49:57 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2008-09-24 17:12:07 +02:00
|
|
|
%doc COPYING ChangeLog README.initramfs TODO mdadm.conf-example mkinitramfs
|
2007-01-10 17:49:57 +01:00
|
|
|
%doc Software-RAID.HOWTO/Software-RAID.HOWTO*{.txt,.html}
|
|
|
|
%doc %{_mandir}/man?/*
|
|
|
|
/sbin/*
|
|
|
|
%{_var}/adm/fillup-templates/sysconfig.mdadm
|
2008-07-25 02:32:37 +02:00
|
|
|
%dir /lib/mkinitrd
|
|
|
|
%dir /lib/mkinitrd/scripts
|
|
|
|
/lib/mkinitrd/scripts/setup-md.sh
|
|
|
|
/lib/mkinitrd/scripts/boot-md.sh
|
2013-09-03 07:46:59 +02:00
|
|
|
%{_udevdir}/rules.d/63-md-raid-arrays.rules
|
|
|
|
%{_udevdir}/rules.d/64-md-raid-assembly.rules
|
2012-05-22 07:25:59 +02:00
|
|
|
%dir /etc/cron.daily
|
|
|
|
/etc/cron.daily/mdadm
|
2012-11-04 03:24:36 +01:00
|
|
|
%{_systemdshutdowndir}/mdadm.shutdown
|
2013-06-13 06:16:10 +02:00
|
|
|
%{_unitdir}/mdmon@.service
|
2014-01-22 05:59:00 +01:00
|
|
|
%{_unitdir}/mdmonitor.service
|
2013-12-03 04:13:54 +01:00
|
|
|
%{_unitdir}/mdadm-last-resort@.timer
|
|
|
|
%{_unitdir}/mdadm-last-resort@.service
|
2014-01-22 05:59:00 +01:00
|
|
|
%dir %{_unitdir}/../scripts
|
|
|
|
%{_unitdir}/../scripts/mdadm_env.sh
|
2008-01-24 18:30:41 +01:00
|
|
|
|
2007-04-06 00:37:00 +02:00
|
|
|
%changelog
|