Hi Robert-André and Andrew,

On Fri Aug 11, 2023 at 06:47 +0200, Robert-André Mauchin wrote:
> On 8/10/23 15:43, Andrew Heath wrote:
> > All,
> > My name is Andrew, and I have been working with the Fedora Infra team and 
> > we are trying to 
> > create some RPMs for some projects that we are working on, one of the RPMs 
> > we need to create 
> > is for the Ansible receptor[1 <https://github.com/ansible/receptor>]. I 
> > have a copy of the 
> > spec file from downstream Red Hat that gives some guidance but where its a 
> > mix of python and 
> > go-lang I was wondering if I could have some guidance from more experienced 
> > packers on how 
> > to package up the application correctly so that we can get the package in 
> > use for the Fedora 
> > Infra.
> > 
> > Links:
> > [1]: https://github.com/ansible/receptor 
> > <https://github.com/ansible/receptor>
> > 
> > -- 
> > Sincerely,
> > Andrew Heath
> > aheath1...@gmail.com <mailto:aheath1...@gmail.com>
>
> Hello,
>
> Is the final package for RHEL or Fedora? There are different guidelines 
> regarding bundling I 
> believe.

I would follow the Go Packaging Guidelines and use unbundled deps if
possible. If there are too many unpackaged dependencies or you run into
broken packages or other issues, I'd go with vendoring. I and others at
Flock discussed using more vendoring for Go packages given the
unmaintainable large stack of Go library packages and the outdated
and/or broken state of many of them.

> The first issue I see is that there are two separate Python project in two 
> subdirectories. 
> Not sure how to handle that.
>
> Could you share the dowstream?

https://fedorapeople.org/~gotmax23/receptor-1.4.1-1.el9ap.src/

This specfile does not use the modern Pyproject Python macros nor the
modern Go macros. It doesn't have an SPDX license identifier either.

The way it does vendoring is a problem, as it provides no instructions
to regenerate the archive with `go mod vendor`.
I believe Yaakov Selkowitz wrote a good script for this (I remember
asking him to provide one when reviewing a "vendor dependencies for X"
PR for an ELN package), but I can't seem to find it :(.
The vendor archive should contain %{version} in its name so that it's
tied to the main archive.
The specfile should have `%license vendor/modules.txt` so that the
go_mod_vendor generator can create the appropriate `bundled()` Provides.
The License field needs to account for the licenses of the bundled
libraries.

Overall, this is a complicated project and perhaps not the best for
someone new to RPM packaging. I grimaced when I first saw Go and Python
mixed together in the repository. I would suggest starting with
something like ansible-builder and ansible-navigator or other more
straightforward parts of the AWX/AAP stack and move on to this.
That said, I'm happy to answer any potential questions as best as I can.


-- 
Best,

Maxwell G (@gotmax23)
Pronouns: He/They
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to