munge/munge.spec

195 lines
5.7 KiB
RPMSpec
Raw Normal View History

2020-11-17 22:46:02 +00:00
%bcond_without check
2009-07-30 08:11:25 +00:00
Name: munge
2020-11-17 22:46:02 +00:00
Version: 0.5.14
2022-07-20 08:53:36 +00:00
Release: %autorelease
2009-07-30 08:11:25 +00:00
Summary: Enables uid & gid authentication across a host cluster
2016-08-15 09:05:01 +00:00
# The libs and devel package is GPLv3+ and LGPLv3+ where as the main package is GPLv3 only.
License: GPLv3+ and LGPLv3+
2016-08-15 09:00:39 +00:00
URL: https://dun.github.io/munge/
Source0: https://github.com/dun/munge/releases/download/munge-%{version}/munge-%{version}.tar.xz
2020-11-17 22:46:02 +00:00
Source1: https://github.com/dun/munge/releases/download/%{name}-%{version}/%{name}-%{version}.tar.xz.asc
Source2: https://github.com/dun.gpg
Source3: munge.sysusers
2020-11-17 22:46:02 +00:00
Source4: README.md
# Not included in the release tar
Source5: https://github.com/dun/munge/raw/f90281631a27c7df0e15e3b66df1a6e5393cee49/t/0104-munged-security-pidfile.t
Source6: https://github.com/dun/munge/raw/f90281631a27c7df0e15e3b66df1a6e5393cee49/t/0105-munged-security-seedfile.t
2009-07-30 08:11:25 +00:00
# Patches to fix s390x build
# https://bugzilla.redhat.com/show_bug.cgi?id=1923337
Patch0: 0001-Sharness-Add-munged_kill_daemon-and-munged_cleanup.patch
Patch1: 0002-Sharness-Fix-dup-of-failing-check-when-run-by-root.patch
Patch2: 0003-Sharness-Fix-EACCES-failure-succeeding-for-root.patch
Patch3: 0004-HKDF-Fix-big-endian-bug-caused-by-size_t-ptr-cast.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: git-core
2020-11-17 22:46:02 +00:00
BuildRequires: gnupg2
BuildRequires: systemd-rpm-macros
2019-11-27 14:38:54 +00:00
BuildRequires: zlib-devel bzip2-devel openssl-devel
Requires: munge-libs = %{version}-%{release}
Requires: logrotate
2009-07-30 08:11:25 +00:00
2020-11-17 22:46:02 +00:00
%if %{with check}
BuildRequires: procps-ng
BuildRequires: util-linux
%endif
2009-10-21 20:51:52 +00:00
Requires(pre): shadow-utils
2009-07-30 08:11:25 +00:00
2020-09-29 15:13:51 +00:00
%{?systemd_requires}
%{?sysusers_requires_compat}
2009-07-30 08:11:25 +00:00
%description
2020-09-29 15:14:51 +00:00
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
2009-07-30 08:11:25 +00:00
methods.
%package devel
2014-06-02 21:24:03 +00:00
Summary: Development files for uid * gid authentication across a host cluster
2011-02-27 09:24:24 +00:00
Requires: munge-libs%{?_isa} = %{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
2014-06-02 21:24:03 +00:00
Summary: Runtime libs for uid * gid authentication across a host cluster
2009-10-21 17:04:27 +00:00
%description libs
Runtime libraries for using MUNGE.
2009-07-30 08:11:25 +00:00
%prep
2020-11-17 22:46:02 +00:00
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -N -S git
2020-11-17 22:46:02 +00:00
cp "%{SOURCE4}" README-Fedora.md
pushd t
cp "%{SOURCE5}" .
cp "%{SOURCE6}" .
chmod +x *.t
git add .
git commit -m "Include additional files"
popd
%autopatch
2009-07-30 08:11:25 +00:00
%build
2020-11-17 22:46:02 +00:00
%configure --disable-static --with-crypto-lib=openssl --runstatedir="%{_rundir}" --with-systemdunitdir="%{_unitdir}" --with-sysconfigdir="%{_sysconfdir}/sysconfig/" --with-logrotateddir="%{_sysconfdir}/logrotate.d/"
2009-07-30 08:11:25 +00:00
# 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
2020-09-29 15:13:51 +00:00
%make_build
2009-07-30 08:11:25 +00:00
%install
%make_install
2009-07-30 08:11:25 +00:00
2012-02-05 23:55:54 +00:00
# Install extra files.
install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/munge.conf
2012-02-05 23:55:54 +00:00
# rm unneeded files.
2020-09-29 15:14:51 +00:00
# Exclude .la files
rm %{buildroot}/%{_libdir}/libmunge.la
2009-07-30 08:11:25 +00:00
# Fix a few permissions
chmod 700 %{buildroot}%{_var}/lib/munge %{buildroot}%{_var}/log/munge
chmod 700 %{buildroot}%{_sysconfdir}/munge
2009-07-30 08:11:25 +00:00
2009-09-26 10:13:09 +00:00
# Create and empty key file and pid file to be marked as a ghost file below.
2020-09-29 15:14:51 +00:00
# i.e it is not actually included in the rpm, only the record
2009-07-30 08:11:25 +00:00
# of it is.
mkdir -p %{buildroot}%{_rundir}/munge
2020-11-17 22:46:02 +00:00
touch %{buildroot}%{_rundir}/munge/munged.pid
%check
%if %{with check}
%make_build check \
LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
MUNGE_ROOT=/tmp/munge-$$ VERBOSE=t verbose=t
%endif
2009-07-30 08:11:25 +00:00
%pre
%sysusers_create_compat %{SOURCE3}
2009-07-30 08:11:25 +00:00
%preun
%systemd_preun munge.service
2009-07-30 08:11:25 +00:00
%post
%systemd_post munge.service
2009-07-30 08:11:25 +00:00
%postun
%systemd_postun_with_restart munge.service
%ldconfig_scriptlets libs
2009-07-30 08:11:25 +00:00
%files
%{_bindir}/munge
%{_bindir}/remunge
%{_bindir}/unmunge
%{_sbindir}/munged
2020-11-17 22:46:02 +00:00
%{_sbindir}/mungekey
2009-07-30 08:11:25 +00:00
%{_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
2020-11-17 22:46:02 +00:00
%{_mandir}/man8/mungekey.8.gz
%{_unitdir}/munge.service
2009-07-30 08:11:25 +00:00
%attr(0700,munge,munge) %dir %{_var}/log/munge
%attr(0700,munge,munge) %dir %{_var}/lib/munge
%attr(0700,munge,munge) %dir %{_sysconfdir}/munge
2020-11-19 10:17:09 +00:00
%attr(0755,munge,munge) %ghost %dir /run/munge/
%attr(0644,munge,munge) %ghost /run/munge/munged.pid
2009-07-30 08:11:25 +00:00
%{_sysusersdir}/munge.conf
2009-07-30 08:11:25 +00:00
%config(noreplace) %{_sysconfdir}/logrotate.d/munge
2020-11-17 22:46:02 +00:00
%config(noreplace) %{_sysconfdir}/sysconfig/munge
2009-07-30 08:11:25 +00:00
2019-11-27 15:04:47 +00:00
%license COPYING COPYING.LESSER
2020-11-17 22:46:02 +00:00
%doc README-Fedora.md
%doc AUTHORS
2020-11-17 22:46:02 +00:00
%doc JARGON NEWS QUICKSTART README
2009-07-30 08:11:25 +00:00
%doc doc
2009-10-21 17:04:27 +00:00
%files libs
%{_libdir}/libmunge.so.2
%{_libdir}/libmunge.so.2.0.0
2009-07-30 08:11:25 +00:00
%files devel
%{_includedir}/munge.h
%{_libdir}/libmunge.so
%{_libdir}/pkgconfig/munge.pc
2009-07-30 08:11:25 +00:00
%{_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
2022-07-20 08:53:36 +00:00
%autochangelog