WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: OCSInventory-NG UnixAgent on TC9  (Read 2385 times)

Offline Risthel

  • Newbie
  • *
  • Posts: 12
OCSInventory-NG UnixAgent on TC9
« on: July 11, 2018, 04:57:38 PM »
Hi folks.

Would it be possible to create an extension to OcsInventory agent? - https://github.com/OCSInventory-NG/UnixAgent

It's pretty useful to track hardware info on old thinclients(bios version, serial number, network info, disk, ram, etc). Support for 32 and 64 bit would be great.

Some of the software dependencies are already available as extensions, but there are some missing perl libraries to make this software work as expected(see github link)

Thanks.

Offline Risthel

  • Newbie
  • *
  • Posts: 12
Re: OCSInventory-NG UnixAgent on TC9
« Reply #1 on: July 12, 2018, 07:17:40 AM »
Just a follow-up: Not every dependency is needed.

Linux agents will need the bare minimum:


This should be good for most environments that don't need advanced features like ocsangent running as a daemon, ipmi data, ssl communication between agents and server,  advanced snmp data parsing...

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14798
Re: OCSInventory-NG UnixAgent on TC9
« Reply #2 on: July 16, 2018, 06:15:01 AM »
net-snmp-perl removed from 8.x and 9.x repos as it is compiled against perl5 from the 7.x repo - this was missed since it didn't follow the perl module perl_xxx_yyy naming convention

Just as an example, perl_lwp looks to have about 25 deps...

Offline Risthel

  • Newbie
  • *
  • Posts: 12
Re: OCSInventory-NG UnixAgent on TC9
« Reply #3 on: July 16, 2018, 07:05:21 AM »
Hi Juanito.

Yeah. I've spent the last days installing deps of these deps using cpan and it does not seems to be an easy task.

Meanwhile, to make the software work i've managed to run cpan as tc user, and created a custom PERL5LIB and @INC inside the user's home.

I'm not proud of this solution, but now i have the software installed inside my home and not scattered around /usr/share, /usr/lib, etc.

aus9

  • Guest
Re: OCSInventory-NG UnixAgent on TC9
« Reply #4 on: July 16, 2018, 08:37:57 PM »
Quote
using cpan and it does not seems to be an easy task.

you may be interested in cpanm which I built for 64 bit  ....warning I am not a real coder and the following does not build one package
I will look at it later but  this is just a teaser for you

Code: [Select]
tce-load -i cpanm
sudo su
cpanm XML::Simple LWP Net::CUPS Net::SNMP Data::UUID
--> Working on XML::Simple
Fetching http://www.cpan.org/authors/id/G/GR/GRANTM/XML-Simple-2.25.tar.gz ... OK
Configuring XML-Simple-2.25 ... OK
==> Found dependencies: XML::SAX::Expat, XML::NamespaceSupport, XML::SAX
--> Working on XML::SAX::Expat
Fetching http://www.cpan.org/authors/id/B/BJ/BJOERN/XML-SAX-Expat-0.51.tar.gz ... OK
Configuring XML-SAX-Expat-0.51 ... OK
==> Found dependencies: XML::SAX, XML::NamespaceSupport, XML::SAX::Base, XML::Parser
--> Working on XML::SAX
Fetching http://www.cpan.org/authors/id/G/GR/GRANTM/XML-SAX-1.00.tar.gz ... OK
Configuring XML-SAX-1.00 ... OK
==> Found dependencies: XML::SAX::Base, XML::NamespaceSupport
--> Working on XML::SAX::Base
Fetching http://www.cpan.org/authors/id/G/GR/GRANTM/XML-SAX-Base-1.09.tar.gz ... OK
Configuring XML-SAX-Base-1.09 ... OK
Building and testing XML-SAX-Base-1.09 ... OK
Successfully installed XML-SAX-Base-1.09
--> Working on XML::NamespaceSupport
Fetching http://www.cpan.org/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-1.12.tar.gz ... OK
Configuring XML-NamespaceSupport-1.12 ... OK
Building and testing XML-NamespaceSupport-1.12 ... OK
Successfully installed XML-NamespaceSupport-1.12
Building and testing XML-SAX-1.00 ... OK
Successfully installed XML-SAX-1.00
--> Working on XML::Parser
Fetching http://www.cpan.org/authors/id/T/TO/TODDR/XML-Parser-2.44.tar.gz ... OK
Configuring XML-Parser-2.44 ... N/A
! Configure failed for XML-Parser-2.44. See /root/.cpanm/work/1531816233.15619/build.log for details.
! Installing the dependencies failed: Module 'XML::Parser' is not installed
! Bailing out the installation for XML-SAX-Expat-0.51.
! Installing the dependencies failed: Module 'XML::SAX::Expat' is not installed
! Bailing out the installation for XML-Simple-2.25.
--> Working on LWP
Fetching http://www.cpan.org/authors/id/E/ET/ETHER/libwww-perl-6.35.tar.gz ... OK
Configuring libwww-perl-6.35 ... OK
==> Found dependencies: WWW::RobotRules, Test::RequiresInternet, URI, Try::Tiny, Test::Fatal, HTTP::Request::Common, HTTP::Cookies, Test::Needs, HTTP::Daemon, Net::HTTP, URI::Escape, HTML::Entities, HTTP::Request, HTTP::Negotiate, HTTP::Response, HTTP::Status, HTTP::Date, Encode::Locale, File::Listing, LWP::MediaTypes, HTML::HeadParser
--> Working on WWW::RobotRules
Fetching http://www.cpan.org/authors/id/G/GA/GAAS/WWW-RobotRules-6.02.tar.gz ... OK
Configuring WWW-RobotRules-6.02 ... OK
==> Found dependencies: URI
--> Working on URI
Fetching http://www.cpan.org/authors/id/E/ET/ETHER/URI-1.74.tar.gz ... OK
Configuring URI-1.74 ... OK
==> Found dependencies: Test::Needs
--> Working on Test::Needs
Fetching http://www.cpan.org/authors/id/H/HA/HAARG/Test-Needs-0.002005.tar.gz ... OK
Configuring Test-Needs-0.002005 ... OK
Building and testing Test-Needs-0.002005 ... OK
Successfully installed Test-Needs-0.002005
Building and testing URI-1.74 ... OK
Successfully installed URI-1.74
Building and testing WWW-RobotRules-6.02 ... OK
Successfully installed WWW-RobotRules-6.02
--> Working on Test::RequiresInternet
Fetching http://www.cpan.org/authors/id/M/MA/MALLEN/Test-RequiresInternet-0.05.tar.gz ... OK
Configuring Test-RequiresInternet-0.05 ... OK
Building and testing Test-RequiresInternet-0.05 ... OK
Successfully installed Test-RequiresInternet-0.05
--> Working on Try::Tiny
Fetching http://www.cpan.org/authors/id/E/ET/ETHER/Try-Tiny-0.30.tar.gz ... OK
Configuring Try-Tiny-0.30 ... OK
Building and testing Try-Tiny-0.30 ... OK
Successfully installed Try-Tiny-0.30
--> Working on Test::Fatal
Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Test-Fatal-0.014.tar.gz ... OK
Configuring Test-Fatal-0.014 ... OK
Building and testing Test-Fatal-0.014 ... OK
Successfully installed Test-Fatal-0.014
--> Working on HTTP::Request::Common
Fetching http://www.cpan.org/authors/id/O/OA/OALDERS/HTTP-Message-6.18.tar.gz ... OK
Configuring HTTP-Message-6.18 ... OK
==> Found dependencies: HTTP::Date, LWP::MediaTypes, Encode::Locale, IO::HTML
--> Working on HTTP::Date
Fetching http://www.cpan.org/authors/id/G/GA/GAAS/HTTP-Date-6.02.tar.gz ... OK
Configuring HTTP-Date-6.02 ... OK
Building and testing HTTP-Date-6.02 ... OK
Successfully installed HTTP-Date-6.02
--> Working on LWP::MediaTypes
Fetching http://www.cpan.org/authors/id/G/GA/GAAS/LWP-MediaTypes-6.02.tar.gz ... OK
Configuring LWP-MediaTypes-6.02 ... OK
Building and testing LWP-MediaTypes-6.02 ... OK
Successfully installed LWP-MediaTypes-6.02
--> Working on Encode::Locale
Fetching http://www.cpan.org/authors/id/G/GA/GAAS/Encode-Locale-1.05.tar.gz ... OK
Configuring Encode-Locale-1.05 ... OK
Building and testing Encode-Locale-1.05 ... OK
Successfully installed Encode-Locale-1.05
--> Working on IO::HTML
Fetching http://www.cpan.org/authors/id/C/CJ/CJM/IO-HTML-1.001.tar.gz ... OK
Configuring IO-HTML-1.001 ... OK
Building and testing IO-HTML-1.001 ... OK
Successfully installed IO-HTML-1.001
Building and testing HTTP-Message-6.18 ... OK
Successfully installed HTTP-Message-6.18
--> Working on HTTP::Cookies
Fetching http://www.cpan.org/authors/id/O/OA/OALDERS/HTTP-Cookies-6.04.tar.gz ... OK
Configuring HTTP-Cookies-6.04 ... OK
Building and testing HTTP-Cookies-6.04 ... OK
Successfully installed HTTP-Cookies-6.04
--> Working on HTTP::Daemon
Fetching http://www.cpan.org/authors/id/G/GA/GAAS/HTTP-Daemon-6.01.tar.gz ... OK
Configuring HTTP-Daemon-6.01 ... OK
Building and testing HTTP-Daemon-6.01 ... OK
Successfully installed HTTP-Daemon-6.01
--> Working on Net::HTTP
Fetching http://www.cpan.org/authors/id/O/OA/OALDERS/Net-HTTP-6.18.tar.gz ... OK
Configuring Net-HTTP-6.18 ... OK
Building and testing Net-HTTP-6.18 ... OK
Successfully installed Net-HTTP-6.18
--> Working on HTML::Entities
Fetching http://www.cpan.org/authors/id/G/GA/GAAS/HTML-Parser-3.72.tar.gz ... OK
Configuring HTML-Parser-3.72 ... OK
==> Found dependencies: HTML::Tagset
--> Working on HTML::Tagset
Fetching http://www.cpan.org/authors/id/P/PE/PETDANCE/HTML-Tagset-3.20.tar.gz ... OK
Configuring HTML-Tagset-3.20 ... OK
Building and testing HTML-Tagset-3.20 ... OK
Successfully installed HTML-Tagset-3.20
Building and testing HTML-Parser-3.72 ... FAIL
! Installing HTML::Entities failed. See /root/.cpanm/work/1531816233.15619/build.log for details. Retry with --force to force install it.
--> Working on HTTP::Negotiate
Fetching http://www.cpan.org/authors/id/G/GA/GAAS/HTTP-Negotiate-6.01.tar.gz ... OK
Configuring HTTP-Negotiate-6.01 ... OK
Building and testing HTTP-Negotiate-6.01 ... OK
Successfully installed HTTP-Negotiate-6.01
--> Working on File::Listing
Fetching http://www.cpan.org/authors/id/G/GA/GAAS/File-Listing-6.04.tar.gz ... OK
Configuring File-Listing-6.04 ... OK
Building and testing File-Listing-6.04 ... OK
Successfully installed File-Listing-6.04
! Installing the dependencies failed: Module 'HTML::Entities' is not installed, Module 'HTML::HeadParser' is not installed
! Bailing out the installation for libwww-perl-6.35.
--> Working on Net::CUPS
Fetching http://www.cpan.org/authors/id/N/NI/NINE/Net-CUPS-0.64.tar.gz ... OK
Configuring Net-CUPS-0.64 ... N/A
! Configure failed for Net-CUPS-0.64. See /root/.cpanm/work/1531816233.15619/build.log for details.
--> Working on Net::SNMP
Fetching http://www.cpan.org/authors/id/D/DT/DTOWN/Net-SNMP-v6.0.1.tar.gz ... OK
==> Found dependencies: Module::Build
--> Working on Module::Build
Fetching http://www.cpan.org/authors/id/L/LE/LEONT/Module-Build-0.4224.tar.gz ... OK
Configuring Module-Build-0.4224 ... OK
Building and testing Module-Build-0.4224 ... OK
Successfully installed Module-Build-0.4224
Configuring Net-SNMP-v6.0.1 ... OK
Building and testing Net-SNMP-v6.0.1 ... OK
Successfully installed Net-SNMP-v6.0.1
--> Working on Data::UUID
Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Data-UUID-1.221.tar.gz ... OK
Configuring Data-UUID-1.221 ... OK
Building and testing Data-UUID-1.221 ... FAIL
! Installing Data::UUID failed. See /root/.cpanm/work/1531816233.15619/build.log for details. Retry with --force to force install it.
22 distributions installed

to see what got installed system wide so far ignoring UUID

Code: [Select]
instmodsh
Available commands are:
   l            - List all installed modules
   m <module>   - Select a module
   q            - Quit the program
cmd? l
Installed modules are:
   Encode::Locale
   File::Listing
   HTML::Tagset
   HTTP::Cookies
   HTTP::Daemon
   HTTP::Date
   HTTP::Message
   HTTP::Negotiate
   IO::HTML
   LWP::MediaTypes
   Module::Build
   Net::HTTP
   Net::SNMP
   Perl
   Test::Fatal
   Test::Needs
   Test::RequiresInternet
   Try::Tiny
   URI
   WWW::RobotRules
   XML::NamespaceSupport
   XML::SAX
   XML::SAX::Base
cmd?


from my 64 info we have
Quote
DEPENDENCIES will be seen in log if install fails
                eg  sudo su && cpanm Glib
                log at /root/.cpanm/build.log
                (snip) Package gobject-2.0 was not found in the pkg-config search path 
                (so) load  gobject-introspection-dev and repeat install command
                (build.log will change and old build.log will be under ..work)

but there is a lot more there too included the downloads which includes data-UUID* .tar.gz
« Last Edit: July 16, 2018, 08:45:28 PM by aus9 »

aus9

  • Guest
Re: OCSInventory-NG UnixAgent on TC9
« Reply #5 on: July 16, 2018, 08:56:10 PM »
Ok so after reading log....its morning here....the UUID was missing gcc...oops heh heh  so load compiletc and repeat that cpanm then we get

Code: [Select]
Installed modules are:
   Data::UUID
   Encode::Locale
   File::Listing
   HTML::Parser
   HTML::Tagset
   HTTP::Cookies
   HTTP::Daemon
   HTTP::Date
   HTTP::Message
   HTTP::Negotiate
   IO::HTML
   LWP::MediaTypes
   Module::Build
   Net::HTTP
   Net::SNMP
   Perl
   Test::Fatal
   Test::Needs
   Test::RequiresInternet
   Try::Tiny
   URI
   WWW::RobotRules
   XML::NamespaceSupport
   XML::SAX
   XML::SAX::Base
   libwww::perl

if you need to package them....etc...you may need to run

Code: [Select]
touch /tmp/mark
I can't find my build script .....it was submitted but maybe my fav TCZ checker forgot it

if interested in building it to help you for 32 bit here is a link to it, with luck

https://www.dropbox.com/s/4os81fegum019q3/build-cpanm.sh?dl=0

aus9

  • Guest
Re: OCSInventory-NG UnixAgent on TC9
« Reply #6 on: July 17, 2018, 02:40:30 AM »
Hi changed link to remove an old contact.

new build script is now here
https://www.dropbox.com/s/yqfw50ipz3k3sbf/build-cpanm.sh?dl=0