diff --git a/Makefile.omd b/Makefile.omd index 2e5877476..ef1c25a79 100644 --- a/Makefile.omd +++ b/Makefile.omd @@ -32,3 +32,8 @@ MODULE_DIR=$(APACHE_MODULE_DIR) ifeq ($(shell uname -m),x86_64) MODULE_DIR=$(APACHE_MODULE_DIR_64) endif + +# skip some packages on some distros +ifdef SKIP_PACKAGES + PACKAGES:=$(shell for p in $(PACKAGES); do skip=0; for s in $(SKIP_PACKAGES); do if [ "$$s" = "$$p" ]; then skip=1; fi; done; if [ $$skip -eq 0 ]; then echo $$p; fi; done) +endif diff --git a/distros/Makefile.SLES_11 b/distros/Makefile.SLES_11 index 39e3fe74e..db50083e3 100644 --- a/distros/Makefile.SLES_11 +++ b/distros/Makefile.SLES_11 @@ -97,3 +97,4 @@ APACHE_ENMOD = a2enmod %s BECOME_ROOT = su -c MOUNT_OPTIONS = INIT_CMD = /etc/init.d/%(name)s %(action)s +SKIP_PACKAGES = icinga2 diff --git a/distros/Makefile.SLES_11SP1 b/distros/Makefile.SLES_11SP1 index a8fe15b55..ff7b949f7 100644 --- a/distros/Makefile.SLES_11SP1 +++ b/distros/Makefile.SLES_11SP1 @@ -99,3 +99,4 @@ APACHE_ENMOD = a2enmod %s BECOME_ROOT = su -c MOUNT_OPTIONS = INIT_CMD = /etc/init.d/%(name)s %(action)s +SKIP_PACKAGES = icinga2 diff --git a/distros/Makefile.SLES_11SP2 b/distros/Makefile.SLES_11SP2 index c91233f66..d7fdac554 100644 --- a/distros/Makefile.SLES_11SP2 +++ b/distros/Makefile.SLES_11SP2 @@ -99,3 +99,4 @@ APACHE_ENMOD = a2enmod %s BECOME_ROOT = su -c MOUNT_OPTIONS = INIT_CMD = /etc/init.d/%(name)s %(action)s +SKIP_PACKAGES = icinga2 diff --git a/distros/Makefile.SLES_11SP3 b/distros/Makefile.SLES_11SP3 index f4c6ef3c0..6d7b8e774 100644 --- a/distros/Makefile.SLES_11SP3 +++ b/distros/Makefile.SLES_11SP3 @@ -102,3 +102,4 @@ APACHE_ENMOD = a2enmod %s BECOME_ROOT = su -c MOUNT_OPTIONS = INIT_CMD = /etc/init.d/%(name)s %(action)s +SKIP_PACKAGES = icinga2 diff --git a/distros/Makefile.SLES_11SP4 b/distros/Makefile.SLES_11SP4 index 491a71955..83141e613 100644 --- a/distros/Makefile.SLES_11SP4 +++ b/distros/Makefile.SLES_11SP4 @@ -102,3 +102,4 @@ APACHE_ENMOD = a2enmod %s BECOME_ROOT = su -c MOUNT_OPTIONS = INIT_CMD = /etc/init.d/%(name)s %(action)s +SKIP_PACKAGES = icinga2 diff --git a/t/03-distro-makefiles.t b/t/03-distro-makefiles.t index e36fff8b9..763685c80 100644 --- a/t/03-distro-makefiles.t +++ b/t/03-distro-makefiles.t @@ -30,6 +30,7 @@ for my $file (keys %{$all_confs}) { for my $key (keys %{$all_keys}) { next if $key eq 'ARCH'; # arch is debian specific next if $key eq 'CONFIG_SITE'; # CONFIG_SITE is OpenSuSE specific + next if $key eq 'SKIP_PACKAGES'; # SKIP_PACKAGES is optional ok(exists($all_confs->{$file}->{$key}), "$file: $key"); } } diff --git a/t/36-histou.t b/t/36-histou.t index a094672c1..9038241a1 100644 --- a/t/36-histou.t +++ b/t/36-histou.t @@ -15,6 +15,7 @@ BEGIN { my $php_version = `php -v`; $php_version =~ s%^PHP\ (\d\.\d).*%$1%gmsx; +plan skip_all => "icinga2 not included, cannot test" unless -x '/omd/versions/default/bin/icinga2'; plan( skip_all => 'histou requires at least php 5.3') if $php_version < 5.3; plan( tests => 49 );