Bug 1257965 - DNF doesn't treat the "xml:base" attribute in the primary.xml location tag correctly
DNF doesn't treat the "xml:base" attribute in the primary.xml location tag co...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
22
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
: Reopened
: 1219638 1274866 1310406 1338928 1340485 1353842 1394294 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-28 10:01 EDT by Yavor Atanasov
Modified: 2016-11-24 05:15 EST (History)
18 users (show)

See Also:
Fixed In Version: dnf-1.1.10-1.fc24 dnf-1.1.10-1.fc23 dnf-1.1.10-1.fc25
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-19 15:52:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Yavor Atanasov 2015-08-28 10:01:48 EDT
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 08:21:58 EDT
thanks for the report.
PR: https://github.com/rpm-software-management/dnf/pull/340
Comment 2 Dan Callaghan 2015-09-16 21:43:21 EDT
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 08:36:31 EDT
Moved to assigned + raised the prio
Comment 4 Michal Luscon 2015-10-26 08:37:16 EDT
*** Bug 1274866 has been marked as a duplicate of this bug. ***
Comment 5 Michal Luscon 2016-02-29 07:17:00 EST
*** Bug 1310406 has been marked as a duplicate of this bug. ***
Comment 6 Honza Silhan 2016-03-01 11:27:58 EST
blocked by https://fedorahosted.org/rel-eng/ticket/6361
Comment 7 Michal Luscon 2016-03-02 04:34:46 EST
Fedora rel-eng ticket -> https://fedorahosted.org/rel-eng/ticket/6361
Comment 8 Michal Luscon 2016-05-30 07:39:45 EDT
*** Bug 1338928 has been marked as a duplicate of this bug. ***
Comment 9 Michal Luscon 2016-05-30 07:40:40 EDT
*** Bug 1219638 has been marked as a duplicate of this bug. ***
Comment 10 Michal Luscon 2016-06-06 07:10:30 EDT
*** Bug 1340485 has been marked as a duplicate of this bug. ***
Comment 11 Michal Luscon 2016-06-16 08:44:52 EDT
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 05:32:00 EDT
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 05:26:26 EDT
*** Bug 1353842 has been marked as a duplicate of this bug. ***
Comment 14 Parag Nemade 2016-07-13 07:37:30 EDT
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 08:23:36 EDT
(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 08:58:15 EDT
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 11:20:05 EDT
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 11:21:08 EDT
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 11:22:09 EDT
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 12:53:19 EDT
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-18 20:23:02 EDT
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-18 20:58:12 EDT
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 15:51:07 EDT
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 11:20:17 EDT
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 06:21:20 EDT
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 05:15:04 EST
*** 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.