rmohr / bazeldnf

Build multi-arch base containers based on RPM with bazel.
Apache License 2.0
30 stars 18 forks source link

WORKSPACE RPM URL does not take into account repo metadata #71

Open stefanha opened 8 months ago

stefanha commented 8 months ago

I have a repo where rpm files are kept at a separate location from the metadata:

repositories:
- arch: x86_64
  baseurl: https://REPO_URL/
  name: qemu-kvm-x86_64
  gpgcheck: 0
  repo_gpgcheck: 0

The repo metadata is available at the baseurl, but the actual rpm files are located elsewhere and referenced in the primary.xml.gz file:

<package ...>...<location xml:base="https://RPM_SERVER_URL" href="qemu-guest-agent-8.2.0-5.el9.x86_64.rpm"/>

Notice that the repo baseurl and the rpm file URLs are two different domain names.

bazeldnf currently generates the WORKSPACE rpm file URL by concatenating the baseurl with the rpm filename. This approach does not work since the rpm files are not alongside the repo metadata.

Is it possible to update bazeldnf to honor the <location xml:base> attribute when building URLs?

Shoutout to @andreabolognani who I discussed this issue with.