RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1807864 - PackageKit treats multi-line gpgkey as a single line
Summary: PackageKit treats multi-line gpgkey as a single line
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libdnf
Version: 8.4
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: 8.0
Assignee: amatej
QA Contact: Eva Mrakova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-27 12:01 UTC by Maciek Borzecki
Modified: 2020-11-04 01:53 UTC (History)
6 users (show)

Fixed In Version: libdnf-0.48.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:52:37 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:4510 0 None None None 2020-11-04 01:52:53 UTC

Description Maciek Borzecki 2020-02-27 12:01:19 UTC
Description of problem:

Based on https://cloud.google.com/sdk/docs/quickstart-redhat-centos, I've added a *.repo definition that looks like this:

```
[google-cloud-sdk]
name=Google Cloud SDK
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
       https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
```

The multi-line gpgkey entry is correctly handled by dnf, but PackageKit joins the strings with ';' and attempts to download the keys from this URL https://packages.cloud.google.com/yum/doc/yum-key.gpg;https:/packages.cloud.google.com/yum/doc/rpm-package-key.gpg getting a 404.

Even if the repo definition is buggy, I would expect PackageKit to be consistent with what dnf/yum do.


Version-Release number of selected component (if applicable):

PackageKit-1.1.12-3.el8.x86_64


How reproducible:
always


Steps to Reproduce:
1. add a repo definition like above
2. pkgcon get-updates
3.

Actual results:

Observing this in the terminal:
Fatal error: Failed to download gpg key for repo 'google-cloud-sdk': Status code: 404 for https://packages.cloud.google.com/yum/doc/yum-key.gpg;https:/packages.cloud.google.c│Feb 27 06:50:27 rhel-8-devel PackageKit[1744]: get-repo-list transaction /2_aaadcaad from uid 0 finished with success after 4ms
om/yum/doc/rpm-package-key.gpg


Additional info:

Is the repo definition buggy? https://dnf.readthedocs.io/en/latest/conf_ref.html#list-label states a list is one or more strings separated with comma or space characters, so as long as newline is treated as a space it seems ok.

Comment 1 Kalev Lember 2020-02-27 12:15:50 UTC
The .repo files are parsed in libdnf. Reassigning.

Comment 2 amatej 2020-05-13 07:20:17 UTC
I have created a PR:
https://github.com/rpm-software-management/libdnf/pull/959

and tests:
https://github.com/rpm-software-management/ci-dnf-stack/pull/831

I am also proposing AC:
microdnf and packagekit (libdnf context part) are able to correctly handle .repo config values for gpgkey and baseurl that are separated by: comma or space characters (including newline).

Comment 9 errata-xmlrpc 2020-11-04 01:52:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (yum bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:4510


Note You need to log in before you can comment on or make changes to this bug.