From fd1b4044cbfae67663791e713f186420dea3c952 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Jul 19 2017 17:08:49 +0000 Subject: Remove git from release name Fix selinux lines. --- diff --git a/nrpe.spec b/nrpe.spec index bd84535..4b0b8ac 100644 --- a/nrpe.spec +++ b/nrpe.spec @@ -5,7 +5,7 @@ Name: nrpe Version: 3.2.0 -Release: 2git%{?dist} +Release: 3%{?dist} Summary: Host/service/network monitoring agent for Nagios Group: Applications/System @@ -121,9 +121,9 @@ make %{?_smp_mflags} all ## SELinux configs mkdir selinux install -pm 644 %{SOURCE3} README.SELinux.rst -cp -p %{SOURCE4} selinux/nrpe.te -cp -p %{SOURCE5} selinux/nrpe.fc -touch selinux/nrpe.if +cp -p %{SOURCE4} selinux/%{name}.te +cp -p %{SOURCE5} selinux/%{name}.fc +touch selinux/%{name}.if make -f %{_datadir}/selinux/devel/Makefile %endif @@ -152,7 +152,7 @@ install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf %endif %if 0%{?rhel} >5 # Selinux configs -install -p -m 644 -D nrpe.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/nrpe.pp +install -p -m 644 -D %{name}.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/%{name}.pp %endif %clean @@ -195,14 +195,14 @@ fi %if 0%{?el5}%{?el6} if [ "$1" -le "1" ]; then # Fist install semodule -i %{_datadir}/selinux/packages/%{name}.pp 2>/dev/null || : - fixfiles -R nrpe restore || : - /sbin/service nrpe condrestart > /dev/null 2>&1 || : + fixfiles -R %{name} restore || : + /sbin/service %{name} condrestart > /dev/null 2>&1 || : fi %else if [ "$1" -le "1" ]; then # Fist install semodule -i %{_datadir}/selinux/packages/%{name}.pp 2>/dev/null || : - fixfiles -R nrpe restore || : - %systemd_postun_with_restart nrpe.service + fixfiles -R %{name} restore || : + %systemd_postun_with_restart %{name}.service fi %endif %endif @@ -211,15 +211,15 @@ fi %preun selinux %if 0%{?el5}%{?el6} if [ "$1" -lt "1" ]; then # Final removal - semodule -r nrpe 2>/dev/null || : - fixfiles -R nrpe restore || : - /sbin/service nrpe condrestart > /dev/null 2>&1 || : + semodule -r %{name} 2>/dev/null || : + fixfiles -R %{name} restore || : + /sbin/service %{name} condrestart > /dev/null 2>&1 || : fi %else if [ "$1" -lt "1" ]; then # Final removal - semodule -r nrpe 2>/dev/null || : - fixfiles -R nrpe restore || : - %systemd_postun_with_restart nrpe.service + semodule -r %{name} 2>/dev/null || : + fixfiles -R %{name} restore || : + %systemd_postun_with_restart %{name}.service fi %endif %endif @@ -228,7 +228,7 @@ fi %postun selinux if [ "$1" -ge "1" ]; then # Upgrade # Replaces the module if it is already loaded - semodule -i %{_datadir}/selinux/packages/%{name}/nagios.pp 2>/dev/null || : + semodule -i %{_datadir}/selinux/packages/%{name}/%{name}.pp 2>/dev/null || : # no need to restart the daemon fi %endif @@ -256,10 +256,14 @@ fi %if 0%{?rhel} > 5 %files selinux %doc README.SELinux.rst -%{_datadir}/selinux/packages/%{name}/nrpe.pp +%{_datadir}/selinux/packages/%{name}/%{name}.pp %endif %changelog +* Wed Jul 19 2017 Stephen Smoogen - 3.2.0-3 +- Remove git from release name +- Fix selinux lines. + * Fri Jul 14 2017 Stephen Smoogen - 3.2.0-2git - Remember to put in a patch so the /etc/nrpe.d/ is used.