Edit RPM repository comps.xml for custom package groups
If you maintain your own RPM repository, you may find it useful to modify comps.xml to include rpms for your own software that you’ve built, or packages you’re rebuiding from newer distributions or porting from others.

Existing groups can be modified or you can create new groups entirely. You can also change whether a package is brought in by default, optional, mandatory, or conditional (only included if their requires package is installed)

The syntax for adding a package to a group is pretty simple:
1 <packagereq type="optional">super-awesome</packagereq>
Validate your changes using xmllint. If you’ve forgotten to include a closing tag or messed it up some other way, it will let you know what and where the problem is.
1 $ xmllint comps.xml --valid
Example of a typical typing error:
|
1 2 3 |
comps.xml:8: parser error : expected '>' </data> ^ |
Once you’ve rebuilt your repository with the new and improved comps.xml, you can install using yum or kickstart for your own distributions.
1 $ createrepo -v -g repodata/comps.xml
If you find your new group isn’t found or a package you added to an existing group doesn’t show up, you may need to refresh your yum data.
1 $ sudo yum clean all
This happens when your client has updated within the cache time frame. You can change the expire time in /etc/yum.conf or just clean out the metadata or all.
12345 $ sudo yum groupinstall xyzLoaded plugins: changelog, downloadonlygoogle 100% |=========================| 951 B 00:00rpmfusion 100% |=========================| 3.3 kB 00:00rootninja 100% |=========================| 1541 B 00:00