User story #9324
Updated by Matthieu CERDA about 8 years ago
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:
<pre>
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 $@
</pre>
The mirror at http://www.normation.com/fusioninventory/ can be built using pinto, like this:
<pre>
pinto --root=/var/www/www.normation.com/fusioninventory/ init
pinto --root=/var/www/www.normation.com/fusioninventory/ add FusionInventory-2.3.17.tar.gz
</pre>
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 :)