Getting augeas type to working on OS X

463 views
Skip to first unread message

Amos Shapira

unread,
Apr 22, 2016, 12:23:10 AM4/22/16
to Puppet Users
Hello,

I'm working on automating of OS X vmware build using Puppet.

I use Packer to build the base image (based on excellent work done in https://github.com/timsutton/osx-vm-templates) and take the opportunity to pre-install Puppet, Homebrew and gems used by Puppet itself like hiera, hiera-eyaml, and augeas.

The trouble is that although 'augeas' gets installed by Homebrew just fine, the 'ruby-augeas' gem fails with an error "extconf.rb:27:in `<main>': augeas-devel not installed (RuntimeError)":

# gem install --verbose --no-ri --no-rdoc ruby-augeas
302 Moved Temporarily
304 Not Modified
302 Moved Temporarily
200 OK
Installing gem ruby-augeas-0.5.0
Downloading gem ruby-augeas-0.5.0.gem
302 Moved Temporarily
Fetching: ruby-augeas-0.5.0.gem (100%)
200 OK
/Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0/Rakefile
/Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0/COPYING
/Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0/README.rdoc
/Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0/NEWS
/Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0/ext/augeas/_augeas.c
/Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0/ext/augeas/_augeas.h
/Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0/lib/augeas.rb
/Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0/ext/augeas/extconf.rb
/Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0/tests/root/etc/group
/Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0/tests/root/etc/hosts
/Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0/tests/root/etc/inittab
/Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0/tests/root/etc/ssh/sshd_config
/Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0/tests/tc_augeas.rb
Building native extensions.  This could take a while...
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-augeas-config
--without-augeas-config
--with-pkg-config
--without-pkg-config
extconf.rb:27:in `<main>': augeas-devel not installed (RuntimeError)
ERROR:  Error installing ruby-augeas:
ERROR: Failed to build gem native extension.

    Building has failed. See above output for more information on the failure.

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/ruby-augeas-0.5.0/ext/augeas/gem_make.out

As much as I researched, I couldn't find any information about this error for OSX, only a few mentions about old Ubuntu (10.04) and RedHat. Does anyone know how to make it work?

Thanks.

Amos Shapira

unread,
Apr 22, 2016, 12:28:46 AM4/22/16
to Puppet Users
More updates found just after posting this (why do all the useful links appear only after posting questions, despite digging for them for hours before asking??):

"Known Bugs" lists that ruby-augeas is broken (and another link mentions that it haven't been touched since 2013 and might be abandoned):

David Lutterkort

unread,
Apr 22, 2016, 1:28:29 PM4/22/16
to Puppet Users
Hi Amos,

ruby-augeas is certainly not abandoned, though there has been little activity on it. I am not sure what the clone at https://github.com/uib/ruby-augeas - this is the first time I've seen it. The official upstream of ruby-augeas is https://github.com/hercules-team/ruby-augeas; that's not helping you much, since it doesn't have support for building on OSX. I'll see if I can find somebody who'd like to open a PR there for OSX build support.

As a quick fix, you could install the OSX puppet-agent package - that has ruby-augeas (and all the other goodies that make up puppet-agent) in it.

David

Amos Shapira

unread,
Apr 23, 2016, 10:19:58 PM4/23/16
to Puppet Users
Thanks.

Since running Puppet is the ultimate goal, I'll try to go that way. They even provide command-line installation instructions.

Amos Shapira

unread,
Apr 26, 2016, 1:07:57 AM4/26/16
to Puppet Users
Correction - Puppet Agent is version 4.x of Puppet, which we haven't migrated to, so I can't use that package yet.

David Lutterkort

unread,
Apr 26, 2016, 8:35:06 PM4/26/16
to puppet...@googlegroups.com
On Mon, Apr 25, 2016 at 10:07 PM, Amos Shapira <amos.s...@gmail.com> wrote:
Correction - Puppet Agent is version 4.x of Puppet, which we haven't migrated to, so I can't use that package yet

That's a bummer ;)

I've put up a pull request - could you try that out and let me know if that actually makes ruby-augeas build for you ?

thanks,
David

Amos Shapira

unread,
Apr 27, 2016, 7:19:19 AM4/27/16
to Puppet Users
Thanks. I'm out of office until Friday, then I'll test that.
Reply all
Reply to author
Forward
0 new messages