From 9e90840d67d09b860c46fbb47af323bfd39857d4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Wed, 3 Nov 2021 01:04:39 -0400 Subject: [PATCH] import munge-0.5.13-13.el9 --- .gitignore | 1 + .munge.metadata | 1 + SOURCES/create-munge-key | 73 +++++++++ SOURCES/munge.logrotate | 5 + SOURCES/munge.sysusers | 1 + SPECS/munge.spec | 334 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 415 insertions(+) create mode 100644 .gitignore create mode 100644 .munge.metadata create mode 100644 SOURCES/create-munge-key create mode 100644 SOURCES/munge.logrotate create mode 100644 SOURCES/munge.sysusers create mode 100644 SPECS/munge.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f4d645c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/munge-0.5.13.tar.xz diff --git a/.munge.metadata b/.munge.metadata new file mode 100644 index 0000000..1020c5f --- /dev/null +++ b/.munge.metadata @@ -0,0 +1 @@ +bcb0b89e44c5c0ec21f4bcfaacb4493b82aace61 SOURCES/munge-0.5.13.tar.xz diff --git a/SOURCES/create-munge-key b/SOURCES/create-munge-key new file mode 100644 index 0000000..07dddd4 --- /dev/null +++ b/SOURCES/create-munge-key @@ -0,0 +1,73 @@ +#! /bin/sh +# Generates a random key for munged +# +# (C) 2007 Gennaro Oliva +# You may freely distribute this file under the terms of the GNU General +# Public License, version 2 or later. + +#Setting default random file +randomfile=/dev/urandom + +#Usage message +usage="Try \`$0 -h' for more information." + +#Help message +needhelp() { +echo Usage: create-munge-key [OPTION]... +echo Generates a random key for munged +echo List of options +echo " -f force overwriting existing old key" +echo " -r specify /dev/random as random file for key generation" +echo " default is /dev/urandom" +echo " -h display this help and exit" +} + +#Parsing command line options +while getopts "hrf" options; do + case $options in + r ) randomfile=/dev/random;; + f ) force=yes;; + h ) needhelp + exit 0;; + \? ) echo $usage + exit 1;; + * ) echo $usage + exit 1;; + esac +done + +if [ `id -u` != 0 ] ; then + echo "Please run create-munge-key as root." + exit 1 +fi + + +#Checking random file presence +if [ ! -e $randomfile ] ; then + echo $0: cannot find random file $randomfile + exit 1 +fi + +#Checking if the user want to overwrite existing key file +if [ "$force" != "yes" ] && [ -e /etc/munge/munge.key ] ; then + echo The munge key /etc/munge/munge.key already exists + echo -n "Do you want to overwrite it? (y/N) " + read ans + if [ "$ans" != "y" -a "$ans" != "Y" ] ; then + exit 0 + fi +fi + +#Generating the key file and change owner and permissions +if [ "$randomfile" = "/dev/random" ] ; then + echo Please type on the keyboard, echo move your mouse, + echo utilize the disks. This gives the random number generator + echo a better chance to gain enough entropy. +fi +echo -n "Generating a pseudo-random key using $randomfile " +dd if=$randomfile bs=1 count=1024 > /etc/munge/munge.key \ + 2>/dev/null +chown munge:munge /etc/munge/munge.key +chmod 0400 /etc/munge/munge.key +echo completed. +exit 0 diff --git a/SOURCES/munge.logrotate b/SOURCES/munge.logrotate new file mode 100644 index 0000000..8a92840 --- /dev/null +++ b/SOURCES/munge.logrotate @@ -0,0 +1,5 @@ +/var/log/munge/munged.log { + missingok + notifempty + copytruncate +} diff --git a/SOURCES/munge.sysusers b/SOURCES/munge.sysusers new file mode 100644 index 0000000..01efead --- /dev/null +++ b/SOURCES/munge.sysusers @@ -0,0 +1 @@ +u munge - "Runs Uid 'N' Gid Emporium" /run/munge /sbin/nologin diff --git a/SPECS/munge.spec b/SPECS/munge.spec new file mode 100644 index 0000000..c66ac44 --- /dev/null +++ b/SPECS/munge.spec @@ -0,0 +1,334 @@ +Name: munge +Version: 0.5.13 +Release: 13%{?dist} +Summary: Enables uid & gid authentication across a host cluster + +# The libs and devel package is GPLv3+ and LGPLv3+ where as the main package is GPLv3 only. +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 +Source3: munge.sysusers + +BuildRequires: gcc +BuildRequires: systemd-rpm-macros +BuildRequires: zlib-devel bzip2-devel openssl-devel +Requires: munge-libs = %{version}-%{release} +Requires: logrotate + +Requires(pre): shadow-utils + +%{?systemd_requires} +%{?sysusers_requires_compat} + +%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 +Summary: Development files for uid * gid authentication across a host cluster +Requires: munge-libs%{?_isa} = %{version}-%{release} + +%description devel +Header files for developing using MUNGE. + +%package libs +Summary: Runtime libs for uid * gid authentication across a host cluster + +%description libs +Runtime libraries for using MUNGE. + + +%prep +%setup -q +cp -p %{SOURCE1} create-munge-key +cp -p %{SOURCE2} munge.logrotate + +%build +%configure --disable-static --with-crypto-lib=openssl +echo "d /run/munge 0755 munge munge -" > src/etc/munge.tmpfiles.conf.in +# 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_build + + +%install +%make_install + +# Install extra files. +install -p -m 755 create-munge-key %{buildroot}/%{_sbindir}/create-munge-key +install -p -D -m 644 munge.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/munge + +install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/munge.conf + +# rm unneeded files. +rm %{buildroot}/%{_sysconfdir}/sysconfig/munge +rm %{buildroot}/%{_sysconfdir}/init.d/munge +# Exclude .la files +rm %{buildroot}/%{_libdir}/libmunge.la + + +# Fix a few permissions +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 %{buildroot}%{_var}/run/munge/munged.pid +mv %{buildroot}%{_var}/run %{buildroot} + +%pre +%sysusers_create_compat %{SOURCE3} + +%preun +%systemd_preun munge.service + +%post +%systemd_post munge.service + +%postun +%systemd_postun_with_restart munge.service + +%ldconfig_scriptlets libs + +%files +%{_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 +%{_unitdir}/munge.service + +%attr(0700,munge,munge) %dir %{_var}/log/munge +%attr(0700,munge,munge) %dir %{_var}/lib/munge +%attr(0700,munge,munge) %dir %{_sysconfdir}/munge +%attr(0755,munge,munge) %dir /run/munge/ +%attr(0644,munge,munge) %ghost /run/munge/munged.pid + +%{_tmpfilesdir}/munge.conf +%{_sysusersdir}/munge.conf +%config(noreplace) %{_sysconfdir}/logrotate.d/munge + +%license COPYING COPYING.LESSER +%doc AUTHORS +%doc JARGON META NEWS QUICKSTART README +%doc doc + +%files libs +%{_libdir}/libmunge.so.2 +%{_libdir}/libmunge.so.2.0.0 + +%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 +%{_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 +* Mon Aug 09 2021 Mohan Boddu - 0.5.13-13 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Wed Jun 16 2021 Mohan Boddu - 0.5.13-12 +- Rebuilt for RHEL 9 BETA for openssl 3.0 + Related: rhbz#1971065 + +* Fri Apr 16 2021 Mohan Boddu - 0.5.13-11 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Sep 29 2020 Ankur Sinha - 0.5.13-10 +- Fix spec + build + +* Tue Jul 28 2020 Fedora Release Engineering - 0.5.13-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Feb 10 2020 Zbigniew Jędrzejewski-Szmek - 0.5.13-8 +- Provide a sysusers.d file to get user() and group() provides + (see https://fedoraproject.org/wiki/Changes/Adopting_sysusers.d_format). + +* Wed Jan 29 2020 Fedora Release Engineering - 0.5.13-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Nov 28 2019 Gerd Pokorra - 0.5.13-6 +- updating line in /usr/lib/tmpfiles.d/munge.conf: /var/run/munge → /run/munge +- add license tag +- add requires logrotate + +* Wed Nov 27 2019 Gerd Pokorra - 0.5.13-5 +- built with OpenSSL (not libgcrypt) + +* Thu Jul 25 2019 Fedora Release Engineering - 0.5.13-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 0.5.13-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 0.5.13-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu May 17 2018 Steve Traylen - 0.5.13-1 +- Escape macros in %%changelog + +* Fri Feb 09 2018 Igor Gnatenko - 0.5.12-9 +- Escape macros in %%changelog + +* Thu Feb 08 2018 Fedora Release Engineering - 0.5.12-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 0.5.12-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.5.12-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Jun 19 2017 Steve Traylen - 0.5.12-5 +- Use libgcrypt rather than openssl. + +* Fri Feb 10 2017 Fedora Release Engineering - 0.5.12-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Aug 15 2016 Steve Traylen - 0.5.12-3 +- Correct Licesing strings. + +* Mon Aug 15 2016 Steve Traylen - 0.5.12-2 +- Include COPYING.LESSER also. +- Correct URL homepage + +* Mon Aug 15 2016 Steve Traylen - 0.5.12-1 +- Upstream 0.5.12 +- License now GPLv3+ and also LGPLv3+ for libs. + +* Thu Feb 04 2016 Fedora Release Engineering - 0.5.11-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 0.5.11-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Aug 17 2014 Fedora Release Engineering - 0.5.11-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.5.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Jun 02 2014 Nils Philippsen +- fix typo + +* Fri Aug 30 2013 Steve Traylen - 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 - 0.5.10-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 0.5.10-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jul 20 2012 Fedora Release Engineering - 0.5.10-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sun Feb 5 2012 Steve Traylen - 0.5.10-3 +- Remove EPEL4 support since EOL. +- Change to systemd. + +* Fri Jan 13 2012 Fedora Release Engineering - 0.5.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Sun Feb 27 2011 Steve Traylen - 0.5.10-1 +- Upstream to 0.5.10 +- Add _isa tags to all build requires. +- Remove unused patch munge-correct-service-name.patch, upstream fixed. +- Update and add check-key-exists.patch back. +- Revert back to default CFLAGS. _GNU_SOURCE not needed any more. + +* Tue Feb 08 2011 Fedora Release Engineering - 0.5.9-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Dec 7 2010 Steve Traylen - 0.5.9-4 +- Upsteam is now hosted on google. +- Mark /var/run/munge as a %%ghost file. #656631 + +* Sat Mar 27 2010 Steve Traylen - 0.5.9-3 +- Release Bump +* Fri Mar 26 2010 Steve Traylen - 0.5.9-2 +- Remove initd-pass-rpmlint.patch, has been applied upstream. +- Remove remove-GPL_LICENSED-cpp.patch, has been applied upstream. +* Fri Mar 26 2010 Steve Traylen - 0.5.9-1 +- New upstream 0.5.9 +* Wed Oct 21 2009 Steve Traylen - 0.5.8-8 +- Requirment on munge removed from munge-libs. +- Explicit exact requirment on munge-libs for munge and munge-devel + added. +* Wed Oct 21 2009 Steve Traylen - 0.5.8-7 +- rhbz#530128 Move runtime libs to a new -libs package. + ldconfig moved to new -libs package as a result. +* Sat Sep 26 2009 Steve Traylen - 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 + +* Fri Aug 21 2009 Tomas Mraz - 0.5.8-5 +- rebuilt with new openssl + +* Wed Jul 22 2009 Steve Traylen - 0.5.8-4 +- Expand defattr with 4th argument for default directory perms. +- Explict attr for non 0644 files and 0755 directories. + +* Wed Jul 22 2009 Steve Traylen - 0.5.8-3 +- Append -DGNU_SOURCE to default CFLAGS. + +* Wed Jul 22 2009 Steve Traylen - 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 - 0.5.8-1 +- First Build + +