Skip to content

RPM Package - Epochs break repo entry #34017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jahn-swob opened this issue Mar 25, 2025 · 1 comment · Fixed by #34112
Closed

RPM Package - Epochs break repo entry #34017

jahn-swob opened this issue Mar 25, 2025 · 1 comment · Fixed by #34112

Comments

@jahn-swob
Copy link

jahn-swob commented Mar 25, 2025

Description

Uploading an RPM file with an epoch greater than 0 causes the upload to make a mal-formed rpm entry.
Looking through the database it appears that the [package_version].version entries have the epoch prefixed in the version erroneously and the [package_file].name also has the epoch prefixed before the version number.

Manually fixing these entries in the database fixes the expected URL that dnf needs to download the package, but since the file name was changed the signature is invalid.

This only affects the functionality within dnf - the packages within the listing in gitea will still allow manual downloading of the file.

Steps to reproduce:

  • Get docker-ce rpm (tested version was 3:28.0.2-1.el9 -- filename docker-ce-28.0.2-1.el9.x86_64.rpm)
  • Attempt to upload the rpm to a repository
    • Notice that:
      • Version number has been changed from 28.0.2-1.el9 to 3-28.0.2-1.el9
      • File name has been changed from docker-ce-28.0.2-1.el9.x86_64.rpm => docker-ce-3-28.0.2-1.el9.x86_64.rpm
  • Replicated here: https://demo.gitea.com/jahn-swob/-/packages/rpm/docker-ce/3-28.0.2-1.el9

Gitea Version

1.23.3

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

RHEL9

How are you running Gitea?

Using the 1.23.3 release from go-gitea releases.
Replicated using demo.gitea.com

Database

MSSQL

@KN4CK3R
Copy link
Member

KN4CK3R commented Apr 3, 2025

Fixed with #34112. You need to re-generate the RPM repository metadata files by pushing a random package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants