Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2103015

Summary: yum install URL fails do download RPM due to urlencoding provided URL
Product: Red Hat Enterprise Linux 9 Reporter: Karel Srot <ksrot>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED ERRATA QA Contact: Eva Mrakova <emrakova>
Severity: medium Docs Contact:
Priority: low    
Version: 9.0CC: james.antill, mbanas, nsella
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.14.0-3.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 08:18:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karel Srot 2022-07-01 07:39:06 UTC
Description of problem:

I wanted to install a scratchbuild from kojihub

keylime-agent-rust-0.1.0~20220603gitaed51c7-2.el9.x86_64.rpm

available at URL

https://kojihub.stream.rdu2.redhat.com/kojifiles/work/tasks/9846/1249846/keylime-agent-rust-0.1.0%7E20220603gitaed51c7-2.el9.x86_64.rpm

Notice that '~' has been encoded as '%7E'

However 

# yum install 'https://kojihub.stream.rdu2.redhat.com/kojifiles/work/tasks/9846/1249846/keylime-agent-rust-0.1.0%7E20220603gitaed51c7-2.el9.x86_64.rpm'
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 0:46:41 ago on Fri 01 Jul 2022 08:39:45 AM CEST.
[MIRROR] keylime-agent-rust-0.1.0%7E20220603gitaed51c7-2.el9.x86_64.rpm: Status code: 404 for https://kojihub.stream.rdu2.redhat.com/kojifiles/work/tasks/9846/1249846/keylime-agent-rust-0.1.0%257E20220603gitaed51c7-2.el9.x86_64.rpm (IP: 10.10.209.55)
[MIRROR] keylime-agent-rust-0.1.0%7E20220603gitaed51c7-2.el9.x86_64.rpm: Status code: 404 for https://kojihub.stream.rdu2.redhat.com/kojifiles/work/tasks/9846/1249846/keylime-agent-rust-0.1.0%257E20220603gitaed51c7-2.el9.x86_64.rpm (IP: 10.10.209.55)
[MIRROR] keylime-agent-rust-0.1.0%7E20220603gitaed51c7-2.el9.x86_64.rpm: Status code: 404 for https://kojihub.stream.rdu2.redhat.com/kojifiles/work/tasks/9846/1249846/keylime-agent-rust-0.1.0%257E20220603gitaed51c7-2.el9.x86_64.rpm (IP: 10.10.209.55)
[MIRROR] keylime-agent-rust-0.1.0%7E20220603gitaed51c7-2.el9.x86_64.rpm: Status code: 404 for https://kojihub.stream.rdu2.redhat.com/kojifiles/work/tasks/9846/1249846/keylime-agent-rust-0.1.0%257E20220603gitaed51c7-2.el9.x86_64.rpm (IP: 10.10.209.55)
[FAILED] keylime-agent-rust-0.1.0%7E20220603gitaed51c7-2.el9.x86_64.rpm: Status code: 404 for https://kojihub.stream.rdu2.redhat.com/kojifiles/work/tasks/9846/1249846/keylime-agent-rust-0.1.0%257E20220603gitaed51c7-2.el9.x86_64.rpm (IP: 10.10.209.55)
Status code: 404 for https://kojihub.stream.rdu2.redhat.com/kojifiles/work/tasks/9846/1249846/keylime-agent-rust-0.1.0%257E20220603gitaed51c7-2.el9.x86_64.rpm (IP: 10.10.209.55)

As you can see, URL fragment is 
  ...rust-0.1.0%257E2...
instead of
  ...rust-0.1.0%7E2...
due to extra encoding of '%' character.

Version-Release number of selected component (if applicable):
# rpm -q yum
yum-4.10.0-5.el9_0.noarch

How reproducible:
always


Steps to Reproduce:
1. see above

Actual results:
Cannot download RPM

Expected results:
Can download RPM

Additional info:

# wget https://kojihub.stream.rdu2.redhat.com/kojifiles/work/tasks/9846/1249846/keylime-agent-rust-0.1.0%7E20220603gitaed51c7-2.el9.x86_64.rpm
--2022-07-01 09:37:55--  https://kojihub.stream.rdu2.redhat.com/kojifiles/work/tasks/9846/1249846/keylime-agent-rust-0.1.0%7E20220603gitaed51c7-2.el9.x86_64.rpm
Resolving kojihub.stream.rdu2.redhat.com (kojihub.stream.rdu2.redhat.com)... 10.10.209.55
Connecting to kojihub.stream.rdu2.redhat.com (kojihub.stream.rdu2.redhat.com)|10.10.209.55|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3469559 (3.3M) [application/x-rpm]
Saving to: ‘keylime-agent-rust-0.1.0~20220603gitaed51c7-2.el9.x86_64.rpm’

keylime-agent-rust-0.1.0~20220603git 100%[=====================================================================>]   3.31M  3.58MB/s    in 0.9s    

2022-07-01 09:37:56 (3.58 MB/s) - ‘keylime-agent-rust-0.1.0~20220603gitaed51c7-2.el9.x86_64.rpm’ saved [3469559/3469559]


The bug is present also on RHEL-8.

Comment 12 errata-xmlrpc 2023-05-09 08:18:18 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 (dnf 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/RHBA-2023:2490