munge/munge.spec

247 lines
7.6 KiB
RPMSpec
Raw Normal View History

2009-07-30 08:11:25 +00:00
%if 0%{?el4}%{?el5}
%define _initddir %{_sysconfdir}/rc.d/init.d
%endif
Name: munge
2010-03-26 18:34:34 +00:00
Version: 0.5.9
2010-03-26 19:07:29 +00:00
Release: 2%{?dist}
2009-07-30 08:11:25 +00:00
Summary: Enables uid & gid authentication across a host cluster
Group: Applications/System
License: GPLv2+
URL: http://home.gna.org/munge/
Source0: http://download.gna.org/munge/%{version}/munge-%{version}.tar.bz2
Source1: create-munge-key
Source2: munge.logrotate
Patch2: runas-munge-user.patch
2009-09-26 10:13:09 +00:00
# Was loading /etc/sysconfig/munge wrongly on reboot.
# Fixed upstream already for next release.
2009-10-21 20:51:52 +00:00
# https://bugzilla.redhat.com/show_bug.cgi?id=525732
2009-09-26 10:13:09 +00:00
Patch5: %{name}-correct-service-name.patch
2009-07-30 08:11:25 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: zlib-devel bzip2-devel openssl-devel
2009-10-21 20:51:52 +00:00
Requires: munge-libs = %{version}-%{release}
2009-07-30 08:11:25 +00:00
2009-10-21 20:51:52 +00:00
Requires(post): chkconfig
Requires(pre): shadow-utils
Requires(preun): chkconfig, initscripts
2009-07-30 08:11:25 +00:00
Requires(postun): initscripts
%description
MUNGE (MUNGE Uid 'N' Gid Emporium) is an authentication service for creating
and validating credentials. It is designed to be highly scalable for use
in an HPC cluster environment.
It allows a process to authenticate the UID and GID of another local or
remote process within a group of hosts having common users and groups.
These hosts form a security realm that is defined by a shared cryptographic
key. Clients within this security realm can create and validate credentials
without the use of root privileges, reserved ports, or platform-specific
methods.
%package devel
2009-10-21 20:51:52 +00:00
Summary: Development files for uid * gid authentication acrosss a host cluster
Group: Applications/System
Requires: munge-libs = %{version}-%{release}
2009-07-30 08:11:25 +00:00
%description devel
Header files for developing using MUNGE.
2009-10-21 17:04:27 +00:00
%package libs
2009-10-21 20:51:52 +00:00
Summary: Runtime libs for uid * gid authentication acrosss a host cluster
Group: Applications/System
2009-10-21 17:04:27 +00:00
%description libs
Runtime libraries for using MUNGE.
2009-07-30 08:11:25 +00:00
%prep
%setup -q
%patch2 -p1
%build
# Won't compile without -DGNU_SOURCE on fc11,12 at least.
%if ! 0%{?el4}%{?el5}
export CFLAGS="%{optflags} -D_GNU_SOURCE"
%endif
%configure --disable-static
# Get rid of some rpaths for /usr/sbin
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# mv init.d script form /etc/init.d to %{_initddir}
mkdir -p $RPM_BUILD_ROOT/%{_initddir}
mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/munge $RPM_BUILD_ROOT/%{_initddir}/munge
#
chmod 644 $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/munge
# Exclude .la files
rm $RPM_BUILD_ROOT/%{_libdir}/libmunge.la
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_sbindir}/create-munge-key
install -p -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/munge
# 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
2009-09-26 10:13:09 +00:00
# Create and empty key file and pid file to be marked as a ghost file below.
2009-07-30 08:11:25 +00:00
# i.e it is not actually included in the rpm, only the record
# of it is.
# Can't be done on .el4 or .el5.
%if ! 0%{?el4}%{?el5}
2009-09-26 10:13:09 +00:00
touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.key
chmod 400 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.key
touch $RPM_BUILD_ROOT%{_var}/run/%{name}/%{name}d.pid
2009-07-30 08:11:25 +00:00
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%postun
if [ "$1" -ge "1" ] ; then
/sbin/service munge condrestart >/dev/null 2>&1 || :
fi
%preun
if [ $1 = 0 ]; then
/sbin/service munge stop > /dev/null 2>&1 || :
/sbin/chkconfig --del munge || :
fi
%pre
getent group munge >/dev/null || groupadd -r munge
getent passwd munge >/dev/null || \
useradd -r -g munge -d %{_var}/run/munge -s /sbin/nologin \
-c "Runs Uid 'N' Gid Emporium" munge
exit 0
%post
/sbin/chkconfig --add munge || :
2009-10-21 17:04:27 +00:00
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
2009-07-30 08:11:25 +00:00
%files
%defattr(-,root,root,-)
%{_initddir}/munge
%{_bindir}/munge
%{_bindir}/remunge
%{_bindir}/unmunge
%{_sbindir}/munged
%{_sbindir}/create-munge-key
%{_mandir}/man1/munge.1.gz
%{_mandir}/man1/remunge.1.gz
%{_mandir}/man1/unmunge.1.gz
%{_mandir}/man7/munge.7.gz
%{_mandir}/man8/munged.8.gz
2009-09-26 10:13:09 +00:00
%attr(-,munge,munge) %dir %{_var}/run/munge
2009-07-30 08:11:25 +00:00
%attr(0700,munge,munge) %dir %{_var}/log/munge
%attr(0700,munge,munge) %dir %{_sysconfdir}/munge
%if ! 0%{?el4}%{?el5}
%attr(0400,munge,munge) %ghost %{_sysconfdir}/%{name}/%{name}.key
2009-09-26 10:13:09 +00:00
%attr(-,munge,munge) %ghost %{_var}/run/%{name}/%{name}d.pid
2009-07-30 08:11:25 +00:00
%endif
%attr(0700,munge,munge) %dir %{_var}/lib/munge
%config(noreplace) %{_sysconfdir}/sysconfig/munge
%config(noreplace) %{_sysconfdir}/logrotate.d/munge
2009-10-21 20:51:52 +00:00
%doc AUTHORS BUGS ChangeLog DISCLAIMER
2009-07-30 08:11:25 +00:00
%doc JARGON META NEWS QUICKSTART README
%doc doc
2009-10-21 17:04:27 +00:00
%files libs
%defattr(-,root,root,-)
%{_libdir}/libmunge.so.2
%{_libdir}/libmunge.so.2.0.0
2009-10-21 20:51:52 +00:00
%doc COPYING
2009-07-30 08:11:25 +00:00
%files devel
%defattr(-,root,root,-)
%{_includedir}/munge.h
%{_libdir}/libmunge.so
%{_mandir}/man3/munge.3.gz
%{_mandir}/man3/munge_ctx.3.gz
%{_mandir}/man3/munge_ctx_copy.3.gz
%{_mandir}/man3/munge_ctx_create.3.gz
%{_mandir}/man3/munge_ctx_destroy.3.gz
%{_mandir}/man3/munge_ctx_get.3.gz
%{_mandir}/man3/munge_ctx_set.3.gz
%{_mandir}/man3/munge_ctx_strerror.3.gz
%{_mandir}/man3/munge_decode.3.gz
%{_mandir}/man3/munge_encode.3.gz
%{_mandir}/man3/munge_enum.3.gz
%{_mandir}/man3/munge_enum_int_to_str.3.gz
%{_mandir}/man3/munge_enum_is_valid.3.gz
%{_mandir}/man3/munge_enum_str_to_int.3.gz
%{_mandir}/man3/munge_strerror.3.gz
%changelog
2010-03-26 19:07:29 +00:00
* Fri Mar 26 2010 Steve Traylen <steve.traylen@cern.ch> - 0.5.9-2
- Remove initd-pass-rpmlint.patch, has been applied upstream.
- Remove remove-GPL_LICENSED-cpp.patch, has been applied upstream.
2010-03-26 18:34:34 +00:00
* Fri Mar 26 2010 Steve Traylen <steve.traylen@cern.ch> - 0.5.9-1
- New upstream 0.5.9
2009-10-21 20:51:52 +00:00
* Wed Oct 21 2009 Steve Traylen <steve.traylen@cern.ch> - 0.5.8-8
- Requirment on munge removed from munge-libs.
- Explicit exact requirment on munge-libs for munge and munge-devel
added.
2009-10-21 17:04:27 +00:00
* Wed Oct 21 2009 Steve Traylen <steve.traylen@cern.ch> - 0.5.8-7
- rhbz#530128 Move runtime libs to a new -libs package.
ldconfig moved to new -libs package as a result.
2009-09-26 10:13:09 +00:00
* Sat Sep 26 2009 Steve Traylen <steve.traylen@cern.ch> - 0.5.8-6
- Patch for rhbz #525732 - Loads /etc/sysconfig/munge
correctly.
- Mark pid file as ghost file on oses that support that.
- Permisions on pid directory to 755
2009-08-21 14:33:25 +00:00
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0.5.8-5
- rebuilt with new openssl
2009-07-30 08:11:25 +00:00
* Thu Jul 22 2009 Steve Traylen <steve.traylen@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@cern.ch> - 0.5.8-3
- Append -DGNU_SOURCE to default CFLAGS.
* Wed Jul 22 2009 Steve Traylen <steve.traylen@cern.ch> - 0.5.8-2
- Correct License to GPLv2+
- Move man3 pages to the devel package.
- Remove +x bit from create-munge-key source.
- Preserve timestamps when installing files.
- ldconfig not needed on -devel package.
- Do a condrestart when upgrading.
- Remove redundant files from docs.
- chmod /var/lib/munge /var/log/munge and /etc/munge to 700.
- Apply patch to not error when GPL_LICENSED is not set.
- Patch service script to print error on if munge.key not present
on start only and with a better error.
- Remove dont-exit-form-lib.patch. munge is expecting munge to
do this.
- Remove libgcrypt-devel from BuildRequires, uses openssl by
default anyway.
- Mark the munge.key as a ghost file.
* Fri Jun 12 2009 Steve Traylen <steve@traylen.net> - 0.5.8-1
- First Build