How do I create a local repository that supports Fedora's package groups?

I am trying to create a local repository that has package ‘groups’ so that I can run a ‘Minimal Install’ of Fedora over nfs without the internet. I thought all I needed to do was to use Fedora’s comps.xml with createrepo (i.e. ‘createrepo -g comps.xml /path/to/my/repo’). The repo is created alright, but when I attempt to list the groups, this is what I get:

sudo dnf group list --disablerepo=* --enablerepo=myrepo

the output
Last metadata expiration check: 0:38:27 ago on Sat 28 Mar 2020 09:04:29 AM WAT.
Available Environment Groups:
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
Installed Environment Groups:
   None
   None
Installed Groups:
   None
Available Groups:
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None
   None

I am obviously missing some design principles for managing/creating groups. Any ideas?
LibreOffice’ and a few other groups are installed on this box … why are they not listing?

@twohot Few remarks here: Fedora’s comp.xml does not list group declarations, but instead lists links to the actual group declarations:

<data type="group">
<checksum type="sha256">
98a67a587d740ecfac30e7dcc0ac6b77698e4e2a2704884d0e992c7f9e0384ac
</checksum>
<location href="repodata/98a67a587d740ecfac30e7dcc0ac6b77698e4e2a2704884d0e992c7f9e0384ac-comps-Everything.x86_64.xml"/>
<timestamp>1571870983</timestamp>
<size>1690848</size>
</data>

So if you really just want to copy Fedora’s group definitions, you need to make sure to copy the right files, not just the comp.

Hi @liquidat

Which xml file did that extract come from; … and how come your post has a nicely formatted xml? How did you do that? Nevertheless, the entries in your extract are not in Fedora’s comps.xml. More so, the comps.xml file in my possession has group declarations as per the specifications on this page.

Nevertheless, the entries in your extract are not in Fedora’s comps.xml.

I am sorry, but I have to disagree: it is in Fedora’s comp.xml file. I downloaded that xml file from the repodata directory of Fedora’s current package repository. The comps.xml does not contain any group declaration there

More so, the comps.xml file in my possession has group declarations as per the specifications on this page.

So where did you get that comps.xml file? Maybe that leads us to the problem?

and how come your post has a nicely formatted xml? How did you do that?

I used three backticks above and below the code, that seems to automatically trigger a syntax highlighter.

1 Like

comps-f33.xml.in
The link says it all. I specifically used the comps for rawhide (my local repo was built from cached rawhide packages)

1 Like

Hm, interesting. Is the comps file in the same directory as the rpm packages are?

Not really. They are in sub-directories. I figured since createrepo still walks through subs it laces it all together. Is a flattened repository the requirement?

Hm, doesn’t the man page of createrepo say:

Note that the groups file should be in the same directory as the rpm packages (i.e. /path/to/rpms/comps.xml).

Not sure how “strict” this “should” is.

Alternatively, you could try to download everything with dnf and check how that comps.xml looks like and where it is. If that works, you can start to compare to figure out where the error is.

dnf-reposync --downloadcomps

Back to this,

I rebuilt the repository today. This time, I placed the comps.xml file inside the same directory with the packages.

The behaviour is the same. The groups don’t show up. All None

That is weird. Any usable input when you run dnf with debug/verbose flag? Maybe a rights issue with the comps file or something?