averi pushed to check-mk (el5). "Cherry-pick the new upstream release (1.2.6) changes from b205940"
notifications at fedoraproject.org
notifications at fedoraproject.org
Fri Apr 10 10:57:17 UTC 2015
>From e9f8e0c5ef7f177a93f550640d97adbda0f331a7 Mon Sep 17 00:00:00 2001
From: Andrea Veri <av at gnome.org>
Date: Fri, 10 Apr 2015 12:56:57 +0200
Subject: Cherry-pick the new upstream release (1.2.6) changes from b205940
diff --git a/check-mk.spec b/check-mk.spec
index 197e97b..8f3f6d8 100644
--- a/check-mk.spec
+++ b/check-mk.spec
@@ -1,23 +1,33 @@
-%define _requires_exceptions pear(default.php)
-
-Name: check-mk
-Version: 1.2.4p5
-Release: 1%{?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
+%global commit c7b28726f7dc36382084a8b9c97c72381a8ff15f
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
+Name: check-mk
+Version: 1.2.6
+Release: 1%{?dist}
+Summary: A new general purpose Nagios-plugin for retrieving data
+Group: Applications/Internet
+License: GPLv2 and GPLv3
+URL: https://mathias-kettner.de/check_mk
+# Produce with 'wget http://git.mathias-kettner.de/git/?p=check_mk.git;a=snapshot;h=%%{commit};sf=tgz -O check_mk-%%{version}.tar.gz}',
+# then "tar xvf check_mk-%%{version}.tar.gz && cd check_mk-%%{short_commit} && sed -i '112d;113d;116d' Makefile". Once
+# done, running 'make dist' on the top level directory will properly generate a tarball. More details about why
+# this was made necessary on the 1.2.6-1 release changelog entry.
+Source: check_mk-%{version}.tar.gz
+Requires: nagios
%if 0%{?rhel}
-Requires: mod_python
+Requires: mod_python
%endif
-Source1: First-Installation.txt
-Source2: defaults
-Source3: defaults.py
-Patch0: 01-Set-Legacy-Eval-True.patch
-AutoReq: 0
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+Source1: First-Installation.txt
+Source2: defaults
+Source3: defaults.py
+Patch0: 01-Set-Legacy-Eval-True.patch
+AutoReq: 0
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
+# Get the revision number and remove the dist from it, we will use
+# this variable later on on the spec to remove the RPM and DEB files
+# included on the generated tarball.
+%global nodistrelease %(r=%{release}; echo ${r:0:1})
%description
check-mk is a general purpose Nagios-plugin for retrieving data. It adopts a
@@ -27,30 +37,30 @@ benefits, the most important are a significant reduction of CPU usage on
the Nagios host and an automatic inventory of items to be checked on hosts.
%package agent
-Summary: The check-mk's Agent
-Requires: xinetd
-Group: Applications/Internet
+Summary: The check-mk's Agent
+Requires: xinetd
+Group: Applications/Internet
%description agent
This package contains the check-mk's agent. Install the following
agent on all the machines you plan to monitor with check-mk.
%package docs
-Summary: The check-mk's documentation
-Group: Applications/Internet
-AutoReq: 0
+Summary: The check-mk's documentation
+Group: Applications/Internet
+AutoReq: 0
%if 0%{?rhel}
-AutoProv: 0
+AutoProv: 0
%endif
%description docs
This package contains the check-mk's documentation files.
%package livestatus
-Summary: The check-mk's Livestatus
-Group: Applications/Internet
-Requires: check-mk
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Summary: The check-mk's Livestatus
+Group: Applications/Internet
+Requires: check-mk
+Requires: %{name}%{?_isa} = %{version}-%{release}
%description livestatus
This package contains livestatus, the check-mk's plugin for
@@ -58,9 +68,9 @@ accessing the relevant Nagios files being responsible of
listing the hosts and services status.
%package multisite
-Summary: The check-mk's Multisite
-Group: Applications/Internet
-Requires: %{name} = %{version}-%{release}
+Summary: The check-mk's Multisite
+Group: Applications/Internet
+Requires: %{name} = %{version}-%{release}
%description multisite
This package contains the check-mk's web interface aka WATO.
@@ -78,8 +88,6 @@ make waitmax
%install
-# Agent's installation
-
install -d -m 755 %{buildroot}%{_sysconfdir}/xinetd.d
install -m 644 xinetd.conf %{buildroot}%{_sysconfdir}/xinetd.d/check-mk-agent
@@ -97,12 +105,12 @@ install -d -m 755 %{buildroot}%{_datadir}/check-mk-agent/plugins
install -d -m 755 %{buildroot}%{_datadir}/check-mk-agent/local
install -m 644 plugins/mk_logwatch %{buildroot}%{_datadir}/check-mk-agent/plugins
# The j4p_performance plugin has been deprecated.
-# install -m 644 plugins/j4p_performance %{buildroot}%{_datadir}/check-mk-agent/plugins
+#install -m 644 plugins/j4p_performance %{buildroot}%{_datadir}/check-mk-agent/plugins
install -m 644 plugins/mk_oracle %{buildroot}%{_datadir}/check-mk-agent/plugins
-install -m 644 plugins/sylo %{buildroot}%{_datadir}/check-mk-agent/plugins
+# Create an /etc/check-mk-agent directory for agent's configuration files. Examples
+# will be then available under the /usr/share/check_mk/agents/cfg_examples directory.
install -d -m 755 %{buildroot}%{_sysconfdir}/check-mk-agent
-install -m 644 logwatch.cfg %{buildroot}%{_sysconfdir}/check-mk-agent
perl -pi \
-e 's|MK_LIBDIR="/usr/lib/check_mk_agent"|MK_LIBDIR="%{_datadir}/check-mk-agent"|;' \
@@ -123,28 +131,24 @@ rm -rf %{buildroot}%{_sysconfdir}/apache2/
# Install the First-Installation.txt file
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/check_mk
-# Make sure all the scripts into /usr/share/check_mk/* and /usr/share/check-mk-agent/* are executable.
+# Make sure all the scripts into /usr/share/check_mk/{modules, inventory}
+# and /usr/share/check-mk-agent/* are executable.
for file in %{buildroot}%{_datadir}/check_mk/checks/* ; do
chmod -R a+x $file
done
-for file in %{buildroot}%{_datadir}/check-mk-agent/plugins/* ; do
- chmod a+x $file
+for file in %{buildroot}%{_datadir}/check_mk/modules/* ; do
+ chmod -R a+x $file
done
-# Fix a few more permissions
-chmod a+x %{buildroot}%{_datadir}/check_mk/agents/hpux/hpux_statgrab
-chmod a+x %{buildroot}%{_datadir}/check_mk/agents/hpux/hpux_lunstats
-chmod a+x %{buildroot}%{_datadir}/check_mk/agents/plugins/db2_mem.sh
-chmod a+x %{buildroot}%{_datadir}/check_mk/modules/snmp.py
-chmod a+x %{buildroot}%{_datadir}/check_mk/modules/packaging.py
-chmod a+x %{buildroot}%{_datadir}/check_mk/modules/agent_simulator.py
-chmod a+x %{buildroot}%{_datadir}/check_mk/modules/notify.py
-chmod a+x %{buildroot}%{_datadir}/check_mk/modules/automation.py
+for file in %{buildroot}%{_datadir}/check_mk/inventory/* ; do
+ chmod -R a+x $file
+done
+
+# Additional missing executable bit
chmod a+x %{buildroot}%{_datadir}/check_mk/notifications/debug
-chmod a+x %{buildroot}%{_datadir}/check_mk/modules/check_mk_base.py
-chmod a+x %{buildroot}%{_datadir}/check_mk/modules/prediction.py
-chmod a+x %{buildroot}%{_datadir}/check_mk/modules/localize.py
+chmod a+x %{buildroot}%{_datadir}/check-mk-agent/plugins/mk_logwatch
+chmod a+x %{buildroot}%{_datadir}/check-mk-agent/plugins/mk_oracle
# Web app files are not intended to be run, remove the shebang
# TODO: ask upstream to do the same
@@ -185,14 +189,29 @@ rm -rf %{buildroot}%{_datadir}/check_mk/agents/check_mk_caching_agent.linux
rm -rf %{buildroot}%{_datadir}/check_mk/agents/solaris/
rm -rf %{buildroot}%{_datadir}/check_mk/agents/hpux/
rm -rf %{buildroot}%{_datadir}/check_mk/agents/sap/
+rm -rf %{buildroot}%{_datadir}/check_mk/agents/special/
+rm -rf %{buildroot}%{_datadir}/check_mk/agents/z_os/
+rm -rf %{buildroot}%{_datadir}/check_mk/agents/mk-job.solaris
-# Remove deprecated agent plugins.
+# Remove deprecated agent plugins and their documentation
rm -rf %{buildroot}%{_datadir}/check_mk/agents/plugins/j4p_performance
+rm -rf %{buildroot}%{_docdir}/check_mk/treasures/deprecated/
+
+# Remove the documentation for agents we are not going to package
+rm -rf %{buildroot}%{_docdir}/check_mk/agents/
# Remove Windows files.
rm -rf %{buildroot}%{_docdir}/check_mk/windows/
+rm -rf %{buildroot}%{_docdir}/check_mk/treasures/windows_msi/
+rm -rf %{buildroot}%{_docdir}/check_mk/treasures/msexchange/
rm -rf %{buildroot}%{_datadir}/check_mk/agents/windows/
+
+# Remove DEB and RPM files that upstream ships
+rm -rf %{buildroot}%{_datadir}/check_mk/agents/check-mk-agent-%{version}-%{nodistrelease}.noarch.rpm
+rm -rf %{buildroot}%{_datadir}/check_mk/agents/check-mk-agent.spec
+rm -rf %{buildroot}%{_datadir}/check_mk/agents/check-mk-agent_%{version}-%{nodistrelease}_all.deb
+
# 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
@@ -213,6 +232,14 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/check_mk_agent/job
# Remove mk-job from its old location
rm -f %{buildroot}%{_datadir}/check_mk/agents/mk-job
+# Remove files that are present on other subpackages from -doc
+rm -rf %{buildroot}%{_docdir}/check_mk/AUTHORS
+rm -rf %{buildroot}%{_docdir}/check_mk/COPYING
+rm -rf %{buildroot}%{_docdir}/check_mk/ChangeLog
+
+# Remove the OMD-related README file
+rm -rf %{buildroot}%{_docdir}/check_mk/README.setup_in_omd
+
# Fix for 64-bit arches
%if %{_lib} == lib64
@@ -227,7 +254,7 @@ rmdir %{buildroot}%{_prefix}/lib/check_mk
%{_bindir}/mkp
%{_bindir}/check_mk
%config(noreplace) %{_sysconfdir}/check_mk/main.mk
-%config(noreplace) %{_sysconfdir}/check_mk/main.mk-1.2.4p5
+%config(noreplace) %{_sysconfdir}/check_mk/main.mk-1.2.6
%{_sysconfdir}/check_mk/First-Installation.txt
%{_sysconfdir}/check_mk/conf.d
%{_sysconfdir}/nagios/auth.serials
@@ -235,11 +262,14 @@ rmdir %{buildroot}%{_prefix}/lib/check_mk
%{_datadir}/check_mk/checks
%{_datadir}/check_mk/pnp-templates
%{_datadir}/check_mk/notifications
+%{_datadir}/check_mk/inventory
%{_datadir}/check_mk/check_mk_templates.cfg
%config(noreplace) %{_sysconfdir}/httpd/conf.d/zzz_check_mk.conf
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_mk_templates.cfg
%attr(755, nagios, nagios) %{_localstatedir}/lib/check_mk/*
%doc COPYING ChangeLog AUTHORS
+%doc %{_docdir}/check_mk/README
+%doc %{_docdir}/check_mk/README.*
%files agent
%{_datadir}/check_mk/agents
@@ -248,25 +278,48 @@ rmdir %{buildroot}%{_prefix}/lib/check_mk
%{_bindir}/mk-job
%{_datadir}/check-mk-agent
%config(noreplace) %{_sysconfdir}/xinetd.d/check-mk-agent
-%config(noreplace) %{_sysconfdir}/check-mk-agent
%attr(755, -, -) %{_localstatedir}/lib/check_mk_agent/job
%doc COPYING
%files docs
-%doc %{_docdir}/check_mk
+%doc %{_docdir}/check_mk/checks
+%doc %{_docdir}/check_mk/benchmark
+%doc %{_docdir}/check_mk/drafts
+%doc %{_docdir}/check_mk/helpers
+%doc %{_docdir}/check_mk/jasperreports
+%doc %{_docdir}/check_mk/livestatus
+%doc %{_docdir}/check_mk/mkeventd
+%doc %{_docdir}/check_mk/predictive
+%doc %{_docdir}/check_mk/treasures
+%doc %{_docdir}/check_mk/*.svg
+%doc %{_docdir}/check_mk/*.gif
+%doc %{_docdir}/check_mk/*.png
+%doc %{_docdir}/check_mk/*.mk
+%doc %{_docdir}/check_mk/manpage.template
+%doc %{_docdir}/check_mk/skeleton_check
+%doc COPYING
%files multisite
%{_datadir}/check_mk/web
%config(noreplace) %{_sysconfdir}/check_mk/multisite.mk
-%config(noreplace) %{_sysconfdir}/check_mk/multisite.mk-1.2.4p5
+%config(noreplace) %{_sysconfdir}/check_mk/multisite.mk-1.2.6
%{_sysconfdir}/check_mk/multisite.d
%attr(660, apache, nagios) %{_sysconfdir}/check_mk/conf.d/wato
+%doc COPYING
%files livestatus
%{_bindir}/unixcat
%{_libdir}/check_mk
+%doc COPYING
%changelog
+* Tue Apr 07 2015 Andrea Veri <averi at fedoraproject.org> - 1.2.6-1
+- New upstream release. Source0 is now generated directly from Git
+ as Check-Mk's upstream has decided to not include source code files
+ (.cc, .c) for livestatus, mkeventd and waitmax anymore on the tarballs
+ they release. We want to have these binaries built during the RPM build,
+ thus the need to repack the tarball with the procedure outlined above.
+
* Wed Sep 17 2014 Andrea Veri <averi at fedoraproject.org> - 1.2.4p5-1
- New upstream release. Fixes CVEs:
- CVE-2014-5338
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/check-mk.git/commit/?h=el5&id=e9f8e0c5ef7f177a93f550640d97adbda0f331a7
More information about the scm-commits
mailing list