CREATEREPO_C(8) CREATEREPO_C(8)

createrepo_c - Create rpm-md format (xml-rpm-metadata) repository

createrepo_c [options] <directory>

Uses rpm packages from <directory> to create repodata.

If compiled with libmodulemd support modular metadata inside <directory> identified by the patterns below and all their compressed variants are automatically collected, merged and added to the repodata.

The patterns are:

  • *.modulemd.yaml (recommended file name: N:S:V:C:A.modulemd.yaml)
  • *.modulemd-defaults.yaml (recommended file name: N.modulemd-defaults.yaml)
  • modules.yaml (recommended way of importing multiple documents at once)

-V --version

Show program's version number and exit.

-q --quiet

Run quietly.

-v --verbose

Run verbosely.

-x --excludes PACKAGE_NAME_GLOB

Path patterns to exclude, can be specified multiple times. The patterns are matched against relative paths to RPMs. Note that the feature uses g_pattern_match() function, not glob(), for semantic differences see https://developer.gnome.org/glib/stable/glib-Glob-style-pattern-matching.html

--basedir BASEDIR

Basedir for path to directories.

-u --baseurl URL

Optional base URL location for all files.

-g --groupfile GROUPFILE

Path to groupfile to include in metadata.

-s --checksum CHECKSUM_TYPE

Choose the checksum type used in repomd.xml and for packages in the metadata. The default is now sha256.

-p --pretty

Make sure all xml generated is formatted (default)

-p --no-pretty

Minify the generated xml content. On average this reduces compressed size by 2%.

-d --database

DEPRECATED: Generate sqlite databases for use with yum.

--no-database

Do not generate sqlite databases in the repository.

--update

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.

--update-md-path

Existing metadata from this path are loaded and reused in addition to those present in the outputdir (works only with --update). Can be specified multiple times.

--skip-stat

Skip the stat() call on a --update, assumes if the filename is the same then the file is still the same (only use this if you're fairly trusting or gullible).

--split

Run in split media mode. Rather than pass a single directory, take a set of directories corresponding to different volumes in a media set. Meta data is created in the first given directory

-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.

-n --includepkg PACKAGE

Specify pkgs to include on the command line. Takes urls as well as local paths.

--recycle-pkglist

Useful only with --update. Read the list of packages from old metadata, and reuse it instead of (perhaps expensive) directory traversal. This doesn't collide with explicitly selected packages by --pkglist or --includepkg, such packages are appended to the recycled list. This option is useful for I/O optimal repo modifications (package removal by --exclude, and additions with --pkglist).

-o --outputdir URL

Optional output directory.

-S --skip-symlinks

Ignore symlinks of packages.

--changelog-limit NUM

Only import the last N changelog entries, from each rpm, into the metadata.

--unique-md-filenames

Include the file's checksum in the metadata filename, helps HTTP caching (default).

--simple-md-filenames

Do not include the file's checksum in the metadata filename.

--retain-old-md NUM

Specify NUM to 0 to remove all repodata present in old repomd.xml or any other positive number to keep all old repodata. Use --compatibility flag to get the behavior of original createrepo: Keep around the latest (by timestamp) NUM copies of the old repodata (works only for primary, filelists, other and their DB variants).

--distro DISTRO

Distro tag and optional cpeid: --distro'cpeid,textname'.

--content CONTENT_TAGS

Tags for the content in the repository.

--repo REPO_TAGS

Tags to describe the repository itself.

--revision REVISION

User-specified revision for this repository.

--set-timestamp-to-revision

Set timestamp fields in repomd.xml and last modification times of created repodata to a value given with --revision. This requires --revision to be a timestamp formatted in 'date +%s' format.

--read-pkgs-list READ_PKGS_LIST

Output the paths to the pkgs actually read useful with --update.

--workers

Number of workers to spawn to read rpms.

--xz

Use xz for repodata compression.

--compress-type COMPRESSION_TYPE

Which compression type to use. Supported compressions are: bz2, gz, zck, zstd, xz.

--general-compress-type COMPRESSION_TYPE

Which compression type to use (even for primary, filelists and other xml).

--zck

Generate zchunk files as well as the standard repodata.

--zck-dict-dir ZCK_DICT_DIR

Directory containing compression dictionaries for use by zchunk

--keep-all-metadata

Keep all additional metadata (not primary, filelists and other xml or sqlite files, nor their compressed variants) from source repository during update (default).

--discard-additional-metadata

Discard all additional metadata (not primary, filelists and other xml or sqlite files, nor their compressed variants) from source repository during update.

--compatibility

Enforce maximal compatibility with classical createrepo (Changes --retain-old-md behavior, defaults to Gzip for compression).

--retain-old-md-by-age AGE

During --update, remove all files in repodata/ which are older then the specified period of time. (e.g. '2h', '30d', ...). Available units (m - minutes, h - hours, d - days)

-c --cachedir CACHEDIR.

Set path to cache dir

--deltas

Tells createrepo to generate deltarpms and the delta metadata.

--oldpackagedirs PATH

Paths to look for older pkgs to delta against. Can be specified multiple times.

--num-deltas INT

The number of older versions to make deltas against. Defaults to 1.

--max-delta-rpm-size MAX_DELTA_RPM_SIZE

Max size of an rpm that to run deltarpm against (in bytes).

--local-sqlite

Gen sqlite DBs locally (into a directory for temporary files). Sometimes, sqlite has a trouble to gen DBs on a NFS mount, use this option in such cases. This option could lead to a higher memory consumption if TMPDIR is set to /tmp or not set at all, because then the /tmp is used and /tmp dir is often a ramdisk.

--cut-dirs NUM

Ignore NUM of directory components in location_href during repodata generation

--location-prefix PREFIX

Append this prefix before location_href in output repodata

--repomd-checksum CHECKSUM_TYPE

Checksum type to be used in repomd.xml

--error-exit-val

Exit with retval 2 if there were any errors during processing (option deprecated, on by default)

--ignore-lock

Expert (risky) option: Ignore an existing .repodata/. (Remove the existing .repodata/ and create an empty new one to serve as a lock for other createrepo instances. For the repodata generation, a different temporary dir with the name in format .repodata.time.microseconds.pid/ will be used). NOTE: Use this option on your own risk! If two createrepos run simultaneously, then the state of the generated metadata is not guaranteed - it can be inconsistent and wrong.

2021-09-23