Project

Profile

Help

Issue #4033

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

Added by ttereshc about 1 year ago. Updated 7 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

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.xml CLOSED - COMPLETE Actions

Associated revisions

Revision 97e8311a View on GitHub
Added by daviddavis about 1 year ago

Only show checksum if it's not blank

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

History

#1 Updated by ttereshc about 1 year ago

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

#2 Updated by CodeHeeler about 1 year ago

  • Triaged changed from No to Yes

#3 Updated by daviddavis about 1 year 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.

#4 Updated by daviddavis about 1 year ago

  • Status changed from NEW to POST
  • Assignee set to daviddavis

#5 Updated by ttereshc about 1 year ago

+1 to option 2

#6 Updated by daviddavis about 1 year ago

  • Status changed from POST to MODIFIED

#7 Updated by kersom about 1 year ago

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

#8 Updated by ragbalak 8 months 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

#9 Updated by daviddavis 8 months 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.

#10 Updated by ragbalak 8 months ago

Thanks @daviddavis

#11 Updated by bmbouter 7 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF