[icinga-checkins] icinga.org: icinga-core/next: Remove upgrade triggers for versions < 1.7.x

git at icinga.org git at icinga.org
Sat Nov 9 13:49:14 CET 2013


Module: icinga-core
Branch: next
Commit: f7c00c6855fa04e058ef44981c68666d5ea9598f
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=f7c00c6855fa04e058ef44981c68666d5ea9598f

Author: Michael Friedrich <Michael.Friedrich at netways.de>
Date:   Sat Nov  9 13:47:51 2013 +0100

Remove upgrade triggers for versions < 1.7.x

Fixes #5044

---

 Makefile.in                     |    8 --------
 README.RHEL                     |    6 ------
 README.RHEL.idoutils            |    7 -------
 README.SUSE                     |    6 ------
 README.SUSE.idoutils            |    6 ------
 base/nebmods.c                  |    9 ---------
 icinga.spec                     |   42 ---------------------------------------
 module/idoutils/src/Makefile.in |    3 ---
 tools/icinga_verification.pl    |    4 ----
 9 files changed, 91 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index d908c3e..29a91ef 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -504,14 +504,6 @@ install-idoutils:
 		echo "" ;\
 		echo "*** IDOUtils installed ***" ;\
 		echo "" ;\
-		echo "!!! ATTENTION !!!" ; \
-        	echo "	idomod.o was renamed to idomod.so, module extension is now .so" ;\
-		echo "	idomod.so will now be installed to $(DESTDIR)$(LIBDIR) " ;\
-		echo "	" ;\
-		echo "	Check your config within wether icinga.cfg:broker_module OR" ;\
-		echo "	module definition in modules/ and update to the new path!!!" ;\
-		echo "!!! ATTENTION !!!" ;\
-		echo "" ;\
 		echo "Please check Changelog - CHANGES for more information!" ;\
 		echo "Upgrade docs available at http://docs.icinga.org/latest/en/upgrading_idoutils.html " ;\
 		echo "" ;\
diff --git a/README.RHEL b/README.RHEL
index 5dba1d2..85e2e38 100644
--- a/README.RHEL
+++ b/README.RHEL
@@ -1,12 +1,6 @@
 Introduction
 ------------
 
-CHANGES for 1.7
-* bindir/idomod.o => libdir/idomod.so
-* /var/icinga => /var/spool/icinga
-* icinga-idoutils => icinga-idoutils-libdbi-mysql and icinga-idoutils-libdbi-pgsql
-
-
 The packages are made as little dependend on each other as possible, to get the
 maximum flexibility in setting up distributed monitoring environments. This
 means, that you may have to install some additional packages manually. Yum is
diff --git a/README.RHEL.idoutils b/README.RHEL.idoutils
index a5af434..6086df7 100644
--- a/README.RHEL.idoutils
+++ b/README.RHEL.idoutils
@@ -1,15 +1,8 @@
 IDOUtils Notes for RHEL packages
 ================================
 
-CHANGES for 1.7
-* bindir/idomod.o => libdir/idomod.so
-* /var/icinga => /var/spool/icinga
-* icinga-idoutils => icinga-idoutils-libdbi-mysql and icinga-idoutils-libdbi-pgsql
-
-
 * IDOMOD Setup
 
-
 DO NOT EDIT icinga.cfg for broker_module entry!!! Icinga RPMs will use the
 /etc/icinga/modules/idoutils.cfg with the module definition automatically.
 Defining that twice can lead into unwanted errors!
diff --git a/README.SUSE b/README.SUSE
index 1a490e5..372c4ee 100644
--- a/README.SUSE
+++ b/README.SUSE
@@ -1,12 +1,6 @@
 Introduction
 ------------
 
-CHANGES for 1.7
-* bindir/idomod.o => libdir/idomod.so
-* /var/icinga => /var/spool/icinga
-* icinga-idoutils => icinga-idoutils-libdbi-mysql and icinga-idoutils-libdbi-pgsql
-
-
 The packages are made as little dependend on each other as possible, to get the
 maximum flexibility in setting up distributed monitoring environments. This
 means, that you may have to install some additional packages manually. Yum is
diff --git a/README.SUSE.idoutils b/README.SUSE.idoutils
index e34ac17..2c4c38f 100644
--- a/README.SUSE.idoutils
+++ b/README.SUSE.idoutils
@@ -1,12 +1,6 @@
 IDOUtils Notes for SUSE packages
 ================================
 
-CHANGES for 1.7
-* bindir/idomod.o => libdir/idomod.so
-* /var/icinga => /var/spool/icinga
-* icinga-idoutils => icinga-idoutils-libdbi-mysql and icinga-idoutils-libdbi-pgsql
-
-
 * IDOMOD Setup
 
 
diff --git a/base/nebmods.c b/base/nebmods.c
index 85477b4..12bb236 100644
--- a/base/nebmods.c
+++ b/base/nebmods.c
@@ -243,15 +243,6 @@ int neb_load_module(nebmodule *mod) {
 		mod->dl_file = strdup(output_file);
 	}
 
