Skip to content

Commit

Permalink
determine special case by existence of cargo-checksum.json
Browse files Browse the repository at this point in the history
  • Loading branch information
kgilmer committed Feb 18, 2025
1 parent 8519270 commit 4892240
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/scripts/ext-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ stage_source() {

# Special case for creating source tarball of a Rust package vendored dependencies to allow packages with unpackage deps in debian
# See https://blog.shadura.me/2020/12/22/vendoring-rust-in-debian-derivative/
if grep -q "cargo_registry" debian/rules ; then # Assume that any reference to 'cargo_registry' in rules implies needing to generate vendored deps
if [ -f debian/cargo-checksum.json ]; then # Assume cargo-checksum.json existing implies needing to generate vendored deps
echo -e "\033[0;34mGenerating vendor source tarball from cargo\033[0m"
[ -d vendor ] && rm -rf vendor
rm -rf Cargo.lock || true
cargo vendor
tar Jcf ../${debian_package_name}_${debian_version}.orig-vendor.tar.xz vendor/
rm -Rf vendor
fi

cd "$PKG_BUILD_PATH" || exit
Expand Down

0 comments on commit 4892240

Please sign in to comment.