[check-mk/el6] Merge the relevant changes to EL6.
averi
averi at fedoraproject.org
Thu Aug 29 16:39:08 UTC 2013
commit b29beea2822ae8714dcd1a8334d589a2410b7ce0
Author: Andrea Veri <av at gnome.org>
Date: Thu Aug 29 18:38:23 2013 +0200
Merge the relevant changes to EL6.
check-mk.spec | 35 +++++++++++++++++++++++--
defaults.py | 50 +++++++++++++++++++++++++++++++++++++
fix-agents-conf-directories.patch | 13 +++++++++
3 files changed, 95 insertions(+), 3 deletions(-)
---
diff --git a/check-mk.spec b/check-mk.spec
index 3b1b78d..936e613 100644
--- a/check-mk.spec
+++ b/check-mk.spec
@@ -2,16 +2,21 @@
Name: check-mk
Version: 1.2.2
-Release: 3%{?dist}
+Release: 5%{?dist}
Summary: A new general purpose Nagios-plugin for retrieving data
Group: Applications/Internet
License: GPLv2 and GPLv3
URL: http://mathias-kettner.de/check_mk
Source: http://mathias-kettner.de/download/check_mk-%{version}.tar.gz
Requires: nagios
+%if 0%{?rhel}
+Requires: mod_python
+%endif
Source1: First-Installation.txt
Source2: defaults
+Source3: defaults.py
AutoReq: 0
+Patch0: fix-agents-conf-directories.patch
%description
check-mk is a general purpose Nagios-plugin for retrieving data. It adopts a
@@ -34,6 +39,9 @@ Summary: The check-mk's documentation
Group: Applications/Internet
BuildArch: noarch
AutoReq: 0
+%if 0%{?rhel}
+AutoProv: 0
+%endif
%description docs
This package contains the check-mk's documentation files.
@@ -59,8 +67,11 @@ This package contains multisite.
%prep
%setup -q -n check_mk-%{version}
tar xf agents.tar.gz
+%patch0 -p0
%build
+rm -f waitmax
+make waitmax
%install
@@ -72,6 +83,9 @@ install -m 644 xinetd.conf %{buildroot}%{_sysconfdir}/xinetd.d/check-mk-agent
install -d -m 755 %{buildroot}%{_bindir}
install -m 755 check_mk_agent.linux %{buildroot}%{_bindir}/check_mk_agent
+# Waitmax's binary
+install -m 755 waitmax %{buildroot}%{_bindir}/waitmax
+
install -d -m 755 %{buildroot}%{_datadir}/check-mk-agent
install -d -m 755 %{buildroot}%{_datadir}/check-mk-agent/plugins
install -d -m 755 %{buildroot}%{_datadir}/check-mk-agent/local
@@ -143,6 +157,10 @@ sed -i 's|/usr/lib/nagios/plugins|%{_libdir}/nagios/plugins|' \
rm -rf %{buildroot}%{_datadir}/check_mk/modules/defaults
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/check_mk/modules/
+# Do the same for defaults.py
+rm -rf %{buildroot}%{_datadir}/check_mk/web/htdocs/defaults.py
+install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/check_mk/web/htdocs/
+
# Remove other operating systems agents, we definitely don't need them on this package.
rm -rf %{buildroot}%{_datadir}/check_mk/agents/check_mk_agent.aix
rm -rf %{buildroot}%{_datadir}/check_mk/agents/check_mk_agent.freebsd
@@ -157,10 +175,10 @@ rm -rf %{buildroot}%{_datadir}/check_mk/agents/check_mk_agent.solaris
rm -rf %{buildroot}%{_docdir}/check_mk/windows/
rm -rf %{buildroot}%{_datadir}/check_mk/agents/windows/
-# Remove waitmax and its leftarounds, looks like it's a statically linked binary.
+# Remove waitmax and its leftarounds from the wrong directory, the binary is being
+# built and installed into the check-mk-agent's package already.
rm %{buildroot}%{_datadir}/check_mk/agents/waitmax
rm %{buildroot}%{_datadir}/check_mk/agents/waitmax.c
-rm %{buildroot}%{_datadir}/check_mk/agents/Makefile
# Remove the packages directory.
rm -rf %{buildroot}%{_localstatedir}/lib/check_mk/packages/
@@ -195,6 +213,7 @@ rmdir %{buildroot}%{_prefix}/lib/check_mk
%files agent
%{_bindir}/check_mk_agent
+%{_bindir}/waitmax
%{_datadir}/check-mk-agent
%config(noreplace) %{_sysconfdir}/xinetd.d/check-mk-agent
%config(noreplace) %{_sysconfdir}/check-mk-agent
@@ -225,6 +244,16 @@ rmdir %{buildroot}%{_prefix}/lib/check_mk
%endif
%changelog
+* Thu Aug 29 2013 Andrea Veri <averi at fedoraproject.org> - 1.2.2-5
+- Make sure the waitmax binary gets built. Also thanks to John Reddy
+ for his initial work on this. (BZ: #982769)
+- Add an if statement for RHEL and make sure auto provides are not set
+ automatically. (BZ #985285)
+- Requires set to mod_python on RHEL, no mod_wsgi migration yet on EPEL. (BZ: #987852)
+- Add a fix-agents-conf-directories.patch that actually fixes the configuration
+ files path of '/usr/bin/check_mk_agent'. Thanks 'Brainslug' for the patch. (BZ: #989793)
+- In addition to a customized 'defaults' file, add a defaults.py accordingly. (BZ: #987859)
+
* Sun Apr 28 2013 Andrea Veri <averi at fedoraproject.org> 1.2.2-4%{?dist}
- Make sure the Nagios library path on the check_mk_templates.cfg file
is correct on both x86_64 and i686 systems.
diff --git a/defaults.py b/defaults.py
new file mode 100644
index 0000000..796fb72
--- /dev/null
+++ b/defaults.py
@@ -0,0 +1,50 @@
+# This file has been created during setup of check_mk at Tue Apr 9 17:15:45 CEST 2013.
+# Do not edit this file. Also do not try to override these settings
+# in main.mk since some of them are hardcoded into several files
+# during setup.
+#
+# If you need to change these settings, you have to re-run setup.sh
+# and enter new values when asked, or edit ~/.check_mk_setup.conf and
+# run ./setup.sh --yes.
+
+check_mk_version = '1.2.2'
+default_config_dir = '/etc/check_mk'
+check_mk_configdir = '/etc/check_mk/conf.d'
+share_dir = '/usr/share/check_mk'
+checks_dir = '/usr/share/check_mk/checks'
+notifications_dir = '/usr/share/check_mk/notifications'
+check_manpages_dir = '/usr/share/doc/check_mk/checks'
+modules_dir = '/usr/share/check_mk/modules'
+locale_dir = '/usr/share/check_mk/locale'
+agents_dir = '/usr/share/check_mk/agents'
+var_dir = '/var/lib/check_mk'
+lib_dir = '/usr/lib/check_mk'
+snmpwalks_dir = '/var/lib/check_mk/snmpwalks'
+autochecksdir = '/var/lib/check_mk/autochecks'
+precompiled_hostchecks_dir = '/var/lib/check_mk/precompiled'
+counters_directory = '/var/lib/check_mk/counters'
+tcp_cache_dir = '/var/lib/check_mk/cache'
+tmp_dir = '/var/lib/check_mk/tmp'
+logwatch_dir = '/var/lib/check_mk/logwatch'
+nagios_objects_file = '/etc/nagios/conf.d/check_mk_objects.cfg'
+nagios_command_pipe_path = '/var/log/nagios/rw/nagios.cmd'
+check_result_path = '/var/log/nagios/spool/checkresults'
+nagios_status_file = '/var/log/nagios/status.dat'
+nagios_conf_dir = '/etc/nagios/objects'
+nagios_user = 'nagios'
+logwatch_notes_url = '/check_mk/logwatch.py?host=%s&file=%s'
+www_group = 'nagios'
+nagios_config_file = '/etc/nagios/nagios.cfg'
+nagios_startscript = '/etc/init.d/nagios'
+nagios_binary = '/usr/sbin/nagios'
+apache_config_dir = '/etc/httpd/conf.d'
+htpasswd_file = '/etc/nagios/htpasswd.users'
+nagios_auth_name = 'Nagios Access'
+web_dir = '/usr/share/check_mk/web'
+livestatus_unix_socket = '/var/log/nagios/rw/live'
+livebackendsdir = '/usr/share/check_mk/livestatus'
+url_prefix = '/'
+pnp_url = '/pnp4nagios/'
+pnp_templates_dir = '/usr/share/check_mk/pnp-templates'
+doc_dir = '/usr/share/doc/check_mk'
+check_mk_automation = 'sudo -u mockbuild /usr/bin/check_mk --automation'
diff --git a/fix-agents-conf-directories.patch b/fix-agents-conf-directories.patch
new file mode 100644
index 0000000..c9d9350
--- /dev/null
+++ b/fix-agents-conf-directories.patch
@@ -0,0 +1,13 @@
+--- check_mk_agent.linux 2013-04-27 14:30:45.000000000 +0000
++++ /tmp/check_mk_agent 2013-07-30 00:14:53.512028116 +0000
+@@ -27,8 +27,8 @@
+ export LC_ALL=C
+ unset LANG
+
+-export MK_LIBDIR="/usr/lib/check_mk_agent"
+-export MK_CONFDIR="/etc/check_mk"
++export MK_LIBDIR="/usr/share/check-mk-agent"
++export MK_CONFDIR="/etc/check-mk-agent"
+
+ # Make sure, locally installed binaries are found
+ PATH=$PATH:/usr/local/bin
More information about the scm-commits
mailing list