Skip to content

rpm: Turn fedora lister into a generic Red Hat based distribution one

Antoine Lambert requested to merge anlambert/swh-lister:rpm-lister into master

As Red Hat based linux distributions share the same type of package repository, rework the fedora lister into a generic one to list RPM source packages and their versions from numerous distributions.

For a given distribution, the RPM lister will fetch packages metadata from a list of release identifiers and a list of software components. Source packages are then processed and relevant info are extracted to be sent to the RPM loader. When all releases and components were processed, the lister collected all versions for each package name and send those info to the scheduler that will create RPM loading tasks afterwards.

Nevertheless, as there is no generic way to list all releases and components for a given distribution but also to guess the right URL to retrieve packages metadata from, those info need to be manually provided to the lister as input parameters. Some examples of those parameters for various distributions can be found in the config directory of the lister.

Regarding the produced origin URLs, as there is no way to find valid HTTP ones for all distributions, the same behavior as with the debian lister is used and they have the following form: rpm://{instance}/packages/{package_name} where the instance variable corresponds to the name of the listed distribution such as Fedora, CentOS, or openSUSE.

Related to swh/meta#5011.

After those changes, slight adaptations are required for the RPM loader to successfully ingest listed packages into the archive, see swh-loader-core!485 (merged).

Edited by Antoine Lambert

Merge request reports

Loading