Skip to main content

C implementation of createrepo

Project description

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

Links

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

Skip symlinks param

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

createrepo_c-1.2.4.post1.tar.gz (91.2 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

createrepo_c-1.2.4.post1-cp314-cp314-manylinux_2_28_x86_64.whl (11.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

createrepo_c-1.2.4.post1-cp314-cp314-manylinux_2_28_aarch64.whl (11.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

createrepo_c-1.2.4.post1-cp313-cp313-manylinux_2_28_x86_64.whl (11.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

createrepo_c-1.2.4.post1-cp313-cp313-manylinux_2_28_aarch64.whl (11.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

createrepo_c-1.2.4.post1-cp312-cp312-manylinux_2_28_x86_64.whl (11.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

createrepo_c-1.2.4.post1-cp312-cp312-manylinux_2_28_aarch64.whl (11.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

createrepo_c-1.2.4.post1-cp311-cp311-manylinux_2_28_x86_64.whl (11.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

createrepo_c-1.2.4.post1-cp311-cp311-manylinux_2_28_aarch64.whl (11.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

File details

Details for the file createrepo_c-1.2.4.post1.tar.gz.

File metadata

  • Download URL: createrepo_c-1.2.4.post1.tar.gz
  • Upload date:
  • Size: 91.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for createrepo_c-1.2.4.post1.tar.gz
Algorithm Hash digest
SHA256 81c567271575dc387d220e367d3a7116536ceeaedab0edc2221b0c766ab3e617
MD5 f548bd92fcfcda6553203c130dda110a
BLAKE2b-256 a7d2d67056516d8f75f66b100ba40e98e68bc261291f42b1a3cc71e534128640

See more details on using hashes here.

File details

Details for the file createrepo_c-1.2.4.post1-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: createrepo_c-1.2.4.post1-cp314-cp314-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 11.6 MB
  • Tags: CPython 3.14, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for createrepo_c-1.2.4.post1-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1fd6ddee226539f925c62315688a84a66f05f2862f9b9e650976b70a78606215
MD5 fb09eb471b524089f8c8a05b1266f6da
BLAKE2b-256 fd2800ff600043b0758f6c6931329606e436000c66defc382d37ee4e36f57db7

See more details on using hashes here.

File details

Details for the file createrepo_c-1.2.4.post1-cp314-cp314-manylinux_2_28_aarch64.whl.

File metadata

  • Download URL: createrepo_c-1.2.4.post1-cp314-cp314-manylinux_2_28_aarch64.whl
  • Upload date:
  • Size: 11.2 MB
  • Tags: CPython 3.14, manylinux: glibc 2.28+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for createrepo_c-1.2.4.post1-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e8757ccbf7fd060692c2326a7b49a99b4771246e674c8887763c8361b61f27c8
MD5 f77ee31abe6901de6d1e3f17d496847a
BLAKE2b-256 8e3c617930718fe0f95641c4484cc480df9ebe122e34c02fcfe45e98a8be47ea

See more details on using hashes here.

File details

Details for the file createrepo_c-1.2.4.post1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: createrepo_c-1.2.4.post1-cp313-cp313-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 11.6 MB
  • Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for createrepo_c-1.2.4.post1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 365dfb95a9e4c5d762bb677a7ac228c3eec591f5cc44f51346ac7ff37eee3dc9
MD5 e3a19d515b23a3b7c993dc22b8250a4d
BLAKE2b-256 0e5335db80c36e06648d4f49d6437a6bb9b331c34dafba601064eb5f9e6f9159

See more details on using hashes here.

File details

Details for the file createrepo_c-1.2.4.post1-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

  • Download URL: createrepo_c-1.2.4.post1-cp313-cp313-manylinux_2_28_aarch64.whl
  • Upload date:
  • Size: 11.2 MB
  • Tags: CPython 3.13, manylinux: glibc 2.28+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for createrepo_c-1.2.4.post1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 cd4f5f15ec36425e84e23b24c53e80c4300e276659c0ef15b58dba3aa875059d
MD5 39b0845e1c0925edcabe5184ec2f8055
BLAKE2b-256 3c133b485e368ab55a1e89351437207890047c213142c4123ab99340e5fbb100

See more details on using hashes here.

File details

Details for the file createrepo_c-1.2.4.post1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: createrepo_c-1.2.4.post1-cp312-cp312-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 11.6 MB
  • Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for createrepo_c-1.2.4.post1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 96d29e719de6c09e7ce005bf84731cec4dbcf94c15d57bfbecf1a82233a9ae3a
MD5 197e760b274db57e2878ba3cd453c83b
BLAKE2b-256 8e9eb0a2d1f274fc86053c64bad6f453813ba1b0279e83e27d6a924a61615ae1

See more details on using hashes here.

File details

Details for the file createrepo_c-1.2.4.post1-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

  • Download URL: createrepo_c-1.2.4.post1-cp312-cp312-manylinux_2_28_aarch64.whl
  • Upload date:
  • Size: 11.2 MB
  • Tags: CPython 3.12, manylinux: glibc 2.28+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for createrepo_c-1.2.4.post1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9b0df0b6bf3f97406c70d22f5c2d5a9ec472f46946890edfbd51a3fa0511869c
MD5 750de047fad5629bb3aa57c02eacaddd
BLAKE2b-256 29f6a47df66594f6d48424625276fe050b2daef92781d6b53911c3f1883a2096

See more details on using hashes here.

File details

Details for the file createrepo_c-1.2.4.post1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: createrepo_c-1.2.4.post1-cp311-cp311-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 11.6 MB
  • Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for createrepo_c-1.2.4.post1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 61ac864faa18e95645f6b0a09bac39cc0e6dd1eab41821d59223ab7c0a016889
MD5 964fa37a5ee280e19fa9d3a9c4c9da5a
BLAKE2b-256 e83c891f0c6a120d8e980793f5303721dfd41d416f48900c79c5c6ff69e8a388

See more details on using hashes here.

File details

Details for the file createrepo_c-1.2.4.post1-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

  • Download URL: createrepo_c-1.2.4.post1-cp311-cp311-manylinux_2_28_aarch64.whl
  • Upload date:
  • Size: 11.2 MB
  • Tags: CPython 3.11, manylinux: glibc 2.28+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for createrepo_c-1.2.4.post1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8c2c9f17e3c202124193678e963d72f789e3741f5ee7fa772794f6a88b02c2fd
MD5 91f2eea41c4b796e4a94da82a00836a7
BLAKE2b-256 dfd839141c54e414b55c2a8b374a970aec43047ec85f2361cd62851b5ec57ab7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page