Project

General

Profile

Actions

User story #9324

closed

Simplify FusionInventory CPAN dependency handling

Added by Matthieu CERDA about 8 years ago. Updated almost 7 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Packaging
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

I think a better solution could be found compared to manual dependency handling in the SOURCES directory Makefile.

We should do this instead, as explained in http://fusioninventory.org/documentation/agent/installation/source.html:

fusion-modules: $(FUSION_DEPS) fusioninventory-agent
    mkdir -p $(INSTALL_DIR)/lib/perl5

    # CPAN Modules installation
    cd fusioninventory-agent && $(MODULE_INSTALL) --mirror http://www.normation.com/fusioninventory/ --pureperl --installdeps --with-recommends -L extlib --notest .

        # Replace destdir by prefix in files generated by cpanm
    find $(INSTALL_DIR)/lib/perl5 -type f -name "*.packlist" -o -name "*.pod" -exec sed -i "s,$(DESTDIR),,"  {} \;

    # Wipe Perl bundled manpages
    rm -rf $(INSTALL_DIR)/man

    touch $@

The mirror at http://www.normation.com/fusioninventory/ can be built using pinto, like this:

pinto --root=/var/www/www.normation.com/fusioninventory/ init
pinto --root=/var/www/www.normation.com/fusioninventory/ add FusionInventory-2.3.17.tar.gz

The 'add' command will pull all the package required dependencies to the local repository, to be used with cpanm's --mirror option. (--mirror-only can be added to prevent a fallback to the main CPAN mirrors if a module is missing from the repo)

A FusionInventory build this way is autonomous, we would only need a core Perl installation in /opt/rudder and the right arguments used in run-inventory to use it :)

Actions

Also available in: Atom PDF