Skip to content
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

Installing package dependencies from RPM Package Repo fails #27056

Closed
mehmax opened this issue Sep 13, 2023 · 3 comments · Fixed by #26984
Closed

Installing package dependencies from RPM Package Repo fails #27056

mehmax opened this issue Sep 13, 2023 · 3 comments · Fixed by #26984

Comments

@mehmax
Copy link

mehmax commented Sep 13, 2023

Description

I have uploaded some rpm packages to my Gitea instance. Some of those packages have dependencies which are uploaded as well to the gitea package repo.

I have added my package repo to dnf.

# packages.rpm.distro.redhat
dnf config-manager --add-repo http://XXXX:3000/api/packages/cloned/rpm.repo

But have modified the /etc/yum.repos.d/rpm.repo and disabled gpgcheck

[gitea-cloned]
name=cloned - Gitea: Git with a cup of tea
baseurl=http://XXXX:3000/api/packages/cloned/rpm
enabled=1
gpgcheck=0
gpgkey=http://XXXX:3000/api/packages/cloned/rpm/repository.key

I have uploaded the required packages

image

Due to simplification I now use Package 1 and Package 2
Package 1 is dependend on Package 2.

When trying to install Package 1 with dnf it correctly resolves dependencies and the source repository, but install fails due to checksum mismatch.
image

I did a bit of further analysis and found out that the filename of the downloaded file might be the reason.
All packages that are / were downloaded have the same filename x86_64.

When trying to install just from cache I see this error.
image

dnf is always refering to the same filename x86_64 even if the package name is different.

Downloading the packages manually with wget also outputs filename (which is the last part of the URL)

wget http://XXXX:3000/api/packages/cloned/rpm/package/package-1/1.0/x86_64

image

Now I dont know where the rootcause is. Is gitea outputting a "wrong" filename or is dnf

A few more annotations:

  • Installing each package without dependencies one by one is working fine
  • using yum instead of dnf results in the same error behaviour
  • using yumdownloader --resolve package-1 also outputs a single file named x86_64

Gitea Version

1.20.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

How are you running Gitea?

On-Premise with executable (no docker)

dnf version 4.0.9

Database

MySQL/MariaDB

@ExplodingDragon
Copy link
Contributor

ExplodingDragon commented Sep 13, 2023

This is a bug , because dnf can't properly parse the filename in the request header.

It is possible to temporarily add a new virtual route to alleviate the error.

// yum/dnf client does not recognize the filename of the header.

@Leskodamus
Copy link

Having the same issue and hoping for a fix as it would be nice to auto install dependencies in production.

lunny pushed a commit that referenced this issue Jan 12, 2024
The current rpm repository places all packages in the same repository,
and different systems (el7,f34) may hit packages that do not belong to
this distribution ( #25304 ) , which now supports grouping of rpm.

![图片](https://github.com/go-gitea/gitea/assets/33776693/d1e1d99f-7799-4b2b-a19b-cb2a5c692914)

Fixes #25304 .
Fixes #27056 .

Refactor: [#25866](#25866)
@ExplodingDragon
Copy link
Contributor

Note: After upgrading to the latest version you need to upload a new RPM to refresh the index before it will work.

fuxiaohei pushed a commit to fuxiaohei/gitea that referenced this issue Jan 17, 2024
The current rpm repository places all packages in the same repository,
and different systems (el7,f34) may hit packages that do not belong to
this distribution ( go-gitea#25304 ) , which now supports grouping of rpm.

![图片](https://github.com/go-gitea/gitea/assets/33776693/d1e1d99f-7799-4b2b-a19b-cb2a5c692914)

Fixes go-gitea#25304 .
Fixes go-gitea#27056 .

Refactor: [go-gitea#25866](go-gitea#25866)
silverwind pushed a commit to silverwind/gitea that referenced this issue Feb 20, 2024
The current rpm repository places all packages in the same repository,
and different systems (el7,f34) may hit packages that do not belong to
this distribution ( go-gitea#25304 ) , which now supports grouping of rpm.

![图片](https://github.com/go-gitea/gitea/assets/33776693/d1e1d99f-7799-4b2b-a19b-cb2a5c692914)

Fixes go-gitea#25304 .
Fixes go-gitea#27056 .

Refactor: [go-gitea#25866](go-gitea#25866)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants