RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2120378 - dnf debuginfo-install does not work in ubi-8
Summary: dnf debuginfo-install does not work in ubi-8
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ubi8-container
Version: 8.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jindrich Novy
QA Contact: atomic-bugs@redhat.com
Gabriela Nečasová
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-22 17:37 UTC by Petr Menšík
Modified: 2023-03-02 21:45 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
.DNF and YUM no longer fail because of non-matching repository IDs Previously, DNF and YUM repository IDs did not match the format that DNF or YUM expected. For example, if you ran the following example, the error occurred: ---- # podman run -ti ubi8-ubi # dnf debuginfo-install dnsmasq ... This system is not registered with an entitlement server. You can use subscription-manager to register. ---- With this update, the problem has been fixed. Suffix `--debug-rpms` was added to all debug repository names (for example `ubi-8-appstream-debug-rpms`), and also the suffix `-rpms` was added to all UBI repository names (for example `ubi-8-appstream-rpms`). For more information, see link:https://access.redhat.com/articles/4238681[Universal Base Images (UBI): Images, repositories, packages, and source code].
Clone Of:
Environment:
Last Closed: 2022-09-23 11:31:00 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-131878 0 None None None 2022-08-22 17:44:24 UTC

Description Petr Menšík 2022-08-22 17:37:45 UTC
Description of problem:
When I tried to prepare dnsmasq debug container from ubi8 base, I found 

Version-Release number of selected component (if applicable):
REPOSITORY                       TAG         IMAGE ID      CREATED      SIZE
registry.access.redhat.com/ubi9  latest      168c58a38365  2 weeks ago  228 MB
quay.io/app-sre/ubi8-ubi-init    latest      ce0da6ca1477  3 weeks ago  240 MB
registry.access.redhat.com/ubi8  latest      f754849582f5  3 weeks ago  225 MB
quay.io/app-sre/ubi8-ubi         latest      f754849582f5  3 weeks ago  225 MB

How reproducible:
reliable

Steps to Reproduce:
1. podman run -ti ubi8-ubi
2. dnf debuginfo-install dnsmasq
3.

Actual results:
# dnf debuginfo-install dnsmasq
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Red Hat Universal Base Image 8 (RPMs) - BaseOS                                                               2.6 MB/s | 804 kB     00:00    
Red Hat Universal Base Image 8 (RPMs) - AppStream                                                            3.9 MB/s | 3.0 MB     00:00    
Red Hat Universal Base Image 8 (RPMs) - CodeReady Builder                                                    104 kB/s |  20 kB     00:00    
Could not find debuginfo package for the following available packages: dnsmasq-2.79-21.el8
Could not find debugsource package for the following available packages: dnsmasq-2.79-21.el8
Dependencies resolved.
Nothing to do.
Complete!


Expected results:
# dnf debuginfo-install -y dnsmasq
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

enabling ubi-8-baseos-debuginfo repository
enabling ubi-8-appstream-debuginfo repository
enabling ubi-8-codeready-builder-debuginfo repository
Last metadata expiration check: 0:00:45 ago on Mon Aug 22 17:34:33 2022.
Dependencies resolved.
=============================================================================================================================================
 Package                              Architecture            Version                       Repository                                  Size
=============================================================================================================================================
Installing:
 dnsmasq-debuginfo                    x86_64                  2.79-21.el8                   ubi-8-appstream-debuginfo                  465 k
 dnsmasq-debugsource                  x86_64                  2.79-21.el8                   ubi-8-appstream-debuginfo                  268 k

Transaction Summary
=============================================================================================================================================
Install  2 Packages

Total download size: 733 k
Installed size: 2.4 M
Downloading Packages:
(1/2): dnsmasq-debugsource-2.79-21.el8.x86_64.rpm                                                            1.4 MB/s | 268 kB     00:00    
(2/2): dnsmasq-debuginfo-2.79-21.el8.x86_64.rpm                                                              2.1 MB/s | 465 kB     00:00    
---------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                        3.2 MB/s | 733 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                     1/1 
  Installing       : dnsmasq-debugsource-2.79-21.el8.x86_64                                                                              1/2 
  Installing       : dnsmasq-debuginfo-2.79-21.el8.x86_64                                                                                2/2 
  Running scriptlet: dnsmasq-debuginfo-2.79-21.el8.x86_64                                                                                2/2 
  Verifying        : dnsmasq-debugsource-2.79-21.el8.x86_64                                                                              1/2 
  Verifying        : dnsmasq-debuginfo-2.79-21.el8.x86_64                                                                                2/2 
Installed products updated.

Installed:
  dnsmasq-debuginfo-2.79-21.el8.x86_64                                 dnsmasq-debugsource-2.79-21.el8.x86_64                                


Additional info:
The fix is to rename *-debug repositories to *-debuginfo repositories. This command would fix this issue:

sed -e 's/-debug]/-debuginfo]/' -i /etc/yum.repos.d/ubi.repo

The ubi9 container has the same problem also.

Comment 1 Derrick Ornelas 2022-08-23 17:30:23 UTC
Looking at RHEL 8 for example, I see rhel-8-for-x86_64-baseos-debug-rpms and rhel-8-for-x86_64-appstream-debug-rpms. How does debuginfo-install know these are the debuginfo repos? Can we use that same mechanism for the UBI repos instead of changing the repo names and possibly disrupting users?

Comment 2 Kyle Walker 2022-08-23 17:45:57 UTC
It's upstream source, but the reason why DNF can enable the debuginfo repos is because of:

    <snip>
        def configure(self):
            demands = self.cli.demands
            demands.resolving = True
            demands.root_user = True
            demands.sack_activation = True
            demands.available_repos = True
            self.base.repos.enable_debug_repos()
    <snip>
    https://github.com/rpm-software-management/dnf-plugins-core/blob/master/plugins/debuginfo-install.py#L76

Which relies on:

    <snip>
        def enable_debug_repos(self):
            # :api
            """enable debug repos corresponding to already enabled binary repos"""

            def debug_name(name):
                return ("{}-debug-rpms".format(name[:-5]) if name.endswith("-rpms")
                        else "{}-debuginfo".format(name))

            self._enable_sub_repos(debug_name)
    <snip>
    https://github.com/rpm-software-management/dnf/blob/395541fbf8f87f81cdca7567f22be1182e55bea7/dnf/repodict.py#L97

So, the lack of "-rpms" causes the end enable operation to be ubi-8-appstream-debuginfo instead of the current repo name of ubi-8-appstream-debug.


Note You need to log in before you can comment on or make changes to this bug.