From b5aedd378f94365143440e2535193ec31aab81c4 Mon Sep 17 00:00:00 2001 From: remi Date: Sun, 26 Feb 2012 15:19:58 +0100 Subject: [PATCH 1/9] update to 2.1.14 --- .gitignore | 1 + fusioninventory-agent-git.patch | 112 -------------------------------- fusioninventory-agent.spec | 19 ++---- sources | 2 +- 4 files changed, 9 insertions(+), 125 deletions(-) delete mode 100644 fusioninventory-agent-git.patch diff --git a/.gitignore b/.gitignore index bfb8c90..9e21164 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *spec~ /FusionInventory-Agent-2.1.9.tar.gz /FusionInventory-Agent-2.1.12.tar.gz +/FusionInventory-Agent-2.1.14.tar.gz diff --git a/fusioninventory-agent-git.patch b/fusioninventory-agent-git.patch deleted file mode 100644 index 9b131dc..0000000 --- a/fusioninventory-agent-git.patch +++ /dev/null @@ -1,112 +0,0 @@ -commit a291e4d5d73c13fc8076211b004e7349cd4bbf7d -Author: Gonéri Le Bouder -Date: Mon Nov 28 21:37:48 2011 +0100 - - try to use ssl_opts on LWP<6 too - - previously this block was only for LWP6. For some modern - LWP5/Crypt::SSLeay also need it, I use an eval here to avoid - failure on ancient LWP::UserAgent with no ssl_opts() - - closes: #1161 - - Reported-by: Remi Collet - -diff --git a/lib/FusionInventory/Agent/Network.pm b/lib/FusionInventory/Agent/Network.pm -index b349de5..6bc6fbf 100644 ---- a/lib/FusionInventory/Agent/Network.pm -+++ b/lib/FusionInventory/Agent/Network.pm -@@ -107,8 +107,11 @@ sub createUA { - - my $ua = LWP::UserAgent->new(keep_alive => 1, requests_redirectable => ['POST', 'GET', 'HEAD']); - -- -- if ($LWP::VERSION >= 6) { -+ # previously this block was only for LWP6. -+ # For some modern LWP5/Crypt::SSLeay also need it, I use -+ # an eval here to avoid failure on ancient LWP::UserAgent with -+ # no ssl_opts() -+ eval { - # LWP6 default behavior is to check the SSL hostname - if ($config->{'no-ssl-check'}) { - $ua->ssl_opts(verify_hostname => 0); -@@ -119,7 +122,7 @@ sub createUA { - if ($config->{'ca-cert-dir'}) { - $ua->ssl_opts(SSL_ca_path => $config->{'ca-cert-dir'}); - } -- } -+ }; - - if ($noProxy) { - -commit 5001036e8eabac54a5058306c44793df325109a2 -Author: Gonéri Le Bouder -Date: Mon Nov 28 21:39:21 2011 +0100 - - improve the regex used to parse the SSL-Cert - - - Drop the port from the hostname - - Use a wildcare only if there is a domain - -diff --git a/lib/FusionInventory/Agent/Network.pm b/lib/FusionInventory/Agent/Network.pm -index 6bc6fbf..96d7513 100644 ---- a/lib/FusionInventory/Agent/Network.pm -+++ b/lib/FusionInventory/Agent/Network.pm -@@ -362,9 +362,10 @@ sub setSslRemoteHost { - # Check server name against provided SSL certificate - if ( $self->{URI} =~ /^https:\/\/([^\/]+).*$/i ) { - my $re = $1; -+ $re =~ s/:\d+//; - # Accept SSL cert will hostname with wild-card - # http://forge.fusioninventory.org/issues/542 -- $re =~ s/^([^\.]+)/($1|\\*)/; -+ $re =~ s/^([^\.]+)\.(.+)/($1|\\*)/; - # protect some characters, $re will be evaluated as a regex - $re =~ s/([\-\.])/\\$1/g; - $ua->default_header('If-SSL-Cert-Subject' => '/CN='.$re.'($|\/)'); -commit 8035bde109d9684dac5fd9369ce6a7a641c54f99 -Author: Gonéri Le Bouder -Date: Mon Nov 28 21:48:52 2011 +0100 - - SSL: skip some test on LWP<6 - - Those cases are just unsupported. - - closes: #1161 - - Reported-by: Remi Collet - -diff --git a/t/ssl.t b/t/ssl.t -index ff8c25e..d8b384f 100644 ---- a/t/ssl.t -+++ b/t/ssl.t -@@ -107,10 +107,14 @@ $server->set_dispatch({ - }); - $server->background(); - -+ -+SKIP: { -+skip "Too all LWP for alternate hostname", 1 unless $LWP::VERSION >= 6; - ok( - $secure_client->send({message => $message}), - 'trusted certificate, alternate hostname: connection success' - ); -+} - - $server->stop(); - -@@ -161,10 +165,14 @@ ok( - 'untrusted certificate, correct hostname: connection failure' - ); - -+SKIP: { -+skip "Check disabled on LWP<6", 1 unless $LWP::VERSION >= 6; -+# Unless you wan to fix this - ok( - $unsafe_client->send({message => $message}), - 'untrusted certificate, correct hostname, no check: connection success' - ); -+} - - $server->stop(); - diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index 3cc0702..d7c54a0 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -8,22 +8,20 @@ Group: Applications/System License: GPLv2+ URL: http://fusioninventory.org/ -Version: 2.1.12 +Version: 2.1.14 %if 0%{?gitver:1} -Release: 0.1.git%{gitver}%{?dist} +Release: 0.2.git%{gitver}%{?dist} # From http://github.com/fusinv/fusioninventory-agent/tarball/master Source0: fusinv-fusioninventory-agent-2.1.8-95-g9bd1238.tar.gz %else -Release: 1%{?dist} +Release: 2%{?dist} Source0: http://search.cpan.org/CPAN/authors/id/F/FU/FUSINV/FusionInventory-Agent-%{version}%{?prever}.tar.gz %endif Source1: %{name}.cron Source2: %{name}.init -Patch0: %{name}-git.patch - BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -136,8 +134,6 @@ Le service doit être actif et lancé avec l'option --rpc-trust-localhost. %setup -q -n FusionInventory-Agent-%{version}%{?prever} %endif -%patch0 -p1 - # This work only on older version, and is ignored on recent cat < - 2.1.14-1 +- update to 2.1.14 + http://cpansearch.perl.org/src/FUSINV/FusionInventory-Agent-2.1.14/Changes + * Mon Nov 28 2011 Remi Collet - 2.1.12-1 - update to 2.1.12 http://cpansearch.perl.org/src/FUSINV/FusionInventory-Agent-2.1.12/Changes diff --git a/sources b/sources index 27bbf1d..f0c3c0f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5ef5237d3504c0651fcbdb1a04d1cd26 FusionInventory-Agent-2.1.12.tar.gz +4f8b8f59e028f21e6d04aa469ce4c676 FusionInventory-Agent-2.1.14.tar.gz From 672ed0fd5f49ff32cc55494857ba98766b978a3e Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Wed, 22 Jun 2016 16:57:11 +0200 Subject: [PATCH 2/9] Last upstream release --- fusioninventory-agent-useless-module-cleaning | 34 ++ fusioninventory-agent.spec | 324 ++++++++++-------- 2 files changed, 214 insertions(+), 144 deletions(-) create mode 100644 fusioninventory-agent-useless-module-cleaning diff --git a/fusioninventory-agent-useless-module-cleaning b/fusioninventory-agent-useless-module-cleaning new file mode 100644 index 0000000..22f6514 --- /dev/null +++ b/fusioninventory-agent-useless-module-cleaning @@ -0,0 +1,34 @@ +From 25404f038f99bd091e0fb2368879e848500f5082 Mon Sep 17 00:00:00 2001 +From: tlornet +Date: Wed, 22 Jun 2016 16:01:54 +0200 +Subject: [PATCH] useless module cleaning + +--- + Makefile.PL | 1 - + lib/FusionInventory/Agent/Config.pm | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/Makefile.PL b/Makefile.PL +index 55987d3..ea39425 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -18,7 +18,6 @@ requires 'Net::IP' => '0'; + requires 'Text::Template' => '0'; + requires 'UNIVERSAL::require' => '0'; + requires 'XML::TreePP' => '0.26'; +-requires 'Data::Structure::Util' => '0'; + + if ($OSNAME eq 'MSWin32') { + requires 'Win32::OLE' => '0'; +diff --git a/lib/FusionInventory/Agent/Config.pm b/lib/FusionInventory/Agent/Config.pm +index 90d5295..8480018 100644 +--- a/lib/FusionInventory/Agent/Config.pm ++++ b/lib/FusionInventory/Agent/Config.pm +@@ -7,7 +7,6 @@ use English qw(-no_match_vars); + use File::Spec; + use Getopt::Long; + use UNIVERSAL::require; +-use Data::Structure::Util qw/unbless/; + + require FusionInventory::Agent::Tools; + diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index d7c54a0..dd6fa60 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -1,67 +1,39 @@ -#global gitver 9bd1238 -#global prever _beta1 +## Disabling debug package +## Can't build as noarch due to dmidecode requires +%global debug_package %{nil} + Name: fusioninventory-agent Summary: FusionInventory agent -Summary(fr): Agent FusionInventory Group: Applications/System License: GPLv2+ URL: http://fusioninventory.org/ -Version: 2.1.14 - -%if 0%{?gitver:1} -Release: 0.2.git%{gitver}%{?dist} -# From http://github.com/fusinv/fusioninventory-agent/tarball/master -Source0: fusinv-fusioninventory-agent-2.1.8-95-g9bd1238.tar.gz -%else -Release: 2%{?dist} -Source0: http://search.cpan.org/CPAN/authors/id/F/FU/FUSINV/FusionInventory-Agent-%{version}%{?prever}.tar.gz -%endif - -Source1: %{name}.cron -Source2: %{name}.init - - -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) -BuildRequires: perl(Class::Accessor::Fast) perl(Class::Data::Inheritable) perl(Test::Exception) -%if 0%{?fedora} >= 14 -BuildRequires: perl(LWP::Protocol::https) perl(IO::Socket::SSL) -BuildRequires: perl(HTTP::Server::Simple::Authen) perl(CGI) -%endif -%if 0%{?fedora}>= 12 || 0%{?rhel} >= 5 -BuildRequires: perl(XML::TreePP) -%endif -%if 0%{?fedora}>= 10 || 0%{?rhel} >= 5 -BuildRequires: perl(JSON) -%endif -%if 0%{?fedora} >= 11 -BuildRequires: perl(Test::Compile) -%endif +Version: 2.3.18 +Release: 1%{?dist} +Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz +Source1: %{name}.cron +#Apply https://github.com/fusioninventory/fusioninventory-agent/commit/25404f038f99bd091e0fb2368879e848500f5082 +Patch0: %{name}-useless-module-cleaning 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) -%if 0%{?fedora} >= 6 || 0%{?rhel} >= 5 -Requires: perl(Archive::Extract) -Requires: perl(Net::CUPS) +BuildRequires: perl(ExtUtils::MakeMaker) + +Requires: perl-FusionInventory-Agent = %{version}-%{release} +Requires: logrotate +Requires: cronie +%ifarch %{ix86} x86_64 +Requires: dmidecode %endif -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/chkconfig, /sbin/service -Requires(postun): /sbin/service +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig, /sbin/service +Requires(postun): /sbin/service -# RPM 4.8 -%{?filter_from_requires: %filter_from_requires /perl(Win32/d} -%{?perl_default_filter} -# RPM 4.9 -%global __requires_exclude %{?__requires_exclude:__requires_exclude|}^perl\\(Win32 - +# excluding internal requires and windows stuff +%global __provides_exclude %{?__provides_exclude:__provides_exclude|}^perl\\(FusionInventory:: +%global __requires_exclude %{?__requires_exclude:__requires_exclude|}^perl\\(FusionInventory:: +%global __requires_exclude %__requires_exclude|^perl\\(Win32 %description FusionInventory Agent is an application designed to help a network @@ -73,46 +45,49 @@ 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 +* fusioninventory-agent-task-network + Network Discovery and Inventory support +* fusioninventory-agent-inventory + Local inventory support for FusionInventory +* fusioninventory-agent-task-deploy + Software deployment support +* fusioninventory-agent-task-esx vCenter/ESX/ESXi remote inventory +* fusioninventory-agent-task-collect + Custom information retrieval support +* fusioninventory-agent-task-wakeonlan + not included due to a licensing issue for perl-Net-Write 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. +%package -n perl-FusionInventory-Agent +Summary: Libraries for Fusioninventory agent +BuildArch: noarch +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Requires: perl(LWP) +Requires: perl(Net::CUPS) +Requires: perl(Net::SSLeay) +Requires: perl(Proc::Daemon) +Requires: perl(Proc::PID::File) +Requires: perl(Socket::GetAddrInfo) -Cet agent peut envoyer les informations de l'ordinateur à un serveur -OCS Inventory NG ou à un serveur GLPI disposant de l'extension FusionInventory. +%description -n perl-FusionInventory-Agent +Libraries for Fusioninventory agent. -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 task-esx +Summary: FusionInventory plugin to inventory vCenter/ESX/ESXi +BuildArch: noarch +Requires: fusioninventory-agent = %{version}-%{release} +%description task-esx +fusioninventory-agent-task-ESX ask the running service agent to inventory an +VMWare vCenter/ESX/ESXi server through SOAP interface %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 +BuildArch: noarch +Requires: yum Requires: %{name} %description yum-plugin @@ -121,31 +96,74 @@ 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. +%package task-network +Summary: NetDiscovery and NetInventory task for FusionInventory +Group: Applications/System +BuildArch: noarch +Requires: fusioninventory-agent = %{version}-%{release} + +%description task-network +fusioninventory-task-netdiscovery and fusioninventory-task-netinventory + +%package task-deploy +Summary: Software deployment support for FusionInventory agent +Group: Applications/System +BuildArch: noarch +Requires: fusioninventory-agent = %{version}-%{release} +Requires: perl(Archive::Extract) + +%description task-deploy +This package provides software deployment support for FusionInventory-agent + +# Excluded due to the absence of perl-Net-Write +# perl-Net-Write is licenced under Artistic Perl v1 licence, not accepted in Fedora +#%%package task-wakeonlan +#Summary: WakeOnLan task for FusionInventory +#Group: Applications/System +#BuildArch: noarch +#Requires: fusioninventory-agent = %%{version}-%%{release} + +#%%description task-wakeonlan +#fusioninventory-task-wakeonlan + +%package task-inventory +Summary: Inventory task for FusionInventory +Group: Applications/System +Requires: fusioninventory-agent = %{version}-%{release} +Requires: perl(Net::CUPS) +#This one is not available on EL6 for now; +#and this is a "recommanded", not a required one. +#Requires: perl(Parse::EDID) + +%description task-inventory +fusioninventory-task-inventory + +%package task-collect +Summary: Custom information retrieval support for FusionInventory agent +Group: Applications/System +Requires: %{name} = %{version}-%{release} + +%description task-collect +This package provides custom information retrieval support for +FusionInventory agent -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 +%setup -q -n FusionInventory-Agent-%{version} + +%patch0 -p1 + +sed -i contrib/unix/%{name}.init.redhat \ + -e "s/Default-Start: 3 5/Default-Start:/" # This work only on older version, and is ignored on recent cat </dev/null ';' %{_fixperms} %{buildroot}/* - 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} +install -m 644 -D logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name} +install -m 644 -D %{name}.conf %{buildroot}%{_sysconfdir}/sysconfig/%{name} +install -m 755 -Dp %{SOURCE1} %{buildroot}%{_sysconfdir}/cron.hourly/%{name} +install -m 755 -D contrib/unix/%{name}.init.redhat %{buildroot}%{_initrddir}/%{name} + # Yum plugin installation install -m 644 -D contrib/yum-plugin/%{name}.py %{buildroot}%{_prefix}/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} - +#make test %post /sbin/chkconfig --add %{name} @@ -253,32 +244,77 @@ exit 0 %files -%defattr(-, root, root, -) -%doc AUTHORS 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} +%dir %{_datadir}/fusioninventory +%dir %{_datadir}/fusioninventory/lib +%dir %{_datadir}/fusioninventory/lib/FusionInventory +%dir %{_datadir}/fusioninventory/lib/FusionInventory/Agent +%dir %{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task +#excluding sub-packages files +#%%exclude %%{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/ + + + +%files -n perl-FusionInventory-Agent +%doc Changes LICENSE THANKS +%{_datadir}/fusioninventory %files yum-plugin -%defattr(-, root, root) %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/%{name}.conf %{_prefix}/lib/yum-plugins/%{name}.* +%files task-esx +%{_bindir}/fusioninventory-esx +%{_mandir}/man1/fusioninventory-esx.1* +%{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/ESX.pm +%{_datadir}/fusioninventory/lib/FusionInventory/Agent/SOAP + +%files task-network +%{_bindir}/fusioninventory-netdiscovery +%{_bindir}/fusioninventory-netinventory +%{_mandir}/man1/fusioninventory-netdiscovery.1* +%{_mandir}/man1/fusioninventory-netinventory.1* +%{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/NetDiscovery.pm +%{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/NetInventory.pm + +%files task-deploy +%{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/Deploy.pm +%{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/Deploy + +# Excluding task-wakeonlan +#%%files task-wakeonlan +%exclude %{_bindir}/fusioninventory-wakeonlan +%exclude %{_mandir}/man1/fusioninventory-wakeonlan.1* +%exclude %{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/WakeOnLan.pm + +%files task-inventory +%{_bindir}/fusioninventory-inventory +%{_mandir}/man1/fusioninventory-inventory.1* +%{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/Inventory.pm +%{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/Inventory + +%files task-collect +%{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/Collect.pm + %changelog +* Tue Jun 21 2016 Johan Cwiklinski - 2.3.18-1 +- Last upstream release +- Add task-* subpackages +- Use upstream provided initscript +- Update according to EL7 specfile + * Sun Feb 26 2012 Remi Collet - 2.1.14-1 - update to 2.1.14 http://cpansearch.perl.org/src/FUSINV/FusionInventory-Agent-2.1.14/Changes @@ -291,7 +327,7 @@ exit 0 * Sat Aug 06 2011 Remi Collet - 2.1.9-3 - adapt filter -* Fri Jul 25 2011 Petr Sabata - 2.1.9-2 +* Mon Jul 25 2011 Petr Sabata - 2.1.9-2 - Perl mass rebuild * Sun Jun 26 2011 Remi Collet 2.1.9-1 From 26b53e09fc80cda21d0a966781194e68392ed554 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Wed, 22 Jun 2016 18:01:34 +0200 Subject: [PATCH 3/9] Forget new sources... --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9e21164..7975a4e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /FusionInventory-Agent-2.1.9.tar.gz /FusionInventory-Agent-2.1.12.tar.gz /FusionInventory-Agent-2.1.14.tar.gz +/FusionInventory-Agent-2.3.18.tar.gz diff --git a/sources b/sources index f0c3c0f..523b6a9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4f8b8f59e028f21e6d04aa469ce4c676 FusionInventory-Agent-2.1.14.tar.gz +caffff2fe695b2262529aa7541f1b94a FusionInventory-Agent-2.3.18.tar.gz From dcc2ffa01e0d2c8493b74e86487f447a37486fbb Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Mon, 20 Feb 2017 15:21:13 +0100 Subject: [PATCH 4/9] Last upstream release --- .gitignore | 1 + fusioninventory-agent-setup.pm.patch | 41 ++++++++++++++++++++++++++++ fusioninventory-agent.spec | 29 ++++++++++++++++++-- sources | 2 +- 4 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 fusioninventory-agent-setup.pm.patch diff --git a/.gitignore b/.gitignore index 7975a4e..c7353d8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /FusionInventory-Agent-2.1.12.tar.gz /FusionInventory-Agent-2.1.14.tar.gz /FusionInventory-Agent-2.3.18.tar.gz +/FusionInventory-Agent-2.3.19.tar.gz diff --git a/fusioninventory-agent-setup.pm.patch b/fusioninventory-agent-setup.pm.patch new file mode 100644 index 0000000..045dd9d --- /dev/null +++ b/fusioninventory-agent-setup.pm.patch @@ -0,0 +1,41 @@ +diff --git a/bin/setup.pm b/bin/setup.pm +index 3f92279..c7132f0 100644 +--- a/bin/setup.pm ++++ b/bin/setup.pm +@@ -8,30 +8,11 @@ our @EXPORT = ('%setup'); + + our %setup; + +-# From here we can setup @INC so any needed perl module can be found. We add +-# as many 'use lib' directive as needed +-# We could also define '%setup' hash while useful +- +-# Here is a sample working from sources directory or its bin subfolder +-if (-d 'lib') { +- use lib './lib' ; +- +- %setup = ( +- confdir => './etc', +- datadir => './share', +- libdir => './lib', +- vardir => './var', +- ); +- +-} elsif (-d '../lib') { +- use lib '../lib'; +- +- %setup = ( +- confdir => '../etc', +- datadir => '../share', +- libdir => '../lib', +- vardir => '../var', +- ); +-} ++%setup = ( ++ confdir => 'CONFDIR', ++ datadir => 'DATADIR', ++ libdir => 'LIBDIR', ++ vardir => 'VARDIR', ++); + + 1; diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index dd6fa60..d8e4319 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -9,12 +9,11 @@ Group: Applications/System License: GPLv2+ URL: http://fusioninventory.org/ -Version: 2.3.18 +Version: 2.3.19 Release: 1%{?dist} Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz Source1: %{name}.cron -#Apply https://github.com/fusioninventory/fusioninventory-agent/commit/25404f038f99bd091e0fb2368879e848500f5082 -Patch0: %{name}-useless-module-cleaning +Patch0: %{name}-setup.pm.patch Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildRequires: perl(ExtUtils::MakeMaker) @@ -152,6 +151,12 @@ FusionInventory agent %setup -q -n FusionInventory-Agent-%{version} %patch0 -p1 +sed \ + -e "s|CONFDIR|%{_sysconfdir}/fusioninventory|" \ + -e "s|DATADIR|%{_datarootdir}/fusioninventory|" \ + -e "s|LIBDIR|%{_datarootdir}/fusioninventory/lib|" \ + -e "s|VARDIR|%{_sharedstatedir}/fusioninventory|" \ + -i bin/setup.pm sed -i contrib/unix/%{name}.init.redhat \ -e "s/Default-Start: 3 5/Default-Start:/" @@ -188,6 +193,21 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin # Global options (debug for verbose log, rpc-trust-localhost for yum-plugin) OPTIONS="--debug " +# Mode, change to "cron" to activate +# - none (default on install) no activity +# - cron (inventory only) use the cron.hourly +OCSMODE[0]=none +# OCS Inventory or FusionInventory server URI +# OCSSERVER[0]=your.ocsserver.name +# OCSSERVER[0]=http://your.ocsserver.name/ocsinventory +# OCSSERVER[0]=http://your.glpiserveur.name/glpi/plugins/fusioninventory/ +# corresponds with --local=%{_localstatedir}/lib/%{name} +# OCSSERVER[0]=local +# Wait before inventory (for cron mode) +OCSPAUSE[0]=120 +# Administrative TAG (optional, must be filed before first inventory) +OCSTAG[0]= + EOF @@ -309,6 +329,9 @@ exit 0 %changelog +* Mon Feb 20 2017 Johan Cwiklinski - 2.3.19-1 +- Last upstream release + * Tue Jun 21 2016 Johan Cwiklinski - 2.3.18-1 - Last upstream release - Add task-* subpackages diff --git a/sources b/sources index 523b6a9..6877158 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -caffff2fe695b2262529aa7541f1b94a FusionInventory-Agent-2.3.18.tar.gz +SHA512 (FusionInventory-Agent-2.3.19.tar.gz) = 438b2df00d82ae272106ce5f3bb5006afe58e67651f566e7d1b3c1f4a508f0f523dca7f01dfad73f845b537de7c3a51fdaf09a9d098a955cfce331b2f8d2aaa1 From aa576531011f8547bab3db3c8a7d9e4c60bb7e1e Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Tue, 6 Jun 2017 10:04:56 +0200 Subject: [PATCH 5/9] Update to latest upstream release Drop patches applied upstream --- .gitignore | 1 + fusioninventory-agent-setup.pm.patch | 41 ---------------------------- fusioninventory-agent.spec | 15 ++++------ sources | 2 +- 4 files changed, 7 insertions(+), 52 deletions(-) delete mode 100644 fusioninventory-agent-setup.pm.patch diff --git a/.gitignore b/.gitignore index c7353d8..97cba75 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /FusionInventory-Agent-2.1.14.tar.gz /FusionInventory-Agent-2.3.18.tar.gz /FusionInventory-Agent-2.3.19.tar.gz +/FusionInventory-Agent-2.3.20.tar.gz diff --git a/fusioninventory-agent-setup.pm.patch b/fusioninventory-agent-setup.pm.patch deleted file mode 100644 index 045dd9d..0000000 --- a/fusioninventory-agent-setup.pm.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/bin/setup.pm b/bin/setup.pm -index 3f92279..c7132f0 100644 ---- a/bin/setup.pm -+++ b/bin/setup.pm -@@ -8,30 +8,11 @@ our @EXPORT = ('%setup'); - - our %setup; - --# From here we can setup @INC so any needed perl module can be found. We add --# as many 'use lib' directive as needed --# We could also define '%setup' hash while useful -- --# Here is a sample working from sources directory or its bin subfolder --if (-d 'lib') { -- use lib './lib' ; -- -- %setup = ( -- confdir => './etc', -- datadir => './share', -- libdir => './lib', -- vardir => './var', -- ); -- --} elsif (-d '../lib') { -- use lib '../lib'; -- -- %setup = ( -- confdir => '../etc', -- datadir => '../share', -- libdir => '../lib', -- vardir => '../var', -- ); --} -+%setup = ( -+ confdir => 'CONFDIR', -+ datadir => 'DATADIR', -+ libdir => 'LIBDIR', -+ vardir => 'VARDIR', -+); - - 1; diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index d8e4319..9181db8 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -9,11 +9,10 @@ Group: Applications/System License: GPLv2+ URL: http://fusioninventory.org/ -Version: 2.3.19 +Version: 2.3.20 Release: 1%{?dist} Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz Source1: %{name}.cron -Patch0: %{name}-setup.pm.patch Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildRequires: perl(ExtUtils::MakeMaker) @@ -150,14 +149,6 @@ FusionInventory agent %prep %setup -q -n FusionInventory-Agent-%{version} -%patch0 -p1 -sed \ - -e "s|CONFDIR|%{_sysconfdir}/fusioninventory|" \ - -e "s|DATADIR|%{_datarootdir}/fusioninventory|" \ - -e "s|LIBDIR|%{_datarootdir}/fusioninventory/lib|" \ - -e "s|VARDIR|%{_sharedstatedir}/fusioninventory|" \ - -i bin/setup.pm - sed -i contrib/unix/%{name}.init.redhat \ -e "s/Default-Start: 3 5/Default-Start:/" @@ -329,6 +320,10 @@ exit 0 %changelog +* Tue Jun 06 2017 Johan Cwiklinski - 2.3.20-1 +- Last upstream release +- Drop patches, upstream has provided fixes + * Mon Feb 20 2017 Johan Cwiklinski - 2.3.19-1 - Last upstream release diff --git a/sources b/sources index 6877158..2adf09a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (FusionInventory-Agent-2.3.19.tar.gz) = 438b2df00d82ae272106ce5f3bb5006afe58e67651f566e7d1b3c1f4a508f0f523dca7f01dfad73f845b537de7c3a51fdaf09a9d098a955cfce331b2f8d2aaa1 +SHA512 (FusionInventory-Agent-2.3.20.tar.gz) = 3037a6af26e9b670c249a95755891c9bbd77ade50b4ec3c0cbcbd8b61085e2181414d2e74d6f7351806165ccde47b02b2a4aa5f91b5f0649577ee2d6f8d6c717 From e1bed0266f760b0ad372a5470fc2bbfbd7f05c53 Mon Sep 17 00:00:00 2001 From: jehane Date: Tue, 1 Aug 2017 14:45:29 +0200 Subject: [PATCH 6/9] new version --- .gitignore | 1 + fusioninventory-agent.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 97cba75..fbd85d8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /FusionInventory-Agent-2.3.18.tar.gz /FusionInventory-Agent-2.3.19.tar.gz /FusionInventory-Agent-2.3.20.tar.gz +/FusionInventory-Agent-2.3.21.tar.gz diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index 9181db8..bc451fd 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -9,7 +9,7 @@ Group: Applications/System License: GPLv2+ URL: http://fusioninventory.org/ -Version: 2.3.20 +Version: 2.3.21 Release: 1%{?dist} Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz Source1: %{name}.cron @@ -320,6 +320,9 @@ exit 0 %changelog +* Tue Aug 01 2017 Marianne Lombard - 2.3.21 +- Last upstream release + * Tue Jun 06 2017 Johan Cwiklinski - 2.3.20-1 - Last upstream release - Drop patches, upstream has provided fixes diff --git a/sources b/sources index 2adf09a..ac42af3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (FusionInventory-Agent-2.3.20.tar.gz) = 3037a6af26e9b670c249a95755891c9bbd77ade50b4ec3c0cbcbd8b61085e2181414d2e74d6f7351806165ccde47b02b2a4aa5f91b5f0649577ee2d6f8d6c717 +SHA512 (FusionInventory-Agent-2.3.21.tar.gz) = 5f5628b4851431fe0c93ebfffdc91281efaa8aed721cf79439dbb738bfc765d3d01bb5e639de7dd2fcfc06537f7b472ea8b14ae4b9e6e5c408b68039a8b2185e From dcadaccf9ab3e47940103d846c196d52c92e1a3e Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Mon, 14 Aug 2017 08:24:52 +0200 Subject: [PATCH 7/9] Add missing provides on perl(setup) --- fusioninventory-agent.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index bc451fd..f8cc810 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -10,7 +10,7 @@ License: GPLv2+ URL: http://fusioninventory.org/ Version: 2.3.21 -Release: 1%{?dist} +Release: 2%{?dist} Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz Source1: %{name}.cron @@ -68,6 +68,7 @@ Requires: perl(Net::SSLeay) Requires: perl(Proc::Daemon) Requires: perl(Proc::PID::File) Requires: perl(Socket::GetAddrInfo) +Provides: perl(setup) = %{version}-%{release} %description -n perl-FusionInventory-Agent Libraries for Fusioninventory agent. @@ -320,7 +321,10 @@ exit 0 %changelog -* Tue Aug 01 2017 Marianne Lombard - 2.3.21 +* Thu Aug 10 2017 Johan Cwiklinski - 2.3.21-2 +- Fix missing provides issue on perl(setup) + +* Tue Aug 01 2017 Marianne Lombard - 2.3.21-1 - Last upstream release * Tue Jun 06 2017 Johan Cwiklinski - 2.3.20-1 From 137e090ce2b756fc5bca7e947b7dd9f8e3192890 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Wed, 18 Oct 2017 09:06:53 +0200 Subject: [PATCH 8/9] Do not provides perl(setup); BZ #1485919 - thanks to E. Seyman --- fusioninventory-agent.spec | 47 +++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index f8cc810..b84c414 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -10,7 +10,7 @@ License: GPLv2+ URL: http://fusioninventory.org/ Version: 2.3.21 -Release: 2%{?dist} +Release: 3%{?dist} Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz Source1: %{name}.cron @@ -29,9 +29,10 @@ Requires(preun): /sbin/chkconfig, /sbin/service Requires(postun): /sbin/service # excluding internal requires and windows stuff -%global __provides_exclude %{?__provides_exclude:__provides_exclude|}^perl\\(FusionInventory:: -%global __requires_exclude %{?__requires_exclude:__requires_exclude|}^perl\\(FusionInventory:: -%global __requires_exclude %__requires_exclude|^perl\\(Win32 +# 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 FusionInventory Agent is an application designed to help a network @@ -68,7 +69,6 @@ Requires: perl(Net::SSLeay) Requires: perl(Proc::Daemon) Requires: perl(Proc::PID::File) Requires: perl(Socket::GetAddrInfo) -Provides: perl(setup) = %{version}-%{release} %description -n perl-FusionInventory-Agent Libraries for Fusioninventory agent. @@ -76,7 +76,7 @@ Libraries for Fusioninventory agent. %package task-esx Summary: FusionInventory plugin to inventory vCenter/ESX/ESXi BuildArch: noarch -Requires: fusioninventory-agent = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description task-esx fusioninventory-agent-task-ESX ask the running service agent to inventory an @@ -99,7 +99,7 @@ This requires the service to be running with the --rpc-trust-localhost option. Summary: NetDiscovery and NetInventory task for FusionInventory Group: Applications/System BuildArch: noarch -Requires: fusioninventory-agent = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description task-network fusioninventory-task-netdiscovery and fusioninventory-task-netinventory @@ -108,27 +108,29 @@ fusioninventory-task-netdiscovery and fusioninventory-task-netinventory Summary: Software deployment support for FusionInventory agent Group: Applications/System BuildArch: noarch -Requires: fusioninventory-agent = %{version}-%{release} +Requires: %{name} = %{version}-%{release} Requires: perl(Archive::Extract) %description task-deploy This package provides software deployment support for FusionInventory-agent +%if !%{defined perl_net_write} # Excluded due to the absence of perl-Net-Write # perl-Net-Write is licenced under Artistic Perl v1 licence, not accepted in Fedora -#%%package task-wakeonlan -#Summary: WakeOnLan task for FusionInventory -#Group: Applications/System -#BuildArch: noarch -#Requires: fusioninventory-agent = %%{version}-%%{release} +%package task-wakeonlan +Summary: WakeOnLan task for FusionInventory +Group: Applications/System +BuildArch: noarch +Requires: %{name} = %{version}-%{release} -#%%description task-wakeonlan -#fusioninventory-task-wakeonlan +%description task-wakeonlan +fusioninventory-task-wakeonlan +%endif %package task-inventory Summary: Inventory task for FusionInventory Group: Applications/System -Requires: fusioninventory-agent = %{version}-%{release} +Requires: %{name} = %{version}-%{release} Requires: perl(Net::CUPS) #This one is not available on EL6 for now; #and this is a "recommanded", not a required one. @@ -153,16 +155,6 @@ FusionInventory agent sed -i contrib/unix/%{name}.init.redhat \ -e "s/Default-Start: 3 5/Default-Start:/" -# This work only on older version, and is ignored on recent -cat < - 2.3.21-3 +- Do not provides perl(setup); BZ #1485919 - thanks to E. Seyman + * Thu Aug 10 2017 Johan Cwiklinski - 2.3.21-2 - Fix missing provides issue on perl(setup) From 8ea08299bef1610b8da90f098c63c3dfbd927185 Mon Sep 17 00:00:00 2001 From: jehane Date: Sat, 25 Nov 2017 12:53:34 +0100 Subject: [PATCH 9/9] Fixing perl filter --- fusioninventory-agent.spec | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index b84c414..6e8c29d 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -10,7 +10,7 @@ License: GPLv2+ URL: http://fusioninventory.org/ Version: 2.3.21 -Release: 3%{?dist} +Release: 4%{?dist} Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz Source1: %{name}.cron @@ -30,9 +30,12 @@ Requires(postun): /sbin/service # 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\\)$ +#%{?perl_default_filter} +#%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(setup\\)$ +#%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Win32|setup\\)$ +%filter_from_requires /perl(setup)/d; /perl(Win32.*)/d +%filter_from_provides /perl(setup)/d +%filter_setup %description FusionInventory Agent is an application designed to help a network @@ -313,6 +316,9 @@ exit 0 %changelog +* Sat Nov 25 2017 Mairanne Lombard - 2.3.21-4 +- Fix perl filter issues; BZ #145919 - thanks to Jitka Plesnikova + * Mon Oct 16 2017 Johan Cwiklinski - 2.3.21-3 - Do not provides perl(setup); BZ #1485919 - thanks to E. Seyman