-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add patch to remove reliance on podman run
- Loading branch information
1 parent
6aafd28
commit c4f5407
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
base/tekton.dev/repositories/container-storage/operator/remove-reliance-on-podman-run.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
From e2f13fb83e440693b1adff89b93d3b0b89c5cd04 Mon Sep 17 00:00:00 2001 | ||
From: Zed Spencer-Milnes <zed@ziax.com> | ||
Date: Fri, 1 Mar 2024 00:28:27 +0000 | ||
Subject: [PATCH] Prefer create and cp over cat and ls manipulation | ||
|
||
--- | ||
hack/source-manifests.sh | 25 ++++++++++++------------- | ||
1 file changed, 12 insertions(+), 13 deletions(-) | ||
|
||
diff --git a/hack/source-manifests.sh b/hack/source-manifests.sh | ||
index 8b3b86aeb2..ac96e41667 100755 | ||
--- a/hack/source-manifests.sh | ||
+++ b/hack/source-manifests.sh | ||
@@ -35,20 +35,19 @@ function dump_rook_csv() { | ||
rm -rf $ROOK_CSV | ||
rm -rf $rook_crds_outdir | ||
mkdir -p $rook_crds_outdir | ||
+ rm -f $rook_crds_outdir | ||
|
||
- crd_list=$(mktemp) | ||
- echo "Dumping rook csv using command: $IMAGE_RUN_CMD --platform=linux/amd64 --entrypoint=cat $ROOK_IMAGE $rook_template_dir/$rook_csv_template" | ||
- $IMAGE_RUN_CMD --platform=linux/amd64 --entrypoint=cat "$ROOK_IMAGE" $rook_template_dir/$rook_csv_template > $ROOK_CSV | ||
- echo "Listing rook crds using command: $IMAGE_RUN_CMD --platform=linux/amd64 --entrypoint=ls $ROOK_IMAGE -1 $rook_crds_dir/" | ||
- $IMAGE_RUN_CMD --platform=linux/amd64 --entrypoint=ls "$ROOK_IMAGE" -1 $rook_crds_dir/ > "$crd_list" | ||
- # shellcheck disable=SC2013 | ||
- for i in $(cat "$crd_list"); do | ||
- # shellcheck disable=SC2059 | ||
- crd_file=$(printf ${rook_crds_dir}/"$i" | tr -d '[:space:]') | ||
- echo "Dumping rook crd $crd_file using command: $IMAGE_RUN_CMD --platform=linux/amd64 --entrypoint=cat $ROOK_IMAGE $crd_file" | ||
- ($IMAGE_RUN_CMD --platform=linux/amd64 --entrypoint=cat "$ROOK_IMAGE" "$crd_file") > $rook_crds_outdir/"$(basename "$crd_file")" | ||
- done; | ||
- rm -f "$crd_list" | ||
+ tmp_dir=$(mktemp -d) | ||
+ tmp_container="rook-$(date +%S%N)" | ||
+ | ||
+ echo "Creating rook image to play with using command: $IMAGE_BUILD_CMD create --name=$tmp_container $ROOK_IMAGE" | ||
+ $IMAGE_BUILD_CMD create --name=$tmp_container $ROOK_IMAGE | ||
+ echo "Dumping rook csv using command: $IMAGE_BUILD_CMD cp $tmp_container:$rook_template_dir/$rook_csv_template $ROOK_CSV" | ||
+ $IMAGE_BUILD_CMD cp $tmp_container:$rook_template_dir/$rook_csv_template $ROOK_CSV | ||
+ echo "Dumping rook crds using command: $IMAGE_BUILD_CMD cp $tmp_container:$rook_crds_dir $rook_crds_outdir" | ||
+ $IMAGE_BUILD_CMD cp $tmp_container:$rook_crds_dir $rook_crds_outdir | ||
+ echo "Cleaning up rook container with command: $IMAGE_BUILD_CMD rm $tmp_container" | ||
+ $IMAGE_BUILD_CMD rm $tmp_container | ||
} | ||
|
||
# ==== DUMP OCS YAMLS ==== | ||
|