Bug 1082658 - dnf/hawkey does not support sha512
Summary: dnf/hawkey does not support sha512
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Honza Silhan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-31 15:04 UTC by Jeffrey C. Ollie
Modified: 2014-09-23 04:23 UTC (History)
6 users (show)

Fixed In Version: hawkey-0.5.1-1.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-23 04:23:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jeffrey C. Ollie 2014-03-31 15:04:26 UTC
dnf is crashing on a private repo I maintain at work for proprietary software and backports:

# dnf update
Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 242, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 75, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 124, in _main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1376, in run
    load_available_repos=lar)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 217, in fill_sack
    self._add_repo_to_sack(r.id)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 135, in _add_repo_to_sack
    load_presto=repo.deltarpm)
_hawkey.RuntimeException: load_yum_repo() failed: 3.

Looking in hawkey.log I see the following:

INFO Mar-31 09:38:42 fetching private
LSERROR Mar-31 09:38:42 line 5: unknown checksum type: sha512
LSERROR Mar-31 09:38:42 line 6: unknown checksum type: sha512
LSERROR Mar-31 09:38:42 line 13: unknown checksum type: sha512
LSERROR Mar-31 09:38:42 line 14: unknown checksum type: sha512
LSERROR Mar-31 09:38:42 line 21: unknown checksum type: sha512
LSERROR Mar-31 09:38:42 line 22: unknown checksum type: sha512
LSERROR Mar-31 09:38:42 line 29: unknown checksum type: sha512
LSERROR Mar-31 09:38:42 line 30: unknown checksum type: sha512
LSERROR Mar-31 09:38:42 line 38: unknown checksum type: sha512
LSERROR Mar-31 09:38:42 line 39: unknown checksum type: sha512
LSERROR Mar-31 09:38:42 line 47: unknown checksum type: sha512
LSERROR Mar-31 09:38:42 line 48: unknown checksum type: sha512
LSERROR Mar-31 09:38:42 line 55: unknown checksum type: sha512
LSERROR Mar-31 09:38:42 line 56: unknown checksum type: sha512
ERROR Mar-31 09:38:42 repo_add_repomdxml/rpmmd() has failed.

I'm not sure why sha512 should be causing problems, this repo has been working just fine with yum for quite some time.  Rebuilding my repo with sha256 has solves the problem for me.

Comment 1 Ales Kozumplik 2014-03-31 15:10:15 UTC
Thank you Jeffrey. Can you share the createrepo command line used to build the repository?

Comment 2 Jeffrey C. Ollie 2014-03-31 15:34:37 UTC
Here is the command that produced the repository that couldn't be loaded:

createrepo --baseurl=http://repo.dmacc.net/misc/fedora/20/x86_64 --database --checksum sha512 --unique-md-filenames --deltas --num-deltas 2 --oldpackagedirs /srv/repo.dmacc.net/content/misc/fedora/20/x86_64 --compress-type xz /srv/repo.dmacc.net/content/misc/fedora/20/x86_64

And here's the one that worked:

createrepo --baseurl=http://repo.dmacc.net/misc/fedora/20/x86_64 --database --checksum sha256 --unique-md-filenames --deltas --num-deltas 2 --oldpackagedirs /srv/repo.dmacc.net/content/misc/fedora/20/x86_64 --compress-type xz /srv/repo.dmacc.net/content/misc/fedora/20/x86_64

# rpm -q createrepo
createrepo-0.10.1-0.fc20.noarch

Comment 3 Ales Kozumplik 2014-04-01 10:48:14 UTC
Thanks, we will schedule work on this.

Comment 4 Michael Schröder 2014-04-07 09:22:04 UTC
(FYI: sha512 support was added to libsolv last week independent of this bug)

Comment 5 Ales Kozumplik 2014-04-07 14:12:15 UTC
Thanks Michael!

Comment 6 Honza Silhan 2014-08-20 16:27:01 UTC
Fixed in the upstream.

Comment 7 Fedora Update System 2014-09-18 08:44:49 UTC
hawkey-0.5.1-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/hawkey-0.5.1-1.fc21

Comment 8 Fedora Update System 2014-09-19 17:44:30 UTC
Package hawkey-0.5.1-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hawkey-0.5.1-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-11102/hawkey-0.5.1-1.fc21
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2014-09-23 04:23:52 UTC
hawkey-0.5.1-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


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