2007-01-10 17:49:57 +01:00
|
|
|
#
|
2010-01-11 15:50:57 +01:00
|
|
|
# spec file for package mdadm (Version 3.0.3)
|
2007-01-10 17:49:57 +01:00
|
|
|
#
|
2010-01-11 15:50:57 +01:00
|
|
|
# Copyright (c) 2010 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-05-01 14:47:26 +02:00
|
|
|
|
2007-01-10 17:49:57 +01:00
|
|
|
Name: mdadm
|
2010-01-11 15:50:57 +01:00
|
|
|
Version: 3.0.3
|
2010-06-02 02:00:41 +02:00
|
|
|
Release: 6
|
2007-10-25 02:35:29 +02:00
|
|
|
BuildRequires: sgmltool
|
2007-01-10 17:49:57 +01:00
|
|
|
PreReq: %fillup_prereq %insserv_prereq
|
|
|
|
Obsoletes: raidtools
|
2007-10-25 02:35:29 +02:00
|
|
|
AutoReqProv: on
|
2007-01-10 17:49:57 +01:00
|
|
|
Group: System/Base
|
2009-12-16 16:59:32 +01:00
|
|
|
License: GPLv2+
|
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
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2009-10-03 00:44:49 +02:00
|
|
|
Source: %{name}-%{version}.tar.bz2
|
2007-01-10 17:49:57 +01:00
|
|
|
Source1: Software-RAID.HOWTO.tar.bz2
|
|
|
|
Source2: sysconfig.mdadm
|
|
|
|
Source3: mdadmd
|
|
|
|
Source4: boot.md
|
2008-07-25 02:32:37 +02:00
|
|
|
Source5: mkinitrd-setup.sh
|
|
|
|
Source6: mkinitrd-boot.sh
|
2010-03-26 01:36:15 +01:00
|
|
|
Source7: 64-md-raid.rules
|
2010-06-28 11:44:27 +02:00
|
|
|
Patch1: bitmap-4k-boundary.patch
|
|
|
|
Patch2: mdmon-0.9-superblock-crash.patch
|
|
|
|
Patch3: fix-dup.patch
|
|
|
|
Patch4: IMSM-part.patch
|
|
|
|
Patch5: container-argv-check
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
2008-09-24 17:12:07 +02:00
|
|
|
Neil Brown <neilb@suse.de>
|
2007-01-10 17:49:57 +01:00
|
|
|
|
|
|
|
%prep
|
2009-10-03 00:44:49 +02:00
|
|
|
%setup -q -a1
|
2010-06-28 11:44:27 +02:00
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
2007-01-10 17:49:57 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%{suse_update_config -f}
|
2010-06-28 23:25:10 +02:00
|
|
|
make %{?_smp_mflags} CXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-error"
|
2007-01-10 17:49:57 +01:00
|
|
|
cd Software-RAID.HOWTO
|
|
|
|
sgml2html Software-RAID.HOWTO.sgml
|
|
|
|
sgml2txt Software-RAID.HOWTO.sgml
|
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
install -d $RPM_BUILD_ROOT%{_var}/adm/fillup-templates
|
|
|
|
install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/init.d}
|
|
|
|
install -d $RPM_BUILD_ROOT/lib/udev/devices
|
|
|
|
install -m 755 %{S:4} %{S:3} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/
|
2008-07-25 02:32:37 +02:00
|
|
|
install -d $RPM_BUILD_ROOT/lib/mkinitrd/scripts
|
|
|
|
install -m 755 %{S:5} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/setup-md.sh
|
|
|
|
install -m 755 %{S:6} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-md.sh
|
2007-01-10 17:49:57 +01:00
|
|
|
install -m 644 %{S:2} $RPM_BUILD_ROOT%{_var}/adm/fillup-templates/
|
|
|
|
ln -sf ../../etc/init.d/mdadmd $RPM_BUILD_ROOT/%{_sbindir}/rcmdadmd
|
2010-01-18 14:08:58 +01:00
|
|
|
rm -rf $RPM_BUILD_ROOT/var/run/mdadm
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/run
|
|
|
|
ln -s mdadm $RPM_BUILD_ROOT/var/run/mdadm
|
2010-03-26 01:36:15 +01:00
|
|
|
install -d $RPM_BUILD_ROOT/lib/udev/rules.d
|
|
|
|
install -m 644 %_sourcedir/64-md-raid.rules $RPM_BUILD_ROOT/lib/udev/rules.d
|
2007-01-10 17:49:57 +01:00
|
|
|
|
|
|
|
%post
|
2008-09-05 21:15:10 +02:00
|
|
|
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
2009-01-27 02:19:51 +01:00
|
|
|
%{fillup_and_insserv -y boot.md}
|
2010-01-18 14:08:58 +01:00
|
|
|
mkdir -p /dev/.mdadm
|
|
|
|
# replace the /var/run/mdadm directory (installed by sle11/11.1) with
|
|
|
|
# a symlink pointing to /dev/.mdadm. Do not do this when /var/run/mdadm is
|
|
|
|
# not empty, let /etc/init.d/boot.md do it at the next reboot.
|
|
|
|
if test -e /var/run/mdadm -a ! /var/run/mdadm -ef /dev/.mdadm; then
|
|
|
|
if ! rmdir /var/run/mdadm 2>/dev/null; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
ln -s /dev/.mdadm /var/run/mdadm
|
|
|
|
fi
|
2007-01-10 17:49:57 +01:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%restart_on_update mdadmd
|
2008-09-05 21:15:10 +02:00
|
|
|
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
2007-01-10 17:49:57 +01:00
|
|
|
%{insserv_cleanup}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%stop_on_removal mdadmd
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%attr(0755,root,root) %config %{_sysconfdir}/init.d/*
|
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/*
|
2008-11-07 10:41:08 +01:00
|
|
|
%dir /lib/udev
|
|
|
|
%dir /lib/udev/devices
|
2007-01-10 17:49:57 +01:00
|
|
|
%{_sbindir}/*
|
|
|
|
%{_var}/adm/fillup-templates/sysconfig.mdadm
|
2010-01-18 14:08:58 +01:00
|
|
|
%ghost /var/run/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
|
2010-03-26 01:36:15 +01:00
|
|
|
%dir /lib/udev
|
|
|
|
%dir /lib/udev/rules.d
|
|
|
|
/lib/udev/rules.d/64-md-raid.rules
|
2008-01-24 18:30:41 +01:00
|
|
|
|
2007-04-06 00:37:00 +02:00
|
|
|
%changelog
|