[sanlock/f16] Update to latest version and arches

David Teigland teigland at fedoraproject.org
Fri Jun 15 22:04:21 UTC 2012


commit 66c24149ce42e646f072329f09fb40c6f5f758cf
Author: David Teigland <teigland at redhat.com>
Date:   Fri Jun 15 17:04:04 2012 -0500

    Update to latest version and arches

 sanlock.spec |  114 ++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 72 insertions(+), 42 deletions(-)
---
diff --git a/sanlock.spec b/sanlock.spec
index 70178ae..b2534c4 100644
--- a/sanlock.spec
+++ b/sanlock.spec
@@ -1,15 +1,16 @@
 Name:           sanlock
-Version:        2.1
-Release:        1%{?dist}
+Version:        2.3
+Release:        3%{?dist}
 Summary:        A shared disk lock manager
 
 Group:          System Environment/Base
 License:        GPLv2 and GPLv2+ and LGPLv2+
 URL:            https://fedorahosted.org/sanlock/
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-ExclusiveArch:	x86_64
-BuildRequires:  libblkid-devel libaio-devel python python-devel systemd-units
+BuildRequires:  libblkid-devel libaio-devel python python-devel
 Requires:       %{name}-lib = %{version}-%{release}
+Requires(pre):  /usr/sbin/groupadd
+Requires(pre):  /usr/sbin/useradd
 Source0:        https://fedorahosted.org/releases/s/a/sanlock/%{name}-%{version}.tar.gz
 
 %description
@@ -39,17 +40,22 @@ make -C python \
         install LIBDIR=%{_libdir} \
         DESTDIR=$RPM_BUILD_ROOT
 
-install -D -m 0755 init.d/sanlock %{buildroot}/lib/systemd/systemd-sanlock
-install -D -m 0644 init.d/sanlock.service %{buildroot}/%{_unitdir}/sanlock.service
-install -D -m 0755 init.d/wdmd %{buildroot}/lib/systemd/systemd-wdmd
-install -D -m 0644 init.d/wdmd.service %{buildroot}/%{_unitdir}/wdmd.service
-
-install -Dm 0644 src/limits.conf \
-	$RPM_BUILD_ROOT/etc/security/limits.d/90-sanlock.conf
+%if 0%{?fedora} >= 16
+install -D -m 0755 init.d/sanlock $RPM_BUILD_ROOT/lib/systemd/systemd-sanlock
+install -D -m 0644 init.d/sanlock.service $RPM_BUILD_ROOT/%{_unitdir}/sanlock.service
+install -D -m 0755 init.d/wdmd $RPM_BUILD_ROOT/lib/systemd/systemd-wdmd
+install -D -m 0644 init.d/wdmd.service $RPM_BUILD_ROOT/%{_unitdir}/wdmd.service
+%else
+install -D -m 755 init.d/sanlock $RPM_BUILD_ROOT/%{_initddir}/sanlock
+install -D -m 755 init.d/wdmd $RPM_BUILD_ROOT/%{_initddir}/wdmd
+%endif
 
 install -Dm 0644 src/logrotate.sanlock \
 	$RPM_BUILD_ROOT/etc/logrotate.d/sanlock
 
+install -Dm 0644 src/sysconfig.sanlock \
+	$RPM_BUILD_ROOT/etc/sysconfig/sanlock
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -61,33 +67,58 @@ getent passwd sanlock > /dev/null || /usr/sbin/useradd \
 	-g 179 -d /var/run/sanlock sanlock
 
 %post
-#/sbin/chkconfig --add sanlock
-#/sbin/chkconfig --add wdmd
+if [ $1 -eq 1 ] ; then
+%if 0%{?fedora} >= 16
+  /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+%else
+  /sbin/chkconfig --add sanlock
+  /sbin/chkconfig --add wdmd
+%endif
+fi
 
 %preun
 if [ $1 = 0 ]; then
-	/sbin/service sanlock stop > /dev/null 2>&1
-	/sbin/service wdmd stop > /dev/null 2>&1
-#	/sbin/chkconfig --del sanlock
-#	/sbin/chkconfig --del wdmd
+%if 0%{?fedora} >= 16
+  /bin/systemctl --no-reload sanlock.service > /dev/null 2>&1 || :
+  /bin/systemctl --no-reload wdmd.service > /dev/null 2>&1 || :
+  /bin/systemctl stop sanlock.service > /dev/null 2>&1 || :
+  /bin/systemctl stop wdmd.service > /dev/null 2>&1 || :
+%else
+  /sbin/service sanlock stop > /dev/null 2>&1
+  /sbin/service wdmd stop > /dev/null 2>&1
+  /sbin/chkconfig --del sanlock
+  /sbin/chkconfig --del wdmd
+%endif
 fi
 
 %postun
