#26 Remove tildes from goname
Merged by eclipseo. Opened by blowry.
blowry/go-rpm-macros master  into  master

Download 26.patch

Go modules are allowed to have tildes in their import paths, Fedora package names aren't.

This probably needs to be substituted with another character...

What character should it be changed to? My use-case for this is sourcehut urls like https://git.sr.ht/~sircmpwn/getopt, so goname will be set to something like "golang-sr-sircmpwn-getopt" instead of "golang-sr-~sircmpwn-getopt".

Also, are tildes really invalid in package names? I didn't think they were...

Do they trigger the special versioning (even though they're not in the version)?

They should not. If it's in the name field, it's like any other character, as far as I know. @pmatilai, @ffesti, or @ignatenkobrain would know for sure, though.

It would've taken anybody like 5s to test whether tilde is allowed in the name or not, certainly much less than speculating about its possible effect on version comparison and whatnot. Tilde, like many other special characters, is not allowed in package name. Name obviously cannot take part in version comparison.

~ should be replaced with "-" then. "-" is safe as intra-name separator.

That sounds good but then the modules hosted on sourcehut I'm trying to package would have two dashes in a row (golang-sr--sircmpwn-getopt). Is that allowed/a desirable outcome?

The split on line 60 should coalesce repeated separators.

rebased onto 2977f89c9b46d4fc89fd0cf505d79a0bafa63af4

Should be good now

That will work but it’s better to add tilde to the generic forbidden separator cleanup rule:

-- replace various separators rpm does not like with -

rebased onto 4a12510af8c2ef1d7b62bbe8e5beb97e9e45cd67

Pull-Request has been merged by eclipseo

Metadata