From Fedora Project Wiki

Description

This test case validates the createrepo_c tool's ability to generate a metadata repository from a directory of RPM packages. It also ensures the createrepo_c-libs package supports this functionality.

Setup

  1. Install a fresh version of Fedora.
  2. Install the necessary packages: sudo dnf install createrepo_c createrepo_c-libs.
  3. Prepare a directory with a few RPM packages: mkdir /path/to/rpms and place some RPM files inside.

How to test

  1. Navigate to the directory with RPMs: cd /path/to/rpms.
  2. Run createrepo_c . to generate a metadata repository in the current directory.
  3. Check for the presence of the repodata directory within /path/to/rpms.
  4. Examine the repodata directory for XML metadata files such as primary.xml.zst, filelists.xml.zst, and other.xml.zst.

Expected Results

  1. Running createrepo_c . should complete without errors.
  2. A repodata directory should be created in /path/to/rpms.
  3. The repodata directory should contain XML metadata files.
  4. Metadata files like primary.xml.gz, filelists.xml.zst, and other.xml.zst should be non-empty and contain information about the RPM packages in the directory.

Optional

For extended testing:

  1. Use yum or dnf to create a local repo file pointing to /path/to/rpms and try installing a package from this local repository to ensure the generated metadata is accurate and functional.
  2. Modify one of the RPMs or add a new RPM, then update the repository using createrepo_c --update . and verify that the changes are reflected in the metadata.
  3. Examine the library calls and functions by utilizing debug tools or ldd to ensure the proper functioning and linkage of createrepo_c-libs.