CHEF-35092 - Use appbundler for habitat packaging#472
Merged
Conversation
- Overhauled habitat/plan.sh to use appbundler for binstub generation - Added binstub_patch.rb for runtime GEM_PATH configuration - Added cleanup_lint_roller.rb to remove stray Gemfile.lock from vendored gems - Added .github directory cleanup in both plan.sh and plan.ps1 to avoid CVE false positives - Simplified Habitat installation in artifact.habitat.test.ps1 (removed version pinning) - Removed redundant project root logging from Windows test script - Replaced wrap_ruby_bin with appbundler + libexec wrapper pattern - Added do_prepare, do_after, do_end lifecycle hooks in plan.sh Signed-off-by: Sachin Jain <Sachin.jain@chef.io>
Simplecov Report
|
sanghinitin
approved these changes
Jun 3, 2026
nikhil2611
approved these changes
Jun 3, 2026
ashiqueps
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request improves the packaging and installation process for
chef-vaultin Habitat environments. The main changes include switching toappbundlerfor binstub generation, cleaning up vendored gems to avoid CVE false positives, and simplifying the Habitat install script.Packaging and binstub improvements
habitat/plan.shto generate binstubs usingappbundlerwith precise version pins, replacing the previouswrap_ruby_binwrapper functionbinstub_patch.rbto configureAPPBUNDLER_ALLOW_RVMandGEM_PATHat runtime, allowing binstubs to run directlydo_setup_environment()withpush_runtime_env/set_runtime_envpattern for proper Habitat runtime environment setupdo_prepare()to create/usr/bin/envsymlink when missingdo_end()to clean up the/usr/bin/envsymlink after buildlibexec/wrapper pattern: binstub is moved tolibexec/and a bash wrapper inbin/sets up PATH, GEM_HOME, GEM_PATH before execcore/sedtopkg_build_depsVendored gem cleanup
cleanup_lint_roller.rbscript to remove strayGemfile.lockfiles from vendored gems (lint_roller,stackprof-webnav,chef-vault) to appease security scanners.githubdirectory removal inhabitat/plan.sh(do_after) andhabitat/plan.ps1(Invoke-After) to avoid CVE false positives from vendored gem metadataBuild/test process improvements
.expeditor/buildkite/artifact.habitat.test.ps1by removing explicit version pinning ($HabitatVersion) and always installing the latest HabitatInstall-Habitatfunction to a singleInvoke-ExpressioncallFiles changed
binstub_patch.rbcleanup_lint_roller.rbhabitat/plan.shhabitat/plan.ps1.expeditor/buildkite/artifact.habitat.test.ps1Types of changes
Checklist