Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1348215

Summary: createrepo_c should not try to read directories with *.rpm
Product: [Fedora] Fedora Reporter: Miroslav Suchý <msuchy>
Component: createrepo_cAssignee: amatej
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dmach, tmlcoch
Target Milestone: ---Keywords: Reopened, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: createrepo_c-0.13.2-2.fc30 createrepo_c-0.13.2-2.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-23 17:48:36 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 Miroslav Suchý 2016-06-20 13:14:37 UTC
Description of problem:
I run:
/usr/bin/createrepo_c --database --update /var/lib/copr/public_html/results/@copr/PyPI2/fedora-rawhide-x86_64

Where is:
[copr@copr-be ~][PROD]$ ls /var/lib/copr/public_html/results/@copr/PyPI2/fedora-rawhide-x86_64/00303093-*
build-00303093.rsync.log  build.info  build.log.gz  fail  mockchain.log.gz  root.log.gz  state.log.gz
[copr@copr-be ~][PROD]$ ls -ld /var/lib/copr/public_html/results/@copr/PyPI2/fedora-rawhide-x86_64/00303093-*
drwxr-xr-x. 2 copr copr 4096 May 21 14:23 /var/lib/copr/public_html/results/@copr/PyPI2/fedora-rawhide-x86_64/00303093-python-pd.requires.rpm

And createrepo_c prints:
/usr/bin/createrepo_c --database --update /var/lib/copr/public_html/results/@copr/PyPI2/fedora-rawhide-x86_64
Directory walk started
Directory walk done - 26275 packages
Loaded information about 8695 packages
Temporary output repo path: /var/lib/copr/public_html/results/@copr/PyPI2/fedora-rawhide-x86_64/.repodata/
Preparing sqlite DBs
Pool started (with 5 workers)
error: /var/lib/copr/public_html/results/@copr/PyPI2/fedora-rawhide-x86_64/00303093-python-pd.requires.rpm: read failed: Is a directory (21)

C_CREATEREPOLIB: Warning: read_header: rpmReadPackageFile() error
C_CREATEREPOLIB: Warning: Cannot read package: /var/lib/copr/public_html/results/@copr/PyPI2/fedora-rawhide-x86_64/00303093-python-pd.requires.rpm: rpmReadPackageFile() error
Pool finished

While it is "just" warning, it is obvious that you are trying to read everything named *.rpm. You should just read only normal files. And put aside directories, sockets, pipes.



Version-Release number of selected component (if applicable):
createrepo_c-0.10.0-5.fc23.x86_64

How reproducible:


Steps to Reproduce:
1. mkdir foo.rpm
2. createrepo_c .

Actual results:
error: ./foo.rpm: read failed: Is a directory (21)

C_CREATEREPOLIB: Warning: read_header: rpmReadPackageFile() error
C_CREATEREPOLIB: Warning: Cannot read package: ./foo.rpm: rpmReadPackageFile() error


Expected results:
No errors nor warnings.

Comment 1 Fedora End Of Life 2016-11-25 09:20:49 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2017-02-28 09:59:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 3 Fedora End Of Life 2018-05-03 08:40:04 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2018-05-29 11:53:10 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 5 Jan Kurik 2018-08-14 10:22:41 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 6 amatej 2019-04-12 10:19:19 UTC
Created PR for this: https://github.com/rpm-software-management/createrepo_c/pull/148, test included.

Comment 7 Fedora Update System 2019-05-07 11:21:16 UTC
createrepo_c-0.13.2-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-91adfda805

Comment 8 Fedora Update System 2019-05-07 11:21:21 UTC
createrepo_c-0.13.2-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-06775cc842

Comment 9 Fedora Update System 2019-05-07 17:10:04 UTC
createrepo_c-0.13.2-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-06775cc842

Comment 10 Fedora Update System 2019-05-08 03:57:14 UTC
createrepo_c-0.13.2-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-91adfda805

Comment 11 Fedora Update System 2019-05-20 08:02:46 UTC
createrepo_c-0.13.2-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-c1840c618b

Comment 12 Fedora Update System 2019-05-20 08:02:52 UTC
createrepo_c-0.13.2-2.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7a58cdd433

Comment 13 Fedora Update System 2019-05-21 01:59:28 UTC
createrepo_c-0.13.2-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-7a58cdd433

Comment 14 Fedora Update System 2019-05-21 04:53:30 UTC
createrepo_c-0.13.2-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-c1840c618b

Comment 15 Fedora Update System 2019-05-23 17:48:36 UTC
createrepo_c-0.13.2-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2019-06-06 02:34:40 UTC
createrepo_c-0.13.2-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.