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

Add support for proxying yum repositories that have sha1 checksums

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.1
    • Component/s: Documentation, Yum
    • Labels:
    • Story Points:
      0.5

      Description

      If you proxy a yum repository in Nexus 3 whose remote has "sha" style checksums it will fail.

       

      017-10-05 19:50:11,275+0000 WARN [qtp1956358891-277] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: GET /repository/spacewalk-rhel7/repodata/repomd.xml
      java.lang.IllegalArgumentException: Unsupported hash sha
      at org.sonatype.nexus.repository.yum.internal.utils.YumFacetUtils.hashAlgorithmByName(YumFacetUtils.java:159)
      at org.sonatype.nexus.repository.yum.internal.metadata.RepomdChecksumAndSizeUpdater.lambda$0(RepomdChecksumAndSizeUpdater.java:73)
      at java.util.Optional.map(Optional.java:215)
      at org.sonatype.nexus.repository.yum.internal.metadata.RepomdChecksumAndSizeUpdater.checksum(RepomdChecksumAndSizeUpdater.java:73)
      at org.sonatype.nexus.repository.yum.internal.metadata.RepomdChecksumAndSizeUpdater.update(RepomdChecksumAndSizeUpdater.java:59)
      at org.sonatype.nexus.repository.yum.internal.metadata.RepomdProcessor.lambda$0(RepomdProcessor.java:59)
      at java.util.Optional.ifPresent(Optional.java:159)
      at org.sonatype.nexus.repository.yum.internal.metadata.RepomdProcessor.process(RepomdProcessor.java:59)
      at org.sonatype.nexus.repository.yum.internal.proxy.YumProxyFacetImpl.processRepomd(YumProxyFacetImpl.java:200)

      An example of this style can be seen here:

      http://yum.spacewalkproject.org/2.5-client/RHEL/7/x86_64/repodata/

       

      As noted in the createrepo documentation:

            -s --checksum
      
                    Choose the checksum type used in repomd.xml and for packages in the metadata.  The default is now "sha256" (if python has  hashlib).  The
      
                    older  default  was  "sha",  which is actually "sha1", however explicitly using "sha1" doesn’t work on older (3.0.x) versions of yum, you
      
                    need to specify "sha".
      

       

      We should consider adding support for this style of checksum, since an and user is often not in control of the checksum format that is used on the remote of a proxy repository.

        Attachments

          Activity

            People

            Assignee:
            mdodgson Mark Dodgson
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Daniel Sauble
            Team:
            Nexus - Formats
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title