From d9a6cdfd4d1840c4281ad272b27759594c1b1f26 Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Tue, 4 Jan 2022 12:58:30 +0100 Subject: [PATCH 01/11] Bootstrap package because plugins are not yet buildable on epel9 --- nagios.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nagios.spec b/nagios.spec index c9eb084..fd294c0 100644 --- a/nagios.spec +++ b/nagios.spec @@ -1,5 +1,5 @@ # Set %%bcond_without bootstrap to build without depending on plugins for localhost monitoring -%bcond_with bootstrap +%bcond_without bootstrap %global with_selinux 1 %global selinuxtype targeted From e69074f49949e5ff7b93e10a1f9f5a764bc305e1 Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Sun, 25 Sep 2022 12:28:07 +0200 Subject: [PATCH 02/11] Update to 4.4.7 --- .gitignore | 1 + nagios.spec | 14 ++++++-------- sources | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 3ac2d64..c6c707e 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ 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 diff --git a/nagios.spec b/nagios.spec index fd294c0..2ea0d8e 100644 --- a/nagios.spec +++ b/nagios.spec @@ -5,8 +5,8 @@ %global selinuxtype targeted Name: nagios -Version: 4.4.6 -Release: 7%{?dist} +Version: 4.4.7 +Release: 1%{?dist} Summary: Host/service/network monitoring program @@ -45,7 +45,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 @@ -65,6 +64,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 @@ -72,11 +72,6 @@ BuildRequires: libtool # For selinux tools BuildRequires: checkpolicy, selinux-policy-devel -%if 0%{?rhel} > 6 || 0%{?fedora} > 20 -# For necessary macros -BuildRequires: systemd -%endif - Requires: httpd Requires: php Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) @@ -471,6 +466,9 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Sun Sep 25 2022 Guido Aulisi - 4.4.7-1 +- Update to 4.4.7 + * Tue Jan 04 2022 Guido Aulisi - 4.4.6-7 - Require a generic mail program (#2036844) diff --git a/sources b/sources index 8d9f3c3..c3f4aa6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nagioscore-nagios-4.4.6.tar.gz) = db3a205f1675693301c059b0ecdc767cdc423923cff0729c5584a48e04fb18d6c119d51991dd24290a539eb8578b2cb82316275039b36827871bb028883b495f +SHA512 (nagioscore-nagios-4.4.7.tar.gz) = cc4efef0db591406953ecef6c42356494df152d97deb4f430fb866313b48e4bf8d83c4587a67bfc9c90f9b6292c8aee28e3c1c39255128f5f0872df0c0869b02 From 6825d5488b759ba9f22c64475b6d77b4ec1b13b0 Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Sun, 23 Oct 2022 11:53:21 +0200 Subject: [PATCH 03/11] Update to 4.4.8 --- .gitignore | 1 + nagios.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c6c707e..d35a1cb 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ nagios-3.2.1.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 diff --git a/nagios.spec b/nagios.spec index 2ea0d8e..da50343 100644 --- a/nagios.spec +++ b/nagios.spec @@ -5,7 +5,7 @@ %global selinuxtype targeted Name: nagios -Version: 4.4.7 +Version: 4.4.8 Release: 1%{?dist} Summary: Host/service/network monitoring program @@ -466,6 +466,9 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Sun Oct 23 2022 Guido Aulisi - 4.4.8-1 +- Update to 4.4.8 + * Sun Sep 25 2022 Guido Aulisi - 4.4.7-1 - Update to 4.4.7 diff --git a/sources b/sources index c3f4aa6..2e00318 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nagioscore-nagios-4.4.7.tar.gz) = cc4efef0db591406953ecef6c42356494df152d97deb4f430fb866313b48e4bf8d83c4587a67bfc9c90f9b6292c8aee28e3c1c39255128f5f0872df0c0869b02 +SHA512 (nagioscore-nagios-4.4.8.tar.gz) = a0616b5e9faa041f6c414f41bffee29b37dcc90d6777d8c8bbe0ceefd50a858d6c1eee4c33cd88c872c2ff7ecfeb64ce072a87bb9482a5eca7edb4fbdbf5c262 From dbfc385c1fc977bd38c12dbbbe22e42dbfb18dd6 Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Sun, 23 Oct 2022 21:05:25 +0200 Subject: [PATCH 04/11] Disable package bootstrapping --- nagios.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nagios.spec b/nagios.spec index da50343..12892f8 100644 --- a/nagios.spec +++ b/nagios.spec @@ -1,5 +1,5 @@ # Set %%bcond_without bootstrap to build without depending on plugins for localhost monitoring -%bcond_without bootstrap +%bcond_with bootstrap %global with_selinux 1 %global selinuxtype targeted From 39bc78cf645d65ba01a8fbab82d68bb7ae5debcf Mon Sep 17 00:00:00 2001 From: Nikola Knazekova Date: Mon, 26 Sep 2022 18:14:25 +0200 Subject: [PATCH 05/11] selinux: Update based on latest packaging guide https://fedoraproject.org/wiki/SELinux/IndependentPolicy Start shipping nagios interface file Exclude installed policy module file from RPM verification Signed-off-by: Nikola Knazekova --- nagios.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nagios.spec b/nagios.spec index 12892f8..71c05a8 100644 --- a/nagios.spec +++ b/nagios.spec @@ -305,6 +305,8 @@ install -d -m 0755 %{buildroot}%{_datadir}/nagios/html/docs %if 0%{?with_selinux} install -pm 0644 %{SOURCE13} README.SELinux.rst install -D -m 0644 %{name}.pp.bz2 %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2 +install -D -p -m 0644 selinux/%{name}.if %{buildroot}%{_datadir}/selinux/devel/include/distributed/%{name}.if + %endif ### CONTRIB ITEMS TAKEN FROM UPSTREAM NAGIOS SPEC @@ -456,7 +458,8 @@ fi %files selinux %doc README.SELinux.rst %{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.* -%ghost %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name} +%{_datadir}/selinux/devel/include/distributed/%{name}.if +%ghost %verify(not md5 size mode mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name} %endif From 7ab35d353526f6d9bb5897224ab7f2f10e01695d Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Thu, 17 Nov 2022 12:10:04 +0100 Subject: [PATCH 06/11] Update to 4.4.9 --- .gitignore | 1 + nagios.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d35a1cb..90d2d7d 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ nagios-3.2.1.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.spec b/nagios.spec index 71c05a8..ceea2d4 100644 --- a/nagios.spec +++ b/nagios.spec @@ -5,7 +5,7 @@ %global selinuxtype targeted Name: nagios -Version: 4.4.8 +Version: 4.4.9 Release: 1%{?dist} Summary: Host/service/network monitoring program @@ -469,6 +469,9 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Thu Nov 17 2022 Guido Aulisi - 4.4.9-1 +- Update to 4.4.9 + * Sun Oct 23 2022 Guido Aulisi - 4.4.8-1 - Update to 4.4.8 diff --git a/sources b/sources index 2e00318..c1b318a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nagioscore-nagios-4.4.8.tar.gz) = a0616b5e9faa041f6c414f41bffee29b37dcc90d6777d8c8bbe0ceefd50a858d6c1eee4c33cd88c872c2ff7ecfeb64ce072a87bb9482a5eca7edb4fbdbf5c262 +SHA512 (nagioscore-nagios-4.4.9.tar.gz) = bf9a18bc0fd51c037eb37cd98507df39514b0c8a956ea1d9ec6cc2d633696ed10b58395c36e23cc729ea1337c08d6b6e7a88900f249efdac2b25c9de6ad7001c From 1078689c00a35c9dc157dd8c07be21d257917dcc Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 10 Dec 2022 09:34:26 +0100 Subject: [PATCH 07/11] Port configure script to C99 Related to: --- nagios-configure-c99.patch | 52 ++++++++++++++++++++++++++++++++++++++ nagios.spec | 6 ++++- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 nagios-configure-c99.patch diff --git a/nagios-configure-c99.patch b/nagios-configure-c99.patch new file mode 100644 index 0000000..4360eac --- /dev/null +++ b/nagios-configure-c99.patch @@ -0,0 +1,52 @@ +Avoid implicit function declarations and implicit ints. These will +cause the check to fail with future compilers even if the environment +supports a proper C99 vsnprintf. + +Submitted upstream: + +diff --git a/configure b/configure +index dddc31e96dc9f2e4..48d397ead46f0559 100755 +--- a/configure ++++ b/configure +@@ -5920,6 +5920,9 @@ else + + #include + #include ++#include ++#include ++#include + void foo(const char *format, ...) { + va_list ap; + int len; +@@ -5939,7 +5942,7 @@ void foo(const char *format, ...) { + + exit(0); + } +-main() { foo("hello"); } ++int main() { foo("hello"); } + + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : +diff --git a/configure.ac b/configure.ac +index d2e69ce86408c7f1..d9814d8a75cf06b1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -125,6 +125,9 @@ AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[ + AC_TRY_RUN([ + #include + #include ++#include ++#include ++#include + void foo(const char *format, ...) { + va_list ap; + int len; +@@ -144,7 +147,7 @@ void foo(const char *format, ...) { + + exit(0); + } +-main() { foo("hello"); } ++int main() { foo("hello"); } + ], + ac_cv_HAVE_C99_VSNPRINTF=yes,ac_cv_HAVE_C99_VSNPRINTF=no,ac_cv_HAVE_C99_VSNPRINTF=cross)]) + if test "x$ac_cv_HAVE_C99_VSNPRINTF" = "xyes"; then diff --git a/nagios.spec b/nagios.spec index ceea2d4..1be074b 100644 --- a/nagios.spec +++ b/nagios.spec @@ -6,7 +6,7 @@ Name: nagios Version: 4.4.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Host/service/network monitoring program @@ -45,6 +45,7 @@ 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: nagios-configure-c99.patch BuildRequires: make BuildRequires: doxygen @@ -469,6 +470,9 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Sat Dec 10 2022 Florian Weimer - 4.4.9-2 +- Port configure script to C99 + * Thu Nov 17 2022 Guido Aulisi - 4.4.9-1 - Update to 4.4.9 From 84c9d90ca66a62c5c54d2a2a567328b4adcafe13 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Fri, 13 Jan 2023 09:49:58 +0100 Subject: [PATCH 08/11] Remove perl(MODULE_COMPAT), it will be replaced by generators --- nagios.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/nagios.spec b/nagios.spec index 1be074b..4567a47 100644 --- a/nagios.spec +++ b/nagios.spec @@ -75,7 +75,6 @@ BuildRequires: checkpolicy, selinux-policy-devel Requires: httpd Requires: php -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: %{_bindir}/mail Requires: nagios-common Requires: user(nagios) From 72c8b751136f8c5cdae8e7b4d9132c5e78fa50c3 Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Mon, 13 Feb 2023 16:10:54 +0100 Subject: [PATCH 09/11] Update to 4.4.10 Fix nagiostats permissions #2169033 --- .gitignore | 1 + nagios-configure-c99.patch | 52 -------------------------------------- nagios.spec | 11 +++++--- sources | 2 +- 4 files changed, 9 insertions(+), 57 deletions(-) delete mode 100644 nagios-configure-c99.patch diff --git a/.gitignore b/.gitignore index 90d2d7d..555ba84 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.10.tar.gz diff --git a/nagios-configure-c99.patch b/nagios-configure-c99.patch deleted file mode 100644 index 4360eac..0000000 --- a/nagios-configure-c99.patch +++ /dev/null @@ -1,52 +0,0 @@ -Avoid implicit function declarations and implicit ints. These will -cause the check to fail with future compilers even if the environment -supports a proper C99 vsnprintf. - -Submitted upstream: - -diff --git a/configure b/configure -index dddc31e96dc9f2e4..48d397ead46f0559 100755 ---- a/configure -+++ b/configure -@@ -5920,6 +5920,9 @@ else - - #include - #include -+#include -+#include -+#include - void foo(const char *format, ...) { - va_list ap; - int len; -@@ -5939,7 +5942,7 @@ void foo(const char *format, ...) { - - exit(0); - } --main() { foo("hello"); } -+int main() { foo("hello"); } - - _ACEOF - if ac_fn_c_try_run "$LINENO"; then : -diff --git a/configure.ac b/configure.ac -index d2e69ce86408c7f1..d9814d8a75cf06b1 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -125,6 +125,9 @@ AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[ - AC_TRY_RUN([ - #include - #include -+#include -+#include -+#include - void foo(const char *format, ...) { - va_list ap; - int len; -@@ -144,7 +147,7 @@ void foo(const char *format, ...) { - - exit(0); - } --main() { foo("hello"); } -+int main() { foo("hello"); } - ], - ac_cv_HAVE_C99_VSNPRINTF=yes,ac_cv_HAVE_C99_VSNPRINTF=no,ac_cv_HAVE_C99_VSNPRINTF=cross)]) - if test "x$ac_cv_HAVE_C99_VSNPRINTF" = "xyes"; then diff --git a/nagios.spec b/nagios.spec index 4567a47..884c8d4 100644 --- a/nagios.spec +++ b/nagios.spec @@ -5,8 +5,8 @@ %global selinuxtype targeted Name: nagios -Version: 4.4.9 -Release: 2%{?dist} +Version: 4.4.10 +Release: 1%{?dist} Summary: Host/service/network monitoring program @@ -45,7 +45,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: nagios-configure-c99.patch BuildRequires: make BuildRequires: doxygen @@ -296,7 +295,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 @@ -469,6 +468,10 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Mon Feb 13 2023 Guido Aulisi - 4.4.10-1 +- Update to 4.4.10 +- Fix nagiostats permissions #2169033 + * Sat Dec 10 2022 Florian Weimer - 4.4.9-2 - Port configure script to C99 diff --git a/sources b/sources index c1b318a..020a1f2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nagioscore-nagios-4.4.9.tar.gz) = bf9a18bc0fd51c037eb37cd98507df39514b0c8a956ea1d9ec6cc2d633696ed10b58395c36e23cc729ea1337c08d6b6e7a88900f249efdac2b25c9de6ad7001c +SHA512 (nagioscore-nagios-4.4.10.tar.gz) = 64fa2ab4500bf853ba53f44e6eb0b4569d826e264c12a1614bf8efae2d7f1c82587bb0f72510c90b7a53097b14530df1c5c05b79fc390bc9648fa2414b748a4e From 5eed83bafcc4aecdfa57db93181f04da40ec3350 Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Wed, 16 Aug 2023 13:16:04 +0200 Subject: [PATCH 10/11] Update to 4.4.14 --- .gitignore | 1 + nagios-0011-remove-rpmbuild.patch | 2 +- nagios.spec | 8 +++++++- sources | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 555ba84..d9f3385 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ nagios-3.2.1.tar.gz /nagioscore-nagios-4.4.8.tar.gz /nagioscore-nagios-4.4.9.tar.gz /nagioscore-nagios-4.4.10.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 884c8d4..daef5d3 100644 --- a/nagios.spec +++ b/nagios.spec @@ -5,7 +5,7 @@ %global selinuxtype targeted Name: nagios -Version: 4.4.10 +Version: 4.4.14 Release: 1%{?dist} Summary: Host/service/network monitoring program @@ -468,6 +468,12 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Wed Aug 16 2023 Guido Aulisi - 4.4.14-1 +- Update to 4.4.14 + +* Thu Jul 20 2023 Fedora Release Engineering - 4.4.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Mon Feb 13 2023 Guido Aulisi - 4.4.10-1 - Update to 4.4.10 - Fix nagiostats permissions #2169033 diff --git a/sources b/sources index 020a1f2..83ce37d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nagioscore-nagios-4.4.10.tar.gz) = 64fa2ab4500bf853ba53f44e6eb0b4569d826e264c12a1614bf8efae2d7f1c82587bb0f72510c90b7a53097b14530df1c5c05b79fc390bc9648fa2414b748a4e +SHA512 (nagioscore-nagios-4.4.14.tar.gz) = 6dfe19887f035f3a3f6774a0f1c515902608934a75b08835fe9a5163812657547c97a20f3df42b89a34cad949eb4b587853b4131718c30703490b11fbee0d0ee From d76577aee1104e917dc73640014320bf7d76293e Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Sat, 27 Apr 2024 22:46:12 +0200 Subject: [PATCH 11/11] Fix permissions (#2275532) --- nagios.spec | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/nagios.spec b/nagios.spec index daef5d3..73928d8 100644 --- a/nagios.spec +++ b/nagios.spec @@ -6,7 +6,7 @@ Name: nagios Version: 4.4.14 -Release: 1%{?dist} +Release: 4%{?dist} Summary: Host/service/network monitoring program @@ -271,16 +271,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 @@ -299,7 +299,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%{?with_selinux} install -pm 0644 %{SOURCE13} README.SELinux.rst @@ -323,6 +323,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 @@ -435,11 +438,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} @@ -468,6 +471,9 @@ fi %{_libdir}/%{name}/cgi/ %changelog +* Sat Apr 27 2024 Guido Aulisi - 4.4.14-4 +- Fix permissions (#2275532) + * Wed Aug 16 2023 Guido Aulisi - 4.4.14-1 - Update to 4.4.14