Project

Profile

Help

Maintenance: Planio will be observing a scheduled maintenance window this Tuesday, November 5, 2024 from 03:00 UTC until 06:30 UTC to perform urgent network maintenance in our primary data center. Your Planio account will be unavailable during this maintenance window.

Issue #6442

closed

Advisory upload fails if checksum type is provided for any of its packages

Added by ttereshc over 4 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:
Yes
Tags:
Sprint:
Quarter:

Description

Upload of an advisory raises invalid literal for int() with base 10: 'sha256' if checksum type is specified.

An example of advisory which triggers the error.

{
  "id": "my_advisory_id",
  "updated_date": "2014-06-10 00:00:00",
  "description": "description",
  "issued_date": "2014-06-10 00:00:00",
  "fromstr": "me",
  "status": "final",
  "title": "kexec-tools bug fix update",
  "summary": "summary",
  "version": "1",
  "type": "bugfix",
  "severity": "",
  "solution": "solution",
  "release": "",
  "rights": "Copyright 2014",
  "pushcount": "1",
  "pkglist": [
    {
      "name": "long namet",
      "shortname": "short name",
      "packages": [
        {
          "arch": "x86_64",
          "epoch": "0",
          "filename": "kexec-tools-2.0.4-32.el7_0.1.x86_64.rpm",
          "name": "kexec-tools",
          "reboot_suggested": false,
          "relogin_suggested": false,
          "restart_suggested": false,
          "release": "32.el7_0.1",
          "src": "kexec-tools-2.0.4-32.el7_0.1.src.rpm",
          "sum": "8e214681104e4ba73726e0ce11d21b963ec0390fd70458d439ddc72372082034",
          "sum_type": "sha256",
          "version": "2.0.4"
        }
      ]
    }
  ],
  "references": [
    {
      "href": "https://example.com/",
      "id": "",
      "title": "my advisory",
      "type": "bugzilla"
    }
  ],
  "reboot_suggested": false
}

Proposed solution

Currently, sum_type is a TextField which stores an id(int) of checksum type as it defined in createrepo_c. The suggestion is:

  • change a filed type and store an integer value in the PositiveIntegerField with choices, values for which are taken from what is supported in createrpo_c.
  • write a migration to convert the field to integer
  • convert a string representing checksum type to a createrepo_c id during upload
Actions #1

Updated by ttereshc over 4 years ago

  • Description updated (diff)
Actions #2

Updated by ppicka over 4 years ago

  • Triaged changed from No to Yes
  • Sprint Candidate changed from No to Yes
Actions #3

Updated by ppicka over 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ppicka
Actions #4

Updated by pulpbot over 4 years ago

  • Status changed from ASSIGNED to POST

Added by ppicka over 4 years ago

Revision 73c7dc0e | View on GitHub

Advisory package sum_type

Advisory package sum_type will be stored as INT as createrepo_c uses it. Upload will translate supported checksum from str to int. User will still see a string representation of sum_type.

closes #6442 https://pulp.plan.io/issues/6442

Actions #5

Updated by ppicka over 4 years ago

  • Status changed from POST to MODIFIED

Added by ppicka over 4 years ago

Revision ee108c15 | View on GitHub

Sum type in lower

Advisory package sum types is now shown in lower for consistency.

re #6442 https://pulp.plan.io/issues/6442

Actions #7

Updated by dalley over 4 years ago

  • Sprint/Milestone set to Pulp RPM 3.3.0
Actions #8

Updated by dalley over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF