Description of problem:
The oc binary stored at /usr/local/bin in the cli-artifacts image of a non-amd64 payload is not the one for the architecture bound to the payload. It is an amd64 binary.
Version-Release number of selected component (if applicable):
4.11.4
How reproducible:
always
Steps to Reproduce:
1. CLI_ARTIFACTS_IMAGE=$(oc adm release info quay.io/openshift-release-dev/ocp-release:4.11.4-aarch64 --image-for=cli-artifacts) 2. CONTAINER=$(podman create $CLI_ARTIFACTS_IMAGE) 3. podman cp $CONTAINER:/usr/bin/oc /tmp/oc 4. file /tmp/oc
Actual results:
/tmp/oc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked,.....
Expected results:
It should be a binary bound to the architecture for which the image is built. i.e., using the above aarch64 payload should lead to an arm64 binary at /usr/bin and the other arches bins in /usr/share/openshift
Additional info:
https://github.com/openshift/oc/blob/master/images/cli-artifacts/Dockerfile.rhel#L13