Project

Profile

Help

Issue #4033

closed

updateinfo.xml is published with "unknown checksum" type if it's not present in a remote repo

Added by ttereshc over 5 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Sync/publish https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/ to reproduce.

  <update from="errata@redhat.com" status="stable" type="enhancement" version="1">
    <id>RHEA-2012:0058</id>
    <title>Gorilla_Erratum</title>
    <issued date="2013-01-27 16:08:09"/>
    <updated date="2014-07-20 06:00:01"/>
    <rights></rights>
    <summary></summary>
    <description>Gorilla_Erratum</description>
    <references/>
    <pkglist>
      <collection short="">
        <name>1</name>
        <package name="gorilla" version="0.62" release="1" epoch="0" arch="noarch" src="http://www.fedoraproject.org">
          <filename>gorilla-0.62-1.noarch.rpm</filename>
          <sum type="Unknown checksum"></sum>   <------------------------------------ HERE
        </package>
      </collection>
    </pkglist>
  </update>

Related issues

Related to RPM Support - Test #4109: Test verify checksum type on updateinfo.xmlCLOSED - COMPLETEragbalakActions
Actions #1

Updated by ttereshc over 5 years ago

It doesn't disrupt any dnf operations, so I think it can be fixed after Beta.

Actions #2

Updated by CodeHeeler over 5 years ago

  • Triaged changed from No to Yes
Actions #3

Updated by daviddavis over 5 years ago

Even if we don't set sum_type on the UpdateCollectionPackage, we still end up with the "Unknown checksum" values on checksums. The only way to hide this string is if we don't show the checksum at all if there's no checksum type.

Two possible solutions:

1. Only set the checksum if BOTH checksum and checksum_type are defined (ie not blank)
2. Only set checksum if checksum is defined (but this will still potentially cause "Unknown checksum" values)

I'm leaning towards option 2. If checksum is defined, then checksum_type should be also defined.

Added by daviddavis over 5 years ago

Revision 97e8311a | View on GitHub

Only show checksum if it's not blank

fixes #4033 https://pulp.plan.io/issues/4033

Actions #4

Updated by daviddavis over 5 years ago

  • Status changed from NEW to POST
  • Assignee set to daviddavis
Actions #5

Updated by ttereshc over 5 years ago

+1 to option 2

Actions #6

Updated by daviddavis over 5 years ago

  • Status changed from POST to MODIFIED
Actions #7

Updated by kersom over 5 years ago

  • Related to Test #4109: Test verify checksum type on updateinfo.xml added
Actions #8

Updated by ragbalak about 5 years ago

@daviddavis

I am trying to include a test for this issue in pulp_rpm

I have a few clarifications concerning this

1) The UpdateInfo.xml of https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/ doesn't have checksum tag in it currently.

2) After publishing, I opened the UpdateInfo.xml under /var/lib/pulp/published/metadata

zcat /var/lib/pulp/published/metadata/b58d8b65-3ff4-48fa-bf97-2e699daf9769/updateinfo.xml.gz

I saw that the updateinfo.xml of the published folder also doesn't have the checksum flag. Also does the folder name under metadata
"b58d8b65-3ff4-48fa-bf97-2e699daf9769" on the above path refer to something. Earlier in pulp-2 this used to be the distributor ID, whereas here the folder name doesn't match anything.

3) Also here all the metadata are present in different directories


$ tree metadata/

metadata/
├── 0826ec34-1f36-428b-9cf7-faff7c2ec21b
│   └── primary.xml.gz
├── 0cb92302-210d-46a8-91ea-1f9aeb473db6
│   └── primary.sqlite
├── 6cbd6d76-7d4f-49e5-8c42-6aecf8d18dfa
│   └── repomd.xml
├── 726f1c40-be05-496e-837c-05c8e5974fa6
│   └── filelists.sqlite
├── 76dab473-4831-47e4-994b-0eaae20894b7
│   └── other.xml.gz
├── b58d8b65-3ff4-48fa-bf97-2e699daf9769
│   └── updateinfo.xml.gz
├── e63927f5-2886-421b-bb02-cc9c55a32e21
│   └── filelists.xml.gz
└── ec88e722-c0dd-443c-93c8-05da76d8400c
    └── other.sqlite

Is this a how it was designed to be ?

Thanks

Actions #9

Updated by daviddavis about 5 years ago

The UpdateInfo.xml of https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/ doesn't have checksum tag in it currently.

That's fine. I don't think it's required. This bug was to remove the erroneous "Unknown checksum" elements. The lack of a checksum tag matches https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/.

After publishing, I opened the UpdateInfo.xml under /var/lib/pulp/published/metadata

I wouldn't recommend accessing the Updateinfo.xml file this way. You should distribute the repository publication and access it via http (ie by fetching http://<distribution path>/repodata/updateinfo.xml). What you're seeing is how the file is stored internally on the filesystem in Pulp 3. You could have the same file served by multiple distributions at different URLs. In Pulp 2 we created symlinks to serve a file at multiple URLs but in Pulp 3 we dynamically resolve URLs to filesystem paths.

Also here all the metadata are present in different directories

Yea, see the previous answer.

Hope that helps. Let me know if anything is unclear.

Actions #10

Updated by ragbalak about 5 years ago

Thanks @daviddavis

Actions #11

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3)
Actions #12

Updated by ttereshc over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF