|
@@ -1,20 +1,28 @@
|
|
|
|
+%define _tmpfilesdir %{_sysconfdir}/tmpfiles.d
|
|
|
|
+%define _udevrulesdir /lib/udev/rules.d
|
|
|
|
+
|
|
Summary: Utilities for Linux md devices (software RAID arrays)
|
|
Summary: Utilities for Linux md devices (software RAID arrays)
|
|
Summary(ja): Linux の MD デバイス(ソフトウエアRAIDアレイ)用のユーティリティ
|
|
Summary(ja): Linux の MD デバイス(ソフトウエアRAIDアレイ)用のユーティリティ
|
|
Name: mdadm
|
|
Name: mdadm
|
|
-Version: 2.6.9
|
|
+Version: 3.3
|
|
-Release: 4%{?_dist_release}
|
|
+Release: 1%{?_dist_release}
|
|
-Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.bz2
|
|
+Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz
|
|
Source1: mdmonitor.init
|
|
Source1: mdmonitor.init
|
|
-Source2: mdmpd-0.4.tgz
|
|
+Source2: raid-check
|
|
-Source3: mdmpd.init
|
|
+Source3: mdadm.rules
|
|
-Source4: mdassemble.8
|
|
+Source4: mdadm-raid-check-sysconfig
|
|
-Patch: mdadm-1.5.0-email.patch
|
|
+Source5: mdadm-cron
|
|
-Patch1: mdmpd-0.4-node.patch
|
|
+Source6: mdmonitor.service
|
|
-Patch2: mdadm-2.5.2-s390-build.patch
|
|
+Source7: mdadm.conf
|
|
-Patch3: mdadm-2.5.2-static.patch
|
|
+Source8: mdadm_event.conf
|
|
-Patch5: mdadm-2.2-nodiet.patch
|
|
+Patch1: mdadm-3.3-Be-consistent-in-return-types-from-byteswap-macros.patch
|
|
-Patch6: mdadm-2.5.2-cflags.patch
|
|
+Patch93: mdadm-3.2.6-Remove-offroot-argument-and-default-to-always-settin.patch
|
|
-Patch7: mdadm-2.3.1-fswab64.patch
|
|
+Patch94: mdadm-3.2.6-Add-support-for-launching-mdmon-via-systemctl-instea.patch
|
|
|
|
+Patch95: mdadm-3.2.6-In-case-launching-mdmon-fails-print-an-error-message.patch
|
|
|
|
+Patch96: mdadm-3.2.6-mdmon-add-foreground-option.patch
|
|
|
|
+# Fedora customization patches
|
|
|
|
+Patch97: mdadm-3.3-udev.patch
|
|
|
|
+Patch98: mdadm-2.5.2-static.patch
|
|
URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/
|
|
URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/
|
|
License: GPL
|
|
License: GPL
|
|
Group: System Environment/Base
|
|
Group: System Environment/Base
|
|
@@ -34,64 +42,83 @@ almost all functions without a configuration file, though a configuration
|
|
file can be used to help with some common tasks.
|
|
file can be used to help with some common tasks.
|
|
|
|
|
|
%prep
|
|
%prep
|
|
-%setup -q -a 2
|
|
+%setup -q
|
|
-%patch -p1 -b .email
|
|
+
|
|
-%patch1 -p1 -b .node
|
|
+%patch1 -p1 -b .types
|
|
-%patch2 -p1 -b .s390
|
|
+# Fedora customization patches
|
|
-%patch3 -p1 -b .static
|
|
+%patch97 -p1 -b .udev
|
|
-%patch5 -p1 -b .nodiet
|
|
+%patch98 -p1 -b .static
|
|
-%patch6 -p1 -b .cflags
|
|
|
|
-#%patch7 -p1 -b .fswab64
|
|
|
|
|
|
|
|
%build
|
|
%build
|
|
-make CXFLAGS="$RPM_OPT_FLAGS" SYSCONFDIR="%{_sysconfdir}" MDASSEMBLE_AUTO=1 mdadm mdadm.static mdassemble.static
|
|
+make %{?_smp_mflags} CXFLAGS="$RPM_OPT_FLAGS" SYSCONFDIR="%{_sysconfdir}" mdadm mdmon
|
|
-make CXFLAGS="$RPM_OPT_FLAGS" SYSCONFDIR="%{_sysconfdir}" -C mdmpd mdmpd
|
|
|
|
|
|
|
|
%install
|
|
%install
|
|
-make DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} BINDIR=/sbin install
|
|
+rm -rf %{buildroot}
|
|
-make DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} BINDIR=/sbin -C mdmpd install
|
|
+
|
|
-install -D -m755 %{SOURCE1} $RPM_BUILD_ROOT/%{_initrddir}/mdmonitor
|
|
+#make DESTDIR=%{buildroot} MANDIR=%{_mandir} BINDIR=%{_sbindir} SYSTEMD_DIR=%{_unitdir} install install-systemd
|
|
-install -D -m755 %{SOURCE3} $RPM_BUILD_ROOT/%{_initrddir}/mdmpd
|
|
+make DESTDIR=%{buildroot} MANDIR=%{_mandir} BINDIR=/sbin install
|
|
-install -D -m644 %{SOURCE4} $RPM_BUILD_ROOT/%{_mandir}/man8/mdassemble.8
|
|
+install -Dp -m 755 %{SOURCE2} %{buildroot}%{_sbindir}/raid-check
|
|
|
|
+install -Dp -m 644 %{SOURCE3} %{buildroot}%{_udevrulesdir}/65-md-incremental.rules
|
|
|
|
+install -Dp -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/raid-check
|
|
|
|
+install -Dp -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/cron.d/raid-check
|
|
|
|
+
|
|
|
|
+# tmpfile
|
|
|
|
+mkdir -p %{buildroot}%{_tmpfilesdir}
|
|
|
|
+install -m 0644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
|
|
|
+mkdir -p %{buildroot}%{_localstatedir}/run/
|
|
|
|
+install -d -m 0710 %{buildroot}%{_localstatedir}/run/%{name}/
|
|
|
|
+
|
|
|
|
+# initscript
|
|
|
|
+mkdir -p %{buildroot}%{_initdir}
|
|
|
|
+install -m755 %{SOURCE1} %{buildroot}%{_initdir}/mdmonitor
|
|
|
|
+
|
|
|
|
+# systemd
|
|
|
|
+#mkdir -p %{buildroot}%{_unitdir}
|
|
|
|
+#install -m644 %{SOURCE6} %{buildroot}%{_unitdir}
|
|
|
|
+
|
|
|
|
+# abrt
|
|
|
|
+#mkdir -p %{buildroot}/etc/libreport/events.d
|
|
|
|
+#install -m644 %{SOURCE8} %{buildroot}/etc/libreport/events.d
|
|
|
|
|
|
-mkdir -p -m 700 $RPM_BUILD_ROOT/var/run/mdmpd
|
|
|
|
-mkdir -p -m 700 $RPM_BUILD_ROOT/var/run/mdadm
|
|
|
|
|
|
|
|
%clean
|
|
%clean
|
|
-rm -rf $RPM_BUILD_ROOT
|
|
+rm -rf %{buildroot}
|
|
|
|
|
|
%post
|
|
%post
|
|
/sbin/chkconfig --add mdmonitor
|
|
/sbin/chkconfig --add mdmonitor
|
|
-/sbin/chkconfig --add mdmpd
|
|
|
|
|
|
|
|
%preun
|
|
%preun
|
|
if [ "$1" = 0 ]; then
|
|
if [ "$1" = 0 ]; then
|
|
- service mdmonitor stop > /dev/null 2>&1 ||:
|
|
+ service mdmonitor stop > /dev/null 2>&1 ||:
|
|
- /sbin/chkconfig --del mdmonitor
|
|
+ /sbin/chkconfig --del mdmonitor
|
|
- if [ -e %{_initrddir}/mdmpd ]; then
|
|
+fi
|
|
- service mdmpd stop > /dev/null 2>&1 ||:
|
|
+if [ -e %{_initrddir}/mdmpd ]; then
|
|
- /sbin/chkconfig --del mdmpd
|
|
+ service mdmpd stop > /dev/null 2>&1 ||:
|
|
- fi
|
|
+ /sbin/chkconfig --del mdmpd
|
|
fi
|
|
fi
|
|
|
|
|
|
%postun
|
|
%postun
|
|
if [ "$1" -ge "1" ]; then
|
|
if [ "$1" -ge "1" ]; then
|
|
- service mdmonitor condrestart > /dev/null 2>&1
|
|
+ service mdmonitor condrestart > /dev/null 2>&1
|
|
- if [ -e %{_initrddir}/mdmpd ]; then
|
|
|
|
- service mdmpd condrestart > /dev/null 2>&1
|
|
|
|
- fi
|
|
|
|
fi
|
|
fi
|
|
|
|
|
|
%files
|
|
%files
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
-%doc ANNOUNCE-* TODO ChangeLog mdadm.conf-example COPYING misc/*
|
|
+%doc TODO ChangeLog mdadm.conf-example COPYING misc/*
|
|
/sbin/*
|
|
/sbin/*
|
|
-%{_initrddir}/*
|
|
+%{_sbindir}/*
|
|
|
|
+%{_initdir}/*
|
|
%{_mandir}/man*/md*
|
|
%{_mandir}/man*/md*
|
|
-%attr(0700,root,root) %dir /var/run/mdmpd
|
|
+%{_udevrulesdir}/*
|
|
-%attr(0700,root,root) %dir /var/run/mdadm
|
|
+%config(noreplace) %{_sysconfdir}/sysconfig/*
|
|
|
|
+%config(noreplace) %{_sysconfdir}/cron.d/*
|
|
|
|
+%dir %{_localstatedir}/run/%{name}/
|
|
|
|
+%config(noreplace) %{_tmpfilesdir}/%{name}.conf
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Fri Jan 10 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.3-1
|
|
|
|
+- new upstream release.
|
|
|
|
+
|
|
* Sat Dec 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.6.9-4
|
|
* Sat Dec 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.6.9-4
|
|
- rebuild with VineSeed environment
|
|
- rebuild with VineSeed environment
|
|
|
|
|