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 1963732 - [abrt] dnf: checkSig(): miscutils.py:90:checkSig:ValueError: Unexpected return value 'RSA/SHA256, mer. 19 mai 2021 23:27:32, Key ID 49fd77499570ff31' from hdr.sprintf when checking signature.
Summary: [abrt] dnf: checkSig(): miscutils.py:90:checkSig:ValueError: Unexpected retur...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 33
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: amatej
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:f69739e97ef9268e5a057e4afed...
: 1963321 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-23 19:46 UTC by Yann Droneaud
Modified: 2021-06-15 07:21 UTC (History)
11 users (show)

Fixed In Version: dnf-4.8.0-1.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-15 07:21:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (2.10 KB, text/plain)
2021-05-23 19:46 UTC, Yann Droneaud
no flags Details
File: cpuinfo (2.75 KB, text/plain)
2021-05-23 19:46 UTC, Yann Droneaud
no flags Details
File: dnf-makecache.log (3.54 MB, text/plain)
2021-05-23 19:46 UTC, Yann Droneaud
no flags Details
File: environ (1.92 KB, text/plain)
2021-05-23 19:47 UTC, Yann Droneaud
no flags Details
File: mountinfo (2.94 KB, text/plain)
2021-05-23 19:47 UTC, Yann Droneaud
no flags Details
File: namespaces (172 bytes, text/plain)
2021-05-23 19:47 UTC, Yann Droneaud
no flags Details
File: open_fds (6.30 KB, text/plain)
2021-05-23 19:47 UTC, Yann Droneaud
no flags Details
File: _var_log_dnf.log (227.81 KB, application/octet-stream)
2021-05-23 19:47 UTC, Yann Droneaud
no flags Details

Description Yann Droneaud 2021-05-23 19:46:41 UTC
Description of problem:
After downloading broken packages:

    # dnf distro-sync
    [...]
      package firefox-88.0.1-1.fc33.x86_64 does not verify: Payload SHA256 ALT digest: BAD (Expected 9047f23bef8d4d76d2fa672403e178e0ba2aede33df1d110609b9f21fb673977 != c068a24b1ad9c98f60e4fe4172784dec2147154f0f8e6008067d923257d6575f)
      package kernel-debug-debuginfo-5.12.5-200.fc33.x86_64 does not verify: Payload SHA256 ALT digest: BAD (Expected a1eed29ad88ceb61baf5a1daeacabb3c9e86b55efcf5b81b0b5d547eb57f0bcd != fcc2f78645c573200cf5bf171255bab5f854fdbab588ee4b4f3a870d0289039e)

Version-Release number of selected component:
dnf-4.7.0-1.fc33

Additional info:
reporter:       libreport-2.14.0
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-233d1e9b-3c3d-4258-8594-50018b0bb267.scope
cmdline:        /usr/bin/python3 /usr/bin/dnf distro-sync --best
crash_function: checkSig
exception_type: ValueError
executable:     /usr/bin/dnf
interpreter:    python3-3.9.5-1.fc33.x86_64
kernel:         5.11.19-200.fc33.x86_64
runlevel:       N 5
type:           Python3
uid:            0

Truncated backtrace:
miscutils.py:90:checkSig:ValueError: Unexpected return value 'RSA/SHA256, mer. 19 mai 2021 23:27:32, Key ID 49fd77499570ff31' from hdr.sprintf when checking signature.

Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 201, in user_main
    errcode = main(args)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 67, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 106, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 130, in cli_run
    ret = resolving(cli, base)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 176, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.9/site-packages/dnf/cli/cli.py", line 238, in do_transaction
    self.gpgsigcheck(install_pkgs)
  File "/usr/lib/python3.9/site-packages/dnf/cli/cli.py", line 278, in gpgsigcheck
    result, errmsg = self._sig_check_pkg(po)
  File "/usr/lib/python3.9/site-packages/dnf/base.py", line 1297, in _sig_check_pkg
    sigresult = dnf.rpm.miscutils.checkSig(ts, po.localPkg())
  File "/usr/lib/python3.9/site-packages/dnf/rpm/miscutils.py", line 90, in checkSig
    raise ValueError('Unexpected return value %r from hdr.sprintf when checking signature.' % siginfo)
ValueError: Unexpected return value 'RSA/SHA256, mer. 19 mai 2021 23:27:32, Key ID 49fd77499570ff31' from hdr.sprintf when checking signature.

Local variables in innermost frame:
ts: <dnf.rpm.transaction.TransactionWrapper object at 0x7f550f0f3220>
package: '/var/cache/dnf/updates-testing-debuginfo-a0500649f598dc92/packages/kernel-debug-debuginfo-5.12.5-200.fc33.x86_64.rpm'
value: 4
currentflags: 986880
fdno: 70
hdr: <rpm.hdr object at 0x7f550f12c6d0>
string: '%|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|'
siginfo: 'RSA/SHA256, mer. 19 mai 2021 23:27:32, Key ID 49fd77499570ff31'

Comment 1 Yann Droneaud 2021-05-23 19:46:45 UTC
Created attachment 1786114 [details]
File: backtrace

Comment 2 Yann Droneaud 2021-05-23 19:46:46 UTC
Created attachment 1786115 [details]
File: cpuinfo

Comment 3 Yann Droneaud 2021-05-23 19:46:58 UTC
Created attachment 1786117 [details]
File: dnf-makecache.log

Comment 4 Yann Droneaud 2021-05-23 19:47:00 UTC
Created attachment 1786118 [details]
File: environ

Comment 5 Yann Droneaud 2021-05-23 19:47:01 UTC
Created attachment 1786119 [details]
File: mountinfo

Comment 6 Yann Droneaud 2021-05-23 19:47:03 UTC
Created attachment 1786120 [details]
File: namespaces

Comment 7 Yann Droneaud 2021-05-23 19:47:04 UTC
Created attachment 1786121 [details]
File: open_fds

Comment 8 Yann Droneaud 2021-05-23 19:47:06 UTC
Created attachment 1786122 [details]
File: _var_log_dnf.log

Comment 9 Yann Droneaud 2021-05-23 19:48:17 UTC
*** Bug 1963321 has been marked as a duplicate of this bug. ***

Comment 10 amatej 2021-05-25 07:24:09 UTC
Thank you for the report!

This should be fixed by PR: https://github.com/rpm-software-management/dnf/pull/1753
Here are some tests: https://github.com/rpm-software-management/ci-dnf-stack/pull/1001

Comment 11 Maciej Mrozowski 2021-05-28 17:08:25 UTC
Some packages were not downloaded. Retrying.
(1/2): mpfr-4.1.0-7.fc34.x86_64.rpm                                                                                             283 kB/s | 326 kB     00:01
(2/2): librsvg2-2.50.6-1.fc34.x86_64.rpm                                                                                        698 kB/s | 3.4 MB     00:04
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                           1.2 MB/s |  20 MB     00:17
Failed Delta RPMs increased 19.0 MB of updates to 20.4 MB (-7.1% wasted)
error: sqlite failure: CREATE TABLE IF NOT EXISTS 'Packages' (hnum INTEGER PRIMARY KEY AUTOINCREMENT,blob BLOB NOT NULL): locking protocol
error: cannot open Packages index using sqlite - No such file or directory (2)
error: cannot open Packages database in /var/lib/rpm
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 201, in user_main
    errcode = main(args)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 67, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 106, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 130, in cli_run
    ret = resolving(cli, base)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 176, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.9/site-packages/dnf/cli/cli.py", line 238, in do_transaction
    self.gpgsigcheck(install_pkgs)
  File "/usr/lib/python3.9/site-packages/dnf/cli/cli.py", line 278, in gpgsigcheck
    result, errmsg = self._sig_check_pkg(po)
  File "/usr/lib/python3.9/site-packages/dnf/base.py", line 1297, in _sig_check_pkg
    sigresult = dnf.rpm.miscutils.checkSig(ts, po.localPkg())
  File "/usr/lib/python3.9/site-packages/dnf/rpm/miscutils.py", line 90, in checkSig
    raise ValueError('Unexpected return value %r from hdr.sprintf when checking signature.' % siginfo)
ValueError: Unexpected return value 'RSA/SHA256, Wed 26 May 2021 12:59:24 PM CEST, Key ID 1161ae6945719a39' from hdr.sprintf when checking signature.

[mrozowsk@N-20L6PF1EK4MF ~]$ sudo rpm -q rpm
rpm-4.16.1.3-1.fc34.x86_64

This is Fedora 32 Cloud Base image (two times dnf system-upgrade-ed to 34) running under WSL1 so all kind of asinine nonsense is expected.
In yum.repos, just updates enabled (no testing packages).

(passing --nogpgcheck to dnf works as W/A)

Comment 12 Fedora Update System 2021-06-15 07:21:44 UTC
FEDORA-2021-78c5f8c03d has been pushed to the Fedora 35 stable repository.
If problem still persists, 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.