[CentOS-devel] how do we create CentOS' comps.xml

Josh Boyer

jwboyer at redhat.com
Thu Jan 21 21:12:23 UTC 2021


On Thu, Jan 21, 2021 at 12:40 PM Ken Dreyer <kdreyer at redhat.com> wrote:
>
> On Thu, Jan 21, 2021 at 1:46 AM aleksander.baranowski via CentOS-devel
> <centos-devel at centos.org> wrote:
> >
> > When you have access to RHEL repo you can use repoquery to download
> > comps (and other metadata in EL8 version). Then you have to debrand them.
>
> I checked the comps XML files from BaseOS and AppStream today, and
> those XML files are different than this file in Git.
>
> For example, the BaseOS Yum repo's comps.xml has one "file-sever"
> group, and AppStream's comps.xml has another "file-system" group, and
> they are combined in the comps file that CentOS uses for Pungi.

I can explain this.

Internally, we have a single comps file that looks almost identical to
the CentOS one referenced except for the branding changes already
mentioned.  It delineates packages between repos using
"variant="BaseOS" or variant="AppStream", etc.  For groups that have
packages split across repos, you'll see both variant statements within
the group definition.  When pungi runs, it will take the single comps
file and deconstruct it based on variant statements to produce
per-repository comps definitions.  That way the comps groups don't
include packages that are not actually in that repository.

On a system attached to these repositories, yum will actually pull the
comps data from both groups and recombine them to the full group
definition.  There's an example below that illustrates this.

josh


[jwboyer at vader ~]$ podman run -it --rm ubi8
Trying to pull registry.access.redhat.com/ubi8...
Getting image source signatures
Copying blob cca21acb641a [--------------------------------------] 0.0b / 0.0b
Copying blob d9e72d058dc5 [--------------------------------------] 0.0b / 0.0b
Copying config 3269c37eae done
Writing manifest to image destination
Storing signatures
[root at 2db2390ba9d6 /]# yum --disablerepo=*
--enablerepo=rhel-8-for-x86_64-baseos-rpms groupinfo file-server
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.
Red Hat Enterprise Linux 8 for x86_64 - BaseOS   17 MB/s |  27 MB     00:01
Last metadata expiration check: 0:00:03 ago on Thu Jan 21 21:07:20 2021.

Group: File and Storage Server
 Description: CIFS, SMB, NFS, iSCSI, iSER, and iSNS network storage server.
 Mandatory Packages:
   cifs-utils
   gssproxy
   nfs-utils
   nfs4-acl-tools
   samba
 Optional Packages:
   isns-utils
[root at 2db2390ba9d6 /]# yum --disablerepo=*
--enablerepo=rhel-8-for-x86_64-baseos-rpms
--enablerepo=rhel-8-for-x86_64-appstream-rpms groupinfo file-server
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.
Red Hat Enterprise Linux 8 for x86_64 - AppStre  14 MB/s |  25 MB     00:01
Last metadata expiration check: 0:00:04 ago on Thu Jan 21 21:07:51 2021.

Group: File and Storage Server
 Description: CIFS, SMB, NFS, iSCSI, iSER, and iSNS network storage server.
 Mandatory Packages:
   cifs-utils
   gssproxy
   nfs-utils
   nfs4-acl-tools
   samba
   targetcli  <---this showed up from AppStream now
 Optional Packages:
   isns-utils
[root at 2db2390ba9d6 /]#


More information about the CentOS-devel mailing list