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

habitat packaging: Fix inspec wrapper linking to /bin/bash instead of the bash hab package #3671

Merged
merged 2 commits into from Dec 20, 2018

Conversation

Projects
None yet
3 participants
@teknofire
Copy link
Contributor

teknofire commented Dec 14, 2018

Adds missing pkg_deps for core/bash, otherwise
https://github.com/inspec/inspec/blob/master/habitat/plan.sh#L57 would
return an empty string for the pkg path and output /bin/bash
instead of the expected /hab/pkgs/core/bash/.../bin/bash path.

@jerryaldrichiii This looks like it might have been broken for some time but a recent update for #3645 caused this to fail on me

Signed-off-by: Will Fisher wfisher@chef.io

Fix wrapper using /bin/bash instead of path to bash hab pkg
Add missing `pkg_deps` for `core/bash` hab package, otherwise
https://github.com/inspec/inspec/blob/master/habitat/plan.sh#L57 would
return an empty string for the pkg path and output `/bin/bash`
instead of the expected `/hab/pkgs/core/bash/.../bin/bash` path.

Signed-off-by: Will Fisher <wfisher@chef.io>
@jerryaldrichiii
Copy link
Contributor

jerryaldrichiii left a comment

Great catch @teknofire!

We did something slightly unconventional and removed hab dependencies and instead modified InSpec to use system packages (see https://github.com/inspec/inspec/blob/master/habitat/plan.sh#L62). That being said, ensuring we have an interpreter to read our bin wrapper is crucial. I mistakenly thought this was provided by core/coreutils.

Care to change the line below to pkg_path_for core/bash instead of just pkg_path_for bash?

https://github.com/inspec/inspec/blob/master/habitat/plan.sh#L57

Use `core/bash` for pkg_path_for
Signed-off-by: Will Fisher <wfisher@chef.io>
@teknofire

This comment has been minimized.

Copy link
Contributor

teknofire commented Dec 20, 2018

@jerryaldrichiii updated with the requested change

@jerryaldrichiii
Copy link
Contributor

jerryaldrichiii left a comment

Great catch @teknofire!

@clintoncwolfe
Copy link
Contributor

clintoncwolfe left a comment

Thanks!

@clintoncwolfe clintoncwolfe changed the title Fix inspec wrapper linking to /bin/bash instead of the bash hab package habitat packaging: Fix inspec wrapper linking to /bin/bash instead of the bash hab package Dec 20, 2018

@clintoncwolfe clintoncwolfe merged commit 3008c98 into inspec:master Dec 20, 2018

2 of 4 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
DCO This commit has a DCO Signed-off-by
Details
expeditor/config-validation Validated your Expeditor config file
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment