munge/munge.spec

138 lines
4.6 KiB
RPMSpec
Raw Normal View History

2020-09-15 11:32:09 +08:00
Name: munge
Version: 0.5.14
2020-09-15 11:32:09 +08:00
Release: 1
Summary: Enables uid & gid authentication across a host cluster
License: GPLv3+ and LGPLv3+
URL: https://dun.github.io/munge/
Source0: https://github.com/dun/munge/releases/download/munge-%{version}/munge-%{version}.tar.xz
Source1: create-munge-key
Source2: munge.logrotate
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
2020-09-15 11:32:09 +08:00
BuildRequires: gcc systemd-units zlib-devel bzip2-devel libgcrypt-devel
Requires: munge-libs = %{version}-%{release}
Requires(pre): shadow-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
2020-03-10 17:20:36 +08:00
%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
2020-09-15 11:32:09 +08:00
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.
2020-03-10 17:20:36 +08:00
%package devel
2020-09-15 11:32:09 +08:00
Summary: Development files for uid * gid authentication across a host cluster
Requires: munge-libs%{?_isa} = %{version}-%{release}
2020-03-10 17:20:36 +08:00
%description devel
2020-09-15 11:32:09 +08:00
Header files for developing using MUNGE.
2020-03-10 17:20:36 +08:00
2020-09-15 11:32:09 +08:00
%package libs
Summary: Runtime libs for uid * gid authentication across a host cluster
%description libs
Runtime libraries for using MUNGE.
2020-03-10 17:20:36 +08:00
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
2020-09-15 11:32:09 +08:00
cp -p %{SOURCE1} create-munge-key
cp -p %{SOURCE2} munge.logrotate
2020-03-10 17:20:36 +08:00
%build
%configure --disable-static --with-crypto-lib=libgcrypt
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-15 11:32:09 +08:00
make %{?_smp_mflags}
2020-03-10 17:20:36 +08:00
%install
2020-09-15 11:32:09 +08:00
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
install -p -m 755 create-munge-key %{buildroot}/%{_sbindir}/create-munge-key
install -p -D -m 644 munge.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/munge
2020-03-10 17:20:36 +08:00
rm %{buildroot}/%{_sysconfdir}/sysconfig/munge
rm %{buildroot}/%{_libdir}/libmunge.la
chmod 700 %{buildroot}%{_var}/lib/munge %{buildroot}%{_var}/log/munge
chmod 700 %{buildroot}%{_sysconfdir}/munge
touch %{buildroot}%{_var}/run/munge/munged.pid
2020-09-15 11:32:09 +08:00
%postun
2020-03-10 17:20:36 +08:00
%systemd_postun_with_restart munge.service
%preun
%systemd_preun munge.service
%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
%systemd_post munge.service
2020-09-15 11:32:09 +08:00
%ldconfig_scriptlets libs
2020-03-10 17:20:36 +08:00
%files
%{_bindir}/munge
%{_bindir}/remunge
%{_bindir}/unmunge
%{_sbindir}/munged
%{_sbindir}/mungekey
2020-09-15 11:32:09 +08:00
%{_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
%{_mandir}/man8/mungekey.8.gz
2020-03-10 17:20:36 +08:00
%{_unitdir}/munge.service
%attr(0700,munge,munge) %dir %{_var}/log/munge
%attr(0700,munge,munge) %dir %{_sysconfdir}/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
2020-09-15 11:32:09 +08:00
%config(noreplace) %{_sysconfdir}/logrotate.d/munge
%doc AUTHORS
%doc JARGON NEWS QUICKSTART README
2020-09-15 11:32:09 +08:00
%doc doc
2020-03-10 17:20:36 +08:00
2020-09-15 11:32:09 +08:00
%files libs
2020-03-10 17:20:36 +08:00
%{_libdir}/libmunge.so.2
%{_libdir}/libmunge.so.2.0.0
2020-09-15 11:32:09 +08:00
%doc COPYING COPYING.LESSER
2020-03-10 17:20:36 +08:00
%files devel
%{_includedir}/munge.h
%{_libdir}/libmunge.so
%{_libdir}/pkgconfig/munge.pc
2020-09-15 11:32:09 +08: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
2020-03-10 17:20:36 +08:00
%changelog
* Tue Jan 18 2022 SimpleUpdate Robot <tc@openeuler.org> - 0.5.14-1
- Upgrade to version 0.5.14
2020-09-15 11:32:09 +08:00
* Mon Sep 7 2020 luoshengwei <luoshengwei@huawei.com> - 0.5.13-1
- package init