Bug 2122518

Summary: [RFE] Provide a tool that extract module data for a given set of packages
Product: Red Hat Enterprise Linux 9 Reporter: Renaud Métrich <rmetrich>
Component: dnf-plugins-coreAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED DUPLICATE QA Contact: swm-qe
Severity: medium Docs Contact:
Priority: medium    
Version: 9.1CC: james.antill
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-05 12:35:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Renaud Métrich 2022-08-30 08:06:05 UTC
Description of problem:

I'm filing this RFE on RHEL9 because I believe it's too late for RHEL8. Feel free to change to RHEL8 if you think it's still doable.

We have customers that ship their own repositories containing selected packages extracted from Red Hat repositories to their customers.
Usually these are big customers that deliver their own product and certify their product with a given set of RHEL packages.

Due to modularity (in RHEL8 for now, but I understand RHEL9 will also have it), it's complicated for the customers to create a repository with the package selection, because they have to craft their own "modules.yaml" then use "createrepo_mod" on the custom repository.

It would be very handy for those customers to have a tool that automatically extracts the modules corresponding to the packages they want to repackage, e.g.:
~~~
# yumdownloader --with-modules-data mod_ssl-2.4.37-47.module+el8.6.0+15654+427eba2e.2.x86_64.rpm httpd-2.4.37-47.module+el8.6.0+15654+427eba2e.2.x86_64.rpm httpd-tools-2.4.37-47.module+el8.6.0+15654+427eba2e.2.x86_64.rpm httpd-filesystem-2.4.37-47.module+el8.6.0+15654+427eba2e.2.noarch.rpm
~~~

Additionally to downloading the packages, the "httpd" module data at expected release level would be collected as "modules.yaml", ready for "createrepo_mod" usage.


Version-Release number of selected component (if applicable):

N/A

How reproducible:

N/A

Comment 2 Jaroslav Mracek 2022-09-05 12:35:47 UTC
I have a great news. The tool already exists  - `dnf modulesync` command. It is already in RHEL8 and on the way to RHEL9 (see BZ 2066646).

*** This bug has been marked as a duplicate of bug 2066646 ***