summaryrefslogtreecommitdiff
path: root/net/ocsinventory-agent/patches
diff options
context:
space:
mode:
authorbouyer <bouyer@pkgsrc.org>2009-08-16 18:25:53 +0000
committerbouyer <bouyer@pkgsrc.org>2009-08-16 18:25:53 +0000
commitd5700bc2c1bb13ef446004c0a291545e58ed80e8 (patch)
tree34f9ae646bc97e463c657387ce61682cee2c4dbf /net/ocsinventory-agent/patches
parent700edae2fe122b11668358a9b075d2aaf7597f2a (diff)
downloadpkgsrc-d5700bc2c1bb13ef446004c0a291545e58ed80e8.tar.gz
Import ocsinventory-agent 1.1.2 to pkgsrc.
Open Computer and Software Inventory Next Generation is an application designed to help a network or system administrator keep track of the computers configuration and software that are installed on the network. Information about Hardware and Operating System are collected.
Diffstat (limited to 'net/ocsinventory-agent/patches')
-rw-r--r--net/ocsinventory-agent/patches/patch-aa22
-rw-r--r--net/ocsinventory-agent/patches/patch-ab15
-rw-r--r--net/ocsinventory-agent/patches/patch-ac59
-rw-r--r--net/ocsinventory-agent/patches/patch-ad31
-rw-r--r--net/ocsinventory-agent/patches/patch-ae27
-rw-r--r--net/ocsinventory-agent/patches/patch-af29
-rw-r--r--net/ocsinventory-agent/patches/patch-ag26
-rw-r--r--net/ocsinventory-agent/patches/patch-ah27
-rw-r--r--net/ocsinventory-agent/patches/patch-ai26
-rw-r--r--net/ocsinventory-agent/patches/patch-aj19
-rw-r--r--net/ocsinventory-agent/patches/patch-ak29
-rw-r--r--net/ocsinventory-agent/patches/patch-al21
-rw-r--r--net/ocsinventory-agent/patches/patch-am19
-rw-r--r--net/ocsinventory-agent/patches/patch-an21
-rw-r--r--net/ocsinventory-agent/patches/patch-ao17
15 files changed, 388 insertions, 0 deletions
diff --git a/net/ocsinventory-agent/patches/patch-aa b/net/ocsinventory-agent/patches/patch-aa
new file mode 100644
index 00000000000..bd9513bd66f
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-aa
@@ -0,0 +1,22 @@
+$NetBSD: patch-aa,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- postinst.pl.orig 2009-06-25 15:14:19.000000000 +0200
++++ postinst.pl 2009-06-25 15:15:00.000000000 +0200
+@@ -163,7 +163,7 @@
+ }
+
+
+-my $configdir = pickConfigdir ("/etc/ocsinventory", "/usr/local/etc/ocsinventory", "/etc/ocsinventory-agent");
++my $configdir = pickConfigdir ("@PKG_SYSCONFDIR@");
+
+ if (-f $old_linux_agent_dir.'/ocsinv.conf' && ask_yn("Should the old linux_agent settings be imported?", 'y')) {
+ my $ocsinv = XMLin($old_linux_agent_dir.'/ocsinv.conf');
+@@ -220,7 +220,7 @@
+ close CONFIG;
+ }
+
+-print "[info] The config file will be written in /etc/ocsinventory/ocsinventory-agent.cfg,\n";
++print "[info] The config file will be written in @PKG_SYSCONFDIR@/ocsinventory-agent.cfg,\n";
+
+ my $tmp = promptUser('What is the address of your ocs server', exists ($config->{server})?$config->{server}:'ocsinventory-ng');
+ $config->{server} = mkFullServerUrl($tmp);
diff --git a/net/ocsinventory-agent/patches/patch-ab b/net/ocsinventory-agent/patches/patch-ab
new file mode 100644
index 00000000000..64bdc502577
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-ab
@@ -0,0 +1,15 @@
+$NetBSD: patch-ab,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- lib/Ocsinventory/Agent/Config.pm.orig 2009-03-22 20:11:09.000000000 +0100
++++ lib/Ocsinventory/Agent/Config.pm 2009-06-25 15:14:11.000000000 +0200
+@@ -8,9 +8,7 @@
+
+ @{$config->{etcdir}} = ();
+
+- push (@{$config->{etcdir}}, '/etc/ocsinventory');
+- push (@{$config->{etcdir}}, '/usr/local/etc/ocsinventory');
+- push (@{$config->{etcdir}}, '/etc/ocsinventory-agent');
++ push (@{$config->{etcdir}}, '@PKG_SYSCONFDIR@');
+ push (@{$config->{etcdir}}, $ENV{HOME}.'/.ocsinventory');
+
+ if (!$file || !-f $file) {
diff --git a/net/ocsinventory-agent/patches/patch-ac b/net/ocsinventory-agent/patches/patch-ac
new file mode 100644
index 00000000000..c152cc3434c
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-ac
@@ -0,0 +1,59 @@
+$NetBSD: patch-ac,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- Makefile.PL.orig 2009-03-22 20:18:44.000000000 +0100
++++ Makefile.PL 2009-08-16 17:56:58.000000000 +0200
+@@ -1,21 +1,6 @@
+
+ use inc::Module::Install;
+
+-# Hack to be able to run a post install script
+-sub MY::postamble
+-{
+-
+- my $re;
+-
+- $re = '
+-install :: all pure_install doc_install
+- $(NOECHO) $(NOOP)';
+-
+- $re .= "\n\t[ ! -f run-postinst ] || $^X postinst.pl\n";
+-
+- return $re;
+-}
+-
+ use Config;
+
+ name 'Ocsinventory-Agent';
+@@ -34,7 +19,7 @@
+ recommends 'Proc::PID::File' => undef;
+
+ install_script 'ocsinventory-agent';
+-
++installdirs 'vendor';
+
+ # We want a release bundled with the needed dependency to be able to
+ # prepare a standealone binay with PAR::Packer
+@@ -47,14 +32,6 @@
+
+
+
+-if (defined ($ENV{PERL_AUTOINSTALL}) || defined ($ENV{PERL_AUTOINSTALL})) {
+- unlink 'run-postinst';
+-} else {
+- open POSTINST, '>run-postinst' or die $!;
+- close POSTINST;
+-}
+-
+-
+ if (!can_use('Compress::Zlib')) {
+ print "Please install Compress::Zlib if you use an OCS server prior 1.02.\n";
+ }
+@@ -77,7 +54,7 @@
+ $archname = $t[0];
+ };
+ if ($^O =~ /(linux|bsd)/i && (!$archname ||$archname =~ /(i[3456x]86|x86_64|amd64)/i)) {
+- foreach (qw/dmidecode lspci/) {
++ foreach (qw/dmidecode pcictl/) {
+ if (!can_run($_)) {
+ print "\n";
+ print "[WARNING] $_ is needed if you want a complet inventory on x86 and AMD64/x86_64.\n";
diff --git a/net/ocsinventory-agent/patches/patch-ad b/net/ocsinventory-agent/patches/patch-ad
new file mode 100644
index 00000000000..6e050bbe78d
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-ad
@@ -0,0 +1,31 @@
+$NetBSD: patch-ad,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- /dev/null 2009-06-25 18:52:46.000000000 +0200
++++ ./lib/Ocsinventory/Agent/Backend/OS/BSD/Pcictl/Controllers.pm 2009-06-25 18:50:23.000000000 +0200
+@@ -0,0 +1,26 @@
++package Ocsinventory::Agent::Backend::OS::BSD::Pcictl::Controllers;
++use strict;
++use Ocsinventory::Agent::Backend::OS::BSD::Pcictl::Pcictl;
++
++sub run {
++ my $params = shift;
++ my $inventory = $params->{inventory};
++
++ foreach (runpcictl()) {
++ if ($_ =~ m/^\S+:\s(.+)\s\(([^,]+)(,.+)?\)$/i) {
++ my $name = $1;
++ my $manufacturer = "";
++ my $type = $2;
++ $manufacturer =~ s/\ *$//; # clean up the end of the string
++
++ $inventory->addController({
++ 'NAME' => $name,
++ 'MANUFACTURER' => $manufacturer,
++ 'TYPE' => $type,
++ });
++ }
++ }
++
++}
++
++1
diff --git a/net/ocsinventory-agent/patches/patch-ae b/net/ocsinventory-agent/patches/patch-ae
new file mode 100644
index 00000000000..d808b245a20
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-ae
@@ -0,0 +1,27 @@
+$NetBSD: patch-ae,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- /dev/null 2009-06-25 18:52:46.000000000 +0200
++++ ./lib/Ocsinventory/Agent/Backend/OS/BSD/Pcictl/Sounds.pm 2009-06-25 18:50:29.000000000 +0200
+@@ -0,0 +1,22 @@
++package Ocsinventory::Agent::Backend::OS::BSD::Pcictl::Sounds;
++use strict;
++use Ocsinventory::Agent::Backend::OS::BSD::Pcictl::Pcictl;
++
++sub run {
++ my $params = shift;
++ my $inventory = $params->{inventory};
++
++ foreach (runpcictl()) {
++
++ if(/audio/i && /^\S+:\s(.+)\s\(([^,]+)(,.+)?\)$/i) {
++
++ $inventory->addSounds({
++ 'DESCRIPTION' => $2,
++ 'MANUFACTURER' => "",
++ 'NAME' => $1,
++ });
++
++ }
++ }
++}
++1
diff --git a/net/ocsinventory-agent/patches/patch-af b/net/ocsinventory-agent/patches/patch-af
new file mode 100644
index 00000000000..666e9ce9409
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-af
@@ -0,0 +1,29 @@
+$NetBSD: patch-af,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- /dev/null 2009-06-25 18:52:46.000000000 +0200
++++ ./lib/Ocsinventory/Agent/Backend/OS/BSD/Pcictl/Modems.pm 2009-06-25 18:50:26.000000000 +0200
+@@ -0,0 +1,24 @@
++package Ocsinventory::Agent::Backend::OS::BSD::Pcictl::Modems;
++use strict;
++use Ocsinventory::Agent::Backend::OS::BSD::Pcictl::Pcictl;
++
++sub run {
++ my $params = shift;
++ my $inventory = $params->{inventory};
++
++ foreach (runpcictl()) {
++
++ if(/modem/i && /^\S+:\s(.+)\s\(([^,]+)(,.+)?\)$/i) {
++ my $name = $1;
++ my $description = $2;
++
++
++ $inventory->addModems({
++ 'DESCRIPTION' => $description,
++ 'NAME' => $name,
++ });
++ }
++ }
++}
++
++1
diff --git a/net/ocsinventory-agent/patches/patch-ag b/net/ocsinventory-agent/patches/patch-ag
new file mode 100644
index 00000000000..1abc0f91f4d
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-ag
@@ -0,0 +1,26 @@
+$NetBSD: patch-ag,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- /dev/null 2009-06-25 18:52:46.000000000 +0200
++++ ./lib/Ocsinventory/Agent/Backend/OS/BSD/Pcictl/Videos.pm 2009-06-25 18:50:37.000000000 +0200
+@@ -0,0 +1,21 @@
++package Ocsinventory::Agent::Backend::OS::BSD::Pcictl::Videos;
++use strict;
++use Ocsinventory::Agent::Backend::OS::BSD::Pcictl::Pcictl;
++
++sub run {
++ my $params = shift;
++ my $inventory = $params->{inventory};
++
++ foreach (runpcictl()) {
++
++ if(/graphics|vga|video|display/i && /^\S+:\s(.+)\s\(([^,]+)(,.+)?\)$/i) {
++
++ $inventory->addVideos({
++ 'CHIPSET' => $1,
++ 'NAME' => $2,
++ });
++
++ }
++ }
++}
++1
diff --git a/net/ocsinventory-agent/patches/patch-ah b/net/ocsinventory-agent/patches/patch-ah
new file mode 100644
index 00000000000..8c55397ffd6
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-ah
@@ -0,0 +1,27 @@
+$NetBSD: patch-ah,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- /dev/null 2009-06-25 18:52:46.000000000 +0200
++++ ./lib/Ocsinventory/Agent/Backend/OS/BSD/Pcictl.pm 2009-06-25 18:43:12.000000000 +0200
+@@ -0,0 +1,22 @@
++package Ocsinventory::Agent::Backend::OS::BSD::Pcictl;
++use strict;
++
++sub check {can_run("pcictl")}
++
++sub run {}
++
++sub runpcictl {
++ my @devices;
++ opendir DEV, "/dev" or die "can't open /dev";
++ while (my $file = readdir DEV) {
++ if ($file =~ m/^pci[0-9]+$/) {
++ foreach (`pcictl $file list`) {
++ chop $_;
++ push @devices, $_;
++ }
++ }
++ }
++ return @devices;
++}
++
++1;
diff --git a/net/ocsinventory-agent/patches/patch-ai b/net/ocsinventory-agent/patches/patch-ai
new file mode 100644
index 00000000000..98bd1dd7efc
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-ai
@@ -0,0 +1,26 @@
+$NetBSD: patch-ai,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- /dev/null 2009-06-25 18:59:27.000000000 +0200
++++ ./lib/Ocsinventory/Agent/Backend/OS/BSD/Pcictl/Pcictl.pm 2009-06-25 18:59:02.000000000 +0200
+@@ -0,0 +1,21 @@
++package Ocsinventory::Agent::Backend::OS::BSD::Pcictl::Pcictl;
++require Exporter;
++@ISA = qw(Exporter);
++@EXPORT = qw(runpcictl);
++use strict;
++
++sub runpcictl {
++ my @devices;
++ opendir DEV, "/dev" or die "can't open /dev";
++ while (my $file = readdir DEV) {
++ if ($file =~ m/^pci[0-9]+$/) {
++ foreach (`pcictl $file list 2>/dev/null`) {
++ chop $_;
++ push @devices, $_;
++ }
++ }
++ }
++ return @devices;
++}
++
++1;
diff --git a/net/ocsinventory-agent/patches/patch-aj b/net/ocsinventory-agent/patches/patch-aj
new file mode 100644
index 00000000000..157a0364bb2
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-aj
@@ -0,0 +1,19 @@
+$NetBSD: patch-aj,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- lib/Ocsinventory/Agent/Backend/OS/BSD/Archs/Alpha.pm.orig 2009-07-30 15:47:09.000000000 +0200
++++ lib/Ocsinventory/Agent/Backend/OS/BSD/Archs/Alpha.pm 2009-07-30 15:52:08.000000000 +0200
+@@ -33,9 +33,11 @@
+ # FreeBSD: AlphaStation 255 4/232, 232MHz
+ # CPU: EV45 (21064A) major=6 minor=2
+
+- for (`dmesg`) {
+- if (/^cpu[^:]*:\s*(.*)$/i) { $processort = $1; }
+- if (/$SystemModel,\s*(\S+)\s*MHz.*$/) { $processors = $1; }
++ if ( -r "/var/run/dmesg.boot") {
++ for (`cat /var/run/dmesg.boot`) {
++ if (/^cpu[^:]*:\s*(.*)$/i) { $processort = $1; }
++ if (/$SystemModel,\s*(\S+)\s*MHz.*$/) { $processors = $1; }
++ }
+ }
+
+
diff --git a/net/ocsinventory-agent/patches/patch-ak b/net/ocsinventory-agent/patches/patch-ak
new file mode 100644
index 00000000000..f0cb6f0fb33
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-ak
@@ -0,0 +1,29 @@
+$NetBSD: patch-ak,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- lib/Ocsinventory/Agent/Backend/OS/BSD/Archs/I386.pm.orig 2009-07-30 15:47:09.000000000 +0200
++++ lib/Ocsinventory/Agent/Backend/OS/BSD/Archs/I386.pm 2009-07-30 15:52:59.000000000 +0200
+@@ -29,14 +29,16 @@
+ # proc type with sysctl (hw.model)
+ chomp($processort=`sysctl -n hw.model`);
+ # XXX quick and dirty _attempt_ to get proc speed through dmesg
+- for(`dmesg`){
+- my $tmp;
+- if (/^cpu\S*\s.*\D[\s|\(]([\d|\.]+)[\s|-]mhz/i) { # XXX unsure
+- $tmp = $1;
+- $tmp =~ s/\..*//;
+- $processors=$tmp;
+- last
+- }
++ if ( -r "/var/run/dmesg.boot") {
++ for(`cat /var/run/dmesg.boot`){
++ my $tmp;
++ if (/^cpu\S*\s.*\D[\s|\(]([\d|\.]+)[\s|-]mhz/i) { # XXX unsure
++ $tmp = $1;
++ $tmp =~ s/\..*//;
++ $processors=$tmp;
++ last
++ }
++ }
+ }
+
+ # Writing data
diff --git a/net/ocsinventory-agent/patches/patch-al b/net/ocsinventory-agent/patches/patch-al
new file mode 100644
index 00000000000..f7b896f48a6
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-al
@@ -0,0 +1,21 @@
+$NetBSD: patch-al,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- lib/Ocsinventory/Agent/Backend/OS/BSD/Archs/Sgimips.pm.orig 2009-07-30 15:47:09.000000000 +0200
++++ lib/Ocsinventory/Agent/Backend/OS/BSD/Archs/Sgimips.pm 2009-07-30 15:53:34.000000000 +0200
+@@ -45,10 +45,12 @@
+ # cpu0 at mainbus0: MIPS R5000 CPU rev 2.1 180 MHz with R5000 based FPC rev 1.0
+ # cpu0: cache L1-I 32KB D 32KB 2 way, L2 512KB direct
+
+- for (`dmesg`) {
+- if (/$SystemModel\s*\[\S*\s*(\S*)\]/) { $SystemSerial = $1; }
+- if (/cpu0 at mainbus0:\s*(.*)$/) { $processort = $1; }
+- if (/CPU\s*.*\D(\d+)\s*MHz/) { $processors = $1; }
++ if ( -r "/var/run/dmesg.boot") {
++ for (`cat /var/run/dmesg.boot`) {
++ if (/$SystemModel\s*\[\S*\s*(\S*)\]/) { $SystemSerial = $1; }
++ if (/cpu0 at mainbus0:\s*(.*)$/) { $processort = $1; }
++ if (/CPU\s*.*\D(\d+)\s*MHz/) { $processors = $1; }
++ }
+ }
+
+ # number of procs with sysctl (hw.ncpu)
diff --git a/net/ocsinventory-agent/patches/patch-am b/net/ocsinventory-agent/patches/patch-am
new file mode 100644
index 00000000000..3c2d804363c
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-am
@@ -0,0 +1,19 @@
+$NetBSD: patch-am,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- lib/Ocsinventory/Agent/Backend/OS/BSD/Archs/Sparc.pm.orig 2009-07-30 15:47:09.000000000 +0200
++++ lib/Ocsinventory/Agent/Backend/OS/BSD/Archs/Sparc.pm 2009-07-30 15:54:21.000000000 +0200
+@@ -52,9 +52,11 @@
+ # c) FreeBSD
+ # cpu0: Sun Microsystems UltraSparc-I Processor (167.00 MHz CPU)
+
+- for (`dmesg`) {
+- if (/^mainbus0 \(root\):\s*(.*)$/) { $SystemModel = $1; }
+- if (/^cpu[^:]*:\s*(.*)$/i) { $processort = $1 unless $processort; }
++ if ( -r "/var/run/dmesg.boot") {
++ for(`cat /var/run/dmesg.boot`){
++ if (/^mainbus0 \(root\):\s*(.*)$/) { $SystemModel = $1; }
++ if (/^cpu[^:]*:\s*(.*)$/i) { $processort = $1 unless $processort; }
++ }
+ }
+ $SystemModel || chomp ($SystemModel = `sysctl -n hw.model`); # for FreeBSD
+ $SystemManufacturer = "SUN";
diff --git a/net/ocsinventory-agent/patches/patch-an b/net/ocsinventory-agent/patches/patch-an
new file mode 100644
index 00000000000..efd66622c2c
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-an
@@ -0,0 +1,21 @@
+$NetBSD: patch-an,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- lib/Ocsinventory/Agent/Backend/OS/BSD/Storages.pm.orig 2009-07-30 16:04:02.000000000 +0200
++++ lib/Ocsinventory/Agent/Backend/OS/BSD/Storages.pm 2009-07-30 16:04:06.000000000 +0200
+@@ -19,10 +19,12 @@
+ }
+ for my $dev (@devices) {
+ my ($model,$capacity,$found, $manufacturer);
+- for(`dmesg`){
+- if(/^$dev/) { $found = 1;}
+- if(/^$dev.*<(.*)>/) { $model = $1; }
+- if(/^$dev.*\s+(\d+)\s*MB/) { $capacity = $1;}
++ if ( -r "/var/run/dmesg.boot") {
++ for (`cat /var/run/dmesg.boot`) {
++ if(/^$dev/) { $found = 1;}
++ if(/^$dev.*<(.*)>/) { $model = $1; }
++ if(/^$dev.*\s+(\d+)\s*MB/) { $capacity = $1;}
++ }
+ }
+
+ if ($model =~ s/^(SGI|SONY|WDC|ASUS|LG|TEAC|SAMSUNG|PHILIPS|PIONEER|MAXTOR|PLEXTOR|SEAGATE|IBM|SUN|SGI|DEC|FUJITSU|TOSHIBA|YAMAHA|HITACHI|VERITAS)\s*//i) {
diff --git a/net/ocsinventory-agent/patches/patch-ao b/net/ocsinventory-agent/patches/patch-ao
new file mode 100644
index 00000000000..9de771fa088
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-ao
@@ -0,0 +1,17 @@
+$NetBSD: patch-ao,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+--- lib/Ocsinventory/Agent/Backend/OS/Generic/Lspci.pm.orig 2009-08-16 17:53:53.000000000 +0200
++++ lib/Ocsinventory/Agent/Backend/OS/Generic/Lspci.pm 2009-08-16 17:59:58.000000000 +0200
+@@ -1,7 +1,11 @@
+ package Ocsinventory::Agent::Backend::OS::Generic::Lspci;
+ use strict;
+
+-sub check {can_run("lspci")}
++sub check {
++ return if can_run("pcictl");
++ return unless can_run("lspci");
++ 1;
++}
+
+
+ sub run {}