Bug 1656584

Summary: Add support for modular errata
Product: Red Hat Enterprise Linux 8 Reporter: Tanya Tereshchenko <ttereshc>
Component: createrepo_cAssignee: amatej
Status: CLOSED ERRATA QA Contact: Karel Srot <ksrot>
Severity: unspecified Docs Contact:
Priority: high    
Version: ---CC: amatej, carlwgeorge, dmach, jmracek, pkratoch, psabata, rbarlow, tbowling, ttereshc, wchadwic
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: createrepo_c-0.11.0-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 22:20:50 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1681078    
Bug Blocks: 1701002    

Description Tanya Tereshchenko 2018-12-05 19:04:31 UTC
Createrepo_c library doesn't support new erratum format which includes information about modules.
(UpdateCollection is not aware of module info at the moment: https://github.com/rpm-software-management/createrepo_c/blob/master/src/updateinfo.c#L88-L111)

Projects like Bodhi [0] or Pulp3 [1] rely on createrepo_c (Python bindings) to parse and generate updateinfo.xml. Without support of the new format later versions of Satellite/Pulp won't be able to generate updateinfo.xml for modularity data, and right now Bodhi can't produce a correct updateinfo.xml for modularity case as well.

The extended format is defined here: https://docs.google.com/document/d/1ePC9wlWrxlpAzruPkuIQyc-Zn_rFxRYr3Fj4NeewnGY/edit?usp=sharing

Example repo with updateinfo.xml with the new erratum format: https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-with-modules/

Example of a modular erratum pkglist in updateinfo.xml:

<pkglist>
    <collection short="">
        <name>coll_name1</name>
        <module name="kangaroo" stream="0" version="20180730223407" context="deadbeef" arch="noarch"/>
        <package arch="noarch" name="kangaroo" release="1" src="http://www.fedoraproject.org" version="0.3">
            <filename>kangaroo-0.3-1.noarch.rpm</filename>
             <filename> ... </filename>
        </package>
        <package ... >
             ...
        </package>
    </collection>
    <collection short="">
        <name>coll_name2</name>
        ...
    </collection>
</pkglist>

[0] https://github.com/fedora-infra/bodhi/blob/develop/bodhi/server/metadata.py#L28
[1] https://github.com/pulp/pulp_rpm/blob/master/pulp_rpm/app/tasks/synchronizing.py#L8

Comment 16 Tanya Tereshchenko 2019-04-23 18:40:51 UTC
Thank you for adding support for modular errata to the createrepo_c!
I tested the PR, it worked as expected, it seems to be enough for Pulp needs.
One comment on the PR. Please, consider changing the type for the version to be integer https://github.com/rpm-software-management/createrepo_c/pull/116/files#r277813704
It will help us as well if python bindings parse module info into the correct types without additional conversion on our side.
Not a blocker but it makes sense to be consistent with libmodulemd types, imo.

Comment 21 Whitney Chadwick 2019-06-18 19:27:35 UTC
Per Jun 18th review meeting set exception+ and Internal Target Milestone (ITM) to External Snapshot 2

Comment 25 errata-xmlrpc 2019-11-05 22:20:50 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, 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/RHSA-2019:3583