Bug 1257965 - DNF doesn't treat the "xml:base" attribute in the primary.xml location tag correctly
Summary: DNF doesn't treat the "xml:base" attribute in the primary.xml location tag co...
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened
: 1219638 1274866 1310406 1338928 1340485 1353842 1394294 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-28 14:01 UTC by Yavor Atanasov
Modified: 2016-11-24 10:15 UTC (History)
18 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2016-08-19 19:52:10 UTC


Attachments (Terms of Use)
repodata with sample data (1.91 KB, application/x-gzip)
2015-08-28 14:01 UTC, Yavor Atanasov
no flags Details

Description Yavor Atanasov 2015-08-28 14:01:48 UTC
Created attachment 1068011 [details]
repodata with sample data

Description of problem:
If the "xml:base" attribute in the location tag is set, dnf treats the resulting package path as a local file and throws an error saying:
OSError: [Errno 2] No such file or directory: 'http://epel.check-update.co.uk/6/x86_64/2048-cli-0.9-4.git20141214.723738c.el6.x86_64.rpm'

Instead it should fetch it from that url.

I've created and attached a test case for you. The attached tar file contains a repomd.xml, primary.xml.gz and filelists.xml.gz files that describe just one package for simplicity (2048-cli):
└── repodata
    ├── filelists.xml.gz
    ├── primary.xml.gz
    └── repomd.xml


if you unpack that into /tmp/test-repo and then add the following yum configuration under /etc/yum.repos.d/fuzzy.repo:
[fuzzy]
name=fuzzy
baseurl=file:///tmp/test-repo
enabled=1
metadata_expire=1

you should be able to run:
dnf --disablerepo=\* --enablerepo=fuzzy install 2048-cli


It will error with:
Traceback (most recent call last):
  File "/usr/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 193, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 146, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 168, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 218, in do_transaction
    self.gpgsigcheck(downloadpkgs)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 238, in gpgsigcheck
    result, errmsg = self.sigCheckPkg(po)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 943, in sigCheckPkg
    sigresult = dnf.rpm.miscutils.checkSig(ts, po.localPkg())
  File "/usr/lib/python2.7/site-packages/dnf/rpm/miscutils.py", line 62, in checkSig
    fdno = os.open(package, os.O_RDONLY)
OSError: [Errno 2] No such file or directory: 'http://epel.check-update.co.uk/6/x86_64/2048-cli-0.9-4.git20141214.723738c.el6.x86_64.rpm'

If you try that with YUM it will work as expected.

Let me know if you need more info to reproduce it.

Kind regards
Yavor

Comment 1 Honza Silhan 2015-09-01 12:21:58 UTC
thanks for the report.
PR: https://github.com/rpm-software-management/dnf/pull/340

Comment 2 Dan Callaghan 2015-09-17 01:43:21 UTC
This bug causes builds to fail in Koji when using the external repos feature. The buildroot repo will have xml:base containing absolute URLs. The original reporter didn't mention but I guess that is where they hit this issue.

(In reply to Jan Silhan from comment #1)
> PR: https://github.com/rpm-software-management/dnf/pull/340

This PR was rejected because "it breaks other stuff" so this bug should probably be ASSIGNED.

Comment 3 Michal Luscon 2015-10-26 12:36:31 UTC
Moved to assigned + raised the prio

Comment 4 Michal Luscon 2015-10-26 12:37:16 UTC
*** Bug 1274866 has been marked as a duplicate of this bug. ***

Comment 5 Michal Luscon 2016-02-29 12:17:00 UTC
*** Bug 1310406 has been marked as a duplicate of this bug. ***

Comment 6 Honza Silhan 2016-03-01 16:27:58 UTC
blocked by https://fedorahosted.org/rel-eng/ticket/6361

Comment 7 Michal Luscon 2016-03-02 09:34:46 UTC
Fedora rel-eng ticket -> https://fedorahosted.org/rel-eng/ticket/6361

Comment 8 Michal Luscon 2016-05-30 11:39:45 UTC
*** Bug 1338928 has been marked as a duplicate of this bug. ***

Comment 9 Michal Luscon 2016-05-30 11:40:40 UTC
*** Bug 1219638 has been marked as a duplicate of this bug. ***

Comment 10 Michal Luscon 2016-06-06 11:10:30 UTC
*** Bug 1340485 has been marked as a duplicate of this bug. ***

Comment 11 Michal Luscon 2016-06-16 12:44:52 UTC
We merged necessary bits into upstream https://github.com/rpm-software-management/dnf/commit/3a1af7d3260a681ec5109136a968ad08724f9188 . You can find testing rpms in our nightly repo https://copr.fedorainfracloud.org/coprs/rpmsoftwaremanagement/dnf-nightly/builds/ .

Comment 12 Fedora Admin XMLRPC Client 2016-07-08 09:32:00 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 13 Honza Silhan 2016-07-12 09:26:26 UTC
*** Bug 1353842 has been marked as a duplicate of this bug. ***

Comment 14 Parag Nemade 2016-07-13 11:37:30 UTC
Can you also reference in which dnf release this bug is fixed? 

Its difficult to understand. Its always been that dnf bugs rarely get closed by any maintainer instead bodhi used to close them always wherever applies.

Comment 15 Igor Gnatenko 2016-07-13 12:23:36 UTC
(In reply to Parag Nemade from comment #14)
> Can you also reference in which dnf release this bug is fixed? 
> 
> Its difficult to understand. Its always been that dnf bugs rarely get closed
> by any maintainer instead bodhi used to close them always wherever applies.

2.0, We are working on 2.0 now and it's  just impossible to track all of issues. So it's easier to close it as next release and work on open issues.

Comment 16 Parag Nemade 2016-07-13 12:58:15 UTC
I request don't break tradition that I am seeing since dnf introduced in Fedora. It has been always like that bugs gets closed via bodhi wherever applies or at least add some information like Jan Silhan used to add to understand in which version bug will get fix.

Comment 17 Fedora Update System 2016-08-18 15:20:05 UTC
dnf-1.1.10-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-267f843cda

Comment 18 Fedora Update System 2016-08-18 15:21:08 UTC
dnf-1.1.10-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8caa619a9e

Comment 19 Fedora Update System 2016-08-18 15:22:09 UTC
dnf-1.1.10-1.fc24 dnf-plugins-core-0.1.21-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-878284e0d3

Comment 20 Fedora Update System 2016-08-18 16:53:19 UTC
dnf-1.1.10-1.fc25, dnf-plugins-core-0.1.21-4.fc25 has been pushed to the Fedora 25 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-2016-8caa619a9e

Comment 21 Fedora Update System 2016-08-19 00:23:02 UTC
dnf-1.1.10-1.fc23, dnf-plugins-core-0.1.21-3.fc23 has been pushed to the Fedora 23 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-2016-267f843cda

Comment 22 Fedora Update System 2016-08-19 00:58:12 UTC
dnf-1.1.10-1.fc24, dnf-plugins-core-0.1.21-3.fc24 has been pushed to the Fedora 24 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-2016-878284e0d3

Comment 23 Fedora Update System 2016-08-19 19:51:07 UTC
dnf-1.1.10-1.fc24, dnf-plugins-core-0.1.21-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2016-08-23 15:20:17 UTC
dnf-1.1.10-1.fc23, dnf-plugins-core-0.1.21-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2016-08-27 10:21:20 UTC
dnf-1.1.10-1.fc25, dnf-plugins-core-0.1.21-4.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 26 Michal Luscon 2016-11-24 10:15:04 UTC
*** Bug 1394294 has been marked as a duplicate of this bug. ***


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