diff options
author | Philipp Hausmann <ph_git@314.ch> | 2017-10-30 16:27:40 +0100 |
---|---|---|
committer | Orivej Desh <orivej@gmx.fr> | 2017-11-29 14:58:36 +0000 |
commit | 5f59913c74f3b165594cedcaf7dc475407c2ca7d (patch) | |
tree | 0a66e69ea11df7a377c1aa2c203c94eb4773213c /pkgs | |
parent | df5600d440d1fdcc0a313f8d6f2b757212c13283 (diff) |
FusionInventory: 3.18 -> 3.21
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/servers/monitoring/fusion-inventory/default.nix | 24 | ||||
-rw-r--r-- | pkgs/servers/monitoring/fusion-inventory/remove_software_test.patch | 23 |
2 files changed, 35 insertions, 12 deletions
diff --git a/pkgs/servers/monitoring/fusion-inventory/default.nix b/pkgs/servers/monitoring/fusion-inventory/default.nix index 2e694ede497f6..b4f5e325675ab 100644 --- a/pkgs/servers/monitoring/fusion-inventory/default.nix +++ b/pkgs/servers/monitoring/fusion-inventory/default.nix @@ -1,22 +1,28 @@ -{ stdenv, fetchurl, buildPerlPackage, perlPackages +{ stdenv, lib, fetchurl, buildPerlPackage, perlPackages, gnused, nix, dmidecode, pciutils, usbutils, iproute, nettools +, fetchFromGitHub, makeWrapper }: buildPerlPackage rec { - version = "2.3.18"; name = "FusionInventory-Agent-${version}"; + version = "2.3.21"; src = fetchurl { - url = "mirror://cpan/authors/id/G/GR/GROUSSE/${name}.tar.gz"; - sha256 = "543d96fa61b8f2a2bc599fe9f694f19d1f2094dc5506bc514d00b8a445bc5401"; + url = "mirror://cpan/authors/id/G/GB/GBOUGARD/${name}.tar.gz"; + sha256 = "0c2ijild03bfw125h2gyaip2mg1jxk72dcanrlx9n6pjh2ay90zh"; }; patches = [ ./remove_software_test.patch ]; postPatch = '' patchShebangs bin + + substituteInPlace "lib/FusionInventory/Agent/Tools/Linux.pm" \ + --replace /sbin/ip ${iproute}/sbin/ip + substituteInPlace "lib/FusionInventory/Agent/Task/Inventory/Linux/Networks.pm" \ + --replace /sbin/ip ${iproute}/sbin/ip ''; buildTools = []; - buildInputs = with perlPackages; [ + buildInputs = [ makeWrapper ] ++ (with perlPackages; [ CGI DataStructureUtil FileCopyRecursive @@ -28,6 +34,7 @@ buildPerlPackage rec { IPCRun JSON LWPProtocolhttps + ModuleInstall NetSNMP TestCompile TestDeep @@ -35,7 +42,7 @@ buildPerlPackage rec { TestMockModule TestMockObject TestNoWarnings - ]; + ]); propagatedBuildInputs = with perlPackages; [ FileWhich LWP @@ -52,7 +59,10 @@ buildPerlPackage rec { cp -r lib $out for cur in $out/bin/*; do - sed -e "s|./lib|$out/lib|" -i "$cur" + if [ -x "$cur" ]; then + sed -e "s|./lib|$out/lib|" -i "$cur" + wrapProgram "$cur" --prefix PATH : ${lib.makeBinPath [nix dmidecode pciutils usbutils nettools]} + fi done ''; diff --git a/pkgs/servers/monitoring/fusion-inventory/remove_software_test.patch b/pkgs/servers/monitoring/fusion-inventory/remove_software_test.patch index 5449f4d3740f5..b360f418aa0bb 100644 --- a/pkgs/servers/monitoring/fusion-inventory/remove_software_test.patch +++ b/pkgs/servers/monitoring/fusion-inventory/remove_software_test.patch @@ -28,7 +28,7 @@ index 8ee7ff02c..bd5551ab3 100755 skip 'live SNMP test disabled', 6 unless $ENV{TEST_LIVE_SNMP}; diff --git a/t/apps/agent.t b/t/apps/agent.t -index f417b4106..12207f192 100755 +index c0f6fc52f..c83837d70 100755 --- a/t/apps/agent.t +++ b/t/apps/agent.t @@ -12,7 +12,7 @@ use XML::TreePP; @@ -40,15 +40,28 @@ index f417b4106..12207f192 100755 my ($content, $out, $err, $rc); -@@ -73,11 +73,6 @@ subtest "first inventory execution and content" => sub { +@@ -71,11 +71,6 @@ subtest "first inventory execution and content" => sub { + check_content_ok($out); }; - ok( +-ok( - exists $content->{REQUEST}->{CONTENT}->{SOFTWARES}, - 'inventory has software' -); - --ok( + ok( exists $content->{REQUEST}->{CONTENT}->{ENVS}, 'inventory has environment variables' - ); +diff --git a/t/tasks/inventory/linux/softwares.t b/t/tasks/inventory/linux/softwares.t +index 72a0e578c..13944f34f 100755 +--- a/t/tasks/inventory/linux/softwares.t ++++ b/t/tasks/inventory/linux/softwares.t +@@ -89,7 +89,7 @@ my $rpm_packages = [ + PUBLISHER => 'Mageia.Org', + NAME => 'xfsprogs', + COMMENTS => 'Utilities for managing the XFS filesystem', +- INSTALLDATE => '25/03/2012', ++ INSTALLDATE => '24/03/2012', + FILESIZE => '3628382', + FROM => 'rpm', + ARCH => 'x86_64', |