i9ce
MSVSphere Packaging Team 12 months ago
parent 8f4c6576bd
commit f2dabe886c

3
.gitignore vendored

@ -1,2 +1,3 @@
SOURCES/rd-agent-2.1.2-vendor.tar.gz
SOURCES/linux-5.8.11.tar.xz
SOURCES/rd-agent-2.1.2-vendor.tar.gz
SOURCES/rd-agent-2.1.2.crate

@ -1,2 +1,3 @@
e862cb1a476c73af832e662fe4efa7e94e0e7d2d SOURCES/rd-agent-2.1.2-vendor.tar.gz
3c88f4eb9b877148e02480409aaf8973a22f8f3a SOURCES/linux-5.8.11.tar.xz
e862cb1a476c73af832e662fe4efa7e94e0e7d2d SOURCES/rd-agent-2.1.2-vendor.tar.gz
e7b43a495e83293c2211668c87ffc0b800d08948 SOURCES/rd-agent-2.1.2.crate

Binary file not shown.

@ -0,0 +1,25 @@
#!/bin/sh
name='rd-agent'
specfile="rust-${name}.spec"
version=$(rpm -q --qf '%{VERSION}\n' --specfile "$specfile" | head -1)
nv="${name}-${version}"
crate="${nv}.crate"
vendor_tarball="${nv}-vendor.tar.gz"
if [ -f "$vendor_tarball" ]; then
echo "${vendor_tarball} already exists, aborting"
exit 1
fi
[ -f "$crate" ] || spectool -g "$specfile"
tardir="$PWD"
workdir=$(mktemp -d)
trap 'rm -rf "$workdir"' EXIT
tar xvzf "$tardir/$crate" -C "$workdir"
(cd "${workdir}/${nv}" && \
cargo vendor && \
tar cvzf "${tardir}/${vendor_tarball}" vendor/)
exit 0
Loading…
Cancel
Save