[munge] Upstream 0.5.11 Use upstream's systemd files. Fix incorrect dates in changelogs. Fix systemd scriptl

stevetraylen stevetraylen at fedoraproject.org
Fri Aug 30 15:00:51 UTC 2013


commit 7b0caca95832f6669286fde58e45d50dc337c254
Author: Steve Traylen <steve.traylen at cern.ch>
Date:   Fri Aug 30 14:59:26 2013 +0000

    Upstream 0.5.11
    Use upstream's systemd files.
    Fix incorrect dates in changelogs.
    Fix systemd scriptlets #850219
    Use buildroot macro everywhere.

 .gitignore           |    1 +
 munge.spec           |   89 ++++++++++++++++++++-----------------------------
 munged-tmpfiles.conf |    1 -
 munged.service       |   21 ------------
 sources              |    2 +-
 5 files changed, 38 insertions(+), 76 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ae98466..95a415b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 munge-0.5.9.tar.bz2
 /munge-0.5.10.tar.bz2
+/munge-0.5.11.tar.bz2
diff --git a/munge.spec b/munge.spec
index 16bd1b4..4f482a8 100644
--- a/munge.spec
+++ b/munge.spec
@@ -1,6 +1,6 @@
 Name:           munge
-Version:        0.5.10
-Release:        6%{?dist}
+Version:        0.5.11
+Release:        1%{?dist}
 Summary:        Enables uid & gid authentication across a host cluster
 
 Group:          Applications/System
@@ -9,19 +9,17 @@ URL:            http://munge.googlecode.com/
 Source0:        http://munge.googlecode.com/files/munge-%{version}.tar.bz2
 Source1:        create-munge-key
 Source2:        munge.logrotate
-Source3:        munged.service
-Source4:        munged-tmpfiles.conf
 
 BuildRequires:  systemd-units
-BuildRequires:  zlib-devel%{?_isa} bzip2-devel%{?_isa} openssl-devel%{?_isa}
-Requires:       munge-libs%{?_isa} = %{version}-%{release}
+BuildRequires:  zlib-devel bzip2-devel openssl-devel
+Requires:       munge-libs = %{version}-%{release}
 
 Requires(pre):    shadow-utils
 
-Requires(post):   systemd-units
-Requires(post):   systemd-sysv
-Requires(preun):  systemd-units
-Requires(postun): systemd-units
+Requires(post):   systemd
+Requires(preun):  systemd
+Requires(postun): systemd
+
 
 %description
 MUNGE (MUNGE Uid 'N' Gid Emporium) is an authentication service for creating 
@@ -54,8 +52,6 @@ Runtime libraries for using MUNGE.
 %setup -q
 cp -p %{SOURCE1} create-munge-key
 cp -p %{SOURCE2} munge.logrotate
-cp -p %{SOURCE3} munged.service
-cp -p %{SOURCE4} munged-tmpfiles.conf
 
 %build
 %configure  --disable-static
@@ -67,48 +63,39 @@ make %{?_smp_mflags}
 
 %install
 
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
 
 # Install extra files.
-install -p -D -m 644 munged.service $RPM_BUILD_ROOT/%{_unitdir}/munged.service
-install -p -D -m 644 munged-tmpfiles.conf $RPM_BUILD_ROOT/%{_sysconfdir}/tmpfiles.d/munged.conf
-install -p -m 755 create-munge-key $RPM_BUILD_ROOT/%{_sbindir}/create-munge-key
-install -p -D -m 644 munge.logrotate $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/munge
+install -p -m 755 create-munge-key %{buildroot}/%{_sbindir}/create-munge-key
+install -p -D -m 644 munge.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/munge
 
 # rm unneeded files.
-rm $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/munge
-rm $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/munge
+rm %{buildroot}/%{_sysconfdir}/sysconfig/munge
+# 
+rm %{buildroot}/%{_initddir}/munge
 
 # Exclude .la files 
-rm $RPM_BUILD_ROOT/%{_libdir}/libmunge.la
+rm %{buildroot}/%{_libdir}/libmunge.la
 
 
 # Fix a few permissions
-chmod 700 $RPM_BUILD_ROOT%{_var}/lib/munge $RPM_BUILD_ROOT%{_var}/log/munge
-chmod 700 $RPM_BUILD_ROOT%{_sysconfdir}/munge
+chmod 700 %{buildroot}%{_var}/lib/munge %{buildroot}%{_var}/log/munge
+chmod 700 %{buildroot}%{_sysconfdir}/munge
 
 # Create and empty key file and pid file to be marked as a ghost file below.
 # i.e it is not actually included in the rpm, only the record 
 # of it is.
