summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorechohack <echohack@users.noreply.github.com>2019-06-20 11:20:18 -0700
committerechohack <echohack@users.noreply.github.com>2019-06-20 11:20:18 -0700
commitd6d8f20b4bd6b38f81ac606953255ba093a7beeb (patch)
tree0a0b0fc96595e20f53e2a8e3d5fbe109eefe759e
parentc3ec98159edb0a1b008f7442c2123ee16e064c5d (diff)
downloadchef-d6d8f20b4bd6b38f81ac606953255ba093a7beeb.tar.gz
Fix some path issues in the chef-client build
Signed-off-by: echohack <echohack@users.noreply.github.com>
-rw-r--r--habitat-packages/chef-client/plan.sh36
1 files changed, 27 insertions, 9 deletions
diff --git a/habitat-packages/chef-client/plan.sh b/habitat-packages/chef-client/plan.sh
index 8d5f811d0d..5c5ff1da37 100644
--- a/habitat-packages/chef-client/plan.sh
+++ b/habitat-packages/chef-client/plan.sh
@@ -3,14 +3,32 @@ pkg_origin=chef
pkg_maintainer="The Chef Maintainers <humans@chef.io>"
pkg_description="The Chef Client"
pkg_license=('Apache-2.0')
-pkg_filename=${pkg_dirname}.tar.gz
+pkg_filename="${pkg_name}-${pkg_version}.tar.gz"
pkg_bin_dirs=(bin)
-pkg_build_deps=(core/make core/gcc core/git)
-pkg_deps=(core/glibc core/ruby26 core/libxml2 core/libxslt core/libiconv core/xz core/zlib core/bundler core/openssl core/cacerts core/libffi core/coreutils core/libarchive)
+pkg_build_deps=(
+ core/make
+ core/gcc
+ core/git
+)
+pkg_deps=(
+ core/glibc
+ core/ruby26
+ core/libxml2
+ core/libxslt
+ core/libiconv
+ core/xz
+ core/zlib
+ core/bundler
+ core/openssl
+ core/cacerts
+ core/libffi
+ core/coreutils
+ core/libarchive
+)
pkg_svc_user=root
pkg_version() {
- cat "$SRC_PATH/VERSION"
+ cat "${SRC_PATH}/../../VERSION"
}
do_before() {
@@ -19,12 +37,12 @@ do_before() {
}
do_download() {
- build_line "Fake download! Creating archive of latest repository commit."
+ build_line "Locally creating archive of latest repository commit."
# source is in this repo, so we're going to create an archive from the
# appropriate path within the repo and place the generated tarball in the
# location expected by do_unpack
- cd $PLAN_CONTEXT/../
- git archive --prefix=${pkg_name}-${pkg_version}/ --output=$HAB_CACHE_SRC_PATH/${pkg_filename} HEAD
+ cd ${PLAN_CONTEXT}/../../
+ git archive --prefix=${pkg_name}-${pkg_version}/ --output=${HAB_CACHE_SRC_PATH}/${pkg_filename} HEAD
}
do_verify() {
@@ -59,7 +77,7 @@ do_build() {
bundle config --local silence_root_warning 1
- pushd chef-config > /dev/null
+ pushd ${HAB_CACHE_SRC_PATH}/${pkg_name}-${pkg_version}/chef-config > /dev/null
_bundle_install "${pkg_prefix}/bundle"
popd > /dev/null
@@ -69,7 +87,7 @@ do_build() {
do_install() {
mkdir -p "${pkg_prefix}/chef"
for dir in bin chef-bin chef-config lib chef.gemspec Gemfile Gemfile.lock; do
- cp -rv "${PLAN_CONTEXT}/../${dir}" "${pkg_prefix}/chef/"
+ cp -rv "${PLAN_CONTEXT}/../../${dir}" "${pkg_prefix}/chef/"
done
# This is just generating binstubs with the correct path.