From 57305b54243f41e58ce63b86b702bc28e7a98864 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Tue, 18 Dec 2018 17:50:06 +0100 Subject: [PATCH 01/11] Rebuild with last perl --- fusioninventory-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index 4fbb79a..21123e0 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -10,7 +10,7 @@ License: GPLv2+ URL: http://fusioninventory.org/ Version: 2.4.2 -Release: 1%{?dist} +Release: 2%{?dist} Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz Source1: %{name}.cron Source10: %{name}.service @@ -307,6 +307,9 @@ install -m 644 -D contrib/yum-plugin/%{name}.conf %{buildroot}%{_sysconfdir}/yum %changelog +* Tue Dec 18 2018 Johan Cwiklinski - 2.4.2-2 +- Rebuild for BZ #1650041 + * Wed Oct 03 2018 Johan Cwiklinski - 2.4.2-1 - Last upstream release - Drop patch applied upstream From 72a1f782a346681fd52a6c9ee5851bbf00247fb8 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Mon, 25 Feb 2019 15:31:35 +0100 Subject: [PATCH 02/11] New upstream release --- .gitignore | 1 + fusioninventory-agent.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0636e04..b4e0edf 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /FusionInventory-Agent-2.4.tar.gz /FusionInventory-Agent-2.4.1.tar.gz /FusionInventory-Agent-2.4.2.tar.gz +/FusionInventory-Agent-2.4.3.tar.gz diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index 21123e0..91dc209 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -9,8 +9,8 @@ Group: Applications/System License: GPLv2+ URL: http://fusioninventory.org/ -Version: 2.4.2 -Release: 2%{?dist} +Version: 2.4.3 +Release: 1%{?dist} Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz Source1: %{name}.cron Source10: %{name}.service @@ -307,6 +307,9 @@ install -m 644 -D contrib/yum-plugin/%{name}.conf %{buildroot}%{_sysconfdir}/yum %changelog +* Mon Feb 25 2019 Johan Cwiklinski - 2.4.3-1 +- Last upstream release + * Tue Dec 18 2018 Johan Cwiklinski - 2.4.2-2 - Rebuild for BZ #1650041 diff --git a/sources b/sources index 5171ea3..bc0e88a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (FusionInventory-Agent-2.4.2.tar.gz) = 02da9013011de3964ffff5f320516aa1a44aa0bc88f4b5ca5de0224feb7567ed9cb5c3529309ce42bfcc87cbb20f131d88c95ebe2136eb18d35b2837cebda45f +SHA512 (FusionInventory-Agent-2.4.3.tar.gz) = 079ce8355b347c213e330c0f5652da524579a29d72c668a05ec0a80978e9a113c8310f4e243a52151c03dfacd25014b2010aebc4ec3ea19b14bf320fd060964f From 4c45e7a340bd3f16857213b1dd098d3e7ce64105 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:44 +0100 Subject: [PATCH 03/11] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- fusioninventory-agent.spec | 8 -------- 1 file changed, 8 deletions(-) diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index 91dc209..5b9c907 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -5,7 +5,6 @@ Name: fusioninventory-agent Summary: FusionInventory agent -Group: Applications/System License: GPLv2+ URL: http://fusioninventory.org/ @@ -84,7 +83,6 @@ VMWare vCenter/ESX/ESXi server through SOAP interface %package yum-plugin Summary: Ask FusionInventory agent to send an inventory when yum exits -Group: System Environment/Base BuildArch: noarch Requires: yum Requires: %{name} @@ -97,7 +95,6 @@ This requires the service to be running with the --rpc-trust-localhost option. %package task-network Summary: NetDiscovery and NetInventory task for FusionInventory -Group: Applications/System BuildArch: noarch Requires: %{name} = %{version}-%{release} @@ -106,7 +103,6 @@ fusioninventory-task-netdiscovery and fusioninventory-task-netinventory %package task-deploy Summary: Software deployment support for FusionInventory agent -Group: Applications/System BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: perl(Archive::Extract) @@ -119,7 +115,6 @@ This package provides software deployment support for FusionInventory-agent # 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: %{name} = %{version}-%{release} @@ -129,7 +124,6 @@ fusioninventory-task-wakeonlan %package task-inventory Summary: Inventory task for FusionInventory -Group: Applications/System Requires: %{name} = %{version}-%{release} Requires: perl(Net::CUPS) Requires: perl(Parse::EDID) @@ -139,7 +133,6 @@ fusioninventory-task-inventory %package task-collect Summary: Custom information retrieval support for FusionInventory agent -Group: Applications/System Requires: %{name} = %{version}-%{release} %description task-collect @@ -148,7 +141,6 @@ FusionInventory agent %package cron Summary: Cron for FusionInventory agent -Group: Applications/System Requires: %{name} = %{version}-%{release} %description cron From 3f4c4c00ba7885e7b2ffcad182624466c8050cd9 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Tue, 26 Feb 2019 17:36:17 +0100 Subject: [PATCH 04/11] Remove dependency on yum --- fusioninventory-agent.spec | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index 5b9c907..607fdde 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -9,7 +9,7 @@ License: GPLv2+ URL: http://fusioninventory.org/ Version: 2.4.3 -Release: 1%{?dist} +Release: 2%{?dist} Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz Source1: %{name}.cron Source10: %{name}.service @@ -81,17 +81,6 @@ Requires: %{name} = %{version}-%{release} 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 -BuildArch: noarch -Requires: yum -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. %package task-network Summary: NetDiscovery and NetInventory task for FusionInventory @@ -167,7 +156,7 @@ cat < - 2.4.3-2 +- Remove yum plugin (and therefore dependency on yum) + * Mon Feb 25 2019 Johan Cwiklinski - 2.4.3-1 - Last upstream release From 553d0bf5ceed0ed10c18ff5155116d28d2a9a938 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Tue, 26 Feb 2019 17:38:03 +0100 Subject: [PATCH 05/11] Fix syntax --- fusioninventory-agent.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index 607fdde..86d93f3 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -281,7 +281,7 @@ install -m 644 -D %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service %changelog -- Tue Deb 26 2019 Johan Cwiklinski - 2.4.3-2 +* Tue Feb 26 2019 Johan Cwiklinski - 2.4.3-2 - Remove yum plugin (and therefore dependency on yum) * Mon Feb 25 2019 Johan Cwiklinski - 2.4.3-1 From f49e16c4c4fa9119f0bce1c952b754efff9de61c Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Mon, 15 Apr 2019 10:48:14 +0200 Subject: [PATCH 06/11] New upstream release, drop task files from main perl package --- .gitignore | 1 + fusioninventory-agent-7ae7c838b.patch | 56 +++++++++++++++++++++++++++ fusioninventory-agent.spec | 27 +++++++++---- sources | 2 +- 4 files changed, 78 insertions(+), 8 deletions(-) create mode 100644 fusioninventory-agent-7ae7c838b.patch diff --git a/.gitignore b/.gitignore index b4e0edf..2f5d9f1 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /FusionInventory-Agent-2.4.1.tar.gz /FusionInventory-Agent-2.4.2.tar.gz /FusionInventory-Agent-2.4.3.tar.gz +/FusionInventory-Agent-2.5.tar.gz diff --git a/fusioninventory-agent-7ae7c838b.patch b/fusioninventory-agent-7ae7c838b.patch new file mode 100644 index 0000000..ba96d23 --- /dev/null +++ b/fusioninventory-agent-7ae7c838b.patch @@ -0,0 +1,56 @@ +From 7ae7c838b156ba1b6bf89ab60ba9c8df04532dd0 Mon Sep 17 00:00:00 2001 +From: Guillaume Bougard +Date: Sat, 13 Apr 2019 18:47:36 +0200 +Subject: [PATCH] fix: Add few minor fixes + +* build: fix fusioninventory-remoteinventory was not installed +* inventory: fix error message while starting fusioninventory-inventory script +--- + Changes | 8 ++++++++ + Makefile.PL | 1 + + lib/FusionInventory/Agent/Task/Inventory.pm | 2 +- + 3 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/Changes b/Changes +index 83be862d0d..36849904a7 100644 +--- a/Changes ++++ b/Changes +@@ -1,5 +1,13 @@ + Revision history for FusionInventory agent + ++2.5.1 not relased yet ++ ++core: ++* build: fix fusioninventory-remoteinventory was not installed ++ ++inventory: ++* fix error message while starting fusioninventory-inventory script ++ + 2.5 Fri, 12 Apr 2019 + + core: +diff --git a/Makefile.PL b/Makefile.PL +index 38e6eebdca..71aae700c9 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -104,6 +104,7 @@ install_script 'bin/fusioninventory-wakeonlan'; + install_script 'bin/fusioninventory-netdiscovery'; + install_script 'bin/fusioninventory-netinventory'; + install_script 'bin/fusioninventory-esx'; ++install_script 'bin/fusioninventory-remoteinventory'; + + resources + homepage => "http://www.fusioninventory.org", +diff --git a/lib/FusionInventory/Agent/Task/Inventory.pm b/lib/FusionInventory/Agent/Task/Inventory.pm +index 84a3cafbda..8fb2cd8806 100644 +--- a/lib/FusionInventory/Agent/Task/Inventory.pm ++++ b/lib/FusionInventory/Agent/Task/Inventory.pm +@@ -59,7 +59,7 @@ sub run { + tag => $tag + ); + +- $self->{logger}->info("New inventory from $self->{deviceid} for $self->{target}->{id}". ++ $self->{logger}->info("New inventory from ".$inventory->getDeviceId()." for $self->{target}->{id}". + ( (defined($tag) && length($tag)) ? " (tag=$tag)" : "" )); + + # Set inventory as remote if running remote inventory like from wmi task diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index 86d93f3..3286d19 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -8,11 +8,12 @@ Summary: FusionInventory agent License: GPLv2+ URL: http://fusioninventory.org/ -Version: 2.4.3 -Release: 2%{?dist} +Version: 2.5 +Release: 1%{?dist} Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz Source1: %{name}.cron Source10: %{name}.service +Patch0: fusioninventory-agent-7ae7c838b.patch Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildRequires: perl-generators @@ -139,6 +140,9 @@ fusioninventory cron task %prep %setup -q -n FusionInventory-Agent-%{version} +%patch0 -p1 + + sed \ -e "s/logger = .*/logger = syslog/" \ -e "s/logfacility = .*/logfacility = LOG_DAEMON/" \ @@ -221,6 +225,10 @@ install -m 644 -D %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service %dir %{_sysconfdir}/fusioninventory %config(noreplace) %{_sysconfdir}/fusioninventory/agent.cfg %config(noreplace) %{_sysconfdir}/fusioninventory/conf.d +%config(noreplace) %{_sysconfdir}/fusioninventory/inventory-server-plugin.cfg +%config(noreplace) %{_sysconfdir}/fusioninventory/server-test-plugin.cfg +%config(noreplace) %{_sysconfdir}/fusioninventory/ssl-server-plugin.cfg + %{_unitdir}/%{name}.service %dir %{_sysconfdir}/systemd/system/%{name}.service.d %{_bindir}/fusioninventory-agent @@ -233,13 +241,12 @@ install -m 644 -D %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service %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 +#excluding sub-packages files +%exclude %{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/* %{_datadir}/fusioninventory %files task-esx @@ -264,11 +271,12 @@ install -m 644 -D %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service #%%files task-wakeonlan %exclude %{_bindir}/fusioninventory-wakeonlan %exclude %{_mandir}/man1/fusioninventory-wakeonlan.1* -%exclude %{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/WakeOnLan.pm +#%%exclude %%{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/WakeOnLan.pm %files task-inventory %{_bindir}/fusioninventory-inventory -%{_mandir}/man1/fusioninventory-inventory.1* +%{_bindir}/fusioninventory-remoteinventory +%{_mandir}/man1/fusioninventory-*inventory.1* %{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/Inventory.pm %{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/Inventory @@ -281,6 +289,11 @@ install -m 644 -D %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service %changelog +* Mon Apr 15 2019 Johan Cwiklinski - 2.5-1 +- Last upstream release +- Tasks files were provided also in main perl package +- Apply upstream minor fixes patch + * Tue Feb 26 2019 Johan Cwiklinski - 2.4.3-2 - Remove yum plugin (and therefore dependency on yum) diff --git a/sources b/sources index bc0e88a..9479a53 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (FusionInventory-Agent-2.4.3.tar.gz) = 079ce8355b347c213e330c0f5652da524579a29d72c668a05ec0a80978e9a113c8310f4e243a52151c03dfacd25014b2010aebc4ec3ea19b14bf320fd060964f +SHA512 (FusionInventory-Agent-2.5.tar.gz) = 37f0545df716e482fffd018a56b9c7482d7fce64fd0fa277c481a553a2108e7588f34077fb4775bb6352668efc96b3525fe97b1d6331d637401e8db8c0c91333 From 9db3a5f9a36c8fc9215771bcbef250cae3a6bbca Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Mon, 15 Apr 2019 11:31:57 +0200 Subject: [PATCH 07/11] Add wakeonlan task --- fusioninventory-agent.spec | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index 3286d19..d52ae9e 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -57,7 +57,7 @@ You can add additional packages for optional tasks: * fusioninventory-agent-task-collect Custom information retrieval support * fusioninventory-agent-task-wakeonlan - not included due to a licensing issue for perl-Net-Write + Wake o lan task %package -n perl-FusionInventory-Agent @@ -100,9 +100,6 @@ 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 BuildArch: noarch @@ -110,7 +107,6 @@ Requires: %{name} = %{version}-%{release} %description task-wakeonlan fusioninventory-task-wakeonlan -%endif %package task-inventory Summary: Inventory task for FusionInventory @@ -267,11 +263,10 @@ install -m 644 -D %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service %{_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-wakeonlan +%{_bindir}/fusioninventory-wakeonlan +%{_mandir}/man1/fusioninventory-wakeonlan.1* +%{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/WakeOnLan.pm %files task-inventory %{_bindir}/fusioninventory-inventory @@ -293,6 +288,7 @@ install -m 644 -D %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service - Last upstream release - Tasks files were provided also in main perl package - Apply upstream minor fixes patch +- task-wakeonlan is back (see https://github.com/fusioninventory/fusioninventory-agent/issues/495#issuecomment-435110369 about dependancy issue) * Tue Feb 26 2019 Johan Cwiklinski - 2.4.3-2 - Remove yum plugin (and therefore dependency on yum) From 5fee35e6d1c5dfa6d88449c27ec9b3bfbaff4407 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Thu, 18 Apr 2019 13:43:17 +0200 Subject: [PATCH 08/11] Re-add tasks files in main perl package, to solve dependencies issues on package --- fusioninventory-agent.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index d52ae9e..68dd2f2 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -9,7 +9,7 @@ License: GPLv2+ URL: http://fusioninventory.org/ Version: 2.5 -Release: 1%{?dist} +Release: 2%{?dist} Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz Source1: %{name}.cron Source10: %{name}.service @@ -242,7 +242,7 @@ install -m 644 -D %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service %files -n perl-FusionInventory-Agent %doc Changes LICENSE THANKS #excluding sub-packages files -%exclude %{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/* +#%%exclude %%{_datadir}/fusioninventory/lib/FusionInventory/Agent/Task/* %{_datadir}/fusioninventory %files task-esx @@ -284,6 +284,9 @@ install -m 644 -D %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service %changelog +* Thu Apr 18 2019 Johan Cwiklinski - 2.5-2 +- Re-add tasks files in main perl package, to solve dependencies issues on package + * Mon Apr 15 2019 Johan Cwiklinski - 2.5-1 - Last upstream release - Tasks files were provided also in main perl package From 802c2bbdd42905685096725b634a2c94ac4a3114 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Thu, 2 May 2019 11:21:09 +0200 Subject: [PATCH 09/11] Fix httpd server plugin integration --- fix-httpd-plugins-configs-folder.patch | 21 +++++++++++++++++++++ fix-install-httpd-plugins-configs.patch | 17 +++++++++++++++++ fusioninventory-agent-7ae7c838b.patch | 21 +-------------------- fusioninventory-agent.spec | 11 +++++++++-- 4 files changed, 48 insertions(+), 22 deletions(-) create mode 100644 fix-httpd-plugins-configs-folder.patch create mode 100644 fix-install-httpd-plugins-configs.patch diff --git a/fix-httpd-plugins-configs-folder.patch b/fix-httpd-plugins-configs-folder.patch new file mode 100644 index 0000000..9db5b8c --- /dev/null +++ b/fix-httpd-plugins-configs-folder.patch @@ -0,0 +1,21 @@ +commit b4710078310e9a5243932ab90b77b760fa97faa3 +Author: Guillaume Bougard +Date: Tue Apr 30 12:56:06 2019 +0200 + + fix: HTTP server plugins base configuration folder + +diff --git a/lib/FusionInventory/Agent/HTTP/Server/Plugin.pm b/lib/FusionInventory/Agent/HTTP/Server/Plugin.pm +index 5d570aab5..1076eb30e 100644 +--- a/lib/FusionInventory/Agent/HTTP/Server/Plugin.pm ++++ b/lib/FusionInventory/Agent/HTTP/Server/Plugin.pm +@@ -23,6 +23,10 @@ sub new { + + bless $self, $class; + ++ # Import _confdir from agent configuration ++ $self->{_confdir} = $self->{server}->{agent}->{config}->{_confdir} ++ if $self->{server}; ++ + # Check _confdir imported from FusionInventory::Agent::Config + unless ($self->{_confdir} && -d $self->{_confdir}) { + # Set absolute confdir from default if replaced by Makefile otherwise search diff --git a/fix-install-httpd-plugins-configs.patch b/fix-install-httpd-plugins-configs.patch new file mode 100644 index 0000000..3fabbc2 --- /dev/null +++ b/fix-install-httpd-plugins-configs.patch @@ -0,0 +1,17 @@ +diff --git a/Makefile.PL b/Makefile.PL +index 38e6eebdc..db2edcf5e 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -245,10 +245,10 @@ config_install : pure_install + do \ + if $(TEST_F) $(DESTDIR)/$(SYSCONFDIR)/$$config; then \ + $(RM_F) $(DESTDIR)$(SYSCONFDIR)/$$config.new; \ +- $(CP) etc/agent.cfg $(DESTDIR)$(SYSCONFDIR)/$$config.new; \ ++ $(CP) etc/$$config $(DESTDIR)$(SYSCONFDIR)/$$config.new; \ + $(CHMOD) $(PERM_RW) $(DESTDIR)$(SYSCONFDIR)/$$config.new; \ + else \ +- $(CP) etc/agent.cfg $(DESTDIR)$(SYSCONFDIR)/$$config; \ ++ $(CP) etc/$$config $(DESTDIR)$(SYSCONFDIR)/$$config; \ + $(CHMOD) $(PERM_RW) $(DESTDIR)$(SYSCONFDIR)/$$config; \ + fi; \ + done diff --git a/fusioninventory-agent-7ae7c838b.patch b/fusioninventory-agent-7ae7c838b.patch index ba96d23..cafe66c 100644 --- a/fusioninventory-agent-7ae7c838b.patch +++ b/fusioninventory-agent-7ae7c838b.patch @@ -6,29 +6,10 @@ Subject: [PATCH] fix: Add few minor fixes * build: fix fusioninventory-remoteinventory was not installed * inventory: fix error message while starting fusioninventory-inventory script --- - Changes | 8 ++++++++ Makefile.PL | 1 + lib/FusionInventory/Agent/Task/Inventory.pm | 2 +- - 3 files changed, 10 insertions(+), 1 deletion(-) + 2 files changed, 2 insertions(+), 1 deletion(-) -diff --git a/Changes b/Changes -index 83be862d0d..36849904a7 100644 ---- a/Changes -+++ b/Changes -@@ -1,5 +1,13 @@ - Revision history for FusionInventory agent - -+2.5.1 not relased yet -+ -+core: -+* build: fix fusioninventory-remoteinventory was not installed -+ -+inventory: -+* fix error message while starting fusioninventory-inventory script -+ - 2.5 Fri, 12 Apr 2019 - - core: diff --git a/Makefile.PL b/Makefile.PL index 38e6eebdca..71aae700c9 100644 --- a/Makefile.PL diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index 68dd2f2..0520986 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -9,11 +9,13 @@ License: GPLv2+ URL: http://fusioninventory.org/ Version: 2.5 -Release: 2%{?dist} +Release: 3%{?dist} Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz Source1: %{name}.cron Source10: %{name}.service Patch0: fusioninventory-agent-7ae7c838b.patch +Patch1: fix-install-httpd-plugins-configs.patch +Patch2: fix-httpd-plugins-configs-folder.patch Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildRequires: perl-generators @@ -137,6 +139,8 @@ fusioninventory cron task %setup -q -n FusionInventory-Agent-%{version} %patch0 -p1 +%patch1 -p1 +%patch2 -p1 sed \ @@ -284,10 +288,13 @@ install -m 644 -D %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service %changelog +* Thu May 02 2019 Guillaume Bougard - 2.5-3 +- Add patches to fix agent HTTP server plugins integration + * Thu Apr 18 2019 Johan Cwiklinski - 2.5-2 - Re-add tasks files in main perl package, to solve dependencies issues on package -* Mon Apr 15 2019 Johan Cwiklinski - 2.5-1 +* Mon Apr 15 2019 Johan Cwiklinski - 2.5-1 - Last upstream release - Tasks files were provided also in main perl package - Apply upstream minor fixes patch From 8099f246e4f40aacb2d9ee2917b3953b0c21cfbc Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Tue, 7 May 2019 14:47:06 +0200 Subject: [PATCH 10/11] Add patch to fix SSL on with http modules --- fusioninventory-agent-d4f29af.patch | 23 +++++++++++++++++++++++ fusioninventory-agent.spec | 7 ++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 fusioninventory-agent-d4f29af.patch diff --git a/fusioninventory-agent-d4f29af.patch b/fusioninventory-agent-d4f29af.patch new file mode 100644 index 0000000..8282318 --- /dev/null +++ b/fusioninventory-agent-d4f29af.patch @@ -0,0 +1,23 @@ +From d4f29affa9c9b8e80ea53171570c6d70eab28027 Mon Sep 17 00:00:00 2001 +From: Guillaume Bougard +Date: Tue, 7 May 2019 14:33:09 +0200 +Subject: [PATCH] fix: Keep HTTP Server SSL plugin sessions opened + +--- + lib/FusionInventory/Agent/HTTP/Server/SSL.pm | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/lib/FusionInventory/Agent/HTTP/Server/SSL.pm b/lib/FusionInventory/Agent/HTTP/Server/SSL.pm +index f6238104a5..32442ec2cc 100644 +--- a/lib/FusionInventory/Agent/HTTP/Server/SSL.pm ++++ b/lib/FusionInventory/Agent/HTTP/Server/SSL.pm +@@ -139,6 +139,9 @@ sub new { + return; + } + ++ # Disable Timeout to leave SSL session opened until we get data ++ $client->timeout(0); ++ + $plugin->debug("HTTPD started new SSL session"); + + bless $client, $class; diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index 0520986..4bed140 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -9,13 +9,14 @@ License: GPLv2+ URL: http://fusioninventory.org/ Version: 2.5 -Release: 3%{?dist} +Release: 4%{?dist} Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz Source1: %{name}.cron Source10: %{name}.service Patch0: fusioninventory-agent-7ae7c838b.patch Patch1: fix-install-httpd-plugins-configs.patch Patch2: fix-httpd-plugins-configs-folder.patch +Patch3: fusioninventory-agent-d4f29af.patch Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildRequires: perl-generators @@ -141,6 +142,7 @@ fusioninventory cron task %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 sed \ @@ -288,6 +290,9 @@ install -m 644 -D %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service %changelog +* Tue May 07 2019 Johan Cwiklinski - 2.5-4 +- Add patch to fix SSL on with http modules + * Thu May 02 2019 Guillaume Bougard - 2.5-3 - Add patches to fix agent HTTP server plugins integration From c85c01388bd5c7b5aa40c5cf1c2cc3b8a9bf9235 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Mon, 8 Jul 2019 14:10:14 +0200 Subject: [PATCH 11/11] New upstream release --- .gitignore | 1 + fix-httpd-plugins-configs-folder.patch | 21 -------------- fix-install-httpd-plugins-configs.patch | 17 ------------ fusioninventory-agent-7ae7c838b.patch | 37 ------------------------- fusioninventory-agent-d4f29af.patch | 23 --------------- fusioninventory-agent.spec | 18 ++++-------- sources | 2 +- 7 files changed, 8 insertions(+), 111 deletions(-) delete mode 100644 fix-httpd-plugins-configs-folder.patch delete mode 100644 fix-install-httpd-plugins-configs.patch delete mode 100644 fusioninventory-agent-7ae7c838b.patch delete mode 100644 fusioninventory-agent-d4f29af.patch diff --git a/.gitignore b/.gitignore index 2f5d9f1..8607f58 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /FusionInventory-Agent-2.4.2.tar.gz /FusionInventory-Agent-2.4.3.tar.gz /FusionInventory-Agent-2.5.tar.gz +/FusionInventory-Agent-2.5.1.tar.gz diff --git a/fix-httpd-plugins-configs-folder.patch b/fix-httpd-plugins-configs-folder.patch deleted file mode 100644 index 9db5b8c..0000000 --- a/fix-httpd-plugins-configs-folder.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit b4710078310e9a5243932ab90b77b760fa97faa3 -Author: Guillaume Bougard -Date: Tue Apr 30 12:56:06 2019 +0200 - - fix: HTTP server plugins base configuration folder - -diff --git a/lib/FusionInventory/Agent/HTTP/Server/Plugin.pm b/lib/FusionInventory/Agent/HTTP/Server/Plugin.pm -index 5d570aab5..1076eb30e 100644 ---- a/lib/FusionInventory/Agent/HTTP/Server/Plugin.pm -+++ b/lib/FusionInventory/Agent/HTTP/Server/Plugin.pm -@@ -23,6 +23,10 @@ sub new { - - bless $self, $class; - -+ # Import _confdir from agent configuration -+ $self->{_confdir} = $self->{server}->{agent}->{config}->{_confdir} -+ if $self->{server}; -+ - # Check _confdir imported from FusionInventory::Agent::Config - unless ($self->{_confdir} && -d $self->{_confdir}) { - # Set absolute confdir from default if replaced by Makefile otherwise search diff --git a/fix-install-httpd-plugins-configs.patch b/fix-install-httpd-plugins-configs.patch deleted file mode 100644 index 3fabbc2..0000000 --- a/fix-install-httpd-plugins-configs.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/Makefile.PL b/Makefile.PL -index 38e6eebdc..db2edcf5e 100644 ---- a/Makefile.PL -+++ b/Makefile.PL -@@ -245,10 +245,10 @@ config_install : pure_install - do \ - if $(TEST_F) $(DESTDIR)/$(SYSCONFDIR)/$$config; then \ - $(RM_F) $(DESTDIR)$(SYSCONFDIR)/$$config.new; \ -- $(CP) etc/agent.cfg $(DESTDIR)$(SYSCONFDIR)/$$config.new; \ -+ $(CP) etc/$$config $(DESTDIR)$(SYSCONFDIR)/$$config.new; \ - $(CHMOD) $(PERM_RW) $(DESTDIR)$(SYSCONFDIR)/$$config.new; \ - else \ -- $(CP) etc/agent.cfg $(DESTDIR)$(SYSCONFDIR)/$$config; \ -+ $(CP) etc/$$config $(DESTDIR)$(SYSCONFDIR)/$$config; \ - $(CHMOD) $(PERM_RW) $(DESTDIR)$(SYSCONFDIR)/$$config; \ - fi; \ - done diff --git a/fusioninventory-agent-7ae7c838b.patch b/fusioninventory-agent-7ae7c838b.patch deleted file mode 100644 index cafe66c..0000000 --- a/fusioninventory-agent-7ae7c838b.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 7ae7c838b156ba1b6bf89ab60ba9c8df04532dd0 Mon Sep 17 00:00:00 2001 -From: Guillaume Bougard -Date: Sat, 13 Apr 2019 18:47:36 +0200 -Subject: [PATCH] fix: Add few minor fixes - -* build: fix fusioninventory-remoteinventory was not installed -* inventory: fix error message while starting fusioninventory-inventory script ---- - Makefile.PL | 1 + - lib/FusionInventory/Agent/Task/Inventory.pm | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/Makefile.PL b/Makefile.PL -index 38e6eebdca..71aae700c9 100644 ---- a/Makefile.PL -+++ b/Makefile.PL -@@ -104,6 +104,7 @@ install_script 'bin/fusioninventory-wakeonlan'; - install_script 'bin/fusioninventory-netdiscovery'; - install_script 'bin/fusioninventory-netinventory'; - install_script 'bin/fusioninventory-esx'; -+install_script 'bin/fusioninventory-remoteinventory'; - - resources - homepage => "http://www.fusioninventory.org", -diff --git a/lib/FusionInventory/Agent/Task/Inventory.pm b/lib/FusionInventory/Agent/Task/Inventory.pm -index 84a3cafbda..8fb2cd8806 100644 ---- a/lib/FusionInventory/Agent/Task/Inventory.pm -+++ b/lib/FusionInventory/Agent/Task/Inventory.pm -@@ -59,7 +59,7 @@ sub run { - tag => $tag - ); - -- $self->{logger}->info("New inventory from $self->{deviceid} for $self->{target}->{id}". -+ $self->{logger}->info("New inventory from ".$inventory->getDeviceId()." for $self->{target}->{id}". - ( (defined($tag) && length($tag)) ? " (tag=$tag)" : "" )); - - # Set inventory as remote if running remote inventory like from wmi task diff --git a/fusioninventory-agent-d4f29af.patch b/fusioninventory-agent-d4f29af.patch deleted file mode 100644 index 8282318..0000000 --- a/fusioninventory-agent-d4f29af.patch +++ /dev/null @@ -1,23 +0,0 @@ -From d4f29affa9c9b8e80ea53171570c6d70eab28027 Mon Sep 17 00:00:00 2001 -From: Guillaume Bougard -Date: Tue, 7 May 2019 14:33:09 +0200 -Subject: [PATCH] fix: Keep HTTP Server SSL plugin sessions opened - ---- - lib/FusionInventory/Agent/HTTP/Server/SSL.pm | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/lib/FusionInventory/Agent/HTTP/Server/SSL.pm b/lib/FusionInventory/Agent/HTTP/Server/SSL.pm -index f6238104a5..32442ec2cc 100644 ---- a/lib/FusionInventory/Agent/HTTP/Server/SSL.pm -+++ b/lib/FusionInventory/Agent/HTTP/Server/SSL.pm -@@ -139,6 +139,9 @@ sub new { - return; - } - -+ # Disable Timeout to leave SSL session opened until we get data -+ $client->timeout(0); -+ - $plugin->debug("HTTPD started new SSL session"); - - bless $client, $class; diff --git a/fusioninventory-agent.spec b/fusioninventory-agent.spec index 4bed140..e1fc3a3 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -8,15 +8,11 @@ Summary: FusionInventory agent License: GPLv2+ URL: http://fusioninventory.org/ -Version: 2.5 -Release: 4%{?dist} +Version: 2.5.1 +Release: 1%{?dist} Source0: https://github.com/fusioninventory/%{name}/releases/download/%{version}/FusionInventory-Agent-%{version}.tar.gz Source1: %{name}.cron Source10: %{name}.service -Patch0: fusioninventory-agent-7ae7c838b.patch -Patch1: fix-install-httpd-plugins-configs.patch -Patch2: fix-httpd-plugins-configs-folder.patch -Patch3: fusioninventory-agent-d4f29af.patch Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildRequires: perl-generators @@ -139,12 +135,6 @@ fusioninventory cron task %prep %setup -q -n FusionInventory-Agent-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 - - sed \ -e "s/logger = .*/logger = syslog/" \ -e "s/logfacility = .*/logfacility = LOG_DAEMON/" \ @@ -290,6 +280,10 @@ install -m 644 -D %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service %changelog +* Mon Jul 08 2019 Johan Cwiklinski - 2.5.1-1 +- Last upstream release +- Remove patches applied upstream + * Tue May 07 2019 Johan Cwiklinski - 2.5-4 - Add patch to fix SSL on with http modules diff --git a/sources b/sources index 9479a53..3592c0b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (FusionInventory-Agent-2.5.tar.gz) = 37f0545df716e482fffd018a56b9c7482d7fce64fd0fa277c481a553a2108e7588f34077fb4775bb6352668efc96b3525fe97b1d6331d637401e8db8c0c91333 +SHA512 (FusionInventory-Agent-2.5.1.tar.gz) = c8c44801acdd574d5b4a2173f5f7b0b6275abc2ac4925c64313a1dde3a717d796e7f5d9a35e9b02b966f08cb985e3ae064d8797de0c30fede8b131bc9bb64955