Narkisr - blog

Narkisr.com where code writes itself.


04
Jun 11

Pin puppet free

One of the best things I like about Linux (and Ubntnu in particular) is the package management, yet the main drawback of non rolling distros repositories is that you get might stuck with old package versions until the next release comes along.
Usually you can find a PPA or a vendor package that gives you the new goodies, in the case of puppet your left with 2.6.4, while you could build puppet from source (its ruby after all) the integration with OS is lost.

After some frantic googling all iv found was this which states the ability of using debian packages as the source for latest puppet version.
Reading about apt pinning and the strong recommendation to use source packages instead lead me to the following solution:
echo "deb-src http://ftp.us.debian.org/debian/ wheezy main" | sudo tee -a /etc/apt/sources.list
sudo aptitude update
cd /tmp/
sudo apt-get build-dep puppet
sudo apt-get -b source puppet
We add debian wheezy repository to our apt source.list and update, then we install the build dependencies of puppet and build puppet packages from source, we make sure to do all this in /tmp since the packages will be created under the cwd.
$ ls /tmp
puppet-2.6.8  
puppet_2.6.8.orig.tar.gz 
puppetmaster-passenger_2.6.8-1_all.deb
puppet_2.6.8-1_all.deb 
puppet-common_2.6.8-1_all.deb 
puppet-testsuite_2.6.8-1_all.deb
puppet_2.6.8-1_amd64.changes
puppet-el_2.6.8-1_all.deb
vim-puppet_2.6.8-1_all.deb
puppet_2.6.8-1.debian.tar.gz
puppetmaster_2.6.8-1_all.deb
puppet_2.6.8-1.dsc
puppetmaster-common_2.6.8-1_all.deb
Now in order to install puppetmaster:
$ sudo dpkg -i puppetmaster-common_2.6.8-1_all.deb
$ sudo dpkg -i puppetmaster_2.6.8-1_all.deb
Installing puppet client:
$ sudo dpkg -i puppet-common_2.6.8-1_all.deb 
$ sudo dpkg -i puppet_2.6.8-1_all.deb 
Its important to mention that this procedure might not work for other packages since Ubuntu and Debian are not binary compatible.


This website content by Ronen Narkis is licensed under a Creative Commons Attribution 2.5 Israel License, based on a work at narkisr.com, Permissions beyond the scope of this license may be available at narkisr.com.