|
Packit |
9fb438 |
Name: munge
|
|
Packit |
9fb438 |
Version: 0.5.13
|
|
Packit |
9fb438 |
Release: 1%{?dist}
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
Summary: MUNGE authentication service
|
|
Packit |
9fb438 |
Group: System Environment/Daemons
|
|
Packit |
9fb438 |
License: GPLv3+ and LGPLv3+
|
|
Packit |
9fb438 |
URL: https://dun.github.io/munge/
|
|
Packit |
9fb438 |
Source0: https://github.com/dun/munge/releases/download/%{name}-%{version}/%{name}-%{version}.tar.xz
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
BuildRequires: bzip2-devel
|
|
Packit |
9fb438 |
BuildRequires: openssl-devel
|
|
Packit |
9fb438 |
BuildRequires: zlib-devel
|
|
Packit |
9fb438 |
BuildRequires: systemd
|
|
Packit |
9fb438 |
Requires: %{name}-libs = %{version}-%{release}
|
|
Packit |
9fb438 |
Requires(pre): shadow-utils
|
|
Packit |
9fb438 |
Requires(post): systemd
|
|
Packit |
9fb438 |
Requires(preun): systemd
|
|
Packit |
9fb438 |
Requires(postun): systemd
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%package devel
|
|
Packit |
9fb438 |
Summary: Headers and libraries for developing applications using MUNGE
|
|
Packit |
9fb438 |
Group: Development/Libraries
|
|
Packit |
9fb438 |
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|
Packit |
9fb438 |
BuildRequires: pkgconfig
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%package libs
|
|
Packit |
9fb438 |
Summary: Libraries for applications using MUNGE
|
|
Packit |
9fb438 |
Group: System Environment/Libraries
|
|
Packit |
9fb438 |
Requires: %{name} = %{version}-%{release}
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%description
|
|
Packit |
9fb438 |
MUNGE (MUNGE Uid 'N' Gid Emporium) is an authentication service for creating
|
|
Packit |
9fb438 |
and validating credentials. It is designed to be highly scalable for use
|
|
Packit |
9fb438 |
in an HPC cluster environment. It allows a process to authenticate the
|
|
Packit |
9fb438 |
UID and GID of another local or remote process within a group of hosts
|
|
Packit |
9fb438 |
having common users and groups. These hosts form a security realm that is
|
|
Packit |
9fb438 |
defined by a shared cryptographic key. Clients within this security realm
|
|
Packit |
9fb438 |
can create and validate credentials without the use of root privileges,
|
|
Packit |
9fb438 |
reserved ports, or platform-specific methods.
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%description devel
|
|
Packit |
9fb438 |
A header file and static library for developing applications using MUNGE.
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%description libs
|
|
Packit |
9fb438 |
A shared library for applications using MUNGE.
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%prep
|
|
Packit |
9fb438 |
%setup -q
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%build
|
|
Packit |
9fb438 |
##
|
|
Packit |
9fb438 |
# Add the following to the rpm command line to specify 32-bit/64-bit builds:
|
|
Packit |
9fb438 |
# --with arch32 (build 32-bit executables & library)
|
|
Packit |
9fb438 |
# --with arch64 (build 64-bit executables & library)
|
|
Packit |
9fb438 |
##
|
|
Packit |
9fb438 |
%configure --disable-static \
|
|
Packit |
9fb438 |
%{?_with_arch32: --enable-arch=32} \
|
|
Packit |
9fb438 |
%{?_with_arch64: --enable-arch=64} \
|
|
Packit |
9fb438 |
--program-prefix=%{?_program_prefix:%{_program_prefix}}
|
|
Packit |
9fb438 |
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
|
Packit |
9fb438 |
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
|
Packit |
9fb438 |
make %{?_smp_mflags}
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%install
|
|
Packit |
9fb438 |
rm -rf %{buildroot}
|
|
Packit |
9fb438 |
make install DESTDIR=%{buildroot}
|
|
Packit |
9fb438 |
touch %{buildroot}/%{_sysconfdir}/munge/munge.key
|
|
Packit |
9fb438 |
touch %{buildroot}/%{_localstatedir}/lib/munge/munge.seed
|
|
Packit |
9fb438 |
touch %{buildroot}/%{_localstatedir}/log/munge/munged.log
|
|
Packit |
9fb438 |
touch %{buildroot}/%{_localstatedir}/run/munge/munged.pid
|
|
Packit |
9fb438 |
rm -f %{buildroot}/%{_sysconfdir}/sysconfig/munge
|
|
Packit |
9fb438 |
rm -f %{buildroot}/%{_initddir}/munge
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%clean
|
|
Packit |
9fb438 |
rm -rf %{buildroot}
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%pre
|
|
Packit |
9fb438 |
getent group munge >/dev/null || \
|
|
Packit |
9fb438 |
groupadd -r munge
|
|
Packit |
9fb438 |
getent passwd munge >/dev/null || \
|
|
Packit |
9fb438 |
useradd -c "MUNGE authentication service" -d "%{_sysconfdir}/munge" \
|
|
Packit |
9fb438 |
-g munge -s /sbin/nologin -r munge
|
|
Packit |
9fb438 |
exit 0
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%post
|
|
Packit |
9fb438 |
if [ ! -e %{_sysconfdir}/munge/munge.key -a -c /dev/urandom ]; then
|
|
Packit |
9fb438 |
dd if=/dev/urandom bs=1 count=1024 \
|
|
Packit |
9fb438 |
>%{_sysconfdir}/munge/munge.key 2>/dev/null
|
|
Packit |
9fb438 |
chown munge:munge %{_sysconfdir}/munge/munge.key
|
|
Packit |
9fb438 |
chmod 0400 %{_sysconfdir}/munge/munge.key
|
|
Packit |
9fb438 |
fi
|
|
Packit |
9fb438 |
%systemd_post munge.service
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%post libs -p /sbin/ldconfig
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%preun
|
|
Packit |
9fb438 |
%systemd_preun munge.service
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%postun
|
|
Packit |
9fb438 |
%systemd_postun_with_restart munge.service
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%postun libs -p /sbin/ldconfig
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%files
|
|
Packit |
9fb438 |
%{!?_licensedir:%global license %doc}
|
|
Packit |
9fb438 |
%license COPYING*
|
|
Packit |
9fb438 |
%doc AUTHORS
|
|
Packit |
9fb438 |
%doc DISCLAIMER*
|
|
Packit |
9fb438 |
%doc HISTORY
|
|
Packit |
9fb438 |
%doc JARGON
|
|
Packit |
9fb438 |
%doc KEYS
|
|
Packit |
9fb438 |
%doc NEWS
|
|
Packit |
9fb438 |
%doc PLATFORMS
|
|
Packit |
9fb438 |
%doc QUICKSTART
|
|
Packit |
9fb438 |
%doc README
|
|
Packit |
9fb438 |
%doc THANKS
|
|
Packit |
9fb438 |
%doc doc/*
|
|
Packit |
9fb438 |
%dir %attr(0700,munge,munge) %{_sysconfdir}/munge
|
|
Packit |
9fb438 |
%attr(0600,munge,munge) %config(noreplace) %ghost %{_sysconfdir}/munge/munge.key
|
|
Packit |
9fb438 |
%dir %attr(0711,munge,munge) %{_localstatedir}/lib/munge
|
|
Packit |
9fb438 |
%attr(0600,munge,munge) %ghost %{_localstatedir}/lib/munge/munge.seed
|
|
Packit |
9fb438 |
%dir %attr(0700,munge,munge) %{_localstatedir}/log/munge
|
|
Packit |
9fb438 |
%attr(0640,munge,munge) %ghost %{_localstatedir}/log/munge/munged.log
|
|
Packit |
9fb438 |
%dir %attr(0755,munge,munge) %{_localstatedir}/run/munge
|
|
Packit |
9fb438 |
%attr(0644,munge,munge) %ghost %{_localstatedir}/run/munge/munged.pid
|
|
Packit |
9fb438 |
%{_bindir}/*
|
|
Packit |
9fb438 |
%{_sbindir}/*
|
|
Packit |
9fb438 |
%{_mandir}/*[^3]/*
|
|
Packit |
9fb438 |
%{_tmpfilesdir}/munge.conf
|
|
Packit |
9fb438 |
%{_unitdir}/munge.service
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%files devel
|
|
Packit |
9fb438 |
%{_includedir}/*
|
|
Packit |
9fb438 |
%{_libdir}/*.la
|
|
Packit |
9fb438 |
%{_libdir}/*.so
|
|
Packit |
9fb438 |
%{_libdir}/pkgconfig/*.pc
|
|
Packit |
9fb438 |
%{_mandir}/*3/*
|
|
Packit |
9fb438 |
|
|
Packit |
9fb438 |
%files libs
|
|
Packit |
9fb438 |
%{_libdir}/*.so.*
|