[glusterfs/el6] 3.3.1-2, take two
Kaleb S. KEITHLEY
kkeithle at fedoraproject.org
Thu Nov 1 12:37:04 UTC 2012
commit 426a7e2cdc3b803d9c542202bc60714e2bd7ffdf
Author: Kaleb S. KEITHLEY <kkeithle at redhat.com>
Date: Thu Nov 1 08:34:06 2012 -0400
3.3.1-2, take two
glusterfs.spec | 49 +++++++++++++++++++++++++++++++++----------------
1 files changed, 33 insertions(+), 16 deletions(-)
---
diff --git a/glusterfs.spec b/glusterfs.spec
index fd9b606..01b9d4c 100644
--- a/glusterfs.spec
+++ b/glusterfs.spec
@@ -61,8 +61,17 @@ Requires(postun): systemd-units
%define _init_disable() /bin/systemctl disable %1.service ;
%define _init_restart() /bin/systemctl try-restart %1.service ;
%define _init_stop() /bin/systemctl stop %1.service ;
-%define _init_install() %{__install} -D -p -m 0644 %{1} %{buildroot}%{_unitdir}/%{2}.service ;
-%define _init_file() %{_unitdir}/%{1}.service
+%define _init_install() %{__install} -D -p -m 0644 %1 %{buildroot}%{_unitdir}/%2.service ;
+# can't seem to make a generic macro that works
+%define _init_glusterd %{_unitdir}/glusterd.service
+%define _init_glusterfsd %{_unitdir}/glusterfsd.service
+%define _init_gluster_swift_account %{_unitdir}/gluster-swift-account.service
+%define _init_gluster_swift_account_at %{_unitdir}/gluster-swift-account at .service
+%define _init_gluster_swift_object %{_unitdir}/gluster-swift-object.service
+%define _init_gluster_swift_object_at %{_unitdir}/gluster-swift-object at .service
+%define _init_gluster_swift_container %{_unitdir}/gluster-swift-object.container
+%define _init_gluster_swift_container_at %{_unitdir}/gluster-swift-container at .service
+%define _init_gluster_swift_proxy %{_unitdir}/gluster-swift-proxy.service
%else
Source7: glusterd.init
Source8: glusterfsd.init
@@ -74,8 +83,14 @@ Requires(postun): /sbin/service
%define _init_disable() /sbin/chkconfig --del %1 ;
%define _init_restart() /sbin/service %1 condrestart &>/dev/null ;
%define _init_stop() /sbin/service %1 stop &>/dev/null ;
-%define _init_install() %{__install} -D -p -m 0755 %{1} %{buildroot}%{_sysconfdir}/init.d/%{2} ;
-%define _init_file() %{_sysconfdir}/init.d/%{1}
+%define _init_install() %{__install} -D -p -m 0755 %1 %{buildroot}%{_sysconfdir}/init.d/%2 ;
+# can't seem to make a generic macro that works
+%define _init_glusterd %{_sysconfdir}/init.d/glusterd
+%define _init_glusterfsd %{_sysconfdir}/init.d/glusterfsd
+%define _init_gluster_swift_account %{_sysconfdir}/init.d/gluster-swift-account
+%define _init_gluster_swift_object %{_sysconfdir}/init.d/gluster-swift-object
+%define _init_gluster_swift_container %{_sysconfdir}/init.d/gluster-swift-container
+%define _init_gluster_swift_proxy %{_sysconfdir}/init.d/gluster-swift-proxy
%endif
BuildRequires: bison flex
@@ -641,8 +656,10 @@ fi
# Legacy configs
%config(noreplace) %{_sysconfdir}/logrotate.d/glusterfsd
%config(noreplace) %{_sysconfdir}/sysconfig/glusterfsd
-%_init_file glusterd
-%_init_file glusterfsd
+# init files
+%_init_glusterd
+%_init_glusterfsd
+# binaries
%{_sbindir}/gluster
%{_sbindir}/glusterd
%{_libdir}/glusterfs/%{version}/xlator/storage*
@@ -729,9 +746,9 @@ fi
%files swift-account
%defattr(-,root,root,-)
%doc swift-%{SWIFTVER}/etc/account-server.conf-sample
-%_init_file gluster-swift-account
+%_init_gluster_swift_account
%if 0%{?_with_systemd:1}
-%_init_file gluster-swift-account@
+%_init_gluster_swift_account_at
%endif
%dir %attr(0755, swift, swift) %{_localstatedir}/run/swift/account-server
%dir %{_sysconfdir}/swift/account-server
@@ -744,9 +761,9 @@ fi
%files swift-container
%defattr(-,root,root,-)
%doc swift-%{SWIFTVER}/etc/container-server.conf-sample
-%_init_file gluster-swift-container
+%_init_gluster_swift_container
%if 0%{?_with_systemd:1}
-%_init_file gluster-swift-container@
+%_init_gluster_swift_container_at
%endif
%dir %attr(0755, swift, swift) %{_localstatedir}/run/swift/container-server
%dir %{_sysconfdir}/swift/container-server
@@ -761,9 +778,9 @@ fi
%defattr(-,root,root,-)
%doc swift-%{SWIFTVER}/etc/object-server.conf-sample
%doc swift-%{SWIFTVER}/etc/rsyncd.conf-sample
-%_init_file gluster-swift-object
+%_init_gluster_swift_object
%if 0%{?_with_systemd:1}
-%_init_file gluster-swift-object@
+%_init_gluster_swift_object_at
%endif
%dir %attr(0755, swift, swift) %{_localstatedir}/run/swift/object-server
%dir %{_sysconfdir}/swift/object-server
@@ -777,7 +794,7 @@ fi
%files swift-proxy
%defattr(-,root,root,-)
%doc swift-%{SWIFTVER}/etc/proxy-server.conf-sample
-%_init_file gluster-swift-proxy
+%_init_gluster_swift_proxy
%dir %attr(0755, swift, swift) %{_localstatedir}/run/swift/proxy-server
%dir %{_sysconfdir}/swift/proxy-server
%{_bindir}/swift-proxy-server
@@ -841,17 +858,17 @@ fi
%preun server
if [ $1 -eq 0 ]; then
- if [ -f %_init_file2 ]; then
+ if [ -f %_init_glusterfsd ]; then
%_init_stop glusterfsd
fi
%_init_stop glusterd
- if [ -f %_init_file2 ]; then
+ if [ -f %_init_glusterfsd ]; then
%_init_disable glusterfsd
fi
%_init_disable glusterd
fi
if [ $1 -ge 1 ]; then
- if [ -f %_init_file2 ]; then
+ if [ -f %_init_glusterfsd ]; then
%_init_restart glusterfsd
fi
%_init_restart glusterd
More information about the scm-commits
mailing list