Re: Packaging a go application

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Robin,

"Robin Opletal" <me@xxxxxxxxxxxxxxxx> writes:

> Hi,
>
> As I have said earlier, I am trying to package aerc, the mail client,
> for Fedora. What didn't cross my mind is that internet access will be
> limited during the build, thus the automatic dependency resolution
> from the Makefile during the build stage of aerc doesn't work.
>
> I was wondering what the best way would be to get this into
> BuildRequires.
>
> My current .spec - https://pastebin.com/HZsuPXds
>
> The project uses go.mod
> (https://git.sr.ht/~sircmpwn/aerc/tree/master/go.mod) with quite a few
> dependencies, most of them not available in the official repositories as
> packages.
>
> As far as I understand, that gives me two options:
>
> 1) Bundle the dependencies as a package for each release of aerc based
> on aerc's go.mod
>
> 2) Package a go application according to the official Go packaging
> guidelines (from here:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/#_dependencies)
>
> I have attempted this, generating the deps with golist as described and
> adding those as BuildRequires, but the builds then failed with
>
> error: Failed build dependencies:
>        golang(github.com/creack/pty) is needed by
>        aerc-0.5.2-4.fc33.x86_64

This is to be expected: your newly created package (the go dependency
github.com/creack/pty) will not be in the buildroot. I'd advise you to
first start out with a copr repo, into which you can plop all your newly
created go rpms and then finally build aerc from that.

>
> I have tried looking at the spec file of kubectl for reference, but I
> am not sure which all macros are required to make BuildRequires:
> golang(<package>) work.

BuildRequires: golang($url/$owner/$pkg)
indicates a dependent package that must be available in Fedora. It is
actually not a macro, it's just a naming convention for golang packages
(more specifically, this is a capability that golang packages provide).
Thus we would be free to change the naming of github.com/creack/pty
to fancy-golang-github-creack-pty (just a ridiculous example) while not
having to touch our packages at all, as long as it would still provide
golang(github.com/creack/pty).


Hope this makes sense,

Dan

Attachment: signature.asc
Description: PGP signature

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux