6

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?

2 Answers 2

10

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'
}
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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