awscli not packaged for s390x due to awscrt dependency issues on big endian architectures
The awscli package is currently not available for the s390x architecture, primarily due to issues with its dependency, awscrt, on big endian systems. See the related Red Hat Bugzilla entry: https://bugzilla.redhat.com/show_bug.cgi?id=2180988.
Despite this, the CKI team has successfully been using awscli on s390x by installing it via pip.
Root Cause
When attempting to build awscrt on the current main branch natively on s390x, five test failures are observed. These failures are closely related and appear to originate from the aws-c-cal library, which awscrt depends on.
Specifically, a bug in the DER decoder due to unsafe pointer casting has been identified.
I opened an upstream issue: https://github.com/awslabs/aws-c-cal/issues/224, and an upstream PR: https://github.com/awslabs/aws-c-cal/issues/224
Tests failures identified in upstream issue linked in Bugzilla ticket (https://github.com/awslabs/aws-c-common/issues/1111#issuecomment-2098944171), related to aws-c-common, are still present but do not make awscli package build fail. This is also visible in the build log attached to Bugzilla ticket. In any case, a fix for those issues is already being proposed here: https://github.com/awslabs/aws-c-common/pull/1218 (ref issue: https://github.com/awslabs/aws-c-common/issues/1175)
Proposed Solution
The bug is relatively straightforward to fix, and after applying the upstream patch, the awscrt tests pass successfully on s390x. Consequently, removing the architecture exclusion from the spec file and rebuilding the awscli RPM package on s390x results in a successful build.
Next Steps
Followup on Bugzilla ticket and discuss possible solutions (e.g. apply the patch or wait for upstream PR merge).
Updates
Multiple discussions, issues and relatives PRs were opened upstream, waiting for review from maintainers.
Meanwhile, patches are sent to Fedora package maintainers that confirmed issue resolution, working on package release for s390x arch.