Sophie

Sophie

distrib > Mandriva > 2007.1 > i586 > by-pkgid > d79a365d64617fce7648701c9e08618e > files > 4

mdadm-2.6.1-1mdv2007.1.src.rpm

%define mdmpd_version 0.4

%ifarch %{ix86} ppc ppc64 %{sunsparc}
%bcond_without dietlibc
%define dietlibc_req %{nil}
%endif
%ifarch x86_64
%bcond_without dietlibc
%define dietlibc_req >= 0.29-1mdk
%endif

%bcond_with uclibc
%bcond_with klibc
%bcond_with mdassemble_auto
%bcond_with mdmpd

%if %{with mdassemble_auto}
%define mdassemble_auto_CFLAGS MDASSEMBLE_AUTO=1
%else
%define mdassemble_auto_CFLAGS %{nil}
%endif

# we want to install in /sbin, not /usr/sbin...
%define _exec_prefix %{nil}

Name:           mdadm
Version:        2.6.1
Release:        %mkrel 1
Summary:        A tool for managing Soft RAID under Linux
Source:         http://www.cse.unsw.edu.au/~neilb/source/mdadm/mdadm-%{version}.tgz
Source1:        mdadm.init
Source2:        raidtabtomdadm.sh
Source3:        mdmpd-%{mdmpd_version}.tar.bz2
Source4:        mdmpd.init
Patch10:        mdmpd-0.3-pid.patch
Patch11:        mdmpd-0.4-gcc4.patch
Patch14:        mdadm-2.5.1-autof.patch
#Patch15:       mdadm-2.5.3-active.patch
#Patch16:       mdadm-2.5.3-mdassemble.patch
URL:            http://www.cse.unsw.edu.au/~neilb/source/mdadm/
License:        GPL
Group:          System/Kernel and hardware
BuildRequires:  man groff groff-for-man
%if %{with dietlibc}
BuildRequires:  dietlibc-devel %{dietlibc_req}
%endif
%if %{with uclibc}
BuildRequires:  uClibc-devel
%endif
%if %{with klibc}
BuildRequires:  klibc-devel
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Requires(post): rpm-helper
Requires(preun): rpm-helper
Requires(post): gawk

%description
mdadm is a program that can be used to create, manage, and monitor
Linux MD (Software RAID) devices.

As such is provides similar functionality to the raidtools packages.
The particular differences to raidtools is that mdadm is a single
program, and it can perform (almost) all functions without a
configuration file (that a config file can be used to help with
some common tasks).

%package -n mdmpd
Summary:        daemon to monitor MD multipath devices
Group:          System/Kernel and hardware

%description -n mdmpd
This daemon will monitor md multipath devices for failure and recovery of
device paths, in order to add paths back upon recovery. It requires a patched
kernel with support for events in /proc/mdstat.

%prep
%setup -q -a 3
%patch10 -p0 -b .pid
%patch11 -p0 -b .gcc4
%patch14 -p1 -b .autof
#%patch15 -p1 -b .active
#%patch16 -p1 -b .assemble
%ifarch x86_64
%{__perl} -pi -e 's/ \-Werror//' Makefile
%endif
cp %{SOURCE2} raidtabtomdadm.sh
chmod 644 ChangeLog

%build
%if %{with dietlibc}
%if %{with uclibc} || %{with klibc}
%{error:only one of dietlibc, uclibc or klibc can be specified}
exit 1
%endif
make mdassemble CXFLAGS="%{optflags}" %{mdassemble_auto_CFLAGS} SYSCONFDIR="%{_sysconfdir}"
%endif
%if %{with uclibc}
%if %{with klibc}
%{error:only one of dietlibc, uclibc or klibc can be specified}
exit 1
%endif
make mdadm.uclibc mdassemble.uclibc CXFLAGS="%{optflags}" %{mdassemble_auto_CFLAGS} SYSCONFDIR="%{_sysconfdir}"
%endif
%if %{with klibc}
make mdassemble.klibc CXFLAGS="%{optflags}" %{mdassemble_auto_CFLAGS} SYSCONFDIR="%{_sysconfdir}"
%endif
make CXFLAGS="%{optflags}" SYSCONFDIR="%{_sysconfdir}"
%if %{with mdmpd}
make -C mdmpd CCFLAGS="%{optflags} -I." SYSCONFDIR="%{_sysconfdir}"
%endif

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

make DESTDIR=%{buildroot} MANDIR=%{_mandir} BINDIR=%{_sbindir} install
%if %{with mdmpd}
make -C mdmpd DESTDIR=%{buildroot} MANDIR=%{_mandir} BINDIR=%{_sbindir} install
%endif
install -D -m 644 mdadm.conf-example %{buildroot}%{_sysconfdir}/mdadm.conf

install -D %{SOURCE1} %{buildroot}%{_initrddir}/mdadm
%if %{with mdmpd}
install -D %{SOURCE4} %{buildroot}%{_initrddir}/mdmpd
mkdir -p %{buildroot}/var/run/mdmpd
%endif

%if %{with dietlibc}
install mdassemble %{buildroot}%{_sbindir}/mdassemble
install -D -m 644 mdassemble.8 %{buildroot}%{_mandir}/man8/mdassemble.8
%endif
%if %{with uclibc}
install mdassemble.uclibc %{buildroot}%{_sbindir}/mdassemble
install -D -m 644 mdassemble.8 %{buildroot}%{_mandir}/man8/mdassemble.8
%endif
%if %{with klibc}
install mdassemble.klibc %{buildroot}%{_sbindir}/mdassemble
install -D -m 644 mdassemble.8 %{buildroot}%{_mandir}/man8/mdassemble.8
%endif

#install -D -m 755 mkinitramfs %{buildroot}%{_sbindir}/mkinitramfs

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%preun
%_preun_service mdadm

%if %{with mdmpd}
%preun -n mdmpd
%_preun_service mdmpd
%endif

%post -f raidtabtomdadm.sh
%_post_service mdadm

%if %{with mdmpd}
%post -n mdmpd
%_post_service mdmpd
%endif

%files
%defattr(644,root,root,755)
%doc TODO ChangeLog mdadm.conf-example README.initramfs ANNOUNCE*
%attr(755, root, root) %{_sbindir}/mdadm
#attr(755, root, root) %{_sbindir}/mkinitramfs
%if %{with dietlibc} || %{with uclibc} || %{with klibc}
%attr(755, root, root) %{_sbindir}/mdassemble
%endif
%config(noreplace,missingok) %{_sysconfdir}/mdadm.conf
%attr(755, root, root) %{_initrddir}/mdadm
%{_mandir}/man*/md*

%if %{with mdmpd}
%files -n mdmpd
%attr(755, root, root) %{_sbindir}/mdmpd
%attr(755, root, root) %{_initrddir}/mdmpd
%dir /var/run/mdmpd
%endif


%changelog
* Fri Mar 09 2007 David Walluck <walluck@mandriva.org> 2.6.1-1mdv2007.1
+ Revision: 138616
- 2.6.1

* Mon Jan 15 2007 David Walluck <walluck@mandriva.org> 2.6-1mdv2007.1
+ Revision: 108996
- 2.6

* Thu Dec 14 2006 Emmanuel Andry <eandry@mandriva.org> 2.5.6-2mdv2007.1
+ Revision: 96855
- rebuild

* Wed Dec 13 2006 Emmanuel Andry <eandry@mandriva.org> 2.5.6-1mdv2007.1
+ Revision: 96579
- New version 2.5.6
  drop patches 15 and 16 (applied upstream)

