Skip to content

Commit

Permalink
corrected the plan file
Browse files Browse the repository at this point in the history
Signed-off-by: nikhil2611 <[email protected]>
  • Loading branch information
nikhil2611 committed Jan 15, 2025
1 parent 5e88d7f commit dd39706
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions habitat/plan.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
export HAB_BLDR_CHANNEL="LTS-2024"
_chef_client_ruby="core/ruby3_1"
pkg_name="berkshelf"
pkg_origin="chef"
ruby_pkg="core/ruby3_1"
pkg_maintainer="The Chef Maintainers <[email protected]>"
pkg_description="Manage Chef Infra cookbooks and cookbook dependencies."
pkg_license=('Apache-2.0')
pkg_bin_dirs=(
bin
vendor/bin
)
pkg_deps=(${ruby_pkg} core/coreutils)
pkg_bin_dirs=(bin)
pkg_build_deps=(
core/make
core/bash
core/gcc
)
pkg_deps=(
$_chef_client_ruby
core/coreutils
core/git
)
pkg_svc_user=root

do_setup_environment() {
build_line 'Setting GEM_HOME="$pkg_prefix/vendor"'
export GEM_HOME="$pkg_prefix/vendor"

build_line "Setting GEM_PATH=$GEM_HOME"
export GEM_PATH="$GEM_HOME"
}

pkg_version() {
cat "$SRC_PATH/VERSION"
Expand All @@ -35,8 +35,8 @@ do_unpack() {
}

do_build() {
echo $(pkg_path_for $_chef_client_ruby)
export GEM_HOME="$pkg_prefix/vendor/gems"

export GEM_HOME="$pkg_prefix/vendor"

build_line "Setting GEM_PATH=$GEM_HOME"
export GEM_PATH="$GEM_HOME"
Expand All @@ -49,13 +49,13 @@ do_build() {
}

do_install() {
export GEM_HOME="$pkg_prefix/vendor/gems"
export GEM_HOME="$pkg_prefix/vendor"

build_line "Setting GEM_PATH=$GEM_HOME"
export GEM_PATH="$GEM_HOME"
gem install berkshelf-*.gem --no-document
wrap_ruby_berkshelf
set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor/gems"
set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor"
}

wrap_ruby_berkshelf() {
Expand All @@ -76,10 +76,10 @@ set -e
export PATH="/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:\$PATH"
# Set Ruby paths defined from 'do_setup_environment()'
export GEM_HOME="$pkg_prefix/vendor/gems"
export GEM_PATH="\$GEM_HOME"
export GEM_HOME="$pkg_prefix/vendor"
export GEM_PATH="$GEM_PATH"
exec $(pkg_path_for $_chef_client_ruby)/bin/ruby $real_bin \$@
exec $(pkg_path_for ${ruby_pkg})/bin/ruby $real_bin \$@
EOF
chmod -v 755 "$bin"
}
Expand Down

0 comments on commit dd39706

Please sign in to comment.