openSUSE:Build Service Concept Repomd Download
A new draft proposal for supporting automatic downloading of repomd files when using Download on Demand
Scope
Current versions of Download on Demand require the user to manually download the Primary.xml file and place it on the backend, which requires shell access to the backend servers. However, the URL given in the project xml configuration specifies everything that is necessary to have the backend download this file automatically by itself.
The main file of a yum repository is the repomd.xml file. This file is at a well-known path which can be constructed by adding /repodata/repomd.xml to the primary repository URL. This file provides information about the location of important files, such as the primary.xml file. So, instead of manually downloading the primary.xml file, we should download the repomd.xml, parse it to discover the location of the primary.xml file, and then download that file.
Status quo
Currently, primary.xml data is statically downloaded once from the repositories.
Usecases, functions, constraints
Usecases
Download on Demand
Current setup requirements for download on demand require shell access to the backend server to download the primary.xml. This change allows setup of download on demand without special access to the backend.
Project owner's view
Ideally this should be transparent to the project owner, aside from the ability to specify the download location for the repomd file via the API.
Functions
There will be a function to download the repomd file and call the "scanrepo" event in bs_sched
Constraints
This section contains undocumented, sparsely documented, or obvious, but existing behavior of the current OBS and underlying build process (debian and rpm) that cannot be changed because it is inherently used. One issue documented by constraints is "backwards compatibility".
Compatibility
This should not cause any issues with backwards compatability.
Architecture and implementation
Implementation notes
When bs_sched::addscan_repo detects that there is no primary.xml, it should send a message to a sub in bs_repserver to download the appropriate repomd file. repomd files are in a static location on the repository. Once the file is downloaded, the sub should send a "scanrepo" event to bs_sched.