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 1795936 - [RFE] createrepo_c should be able to handle modules information
Summary: [RFE] createrepo_c should be able to handle modules information
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: createrepo_c
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: amatej
QA Contact: Eva Mrakova
Mariya Pershina
URL:
Whiteboard:
Depends On:
Blocks: 1825061 1894575
TreeView+ depends on / blocked
 
Reported: 2020-01-29 09:41 UTC by Denis Volkov
Modified: 2024-12-20 18:58 UTC (History)
16 users (show)

Fixed In Version: createrepo_c-0.16.2-1.el8
Doc Type: Enhancement
Doc Text:
.`createrepo_c` now automatically adds modular metadata to repositories Previously, running the `createrepo_c` command on RHEL8 packages to create a new repository did not include modular repodata in this repository. Consequently, it caused various problems with repositories. With this update, `createrepo_c`: * scans for modular metadata * merges the found module YAML files into a single modular document `modules.yaml` * automatically adds this document to the repository. As a result, adding modular metadata to repositories is now automatic and no longer has to be done as a separate step using the `modifyrepo_c` command.
Clone Of:
Environment:
Last Closed: 2021-05-18 15:46:42 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 4888921 0 None None None 2020-03-09 15:12:27 UTC
Red Hat Product Errata RHBA-2021:1840 0 None None None 2021-05-18 15:46:50 UTC

Description Denis Volkov 2020-01-29 09:41:29 UTC
Description of problem:
Currently createrepo does not handle modules information (modules.yaml) and as a result there are problems with repositories created from RHEL8 packages. Modules.yaml must be handled separately at the moment

Version-Release number of selected component (if applicable):
createrepo_c-0.11.0-3.el8.src.rpm

Steps to Reproduce:
1. Reposync RHEL8 repo:

dnf reposync --newest-only --repoid=rhel-8-for-x86_64-appstream-rpms --download-path=/var/www/html/rhel8 --downloadcomps --download-metadata 
createrepo -v /var/www/html/rhel8/rhel-8-for-x86_64-appstream-rpms/ -g comps.xml

2. Enable new repo

3. Try updating packages from the new repo

Actual results:
`dnf update` shows packages conflicts:

Fehler: 
 Problem 1: cannot install both perl-libs-4:5.24.4-404.module+el8.1.0+2926+ce7246ad.x86_64 and perl-libs-4:5.26.3-416.el8.x86_64
  - package perl-Digest-1.17-396.module+el8.1.0+2926+ce7246ad.noarch requires perl(:MODULE_COMPAT_5.24.4), but none of the providers can be installed
  - cannot install the best update candidate for package perl-libs-4:5.26.3-416.el8.x86_64
  - cannot install the best update candidate for package perl-Digest-1.17-395.el8.noarch

There is conflict between perl:5.24 and perl:5.26 stream

Additional info:
The problem arises because there is no information about modules in rpms. So createrepo does not see the information about modules and so is not able to pass this information to the system.

There is workaround: get modules info from the repocache and add it to the created repository:

    gunzip -c /var/cache/dnf/AppStream-..../repodata/...........-modules.yaml.gz > /tmp/AppStream-modules.yaml
    modifyrepo_c --mdtype=modules /tmp/AppStream-modules.yaml /var/www/html/rhel8/rhel-8-for-x86_64-appstream-rpms

Comment 3 Daniel Mach 2020-06-11 07:09:38 UTC
createrepo_c will scan for yaml files in addition to RPMs.
The patterns are:
  *.modulemd.yaml (recommended file name: N:S:V:C:A.modulemd.yaml)
  *.modulemd-defaults.yaml (recommended file name: N.modulemd-defaults.yaml)
  modules.yaml (recommended way of importing multiple documents at once)

The files can come from a directory scan or from -i, --pkglist.
Package list must support a mix of RPMs and yaml documents.
  
The patterns and supported modulemd documents will be extended in the future as needed. Most likely an extension to support EOL/Obsoletes will be needed:
https://fedoraproject.org/w/index.php?title=Changes/Module_Obsoletes_and_EOL

As the result, all found and supported yaml documents will be merged into [hash-]modules.yaml[.compression] in the repodata with <data type="modules">.

The files should be ordered prior creating modules.yaml to guarantee repeatability. See how createrepo_c orders RPMs.
If combination of individual yaml documents and modules.yaml is used, modules.yaml must go first and individual documents must override relevant parts of its original content.

createrepo_c --update will work work with the yaml documents the same way as createrepo_c in regular (non-update) mode, because the operation is relatively cheap and it's not necessary to compute any checksums as nedded for RPMs.

Comment 24 errata-xmlrpc 2021-05-18 15:46:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (createrepo_c bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1840

Comment 25 Corey Brown 2021-11-22 14:28:15 UTC
Hi All,

I have a customer that is hitting this Bug on their attempt to pull down RHEL 8.4 repos. Do I need to open a new Bugzilla or is it sufficient to re-open this one?

I will provide logs and any other case details once the case has been created.

Corey Brown

Comment 26 amatej 2021-11-22 14:32:32 UTC
Hello, I think a new bugzilla would be better.


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