-#/sbin/service sanlock condrestart >/dev/null 2>&1 || :
-#/sbin/service wdmd condrestart >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+%if 0%{?fedora} >= 16
+  /bin/systemctl try-restart sanlock.service >/dev/null 2>&1 || :
+  /bin/systemctl try-restart wdmd.service >/dev/null 2>&1 || :
+%else
+  /sbin/service sanlock condrestart >/dev/null 2>&1 || :
+  /sbin/service wdmd condrestart >/dev/null 2>&1 || :
+%endif
+fi
 
 %files
 %defattr(-,root,root,-)
+%if 0%{?fedora} >= 16
 /lib/systemd/systemd-sanlock
 /lib/systemd/systemd-wdmd
 %{_unitdir}/sanlock.service
 %{_unitdir}/wdmd.service
+%else
+%{_initddir}/sanlock
+%{_initddir}/wdmd
+%endif
 %{_sbindir}/sanlock
 %{_sbindir}/wdmd
 %{_mandir}/man8/wdmd*
 %{_mandir}/man8/sanlock*
-/etc/security/limits.d/90-sanlock.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/sanlock
+%config(noreplace) %{_sysconfdir}/sysconfig/sanlock
 
 %package        lib
 Summary:        A shared disk lock manager library
@@ -121,7 +152,7 @@ supplied by the sanlock library.
 
 %files          python
 %defattr(-,root,root,-)
-%{python_sitearch}/Sanlock-1.0-py2.7.egg-info
+%{python_sitearch}/Sanlock-1.0-py*.egg-info
 %{python_sitearch}/sanlock.so
 
 %package        devel
@@ -146,40 +177,39 @@ developing applications that use %{name}.
 %{_includedir}/sanlock_direct.h
 
 %changelog
-* Thu Apr 05 2012 David Teigland <teigland at redhat.com> 2.1-3
-- Add sources
+* Fri Jun 15 2012 David Teigland <teigland at redhat.com> - 2.3-3
+- Require useradd and groupadd
 
-* Thu Apr 05 2012 David Teigland <teigland at redhat.com> 2.1-2
-- Try with only x86_64
+* Mon Jun 04 2012 David Teigland <teigland at redhat.com> - 2.3-2
+- Remove exclusive arch
 
-* Thu Apr 05 2012 David Teigland <teigland at redhat.com> 2.1-1
-- Update to sanlock-2.1
-
-* Mon Feb 20 2012 Chris Feist <cfeist at redhat.com> - 1.9-8
-- Check if group & user exists before trying to create them
+* Wed May 30 2012 David Teigland <teigland at redhat.com> - 2.3-1
+- Update to sanlock-2.3
 
-* Mon Feb 13 2012 Chris Feist <cfeist at redhat.com> - 1.9-7
-- Stop using chkconfig due to switch to systemd
+* Fri May 25 2012 Federico Simoncelli <fsimonce at redhat.com> 2.2-2
+- Support multiple platforms in the spec file
 
-* Mon Feb 13 2012 Chris Feist <cfeist at redhat.com> - 1.9-6
-- Created the sanlock group to prevent errors
-- Fixes: 785824
+* Mon May 07 2012 David Teigland <teigland at redhat.com> - 2.2-1
+- Update to sanlock-2.2
 
-* Tue Jan 17 2012 Chris Feist <cfeist at redhat.com> - 1.9-2
-- Build for Fedora
+* Thu Apr 05 2012 David Teigland <teigland at redhat.com> - 2.1-2
+- Install service files instead of init files
 
-* Tue Jan 17 2012 David Teigland <teigland at redhat.com> - 1.9-1
-- Update to sanlock-1.9
+* Wed Mar 21 2012 David Teigland <teigland at redhat.com> - 2.1-1
+- Update to sanlock-2.1
 
-* Mon Nov 28 2011 David Teigland <teigland at redhat.com> - 1.8-3
-- only x86_64
+* Fri Mar 02 2012 David Teigland <teigland at redhat.com> - 2.0-1
+- Update to sanlock-2.0
 
 * Tue Sep 20 2011 David Teigland <teigland at redhat.com> - 1.8-2
 - fix useradd command in spec file
 
-* Fri Sep 16 2011 David Teigland <teigland at redhat.com> - 1.8-1
+* Fri Sep 16 2011 Chris Feist <cfeist at redhat.com - 1.8-1
 - Update to sanlock-1.8
 
+* Fri Aug 19 2011 Dan HorĂ¡k <dan[at]danny.cz> - 1.6-2
+- build on all arches again
+
 * Sun Aug 07 2011 Chris Feist <cfeist at redhat.com> - 1.7-4
 - Fix for minor file include issues
 


More information about the scm-commits mailing list