## Disabling debug package %global debug_package %{nil} Name: glpi-agent Summary: GLPI inventory agent Group: Applications/System License: GPLv2+ URL: https://glpi-project.org/ Version: 1.4 Release: 3%{?dist} Source0: %{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(Config) BuildRequires: perl(English) BuildRequires: perl(inc::Module::Install) BuildRequires: perl(Module::AutoInstall) BuildRequires: perl(Module::Install::Include) BuildRequires: perl(Module::Install::Makefile) BuildRequires: perl(Module::Install::Metadata) BuildRequires: perl(Module::Install::Scripts) BuildRequires: perl(Module::Install::WriteAll) BuildRequires: perl(strict) BuildRequires: perl(warnings) BuildRequires: sed BuildRequires: systemd Requires: perl(LWP) Requires: perl(Net::SSLeay) Requires: perl(Proc::Daemon) Requires: perl(Socket::GetAddrInfo) Requires: perl(DateTime) %if 0%{?fedora} || 0%{?rhel} >= 8 # recommended for inventory module Recommends: perl(Net::CUPS) Recommends: perl(Parse::EDID) # recommended for remoteinventory task Recommends: perl(Net::SSH2) %endif # excluding internal requires and windows stuff # excluding perl(setup) and windows stuff %{?perl_default_filter} %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(setup\\)$ %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Win32|setup\\)$ %description GLPI 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 GLPI server with native inventory support or with a FusionInventory compatible GLPI plugin. You can add additional packages for optional tasks: * glpi-agent-task-network Network Discovery and Inventory * glpi-agent-inventory Local inventory * glpi-agent-task-deploy Package deployment * glpi-agent-task-esx vCenter/ESX/ESXi remote inventory * glpi-agent-task-collect Custom information retrieval * glpi-agent-task-wakeonlan Wake on LAN task You can also install the following package if you prefer to start the agent via a cron scheduled each hour: * glpi-agent-cron %package task-esx Summary: vCenter/ESX/ESXi inventoy task for GLPI agent Requires: %{name} = %{version}-%{release} %description task-esx GLPI agent VMWare vCenter/ESX/ESXi server inventory support through SOAP interface %package task-network Summary: NetDiscovery and NetInventory task for GLPI agent Requires: %{name} = %{version}-%{release} %description task-network GLPI agent Net discovery and inventory support %package task-deploy Summary: Software deployment support for GLPI agent Requires: %{name} = %{version}-%{release} Requires: perl(Archive::Extract) %description task-deploy GLPI agent software deployment support %package task-wakeonlan Summary: WakeOnLan task for GLPI agent Requires: %{name} = %{version}-%{release} %description task-wakeonlan GLPI agent Wake on LAN support %package task-collect Summary: Custom information retrieval support for GLPI agent Requires: %{name} = %{version}-%{release} %description task-collect GLPI agent custom information retrieval support %package cron Summary: Cron for GLPI agent Requires: %{name} = %{version}-%{release} Requires: cronie %description cron GLPI agent cron task %package fusioninventory-migration Summary: FusionInventory migration for GLPI agent Requires: %{name} = %{version}-%{release} Obsoletes: fusioninventory-agent Obsoletes: fusioninventory-agent-task-esx Obsoletes: fusioninventory-agent-task-network Obsoletes: fusioninventory-agent-task-deploy Obsoletes: fusioninventory-agent-task-wakeonlan Obsoletes: fusioninventory-agent-task-collect Obsoletes: fusioninventory-agent-cron %description fusioninventory-migration GLPI agent migration from FusionInventory before Obsoletes it %prep %setup -q -n %{name}-%{version} # Remove bundled modules rm -rf ./inc # Remove MANIFEST unneeded file (and missing from git clone) rm -f MANIFEST # Remove files only used under win32 rm -rf lib/GLPI/Agent/Daemon sed \ -e "s/logger = .*/logger = syslog/" \ -e "s/logfacility = .*/logfacility = LOG_DAEMON/" \ -e 's|#include "conf\.d/"|include "conf\.d/"|' \ -i etc/agent.cfg cat </dev/null || : fi %postun if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall systemctl try-restart %{name}.service &>/dev/null || : fi %pre fusioninventory-migration if [ -d "%{_sysconfdir}/fusioninventory/conf.d" ] ; then cp -rp %{_sysconfdir}/fusioninventory/conf.d/* %{_sysconfdir}/%{name}/conf.d fi %files %doc Changes LICENSE THANKS %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/agent.cfg %config(noreplace) %{_sysconfdir}/%{name}/conf.d %config(noreplace) %{_sysconfdir}/%{name}/inventory-server-plugin.cfg %config(noreplace) %{_sysconfdir}/%{name}/server-test-plugin.cfg %config(noreplace) %{_sysconfdir}/%{name}/ssl-server-plugin.cfg %config(noreplace) %{_sysconfdir}/%{name}/proxy-server-plugin.cfg %config(noreplace) %{_sysconfdir}/%{name}/proxy2-server-plugin.cfg %{_unitdir}/%{name}.service %dir %{_sysconfdir}/systemd/system/%{name}.service.d %{_bindir}/glpi-agent %{_bindir}/glpi-injector %{_bindir}/glpi-inventory %{_bindir}/glpi-remote %{_mandir}/man1/glpi-agent* %{_mandir}/man1/glpi-injector* %{_mandir}/man1/glpi-inventory.1* %{_mandir}/man1/glpi-remote.1* %dir %{_localstatedir}/lib/%{name} %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/lib %dir %{_datadir}/%{name}/lib/GLPI %dir %{_datadir}/%{name}/lib/GLPI/Agent %dir %{_datadir}/%{name}/lib/GLPI/Agent/Task %{_datadir}/%{name}/*.ids %{_datadir}/%{name}/html/*.tpl %{_datadir}/%{name}/html/favicon.ico %{_datadir}/%{name}/html/logo.png %{_datadir}/%{name}/html/site.css %{_datadir}/%{name}/lib/GLPI/Agent.pm %{_datadir}/%{name}/lib/GLPI/Agent/Config.pm %{_datadir}/%{name}/lib/setup.pm %{_datadir}/%{name}/lib/GLPI/Agent/Daemon.pm %{_datadir}/%{name}/lib/GLPI/Agent/HTTP/Server.pm %{_datadir}/%{name}/lib/GLPI/Agent/HTTP/Client* %{_datadir}/%{name}/lib/GLPI/Agent/HTTP/Protocol %{_datadir}/%{name}/lib/GLPI/Agent/HTTP/Session.pm %{_datadir}/%{name}/lib/GLPI/Agent/HTTP/Server/Inventory.pm %{_datadir}/%{name}/lib/GLPI/Agent/HTTP/Server/Plugin.pm %{_datadir}/%{name}/lib/GLPI/Agent/HTTP/Server/Proxy.pm %{_datadir}/%{name}/lib/GLPI/Agent/HTTP/Server/SecondaryProxy.pm %{_datadir}/%{name}/lib/GLPI/Agent/HTTP/Server/SSL.pm %{_datadir}/%{name}/lib/GLPI/Agent/HTTP/Server/Test.pm %{_datadir}/%{name}/lib/GLPI/Agent/Inventory.pm %{_datadir}/%{name}/lib/GLPI/Agent/Logger* %{_datadir}/%{name}/lib/GLPI/Agent/SOAP/WsMan* %{_datadir}/%{name}/lib/GLPI/Agent/Storage.pm %{_datadir}/%{name}/lib/GLPI/Agent/Target* %{_datadir}/%{name}/lib/GLPI/Agent/Task.pm %{_datadir}/%{name}/lib/GLPI/Agent/Task/Inventory* %{_datadir}/%{name}/lib/GLPI/Agent/Task/RemoteInventory* %{_datadir}/%{name}/lib/GLPI/Agent/Tools.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/AIX.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/BSD.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Batteries.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Constants.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Expiration.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Generic.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/HPUX.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Hostname.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/IpmiFru.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/License.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Linux.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/MacOS.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Network.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/PartNumber* %{_datadir}/%{name}/lib/GLPI/Agent/Tools/PowerSupplies.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Screen* %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Solaris.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Standards* %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Storages/ %{_datadir}/%{name}/lib/GLPI/Agent/Tools/UUID.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Unix.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Virtualization.pm %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Win32* %{_datadir}/%{name}/lib/GLPI/Agent/Version.pm %{_datadir}/%{name}/lib/GLPI/Agent/XML/ %{_datadir}/%{name}/lib/GLPI/Agent/Inventory/ %{_datadir}/%{name}/lib/GLPI/Agent/Protocol/ %files task-esx %{_bindir}/glpi-esx %{_mandir}/man1/glpi-esx.1* %{_datadir}/%{name}/lib/GLPI/Agent/Task/ESX* %{_datadir}/%{name}/lib/GLPI/Agent/SOAP/VMware* %files task-network %config(noreplace) %{_sysconfdir}/%{name}/toolbox-plugin.cfg %{_bindir}/glpi-netdiscovery %{_bindir}/glpi-netinventory %{_mandir}/man1/glpi-netdiscovery.1* %{_mandir}/man1/glpi-netinventory.1* %{_datadir}/%{name}/lib/GLPI/Agent/Task/NetDiscovery* %{_datadir}/%{name}/lib/GLPI/Agent/Task/NetInventory* %{_datadir}/%{name}/lib/GLPI/Agent/Tools/SNMP.pm %{_datadir}/%{name}/lib/GLPI/Agent/SNMP* %{_datadir}/%{name}/lib/GLPI/Agent/Tools/Hardware* %{_datadir}/%{name}/lib/GLPI/Agent/HTTP/Server/ToolBox* %{_datadir}/%{name}/html/toolbox %files task-deploy %{_datadir}/%{name}/lib/GLPI/Agent/Task/Deploy.pm %{_datadir}/%{name}/lib/GLPI/Agent/Task/Deploy %files task-wakeonlan %{_bindir}/glpi-wakeonlan %{_mandir}/man1/glpi-wakeonlan.1* %{_datadir}/%{name}/lib/GLPI/Agent/Task/WakeOnLan* %files task-collect %{_datadir}/%{name}/lib/GLPI/Agent/Task/Collect* %files cron %{_sysconfdir}/cron.hourly/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %files fusioninventory-migration %changelog * Thu Sep 15 2022 Jean-Marc Liger - 1.4-3 - Revert forced Obsoletes fusioninventory-agent packages - Add user's choice fusioninventory-migration package * Wed Sep 14 2022 Jean-Marc Liger - 1.4-2 - Add Obsoletes fusioninventory-agent packages * Mon Jul 18 2022 Jean-Marc Liger - 1.4-1 - Version 1.4 * Wed Apr 13 2022 Jean-Marc Liger - 1.2-1 - Version 1.2 * Sat Apr 02 2022 Jean-Marc Liger - 1.1-1 - Rebuild for COPR EL7, EL8 and Fedora * Wed Mar 16 2022 Guillaume Bougard - Set Net::SSH2 dependency as weak dependency - Add Net::CUPS & Parse::EDID as weak dependency * Fri Mar 4 2022 Guillaume Bougard - Add Net::SSH2 dependency for remoteinventory support * Fri Jun 11 2021 Guillaume Bougard - Update to support new GLPI Agent protocol * Mon May 10 2021 Guillaume Bougard - Updates to make official and generic GLPI Agent rpm packages - Remove dmidecode, perl(Net::CUPS) & perl(Parse::EDID) dependencies as they are indeed only recommended - Replace auto-generated systemd scriptlets with raw scriplets and don't even try to enable the service on install as this is useless without a server defined in conf * Thu Sep 17 2020 Johan Cwiklinski - Package of GLPI Agent, based on GLPI Agent officials specfile