* Thu Sep 14 2006 Luca Berra <bluca@mandriva.org> 2.5.3-3mdv2007.0
+ Revision: 61509
- make mdasseble also enable read-write
- fix a bug in mdassemble that prevented activation of stacked arrays (#25459)
- do not fail when autoassembling everything and some md are already active
- make mdmpd build again (Oden)
  but make it a subpackage and disabled by default
- new upstream version 2.5.3

* Thu Jul 06 2006 Luca Berra <bluca@mandriva.org> 2.5.2-1mdv2007.0
+ Revision: 38423
- updated p14 to deal with new location of udev db
- new upstream version 2.5.2
  remove patches integrated upstream
- new upstream version 2.5.1
  remove patches integrated upstream
- automatically create devices if using udev (p14)
- add p12 and p13 from git
- use %%bcond for conditional build options
- * Mon Jun 19 2006 Christiaan Welvaart <cjw@daneel.dyndns.org>
- Fix using ++ in a macro argument.
- remove patches merged upstream
- New Upstream version 2.5.1
- New Upstream version 2.5.1
- uncompressed scripts
- import mdadm-2.5-1mdv2007.0


* Sun May 28 2006 Oden Eriksson <oeriksson@mandriva.com> 2.5-2mdv2007.0
- use provided sha1 (and don't link against openssl...)

* Sat May 27 2006 Luca Berra <bluca@vodka.it> 2.5-1mdv2007.0
- New release 2.5
- rework p14 to remove more warnings
- use posix rand() function instead of BSD random() (p15)
- fix some issue with mdassemble (p16)
- mdassemble does not need to parse auto=

* Sat May 27 2006 Luca Berra <bluca@vodka.it> 2.4.1-1mdv2007.0
- New release 2.4.1

* Fri May 26 2006 Luca Berra <bluca@vodka.it> 2.4-1mdv2007.0
- New release 2.4
- snprintf fix (p11)
- another strict-aliasing fix (p12)
- add a debug message to Grow.c and remove a gcc warning (p14)
- remove mkinitramfs script, we have our own mkinitrd/mkinitramfs.

* Thu Apr 20 2006 Per Øyvind Karlsen <pkarlsen@mandriva.com> 2.3.1-3mdk
- build against dietlibc on sparc
- fix executable-marked-as-config-file

* Sat Feb 18 2006 Christiaan Welvaart <cjw@daneel.dyndns.org> 2.3.1-2mdk
- Patch13: fix #include for kernel byteswap functions

* Mon Feb 06 2006 Luca Berra <bluca@vodka.it> 2.3.1-1mdk
- New Release 2.3.1
- re-enable strict aliasing in CFLAGS (fixed upstream)
- remove p11 merged upstream

* Sat Feb 04 2006 Luca Berra <bluca@vodka.it> 2.3-1mdk
- New Release 2.3
- remove p11 and p12 merged upstream
- disable strict aliasing in CFLAGS
- x86_64 fix (p11)

* Thu Jan 26 2006 Luca Berra <bluca@vodka.it> 2.2-4mdk
- rework UUID update patch (p11)
- add another typo patch to super1.c (p12)

* Mon Jan 09 2006 Olivier Blin <oblin@mandriva.com> 2.2-3mdk
- convert parallel init to LSB

* Wed Jan 04 2006 Luca Berra <bluca@vodka.it> 2.2-2mdk
- add UUID update patch

* Mon Jan 02 2006 Thierry Vignaud <tvignaud@mandriva.com> 2.2-1mdk
- new release
- install new mkinitramfs

* Mon Jan 02 2006 Thierry Vignaud <tvignaud@mandriva.com> 1.12.0-4mdk
- rollback, mdadm doesn't need harddrake service to be run before
- add parallel init support to mdmpd

* Mon Jan 02 2006 Olivier Blin <oblin@mandriva.com> 1.12.0-3mdk
- parallel init support

* Sun Jan 01 2006 Mandriva Linux Team <http://www.mandrivaexpert.com/> 1.12.0-2mdk
- Rebuild

* Sat Jun 18 2005 Luca Berra <bluca@vodka.it> 1.12.0-1mdk 
- 1.12.0
- removed patches merged upstream

* Sun Jun 12 2005 Luca Berra <bluca@vodka.it> 1.12.0-0.test.1mdk 
- 1.12.0 test
- removed gcc4 patch
- added fix for stacked device when using --auto and udev
- use Require(xxx) instead of PreReq

* Mon May 16 2005 Luca Berra <bluca@vodka.it> 1.11.0-1mdk 
- 1.11.0
- fixed build with gcc4 (p11)
- added man page for mdadm (p12)

* Tue Mar 29 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.9.0-3mdk
- rebuilt against latest dietlibc

* Mon Mar 21 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1.9.0-2mdk
- rebuilt because the binary got lost in cyberspace

* Sun Feb 06 2005 Luca Berra <bluca@vodka.it> 1.9.0-1mdk 
- 1.9.0

* Sat Jan 29 2005 Luca Berra <bluca@vodka.it> 1.9.0-0.pre1.1mdk 
- 1.9.0-pre1
- removed autodev and stacking patches merged upstream

* Sun Jan 23 2005 Luca Berra <bluca@vodka.it> 1.8.0-3mdk 
- updated autodev patch
- fix mdadm -As not starting stacked devices

* Sun Jan 23 2005 Luca Berra <bluca@vodka.it> 1.8.0-2mdk 
- added auto=dev option
- re-enabled device autocreation in mdassemble

* Tue Nov 16 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.8.0-1mdk
- new release
- kill patches 101, 102, 103 and 104 (merged upstream)

* Mon Sep 06 2004 Luca Berra <bluca@vodka.it> 1.7.0-3mdk 
- sync with patches merged upstream
- disable device autocreation in mdassemble for now

* Sun Aug 29 2004 Luca Berra <bluca@vodka.it> 1.7.0-2mdk 
- sync with patches merged upstream
- add raid6/raid10 to mdassemble as well
- mdassemble now supports device autocreation

* Mon Aug 23 2004 Luca Berra <bluca@vodka.it> 1.7.0-1mdk 
- 1.7.0
- build mdassemble on ppc as well
- mdadm daemon creates its own pid file
- convert raidtab in mdadm.conf
- prepare for inclusion of mdmpd

* Fri Jun 04 2004 Luca Berra <bluca@vodka.it> 1.6.0-1mdk 
- 1.6.0

* Sat Jan 24 2004 Luca Berra <bluca@vodka.it> 1.5.0-1mdk 
- 1.5.0
- drop patches included in the upstream source

* Mon Jan 19 2004 Luca Berra <bluca@vodka.it> 1.4.0-5mdk 
- added raid6 patches from hpa

* Sun Dec 21 2003 Luca Berra <bluca@vodka.it> 1.4.0-4mdk
- service name is mdadm

* Sat Dec 20 2003 Luca Berra <bluca@vodka.it> 1.4.0-3mdk
- updated with more patches from Neil, mdassemble is going to be integrated upstream
- added mdmonitor (from rh)

* Sun Nov 02 2003 Luca Berra <bluca@vodka.it> 1.4.0-2mdk
- added mdassemble built with dietlibc

* Fri Oct 31 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.4.0-1mdk
- 1.4.0
- drop patches included in the upstream source

* Mon Sep 08 2003 Guillaume Rousse <guillomovitch@linux-mandrake.com> 1.3.0-2mdk
- updated by Luca Berra <bluca@vodka.it>
 - added patches from upstream maintainer
- fix perms on doc file

* Tue Jul 29 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.3.0-1mdk
- 1.3.0