Ask Your Question
0

exec install uses old version

asked 2015-01-18 16:31:41 -0600

Hi, I am trying to install autoconf version 2.69 by building it from source. After autoconf is installed, my intention is to build another package called crmsh from its source. I want to do this using Puppet.

I have written a few classes that enables me. The class contents are below.

Download and extract autoconf source

class custom-autoconf { require custom-packages-1 exec { "download autoconf" : command => "wget http://ftp.gnu.org/gnu/autoconf/autoc... ; \ tar xvfvz autoconf-2.69.tar.gz; ", path => ["/bin","/usr/bin","/sbin","/usr/sbin"], cwd => '/root', unless => "test -e /root/autoconf-2.69.tar.gz", provider => shell, } notify { 'autoconfdownload' : withpath => true, name => "download_autoconf", message => "Execution of autoconf download completed. " } }

Builds autoconf

class custom-autoconf::custom-autoconf-2 { require custom-autoconf exec { "installautoconf" : command => "sh configure ; \ make && make install ; \ sleep 5 ; \ autoconf --version", path => ["/bin","/usr/bin","/sbin","/usr/sbin"], timeout => 1800, logoutput => true, cwd => '/root/autoconf-2.69', onlyif => "test -d /root/autoconf-2.69", provider => shell, } notify { 'autoconfinstall' : withpath => true, name => "install_autoconf", message => "Execution of autoconf install completed. Requires custom-autoconf class completion " } }

Download crmsh source

class custom-autoconf::custom-crmsh { require custom-autoconf::custom-autoconf-2 exec { "clonecrmsh" : command => "git clone https://github.com/crmsh/crmsh.git ; ", path => ["/bin","/usr/bin","/sbin","/usr/sbin"], cwd => '/root', unless => "test -d /root/crmsh", provider => shell, } notify { 'crmshclone' : withpath => true, name => "clone_crmsh", message => "Execution done" } }

Build crmsh

class custom-autoconf::custom-crmsh-1 { require custom-autoconf::custom-crmsh exec {"buildcrmsh" : command => "pwd ; \ autoconf --version ; \ sleep 5 ; \ autoconf --version ; \ sh autogen.sh ; \ sh configure ; \ make && make install ; ", path => ["/bin","/usr/bin","/sbin","/usr/sbin"], require => Class['custom-autoconf::custom-crmsh'], cwd => '/root/crmsh', onlyif => "test -d /root/crmsh", provider => shell, } notify { 'crmshbuild' : withpath => true, name => "build_crmsh", message => "Execution of crmsh build is complete. Depends on custom-crmsh" } }

The problem is that the crmsh build fails saying autoconf version is 2.63. Notice: /Stage[main]/Custom-autoconf::Custom-crmsh-1/Exec[build_crmsh]/returns: configure.ac:11: error: Autoconf version 2.69 or higher is required

When puppet execution completes with this failure, I see that autoconf version is 2.69 (meaning, the initial build of autoconf was successful).

Could someone please tell me why Puppet is considering autoconf version as 2.63 when in the system it is 2.69. Or, am I missing something here?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-01-19 11:21:36 -0600

My bad. Turns out that building autoconf from source creates binary in /usr/local/bin. Adding that in the "path =>" section fixed the issue.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-01-18 16:31:41 -0600

Seen: 129 times

Last updated: Jan 18 '15