pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/ocsinventory-agent Import ocsinventory-agent 1.1.2...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e1b93ffa519d
branches:  trunk
changeset: 397629:e1b93ffa519d
user:      bouyer <bouyer%pkgsrc.org@localhost>
date:      Sun Aug 16 18:25:53 2009 +0000

description:
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:

 net/ocsinventory-agent/DESCR                        |   3 +
 net/ocsinventory-agent/Makefile                     |  76 +++++++++++++++++++++
 net/ocsinventory-agent/PLIST                        |   4 +
 net/ocsinventory-agent/distinfo                     |  20 +++++
 net/ocsinventory-agent/files/modules.conf           |  15 ++++
 net/ocsinventory-agent/files/ocsinventory-agent.cfg |   3 +
 net/ocsinventory-agent/patches/patch-aa             |  22 ++++++
 net/ocsinventory-agent/patches/patch-ab             |  15 ++++
 net/ocsinventory-agent/patches/patch-ac             |  59 ++++++++++++++++
 net/ocsinventory-agent/patches/patch-ad             |  31 ++++++++
 net/ocsinventory-agent/patches/patch-ae             |  27 +++++++
 net/ocsinventory-agent/patches/patch-af             |  29 ++++++++
 net/ocsinventory-agent/patches/patch-ag             |  26 +++++++
 net/ocsinventory-agent/patches/patch-ah             |  27 +++++++
 net/ocsinventory-agent/patches/patch-ai             |  26 +++++++
 net/ocsinventory-agent/patches/patch-aj             |  19 +++++
 net/ocsinventory-agent/patches/patch-ak             |  29 ++++++++
 net/ocsinventory-agent/patches/patch-al             |  21 +++++
 net/ocsinventory-agent/patches/patch-am             |  19 +++++
 net/ocsinventory-agent/patches/patch-an             |  21 +++++
 net/ocsinventory-agent/patches/patch-ao             |  17 ++++
 21 files changed, 509 insertions(+), 0 deletions(-)

diffs (truncated from 593 to 300 lines):

