From c01fb0a9041a1c3c66aa64cf2bd95d554da2d49e Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Wed, 28 Jun 2017 00:13:59 +0200 Subject: [PATCH 1/7] travis: libsys-virt-perl installed via apt --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index dd210c31..1f3ad4bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ install: - sudo apt-get --no-install-recommends install pkg-config libdb-dev libvirt-dev libexpat-dev # - Munin/Plugin.pm is in "munin-node" on precise - sudo apt-get --no-install-recommends install munin-node + - sudo apt-get --no-install-recommends install libsys-virt-perl # Modules used by test script - cpanm --notest Capture::Tiny @@ -51,11 +52,9 @@ install: - cpanm --notest XML::Twig - cpanm --notest nvidia::ml - cpanm --notest experimental - # - Sys::Virt version matching the test system's libvirt-dev - - cpanm --notest DANBERR/Sys-Virt-0.9.8.tar.gz # Modules used by plugins, but missing on cpan # - File::Tail::Multi # - Sun::Solaris::Kstat # - VMware::VIRuntime # - MythTV -script: "PERL5LIB=$PERL5LIB:/usr/share/perl5 prove" +script: "PERL5LIB=$PERL5LIB:/usr/share/perl5:/usr/lib/perl5 prove" From a3d0fc15d9ce015a48adfa7b94b665b1aeee6fa1 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Wed, 28 Jun 2017 00:14:19 +0200 Subject: [PATCH 2/7] travis: Switch installed via cpan --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1f3ad4bd..546428f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,8 +43,9 @@ install: - cpanm --notest POE::Quickie - cpanm --notest Proc::ProcessTable - cpanm --notest Redis - - cpanm --notest WWW::Mechanize::TreeBuilder + - cpanm --notest Switch - cpanm --notest Text::Iconv + - cpanm --notest WWW::Mechanize::TreeBuilder - cpanm --notest YAML - cpanm --notest XML::LibXML - cpanm --notest XML::Simple From 5eb8251fa6a7b0964086d4a4ce5542016b3570ea Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Wed, 28 Jun 2017 05:31:05 +0200 Subject: [PATCH 3/7] travis: upgrade distribution to Ubuntu trusty --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 546428f1..04aa8947 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ --- +dist: trusty language: perl install: - sudo apt-get update @@ -58,4 +59,4 @@ install: # - Sun::Solaris::Kstat # - VMware::VIRuntime # - MythTV -script: "PERL5LIB=$PERL5LIB:/usr/share/perl5:/usr/lib/perl5 prove" +script: "PERL5LIB=$PERL5LIB:/usr/share/perl5 prove" From 42c8483c4f54b722fb9842775a9ade437f1fd260 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Thu, 29 Jun 2017 00:56:46 +0200 Subject: [PATCH 4/7] travis: assemble module search path for mixture of cpan and apt modules --- .travis.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 04aa8947..4a4f4e3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ install: - cpanm --notest Capture::Tiny - cpanm --notest File::Find - cpanm --notest Test::More - # + # Modules used by plugins - cpanm --notest Asterisk::AMI - cpanm --notest BerkeleyDB @@ -59,4 +59,20 @@ install: # - Sun::Solaris::Kstat # - VMware::VIRuntime # - MythTV -script: "PERL5LIB=$PERL5LIB:/usr/share/perl5 prove" + +# Mixing modules installed via cpan and apt is a bit problematic: +# * perl (as it is used by travis) seems to be built without threading support +# * perl modules installed via apt were built against a threaded perl (e.g. DBI/DBI.so) +# Thus we need to make sure, that the modules installed via CPAN and the binary modules prepared by +# travis are preferred over the binary perl modules installed via apt (e.g. below /usr/lib/perl). +# Since the PERL5LIB environment variable precedes all other search paths, we use the sequence +# below in order to achieve the following order of preference: +# 1) /usr/share/perl5 (unknown requirement) +# 2) perl search path defined by travis environment +# 3) binary system-wide installed perl modules (via apt) +script: + - dpkg -L libsys-virt-perl + - mkdir -p ~/system-perl/auto + - ln -s /usr/lib/perl5/Sys ~/system-perl/ + - ln -s /usr/lib/perl5/auto/Sys ~/system-perl/auto/ + - "PERL5LIB=$PERL5LIB:/usr/share/perl5:~/system-perl prove" From 34c2ca4dcd5291c19b45cf2e2c1c637cb9f26bca Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Sat, 1 Jul 2017 00:41:15 +0200 Subject: [PATCH 5/7] remove perl --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4a4f4e3e..7a8c452d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ --- dist: trusty -language: perl install: - sudo apt-get update - sudo apt-get --no-install-recommends install devscripts python python3 ruby php5-cli gawk ksh zsh pylint From 81c1afa7badfd2da4cd8c8896442c6f1cbb99fbd Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Sat, 1 Jul 2017 00:53:02 +0200 Subject: [PATCH 6/7] perl: switch to system-wide perl --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7a8c452d..c74bd2b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,8 @@ install: - sudo apt-get --no-install-recommends install munin-node - sudo apt-get --no-install-recommends install libsys-virt-perl + - cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) + # Modules used by test script - cpanm --notest Capture::Tiny - cpanm --notest File::Find From a639d4b447acc7e46ab05e4f3b7b9b307979bd2d Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Sat, 1 Jul 2017 01:15:12 +0200 Subject: [PATCH 7/7] travis: explain change of perl environment more details can be found in the discussion regarding this change: https://github.com/munin-monitoring/contrib/pull/853 --- .travis.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index c74bd2b4..97decfbd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,10 @@ install: - sudo apt-get --no-install-recommends install munin-node - sudo apt-get --no-install-recommends install libsys-virt-perl + # we use locally installed cpan modules instead of travis' builtin 'homebrew' perl support + # The homebrew variation does not work for us, since: + # * it is built without threading + # * the 'libvirt' plugin requires Sys::Virt, which is not available via cpan anymore - thus we need to install the Debian package 'libsys-virt-perl', which was built with threading - cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) # Modules used by test script @@ -61,19 +65,5 @@ install: # - VMware::VIRuntime # - MythTV -# Mixing modules installed via cpan and apt is a bit problematic: -# * perl (as it is used by travis) seems to be built without threading support -# * perl modules installed via apt were built against a threaded perl (e.g. DBI/DBI.so) -# Thus we need to make sure, that the modules installed via CPAN and the binary modules prepared by -# travis are preferred over the binary perl modules installed via apt (e.g. below /usr/lib/perl). -# Since the PERL5LIB environment variable precedes all other search paths, we use the sequence -# below in order to achieve the following order of preference: -# 1) /usr/share/perl5 (unknown requirement) -# 2) perl search path defined by travis environment -# 3) binary system-wide installed perl modules (via apt) script: - - dpkg -L libsys-virt-perl - - mkdir -p ~/system-perl/auto - - ln -s /usr/lib/perl5/Sys ~/system-perl/ - - ln -s /usr/lib/perl5/auto/Sys ~/system-perl/auto/ - - "PERL5LIB=$PERL5LIB:/usr/share/perl5:~/system-perl prove" + - prove