File ansible-terraform-inventory.changes of Package failed_ansible-terraform-inventory

Repair summary for package: failed_ansible-terraform-inventory

Root cause analysis:
- Build log showed VM/system-level run but the Go build step for the package can fail on non-x86 arches when using the -buildmode=pie linker mode with CGO disabled or on the target Go toolchain/arch (riscv64).
- The spec file's %build section specified "-buildmode=pie", which is known to be unsupported or unnecessary on some architectures and Go configurations. Removing this flag is the minimal change to allow the Go toolchain to emit a normal executable across architectures.

Changes applied (minimal):
1) Modified file: ansible-terraform-inventory.spec
   - Removed the -buildmode=pie argument from the go build invocation in the %build section.
   - Kept CGO_ENABLED conditional behavior (CGO_ENABLED=1 only for i586), preserved -mod=vendor and -ldflags that set main.build_version.

Reasoning:
- Omitting -buildmode=pie produces a regular executable compatible with more architectures. This is a minimal, targeted change limited to the packaging metadata, not source code. It avoids potential linker errors without altering program behavior.

Files modified:
- ansible-terraform-inventory.spec

Next steps:
- Repack and upload the repaired package directory for verification.

If further build failures occur after this change, please provide the new build log; likely follow-ups would be:
- Add/adjust BuildRequires for a specific go toolchain version or enable CGO for the target arch if required by vendor code.
- Inspect vendor.tar.gz contents for architecture-specific code requiring CGO.

Timestamp: 2025-08-30
openSUSE Build Service is sponsored by