Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

For my server installation i need to wget and compile a source package (geos, GeoIP and py binding). Is there a predefined puppet class to get package sources and compile them?

share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

Have a look at:

https://github.com/example42/puppi/blob/master/manifests/netinstall.pp

Usage example:

netinstall { 'postgis':
  url => 'http://postgis.refractions.net/download/postgis-1.5.5.tar.gz',
  extracted_dir => 'postgis-1.5.5',
  destination_dir => '/tmp',
  postextract_command => '/tmp/postgis-1.5.5/configure && make && sudo make install'
}
share|improve this answer
add comment

It seems that puppet is not really the best tool for compiling source packages on target systems. The best approach probably is to provide a deb package or whatever your target system expects and install the package using puppet.

The problem about compiling software with puppet is that you need to run several exec { } commands with puppet. Everytime you have to figure out whether an exec has to be executed or not based on some facts in your system (files present, services present or not, etc..). This is quite tedious and error prone for a source compilation as the results of the intermediate steps might not be present anymore. Thus its difficult to determine reliable facts for the source compilation and installation.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.