fix(core): normalize framework file modes
Verify Data Plane / gateway (push) Successful in 5m10s

This commit is contained in:
sechmachine
2026-08-13 00:47:26 +07:00
parent 9c27a1ebf5
commit 735d990901
2 changed files with 36 additions and 20 deletions
+1
View File
@@ -1,5 +1,6 @@
#!/bin/sh
set -eu
umask 022
PATH=/usr/bin:/bin:/usr/sbin:/sbin
export PATH
+16 -1
View File
@@ -47,7 +47,7 @@ expect_path_rejected "outside the repository" \
--output "$WORK/repository-alias/core/forbidden-output" \
--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 -p "$WORK/hostile-cargo-home" "$WORK/hostile-home/.cargo"
ln -s /usr/bin/false "$WORK/hostile-bin/cargo"
@@ -61,6 +61,8 @@ cat >"$WORK/hostile-home/.cargo/config.toml" <<'EOF'
[build]
rustc = "/usr/bin/false"
EOF
(
umask 077
env \
AR=/usr/bin/false \
CARGO_BUILD_RUSTC=/usr/bin/false \
@@ -80,6 +82,7 @@ env \
"$BUILDER" \
--output "$WORK/parent-alias/two" \
--target-dir "$WORK/parents/target-two"
)
framework_one="$WORK/one/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_two" >"$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")"
source_epoch=$(git -C "$ROOT" show -s --format=%ct HEAD)