Skip to main content

createrepo_c

C implementation of createrepo

Run createrepo -h for usage syntax.

Devel tips

Building

Package build requires - Pkg name in Fedora/Ubuntu:

From your checkout dir:

mkdir build
cd build/
cmake ..
make

To build the documentation, from the build/ directory:

make doc

Note: For build with debugging symbols you could use (from the build/ directory):

cmake -DCMAKE_BUILD_TYPE:STRING=DEBUG .. && make

Building from an rpm checkout

E.g. when you want to try weak and rich dependencies.

cmake .. && make

Note: The RPM must be built in that directory

Commands I am using for building the RPM:

cd /home/tmlcoch/git/rpm
CPPFLAGS='-I/usr/include/nss3/ -I/usr/include/nspr4/' ./autogen.sh --rpmconfigure --with-vendor=redhat --with-external-db --with-lua --with-selinux --with-cap --with-acl --enable-python
make clean && make

Other build options

-DBUILD_DOC_C=OFF

Build C API documentation (Default: ON)

Disable building of C API documentation, which requires doxygen to be present.

-DENABLE_LEGACY_WEAKDEPS=ON

Enable legacy SUSE/Mageia/Mandriva weakdeps support (Default: ON)

-DENABLE_THREADED_XZ_ENCODER=ON

Threaded XZ encoding (Default: OFF)

Note: This option is disabled by default, because Createrepo_c parallelizes a lot of tasks (including compression) by default; this only adds extra threads on XZ library level which causes thread bloat and for most usecases doesn't bring any performance boost. On regular hardware (e.g. less-or-equal 4 cores) this option may even cause degradation of performance.

-DENABLE_DRPM=ON

Enable DeltaRPM support using drpm library (Default: OFF)

Adds support for creating DeltaRPMs and incorporating them into the repository.

-DWITH_ZCHUNK=ON

Build with zchunk support (Default: ON)

-DWITH_LIBMODULEMD=ON

Build with libmodulemd support (Default: ON)

Adds support for working with repos containing Fedora Modularity metadata.

Build tarball

utils/make_tarball.sh [git revision]

Without git revision specified HEAD is used.

Build Python package

To create a binary "wheel" distribution, use:

python setup.py bdist_wheel

To create a source distribution, use:

python setup.py sdist

Installing source distributions require the installer of the package to have all of the build dependencies installed on their system, since they compile the code during installation. Binary distributions are pre-compiled, but they are likely not portable between substantially different systems, e.g. Fedora and Ubuntu.

Note: if you are building a bdist or installing the sdist on a system with an older version of Pip, you may need to install the scikit-build Python package first.

To install either of these packages, use:

pip install dist/{{ package name }}

To create an "editable" install of createrepo_c, use:

python setup.py develop

Note: To recompile the libraries and binaries, you muse re-run this command.

Build RPM package

Modify createrepo_c.spec and run:

utils/make_rpm.sh

Note: Current .spec for Fedora rawhide

Testing

All unit tests run from librepo checkout dir

Build C tests && run c and python tests

make tests && make test

Note: For a verbose output of testing use: make ARGS="-V" test

Run only C unittests (from your checkout dir):

build/tests/run_tests.sh

Note: The C tests have to be built by make tests)!

Run only Python unittests (from your checkout dir):

PYTHONPATH=`readlink -f ./build/src/python/` python3 -m unittest discover -bs tests/python/

Note: When compiling createrepo_c without libmodulemd support add WITH_LIBMODULEMD=OFF

Bugzilla

Important notes

In original createrepo sha is a nickname for the sha1 checksum. Createrepo_c mimics this behaviour.

Contribution

Here's the most direct way to get your work merged into the project.

  1. Fork the project

  2. Clone down your fork

  3. Implement your feature or bug fix and commit changes

  4. If the change fixes a bug at Red Hat bugzilla, or if it is important to the end user, add the following block to the commit message:

    = changelog =
    msg:           message to be included in the changelog
    type:          one of: bugfix/enhancement/security (this field is required when message is present)
    resolves:      URLs to bugs or issues resolved by this commit (can be specified multiple times)
    related:       URLs to any related bugs or issues (can be specified multiple times)
    
    • For example::

      = changelog =
      msg: Enhance error handling when locating repositories
      type: bugfix
      resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1762697
      
    • For your convenience, you can also use git commit template by running the following command in the top-level directory of this project:

      git config commit.template ./.git-commit-template
      
  5. In a separate commit, add your name and email into the authors file as a reward for your generosity

  6. Push the branch to your fork

  7. Send a pull request for your branch


Differences in behavior between createrepo_c and createrepo

Checksums after update

Use case:

  • Repodata in repo/ are has checksum xxx
  • Params: --update --checksum=yyy repo/

createrepo_c result:

  • All package checksums are recalculated into yyy

original createrepo result:

  • Only new and changed packages has yyy checksums other packages has still xxx checksums

Use case:

  • Some packages in repo/ are symlinks
  • Params: --skip-symlinks repo/

