Skip to content

Commit

Permalink
Fix multiarch builds of Cinder CSI (#2342)
Browse files Browse the repository at this point in the history
The libs copied into cinder-csi-plugin image are named and placed
differently across platforms. This commit attempts to solve this by
differentiating where we take them from.

Co-authored-by: Michał Dulko <[email protected]>
  • Loading branch information
k8s-infra-cherrypick-robot and dulek authored Aug 25, 2023
1 parent f5a1d11 commit 0cf5884
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tools/csi-deps.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -x

# Copyright 2022 The Kubernetes Authors.
#
Expand Down Expand Up @@ -51,7 +51,16 @@ copy_deps() {

# Commmon lib /lib64/ld-linux-*.so.2
# needs for all utils
mkdir -p ${DEST}/lib64 && cp -Lv /lib64/ld-linux-*.so.2 ${DEST}/lib64/
ARCH=$(uname -m)
if [ $ARCH = "aarch64" ] || [ $ARCH = "armv7l" ]; then
mkdir -p ${DEST}/lib && cp -Lv /lib/ld-linux-*.so.* ${DEST}/lib/
elif [ $ARCH = "s390x" ]; then
mkdir -p ${DEST}/lib && cp -Lv /lib/ld64.so.* ${DEST}/lib/
elif [ $ARCH = "ppc64le" ]; then
mkdir -p ${DEST}/lib64 && cp -Lv /lib64/ld64.so.* ${DEST}/lib64/
else
mkdir -p ${DEST}/lib64 && cp -Lv /lib64/ld-linux-*.so.* ${DEST}/lib64/
fi

# This utils are using by
# go mod k8s.io/mount-utils
Expand Down

0 comments on commit 0cf5884

Please sign in to comment.