This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
|
umask 022
|
||||||
PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
|
|||||||
+35
-20
@@ -47,7 +47,7 @@ expect_path_rejected "outside the repository" \
|
|||||||
--output "$WORK/repository-alias/core/forbidden-output" \
|
--output "$WORK/repository-alias/core/forbidden-output" \
|
||||||
--target-dir "$WORK/parents/repository-alias-target"
|
--target-dir "$WORK/parents/repository-alias-target"
|
||||||
|
|
||||||
"$BUILDER" --output "$WORK/one" --target-dir "$WORK/target-one"
|
(umask 022 && "$BUILDER" --output "$WORK/one" --target-dir "$WORK/target-one")
|
||||||
mkdir "$WORK/hostile-bin"
|
mkdir "$WORK/hostile-bin"
|
||||||
mkdir -p "$WORK/hostile-cargo-home" "$WORK/hostile-home/.cargo"
|
mkdir -p "$WORK/hostile-cargo-home" "$WORK/hostile-home/.cargo"
|
||||||
ln -s /usr/bin/false "$WORK/hostile-bin/cargo"
|
ln -s /usr/bin/false "$WORK/hostile-bin/cargo"
|
||||||
@@ -61,25 +61,28 @@ cat >"$WORK/hostile-home/.cargo/config.toml" <<'EOF'
|
|||||||
[build]
|
[build]
|
||||||
rustc = "/usr/bin/false"
|
rustc = "/usr/bin/false"
|
||||||
EOF
|
EOF
|
||||||
env \
|
(
|
||||||
AR=/usr/bin/false \
|
umask 077
|
||||||
CARGO_BUILD_RUSTC=/usr/bin/false \
|
env \
|
||||||
CARGO_BUILD_RUSTC_WRAPPER=/usr/bin/false \
|
AR=/usr/bin/false \
|
||||||
CARGO_ENCODED_RUSTFLAGS=--cfghostile \
|
CARGO_BUILD_RUSTC=/usr/bin/false \
|
||||||
CARGO_HOME="$WORK/hostile-cargo-home" \
|
CARGO_BUILD_RUSTC_WRAPPER=/usr/bin/false \
|
||||||
CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=/usr/bin/false \
|
CARGO_ENCODED_RUSTFLAGS=--cfghostile \
|
||||||
CC=/usr/bin/false \
|
CARGO_HOME="$WORK/hostile-cargo-home" \
|
||||||
DEVELOPER_DIR="$WORK/hostile-xcode" \
|
CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=/usr/bin/false \
|
||||||
HOME="$WORK/hostile-home" \
|
CC=/usr/bin/false \
|
||||||
PATH="$WORK/hostile-bin:/usr/bin:/bin" \
|
DEVELOPER_DIR="$WORK/hostile-xcode" \
|
||||||
RUSTC=/usr/bin/false \
|
HOME="$WORK/hostile-home" \
|
||||||
RUSTC_WRAPPER=/usr/bin/false \
|
PATH="$WORK/hostile-bin:/usr/bin:/bin" \
|
||||||
RUSTFLAGS=--cfg=hostile \
|
RUSTC=/usr/bin/false \
|
||||||
RUSTUP_HOME="$WORK/hostile-rustup-home" \
|
RUSTC_WRAPPER=/usr/bin/false \
|
||||||
RUSTUP_TOOLCHAIN=bogus \
|
RUSTFLAGS=--cfg=hostile \
|
||||||
"$BUILDER" \
|
RUSTUP_HOME="$WORK/hostile-rustup-home" \
|
||||||
--output "$WORK/parent-alias/two" \
|
RUSTUP_TOOLCHAIN=bogus \
|
||||||
--target-dir "$WORK/parents/target-two"
|
"$BUILDER" \
|
||||||
|
--output "$WORK/parent-alias/two" \
|
||||||
|
--target-dir "$WORK/parents/target-two"
|
||||||
|
)
|
||||||
|
|
||||||
framework_one="$WORK/one/VerseVDICore.xcframework"
|
framework_one="$WORK/one/VerseVDICore.xcframework"
|
||||||
framework_two="$WORK/physical-parent/two/VerseVDICore.xcframework"
|
framework_two="$WORK/physical-parent/two/VerseVDICore.xcframework"
|
||||||
@@ -185,6 +188,18 @@ sha256_file() {
|
|||||||
canonical_tree "$framework_one" >"$WORK/one.tree"
|
canonical_tree "$framework_one" >"$WORK/one.tree"
|
||||||
canonical_tree "$framework_two" >"$WORK/two.tree"
|
canonical_tree "$framework_two" >"$WORK/two.tree"
|
||||||
cmp "$WORK/one.tree" "$WORK/two.tree"
|
cmp "$WORK/one.tree" "$WORK/two.tree"
|
||||||
|
canonical_tree "$WORK/one" >"$WORK/one.output-tree"
|
||||||
|
canonical_tree "$WORK/physical-parent/two" >"$WORK/two.output-tree"
|
||||||
|
cmp "$WORK/one.output-tree" "$WORK/two.output-tree"
|
||||||
|
for directory in \
|
||||||
|
"$WORK/one" \
|
||||||
|
"$WORK/target-one" \
|
||||||
|
"$framework_one" \
|
||||||
|
"$WORK/physical-parent/two" \
|
||||||
|
"$WORK/parents/target-two" \
|
||||||
|
"$framework_two"; do
|
||||||
|
test "$(stat -f '%Sp' "$directory")" = drwxr-xr-x
|
||||||
|
done
|
||||||
test "$(sha256_file "$library_one")" = "$(sha256_file "$library_two")"
|
test "$(sha256_file "$library_one")" = "$(sha256_file "$library_two")"
|
||||||
|
|
||||||
source_epoch=$(git -C "$ROOT" show -s --format=%ct HEAD)
|
source_epoch=$(git -C "$ROOT" show -s --format=%ct HEAD)
|
||||||
|
|||||||
Reference in New Issue
Block a user