7

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.

3 Answers 3

5

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
0

I think slm's answer is a good way for creating customized grouplist, but Zama just need to come out "Error: No group data available for configured repositories".

I was meeting the error and solved it. You may let the instruction correctly point to baseURL location.

original:

createrepo -g /var/www/html/rhelisos/repodata/8afad1febf2d8844a235a9ab1aa5f15c9cec1219b9d01060d4794435cf59dffe-comps-rhel6-Server.xml /var/www/html/rhelisos/Packages

tobe :

createrepo -g /foo/bar/xxxx-comps-rhel6-Server.xml /var/www/html/rhelisos/
0

I just ran into this issue when using cp -R . /var/ftp/pub/osdirectory and instead used (in mounted iso/DVD):

find . | cpio -pmd /var/ftp/pub/osdirectory

to copy the files over correctly

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .