#global gitver a7532c0 #global prever _beta1 Name: fusioninventory-agent Summary: FusionInventory agent Summary(fr): Agent FusionInventory Group: Applications/System License: GPLv2+ URL: http://fusioninventory.org/ Version: 2.1.8 %if 0%{?gitver:1} Release: 2.git%{gitver}%{?dist} # From http://github.com/fusinv/fusioninventory-agent/tarball/master Source0: fusinv-fusioninventory-agent-2.1-48-ga7532c0.tar.gz %else Release: 2 Source0: http://search.cpan.org/CPAN/authors/id/F/FU/FUSINV/FusionInventory-Agent-%{version}%{?prever}.tar.gz %endif Source1: %{name}.cron Source2: %{name}.init # See http://forge.fusioninventory.org/issues/636 # revert this change which break compatibility with previous version Patch0: %{name}-revert.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl(Module::Install) # For tests BuildRequires: perl(Time::HiRes) perl(XML::Simple) perl(UNIVERSAL::require) perl(Test::More) # for fedora repo : %if 0%{?fedora}>= 12 || 0%{?rhel} >= 5 BuildRequires: perl(XML::TreePP) # %endif %if 0%{?fedora} >= 11 BuildRequires: perl(Test::Compile) %endif Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: perl(LWP) perl(Net::IP) perl(HTTP::Status) perl(Net::SSLeay) perl(Crypt::SSLeay) Requires: perl(Proc::Daemon) perl(Proc::PID::File) # Not yet available in EPEL ... Requires: perl(Archive::Extract) %if %{?fedora}%{?rhel} > 4 Requires: perl(Net::CUPS) %endif Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig, /sbin/service Requires(postun): /sbin/service %if 0%{?fedora} >= 11 || 0%{?rhel} >= 6 # This work only on recent fedora %{?filter_setup: %filter_from_requires /perl(Win32/d %?perl_default_filter } %else %{?perl_default_filter} %endif %description FusionInventory Agent is an application designed to help a network or system administrator to keep track of the hardware and software configurations of computers that are installed on the network. This agent can send information about the computer to a OCS Inventory NG or GLPI server with the FusionInventory for GLPI plugin. You can add additional packages for optional tasks: * perl-FusionInventory-Agent-Task-OcsDeploy OCS Inventory Software deployment support * perl-FusionInventory-Agent-Task-NetDiscovery Network Discovery support * perl-FusionInventory-Agent-Task-SNMPQuery SNMP Query support * perl-FusionInventory-Agent-Task-ESX vCenter/ESX/ESXi remote inventory Edit the /etc/sysconfig/%{name} file for service configuration %description -l fr L'agent FusionInventory est une application destinée à aider l'administrateur système ou réseau à surveiller la configuration des machines du réseau et les logiciels qui y sont installés. Cet agent peut envoyer les informations de l'ordinateur à un serveur OCS Inventory NG ou à un serveur GLPI disposant de l'extension FusionInventory. Vous pouvez ajouter les paquets additionnels pour les tâches optionnelles : * perl-FusionInventory-Agent-Task-OcsDeploy Gestion du déploiement logiciel OCS Inventory * perl-FusionInventory-Agent-Task-NetDiscovery Gestion de la découverte réseau * perl-FusionInventory-Agent-Task-SNMPQuery Gestion de l'interrogation SNMP * perl-FusionInventory-Agent-Task-ESX Inventaire à distance des vCenter/ESX/ESXi Modifier le fichier /etc/sysconfig/%{name} pour configurer le service. %package yum-plugin Summary: Ask FusionInventory agent to send an inventory when yum exits Summary(fr): Demande à l'agent FusionInventory l'envoi d'un inventaire Group: System Environment/Base BuildRequires: python-devel Requires: yum >= 2.4 Requires: %{name} %description yum-plugin fusioninventory-agent-yum-plugin asks the running service agent to send an inventory when yum exits. This requires the service to be running with the --rpc-trust-localhost option. %description -l fr yum-plugin fusioninventory-agent-yum-plugin demande au service de l'agent d'envoyer un inventaire à la fin de l'exécution de yum. Le service doit être actif et lancé avec l'option --rpc-trust-localhost. %prep %if 0%{?gitver:1} %setup -q -n fusinv-fusioninventory-agent-%{gitver} %else %setup -q -n FusionInventory-Agent-%{version}%{?prever} %endif %patch0 -p1 -b .revert # This work only on older version, and is ignored on recent cat </dev/null ';' %{_fixperms} $RPM_BUILD_ROOT/* %{__mkdir_p} %{buildroot}%{_localstatedir}/{log,lib}/%{name} %{__install} -m 644 -D logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name} %{__install} -m 644 -D %{name}.conf %{buildroot}%{_sysconfdir}/sysconfig/%{name} %{__install} -m 644 -D agent.cfg %{buildroot}%{_sysconfdir}/fusioninventory/agent.cfg %{__install} -m 755 -Dp %{SOURCE1} %{buildroot}%{_sysconfdir}/cron.hourly/%{name} %{__install} -m 755 -Dp %{SOURCE2} %{buildroot}%{_initrddir}/%{name} # Yum plugin installation %{__install} -m 644 -D contrib/yum-plugin/%{name}.py %{buildroot}/usr/lib/yum-plugins/%{name}.py %{__install} -m 644 -D contrib/yum-plugin/%{name}.conf %{buildroot}%{_sysconfdir}/yum/pluginconf.d/%{name}.conf %check make test %clean %{__rm} -rf %{buildroot} %{buildroot}%{_datarootdir} %post /sbin/chkconfig --add %{name} %preun if [ $1 -eq 0 ] ; then /sbin/service %{name} stop &>/dev/null /sbin/chkconfig --del %{name} fi exit 0 %postun if [ $1 -ge 1 ]; then /sbin/service %{name} condrestart &>/dev/null fi exit 0 %files %defattr(-, root, root, -) %doc AUTHORS README* Changes LICENSE THANKS %dir %{_sysconfdir}/fusioninventory %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %config(noreplace) %{_sysconfdir}/fusioninventory/agent.cfg %{_sysconfdir}/cron.hourly/%{name} %{_initrddir}/%{name} %{perl_vendorlib}/FusionInventory %{perl_vendorlib}/auto %{_bindir}/fusioninventory-agent %{_bindir}/fusioninventory-injector %exclude %{_bindir}/%{name}-config %{_mandir}/man1/fusioninventory-agent* %{_mandir}/man1/fusioninventory-injector* %{_mandir}/man3/Fusion* %dir %{_localstatedir}/log/%{name} %dir %{_localstatedir}/lib/%{name} %files yum-plugin %defattr(-, root, root) %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/%{name}.conf /usr/lib/yum-plugins/%{name}.* %changelog * Thu Mar 31 2011 Remi Collet 2.1.8-2 - revert change for issue 656 which breaks compatibility * Wed Mar 30 2011 Remi Collet 2.1.8-1 - update to 2.1.8 http://cpansearch.perl.org/src/FUSINV/FusionInventory-Agent-2.1.8/Changes * Thu Dec 30 2010 Remi Collet 2.1.7-2 - add the yum-plugin sub-package * Mon Dec 13 2010 Remi Collet 2.1.7-1 - update to 2.1.7 http://cpansearch.perl.org/src/FUSINV/FusionInventory-Agent-2.1.7/Changes * Sun Nov 28 2010 Remi Collet 2.1.7-0.1.beta1 - update to 2.1.7 beta1 * Sat Nov 13 2010 Remi Collet 2.1.6-1.1 - fix perl filter on EL-6 * Wed Oct 06 2010 Remi Collet 2.1.6-1 - update to 2.1.6 http://cpansearch.perl.org/src/FUSINV/FusionInventory-Agent-2.1.6/Changes - fix init script for multi-server in daemon mode - workaround for http://forge.fusioninventory.org/issues/414 * Wed Sep 15 2010 Remi Collet 2.1.5-1 - update to 2.1.5 http://cpansearch.perl.org/src/FUSINV/FusionInventory-Agent-2.1.5/Changes * Fri Sep 10 2010 Remi Collet 2.1.3-2 - add %%check * Sat Sep 04 2010 Remi Collet 2.1.3-1 - update to 2.1.3 http://cpansearch.perl.org/src/FUSINV/FusionInventory-Agent-2.1.3/Changes * Wed Aug 25 2010 Remi Collet 2.1.2-1 - update to 2.1.2 http://cpansearch.perl.org/src/FUSINV/FusionInventory-Agent-2.1.2/Changes * Wed Aug 18 2010 Remi Collet 2.1.1-1 - update to 2.1.1 * Wed Aug 18 2010 Remi Collet 2.1-2.gita7532c0 - update to git snaphost which fix EL issues - fix init script - adapt perl filter for recent/old fedora or EL * Mon Aug 16 2010 Remi Collet 2.1-1 - update to 2.1 - switch download URL back to CPAN - add %%{perl_vendorlib}/auto - filter perl(Win32*) from Requires - add patch (from git) to reopen the file logger if needed * Sat May 29 2010 Remi Collet 2.0.6-1 - update to 2.0.6 - swicth download URL to forge * Wed May 12 2010 Remi Collet 2.0.5-1 - update to 2.0.5 * Tue May 11 2010 Remi Collet 2.0.4-4.gitf7c5492 - git snapshot fix perl 5.8.8 (EL5) issue * Sat May 08 2010 Remi Collet 2.0.4-4.gitddfdeaf - git snapshot fix daemon issue - add FUSINVOPT for global options (p.e.--debug) * Sat May 08 2010 Remi Collet 2.0.4-3 - add support for daemon mode * Fri May 07 2010 Remi Collet 2.0.4-2 - info about perl-FusionInventory-Agent-Task-OcsDeploy - spec cleanup - french translation - set Net::CUPS and Archive::Extract optionnal on RHEL4 * Fri May 07 2010 Remi Collet 2.0.4-1 - update to 2.0.4 which fixes important bugs when cron is used * Sat May 01 2010 Remi Collet 2.0.3-1 - initial spec