On 9/1/26 01:25, Alejandro Saez Morollon via devel wrote:
On Tue, Sep 1, 2026 at 5:05 AM Orion Poplawski <[email protected]> wrote:
Apparently this is not possible:
%goprep -p1 -n cli-1.0.0-rc1
No, -n is a `%setup` thing, but `%goprep` doesn't support it. You can
see the supported arguments here:
https://gitlab.com/fedora/sigs/go/go-rpm-macros/-/blob/main/rpm/macros.d/macros.go-rpm?ref_type=heads#L119-176
Thanks for the link - the %tag macro appears to be helpful.
What is the recommended way to handle pre-release versions with golang
packaging?
Using `Version` should be enough. Now if they package uses `~` instead
of `-`, you might want to do a little bit of substitution like they
did here:
https://src.fedoraproject.org/rpms/docker-compose/blob/7d39c75168a7b4731c25636ee3e6d3eb050fdcbb/f/docker-compose.spec
As a side note, you might want to use go2rpm to generate the specfile
for you, it should handle all these things in many scenarios.
https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/#_go2rpm
$ go2rpm github.com/cobbler/cli
golang-github-cobbler-cli.spec
$ fedpkg --release rawhide local
Using golang-github-cobbler-cli.spec
Could not execute local: Couldn’t parse spec file
golang-github-cobbler-cli.spec:
error: line 15: Illegal char '-' (0x2d) in: Version:
1.0.0-rc1
So it doesn't appear to handle this scenario.
Also, go2rpm appears to be generating names with a golang- prefix.
Isn't this deprecated
https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/#_naming
or am I misunderstanding things? This is pretty much my first foray
into go.
--
Orion Poplawski
he/him/his - surely the least important thing about me
IT Systems Manager 720-772-5637
NWRA, Boulder/CoRA Office FAX: 303-415-9702
3380 Mitchell Lane [email protected]
Boulder, CO 80301 https://www.nwra.com/
--
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
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/[email protected]
Do not reply to spam, report it:
https://forge.fedoraproject.org/infra/tickets/issues/new