Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.0.0+ incompatible with nodes that don't come with build-essential #40

Open
adamkrone opened this issue Jan 17, 2019 · 1 comment
Open

Comments

@adamkrone
Copy link

Cookbook version

v2.0.0 or later

Chef-client version

14.8.12 (although should apply to any supported version)

Platform Details

Ubuntu 18.04

Scenario:

When using an image that doesn't come with build-essential pre-installed, Chef fails because ffi-libarchive is compiled before there is any chance to install build-essential.

Steps to Reproduce:

  1. Use any image that doesn't come with build-essential pre-installed
  2. Include this cookbook as a dependency (doesn't even need to be used in any way)
  3. Cook

Expected Result:

Technically this is the expected behavior, according to the docs:

Do not install native gems with the gem setting in metadata.rb . The gem setting is not a general purpose replacement for the chef_gem resource, and does not internally re-use the chef_gem resource. Native gems require C compilation and must not be installed with metadata.rb because metadata.rb runs before any recipe code runs. Consequently, the chef-client cannot install the C compilers before the gem installation occurs. Instead, install native gems with the chef_gem resource called from the recipe code. You’ll also need to use the build_essential resource in the recipe code to install the prerequisite compilers onto the system.

https://docs.chef.io/config_rb_metadata.html

That being said, I imagine the intended result is for the Chef run to succeed as long as build-essential is installed before this cookbook is used.

Actual Result:

Chef run fails during cookbook gem installation.

It looks like this was introduced here: f594b79

@welcomebot
Copy link

Hey There
It looks like this is the first issue you've filed against the chef-cookbooks project. I'm here to offer you a bit of extra help to make sure we can quickly get back to you.
Make sure you've filled out all the fields in our issue template. Make sure you've provided us with the version of chef-client you're running, your operating system and the version of the cookbook. If you're not using the most up to date version of the cookbook then please make sure to update first. Lots of things change between versions even if you're issue isn't listed in the changelog. Finally please give us a detailed description of the issue you're having. The more we know about what you're trying to do, what actually happens, and how you can reproduce the problem, the better.

If you're looking for more immediate troubleshooting help make sure to check out #general on the Chef Community Slack. There's plenty of folks there willing to lend a helping hand. Thanks for the first issue. We hope we can get back to you soon with a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants