Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions scripts/package-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ put() {
}

cp -a "$build/1bit" "$stage/"
put hrx/llama/bin llama-server llama-bench
put hrx/llama/bin llama-server llama-bench llama-perplexity
put ds4/hip ds4-server ds4 ds4-bench

# the sealed NPU kernel sets (scripts/weekly.sh, WEEKLY_NPU_KERNELS): encrypted artifacts, packed
Expand Down Expand Up @@ -88,6 +88,12 @@ if [ -d "$build/npu" ]; then
echo " scripts, tools: the GGUF-on-NPU helpers ($(ls "$stage/scripts" "$stage/tools" | wc -l) files)"
fi

# Everything staged has to come from the build being packaged. This compares bytes with the same path under the
# build, so it runs before pack_localize: localization rewrites every RUNPATH (and adds libomp.so, which the build
# does not have), after which nothing would match.
provenance_bad=$(pack_require_provenance "$stage" "$build" || true)
[ -z "$provenance_bad" ] || { echo "files that did not come from this build:"; echo "$provenance_bad"; exit 1; }

# Every program and library finds its libraries beside itself (scripts/pack-elf.sh): a library it
# loads from elsewhere in the build tree (HRX's libhrx, libloomc) or LLVM's OpenMP runtime
# (libomp.so, which ggml's CPU code links when TheRock's amdclang builds llama.cpp) is copied beside
Expand All @@ -104,10 +110,6 @@ tools_bad+=$(pack_require_tools "$stage" hrx/llama/bin llama-server llama-bench
tools_bad+=$(pack_require_tools "$stage" ds4/hip ds4-server ds4 ds4-bench || true)
[ -z "$tools_bad" ] || { echo "shipped tools that cannot load:"; echo "$tools_bad"; exit 1; }

# everything shipped has to come from the build being packaged
provenance_bad=$(pack_require_provenance "$stage" "$build" || true)
[ -z "$provenance_bad" ] || { echo "files that did not come from this build:"; echo "$provenance_bad"; exit 1; }

# anything else that cannot load leaves the package rather than shipping broken
pack_prune_unloadable "$stage"

Expand Down
Loading