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. | # 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. | # 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
- 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.
How to test
- Navigate to the directory with RPMs:
cd /path/to/rpms
. - Run
createrepo_c .
to generate a metadata repository in the current directory. - Check for the presence of the
repodata
directory within/path/to/rpms
. - Examine the
repodata
directory for XML metadata files such asprimary.xml.zst
,filelists.xml.zst
, andother.xml.zst
.
Expected Results
- Running
createrepo_c .
should complete without errors. - A
repodata
directory should be created in/path/to/rpms
. - The
repodata
directory should contain XML metadata files. - Metadata files like
primary.xml.gz
,filelists.xml.zst
, andother.xml.zst
should be non-empty and contain information about the RPM packages in the directory.
Optional
For extended testing:
- Use
yum
ordnf
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. - 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. - Examine the library calls and functions by utilizing debug tools or ldd to ensure the proper functioning and linkage of
createrepo_c-libs
.