Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee71a041fe | ||
|
|
54595666ab | ||
|
|
c493a2f8c6 | ||
|
|
70259f7472 | ||
|
|
f306eadd8d | ||
|
|
02cbb431f6 |
8 changed files with 95 additions and 55 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
13
nagios-0015-Changelog.patch
Normal file
13
nagios-0015-Changelog.patch
Normal file
|
|
@ -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)
|
||||
|
||||
86
nagios.spec
86
nagios.spec
|
|
@ -1,14 +1,12 @@
|
|||
%global _hardened_build 1
|
||||
# Set bootstrap = 1 to build without depending on plugins for localhost monitoring
|
||||
%global bootstrap 0
|
||||
|
||||
%global with_selinux 1
|
||||
%global selinuxtype targeted
|
||||
|
||||
# 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: 9%{?dist}
|
||||
Version: 4.4.6
|
||||
Release: 4%{?dist}
|
||||
|
||||
Summary: Host/service/network monitoring program
|
||||
|
||||
|
|
@ -31,9 +29,6 @@ Source14: nagios.te
|
|||
Source15: nagios.fc
|
||||
Source16: nagios.if
|
||||
|
||||
# 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
|
||||
|
|
@ -41,8 +36,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.
|
||||
|
|
@ -52,8 +45,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: make
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gd-devel > 1.8
|
||||
|
|
@ -91,6 +85,18 @@ Requires: nagios-common
|
|||
Requires: user(nagios)
|
||||
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
|
||||
Requires: nagios-plugins-disk
|
||||
Requires: nagios-plugins-ssh
|
||||
Requires: nagios-plugins-swap
|
||||
Requires: nagios-plugins-procs
|
||||
%endif
|
||||
|
||||
%if 0%{?with_selinux}
|
||||
# This ensures that the *-selinux package and all it’s dependencies are not pulled
|
||||
# into containers and other systems that do not use SELinux
|
||||
|
|
@ -181,23 +187,7 @@ Various contributed items used by plugins and other tools.
|
|||
%endif
|
||||
|
||||
%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/
|
||||
|
||||
|
|
@ -236,13 +226,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
|
||||
|
|
@ -259,15 +250,13 @@ cp -p %{SOURCE14} selinux/
|
|||
cp -p %{SOURCE15} selinux/
|
||||
cp -p %{SOURCE16} selinux/
|
||||
|
||||
make -f %{_datadir}/selinux/devel/Makefile %{name}.pp
|
||||
%make_build -f %{_datadir}/selinux/devel/Makefile %{name}.pp
|
||||
bzip2 -9 %{name}.pp
|
||||
%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}
|
||||
|
|
@ -307,6 +296,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
|
||||
|
|
@ -322,7 +314,7 @@ install -D -m 0644 %{name}.pp.bz2 %{buildroot}%{_datadir}/selinux/packages/%{sel
|
|||
%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/
|
||||
|
|
@ -422,8 +414,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/
|
||||
|
|
@ -479,6 +472,21 @@ fi
|
|||
%{_libdir}/%{name}/cgi/
|
||||
|
||||
%changelog
|
||||
* Wed Mar 03 2021 Guido Aulisi <guido.aulisi@gmail.com> - 4.4.6-4
|
||||
- Add missing require for nagios-plugins-ping
|
||||
- Fix run path
|
||||
|
||||
* Sat Feb 27 2021 Guido Aulisi <guido.aulisi@gmail.com> - 4.4.6-3
|
||||
- Require plugins needed for localhost monitoring (#1932297)
|
||||
|
||||
* Tue Feb 23 2021 Guido Aulisi <guido.aulisi@gmail.com> - 4.4.6-2
|
||||
- Fix systemd unit file permissions #1676334
|
||||
|
||||
* Sat Feb 20 2021 Guido Aulisi <guido.aulisi@gmail.com> - 4.4.6-1
|
||||
- Update to 4.4.6
|
||||
- Fix for CVE-2020-13977 #BZ1849087
|
||||
- Some spec cleanup
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.5-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
D /var/run/nagios 0755 nagios nagios -
|
||||
D /run/nagios 0755 nagios nagios -
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (nagioscore-nagios-4.4.5.tar.gz) = b2b4213dc9087c49a96506f514ec672476763e1ca928bf5de8494a0509b612a4a357989e719820328095489138375c9db292ac3c8129925c323220860e17bc49
|
||||
SHA512 (nagioscore-nagios-4.4.6.tar.gz) = db3a205f1675693301c059b0ecdc767cdc423923cff0729c5584a48e04fb18d6c119d51991dd24290a539eb8578b2cb82316275039b36827871bb028883b495f
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue