createrepo is a program that creates a repomd (xml-based rpm metadata) repository from a set of rpms.
-u --baseurl <url>
Optional base url location for all files. (not used by any clients at this
-o --outputdir <url>
Optional output directory (useful for read only media).
-x --exclude <package>
File globs to exclude, can be specified multiple times.
-i --pkglist <filename>
specify a text file which contains the complete list of files to
include in the repository from the set found in the directory. File format is one
package per line, no wildcards or globs.
-g --groupfile <groupfile>
A precreated xml filename to point to for group information.
See examples section below for further explanation.
-c --cachedir <path>
Specify a directory to use as a cachedir. This allows createrepo to create a
cache of checksums of packages in the repository. In consecutive runs of
createrepo over the same repository of files that do not have a complete
change out of all packages this decreases the processing time dramatically.
If metadata already exists in the outputdir and an rpm is unchanged
(based on file size and mtime) since the metadata was generated, reuse
the existing metadata rather than recalculating it. In the case of a
large repository with only a few new or modified rpms this can
significantly reduce I/O and processing time.
Don't generate repo metadata, if their timestamps are newer than its rpms.
This option decreases the processing time drastically again, if you happen
to run it on an unmodified repo, but it is (currently) mutual exclusive
with the --split option.
Run in split media mode. Rather than pass a single directory, take a set of
directories corresponding to different volumes in a media set.
Output xml files in pretty format.
Show help menu.
Generate sqlite databases for use with yum.
Here is an example of a repository with a groups file. Note that the
groups file should be in the same directory as the rpm packages