From a00fb19c8f8204dc52d942f22cc44608bbff4b04 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Tue, 24 Jul 2018 02:25:33 +0200 Subject: [PATCH 1/4] travis: install requirements via apt --- .travis.yml | 113 ++++++++++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 51 deletions(-) diff --git a/.travis.yml b/.travis.yml index a5ee5998..81734ec0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,65 +1,76 @@ --- dist: bionic -install: - - sudo apt-get update - - sudo apt-get --no-install-recommends install devscripts python python3 ruby php-cli gawk ksh zsh pylint shellcheck - - 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 +addons: + apt: + packages: + - devscripts + - python + - python3 + - ruby + - php5-cli + - gawk + - ksh + - zsh + - pylint + - shellcheck + - pkg-config + - libdb-dev + - libvirt-dev + - libexpat-dev - # 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 + # Munin/Plugin.pm is in "munin-node" on precise + - munin-node + + # Modules used by test script + - libsys-virt-perl + - libcapture-tiny-perl + + # Modules used by plugins + - libberkeleydb-perl + - libcache-memcached-perl + - libgraphics-colornames-www-perl + - libdbd-pg-perl + - libdata-dump-perl + - libdate-manip-perl + - libdatetime-format-iso8601-perl + - libdevice-serialport-perl + - libfile-readbackwards-perl + - libgraphics-colorobject-perl + - libipc-run3-perl + - libipc-sharelite-perl + - libjson-perl + - libjson-any-perl + - libmail-sendmail-perl + - libmodern-perl-perl + - libmoosex-poe-perl + - libnet-dns-perl + - libnet-openssh-perl + - libnet-snmp-perl + - libnet-telnet-perl + - libnet-telnet-cisco-perl + - libpoe-perl + - libproc-processtable-perl + - libredis-perl + - libswitch-perl + - libtext-iconv-perl + - libwww-mechanize-treebuilder-perl + - libyaml-perl + - libxml-libxml-perl + - libxml-simple-perl + - libxml-smart-perl + - libxml-twig-perl + - libexperimental-perl + +before_install: - 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 - cpanm --notest Test::More - - # Modules used by plugins + # more Modules used by plugins - cpanm --notest Asterisk::AMI - - cpanm --notest BerkeleyDB - - cpanm --notest Cache::Memcached - - cpanm --notest DBD::Pg - - cpanm --notest Data::Dump - - cpanm --notest Date::Manip - cpanm --notest Date::Parse - - cpanm --notest DateTime::Format::ISO8601 - - cpanm --notest Device::SerialPort - cpanm --notest FCGI::Client - - cpanm --notest File::ReadBackwards - - cpanm --notest Graphics::ColorObject - - cpanm --notest Graphics::ColorNames::HTML - - cpanm --notest Graphics::ColorNames::Windows - - cpanm --notest IPC::Run3 - - cpanm --notest IPC::ShareLite - - cpanm --notest JSON - - cpanm --notest JSON::Any - - cpanm --notest Mail::Sendmail - - cpanm --notest Modern::Perl - - cpanm --notest MooseX::POE - - cpanm --notest Net::DNS - - cpanm --notest Net::OpenSSH - - cpanm --notest Net::SNMP - - cpanm --notest Net::Telnet - - cpanm --notest Net::Telnet::Cisco - - cpanm --notest POE - cpanm --notest POE::Component::IRC - cpanm --notest POE::Quickie - - cpanm --notest Proc::ProcessTable - - cpanm --notest Redis - - cpanm --notest Switch - - cpanm --notest Text::Iconv - - cpanm --notest WWW::Mechanize::TreeBuilder - - cpanm --notest YAML - - cpanm --notest XML::LibXML - - cpanm --notest XML::Simple - - cpanm --notest XML::Smart - - cpanm --notest XML::Twig - - cpanm --notest experimental # Modules used bu plugins, but not compiling from CPAN # - cpanm --notest nvidia::ml # Modules used by plugins, but missing on cpan From 64c755a053b1f342c71bd4a0ccb624f3e83a5343 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Mon, 12 Aug 2019 05:27:24 +0200 Subject: [PATCH 2/4] travis: add more missing packages --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 81734ec0..88f6d03b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,10 +49,12 @@ addons: - libnet-telnet-perl - libnet-telnet-cisco-perl - libpoe-perl + - libpoe-component-irc-perl - libproc-processtable-perl - libredis-perl - libswitch-perl - libtext-iconv-perl + - libwww-mechanize-perl - libwww-mechanize-treebuilder-perl - libyaml-perl - libxml-libxml-perl From 9695f9d635e4ffcc4f3a6d8136c4c320eb5c1d92 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Mon, 12 Aug 2019 05:37:38 +0200 Subject: [PATCH 3/4] travis: update packages to Ubuntu Bionic --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 88f6d03b..ea1aab50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ addons: - python - python3 - ruby - - php5-cli + - php-cli - gawk - ksh - zsh From fe379b6f0590eb58a3c5273a5f47fae9aeb6e4f5 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Mon, 12 Aug 2019 05:49:33 +0200 Subject: [PATCH 4/4] Plugin amr: fix regex issue An unescpaed left brace is rejected by recent versions of perl. --- plugins/amr/amr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/amr/amr b/plugins/amr/amr index e6ae91e9..c200ccec 100755 --- a/plugins/amr/amr +++ b/plugins/amr/amr @@ -133,7 +133,7 @@ sub parse while (<$log>) { # \d protects us against HTML injection here, be careful when changing - if (m,SCM:{ID:(\d+) +.* +Consumption: +(\d+) +,) { + if (m,SCM:\{ID:(\d+) +.* +Consumption: +(\d+) +,) { $stations{$1} = $2; $signals{$1}++; }