diff options
author | Tim Smith <tsmith@chef.io> | 2019-06-20 19:29:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-20 19:29:00 +0100 |
commit | b5e8d27e8071fca237c9a915b553503dae6f96ca (patch) | |
tree | 0a0b0fc96595e20f53e2a8e3d5fbe109eefe759e | |
parent | c8168aece5d38dd83cf88055d2e936cb3173e856 (diff) | |
parent | d6d8f20b4bd6b38f81ac606953255ba093a7beeb (diff) | |
download | chef-b5e8d27e8071fca237c9a915b553503dae6f96ca.tar.gz |
Merge pull request #8678 from echohack/habitat-expeditor
[chef-client] [scaffolding-chef] add new build configuration for scaffolding-chef
-rw-r--r-- | .bldr.toml | 25 | ||||
-rw-r--r-- | habitat-packages/chef-client/plan.sh | 39 |
2 files changed, 55 insertions, 9 deletions
diff --git a/.bldr.toml b/.bldr.toml index 190969c79d..f86b5e682d 100644 --- a/.bldr.toml +++ b/.bldr.toml @@ -4,6 +4,19 @@ build_targets = [ "x86_64-linux", "x86_64-linux-kernel2" ] +paths = [ + "bin", + "chef-bin", + "chef-config", + "ci", + "distro", + "ext", + "habitat-packages", + "lib", + "omnibus", # TODO: Evaluate if we really need this in the future + "tasks", +] + [scaffolding-chef] plan_path = "habitat-packages/scaffolding-chef" build_targets = [ @@ -11,3 +24,15 @@ build_targets = [ "x86_64-linux-kernel2" # "x86_64-windows" --- TODO: Expeditor does not currently support Windows, but will in the coming weeks. Uncomment me soon! ] +paths = [ + "bin", + "chef-bin", + "chef-config", + "ci", + "distro", + "ext", + "habitat-packages", + "lib", + "omnibus", # TODO: Evaluate if we really need this in the future + "tasks", +] diff --git a/habitat-packages/chef-client/plan.sh b/habitat-packages/chef-client/plan.sh index 5569999a12..5c5ff1da37 100644 --- a/habitat-packages/chef-client/plan.sh +++ b/habitat-packages/chef-client/plan.sh @@ -2,26 +2,47 @@ pkg_name=chef-client pkg_origin=chef pkg_maintainer="The Chef Maintainers <humans@chef.io>" pkg_description="The Chef Client" -pkg_version=$(cat ../VERSION) 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" +} + do_before() { do_default_before update_pkg_version } 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() { @@ -56,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 @@ -66,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. |