Name of RPM-package differs between package-view and repository

Problem:
After uploading a rpm-package to Katello, the name differs between what you see in the package-view of the product-page and what is found inside the actual repository. The url that dnf points to refers to the name of the package-view, which causes an 404 Not found error.

Expected outcome:
Being able to install the rpm-package using DNF.

Foreman and Proxy versions:
Foreman 3.4.0 & Katello 4.6.0

Distribution and version:
RHEL 8

Other relevant data:
Name in package-view of product-page.
image

Name in actual repository.
image

Output from DNF.

[root@splunkweb01.infra.org.nu ~]# dnf install splunk-8.1.12
Updating Subscription Management repositories.
Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs)                                                                      176 kB/s | 4.5 kB     00:00    
Dependencies resolved.
==============================================================================================================================================================
 Package                           Architecture                      Version                                          Repository                         Size
==============================================================================================================================================================
Downgrading:
 splunk                            x86_64                            8.1.12-4eb558a8f0b7                              splunk                            457 M

Transaction Summary
==============================================================================================================================================================
Downgrade  1 Package

Total download size: 457 M
Is this ok [y/N]: y
Downloading Packages:
[MIRROR] splunk-8.1.12-4eb558a8f0b7.x86_64.rpm: Status code: 404 for http://katello01.infra.org.nu/pulp/repos/Default_Organization/Library/custom/Aza/splunk/Packages/s/splunk-8.1.12-4eb558a8f0b7.x86_64.rpm (IP: 10.87.1.14)
[MIRROR] splunk-8.1.12-4eb558a8f0b7.x86_64.rpm: Status code: 404 for http://katello01.infra.org.nu/pulp/repos/Default_Organization/Library/custom/Aza/splunk/Packages/s/splunk-8.1.12-4eb558a8f0b7.x86_64.rpm (IP: 10.87.1.14)
[MIRROR] splunk-8.1.12-4eb558a8f0b7.x86_64.rpm: Status code: 404 for http://katello01.infra.org.nu/pulp/repos/Default_Organization/Library/custom/Aza/splunk/Packages/s/splunk-8.1.12-4eb558a8f0b7.x86_64.rpm (IP: 10.87.1.14)
[MIRROR] splunk-8.1.12-4eb558a8f0b7.x86_64.rpm: Status code: 404 for http://katello01.infra.org.nu/pulp/repos/Default_Organization/Library/custom/Aza/splunk/Packages/s/splunk-8.1.12-4eb558a8f0b7.x86_64.rpm (IP: 10.87.1.14)
[FAILED] splunk-8.1.12-4eb558a8f0b7.x86_64.rpm: No more mirrors to try - All mirrors were already tried without success                                      

The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Error downloading packages:
  splunk-8.1.12-4eb558a8f0b7.x86_64: Cannot download, all mirrors were already tried without success

RPM Info.

rpm -qi -v splunk-8.1.12-4eb558a8f0b7.x86_64.rpm
warning: splunk-8.1.12-4eb558a8f0b7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID b3cd4420: NOKEY
Name        : splunk
Version     : 8.1.12
Release     : 4eb558a8f0b7
Architecture: x86_64
Install Date: (not installed)
Group       : Applications/Internet
Size        : 1369312122
License     : Commercial
Signature   : RSA/SHA512, tor 20 okt 2022 10:40:21, Key ID 5efa01edb3cd4420
Source RPM  : splunk-8.1.12-4eb558a8f0b7.src.rpm
Build Date  : tor 20 okt 2022 10:36:46
Build Host  : f41d48f0d6e4
Relocations : /opt 
Vendor      : Splunk Inc. <info@splunk.com>
Summary     : Splunk
Description :
The platform for machine data.

Looks like the package was renamed after building to the name you uploaded, this name is then taken by Katello / Pulp for one functionality and the original name used in another.

I would classify this as a bug. Can you try to name the file to splunk-8.1.12-4eb558a8f0b7.x86_64.rpm before uploading and verify this would work? Afterwards filing a bug with this information would be the next step.

Hi,

Thank you for the fast response on this!

Renaming the file to anything.rpm doesn’t change the name in Katello’s package-view nor in the repository. It basically doesn’t do any difference.

I have tried uploading it via the katello gui and hammer, but no difference there. Is the name of the RPM uploaded based of the filename or some type of metadata information? Since, changing the filename doesn’t change the name when being uploaded.

I’ve upgraded to Foreman 3.5.1 and Katello 4.7.0 today but the problem still persist. We are still unable to install this rpm since it adds ‘linux-2.6’- to the rpm-package name.

I noticed today that someone else had experienced the same issue:

I also have this exact problem when trying to use the rpm package provided from Splunk. Does anyone have any workaround for this issue? Where can I file a bug report?

Also hit this problem once when adding a package to a custom repo from a source that did not provide their own repo. Never figured out what the problem was though but it was just a “nice to have” thing I never put any time to solve it. Figured someone did something wrong when creating the rpm. On thing is for sure though, the uploaded filename of the rpm seems to be ignored. Instead it is the cpio name inside of the rpm that is used.

This is being tracked in Bug #35952: RPM packages renamed when manually uploaded leading to 404s on dnf - Katello - Foreman

1 Like