Package registry Rubygems does not allow multi plattform gems #14925

Closed
opened 2025-11-02 11:25:57 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @schorsch on GitHub (Sep 5, 2025).

Description

Rubygems can have multiple gems per version with a specific platform suffix. An example can be seen here on rubygems.org for the blake3-rb gem. Those gems contain precompiled binaries for specific plattforms and can also contin an non-suffixed version which gets compiled druing install. When running gem / bundle install the right platform version is auto-detected, i think by the client with this code.

On package create gitea checks only for a unique name(type/owner) in TryInsertPackage which should be enhanced, at least for rubygems, to take the platform into account. In the package listing those multiple packages per main version should also be shown.
In packages rubygems metadata the platform seems to be present.

Gitea Version

1.24.5

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

None

Originally created by @schorsch on GitHub (Sep 5, 2025). ### Description Rubygems can have multiple gems per version with a specific platform suffix. An example can be seen [here on rubygems.org for the blake3-rb gem](https://rubygems.org/gems/blake3-rb/versions). Those gems contain precompiled binaries for specific plattforms and can also contin an non-suffixed version which gets compiled druing install. When running gem / bundle install the right platform version is auto-detected, i think by the client with this [code](https://github.com/rubygems/rubygems/blob/e0d470bea329b6a1ad847407de82cae26fe2ec18/bundler/lib/bundler/match_platform.rb). On package create gitea checks only for a unique name(type/owner) in [TryInsertPackage](https://github.com/go-gitea/gitea/blob/07347634aa70defb7820332f4c860bb24f4ada2f/models/packages/package.go#L202) which should be enhanced, at least for rubygems, to take the platform into account. In the package listing those multiple packages per main version should also be shown. In [packages rubygems metadata ](https://github.com/go-gitea/gitea/blob/main/modules/packages/rubygems/metadata.go) the platform seems to be present. ### Gitea Version 1.24.5 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? docker ### Database None
GiteaMirror added the topic/packagestype/bugissue/needs-feedback labels 2025-11-02 11:25:57 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Sep 5, 2025):

Some fixes are in 1.25, can you take a try?

-> Improve nuget/rubygems package registries #34741

@wxiaoguang commented on GitHub (Sep 5, 2025): Some fixes are in 1.25, can you take a try? -> Improve nuget/rubygems package registries #34741
Author
Owner

@schorsch commented on GitHub (Sep 5, 2025):

Thanks for pointing this out! It did somehow not pop up in my issues search.
I'll give it a try, but need to check if we can go from stable to nightly on our current system.

@schorsch commented on GitHub (Sep 5, 2025): Thanks for pointing this out! It did somehow not pop up in my issues search. I'll give it a try, but need to check if we can go from stable to nightly on our current system.
Author
Owner

@GiteaBot commented on GitHub (Oct 6, 2025):

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot commented on GitHub (Oct 6, 2025): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14925