[Fusioninventory-devel] Window Perl install size

Tomás Abad tabadgp at gmail.com
Thu Nov 8 19:58:41 UTC 2012


   Hello Gonéri,

   Please, correct me whether I'm in an error. The issue here is to
reduce the installer size reducing the Strawberry Perl Portable Edition
(with all the FusionInventory-Agent and FusionInventory-Agent-Tasks-*
package requirements) package size.

   For that there are two approaches.

      a) That what I'm following (that really is your old approach).
         Try to filter files inside NSIS script.

      b) Your new approach. Use PAR::Packer to build that package.

   Like in other occasions, I agree with you (in this case with your
second, and new, approach).

   Whether I'm not in an error, it's not very different to build, for
example, the 'strawberry-perl-5.16.1.1-all-pepfia-2.3.x-1.tar.xz' (1)
package. As you know, with the new installer, this task is done for a
serial of scripts.

   s1) ./Perl/Scripts/install-strawberry-perl.*
   s2) ./Perl/Scripts/install-perl-modules-and-dependencies.*
   s3) ./Perl/Scripts/delete-perl-modules-and-dependencies-temporary-
       files.* (optional) and
   s4) ./Perl/Scripts/build-strawberry-perl-package-for-fusioninventory-
       agent.sh

   But, why not change s4) (and possibly s2) also) for build, for
example, the current
'strawberry-perl-5.16.1.1-all-pepfia-2.3.x-1.tar.xz' file, or a new
'strawberry-perl-5.16.1.1-all-pepfia-2.3.x-1.exe' file, based on whether
the installer contains a development version of FusionInventory-Agent or
FusionInventory-Agent-Task-* (former case, file *.tar.xz) or not (last
case, file *.exe)? (2). In other words:

   --- build-strawberry-perl-package-for-fusioninventory-agent code ---
   ...
   # Check whether contains development modules
   # For example
   #    fusinv_agent_commit='2.3.x' or
   #    fusinv_task_deploy_commit='2.0.x' or
   #    fusinv_task_esx_commit='2.2.x' or
   #    fusinv_task_network_commit='1.0.x'
   #    (really, any value that contains a 'x')
   #
   if [ "${fusinv_agent_commit}" !=          \
        "${fusinv_agent_commit/x/}" ]        ||
      [ "${fusinv_task_deploy_commit}" !=    \
        "${fusinv_task_deploy_commit/x/}" ]  ||
      [ "${fusinv_task_esx_commit}" !=       \
        "${fusinv_task_esx_commit/x/}" ]     ||
      [ "${fusinv_task_network_commit}" !=   \
        "${fusinv_task_network_commit/x/}" ]; then
      # For one or more development modules
      # Build package
      # strawberry-perl-5.16.1.1-all-pepfia-2.3.x-1.tar.xz
      # as until now.
      ...
   else
      # For stable modules only.
      # Build package
      # strawberry-perl-5.16.1.1-all-pepfia-2.3.x-1.exe
      # with the help of PAR::Packer.
      ...
   fi
   --- build-strawberry-perl-package-for-fusioninventory-agent code ---

              (This is only an example. There is a better way to do it.)

   With that, we would have two files available:

     .- strawberry-perl-5.16.1.1-all-pepfia-2.3.x-1.tar.xz
           (for development modules) and

     .- strawberry-perl-5.16.1.1-all-pepfia-2.3.x-1.exe
           (for stable releases)

   Finally, the
'install-strawberry-perl-package-for-fusioninventory-agent.*' script
will install one or other based on the same conditions.

   We would have installers for the stable releases as small as
possible, and installers for the development releases with a complete
Strawberry Perl Portable Edition, to minimize the probability of mistakes.

   And, of course, the NSIS script would not have to filter any file
related with Strawberry Perl Portable Edition; simply it would install
all of them.

   I think that could be possible. I wait your opinion Gonéri.

   Best regards.


Notes:
   1) Strawberry Perl Aug 2012 Portable Edition (5.16.1.1-32/64bits)
Packages for FusionInventory-Agent.
https://github.com/tabad/fusioninventory-agent-windows-installer/downloads

   2) A long question example.



More information about the Fusioninventory-devel mailing list