From c078d89b70ebef591613f35a71c8dec5dc792a79 Mon Sep 17 00:00:00 2001 From: nikhil2611 Date: Mon, 16 Feb 2026 17:54:16 +0530 Subject: [PATCH 1/2] adding NOTICE file to the pkg Signed-off-by: nikhil2611 --- NOTICE | 0 habitat/plan.ps1 | 10 ++++++++++ habitat/plan.sh | 10 ++++++++++ 3 files changed, 20 insertions(+) create mode 100644 NOTICE diff --git a/NOTICE b/NOTICE new file mode 100644 index 000000000..e69de29bb diff --git a/habitat/plan.ps1 b/habitat/plan.ps1 index f6a65f375..764f9c96b 100644 --- a/habitat/plan.ps1 +++ b/habitat/plan.ps1 @@ -65,6 +65,16 @@ function Invoke-Build { } function Invoke-Install { + write-output "*** invoke-install" + $NoticeFile = "$PLAN_CONTEXT\..\..\NOTICE" + + if (Test-Path $NoticeFile) { + Write-BuildLine "** Copying NOTICE to package directory" + Copy-Item -Path $NoticeFile -Destination $pkg_prefix -Force + } else { + Write-BuildLine "** Warning: NOTICE not found at $NoticeFile" + } + Write-BuildLine "** Copy built & cached gems to install directory" Copy-Item -Path "$HAB_CACHE_SRC_PATH/$pkg_dirname/*" -Destination $pkg_prefix -Recurse -Force -Exclude @("gem_make.out", "mkmf.log", "Makefile", "*/latest", "latest", diff --git a/habitat/plan.sh b/habitat/plan.sh index 808b4e893..2b04f7b9a 100644 --- a/habitat/plan.sh +++ b/habitat/plan.sh @@ -48,6 +48,15 @@ do_build() { ruby ./post-bundle-install.rb } do_install() { + + # Copy NOTICE.TXT to the package directory + if [[ -f "$PLAN_CONTEXT/../NOTICE" ]]; then + build_line "Copying NOTICE to package directory" + cp "$PLAN_CONTEXT/../NOTICE" "$pkg_prefix/" + else + build_line "Warning: NOTICE not found at $PLAN_CONTEXT/../NOTICE" + fi + export GEM_HOME="$pkg_prefix/vendor" build_line "Setting GEM_PATH=$GEM_HOME" @@ -55,6 +64,7 @@ do_install() { gem install chef-cli-*.gem --no-document set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor" wrap_ruby_bin + rm -rf $GEM_PATH/cache/ rm -rf $GEM_PATH/bundler rm -rf $GEM_PATH/doc From a601291e21f6a94787980b43227790f32b4d7801 Mon Sep 17 00:00:00 2001 From: nikhil2611 Date: Mon, 16 Feb 2026 17:56:49 +0530 Subject: [PATCH 2/2] removed the extra line Signed-off-by: nikhil2611 --- habitat/plan.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/habitat/plan.sh b/habitat/plan.sh index 2b04f7b9a..1e18f1a9f 100644 --- a/habitat/plan.sh +++ b/habitat/plan.sh @@ -64,7 +64,6 @@ do_install() { gem install chef-cli-*.gem --no-document set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor" wrap_ruby_bin - rm -rf $GEM_PATH/cache/ rm -rf $GEM_PATH/bundler rm -rf $GEM_PATH/doc