Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-17884

upload of source rpm fails in yum hosted

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.16.0
    • 3.13.0
    • Yum
    • Centos
    • 2

    Description

      I uploaded a src rpm to a up to date nexus3 (3.13.0-01 OSS). And it worked fine:

      > PUT /repository/Test/SRPMS/7/ngcurl-7.61.0-2.src.rpm HTTP/1.1
      ...
      < HTTP/1.1 200 OK
      < Date: Fri, 31 Aug 2018 12:52:48 GMT
      < Server: Nexus/3.13.0-01 (OSS)
      < X-Content-Type-Options: nosniff
      < Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation
      < Content-Length: 0
      < Keep-Alive: timeout=5
      < Connection: Keep-Alive
      < Content-Type: application/x-rpm

      But the the content of <hash>-primary.xml.gz is wrong:

      curl -k https://nexus.XXX.com/repository/Test/SRPMS/7/repodata/338c845819a87d70703b3ffbbfe763b15bf325c7c017229997621899f7c04b89-primary.xml.gz | gunzip | xmllint --format /dev/fd/0

      returns:

      <metadata xmlns="http://linux.duke.edu/metadata/common" xmlns:rpm="http://linux.duke.edu/metadata/rpm" packages="1">
      <package type="rpm">
      <name>ngcurl</name>
      <arch>x86_64</arch>
      ...

      Look at the arch attribute, it says x86_64.

      I created a local yum repo with createro (0.9.9) on Centos7 (7.5.1804)
      With exactly the same rpm, running:

      $ createrepo -o $PWD -p $PWD -s sha --database --workers 4

      The equivalent file says:

      <metadata xmlns="http://linux.duke.edu/metadata/common" xmlns:rpm="http://linux.duke.edu/metadata/rpm" packages="1">
      <package type="rpm">
      <name>ngcurl</name>
      <arch>src</arch>

      The arch is now src

      A diff after formatting both with xmllint --format returns:

      5c5
      < <arch>x86_64</arch>

      > <arch>src</arch>
      7c7
      < <checksum type="sha256" pkgid="YES">b2a7e8d1a5ff56c9028493ba7103488323578187d4c282e4711199b04509319d</checksum>

      > <checksum type="sha" pkgid="YES">49d3b8b28b256d65f7cafc94d2a6ed16456bd024</checksum>
      17c17
      < <time file="1535719990576" build="1535623528"/>

      > <time file="1535623528" build="1535623528"/>

      The only real problem is indeed the arch.

      Attachments

        Issue Links

          Activity

            People

              jstephens Joseph Stephens
              fbacchella Fabrice Bacchella
              Joe Tom Joe Tom
              NXRM - Cypher
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                tigCommentSecurity.panel-title