mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-23 13:11:15 -03:00
tarball: include .cargo/config.toml again
The problem worked around by commit e4674cd7b5 (.cargo/config.toml:
exclude from tarball, 2025-01-12) is as follows:
our OBS packages are built by doing something like
tar xf $tarball && tar xf $vendor_tarball
except that the tool apparently break when a file is present in
both tarballs.
Our workaround is to not include .cargo/config.toml in the tarball.
The workaround seems too broad. It need not affect all tarballs
but only the ones used by OBS. We want to add xtask aliases to
.cargo/config.toml. They will be used by CMake targets (sphinx-doc),
so they should be available to tarball consumers.
Restrict the scope of the workaround: add back .cargo/config.toml
to the export, and allow opting in to this behavioer by passing a
negative pathspec
build_tools/make_tarball.sh :/!.cargo/config.toml
This commit is contained in:
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -18,9 +18,6 @@
|
||||
/.github/* export-ignore
|
||||
/.builds export-ignore
|
||||
/.builds/* export-ignore
|
||||
# to make cargo vendor work correctly
|
||||
/.cargo/ export-ignore
|
||||
/.cargo/config.toml export-ignore
|
||||
|
||||
# for linguist, which drives GitHub's language statistics
|
||||
alpine.js linguist-vendored
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
# Script to generate a tarball
|
||||
# Outputs to $FISH_ARTEFACT_PATH or ~/fish_built by default
|
||||
|
||||
# Example usage:
|
||||
#
|
||||
# build_tools/make_tarball.sh :/!.cargo/config.toml
|
||||
|
||||
# Exit on error
|
||||
set -e
|
||||
|
||||
@@ -14,7 +18,7 @@ path=${FISH_ARTEFACT_PATH:-~/fish_built}/$prefix.tar.xz
|
||||
|
||||
git archive \
|
||||
--prefix="$prefix/" \
|
||||
HEAD |
|
||||
HEAD "$@" |
|
||||
xz >"$path"
|
||||
|
||||
# Output what we did, and the sha256 hash
|
||||
|
||||
@@ -42,8 +42,14 @@ rm -f "$path" "$path".xz
|
||||
PREFIX_TMPDIR=$(mktemp -d)
|
||||
cd "$PREFIX_TMPDIR"
|
||||
|
||||
# Add .cargo/config.toml. This means that the caller may need to remove that file from the tarball.
|
||||
# See e4674cd7b5f (.cargo/config.toml: exclude from tarball, 2025-01-12)
|
||||
|
||||
mkdir .cargo
|
||||
cargo vendor --manifest-path "$wd/Cargo.toml" >> .cargo/config.toml
|
||||
{
|
||||
cat "$wd"/.cargo/config.toml
|
||||
cargo vendor --manifest-path "$wd/Cargo.toml"
|
||||
} > .cargo/config.toml
|
||||
|
||||
tar cfvJ "$path".xz vendor .cargo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user