Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-19508

Support repomd.xml which contains base URL location


    • Type: New Feature
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 6.11.1
    • Fix Version/s: None
    • Component/s: RPM
    • Labels:


      Currently, if the repomd.xml file contains base URL in the location of the files, for example:

      <?xml version="1.0" encoding="UTF-8"?>
      <repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
      <data type="filelists">
        <checksum type="sha256">f1f584978d9f219cc2cf874896dc2a089310c7f426c2e2787c69038867c6503e</checksum>
        <open-checksum type="sha256">8b9e69840ee8914bfae0ce1a2bf1f43a6cc660a35b5661e567682520479d9c16</open-checksum>
        <location xml:base="http://myrpmserver.com" href="repodata/f1f584978d9f219cc2cf874896dc2a089310c7f426c2e2787c69038867c6503e-filelists.xml.gz"/>

      Then, the client gets the repomd.xml file from Artifactory, but the actual packages will be downloaded directly from the base URL, bypassing Artifactory, i.e. the packages will not be cached to Artifactory.

      For comparison, the regular repomd.xml (without the base URL) looks like this (from http://mirror.centos.org/centos/6/updates/x86_64/repodata/repomd.xml)

      <repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
      <data type="filelists">
      <checksum type="sha256">
      <open-checksum type="sha256">
      <location href="repodata/d38f0ffe2d0640f387496cdf92c3d8176dd0de2d239ff9ae5ccbe1cfe1a77922-filelists.xml.gz"/>

      Steps to reproduce:

      1. Run 2 Docker Centos images - 1 for the RPM server and 1 for the yum client

      2. On the server:

      • Create a folder and put an rpm package in it
      • Run the following command to create the repomd repository:
        createrepo . -u http://avivcentos

        The -u flag specifies the base URL. More info here: https://linux.die.net/man/8/createrepo

      3. Still on the server:

      • Install Nginx and put the following in /etc/nginx/conf.d/repos.conf:
        server {
                listen   80;
                server_name  avivcentos;	#change  test.lab to your real domain
                root   /root/aviv;
                location / {
                        index  index.php index.html index.htm;
                        autoindex on;	#enable listing of directory index
      • Reload Nginx, now your server is ready to be used

      4. On Artifactory:

      • Create an RPM remote repository and point it to http://avivcentos
      • Use the set me up to configure the Centos client

      5. On the client:

      • After configuring the above, run yum update
      • Run yum install for the package from step 2
      • yum should install the requested package
        However, while repodata/repomd.xml file will be cached to Artifactory, the actual package will not. The client bypassed Artifactory in order to download the package.




            • Assignee:
              avivb Aviv Blonder
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: