Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to create a local yum repository with group list for RHEL 6. Packages from DVD are dumped at the following location /var/www/html/rhelisos/

To create the repo, I used the following commands.

1.  createrepo -g /var/www/html/rhelisos/repodata/8afad1febf2d8844a235a9ab1aa5f15c9cec1219b9d01060d4794435cf59dffe-comps-rhel6-Server.xml /var/www/html/rhelisos/Packages
2. yum clean all
3. yum makecache

Updated config file at /etc/yum.repos.d/ to point to the yum repository .

But yum grouplist is still failing with the error

Error: No group data available for configured repositories

yum install commands are working fine

# yum install httpd
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
rhel-source-beta                                                      2804/2804
Setting up Install Process
Resolving Dependencies
 --> Running transaction check
 ---> Package httpd.i686 0:2.2.15-15.el6 will be installed
 --> Processing Dependency: libpcre.so.0 for package: httpd-2.2.15-15.el6.i686
 --> Processing Dependency: libldap-2.4.so.2 for package: httpd- 2.2.15-15.el6.i686
 --> Finished Dependency Resolution

 Dependencies Resolved

  ================================================================================
  Package        Arch       Version                 Repository              Size
  ================================================================================
  Installing:
  httpd          i686       2.2.15-15.el6           rhel-source-beta       817 k
  Installing for dependencies:
  apr            i686       1.3.9-3.el6_1.2         rhel-source-beta       129 k
  apr-util       i686       1.3.9-3.el6_0.1         rhel-source-beta        89 k
  openldap       i686       2.4.23-20.el6           rhel-source-beta       261 k
  pcre           i686       7.8-3.1.el6             rhel-source-beta       195 k

  Transaction Summary
  ================================================================================
  Install       5 Package(s)

  Total download size: 1.5 M
  Installed size: 4.5 M
   Is this ok [y/N]:

What I am missing in the configuration steps for making yum grouplist to work ? Or it is problem with the *Comps*.xml file ?

Please suggest.

share|improve this question

1 Answer 1

I believe you have to make these groups yourself within the repository. See this topic in the YUM wiki, titled: Yum groups and repositories. Specifically this section: "Setting up your own groups in your own repository".

There's essentially 2 steps to accomplish this:

  1. create a file in the groups format used by yum
  2. tell createrepo to include that group file in your repository.

Step #1 - Creating the groups XML file

You can either manually create a groups XML file or use this command to construct one, telling it the name to use, the file to save it as, and which RPMs to include in the group.

For example:

$ yum-groups-manager -n "My Group" --id=mygroup --save=mygroups.xml \
     --mandatory yum glibc rpm

The resulting file will look similar to this one:

<!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd">
<comps>
  <group>
   <id>mygroup</id>
   <default>False</default>
   <uservisible>True</uservisible>
   <display_order>1024</display_order>
   <name>My group</name>
   <description></description>
    <packagelist>
      <packagereq type="mandatory">glibc</packagereq>
      <packagereq type="mandatory">rpm</packagereq>
      <packagereq type="mandatory">yum</packagereq>
    </packagelist>
  </group>
</comps>

Step #2 - Adding the XML file to your repo

After constructing the XML file, you'll need to incorporate it into your YUM repository. Use a command similar to this one to do it:

$ createrepo -g /path/to/mygroups.xml /srv/my/repo
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.