From dc2b5270944d77ae99d68ca8e7410c0999b65f12 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Fri, 26 Jul 2019 14:13:22 -0400 Subject: [PATCH 01/13] "Adding package.cfg file" --- package.cfg | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 package.cfg diff --git a/package.cfg b/package.cfg new file mode 100644 index 0000000..66ea79d --- /dev/null +++ b/package.cfg @@ -0,0 +1,2 @@ +[koji] +targets = epel8 epel8-playground \ No newline at end of file From d48cb6280e5aa7e52fe4bf8636798942e9e7afcb Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Fri, 26 Jul 2019 19:21:08 +0000 Subject: [PATCH 02/13] Try to put in fixes to allow this to work on EL8 --- nagios.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/nagios.spec b/nagios.spec index 6710f9d..7f95557 100644 --- a/nagios.spec +++ b/nagios.spec @@ -2,7 +2,7 @@ Name: nagios Version: 4.4.3 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Host/service/network monitoring program @@ -71,7 +71,7 @@ BuildRequires: libtool # For selinux tools BuildRequires: checkpolicy, selinux-policy-devel -%if 0%{?el7} || 0%{?fedora} > 20 +%if 0%{?rhel} > 6 || 0%{?fedora} > 20 # For necessary macros BuildRequires: systemd %endif @@ -86,7 +86,7 @@ Requires: group(nagios) Requires(pre): group(nagios) Requires(pre): user(nagios) -%if 0%{?el7} || 0%{?fedora} > 20 +%if 0%{?rhel} > 6 || 0%{?fedora} > 20 # For necessary macros BuildRequires: systemd %else @@ -280,7 +280,7 @@ install -d -m 0775 %{buildroot}/%{_localstatedir}/log/%{name}/ install -d -m 0775 %{buildroot}/%{_localstatedir}/log/%{name}/archives # Use systemd unit on rhel7 or any supported Fedora -%if 0%{?el7} || 0%{?fedora} > 20 +%if 0%{?rhel} > 6 || 0%{?fedora} > 20 # Install systemd entry install -D -m 0644 -p %{SOURCE8} %{buildroot}%{_tmpfilesdir}/%{name}.conf @@ -324,7 +324,7 @@ exit 0 %post %{_sbindir}/usermod -a -G %{name} apache || : -%if 0%{?el7} || 0%{?fedora} > 20 +%if 0%{rhel} > 6 || 0%{?fedora} > 20 %systemd_post %{name}.service > /dev/null 2>&1 || : %else if [ $1 -eq 1 ]; then @@ -347,7 +347,7 @@ fi %endif %preun -%if 0%{?el7} || 0%{?fedora} > 20 +%if 0%{?rhel} > 6 || 0%{?fedora} > 20 %systemd_preun %{name}.service %else if [ $1 -eq 0 ]; then @@ -437,7 +437,7 @@ fi %{_sbindir}/* %{_bindir}/* %{_libdir}/%{name}/cgi-bin/*cgi -%if 0%{?el7} || 0%{?fedora} > 20 +%if 0%{?rhel} > 6 || 0%{?fedora} > 20 %{_unitdir}/%{name}.service %{_tmpfilesdir}/%{name}.conf %else @@ -483,6 +483,9 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Fri Jul 26 2019 Stephen Smoogen - 4.4.3-7 +- Try to put in fixes to allow this to work on EL8 + * Thu Jul 25 2019 Fedora Release Engineering - 4.4.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 713bf878b2db988547e41d375c951c474dd803e3 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Thu, 24 Sep 2020 16:40:49 +0000 Subject: [PATCH 03/13] remove package.cfg per new epel-playground policy --- package.cfg | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 package.cfg diff --git a/package.cfg b/package.cfg deleted file mode 100644 index 66ea79d..0000000 --- a/package.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[koji] -targets = epel8 epel8-playground \ No newline at end of file From 3966e705a2f81a89c44d8e7827e6fa3e2012510f Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Sat, 20 Feb 2021 23:50:47 +0100 Subject: [PATCH 04/13] Update to 4.4.6 Fix for CVE-2020-13977 #BZ1849087 Some spec cleanup --- .gitignore | 1 + nagios-0003-Install-config-files-too.patch | 9 ++-- nagios-0009-fix-localstatedir-for-linux.patch | 2 +- nagios-0011-remove-rpmbuild.patch | 35 +++++++++---- nagios-0015-Changelog.patch | 13 +++++ nagios.spec | 51 +++++++------------ sources | 2 +- 7 files changed, 66 insertions(+), 47 deletions(-) create mode 100644 nagios-0015-Changelog.patch diff --git a/.gitignore b/.gitignore index a1b2d77..3ac2d64 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ nagios-3.2.1.tar.gz /nagioscore-nagios-4.4.2.tar.gz /nagioscore-nagios-4.4.3.tar.gz /nagioscore-nagios-4.4.5.tar.gz +/nagioscore-nagios-4.4.6.tar.gz diff --git a/nagios-0003-Install-config-files-too.patch b/nagios-0003-Install-config-files-too.patch index 4bf4aa2..3194a02 100644 --- a/nagios-0003-Install-config-files-too.patch +++ b/nagios-0003-Install-config-files-too.patch @@ -1,7 +1,8 @@ -diff -up ./Makefile.in.install_config ./Makefile.in ---- ./Makefile.in.install_config 2017-04-19 19:11:47.783707415 -0400 -+++ ./Makefile.in 2017-04-19 19:11:47.785707384 -0400 -@@ -377,7 +377,7 @@ dox: +diff --git a/Makefile.in b/Makefile.in +index b992ab1e..ef2a797f 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -439,7 +439,7 @@ dox: doxygen doxy.conf diff --git a/nagios-0009-fix-localstatedir-for-linux.patch b/nagios-0009-fix-localstatedir-for-linux.patch index 3c18043..070285f 100644 --- a/nagios-0009-fix-localstatedir-for-linux.patch +++ b/nagios-0009-fix-localstatedir-for-linux.patch @@ -264,9 +264,9 @@ diff -up ./startup/default-service.in.fix_localstatedir ./startup/default-servic ExecStop=@BIN_KILL@ -s TERM ${MAINPID} -ExecStopPost=@BIN_RM@ -f @localstatedir@/rw/nagios.cmd +ExecStopPost=@BIN_RM@ -f @localstatedir@/spool/nagios/cmd/nagios.cmd + ExecReload=@bindir@/nagios -v @sysconfdir@/nagios.cfg ExecReload=@BIN_KILL@ -s HUP ${MAINPID} - [Install] diff -up ./t-tap/Makefile.in.fix_localstatedir ./t-tap/Makefile.in --- ./t-tap/Makefile.in.fix_localstatedir 2019-01-16 14:24:14.944312569 -0600 +++ ./t-tap/Makefile.in 2019-01-16 14:24:42.359858604 -0600 diff --git a/nagios-0011-remove-rpmbuild.patch b/nagios-0011-remove-rpmbuild.patch index 88e0049..401cad0 100644 --- a/nagios-0011-remove-rpmbuild.patch +++ b/nagios-0011-remove-rpmbuild.patch @@ -1,12 +1,14 @@ -diff -up ./contrib/Makefile.in.remove_rpmbuild ./contrib/Makefile.in ---- ./contrib/Makefile.in.remove_rpmbuild 2019-08-29 18:23:14.113160181 +0000 -+++ ./contrib/Makefile.in 2019-08-29 18:24:20.509445391 +0000 -@@ -85,36 +85,3 @@ $(CGI_O): $(CGI_C) +diff --git a/contrib/Makefile.in b/contrib/Makefile.in +index 72e4d4a9..62415152 100644 +--- a/contrib/Makefile.in ++++ b/contrib/Makefile.in +@@ -84,52 +84,3 @@ $(CGI_O): $(CGI_C) + %.cgi : %.c $(CC) $(CFLAGS) $(LDFLAGS) $< $(CGI_O) -o $@ - +- -############################################################################## --# rpm making automation for CentOS/RHEL. +-# making similiar EPEL rpm for Fedora/RHEL/CentOS - -ifneq ("$(wildcard /etc/redhat-release)","") - @@ -25,16 +27,31 @@ diff -up ./contrib/Makefile.in.remove_rpmbuild ./contrib/Makefile.in - endif -endif - --rpm: +-# Create our own tarball and put ino rpmbuild/SOURCES +-localsrc-rpm: - # create nagios tar ball. - @(cd ..;rm -f nagios-@VERSION@) - @(cd ..;ln -s . nagios-@VERSION@) - @(cd ..;tar zhcf nagios-@VERSION@.tar.gz --exclude nagios-@VERSION@/nagios-@VERSION@.tar.gz --exclude nagios-@VERSION@/nagios-@VERSION@ --exclude RCS --exclude CVS --exclude build-* --exclude *~ --exclude .git* nagios-@VERSION@/) - @(cd ..;rm -f nagios-@VERSION@) - # build the rpm using rpmbuild from ./rmbuild as topdir -- @rm -rf rpmbuild && mkdir -p rpmbuild/SOURCES +- @rm -rf rpmbuild && mkdir -p ./rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} - @cp ../nagios-@VERSION@.tar.gz rpmbuild/SOURCES/nagios-@VERSION@.tar.gz -- @rpmbuild -ba --define "_topdir ${PWD}/rpmbuild" ../nagios.spec +- @cp epel-patches/* ./rpmbuild/SOURCES +- @rpmbuild -ba --define "_topdir ${PWD}/rpmbuild" epel-nagios.spec +- @cp rpmbuild/RPMS/$(RPM_ARCH)/*.rpm . +- @cp rpmbuild/SRPMS/*.src.rpm . +- @ls -l *.rpm +- +-# tarball from https://github.com/NagiosEnterprises/nagioscore/releases/download/nagios-%{version}/nagios-%{version}.tar.gz +-rpm: init-epelrpm build-epelrpm - @mv rpmbuild/RPMS/$(RPM_ARCH)/*.rpm . - @ls -l *.rpm +-init-epelrpm: +- # build the rpm using rpmbuild from ./rmbuild as topdir +- @rm -rf ./rpmbuild && mkdir -p ./rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} +- @spectool -C ./rpmbuild/SOURCES -g epel-nagios.spec +- @cp epel-patches/* ./rpmbuild/SOURCES +-build-epelrpm: +- @rpmbuild -ba --define "_topdir ${PWD}/rpmbuild" epel-nagios.spec -endif diff --git a/nagios-0015-Changelog.patch b/nagios-0015-Changelog.patch new file mode 100644 index 0000000..5ef3490 --- /dev/null +++ b/nagios-0015-Changelog.patch @@ -0,0 +1,13 @@ +diff --git a/Changelog b/Changelog +index a5fd04c6..51394645 100644 +--- a/Changelog ++++ b/Changelog +@@ -9,7 +9,7 @@ FIXES + * Fixed duplicate properties appearing in statusjson.cgi (#718) (Sebastian Wolf) + * Fixed NERD not building when enabled in ./configure (#723) (Sebastian Wolf) + * Fixed build process when using GCC 10 (#721) (Michael Orlitzky) +-* Fixed postauth vulnerabilities in histogram.js, map.js, trends.js (CVE-2020-1408) (Thanks UraSec Team) (Sebastian Wolf) ++* Fixed postauth vulnerabilities in histogram.js, map.js, trends.js (CVE-2020-13977) (Thanks UraSec Team) (Sebastian Wolf) + * When using systemd, configuration will be verified before reloading (#715) (tatref) + * Fixed HARD OK states triggering on the maximum check attempt (#757) (Sebastian Wolf) + diff --git a/nagios.spec b/nagios.spec index cae8324..4d313e7 100644 --- a/nagios.spec +++ b/nagios.spec @@ -1,12 +1,8 @@ %global _hardened_build 1 -# https://gcc.gnu.org/gcc-10/porting_to.html#common -# attempt to fix bugzilla 1793909 -%define _legacy_common_support 1 - Name: nagios -Version: 4.4.5 -Release: 3%{?dist} +Version: 4.4.6 +Release: 1%{?dist} Summary: Host/service/network monitoring program @@ -50,7 +46,9 @@ Patch11: nagios-0011-remove-rpmbuild.patch Patch12: nagios-0012-fix-spool.patch Patch13: nagios-0013-fix-plugin.patch Patch14: nagios-0014-fix-uidgid.patch +Patch15: %{name}-0015-Changelog.patch +BuildRequires: make BuildRequires: doxygen BuildRequires: gcc BuildRequires: gd-devel > 1.8 @@ -162,23 +160,7 @@ Requires: %name = %version-%release Various contributed items used by plugins and other tools. %prep -%setup -q -n nagioscore-nagios-%{version} - -# patch0 would go here -%patch1 -p1 -b .fix_el6_init -%patch2 -p1 -b .fix_httpd_conf_d -%patch3 -p0 -b .install_config -%patch4 -p1 -b .fix_path_to_cgi -%patch5 -p1 -b .fix_path_to_passwd -%patch6 -p1 -b .more_images - -#%patch8 -p1 -b .conf_d -%patch9 -p1 -b .fix_localstatedir -%patch10 -p1 -b .remove_3rdparty_links -%patch11 -p1 -b .remove_rpmbuild -%patch12 -p1 -b .fix_spool -%patch13 -p1 -b .fix_plugin -%patch14 -p1 -b .fix_uidgid +%autosetup -p1 -n nagioscore-nagios-%{version} install -p -m 0644 %{SOURCE10} %{SOURCE11} %{SOURCE12} html/images/logos/ @@ -217,13 +199,14 @@ install -p -m 0644 %{SOURCE10} %{SOURCE11} %{SOURCE12} html/images/logos/ --with-template-extinfo \ --enable-event-broker \ STRIP=/bin/true -make %{?_smp_mflags} all + +%make_build all ### Build our documentation -%{__make} dox +%make_build dox ### Apparently contrib does not obey configure ! -%{__make} %{?_smp_mflags} -C contrib +%make_build -C contrib sed -e "s|/usr/lib/|%{_libdir}/|" %{SOURCE2} > %{name}.htaccess @@ -243,14 +226,12 @@ cp -p %{SOURCE14} selinux/%{name}_epel.te %endif cp -p %{SOURCE15} selinux/%{name}_epel.fc touch selinux/%{name}_epel.if -make -f %{_datadir}/selinux/devel/Makefile +%make_build -f %{_datadir}/selinux/devel/Makefile %endif %install -rm -rf $RPM_BUILD_ROOT - -make DESTDIR=%{buildroot} INIT_OPTS="" INSTALL_OPTS="" COMMAND_OPTS="" CGIDIR="%{_libdir}/%{name}/cgi-bin" CFGDIR="%{_sysconfdir}/%{name}" fullinstall +%make_install INIT_OPTS="" INSTALL_OPTS="" COMMAND_OPTS="" CGIDIR="%{_libdir}/%{name}/cgi-bin" CFGDIR="%{_sysconfdir}/%{name}" fullinstall # relocated to sbin (Fedora-specific) install -d -m 0755 %{buildroot}%{_bindir} @@ -305,7 +286,7 @@ install -p -m 644 -D %{name}_epel.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages %endif ### CONTRIB ITEMS TAKEN FROM UPSTREAM NAGIOS SPEC -make install -C contrib DESTDIR="%{buildroot}" INSTALL_OPTS="" +%make_install -C contrib INSTALL_OPTS="" install -p -m 644 contrib/eventhandlers/disable_active_service_checks %{buildroot}%{_libdir}/nagios/plugins/eventhandlers/ install -p -m 644 contrib/eventhandlers/disable_notifications %{buildroot}%{_libdir}/nagios/plugins/eventhandlers/ install -p -m 644 contrib/eventhandlers/enable_active_service_checks %{buildroot}%{_libdir}/nagios/plugins/eventhandlers/ @@ -432,8 +413,9 @@ fi %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/html %doc %{_datadir}/%{name}/html/docs -%doc Changelog INSTALLING LICENSE README.md UPGRADING UpgradeToVersion4.ReadMe UpgradeToVersion4.sh +%doc Changelog INSTALLING README.md UPGRADING UpgradeToVersion4.ReadMe UpgradeToVersion4.sh %doc internet.cfg +%license LICENSE %{_datadir}/%{name}/html/[^cd]* %{_datadir}/%{name}/html/contexthelp/ %{_datadir}/%{name}/html/d3/ @@ -487,6 +469,11 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Sat Feb 20 2021 Guido Aulisi - 4.4.6-1 +- Update to 4.4.6 +- Fix for CVE-2020-13977 #BZ1849087 +- Some spec cleanup + * Tue Feb 18 2020 Stephen Smoogen - 4.4.5-3 - Add change to allow for problems found in mass rebuild and gcc10. - Fix BZ#1793909 diff --git a/sources b/sources index fa4ac42..8d9f3c3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nagioscore-nagios-4.4.5.tar.gz) = b2b4213dc9087c49a96506f514ec672476763e1ca928bf5de8494a0509b612a4a357989e719820328095489138375c9db292ac3c8129925c323220860e17bc49 +SHA512 (nagioscore-nagios-4.4.6.tar.gz) = db3a205f1675693301c059b0ecdc767cdc423923cff0729c5584a48e04fb18d6c119d51991dd24290a539eb8578b2cb82316275039b36827871bb028883b495f From 201332880992a36cd13edb2eda0b3e53858d9176 Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Tue, 23 Feb 2021 21:01:12 +0100 Subject: [PATCH 05/13] Fix systemd unit file permissions #1676334 --- nagios.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nagios.spec b/nagios.spec index 4d313e7..061ac58 100644 --- a/nagios.spec +++ b/nagios.spec @@ -2,7 +2,7 @@ Name: nagios Version: 4.4.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Host/service/network monitoring program @@ -271,6 +271,9 @@ install -D -m 0644 -p %{SOURCE8} %{buildroot}%{_tmpfilesdir}/%{name}.conf # Remove SystemV init-script rm -f %{buildroot}%{_initrddir}/nagios + +# Fix systemd unit file permissions #1676334 +chmod -x %{buildroot}%{_unitdir}/%{name}.service %endif # Fix permissions - FIXME remove this when unneeded @@ -469,6 +472,9 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Tue Feb 23 2021 Guido Aulisi - 4.4.6-2 +- Fix systemd unit file permissions #1676334 + * Sat Feb 20 2021 Guido Aulisi - 4.4.6-1 - Update to 4.4.6 - Fix for CVE-2020-13977 #BZ1849087 From 7e41e4407d8a2e5dedf1cf2e0403404c32ed924e Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Sat, 27 Feb 2021 18:54:56 +0100 Subject: [PATCH 06/13] Require plugins needed for localhost monitoring (#1932297) Remove mistakenly readded patch for conf.d --- nagios.spec | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/nagios.spec b/nagios.spec index 061ac58..7489845 100644 --- a/nagios.spec +++ b/nagios.spec @@ -1,8 +1,10 @@ %global _hardened_build 1 +# Set bootstrap = 1 to build without depending on plugins for localhost monitoring +%global bootstrap 0 Name: nagios Version: 4.4.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Host/service/network monitoring program @@ -25,9 +27,6 @@ Source14: nagios_epel7.te Source15: nagios_epel.fc Source16: nagios_epel6.te -# Patch 0 should be a patch that we get from the maint git tree in -# order to fix any items upstream wanted. -#Patch0: nagios-0000-git201706.patch Patch1: nagios-0001-default-init.patch # Sent upstream Patch2: nagios-0002-Fix-installation-of-httpd-conf.d-config-file.patch @@ -35,8 +34,6 @@ Patch3: nagios-0003-Install-config-files-too.patch Patch4: nagios-0004-Fix-path-to-CGI-executables.patch Patch5: nagios-0005-Fixed-path-to-passwd-file-in-Apache-s-config-file.patch Patch6: nagios-0006-Added-several-images-to-the-sample-config-revb.patch -#Patch7: nagios-0007-Apache-2.4-configuration-fix-for-Fedora-18.patch -Patch8: nagios-0008-Add-cfg_dir-etc-nagios-conf.d-to-the-main-nagios-con.patch Patch9: nagios-0009-fix-localstatedir-for-linux.patch ## This has been requested for security groups not wanting to leak ## their nagios location. @@ -86,6 +83,17 @@ Requires: nagios-common Requires: user(nagios) Requires: group(nagios) +# This plugins are required for localhost monitoring +%if ! 0%{?bootstrap} +Requires: nagios-plugins-load +Requires: nagios-plugins-users +Requires: nagios-plugins-http +Requires: nagios-plugins-disk +Requires: nagios-plugins-ssh +Requires: nagios-plugins-swap +Requires: nagios-plugins-procs +%endif + Requires(pre): group(nagios) Requires(pre): user(nagios) %if 0%{?rhel} > 6 || 0%{?fedora} > 20 @@ -472,6 +480,9 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Sat Feb 27 2021 Guido Aulisi - 4.4.6-3 +- Require plugins needed for localhost monitoring (#1932297) + * Tue Feb 23 2021 Guido Aulisi - 4.4.6-2 - Fix systemd unit file permissions #1676334 From 5890060d6e99e5b2e4a48f080a5fa7a55e83680a Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Sun, 28 Feb 2021 11:13:59 +0100 Subject: [PATCH 07/13] Add missing require for nagios-plugins-ping --- nagios.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/nagios.spec b/nagios.spec index 7489845..b253610 100644 --- a/nagios.spec +++ b/nagios.spec @@ -85,6 +85,7 @@ Requires: group(nagios) # This plugins are required for localhost monitoring %if ! 0%{?bootstrap} +Requires: nagios-plugins-ping Requires: nagios-plugins-load Requires: nagios-plugins-users Requires: nagios-plugins-http From 8e92554e11776a0a6f964cb3959286f6ddf19ecb Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Sun, 28 Feb 2021 11:14:49 +0100 Subject: [PATCH 08/13] Fix run path --- nagios.tmpfiles.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nagios.tmpfiles.conf b/nagios.tmpfiles.conf index 907ca68..4bb5bc3 100644 --- a/nagios.tmpfiles.conf +++ b/nagios.tmpfiles.conf @@ -1 +1 @@ -D /var/run/nagios 0755 nagios nagios - +D /run/nagios 0755 nagios nagios - From db1df3989ac373a4d2ad71c1462c5d641e0946d9 Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Wed, 3 Mar 2021 09:56:21 +0100 Subject: [PATCH 09/13] Bump and build --- nagios.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nagios.spec b/nagios.spec index b253610..f0b9587 100644 --- a/nagios.spec +++ b/nagios.spec @@ -4,7 +4,7 @@ Name: nagios Version: 4.4.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Host/service/network monitoring program @@ -481,6 +481,10 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Wed Mar 03 2021 Guido Aulisi - 4.4.6-4 +- Add missing require for nagios-plugins-ping +- Fix run path + * Sat Feb 27 2021 Guido Aulisi - 4.4.6-3 - Require plugins needed for localhost monitoring (#1932297) From 940da331235ef961c2ace0270cb4980fa5026a3e Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Sun, 25 Dec 2022 14:14:00 +0100 Subject: [PATCH 10/13] Update to 4.4.9 --- .gitignore | 3 +++ nagios-0015-Changelog.patch | 13 ------------- nagios.spec | 9 ++++++--- sources | 2 +- 4 files changed, 10 insertions(+), 17 deletions(-) delete mode 100644 nagios-0015-Changelog.patch diff --git a/.gitignore b/.gitignore index 3ac2d64..90d2d7d 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ nagios-3.2.1.tar.gz /nagioscore-nagios-4.4.3.tar.gz /nagioscore-nagios-4.4.5.tar.gz /nagioscore-nagios-4.4.6.tar.gz +/nagioscore-nagios-4.4.7.tar.gz +/nagioscore-nagios-4.4.8.tar.gz +/nagioscore-nagios-4.4.9.tar.gz diff --git a/nagios-0015-Changelog.patch b/nagios-0015-Changelog.patch deleted file mode 100644 index 5ef3490..0000000 --- a/nagios-0015-Changelog.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Changelog b/Changelog -index a5fd04c6..51394645 100644 ---- a/Changelog -+++ b/Changelog -@@ -9,7 +9,7 @@ FIXES - * Fixed duplicate properties appearing in statusjson.cgi (#718) (Sebastian Wolf) - * Fixed NERD not building when enabled in ./configure (#723) (Sebastian Wolf) - * Fixed build process when using GCC 10 (#721) (Michael Orlitzky) --* Fixed postauth vulnerabilities in histogram.js, map.js, trends.js (CVE-2020-1408) (Thanks UraSec Team) (Sebastian Wolf) -+* Fixed postauth vulnerabilities in histogram.js, map.js, trends.js (CVE-2020-13977) (Thanks UraSec Team) (Sebastian Wolf) - * When using systemd, configuration will be verified before reloading (#715) (tatref) - * Fixed HARD OK states triggering on the maximum check attempt (#757) (Sebastian Wolf) - diff --git a/nagios.spec b/nagios.spec index f0b9587..1dc27f3 100644 --- a/nagios.spec +++ b/nagios.spec @@ -3,8 +3,8 @@ %global bootstrap 0 Name: nagios -Version: 4.4.6 -Release: 4%{?dist} +Version: 4.4.9 +Release: 1%{?dist} Summary: Host/service/network monitoring program @@ -43,7 +43,6 @@ Patch11: nagios-0011-remove-rpmbuild.patch Patch12: nagios-0012-fix-spool.patch Patch13: nagios-0013-fix-plugin.patch Patch14: nagios-0014-fix-uidgid.patch -Patch15: %{name}-0015-Changelog.patch BuildRequires: make BuildRequires: doxygen @@ -63,6 +62,7 @@ BuildRequires: perl(Test::HTML::Lint) %endif BuildRequires: perl(Test::More) BuildRequires: perl(Test::Simple) +BuildRequires: openssl-devel # For up-to-date config.sub and config.guess BuildRequires: libtool @@ -481,6 +481,9 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Sun Dec 25 2022 Guido Aulisi - 4.4.9-1 +- Update to 4.4.9 + * Wed Mar 03 2021 Guido Aulisi - 4.4.6-4 - Add missing require for nagios-plugins-ping - Fix run path diff --git a/sources b/sources index 8d9f3c3..c1b318a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nagioscore-nagios-4.4.6.tar.gz) = db3a205f1675693301c059b0ecdc767cdc423923cff0729c5584a48e04fb18d6c119d51991dd24290a539eb8578b2cb82316275039b36827871bb028883b495f +SHA512 (nagioscore-nagios-4.4.9.tar.gz) = bf9a18bc0fd51c037eb37cd98507df39514b0c8a956ea1d9ec6cc2d633696ed10b58395c36e23cc729ea1337c08d6b6e7a88900f249efdac2b25c9de6ad7001c From b695526c9576840f9d41ec14e382f6a5685120bc Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Fri, 5 Jan 2024 23:02:53 +0100 Subject: [PATCH 11/13] Update to 4.4.14 --- .gitignore | 1 + nagios-0011-remove-rpmbuild.patch | 2 +- nagios.spec | 7 +++++-- sources | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 90d2d7d..cec2a8b 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ nagios-3.2.1.tar.gz /nagioscore-nagios-4.4.7.tar.gz /nagioscore-nagios-4.4.8.tar.gz /nagioscore-nagios-4.4.9.tar.gz +/nagioscore-nagios-4.4.14.tar.gz diff --git a/nagios-0011-remove-rpmbuild.patch b/nagios-0011-remove-rpmbuild.patch index 401cad0..4e4bc1d 100644 --- a/nagios-0011-remove-rpmbuild.patch +++ b/nagios-0011-remove-rpmbuild.patch @@ -8,7 +8,7 @@ index 72e4d4a9..62415152 100644 $(CC) $(CFLAGS) $(LDFLAGS) $< $(CGI_O) -o $@ - -############################################################################## --# making similiar EPEL rpm for Fedora/RHEL/CentOS +-# making similar EPEL rpm for Fedora/RHEL/CentOS - -ifneq ("$(wildcard /etc/redhat-release)","") - diff --git a/nagios.spec b/nagios.spec index 1dc27f3..e56e27a 100644 --- a/nagios.spec +++ b/nagios.spec @@ -3,7 +3,7 @@ %global bootstrap 0 Name: nagios -Version: 4.4.9 +Version: 4.4.14 Release: 1%{?dist} Summary: Host/service/network monitoring program @@ -286,7 +286,7 @@ chmod -x %{buildroot}%{_unitdir}/%{name}.service %endif # Fix permissions - FIXME remove this when unneeded -chmod 755 %{buildroot}%{_sbindir}/nagios +chmod 755 %{buildroot}%{_sbindir}/nagios %{buildroot}%{_bindir}/nagiostats # Install documentation install -d -m 0755 %{buildroot}%{_datadir}/nagios/html/docs @@ -481,6 +481,9 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Fri Jan 05 2024 Guido Aulisi - 4.4.14-1 +- Update to 4.4.14 + * Sun Dec 25 2022 Guido Aulisi - 4.4.9-1 - Update to 4.4.9 diff --git a/sources b/sources index c1b318a..83ce37d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nagioscore-nagios-4.4.9.tar.gz) = bf9a18bc0fd51c037eb37cd98507df39514b0c8a956ea1d9ec6cc2d633696ed10b58395c36e23cc729ea1337c08d6b6e7a88900f249efdac2b25c9de6ad7001c +SHA512 (nagioscore-nagios-4.4.14.tar.gz) = 6dfe19887f035f3a3f6774a0f1c515902608934a75b08835fe9a5163812657547c97a20f3df42b89a34cad949eb4b587853b4131718c30703490b11fbee0d0ee From f1ff25e370127d130bddf409ea675790d47981d9 Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Thu, 16 Jan 2025 21:09:23 +0100 Subject: [PATCH 12/13] Bump to update --- nagios.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nagios.spec b/nagios.spec index e56e27a..c11db78 100644 --- a/nagios.spec +++ b/nagios.spec @@ -4,7 +4,7 @@ Name: nagios Version: 4.4.14 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Host/service/network monitoring program @@ -481,6 +481,9 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Thu Jan 16 2025 Guido Aulisi - 4.4.14-2 +- Bump to update + * Fri Jan 05 2024 Guido Aulisi - 4.4.14-1 - Update to 4.4.14 From fc5cab84e52897d9f5b9fd0157fc646bbe467055 Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Sat, 27 Apr 2024 22:46:12 +0200 Subject: [PATCH 13/13] Fix permissions (#2275532) --- nagios.spec | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/nagios.spec b/nagios.spec index c11db78..331bb66 100644 --- a/nagios.spec +++ b/nagios.spec @@ -4,7 +4,7 @@ Name: nagios Version: 4.4.14 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Host/service/network monitoring program @@ -262,16 +262,16 @@ install -d -m 0755 %{buildroot}%{_libdir}/%{name}/plugins/eventhandlers install -d -m 0755 %{buildroot}%{_libdir}/%{name}/plugins/eventhandlers/distributed-monitoring/ install -d -m 0755 %{buildroot}%{_libdir}/%{name}/plugins/eventhandlers/redundancy-scenario1/ -install -d -m 0775 %{buildroot}%{_localstatedir}/spool/%{name}/cmd -install -d -m 0775 %{buildroot}%{_localstatedir}/run/%{name} +install -d -m 0755 %{buildroot}%{_localstatedir}/spool/%{name}/cmd +install -d -m 0755 %{buildroot}%{_localstatedir}/run/%{name} # Make a run directory -install -d -m 0775 %{buildroot}%{_localstatedir}/run/%{name} +install -d -m 0755 %{buildroot}%{_localstatedir}/run/%{name} # Make logdirs -install -d -m 0775 %{buildroot}/%{_localstatedir}/log/ -install -d -m 0775 %{buildroot}/%{_localstatedir}/log/%{name}/ -install -d -m 0775 %{buildroot}/%{_localstatedir}/log/%{name}/archives +install -d -m 0755 %{buildroot}/%{_localstatedir}/log/ +install -d -m 0755 %{buildroot}/%{_localstatedir}/log/%{name}/ +install -d -m 0755 %{buildroot}/%{_localstatedir}/log/%{name}/archives # Use systemd unit on rhel7 or any supported Fedora %if 0%{?rhel} > 6 || 0%{?fedora} > 20 @@ -290,7 +290,7 @@ chmod 755 %{buildroot}%{_sbindir}/nagios %{buildroot}%{_bindir}/nagiostats # Install documentation install -d -m 0755 %{buildroot}%{_datadir}/nagios/html/docs -%{__cp} -a Documentation/html/* %{buildroot}%{_datadir}/nagios/html/docs +%{__cp} -r Documentation/html/* %{buildroot}%{_datadir}/nagios/html/docs %if 0%{?rhel} >5 # Selinux configs @@ -312,6 +312,9 @@ install -p -m 644 contrib/eventhandlers/redundancy-scenario1/handle-master-proc- %{__mv} contrib/README contrib/README.contrib +# Fix permissions #2275532 +chmod -R g-w %{buildroot}%{_datadir}/%{name} %{buildroot}%{_libdir}/%{name} %{buildroot}%{_sysconfdir} %{buildroot}%{_sbindir} + %pre common getent group nagios >/dev/null || groupadd -r nagios getent passwd nagios >/dev/null || useradd -r -g nagios -d %{_localstatedir}/spool/%{name} -s /sbin/nologin nagios @@ -451,11 +454,11 @@ fi %attr(0640,root,nagios) %config(noreplace) %{_sysconfdir}/%{name}/private/resource.cfg %attr(0640,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/passwd %attr(0640,root,apache) %config(noreplace) %{_datadir}/%{name}/html/config.inc.php -%attr(2775,nagios,nagios) %dir %{_localstatedir}/spool/%{name}/cmd +%attr(2755,nagios,nagios) %dir %{_localstatedir}/spool/%{name}/cmd %attr(0750,nagios,nagios) %dir %{_localstatedir}/run/%{name} %attr(0750,nagios,nagios) %dir %{_localstatedir}/log/%{name} %attr(0750,nagios,nagios) %dir %{_localstatedir}/log/%{name}/archives -%attr(0770,nagios,nagios) %dir %{_localstatedir}/spool/%{name}/checkresults +%attr(0750,nagios,nagios) %dir %{_localstatedir}/spool/%{name}/checkresults %files common %dir %{_sysconfdir}/%{name} @@ -481,6 +484,9 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Thu Jan 16 2025 Guido Aulisi - 4.4.14-3 +- Fix permissions (#2275532) + * Thu Jan 16 2025 Guido Aulisi - 4.4.14-2 - Bump to update