I am having trouble setting up a custom package group for my custom yum repository in RHEL7.6.
First, here are the steps I am taking to create the custom yum repository.
Create a directory that will contain all the RPMs and copy over the relevant ones:
$ mkdir MyRepo $ cp /path/to/some/*.rpm MyRepo/
Generate metadata for the repository:
$ cd MyRepo $ createrepo .
Now that the custom repository is made, I move onto creating the package group as follows.
- Create a
that contains metadata of the following form:
$ touch repodata/comps.xml
<comps> <!-- <meta> --> <!-- Meta information will go here eventually... --> <!-- </meta> --> <group> <id>myrepo</id> <name>MyRepo</name> <default>true</default> <description>My custom repository</description> <uservisible>true</uservisible> <packagelist> <packagereq type="mandatory">octave</packagereq> <packagereq type="mandatory">octave-devel</packagereq> etc... </packagelist> </group> </comps>
- I then update the metadata previously created to account for the group data:
createrepo -g repodata/comps.xml .
- Finally I create
/etc/yum.repos.d/directory and put the following in it:
[myrepo] name=MyRepo baseurl=file:///path/to/MyRepo enabled=1
Once all that is complete I
yum clean all which works without complaining. But then when I go to test things via
yum --noplugins groupinfo MyRepo things go badly. I get the following error:
There is no installed groups file. Maybe run: yum groups mark convert (see man yum) Failed to add groups file for repository: MyRepo - comps file is empty/damaged Warning: group/environment MyRepo does not exist.
My comps file is not empty and its hash matches what is found in
repodata/repomd.xml. I am pretty lost as to how to go about debugging this. What am I doing wrong? Would a mistyped package name cause this big of an error?
Thank you in advance for your help.