From 2a0187022b7423c6567651755b82ac1949b90ff1 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 23 Dec 2019 13:28:38 +0100 Subject: [PATCH 1/3] Resolved deprecated options rpm spec --- pandora_server/pandora_server.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index cfa593bc8d..88d7c7ce78 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -18,7 +18,8 @@ Packager: Sancho Lerena Prefix: /usr/share BuildRoot: %{_tmppath}/%{name}-buildroot BuildArch: noarch -PreReq: %fillup_prereq %insserv_prereq /usr/bin/sed /usr/bin/grep /usr/sbin/useradd +# PreReq: %fillup_prereq %insserv_prereq /usr/bin/sed /usr/bin/grep /usr/sbin/useradd +Requires(pre,preun):/usr/bin/sed /usr/bin/grep /usr/sbin/useradd AutoReq: 0 Provides: %{name}-%{version} Requires: perl-DBI perl-DBD-mysql perl-libwww-perl @@ -43,9 +44,10 @@ A few examples of common resources monitored by Pandora FMS could be processor l %prep rm -rf $RPM_BUILD_ROOT -%setup -q -n pandora_server +%setup -n pandora_server %build +ls -latR %install From a3fdf4007d16ffdc38be604704a8f24eb25b0dc1 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 2 Jan 2020 10:04:41 +0100 Subject: [PATCH 2/3] Fixed method calls in Base.pm --- pandora_server/lib/PandoraFMS/Recon/Base.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index 056495238c..ce6048a6f9 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -1447,7 +1447,7 @@ sub cloud_scan($) { } else { # Unrecognized task type. - call('message', 'Unrecognized task type', 1); + $self->call('message', 'Unrecognized task type', 1); $self->call('update_progress', -1); return; } @@ -1469,7 +1469,7 @@ sub cloud_scan($) { if (!$cloudObj) { # Failed to initialize, check Cloud credentials or anything. - call('message', 'Unable to initialize PandoraFMS::Recon::Cloud::'.$type, 3); + $self->call('message', 'Unable to initialize PandoraFMS::Recon::Cloud::'.$type, 3); } else { # Let Cloud object manage scan. @@ -1581,7 +1581,7 @@ sub app_scan($) { $type = 'SAP'; } else { # Unrecognized task type. - call('message', 'Unrecognized task type', 1); + $self->call('message', 'Unrecognized task type', 1); $self->call('update_progress', -1); return; } @@ -1607,7 +1607,7 @@ sub app_scan($) { $self->{'c_network_percent'} = 0; # Send message - call('message', 'Checking target ' . $target, 10); + $self->call('message', 'Checking target ' . $target, 10); # Force target acquirement. $self->{'task_data'}->{'dbhost'} = $target; @@ -1633,7 +1633,7 @@ sub app_scan($) { # Verify if object is connected. If cannot connect to current target # return with module. if (!$obj->is_connected()) { - call('message', 'Cannot connect to target ' . $target, 3); + $self->call('message', 'Cannot connect to target ' . $target, 3); $global_percent += $global_step; $self->{'c_network_percent'} = 90; @@ -1739,7 +1739,7 @@ sub deploy_scan($) { if (!$deployer) { # Failed to initialize, check Cloud credentials or anything. - call('message', 'Unable to initialize PandoraFMS::Recon::Deployer', 3); + $self->call('message', 'Unable to initialize PandoraFMS::Recon::Deployer', 3); } else { # Let deployer object manage scan. From c1f026fea16f3d30be4406a35dc9590f260d5299 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 2 Jan 2020 11:05:48 +0100 Subject: [PATCH 3/3] restored pandora_server.spec classic --- pandora_server/pandora_server.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 10840ce046..b5acd25c09 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -18,8 +18,7 @@ Packager: Sancho Lerena Prefix: /usr/share BuildRoot: %{_tmppath}/%{name}-buildroot BuildArch: noarch -# PreReq: %fillup_prereq %insserv_prereq /usr/bin/sed /usr/bin/grep /usr/sbin/useradd -Requires(pre,preun):/usr/bin/sed /usr/bin/grep /usr/sbin/useradd +PreReq: %fillup_prereq %insserv_prereq /usr/bin/sed /usr/bin/grep /usr/sbin/useradd AutoReq: 0 Provides: %{name}-%{version} Requires: perl-DBI perl-DBD-mysql perl-libwww-perl @@ -44,10 +43,9 @@ A few examples of common resources monitored by Pandora FMS could be processor l %prep rm -rf $RPM_BUILD_ROOT -%setup -n pandora_server +%setup -q -n pandora_server %build -ls -latR %install