[mdadm/f15] Revert systemd changes that came back with the rawhide merge
Doug Ledford
dledford at fedoraproject.org
Mon Jul 18 15:49:44 UTC 2011
commit 3198c4f9aec2af5c8c8ba69daea3b00bd80870d4
Author: Doug Ledford <dledford at redhat.com>
Date: Mon Jul 18 11:49:01 2011 -0400
Revert systemd changes that came back with the rawhide merge
Signed-off-by: Doug Ledford <dledford at redhat.com>
mdadm.spec | 56 +++++++++++---------------------------------
mdmonitor-takeover.service | 11 --------
mdmonitor.service | 13 ----------
3 files changed, 14 insertions(+), 66 deletions(-)
---
diff --git a/mdadm.spec b/mdadm.spec
index cd4beab..9a1fded 100644
--- a/mdadm.spec
+++ b/mdadm.spec
@@ -1,15 +1,13 @@
Summary: The mdadm program controls Linux md devices (software RAID arrays)
Name: mdadm
Version: 3.2.2
-Release: 5%{?dist}
+Release: 6%{?dist}
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.bz2
Source1: mdmonitor.init
Source2: raid-check
Source3: mdadm.rules
Source4: mdadm-raid-check-sysconfig
Source5: mdadm-cron
-Source6: mdmonitor.service
-Source7: mdmonitor-takeover.service
Source8: mdadm.conf
Patch0: mdadm-3.2.2-man.patch
Patch1: mdadm-3.2.1-version.patch
@@ -22,9 +20,11 @@ Group: System Environment/Base
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Obsoletes: mdctl,raidtools
BuildRequires: systemd-units
-Requires(post): systemd-units systemd-sysv chkconfig coreutils
-Requires(preun): systemd-units
-Requires(postun): systemd-units coreutils
+Requires(post): chkconfig coreutils
+Requires(postun): coreutils
+Requires(post): /sbin/service
+Requires(preun): /sbin/service
+Requires(postun): /sbin/service
Requires: udev initscripts
%description
@@ -34,18 +34,6 @@ package. However, mdadm is a single program, and it can perform
almost all functions without a configuration file, though a configuration
file can be used to help with some common tasks.
-%package sysvinit
-Group: System Environment/Base
-Summary: SysV init script for mdadm
-Requires: %{name} = %{version}-%{release}
-Requires(post): /sbin/service
-Requires(preun): /sbin/service
-Requires(postun): /sbin/service
-
-%description sysvinit
-SysV style init script for mdadm. It needs to be installed only if systemd
-is not used as the system init process.
-
%prep
%setup -q
%patch0 -p1 -b .man
@@ -67,11 +55,6 @@ install -Dp -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/raid-check
install -Dp -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/cron.d/raid-check
mkdir -p -m 700 %{buildroot}/var/run/mdadm
-# systemd
-mkdir -p %{buildroot}%{_unitdir}
-install -m644 %{SOURCE6} %{buildroot}%{_unitdir}
-install -m644 %{SOURCE7} %{buildroot}%{_unitdir}
-
# tmpfile
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
install -m 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
@@ -83,48 +66,37 @@ rm -rf %{buildroot}
%post
if [ $1 -eq 1 ] ; then
- /bin/systemctl enable mdmonitor.service mdmonitor-takeover.service >/dev/null 2>&1 || :
+ /sbin/chkconfig --add mdmonitor
fi
%preun
if [ $1 = 0 ]; then
- /bin/systemctl --no-reload mdmonitor.service > /dev/null 2>&1 || :
- /bin/systemctl stop mdmonitor.service > /dev/null 2>&1 || :
+ service mdmonitor stop > /dev/null 2>&1 || :
+ /sbin/chkconfig --del mdmonitor
fi
%postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
- /bin/systemctl try-restart mdmonitor.service >/dev/null 2>&1 || :
+ service mdmonitor condrestart > /dev/null 2>&1 || :
fi
-%triggerun -- %{name} < 3.2.2-3
-%{_bindir}/systemd-sysv-convert --save mdmonitor >/dev/null 2>&1 || :
-/bin/systemctl --no-reload enable mdmonitor.service mdmonitor-takeover.service >/dev/null 2>&1 || :
-/sbin/chkconfig --del mdmonitor >/dev/null 2>&1 || :
-/bin/systemctl try-restart mdmonitor.service >/dev/null 2>&1 || :
-
-%triggerpostun -n %{name}-sysvinit -- %{name} < 3.2.2-3
-/sbin/chkconfig --add mdmonitor >/dev/null 2>&1 || :
-
%files
%defattr(-,root,root,-)
%doc TODO ChangeLog mdadm.conf-example COPYING misc/*
/lib/udev/rules.d/*
/sbin/*
%{_sbindir}/raid-check
-%{_unitdir}/mdmonitor.service
-%{_unitdir}/mdmonitor-takeover.service
%{_mandir}/man*/md*
+%{_initrddir}/*
%config(noreplace) %{_sysconfdir}/cron.d/*
%config(noreplace) %{_sysconfdir}/sysconfig/*
%dir %{_localstatedir}/run/%{name}/
%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
-%files sysvinit
-%{_initrddir}/*
-
%changelog
+* Mon Jul 18 2011 Doug Ledford <dledford at redhat.com> - 3.2.2-6
+- Back out systemd changes from rawhide
+
* Fri Jul 15 2011 Doug Ledford <dledford at redhat.com> - 3.2.2-5
- Merge rawhide mdadm to f15. Rawhide changelog preserved even though
the referenced versions do not exist in f15, rawhide specific builds
More information about the scm-commits
mailing list