From Fedora Project Wiki

(Created page with "{{QA/Test_Case |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= # Install a fresh version of Fedora. # Install the necessary packages: `sudo dnf install createrepo_c createrepo_c-libs`. # Prepare a directory with a few RPM packages: `mkdir /path/to/rpms` and place some RPM files inside. |actions=...")
 
No edit summary
 
Line 10: Line 10:
# Run `createrepo_c .` to generate a metadata repository in the current directory.
# Run `createrepo_c .` to generate a metadata repository in the current directory.
# Check for the presence of the `repodata` directory within `/path/to/rpms`.
# Check for the presence of the `repodata` directory within `/path/to/rpms`.
# Examine the `repodata` directory for XML metadata files such as `primary.xml.gz`, `filelists.xml.gz`, and `other.xml.gz`.
# Examine the `repodata` directory for XML metadata files such as `primary.xml.zst`, `filelists.xml.zst`, and `other.xml.zst`.


|results=
|results=
Line 16: Line 16:
# A `repodata` directory should be created in `/path/to/rpms`.
# A `repodata` directory should be created in `/path/to/rpms`.
# The `repodata` directory should contain XML metadata files.
# The `repodata` directory should contain XML metadata files.
# Metadata files like `primary.xml.gz`, `filelists.xml.gz`, and `other.xml.gz` should be non-empty and contain information about the RPM packages in the directory.
# 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:
|optional=For extended testing:

Latest revision as of 06:00, 21 August 2023

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.