-	/* add a compatibility check for 1.7 change of idomod.o -> idomod.so */
-	/* FIXME - drop in 1.8 */
-	if (strstr(mod->filename, "idomod.o") != NULL) {
-		logit(NSLOG_RUNTIME_ERROR, FALSE, "Error: trying to load module '%s' which has been moved to libdir/idomod.so in Icinga 1.7!\n", mod->filename);
-		logit(NSLOG_RUNTIME_ERROR, FALSE, "Check Changelog and upgrade docs to update the broker module entry!\n");
-		neb_unload_module(mod, NEBMODULE_FORCE_UNLOAD, NEBMODULE_ERROR_IDO_VERSION);
-		return ERROR;
-	}
-
 	/* find module API version */
 	module_version_ptr = (int *)dlsym(mod->module_handle, "__neb_api_version");
 
diff --git a/icinga.spec b/icinga.spec
index 9b6e4fa..5649ad5 100644
--- a/icinga.spec
+++ b/icinga.spec
@@ -304,37 +304,6 @@ fi
 # restart httpd for auth change
 /sbin/service %{apachename} condrestart > /dev/null 2>&1 || :
 
-# if this is an upgrade, and we found an old retention.dat, copy it to new location before starting icinga
-if [ $1 -eq 2 ]
-then
-# stop icinga
-/sbin/service icinga stop &>/dev/null || :
-# check for retention.dat
-if [ -f /var/icinga/retention.dat ]
-then
-    cp /var/icinga/retention.dat %{spooldir}/retention.dat
-    rm /var/icinga/retention.dat
-fi
-# same for objects.precache
-if [ -f /var/icinga/objects.precache ]
-then
-    cp /var/icinga/objects.precache %{spooldir}/objects.precache
-    rm /var/icinga/objects.precache
-fi
-
-# we must then check all changed config locations (and we enforce that change to icinga.cfg only once)
-# cgi.cfg luckily knows where icinga.cfg is and does not need an update
-# retention.dat, objects.cache, objects.precache, status.dat, cmdfile, pidfile, checkresults
-%{__perl} -pi -e '
-	s|/var/icinga/retention.dat|%{spooldir}/retention.dat|;
-	s|/var/icinga/objects.precache|%{spooldir}/objects.precache|;
-	s|/var/icinga/objects.cache|%{spooldir}/objects.cache|;
-	s|/var/icinga/status.dat|%{spooldir}/status.dat|;
-	s|/var/icinga/rw/icinga.cmd|%{extcmdfile}|;
-	s|/var/icinga/icinga.pid|/var/run/icinga.pid|;
-	s|/var/icinga/checkresults|%{spooldir}/checkresults|;
-	' /etc/icinga/icinga.cfg
-
 # start icinga
 /sbin/service icinga start &>/dev/null || :
 fi
@@ -385,12 +354,6 @@ fi
 /sbin/chkconfig --add ido2db
 %endif
 
-# delete old bindir/idomod.o if it exists
-if [ -f %{_bindir}/idomod.o ]
-then
-    rm -f %{_bindir}/idomod.o
-fi
-
 %logmsg "idoutils-libdbi-mysql installed. don't forget to install/upgrade db schema, check %{readmeido}"
 
 %preun idoutils-libdbi-mysql
@@ -431,11 +394,6 @@ fi
 /sbin/chkconfig --add ido2db
 %endif
 
-# delete old bindir/idomod.o if it exists
-if [ -f %{_bindir}/idomod.o ]
-then
-    rm -f %{_bindir}/idomod.o
-fi
 ### change ido2db.cfg to match pgsql config
 # check if this is an upgrade
 if [ $1 -eq 2 ]
diff --git a/module/idoutils/src/Makefile.in b/module/idoutils/src/Makefile.in
index 1d75d23..fd57a1f 100644
--- a/module/idoutils/src/Makefile.in
+++ b/module/idoutils/src/Makefile.in
@@ -113,9 +113,6 @@ distclean: clean
 devclean: distclean
 
 install:
-	@echo "Going to uninstall old idomod.o in $(DESTDIR)$(BINDIR)/idomod.o ..."
-	rm -f $(DESTDIR)$(BINDIR)/idomod.o
-	@echo "Resuming with install..."
 	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR)
 	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)
 	$(INSTALL) -m 755 $(INSTALL_OPTS) ido2db $(DESTDIR)$(BINDIR)
diff --git a/tools/icinga_verification.pl b/tools/icinga_verification.pl
index 4384dbe..d8072e6 100644
--- a/tools/icinga_verification.pl
+++ b/tools/icinga_verification.pl
@@ -291,10 +291,6 @@ my $idomod_broker = get_key_from_ini("$icinga_base/icinga.cfg", 'broker_module')
 if (!$idomod_broker){
 	$idomod_broker = "no broker_module defined in icinga.cfg";
 }
-my $idomod_o = which('idomod.o');
-if (!$idomod_o){
-	$idomod_o = "Couldn't find idomod.o";
-}
 my $idomod_so = which('idomod.so');
 if (!$idomod_so){
 	$idomod_so = "Couldn't find idomod.so";





More information about the icinga-checkins mailing list