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 1544506 - createrepo error with space in baseurl path
Summary: createrepo error with space in baseurl path
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: createrepo
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-12 17:06 UTC by Gregory Young
Modified: 2019-07-26 07:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-26 07:46:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1310075 0 unspecified CLOSED createrepo bombs out if dir contains characters than need URL escaping. 2021-02-22 00:41:40 UTC

Internal Links: 1310075

Description Gregory Young 2018-02-12 17:06:06 UTC
Description of problem:

Running createrepo in a folder tree that has a space in it causes a failure and stack trace.

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

createrepo 0.9.9

on Downstream CentOS 7.4

[root@localhost system]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

How reproducible:

every time.

Steps to Reproduce:

1. Run createrepo from withing, or specifying a path with a space in it. For example:

createrepo -g '/tmp/a dir with spaces/system/isodir/comps.xml' -dp --workers=4 --update '/tmp/a dir with spaces/system/isodir'/

Actual results:

[root@localhost system]# createrepo -g '/tmp/a dir with spaces/system/isodir/comps.xml' -dp --workers=4 --update '/tmp/a dir with spaces/system/isodir'/
Traceback (most recent call last):
  File "/usr/share/createrepo/genpkgmetadata.py", line 309, in <module>
    main(sys.argv[1:])
  File "/usr/share/createrepo/genpkgmetadata.py", line 270, in main
    mdgen.doPkgMetadata()
  File "/usr/lib/python2.7/site-packages/createrepo/__init__.py", line 400, in doPkgMetadata
    self._setup_old_metadata_lookup()
  File "/usr/lib/python2.7/site-packages/createrepo/__init__.py", line 386, in _setup_old_metadata_lookup
    self.oldData = readMetadata.MetadataIndex(old_repo_path, opts)
  File "/usr/lib/python2.7/site-packages/createrepo/readMetadata.py", line 51, in __init__
    self._repo.baseurl = 'file://' + realpath
  File "/usr/lib/python2.7/site-packages/yum/config.py", line 104, in __set__
    value, str(e)))
ValueError: Error parsing "baseurl = 'file:///tmp/a dir with spaces/system/isodir'": URL must be http, ftp, file or https not ""


Expected results:

Complete without error.

Additional info:

Simple fix, a single variable was not quoted to prevent globing.

The key is this line:

File "/usr/lib/python2.7/site-packages/createrepo/readMetadata.py", line 51, in __init__


Change:

self._repo.baseurl = 'file://' + realpath


To:

self._repo.baseurl = 'file://' + 'realpath'

Comment 3 Daniel Mach 2019-07-26 07:46:01 UTC
There is no plan to fix this bug during RHEL 7 life cycle.
If you still consider the issue important, please contact your support representative.


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