Bug 172819

Summary: Createrepo syntax
Product: [Fedora] Fedora Documentation Reporter: Stuart Ellis <stuart>
Component: docs-requestsAssignee: Paul W. Frields <stickster>
Status: CLOSED CURRENTRELEASE QA Contact: Karsten Wade <kwade>
Severity: medium Docs Contact:
Priority: medium    
Version: develCC: kwade, stickster
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.37 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-17 12:45:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stuart Ellis 2005-11-10 01:29:18 UTC
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 16:58:29 UTC
Handled this as well in 0.36 and pushed to web.

Comment 2 Stuart Ellis 2005-11-15 00:43:51 UTC
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 14:25:22 UTC
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 23:19:16 UTC
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 12:45:52 UTC
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 2009-07-07 04:09:23 UTC
Ticket moved to allow products to be removed from BZ.