This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 172819 - Createrepo syntax
Createrepo syntax
Status: CLOSED CURRENTRELEASE
Product: Fedora Documentation
Classification: Fedora
Component: docs-requests (Show other bugs)
devel
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul W. Frields
Karsten Wade
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-09 20:29 EST by Stuart Ellis
Modified: 2009-07-07 00:09 EDT (History)
2 users (show)

See Also:
Fixed In Version: 0.37
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-11-17 07:45:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Stuart Ellis 2005-11-09 20:29:18 EST
Createrepo doesn't need to be run from the target directory (as yum-arch does).

If you use the -g option createrepo creates the metadata files for yum groups as
well as individual packages. This flag is slightly tricksy in that you must
specify the path from the RPMS directory to the comps.xml file used to generate
the groups metadata.

E.g.:

su -c 'createrepo -g ../base/comps.xml
/var/www/mirror/fedora/linux/core/4/i386/os/Fedora/RPMS/'
Comment 1 Paul W. Frields 2005-11-11 11:58:29 EST
Handled this as well in 0.36 and pushed to web.
Comment 2 Stuart Ellis 2005-11-14 19:43:51 EST
This is the relevent bit (Section 3.4.2):

"Just as with yum-arch, run createrepo against the directory under which you
want the repodata directory to appear."

Also, createrepo line in the tutorial may be incorrect. CVS version of tutorial has:

"createrepo -g Fedora/base/comps.xml /var/www/mirror/fedora/linux/core/4/i386/os"
Comment 3 Paul W. Frields 2005-11-15 09:25:22 EST
I don't understand the problem... createrepo is, in fact, run *against* the
directory where the repodata/ folder should appear, i.e. the directory is the
argument for the command.  I don't think I'm giving an incorrect impression that
it is necessarily run *in* that directory, especially given the command line I
provided in the example.  The createrepo command shown is correct, although I
note that I missed putting the su -c '<command>' stuff in -- I've fixed that in
CVS now.  What else am I missing?  Can you be more specific about what you think
is wrong?
Comment 4 Stuart Ellis 2005-11-16 18:19:16 EST
Sorry, I am being unclear :(

I think that the yum-arch command should be:

"cd /var/www/mirror/fedora/linux/core/4/i386/os
su -c 'yum-arch -l -s /var/www/mirror/fedora/linux/core/4/i386/os'

Enter the password for the root account when prompted."

(yum-arch requires the user to cd into the directory, I don't think that it
supports groups at all).

and the createrepo line should read: 

"su -c 'createrepo -g ../base/comps.xml
/var/www/mirror/fedora/linux/core/4/i386/os/Fedora/RPMS/'

Enter the password for the root account when prompted."

The su -c bit is all one line, with ../ because of the relative path requirement.

(you can run createrepo from any working directory, but you have to run it
against the target in conjunction with the correct comps.xml as well, or you
lose the groups functionality, which significantly reduces the utility of the
mirror).
Comment 5 Paul W. Frields 2005-11-17 07:45:52 EST
OK, thanks for the clarification.  I fixed the yum-arch command, which actually
will run fine as:

cd <directory>
su -c 'yum-arch -ls .'

Also, I see a minor problem with your createrepo command, which is that the
repodata/ folder ends up under .../Fedora/RPMS/, which is not where most mirrors
write it.  Instead, they put it in .../i386/os/, so I am using that location and
revising the groupfile relative path appropriately.  This is in CVS and will be
republished shortly, so I'll go ahead and close this bug.  Thanks!
Comment 6 eric@christensenplace.us 2009-07-07 00:09:23 EDT
Ticket moved to allow products to be removed from BZ.

Note You need to log in before you can comment on or make changes to this bug.