diff -r 90acbccc0a3d -r e1b93ffa519d net/ocsinventory-agent/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ocsinventory-agent/DESCR      Sun Aug 16 18:25:53 2009 +0000
@@ -0,0 +1,3 @@
+pen 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
diff -r 90acbccc0a3d -r e1b93ffa519d net/ocsinventory-agent/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ocsinventory-agent/Makefile   Sun Aug 16 18:25:53 2009 +0000
@@ -0,0 +1,76 @@
+# $NetBSD: Makefile,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+#
+
+DISTNAME=              OCSNG_UNIX_AGENT-1.02
+PKGNAME=               ocsinventory-agent-1.0.2
+CATEGORIES=            net
+MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=ocsinventory/}
+
+MAINTAINER=            bouyer%NetBSD.org@localhost
+HOMEPAGE=              http://www.ocsinventory-ng.org/
+COMMENT=               Keep track of the computers configuration and software
+
+PKG_SYSCONFSUBDIR=     ocsinventory
+
+DEPENDS+=              p5-libwww-[0-9]*:../../www/p5-libwww
+DEPENDS+=              p5-XML-Simple-[0-9]*:../../textproc/p5-XML-Simple
+DEPENDS+=              p5-Net-IP-[0-9]*:../../net/p5-Net-IP
+DEPENDS+=              p5-Proc-Daemon-[0-9]*:../../devel/p5-Proc-Daemon
+.if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "x86_64")
+DEPENDS+=              dmidecode-[0-9]*:../../sysutils/dmidecode
+.endif
+
+WRKSRC=                        ${WRKDIR}/Ocsinventory-Agent-1.0.1
+
+BUILD_DEFS+=           VARBASE
+AUTO_MKDIRS=yes
+
+PKG_DESTDIR_SUPPORT=    user-destdir
+
+.include "../../mk/bsd.prefs.mk"
+
+EGDIR=                 ${PREFIX}/share/examples/ocsinventory-agent
+MAKE_DIRS_PERMS+=      ${VARBASE}/db/ocsinventory ${ROOT_USER} ${ROOT_GROUP} 0700
+CONF_FILES+=           ${EGDIR}/ocsinventory-agent.cfg ${PKG_SYSCONFDIR}/ocsinventory-agent.cfg
+CONF_FILES+=           ${EGDIR}/modules.conf ${PKG_SYSCONFDIR}/modules.conf
+
+USE_TOOLS+=    perl:run
+REPLACE_PERL+= tools/macosx/ocsng_app-xcode/main.pl
+REPLACE_PERL+= tools/macosx/scripts/create-darwin-perl-lib_fromCPAN.pl
+REPLACE_PERL+= ocsinventory-agent
+REPLACE_PERL+= postinst.pl
+
+SUBST_CLASSES+=                        sysconfdir path varbase apachevers
+SUBST_STAGE.sysconfdir=                post-patch
+SUBST_FILES.sysconfdir=                lib/Ocsinventory/Agent/Config.pm
+SUBST_FILES.sysconfdir+=       postinst.pl
+SUBST_SED.sysconfdir=          -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
+SUBST_MESSAGE.sysconfdir=      Fixing hardcoded install directory path.
+
+SUBST_STAGE.path=      post-patch
+SUBST_FILES.path=      lib/Ocsinventory/Agent/Common.pm
+SUBST_SED.path=                -e "s|/usr/local/bin|${PREFIX}/bin|g"
+SUBST_SED.path=                -e "s|/usr/local/sbin|${PREFIX}/sbin|g"
+SUBST_MESSAGE.path=    Fixing hardcoded path.
+
+PERL5_PACKLIST=         auto/Ocsinventory/Agent/.packlist
+
+pre-patch:
+       ${MKDIR} ${WRKSRC}/lib/Ocsinventory/Agent/Backend/OS/BSD/Pcictl
+
+post-build:
+       for file in ocsinventory-agent.cfg modules.conf; do \
+               ${SED} -e 's,@VARBASE@,${VARBASE},g' \
+                   < ${FILESDIR}/$$file > ${WRKDIR}/$$file; \
+       done
+
+post-install:
+       ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
+       for file in ocsinventory-agent.cfg modules.conf; do \
+               ${INSTALL_DATA} ${WRKDIR}/$$file ${DESTDIR}${EGDIR}; \
+       done
+       cd ${DESTDIR}${PREFIX}/bin && \
+           ${LN} -f -s ${PERL5_INSTALLVENDORBIN}/ocsinventory-agent .
+
+.include "../../lang/perl5/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 90acbccc0a3d -r e1b93ffa519d net/ocsinventory-agent/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ocsinventory-agent/PLIST      Sun Aug 16 18:25:53 2009 +0000
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+bin/ocsinventory-agent
+share/examples/ocsinventory-agent/ocsinventory-agent.cfg
+share/examples/ocsinventory-agent/modules.conf
diff -r 90acbccc0a3d -r e1b93ffa519d net/ocsinventory-agent/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ocsinventory-agent/distinfo   Sun Aug 16 18:25:53 2009 +0000
@@ -0,0 +1,20 @@
+$NetBSD: distinfo,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+
+SHA1 (OCSNG_UNIX_AGENT-1.02.tar.gz) = 92660745140d1526568a3c02b0b4d8c7286f5e3f
+RMD160 (OCSNG_UNIX_AGENT-1.02.tar.gz) = db3ee9df9d94114b7b6ce5dcd2f0e862729d6056
+Size (OCSNG_UNIX_AGENT-1.02.tar.gz) = 1392033 bytes
+SHA1 (patch-aa) = 5022b8b1f5e98c43f7da562412bd752956320f05
+SHA1 (patch-ab) = 04e70296c005a710f1b2470451c9872c7716ea26
+SHA1 (patch-ac) = 9be5237057924628cc4d24d7620270aa9a8fd459
+SHA1 (patch-ad) = 5160c3ac8ae48eee578be50350c7c4ccfe74b045
+SHA1 (patch-ae) = b801ad35b3bf13323e27fe6ebf638e295aa7771d
+SHA1 (patch-af) = 8d156a6266ca6c2a7f0d8831585c9ce4e0944394
+SHA1 (patch-ag) = 3c624216445c9df1437d29c2077a39bcde3d6653
+SHA1 (patch-ah) = 17316f3404d0022914c7847d160d9083ba504a22
+SHA1 (patch-ai) = c97f568da9a4df6f241b0dff0b60f2f552b3c88e
+SHA1 (patch-aj) = 24366023199877bb93816d88c4ebf89a4ea2a6f2
+SHA1 (patch-ak) = ac2be46bfdf29ddd2cf4deb051eed201cd5ebbdf
+SHA1 (patch-al) = dd2ffdd4e9470677c5f0c622ae8e3c5a925843ac
+SHA1 (patch-am) = 376f95a684729ce32ded34a1a62d8ef300e52529
+SHA1 (patch-an) = 4b1e91e7f1719c84782f541cb3abc6e39f6b94e6
+SHA1 (patch-ao) = 87c6edc945e90d990d3db28687113189a723852b
diff -r 90acbccc0a3d -r e1b93ffa519d net/ocsinventory-agent/files/modules.conf
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ocsinventory-agent/files/modules.conf Sun Aug 16 18:25:53 2009 +0000
@@ -0,0 +1,15 @@
+# $NetBSD: modules.conf,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
+# this list of module will be load by the at run time
+# to check its syntax do:
+# #perl modules.conf
+# You must have NO error. Else the content will be ignored
+# This mechanism goal it to keep compatibility with 'plugin'
+# created for the previous linux_agent.
+# The new unified_agent have its own extension system that allow
+# user to add new information easily.
+
+# This enables OCS-Inventory software deployment feature
+#use Ocsinventory::Agent::Option::Download;
+
+# DO NOT REMOVE THE 1;
+1;
diff -r 90acbccc0a3d -r e1b93ffa519d net/ocsinventory-agent/files/ocsinventory-agent.cfg
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ocsinventory-agent/files/ocsinventory-agent.cfg       Sun Aug 16 18:25:53 2009 +0000
@@ -0,0 +1,3 @@
+basevardir=/var/lib/ocsinventory-agent
+server=http://my.ocs.server/ocsinventory
+
diff -r 90acbccc0a3d -r e1b93ffa519d net/ocsinventory-agent/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ocsinventory-agent/patches/patch-aa   Sun Aug 16 18:25:53 2009 +0000
@@ -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 -r 90acbccc0a3d -r e1b93ffa519d net/ocsinventory-agent/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ocsinventory-agent/patches/patch-ab   Sun Aug 16 18:25:53 2009 +0000
@@ -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 -r 90acbccc0a3d -r e1b93ffa519d net/ocsinventory-agent/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ocsinventory-agent/patches/patch-ac   Sun Aug 16 18:25:53 2009 +0000
@@ -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 -r 90acbccc0a3d -r e1b93ffa519d net/ocsinventory-agent/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ocsinventory-agent/patches/patch-ad   Sun Aug 16 18:25:53 2009 +0000
@@ -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 -r 90acbccc0a3d -r e1b93ffa519d net/ocsinventory-agent/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ocsinventory-agent/patches/patch-ae   Sun Aug 16 18:25:53 2009 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index