diff --git a/lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Softwares/Deb.pm b/lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Softwares/Deb.pm index 7e1310b3ea..cdc7b7a128 100644 --- a/lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Softwares/Deb.pm +++ b/lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Softwares/Deb.pm @@ -18,6 +18,7 @@ sub doInventory { my $command = 'dpkg-query --show --showformat=\'' . '${Package}\t' . + '${Architecture}\t' . '${Version}\t'. '${Installed-Size}\t' . '${Description}\n' . @@ -48,9 +49,10 @@ sub _getPackagesList { my @infos = split("\t", $line); push @packages, { NAME => $infos[0], - VERSION => $infos[1], - FILESIZE => $infos[2], - COMMENTS => $infos[3], + ARCH => $infos[1], + VERSION => $infos[2], + FILESIZE => $infos[3], + COMMENTS => $infos[4], FROM => 'deb' }; } diff --git a/lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Softwares/RPM.pm b/lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Softwares/RPM.pm index 68434a9f83..14ef3b99bd 100644 --- a/lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Softwares/RPM.pm +++ b/lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Softwares/RPM.pm @@ -18,6 +18,7 @@ sub doInventory { my $command = 'rpm -qa --queryformat \'' . '%{NAME}\t' . + '%{ARCH}\t' . '%{VERSION}-%{RELEASE}\t' . '%{INSTALLTIME:date}\t' . '%{SIZE}\t' . @@ -48,11 +49,12 @@ sub _getPackagesList { my @infos = split("\t", $line); push @packages, { NAME => $infos[0], - VERSION => $infos[1], - INSTALLDATE => $infos[2], - FILESIZE => $infos[3], - PUBLISHER => $infos[4], - COMMENTS => $infos[5], + ARCH => $infos[1], + VERSION => $infos[2], + INSTALLDATE => $infos[3], + FILESIZE => $infos[4], + PUBLISHER => $infos[5], + COMMENTS => $infos[6], FROM => 'rpm' }; } diff --git a/resources/linux/packaging/dpkg b/resources/linux/packaging/dpkg index 8f893290ab..5dc6c61853 100644 --- a/resources/linux/packaging/dpkg +++ b/resources/linux/packaging/dpkg @@ -1,19 +1,4 @@ -acpi-support-base 0.109-11 88 scripts for handling base ACPI events such as the power button - This package contains scripts to react to various base ACPI events - such as the power button. For more extensive ACPI support, including support - for suspend-to-RAM and for various laptop features, install the package - "acpi-support". -acpid 1.0.8-1lenny2 196 Utilities for using ACPI power management - Modern computers support the Advanced Configuration and Power Interface (ACPI) - to allow intelligent power management on your system and to query battery and - configuration status. - . - ACPID is a completely flexible, totally extensible daemon for delivering - ACPI events. It listens on a file (/proc/acpi/event) and when an event - occurs, executes programs to handle the event. The programs it executes - are configured through a set of configuration files, which can be - dropped into place by packages or by the admin. -adduser 3.110 944 add and remove users and groups +adduser all 3.112+nmu2 1228 add and remove users and groups This package includes the 'adduser' and 'deluser' commands for creating and removing users. . @@ -34,30 +19,126 @@ adduser 3.110 944 add and remove users and groups . Development mailing list: http://lists.alioth.debian.org/mailman/listinfo/adduser-devel/ -apt 0.7.20.2+lenny2 4652 Advanced front-end for dpkg +anthy-common all 9100h-6 13068 input method for Japanese - common files and dictionary + Anthy is a Japanese input method working on X11 and Emacs. It converts + hiragana text to mixed kana and kanji. It is implemented as a library + and stores private information securely in ~/.anthy/. + Thus, Anthy is simple and secure (information is protected from + spoofing and snooping). + . + This package provides common files dictonary data for anthy. +apache2 amd64 2.2.16-6+squeeze6 36 Apache HTTP Server metapackage + The Apache Software Foundation's goal is to build a secure, efficient and + extensible HTTP server as standards-compliant open source software. The + result has long been the number one web server on the Internet. + . + It features support for HTTPS, virtual hosting, CGI, SSI, IPv6, easy + scripting and database integration, request/response filtering, many + flexible authentication schemes, and more. +apache2-mpm-prefork amd64 2.2.16-6+squeeze6 68 Apache HTTP Server - traditional non-threaded model + Each Apache Multi-Processing Module provides a different "flavor" of + web server binary, compiled with a different processing model. + . + The prefork MPM provides a non-threaded, pre-forking implementation + that handles requests in a manner similar to Apache 1.3. It is not as + fast as threaded models, but is considered to be more stable. It is + appropriate for sites that need to maintain compatibility with + non-thread-safe libraries, and is the best MPM for isolating each + request, so that a problem with a single request will not affect any + other. +apache2-utils amd64 2.2.16-6+squeeze6 384 utility programs for webservers + Provides some add-on programs useful for any webserver. These include: + - ab (Apache benchmark tool) + - logresolve (Resolve IP addresses to hostname in logfiles) + - htpasswd (Manipulate basic authentication files) + - htdigest (Manipulate digest authentication files) + - dbmmanage (Manipulate basic authentication files in DBM format, using perl) + - htdbm (Manipulate basic authentication files in DBM format, using APR) + - rotatelogs (Periodically stop writing to a logfile and open a new one) + - split-logfile (Split a single log including multiple vhosts) + - checkgid (Checks whether the caller can setgid to the specified group) + - check_forensic (Extract mod_log_forensic output from Apache log files) +apache2.2-bin amd64 2.2.16-6+squeeze6 3856 Apache HTTP Server common binary files + The Apache Software Foundation's goal is to build a secure, efficient and + extensible HTTP server as standards-compliant open source software. The + result has long been the number one web server on the Internet. + . + This package contains all binaries but no configuration or support scripts. + To get a stand-alone server, you need to install one of the apache2-mpm-* + packages, such as worker or prefork. Other packages like gnome-user-share + may bring their own Apache configuration, though. +apache2.2-common amd64 2.2.16-6+squeeze6 2144 Apache HTTP Server common files + The Apache Software Foundation's goal is to build a secure, efficient and + extensible HTTP server as standards-compliant open source software. The + result has long been the number one web server on the Internet. + . + This package contains the configuration and support scripts. + However, it does *not* include the server itself; for this you need to + install one of the apache2-mpm-* packages, such as worker or prefork. +apt amd64 0.8.10.3+squeeze1 5644 Advanced front-end for dpkg This is Debian's next generation front-end for the dpkg package manager. It provides the apt-get utility and APT dselect method that provides a simpler, safer way to install and upgrade packages. . APT features complete installation ordering, multiple source capability and several other unique features, see the Users Guide in apt-doc. -apt-utils 0.7.20.2+lenny2 396 APT utility programs +apt-utils amd64 0.8.10.3+squeeze1 540 APT utility programs This package contains some APT utility programs such as apt-ftparchive, apt-sortpkgs and apt-extracttemplates. . apt-extracttemplates is used by debconf to prompt for configuration questions before installation. apt-ftparchive is used to create Package and other index files. apt-sortpkgs is a Package/Source file normalizer. -aptitude 0.4.11.11-1~lenny1 9808 terminal-based package manager - aptitude is a terminal-based package manager with a number of useful - features, including: a mutt-like syntax for matching packages in a - flexible manner, dselect-like persistence of user actions, the - ability to retrieve and display the Debian changelog of most - packages, and a command-line mode similar to that of apt-get. +apt-xapian-index all 0.41 376 maintenance and search tools for a Xapian index of Debian packages + This package provides update-apt-xapian-index, a tool to maintan a Xapian + index of Debian package information in /var/lib/apt-xapian-index, and + axi-search, a command line search tool that uses the index. + . + axi-cache allows to search packages very quickly, and it also interfaces with + the shell command line completion in a smart way, providing context-sensitive + keyword and tag suggestions even before the search command is actually run. + . + update-apt-xapian-index allows plugins to be installed in + /usr/share/apt-xapian-index to index all sorts of extra information, such as + Debtags tags, popcon information, package ratings and anything else that would + fit. + . + The index generated by update-apt-xapian-index is self-documenting, as it + contains an autogenerated README file with information on the index layout and + all the data that can be found in it. +aptitude amd64 0.6.3-3.2+squeeze1 11916 terminal-based package manager (terminal interface only) + aptitude is a package manager with a number of useful features, + including: a mutt-like syntax for matching packages in a flexible + manner, dselect-like persistence of user actions, the ability to + retrieve and display the Debian changelog of most packages, and a + command-line mode similar to that of apt-get. . aptitude is also Y2K-compliant, non-fattening, naturally cleansing, and housebroken. -at 3.1.10.2 220 Delayed job execution and batch processing + . + This package contains a version of aptitude compiled with only the + classic terminal-based interface (using curses). For an experimental + graphical interface, see the package aptitude-gtk. +aspell amd64 0.60.6-4 1184 GNU Aspell spell-checker + GNU Aspell is a spell-checker which can be used either as a standalone + application or embedded in other programs. Its main feature is that it + does a much better job of suggesting possible spellings than just about + any other spell-checker available for the English language, including + Ispell and Microsoft Word. It also has many other technical + enhancements over Ispell such as using shared memory for dictionaries + and intelligently handling personal dictionaries when more than one + Aspell process is open at once. + . + Aspell is designed to be a drop-in replacement for Ispell. +aspell-en all 6.0-0-6 548 English dictionary for GNU Aspell + This package contains all the required files to add support for English + language to the GNU Aspell spell checker. + . + American, British and Canadian spellings are included. +aspell-fr all 0.50-3-7 636 French dictionary for aspell + This package contains all the required files to add support + for French language to aspell spell checker. +at amd64 3.1.12-1 220 Delayed job execution and batch processing At and batch read shell commands from standard input storing them as a job to be scheduled for execution in the future. diff --git a/resources/linux/packaging/rpm b/resources/linux/packaging/rpm index 418e62842e..ba778416d9 100644 --- a/resources/linux/packaging/rpm +++ b/resources/linux/packaging/rpm @@ -1,4 +1,10 @@ -specspo 13-1.el5 Wed Dec 22 23:26:02 2010 20486218 Red Hat, Inc. Fedora package descriptions, summaries, and groups. -mktemp 1.5-23.2.2 Wed Dec 22 23:26:17 2010 15712 Red Hat, Inc. A small utility for safely making /tmp files. -libICE 1.0.1-2.1 Wed Dec 22 23:26:18 2010 111181 Red Hat, Inc. X.Org X11 libICE runtime library -nspr 4.7.3-2.el5 Wed Dec 22 23:26:22 2010 253512 Red Hat, Inc. Netscape Portable Runtime +libpciaccess0 i586 0.12.1-1.mga1 mar. 19 juil. 2011 15:05:03 CEST 38452 Mageia.Org Generic PCI access library (from X.org) +firebird-devel x86_64 2.5.1.26351.0-3.mga2 lun. 09 janv. 2012 09:24:00 CET 351554 Mageia.Org Development Libraries for Firebird SQL Database +gjs x86_64 1.32.0-1.mga2 mar. 27 mars 2012 19:08:21 CEST 176167 Mageia.Org JavaScript bindings based on gobject-introspection +lib64nss3 x86_64 3.13.4-1.mga2 mer. 18 avril 2012 22:21:13 CEST 3346040 Mageia.Org Network Security Services (NSS) +ruby-term-ansicolor noarch 1.0.5-3.mga1 ven. 29 juil. 2011 13:12:10 CEST 7211 Mageia.Org Ruby library that colors strings using ANSI escape sequences +lib64tidy-devel x86_64 20090904-3.mga1 lun. 02 janv. 2012 13:12:46 CET 1930155 Mageia.Org Headers for developing programs that will use tidy +xfsprogs x86_64 3.1.8-1.mga2 dim. 25 mars 2012 00:45:24 CET 3628382 Mageia.Org Utilities for managing the XFS filesystem +lib64swresample0 x86_64 0.10.2-2.mga2.tainted jeu. 12 avril 2012 10:02:14 CEST 35016 Mageia.Org Shared library part of ffmpeg +lib64pyglib2.0_0 x86_64 2.28.6-6.mga2 jeu. 23 févr. 2012 10:25:31 CET 18672 Mageia.Org Python Glib bindings shared library +perl-Gtk2-ImageView x86_64 0.50.0-4.mga2 mar. 03 avril 2012 16:38:46 CEST 153539 Mageia Perl bindings to the GtkImageView image viewer widget diff --git a/t/inventory/linux/softwares.t b/t/inventory/linux/softwares.t index 661da0e2c2..d7b836b090 100755 --- a/t/inventory/linux/softwares.t +++ b/t/inventory/linux/softwares.t @@ -11,90 +11,225 @@ use FusionInventory::Agent::Task::Inventory::Input::Generic::Softwares::Gentoo; my $rpm_packages = [ { + PUBLISHER => 'Mageia.Org', + NAME => 'libpciaccess0', + COMMENTS => 'Generic PCI access library (from X.org)', + INSTALLDATE => 'mar. 19 juil. 2011 15:05:03 CEST', + FILESIZE => '38452', FROM => 'rpm', - PUBLISHER => 'Red Hat, Inc.', - NAME => 'specspo', - COMMENTS => 'Fedora package descriptions, summaries, and groups.', - INSTALLDATE => 'Wed Dec 22 23:26:02 2010', - VERSION => '13-1.el5', - FILESIZE => '20486218' + ARCH => 'i586', + VERSION => '0.12.1-1.mga1' }, { + PUBLISHER => 'Mageia.Org', + NAME => 'firebird-devel', + COMMENTS => 'Development Libraries for Firebird SQL Database', + INSTALLDATE => 'lun. 09 janv. 2012 09:24:00 CET', + FILESIZE => '351554', FROM => 'rpm', - PUBLISHER => 'Red Hat, Inc.', - NAME => 'mktemp', - COMMENTS => 'A small utility for safely making /tmp files.', - INSTALLDATE => 'Wed Dec 22 23:26:17 2010', - VERSION => '1.5-23.2.2', - FILESIZE => '15712' + ARCH => 'x86_64', + VERSION => '2.5.1.26351.0-3.mga2' }, { + PUBLISHER => 'Mageia.Org', + NAME => 'gjs', + COMMENTS => 'JavaScript bindings based on gobject-introspection', + INSTALLDATE => 'mar. 27 mars 2012 19:08:21 CEST', + FILESIZE => '176167', FROM => 'rpm', - PUBLISHER => 'Red Hat, Inc.', - NAME => 'libICE', - COMMENTS => 'X.Org X11 libICE runtime library', - INSTALLDATE => 'Wed Dec 22 23:26:18 2010', - VERSION => '1.0.1-2.1', - FILESIZE => '111181' + ARCH => 'x86_64', + VERSION => '1.32.0-1.mga2' }, { + PUBLISHER => 'Mageia.Org', + NAME => 'lib64nss3', + COMMENTS => 'Network Security Services (NSS)', + INSTALLDATE => 'mer. 18 avril 2012 22:21:13 CEST', + FILESIZE => '3346040', FROM => 'rpm', - PUBLISHER => 'Red Hat, Inc.', - NAME => 'nspr', - COMMENTS => 'Netscape Portable Runtime', - INSTALLDATE => 'Wed Dec 22 23:26:22 2010', - VERSION => '4.7.3-2.el5', - FILESIZE => '253512' + ARCH => 'x86_64', + VERSION => '3.13.4-1.mga2' + }, + { + PUBLISHER => 'Mageia.Org', + NAME => 'ruby-term-ansicolor', + COMMENTS => 'Ruby library that colors strings using ANSI escape sequences', + INSTALLDATE => 'ven. 29 juil. 2011 13:12:10 CEST', + FILESIZE => '7211', + FROM => 'rpm', + ARCH => 'noarch', + VERSION => '1.0.5-3.mga1' + }, + { + PUBLISHER => 'Mageia.Org', + NAME => 'lib64tidy-devel', + COMMENTS => 'Headers for developing programs that will use tidy', + INSTALLDATE => 'lun. 02 janv. 2012 13:12:46 CET', + FILESIZE => '1930155', + FROM => 'rpm', + ARCH => 'x86_64', + VERSION => '20090904-3.mga1' + }, + { + PUBLISHER => 'Mageia.Org', + NAME => 'xfsprogs', + COMMENTS => 'Utilities for managing the XFS filesystem', + INSTALLDATE => 'dim. 25 mars 2012 00:45:24 CET', + FILESIZE => '3628382', + FROM => 'rpm', + ARCH => 'x86_64', + VERSION => '3.1.8-1.mga2' + }, + { + PUBLISHER => 'Mageia.Org', + NAME => 'lib64swresample0', + COMMENTS => 'Shared library part of ffmpeg', + INSTALLDATE => 'jeu. 12 avril 2012 10:02:14 CEST', + FILESIZE => '35016', + FROM => 'rpm', + ARCH => 'x86_64', + VERSION => '0.10.2-2.mga2.tainted' + }, + { + PUBLISHER => 'Mageia.Org', + NAME => 'lib64pyglib2.0_0', + COMMENTS => 'Python Glib bindings shared library', + INSTALLDATE => 'jeu. 23 févr. 2012 10:25:31 CET', + FILESIZE => '18672', + FROM => 'rpm', + ARCH => 'x86_64', + VERSION => '2.28.6-6.mga2' + }, + { + PUBLISHER => 'Mageia', + NAME => 'perl-Gtk2-ImageView', + COMMENTS => 'Perl bindings to the GtkImageView image viewer widget', + INSTALLDATE => 'mar. 03 avril 2012 16:38:46 CEST', + FILESIZE => '153539', + FROM => 'rpm', + ARCH => 'x86_64', + VERSION => '0.50.0-4.mga2' } ]; my $deb_packages = [ { FROM => 'deb', - NAME => 'acpi-support-base', - COMMENTS => 'scripts for handling base ACPI events such as the power button', - VERSION => '0.109-11', - FILESIZE => '88' + NAME => 'adduser', + COMMENTS => 'add and remove users and groups', + ARCH => 'all', + VERSION => '3.112+nmu2', + FILESIZE => '1228' }, { FROM => 'deb', - NAME => 'acpid', - COMMENTS => 'Utilities for using ACPI power management', - VERSION => '1.0.8-1lenny2', - FILESIZE => '196' + NAME => 'anthy-common', + COMMENTS => 'input method for Japanese - common files and dictionary', + ARCH => 'all', + VERSION => '9100h-6', + FILESIZE => '13068' }, { FROM => 'deb', - NAME => 'adduser', - COMMENTS => 'add and remove users and groups', - VERSION => '3.110', - FILESIZE => '944' + NAME => 'apache2', + COMMENTS => 'Apache HTTP Server metapackage', + ARCH => 'amd64', + VERSION => '2.2.16-6+squeeze6', + FILESIZE => '36' + }, + { + FROM => 'deb', + NAME => 'apache2-mpm-prefork', + COMMENTS => 'Apache HTTP Server - traditional non-threaded model', + ARCH => 'amd64', + VERSION => '2.2.16-6+squeeze6', + FILESIZE => '68' + }, + { + FROM => 'deb', + NAME => 'apache2-utils', + COMMENTS => 'utility programs for webservers', + ARCH => 'amd64', + VERSION => '2.2.16-6+squeeze6', + FILESIZE => '384' + }, + { + FROM => 'deb', + NAME => 'apache2.2-bin', + COMMENTS => 'Apache HTTP Server common binary files', + ARCH => 'amd64', + VERSION => '2.2.16-6+squeeze6', + FILESIZE => '3856' + }, + { + FROM => 'deb', + NAME => 'apache2.2-common', + COMMENTS => 'Apache HTTP Server common files', + ARCH => 'amd64', + VERSION => '2.2.16-6+squeeze6', + FILESIZE => '2144' }, { FROM => 'deb', NAME => 'apt', COMMENTS => 'Advanced front-end for dpkg', - VERSION => '0.7.20.2+lenny2', - FILESIZE => '4652' + ARCH => 'amd64', + VERSION => '0.8.10.3+squeeze1', + FILESIZE => '5644' }, { FROM => 'deb', NAME => 'apt-utils', COMMENTS => 'APT utility programs', - VERSION => '0.7.20.2+lenny2', - FILESIZE => '396' + ARCH => 'amd64', + VERSION => '0.8.10.3+squeeze1', + FILESIZE => '540' + }, + { + FROM => 'deb', + NAME => 'apt-xapian-index', + COMMENTS => 'maintenance and search tools for a Xapian index of Debian packages', + ARCH => 'all', + VERSION => '0.41', + FILESIZE => '376' }, { FROM => 'deb', NAME => 'aptitude', - COMMENTS => 'terminal-based package manager', - VERSION => '0.4.11.11-1~lenny1', - FILESIZE => '9808' + COMMENTS => 'terminal-based package manager (terminal interface only)', + ARCH => 'amd64', + VERSION => '0.6.3-3.2+squeeze1', + FILESIZE => '11916' + }, + { + FROM => 'deb', + NAME => 'aspell', + COMMENTS => 'GNU Aspell spell-checker', + ARCH => 'amd64', + VERSION => '0.60.6-4', + FILESIZE => '1184' + }, + { + FROM => 'deb', + NAME => 'aspell-en', + COMMENTS => 'English dictionary for GNU Aspell', + ARCH => 'all', + VERSION => '6.0-0-6', + FILESIZE => '548' + }, + { + FROM => 'deb', + NAME => 'aspell-fr', + COMMENTS => 'French dictionary for aspell', + ARCH => 'all', + VERSION => '0.50-3-7', + FILESIZE => '636' }, { FROM => 'deb', NAME => 'at', COMMENTS => 'Delayed job execution and batch processing', - VERSION => '3.1.10.2', + ARCH => 'amd64', + VERSION => '3.1.12-1', FILESIZE => '220' } ];