Skip to content

Commit

Permalink
vendoring updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jw3 committed Dec 8, 2023
1 parent 06a3c9a commit 40e9a4c
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions scripts/srpm/vendor-rs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,31 @@ set -e

# rust
rm -rf vendor-rs

# the dest path here needs to stay synced up with the path in lock2spec.py
cargo vendor-filterer --platform=x86_64-unknown-linux-gnu vendor-rs/vendor &> /dev/null
python3 scripts/srpm/lock2spec.py --vendor_all
tar czf vendor-rs-${1}.tar.gz -C vendor-rs .
vendor_dest=vendor-rs/vendor

id=$(. /etc/os-release && echo $ID)

case $id in
fedora)
echo "fedora: vendoring packages"
mkdir -p ${vendor_dest}
cp -r /usr/share/cargo/registry ${vendor_dest}
;;

ubuntu)
echo "ubuntu: vendoring crates.io"
cargo vendor-filterer --platform=x86_64-unknown-linux-gnu ${vendor_dest} &> /dev/null
python3 scripts/srpm/lock2spec.py --vendor_all
;;

*)
echo "error: $id is an unsupported build platform"
;;
esac


vendor_root=$(dirname ${vendor_dest})
tar czf vendor-rs-${1}.tar.gz -C ${vendor_root} .
du -sh vendor-rs-${1}.tar.gz

0 comments on commit 40e9a4c

Please sign in to comment.