From cdd830217eb938c7ad3894c620aaaa5e87f3d537 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski <jo...@x-tnd.be> Date: Wed, 22 Jun 2016 17:04:39 +0200 Subject: Add upstream patch for useless requires; change source, add task-collect
--- .gitignore | 1 + fusioninventory-agent-useless-module-cleaning | 34 +++++++++++++++++++++++ fusioninventory-agent.spec | 39 +++++++++++++++++++++------ sources | 2 +- 4 files changed, 67 insertions(+), 9 deletions(-) create mode 100644 fusioninventory-agent-useless-module-cleaning diff --git a/.gitignore b/.gitignore index 4afe614..6e7c9b0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /FusionInventory-Agent-2.3.16.tar.gz /2.3.17.tar.gz /2.3.18.tar.gz +/FusionInventory-Agent-2.3.18.tar.gz 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 <tlor...@teclib.com> +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 2a76ec9..3937358 100644 --- a/fusioninventory-agent.spec +++ b/fusioninventory-agent.spec @@ -10,12 +10,14 @@ License: GPLv2+ URL: http://fusioninventory.org/ Version: 2.3.18 -Release: 1%{?dist} -Source0: https://github.com/fusioninventory/fusioninventory-agent/archive/%{version}.tar.gz +Release: 2%{?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)) -BuildRequires: perl(inc::Module::Install) +BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: systemd Requires: perl-FusionInventory-Agent = %{version}-%{release} @@ -52,7 +54,9 @@ You can add additional packages for optional tasks: Software deployment support * fusioninventory-agent-task-esx vCenter/ESX/ESXi remote inventory -* perl-FusionInventory-WakeOnLan +* 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. @@ -130,11 +134,23 @@ Requires: fusioninventory-agent = %{version}-%{release} Requires: perl(Net::CUPS) 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 + + %prep -%setup -q -n %{name}-%{version}%{?prever} +%setup -q -n FusionInventory-Agent-%{version} + +%patch0 -p1 # This work only on older version, and is ignored on recent cat <<EOF | tee %{name}-req @@ -143,7 +159,7 @@ cat <<EOF | tee %{name}-req sed -e '/perl(Win32/d' EOF -%global __perl_requires %{_builddir}/%{name}-%{version}%{?prever}/%{name}-req +%global __perl_requires %{_builddir}/FusionInventory-Agent-%{version}%{?prever}/%{name}-req chmod +x %{__perl_requires} cat <<EOF | tee logrotate @@ -159,7 +175,7 @@ EOF cat <<EOF | tee %{name}.conf # # Fusion Inventory Agent Configuration File -# used by hourly cron job and service launcher to override the %%{name}.cfg setup. +# used by hourly cron job and service launcher to override the %{name}.cfg setup. # # DONT FORGET to enable the service ! # @@ -277,8 +293,15 @@ install -m 644 -D contrib/yum-plugin/%{name}.conf %{buildroot}%{_sysconfdir}/yum %{_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 +* Wed Jun 22 2016 Johan Cwiklinski <johan AT x-tnd DOT be> - 2.3.18-2 +- Add task-collect subpackage +- Change package source according to upstream recomendations + * Tue Jun 21 2016 Johan Cwiklinski <johan AT x-tnd DOT be> - 2.3.18-1 - Last upstream release - Handle macros in comments to make rpmlint happy diff --git a/sources b/sources index 59746bd..523b6a9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e646a25e250cc753a0ee9ea9c3504a06 2.3.18.tar.gz +caffff2fe695b2262529aa7541f1b94a FusionInventory-Agent-2.3.18.tar.gz -- cgit v0.12 http://pkgs.fedoraproject.org/cgit/fusioninventory-agent.git/commit/?h=f23&id=cdd830217eb938c7ad3894c620aaaa5e87f3d537 -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org