From eb7fecee1121a2490109e6612804fe2f15a641cf Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Thu, 18 Oct 2012 14:37:49 +0200 Subject: [PATCH] Add abrt script to retrieve /proc/mdstat output in case of crash Resolves bz#867842 Signed-off-by: Jes Sorensen --- mdadm.spec | 19 ++++++++++++++++++- mdadm_event.conf | 5 +++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 mdadm_event.conf diff --git a/mdadm.spec b/mdadm.spec index 58dc54c..4d67f94 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,7 +1,7 @@ Summary: The mdadm program controls Linux md devices (software RAID arrays) Name: mdadm Version: 3.2.5 -Release: 11%{?dist} +Release: 12%{?dist} Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz Source1: mdmonitor.init Source2: raid-check @@ -11,6 +11,7 @@ Source5: mdadm-cron Source6: mdmonitor.service Source7: mdmonitor-takeover.service Source8: mdadm.conf +Source9: mdadm_event.conf Patch1: mdadm-3.2.5-imsm-fix-correct-checking-volume-s-degradation.patch Patch2: mdadm-3.2.5-Replace-sha1.h-with-slightly-older-version.patch Patch3: mdadm-3.2.5-Add-zlib-license-to-crc32.c.patch @@ -31,6 +32,9 @@ Requires(postun): systemd-units coreutils %if "%{fedora}" <= "17" Requires: udev initscripts %endif +%if "%{fedora}" >= "17" +Requires: abrt +%endif %description The mdadm program is used to create, manage, and monitor Linux MD (software @@ -89,6 +93,12 @@ install -m 0644 %{SOURCE8} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf mkdir -p %{buildroot}%{_localstatedir}/run/ install -d -m 0710 %{buildroot}%{_localstatedir}/run/%{name}/ +# abrt +%if "%{fedora}" >= "17" +mkdir -p %{buildroot}/etc/libreport/events.d +install -m644 %{SOURCE9} %{buildroot}/etc/libreport/events.d +%endif + %clean rm -rf %{buildroot} @@ -123,11 +133,18 @@ rm -rf %{buildroot} %config(noreplace) %{_sysconfdir}/sysconfig/* %dir %{_localstatedir}/run/%{name}/ %config(noreplace) %{_prefix}/lib/tmpfiles.d/%{name}.conf +%if "%{fedora}" >= "17" +/etc/libreport/events.d/* +%endif %files sysvinit %{_initrddir}/* %changelog +* Thu Oct 18 2012 Jes Sorensen - 3.2.5-12 +- Add abrt script to retrieve /proc/mdstat output in case of crash +- Resolves bz867842 + * Wed Oct 17 2012 Jes Sorensen - 3.2.5-11 - Remove package requirements for udev and initscripts for F18+ - Resolves bz864562 diff --git a/mdadm_event.conf b/mdadm_event.conf new file mode 100644 index 0000000..1a6c479 --- /dev/null +++ b/mdadm_event.conf @@ -0,0 +1,5 @@ +# Save /proc/mdstat in case of crash in mdadm/mdmon + +EVENT=post-create component=mdadm + cat /proc/mdstat >> mdstat_data + echo "Saved output of /proc/mdstat"