Skip to content

Commit 03b32fb

Browse files
committed
Suppress mode preservation on all copy operations
We don't want it ever and it seems to be breaking things.
1 parent 0031f9f commit 03b32fb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

oci/private/image.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function base_from() {
4141
relative="$(coreutils realpath --relative-to="$OUTPUT/blobs/sha256" "$blob" --no-symlinks)"
4242
coreutils ln -s "$relative" "$OUTPUT/blobs/$relative_to_blobs"
4343
else
44-
coreutils cp "$blob" "$OUTPUT/blobs/$relative_to_blobs"
44+
coreutils cp --no-preserve=mode "$blob" "$OUTPUT/blobs/$relative_to_blobs"
4545
fi
4646
done
4747
coreutils cp --no-preserve=mode "$path/oci-layout" "$OUTPUT/oci-layout"
@@ -110,7 +110,7 @@ function add_layer() {
110110
relative=$(coreutils realpath --no-symlinks --canonicalize-missing --relative-to="$OUTPUT/blobs/sha256" "$path" )
111111
coreutils ln --force --symbolic "$relative" "$output_path"
112112
else
113-
coreutils cp "$path" "$output_path"
113+
coreutils cp --no-preserve=mode "$path" "$output_path"
114114
fi
115115
}
116116

oci/private/image_index.sh.tpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function add_image() {
2626
--argjson manifest "${manifest}" \
2727
'.manifests |= [$manifest + {"platform": $platform}]'\
2828
"${output_path}/manifest_list.json" > "${output_path}/manifest_list.new.json"
29-
"${COREUTILS}" cp "${output_path}/manifest_list.new.json" "${output_path}/manifest_list.json"
29+
"${COREUTILS}" cp --no-preserve=mode "${output_path}/manifest_list.new.json" "${output_path}/manifest_list.json"
3030
done
3131
}
3232

@@ -36,7 +36,7 @@ function copy_blob() {
3636
local blob_image_relative_path="$3"
3737
local dest_path="${output_path}/${blob_image_relative_path}"
3838
mkdirp "$(dirname "${dest_path}")"
39-
"${COREUTILS}" cp "${image_path}/${blob_image_relative_path}" "${dest_path}"
39+
"${COREUTILS}" cp --no-preserve=mode "${image_path}/${blob_image_relative_path}" "${dest_path}"
4040
}
4141

4242
function create_oci_layout() {

0 commit comments

Comments
 (0)