Bug 1296282

Summary: Verifytree returns "error: no such file or directory"
Product: Red Hat Enterprise Linux 7 Reporter: Thom Carlin <tcarlin>
Component: yum-utilsAssignee: Michal Domonkos <mdomonko>
Status: CLOSED ERRATA QA Contact: Eva Mrakova <emrakova>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: emrakova, mdomonko, mkalyat, tcarlin, vmukhame
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yum-utils-1.1.31-39.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1333345 1348995 (view as bug list) Environment:
Last Closed: 2016-11-04 00:14:26 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:
Bug Depends On:    
Bug Blocks: 1348995, 1349433    

Description Thom Carlin 2016-01-06 19:25:56 UTC
Description of problem:

Verifytree tries to download a non-existent file, then reports an error.

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


How reproducible:


Steps to Reproduce:
1. Follow Sat 6 steps to create disconnected host up to katello-disconnected export...
2. expand-export.sh 
3. verifytree resulting repo(s)

Actual results:

...
  verifying comps.xml grammar with xmllint
error : No such file or directory
warning: failed to load external entity "http://cvs.fedoraproject.org/viewcvs/*checkout*/comps/comps.rng"
Relax-NG parser error : xmlRelaxNGParse: could not load http://cvs.fedoraproject.org/viewcvs/*checkout*/comps/comps.rng
Relax-NG schema http://cvs.fedoraproject.org/viewcvs/*checkout*/comps/comps.rng failed to compile
Checking all packages

Expected results:

...
  verifying comps.xml grammar with xmllint
Checking all packages

Additional info:

New location appears to be https://git.fedorahosted.org/cgit/comps.git/plain/comps.rng

Comment 2 Valentina Mukhamedzhanova 2016-02-09 18:45:18 UTC
Thom, could you upload a tarball with a sample repo to reproduce this problem? That would greatly increase the chance of having it addressed. Also, could you clarify why you consider the result you are getting to be a bug?

Comment 3 Thom Carlin 2016-02-09 18:50:44 UTC
It is a bug because we are shipping with a URL that will return a 404 from now on.

Comment 4 Valentina Mukhamedzhanova 2016-02-09 19:26:56 UTC
Ah, I see now that the URL is hardcoded in verifytree. Thank you for the report! Does replacing the URL with the new one fix the problem for you?

Comment 5 Thom Carlin 2016-02-09 19:40:29 UTC
Sorry, I didn't try it.  I would expect that it would....

Comment 6 Valentina Mukhamedzhanova 2016-02-09 20:20:21 UTC
I've tried replacing the URL, but it doesn't make much difference. xmllint fails even with a proper URL.

$ xmllint --noout --nowarning --relaxng https://git.fedorahosted.org/cgit/comps.git/plain/comps.rng /var/tmp/yum-root-aG929w/__tmp_trepo/gen/comps.xml
warning: failed to load external entity "https://git.fedorahosted.org/cgit/comps.git/plain/comps.rng"
Relax-NG parser error : xmlRelaxNGParse: could not load https://git.fedorahosted.org/cgit/comps.git/plain/comps.rng
Relax-NG schema https://git.fedorahosted.org/cgit/comps.git/plain/comps.rng failed to compile

Comment 7 Thom Carlin 2016-02-09 20:29:22 UTC
Checking the URLs inside that document: http://relaxng.org/ns/compatibility/annotations/1.0 gives a 404 also

Comment 10 Michal Domonkos 2016-04-29 11:12:01 UTC
(In reply to Valentina Mukhamedzhanova from comment #6)
> I've tried replacing the URL, but it doesn't make much difference. xmllint
> fails even with a proper URL.

The reason for this is that xmllint doesn't support SSL and the new URL starts with https.  We can fix this by either downloading the comps.rng file ourselves or shipping the file along with the yum-utils rpm.

Comment 22 Michal Domonkos 2016-07-08 17:55:33 UTC
New PR with a fixup:
https://github.com/rpm-software-management/yum-utils/pull/11

Comment 29 errata-xmlrpc 2016-11-04 00:14:26 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, 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://rhn.redhat.com/errata/RHBA-2016-2187.html