Hi all,
I'm new to Go SIG. There are some Go apps that I'm interested in packaging and I'm learning about it.
One of these packages is `doctl`, the official cli for DigitalOcean, but I'm having problems with the result.
I'm able to build it using mock or copr, but the generated binary is detected as `ar archive` by `file`, strip complains during %install phase and result rpm is not usable.
- Spec file[1]: https://github.com/mikelolasagasti/doctl/blob/main/doctl.spec
Simple go2rpm with minor changes. Requires also `golang-github-natefinch-pie` that is available in the same repo, rest of dependencies are available in rawhide and F35.
- Copr build log[2]: https://download.copr.fedorainfracloud.org/results/mikelo2/doctl/fedora-rawh...
(...) /usr/bin/strip: /builddir/build/BUILDROOT/doctl-1.64.0-1.fc36.x86_64/usr/bin/doctl(__.PKGDEF): Unable to recognise the format of file: file format not recognized /usr/bin/strip: /builddir/build/BUILDROOT/doctl-1.64.0-1.fc36.x86_64/usr/bin/doctl(_go_.o): Unable to recognise the format of file: file format not recognized (...)
- rpmlint:
$ rpmlint result/doctl-1.64.0-1.fc36.x86_64.rpm doctl.x86_64: E: script-without-shebang /usr/bin/doctl doctl.x86_64: E: wrong-script-end-of-line-encoding /usr/bin/doctl doctl.x86_64: W: no-manual-page-for-binary doctl
- file:
<mock-chroot> sh-5.1# cd /builddir/build/BUILDROOT/doctl-1.64.0-1.fc36.x86_64/usr/bin/ <mock-chroot> sh-5.1# file doctl doctl:
I was able to find another spec[3] https://bugzilla.redhat.com/show_bug.cgi?id=1821902 that is having the same issue, but not a solution.
Any idea on how to troubleshoot this?
Kind regards, Mikel
[1] https://github.com/mikelolasagasti/doctl/blob/main/doctl.spec [2] https://download.copr.fedorainfracloud.org/results/mikelo2/doctl/fedora-rawh... [3] https://bugzilla.redhat.com/show_bug.cgi?id=1821902