Merge pull request #32135 from phile314/fusion-inventory
Fusion inventory: 2.3.18 -> 2.3.21, misc. fixes
This commit is contained in:
commit
99bab78abd
@ -55,9 +55,6 @@ in {
|
|||||||
description = "Fusion Inventory Agent";
|
description = "Fusion Inventory Agent";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
environment = {
|
|
||||||
OPTIONS = "--no-category=software";
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.fusionInventory}/bin/fusioninventory-agent --conf-file=${configFile} --daemon --no-fork";
|
ExecStart = "${pkgs.fusionInventory}/bin/fusioninventory-agent --conf-file=${configFile} --daemon --no-fork";
|
||||||
};
|
};
|
||||||
|
@ -1,22 +1,44 @@
|
|||||||
{ stdenv, fetchurl, buildPerlPackage, perlPackages
|
{ stdenv, lib, fetchurl, buildPerlPackage, perlPackages, gnused, nix, dmidecode, pciutils, usbutils, iproute, nettools
|
||||||
|
, fetchFromGitHub, makeWrapper
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPerlPackage rec {
|
buildPerlPackage rec {
|
||||||
version = "2.3.18";
|
|
||||||
name = "FusionInventory-Agent-${version}";
|
name = "FusionInventory-Agent-${version}";
|
||||||
src = fetchurl {
|
version = "2.3.21";
|
||||||
url = "mirror://cpan/authors/id/G/GR/GROUSSE/${name}.tar.gz";
|
|
||||||
sha256 = "543d96fa61b8f2a2bc599fe9f694f19d1f2094dc5506bc514d00b8a445bc5401";
|
src = fetchFromGitHub {
|
||||||
|
owner = "fusioninventory";
|
||||||
|
repo = "fusioninventory-agent";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "034clffcn0agx85macjgml4lyhvvck7idn94pqd2c77pk6crvw2y";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./remove_software_test.patch ];
|
patches = [
|
||||||
|
./remove_software_test.patch
|
||||||
|
# support for os-release file
|
||||||
|
(fetchurl {
|
||||||
|
url = https://github.com/fusioninventory/fusioninventory-agent/pull/396.diff;
|
||||||
|
sha256 = "0bxrjmff80ab01n23xggci32ajsah6zvcmz5x4hj6ayy6dzwi6jb";
|
||||||
|
})
|
||||||
|
# support for Nix software inventory
|
||||||
|
(fetchurl {
|
||||||
|
url = https://github.com/fusioninventory/fusioninventory-agent/pull/397.diff;
|
||||||
|
sha256 = "0pyf7mp0zsb3zcqb6yysr1zfp54p9ciwjn1pzayw6s9flmcgrmbw";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
||||||
patchShebangs bin
|
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 = [];
|
buildTools = [];
|
||||||
buildInputs = with perlPackages; [
|
buildInputs = [ makeWrapper ] ++ (with perlPackages; [
|
||||||
CGI
|
CGI
|
||||||
DataStructureUtil
|
DataStructureUtil
|
||||||
FileCopyRecursive
|
FileCopyRecursive
|
||||||
@ -28,6 +50,7 @@ buildPerlPackage rec {
|
|||||||
IPCRun
|
IPCRun
|
||||||
JSON
|
JSON
|
||||||
LWPProtocolhttps
|
LWPProtocolhttps
|
||||||
|
ModuleInstall
|
||||||
NetSNMP
|
NetSNMP
|
||||||
TestCompile
|
TestCompile
|
||||||
TestDeep
|
TestDeep
|
||||||
@ -35,7 +58,7 @@ buildPerlPackage rec {
|
|||||||
TestMockModule
|
TestMockModule
|
||||||
TestMockObject
|
TestMockObject
|
||||||
TestNoWarnings
|
TestNoWarnings
|
||||||
];
|
]);
|
||||||
propagatedBuildInputs = with perlPackages; [
|
propagatedBuildInputs = with perlPackages; [
|
||||||
FileWhich
|
FileWhich
|
||||||
LWP
|
LWP
|
||||||
@ -52,7 +75,10 @@ buildPerlPackage rec {
|
|||||||
cp -r lib $out
|
cp -r lib $out
|
||||||
|
|
||||||
for cur in $out/bin/*; do
|
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 iproute]}
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ index 8ee7ff02c..bd5551ab3 100755
|
|||||||
skip 'live SNMP test disabled', 6 unless $ENV{TEST_LIVE_SNMP};
|
skip 'live SNMP test disabled', 6 unless $ENV{TEST_LIVE_SNMP};
|
||||||
|
|
||||||
diff --git a/t/apps/agent.t b/t/apps/agent.t
|
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
|
--- a/t/apps/agent.t
|
||||||
+++ b/t/apps/agent.t
|
+++ b/t/apps/agent.t
|
||||||
@@ -12,7 +12,7 @@ use XML::TreePP;
|
@@ -12,7 +12,7 @@ use XML::TreePP;
|
||||||
@ -40,15 +40,28 @@ index f417b4106..12207f192 100755
|
|||||||
|
|
||||||
my ($content, $out, $err, $rc);
|
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},
|
- exists $content->{REQUEST}->{CONTENT}->{SOFTWARES},
|
||||||
- 'inventory has software'
|
- 'inventory has software'
|
||||||
-);
|
-);
|
||||||
-
|
-
|
||||||
-ok(
|
ok(
|
||||||
exists $content->{REQUEST}->{CONTENT}->{ENVS},
|
exists $content->{REQUEST}->{CONTENT}->{ENVS},
|
||||||
'inventory has environment variables'
|
'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',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user