LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 02-23-2021, 05:22 AM   #1
Shaggy1
Member
 
Registered: Oct 2010
Posts: 111

Rep: Reputation: 3
How do you ensure yum repositories have groups defined ?


----------------------------
System Information
Code:
$ cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core)
$uname -a
Code:
Linux lb-cam-bca-12 3.10.0-1062.1.1.el7.x86_64 #1 SMP Fri Sep 13 22:55:44 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
----------------------------

I have a setup where I install centos 7 via pxeboot using a kickstart file that specifies packages to install in the packages section in the standard way, as below:
Code:
%packages --multilib
@ Additional Development
@ Anaconda Tools
....
a2ps.x86_64
abrt-gui-libs.i686
....
%end
However if, once the system has installed, I want to install additional groups I cannot because yum does not seem to know about groups:
Code:
$ yum grouplist
There is no installed groups file.
The searches I have made suggest that this is because the yum repositories do not have groups defined.

My searches suggest that groups are specified in a group file, that the group file is specified as an xml file (for my centos 7 system I can see one in the ios as ./repodata/aced7d22b338fdf7c0a71ffcf32614e058f4422c42476d1f4b9e9364d567702f-c7-x86_64-comps.xml) and that the 'createrepo' command can be used to generate something (a groups repo?) that species the groups - like this:
Code:
$ createrepo -g <xxx>comps.xml .
When I do this using the xml file I got from the iso, it generates a 'repodata' directory with some files in under the directory I run the command from. However:
Code:
$ yum grouplist
still reports:
Code:
There is no installed groups file.
I guess the generated repodata directory needs to be put somewhere specific - could someone tell me where it needs to be generated ?

More generally could someone explain how the groups work ?
By doing the above what exactly am I generating ?
Is this groups information relating to a specific repository ? If so do I need to create a separate one for each repo I install ? and which repo does the iso xml file group info relate to ?

Does anyone know how I can update my kickstart file to include group information in the install ?
 
Old 02-23-2021, 06:45 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,678

Rep: Reputation: Disabled
Quote:
Originally Posted by Shaggy1 View Post
Code:
CentOS Linux release 7.6.1810 (Core)
First of all, you have to update your system. The current CentOS 7 is 7.9.2009. From the CentOS FAQ:
Quote:
29. How does CentOS versioning work?
[...] The CentOS Project provides updates or other changes ONLY for the latest version of each major branch. Thus, if the latest minor version of CentOS-6 is version 6.6 then the CentOS Project only provides updated software for this minor version in the 6 branch. If you are using an older minor version than the latest in a given branch, then you are missing security and bugfix updates.
Quote:
More generally could someone explain how the groups work?
There are three modes of operation: see description of group_command in yum.conf(5). The old default was compat, the new default is objects. After upgrade to CentOS 7.9, you can convert your installation to the group_command=objects mode with
Code:
yum group mark convert
See Yum Groups as Objects in Fedora Wiki.
 
Old 02-23-2021, 07:42 AM   #3
Shaggy1
Member
 
Registered: Oct 2010
Posts: 111

Original Poster
Rep: Reputation: 3
Thank you for the reply

> First of all, you have to update your system. The current CentOS 7 is 7.9.2009. From the CentOS FAQ:
As far as installing goes until we get officially upgraded I'm stuck with this one.
There is no way if getting groups to work on a 7.6 system ?

For the machine I am on I can play around with things - is a yum update sufficient ?
If I do:
Code:
$ yum update
and then try doing 'yum group mark convert' I get the following:
Code:
$yum group mark convert
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Converted old style groups to objects.
 
Old 02-23-2021, 08:01 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,678

Rep: Reputation: Disabled
yum update probably won't do anything. CentOS 7.6 doesn't get any updates anymore.

After converting to groups as objects, yum grouplist shouldn't complain about not installed groups file anymore. That message was not about the XML file in the repodata, it was about group files installed on your system. If there's no info about groups in the repo, you'll still get the empty list of groups though.
 
Old 02-23-2021, 09:58 AM   #5
Shaggy1
Member
 
Registered: Oct 2010
Posts: 111

Original Poster
Rep: Reputation: 3
> yum update probably won't do anything. CentOS 7.6 doesn't get any updates anymore.
So the only way to get an update to 7.9 is to do a fresh install ?

> it was about group files installed on your system
Do you know where the system group files come from ?, where they should exist ?, if they do not exist how would I install them ?
Do you know how they relate to the xml repo files (if at all) ?

> If there's no info about groups in the repo, you'll still get the empty list of groups though.
Do you know where the group info for a repo comes from ? the xml file ?
If so where should the xml file reside ?

Bit confused about this at the moment.
Usually the group installs work out of the box, so I guess I'm doing something in my kickstart (which I inherit) to make it not work.
I'll trawl through the scripts, but do you have any idea what might prevent the system group files from being installed ?
 
Old 02-23-2021, 12:23 PM   #6
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,678

Rep: Reputation: Disabled
Quote:
Originally Posted by Shaggy1 View Post
So the only way to get an update to 7.9 is to do a fresh install ?
No. If your /etc/yum.repos.d/CentOS-*.repo are correct then yum update will bring your system up-to-date with CentOS 7.9. But this should have happened long ago. CentOS 7.9 was published in November 2020. I assume you update your system regularly, don't you? If it's still at 7.6 then that means you either never attempted to update it (hard to believe) or it cannot be updated (e.g. because of incorrectly set repositories). From the same FAQ I linked to above:
Quote:
When setting up yum repositories on CentOS Linux you should ONLY use the single digit for the active branch, which corresponds to the CentOS Linux major branch.
Quote:
Originally Posted by Shaggy1 View Post
Do you know where the system group files come from ?, where they should exist ?, if they do not exist how would I install them ?
Do you know how they relate to the xml repo files (if at all) ?
You confuse things. When yum was set to group_command=compat, there were no groups files installed on your system. Now, after you converted it to group_command=objects, yum has created two files under /var/lib/yum/groups, environment and installed. That's all. And that's what the yum warning message was all about. It has nothing to do with what packages are in which groups. This is completely determined by the comps XML file in the repodata directory of the repo.
 
Old 02-24-2021, 10:11 AM   #7
Shaggy1
Member
 
Registered: Oct 2010
Posts: 111

Original Poster
Rep: Reputation: 3
Ahhhh.

It looks like the default install moved to using proprietary repositories when going to centos 7.

If I add the standard ones to /etc/yum.repos.d all is fine - I was thinking I needed to have the group repodata locally.

Very sorry for the spam.

Thank you for you help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
User defined linux commands in a user defined shell Sushma05 Linux - Newbie 3 09-13-2013 07:21 AM
[SOLVED] The certificate is expired. Please ensure you have the correct certificate and your s manalisharmabe Linux - General 6 09-09-2013 12:51 PM
yum install flash ... yum: command not found ... which yum ... /usr/bin/yum tg0000 Fedora 8 04-13-2011 11:25 AM
where defined(__i386) is being defined?? syseeker Programming 1 06-27-2006 06:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 12:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration