Edit RPM repository comps.xml for custom package groups

Posted in fedora , Linux , tweaks

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.
scissors-cutting
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:

<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.

$ xmllint comps.xml --valid

Example of a typical typing error:

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.

$ 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.

$ 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.

$ sudo yum groupinstall xyz
Loaded plugins: changelog, downloadonly
google 100% |=========================|  951 B    00:00
rpmfusion 100% |=========================| 3.3 kB    00:00
rootninja 100% |=========================|  1541 B    00:00
Posted by admica   @   13 December 2010

Related Posts

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Name

Email

Website

*

Previous Post
«
Next Post
»
Powered by Wordpress   |   Lunated designed by ZenVerse

Valid XHTML 1.0 Transitional