createrepo_c result:

  • Symlinked packages are ignored

original createrepo result:

Base path from update-md-path repo

Use case:

  • A somebody else's repo is somewhere
  • The repo items have set a base path to http://foo.com/
  • We want to create metadata for our repo
  • Some packages in our repo are same as packages in somebody else's repo
  • We want to speed up creation of our repodata with combo --update and --update-md-path=somebody_else's_repo
  • Params: --update --update-md-path=ftp://somebody.else/repo our_repo/

createrepo_c results:

  • All our packages have no base path set (if we don't set --baseurl explicitly)

original createrepo result:

Crippled paths in filelists.xml after update

Use case:

  • A repo with old metadata exists
  • We want to update metadata
  • Params: --update repo/

createrepo_c results:

  • All is fine

original createrepo result:

--update leaves behind some old repodata files

Use case:

  • A repo with repodata created with --simple-md-filenames exists
  • We want to update repodata to have checksums in filenames
  • Params: --update repo/

createrepo_c results:

  • All repodata contains checksum in the name

original createrepo result:

Mergerepo_c

Default merge method

  • Original mergerepo included even packages with the same NVR by default
  • Mergerepo_c can be configured by --method option to specify how repositories should be merged.
  • Additionally its possible to use --all option to replicate original mergerepo behavior.

Modifyrepo_c

Modifyrepo_c is compatible with classical Modifyrepo except some misbehaviour:

  • TODO: Report bugs and add reference here

Batch file

When there is need to do several modification to repository (repomd.xml) a batch file could be used.

Batch file is Modifyrepo_c specific. It is not supported by the classical Modifyrepo - at least not yet.

Example

# Add:
#   [<path/to/file>]
#   <options>

# Metadata that use a bunch of config options
[some/path/comps.xml]
type=group
compress=true
compress-type=gz
unique-md-filenames=true
checksum=sha256
new-name=group.xml

# Metadata that use default settings
[some/path/bar.xml]

# Remove:
#   [<metadata name>]
#   remove=true

[updateinfo]
remove=true

Supported options

Option name Description Supported value(s) Default
path Path to the file. When specified it override the path specified in group name (name between [] parenthesis) Any string group name (string between '[' ']')
type Type of the metadata Any string Based on filename
remove Remove specified file/type from repodata true or false false
compress Compress the new metadata before adding it to repo true or false true
compress-type Compression format to use gz, bz2, xz gz
checksum Checksum type to use md5, sha, sha1, sha224, sha256, sha384, sha512 sha256
unique-md-filenames Include the file's checksum in the filename true or false true
new-name New name for the file. If compress is true, then compression suffix will be appended. If unique-md-filenames is true, then checksum will be prepended. Any string Original source filename

Notes

  • Lines beginning with a '#' and blank lines are considered comments.
  • If remove=true is used, no other config options should be used

Metadata

Release files for createrepo_c 1.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for createrepo_c 1.2.6
File Size Uploaded Provenance Actions
createrepo_c-1.2.6.tar.gz 114.0 MB Without provenance Details for createrepo_c-1.2.6.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for createrepo_c 1.2.6
File Actions
createrepo_c-1.2.6-cp315-cp315-manylinux_2_28_x86_64.whl CPython 3.15 CPython 3.15 Linux glibc 2.28+ x86-64 Details for createrepo_c-1.2.6-cp315-cp315-manylinux_2_28_x86_64.whl
createrepo_c-1.2.6-cp315-cp315-manylinux_2_28_aarch64.whl CPython 3.15 CPython 3.15 Linux glibc 2.28+ ARM64 Details for createrepo_c-1.2.6-cp315-cp315-manylinux_2_28_aarch64.whl
createrepo_c-1.2.6-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details for createrepo_c-1.2.6-cp314-cp314-manylinux_2_28_x86_64.whl
createrepo_c-1.2.6-cp314-cp314-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64 Details for createrepo_c-1.2.6-cp314-cp314-manylinux_2_28_aarch64.whl
createrepo_c-1.2.6-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for createrepo_c-1.2.6-cp313-cp313-manylinux_2_28_x86_64.whl
createrepo_c-1.2.6-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details for createrepo_c-1.2.6-cp313-cp313-manylinux_2_28_aarch64.whl
createrepo_c-1.2.6-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for createrepo_c-1.2.6-cp312-cp312-manylinux_2_28_x86_64.whl
createrepo_c-1.2.6-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details for createrepo_c-1.2.6-cp312-cp312-manylinux_2_28_aarch64.whl
createrepo_c-1.2.6-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details for createrepo_c-1.2.6-cp311-cp311-manylinux_2_28_x86_64.whl
createrepo_c-1.2.6-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details for createrepo_c-1.2.6-cp311-cp311-manylinux_2_28_aarch64.whl

Total release size: 230.3 MB

Release files / createrepo_c-1.2.6.tar.gz

Download URL createrepo_c-1.2.6.tar.gz
Size 114.0 MB
Tags Source
SHA-256 checksum
How to use checksums
81962c59ef7b1d0f278724589f56e7ee3b3b7951458e75089d8b7d686acd0d4a
BLAKE2b-256 checksum
How to use checksums
5e9e82202e067ba4f66abd48ee8bdfa4d1193b4ff9494fe37c243d15a30decf2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / createrepo_c-1.2.6-cp315-cp315-manylinux_2_28_x86_64.whl

Download URL createrepo_c-1.2.6-cp315-cp315-manylinux_2_28_x86_64.whl
Size 11.9 MB
Tags CPython 3.15 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
980c39ca71476501d0a52ab7eb2cb48767b6343de713c7671c7da07d6239c75f
BLAKE2b-256 checksum
How to use checksums
b70ef345d9b7cd5aa1edc2b534715dacbece5c47e0eab046c8ce59cf6237b88b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / createrepo_c-1.2.6-cp315-cp315-manylinux_2_28_aarch64.whl

Download URL createrepo_c-1.2.6-cp315-cp315-manylinux_2_28_aarch64.whl
Size 11.3 MB
Tags CPython 3.15 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
f8213ebf028740143bb756395f5e18e829295c90d77dac56cc9b82c19c4a51d7
BLAKE2b-256 checksum
How to use checksums
9190a86bee8f7d665125672763ab41f0d8d2eb9fe5e1563a4b7112ea86bea3f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / createrepo_c-1.2.6-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL createrepo_c-1.2.6-cp314-cp314-manylinux_2_28_x86_64.whl
Size 11.9 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
10be4a8f43addef87e03fe8f74d12a372c3dc5221e0b1143e625b496ef23bdf2
BLAKE2b-256 checksum
How to use checksums
ab681734fd7221679848033bb2514e443c3b2b50fa81c4cc1028394ec5ec0d42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / createrepo_c-1.2.6-cp314-cp314-manylinux_2_28_aarch64.whl

Download URL createrepo_c-1.2.6-cp314-cp314-manylinux_2_28_aarch64.whl
Size 11.3 MB
Tags CPython 3.14 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
89b1db13f377ff9693ac385ad1272fc75c069730580f1508593ed9cdb041ae2a
BLAKE2b-256 checksum
How to use checksums
b6aca3636624deda5d1ef0e5d3f910753276bc85fe721ee7db6ee8f4522a8b03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / createrepo_c-1.2.6-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL createrepo_c-1.2.6-cp313-cp313-manylinux_2_28_x86_64.whl
Size 11.9 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
aade313fa27fffd261fc31212d44f0c07aceb7b0b385c6cff0d178a7e937ee71
BLAKE2b-256 checksum
How to use checksums
58620f03456aa75a51f8c1236f07c156d110586f81001bb32aa6d128c57edcaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / createrepo_c-1.2.6-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL createrepo_c-1.2.6-cp313-cp313-manylinux_2_28_aarch64.whl
Size 11.3 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
308d153f964c19eda0b62daa3db48e48e461696bb2c1bea712313b9d17ec58cb
BLAKE2b-256 checksum
How to use checksums
b8ea914cfe090f6f246838529e851d0cadbeb6310864ec0773534c6ef0674b28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / createrepo_c-1.2.6-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL createrepo_c-1.2.6-cp312-cp312-manylinux_2_28_x86_64.whl
Size 11.9 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
340f70ebf2c19f20c05c60fa2c8abdf05db5443278e4a4b5dbdfe4543df8adf4
BLAKE2b-256 checksum
How to use checksums
3dfe12ef3341404506d91083598432609e265a9071ba0b49f99c57ea3a19de19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / createrepo_c-1.2.6-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL createrepo_c-1.2.6-cp312-cp312-manylinux_2_28_aarch64.whl
Size 11.3 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
e546fc15021537e10e3561f7a9ef002c2d97ad8d63be30eeb1c0722a490895b6
BLAKE2b-256 checksum
How to use checksums
37a91eff8bab37a0a2aa89ad7514c02caf84d003276415b254480e41dab61916
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / createrepo_c-1.2.6-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL createrepo_c-1.2.6-cp311-cp311-manylinux_2_28_x86_64.whl
Size 11.9 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d5e09f9f78370304e185dedae5e366542d2f89f890a2b9ec1e0ddaf6cd5ae3a8
BLAKE2b-256 checksum
How to use checksums
031ceff53102d9b3dc96657fd8d32c43cfb4834889e9dab0857ad1dc64ab81b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / createrepo_c-1.2.6-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL createrepo_c-1.2.6-cp311-cp311-manylinux_2_28_aarch64.whl
Size 11.3 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
8367b8133f71eef6f40b1fd2b8e439a5b6b072b63fa05cb538b249e35932c70a
BLAKE2b-256 checksum
How to use checksums
6dedb5de43bf169fad10644abe038f38fcff68b43e80b0ad80349662f7c6f6c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for createrepo_c 1.2.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page