Add a shell script to create the vendor tar file. Remove vendor/idna* tests/ directory to make rpminspect happy. Resolves: RHEL-68141
25 lines
631 B
Bash
25 lines
631 B
Bash
#!/bin/bash
|
|
|
|
# fail upon error
|
|
set -e
|
|
|
|
# Run on Fedora
|
|
# make sure all dependencies are yum installed
|
|
|
|
# cd <guest-components-dir-ready-to-be-built>
|
|
|
|
# create a .cargo/config.toml
|
|
if [ ! -f .cargo/config.toml ]; then
|
|
rpm -E '%{cargo_prep}' > cargo_prep.sh
|
|
bash cargo_prep.sh
|
|
fi
|
|
|
|
# run cargo vendor-filtered --offline
|
|
cargo vendor-filterer --respect-source-config --offline --platform x86_64-unknown-linux-gnu --keep-dep-kinds all --all-features --exclude-crate-path "idna#tests" --exclude-crate-path "idna-0.4.0#tests"
|
|
|
|
# run tar and xz
|
|
tar cf vendor.tar vendor/
|
|
xz --best --verbose vendor.tar
|
|
|
|
echo vendor.tar.xz created
|