packaging: Nuke more vendored sources
Nuke systemd source files for the same reasons as libcurl (see #1554). Also noticed that libz-sys was doing this, though it's not new to this patch. For reference, see: https://github.com/projectatomic/rpm-ostree/pull/1554 Closes: #1601 Approved by: cgwalters
This commit is contained in:
parent
f6c3616148
commit
5fb5effbd2
@ -43,12 +43,20 @@ mkdir ${tmpd} && touch ${tmpd}/.tmp
|
|||||||
cargo vendor -q --sync ${TOP}/rust/Cargo.toml vendor
|
cargo vendor -q --sync ${TOP}/rust/Cargo.toml vendor
|
||||||
cp ${TOP}/rust/Cargo.lock .
|
cp ${TOP}/rust/Cargo.lock .
|
||||||
cp ${TOP}/rust/cargo-vendor-config .cargo/config
|
cp ${TOP}/rust/cargo-vendor-config .cargo/config
|
||||||
# Filter out bundled libcurl from curl-sys; we always want the system libcurl
|
# Filter out bundled libcurl and systemd; we always want the pkgconfig ones
|
||||||
rm -rf vendor/curl-sys/curl/
|
for crate_subdir in curl-sys/curl \
|
||||||
|
libz-sys/src/zlib \
|
||||||
|
systemd/libsystemd-sys/systemd \
|
||||||
|
libsystemd-sys/systemd; do
|
||||||
|
rm -rf vendor/$crate_subdir
|
||||||
python -c '
|
python -c '
|
||||||
import json, sys; j = json.load(open(sys.argv[1]))
|
import json, sys
|
||||||
j["files"] = {f:c for f, c in j["files"].items() if not f.startswith("curl/")}
|
crate, subdir = sys.argv[1].split("/", 1)
|
||||||
open(sys.argv[1], "w").write(json.dumps(j))' vendor/curl-sys/.cargo-checksum.json
|
checksum_file = ("vendor/%s/.cargo-checksum.json" % crate)
|
||||||
|
j = json.load(open(checksum_file))
|
||||||
|
j["files"] = {f:c for f, c in j["files"].items() if not f.startswith(subdir)}
|
||||||
|
open(checksum_file, "w").write(json.dumps(j))' $crate_subdir
|
||||||
|
done
|
||||||
tar --transform="s,^,${PKG_VER}/rust/," -rf ${TARFILE_TMP} * .cargo/
|
tar --transform="s,^,${PKG_VER}/rust/," -rf ${TARFILE_TMP} * .cargo/
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user