debian-forge/test/data/testrepos
Achilleas Koutsou bc08eed1ef test: add repository metadata for osbuild-depsolve-dnf
Add two test rpm metadata directories that can be served as RPM repos.
One was copied from osbuild/images and contains the repository metadata
for CentOS Stream 9 BaseOS.
The second was created by building a simple spec file into an RPM and
creating the metadata using createrepo.
2024-04-10 16:22:13 -07:00
..
baseos/repodata test: add repository metadata for osbuild-depsolve-dnf 2024-04-10 16:22:13 -07:00
custom/repodata test: add repository metadata for osbuild-depsolve-dnf 2024-04-10 16:22:13 -07:00
README.md test: add repository metadata for osbuild-depsolve-dnf 2024-04-10 16:22:13 -07:00

Test repositories metadata

This directory is used for osbuild-depsolve-dnf unit tests. Each subdirectory contains repository metadata that is served by a server during testing for osbuild-depsolve-dnf to query.

  • baseos: CS9 BaseOS repository metadata.
  • custom: a custom repository containing a single (empty) package, created with:
rpmdir=$(mktemp -d)
cat <<EOF > "${rpmdir}/nothing.spec"
#----------- spec file starts ---------------
Name:                   nothing
Version:                1.0.0
Release:                0
BuildArch:              noarch
Vendor:                 noone
Summary:                Provides %{name}
License:                BSD
Provides:               nothing

%description
%{summary}

%files
EOF

rpmbuild --quiet --define "_topdir ${rpmdir}" -bb "${rpmdir}/nothing.spec"
createrepo "${rpmdir}/RPMS/noarch/"
mkdir -p ./test/data/testrepos/custom
cp -a "${rpmdir}/RPMS/noarch/repodata" ./test/data/testrepos/custom