-touch $RPM_BUILD_ROOT%{_var}/run/munge/munged.pid
+touch %{buildroot}%{_var}/run/munge/munged.pid
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
 
 %postun 
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
-   # Package upgrade, not uninstall
-   /bin/systemctl try-restart munged.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart munge.service
 
 %preun
-if [ $1 -eq 0 ] ; then
-   # Package removal, not upgrade
-   /bin/systemctl --no-reload disable munged.service > /dev/null 2>&1 || :
-   /bin/systemctl stop munged.service > /dev/null 2>&1 || :
-fi
+%systemd_preun munge.service
 
 %pre
 getent group munge >/dev/null || groupadd -r munge
@@ -119,18 +106,7 @@ exit 0
 
 
 %post
-if [ $1 -eq 1 ] ; then 
-   # Initial installation 
-   /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
-
-%triggerun -- munge < 0.5.10-3
-# Save the current service runlevel info
-/usr/bin/systemd-sysv-convert --save munge >/dev/null 2>&1 ||:
-
-# Run these because the SysV package being removed won't do them
-/sbin/chkconfig --del munge >/dev/null 2>&1 || :
-/bin/systemctl try-restart munged.service >/dev/null 2>&1 || :
+%systemd_post munge.service
 
 %post   libs -p /sbin/ldconfig
 %postun libs -p /sbin/ldconfig
@@ -146,18 +122,18 @@ fi
 %{_mandir}/man1/unmunge.1.gz
 %{_mandir}/man7/munge.7.gz
 %{_mandir}/man8/munged.8.gz
-%{_unitdir}/munged.service
+%{_unitdir}/munge.service
 
 %attr(0700,munge,munge) %dir  %{_var}/log/munge
 %attr(0700,munge,munge) %dir %{_sysconfdir}/munge
-%attr(0755,munge,munge) %ghost %dir  %{_var}/run/munge
+%attr(0755,munge,munge) %dir  %{_var}/run/munge/
 %attr(0644,munge,munge)    %ghost %{_var}/run/munge/munged.pid
 %attr(0700,munge,munge) %dir  %{_var}/lib/munge
 
-%config(noreplace) %{_sysconfdir}/tmpfiles.d/munged.conf
+%config(noreplace) %{_tmpfilesdir}/munge.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/munge
 
-%doc AUTHORS BUGS ChangeLog    
+%doc AUTHORS
 %doc JARGON META NEWS QUICKSTART README 
 %doc doc
 
@@ -169,6 +145,7 @@ fi
 %files devel
 %{_includedir}/munge.h
 %{_libdir}/libmunge.so
+%{_libdir}/pkgconfig/munge.pc
 %{_mandir}/man3/munge.3.gz
 %{_mandir}/man3/munge_ctx.3.gz
 %{_mandir}/man3/munge_ctx_copy.3.gz
@@ -187,6 +164,12 @@ fi
 
 
 %changelog
+* Fri Aug 30 2013 Steve Traylen <steve.traylen at cern.ch> - 0.5.11-1
+- Upstream 0.5.11
+- Use upstream's systemd files.
+- Fix incorrect dates in changelogs.
+- Fix systemd scriptlets #850219
+- Use buildroot macro everywhere.
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.10-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
@@ -240,11 +223,11 @@ fi
 * Fri Aug 21 2009 Tomas Mraz <tmraz at redhat.com> - 0.5.8-5
 - rebuilt with new openssl
 
-* Thu Jul 22 2009 Steve Traylen <steve.traylen at cern.ch> - 0.5.8-4
+* Wed Jul 22 2009 Steve Traylen <steve.traylen at cern.ch> - 0.5.8-4
 - Expand defattr with 4th argument for default directory perms.
 - Explict attr for non 0644 files and 0755 directories.
 
-* Thu Jul 22 2009 Steve Traylen <steve.traylen at cern.ch> - 0.5.8-3
+* Wed Jul 22 2009 Steve Traylen <steve.traylen at cern.ch> - 0.5.8-3
 - Append -DGNU_SOURCE to default CFLAGS.
 
 * Wed Jul 22 2009 Steve Traylen <steve.traylen at cern.ch> - 0.5.8-2
diff --git a/sources b/sources
index 0b6c9ea..d579ea2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-49ec1b1d860b37967c9b8eb1057299bf  munge-0.5.10.tar.bz2
+bd8fca8d5f4c1fcbef1816482d49ee01  munge-0.5.11.tar.bz2


More information about the scm-commits mailing list