Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNF broken after upgrading DNF #123

Closed
xasx opened this issue May 29, 2021 · 5 comments
Closed

DNF broken after upgrading DNF #123

xasx opened this issue May 29, 2021 · 5 comments

Comments

@xasx
Copy link

xasx commented May 29, 2021

Describe the bug
After upgrading DNF to the latest version in an existing installation or a completely new installation, DNF is broken and you cannot install any new packages anymore.

To Reproduce
Steps to reproduce the behavior:

  1. Install fedora remix for wsl from the release page
  2. Upgrade dnf via dnf upgrade dnf
  3. Upgrade the remaining packages via dnf upgrade
  4. See error

Expected behavior
DNF can be run without any problems to update packages.

Screenshots/logs

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/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, Sun 31 Jan 2021 05:41:17 AM CET, Key ID 1161ae6945719a39' from hdr.sprintf when checking signature.

The complete console output of a fresh installation with the above sequence of steps is attached here:
dnf-upgrade-dnf.txt

Additional context

  • quay.io/fedora/fedora:34-x86_64 running in k8s does not have this issue
  • I have to stick to WSL1 on this machine, due to networking issues under WSL2 effectively preventing any network access altogether (on a corporate laptop)

Basic Troubleshooting Checklist

[x] I have searched Google for the error message.
[ ] I have checked official WSL troubleshooting documentation: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#confirm-wsl-is-enabled.
[ ] I have searched the official Microsoft WSL issues page: https://github.com/Microsoft/WSL/issues.
[x] I have searched the WLinux issues page: https://github.com/WhitewaterFoundry/WLinux/issues.
[x] I have reset WLinux: Settings->Apps->Apps & features->WLinux->Advanced Options->Reset.
[ ] I have disabled and re-enabled WSL in Windows Features.
[ ] I have run Windows 10 updates and restarted.

What other troubleshooting have you attempted?

  • rpm --rebuilddb
  • fresh install
  • isolated package by step-by-step upgrading

WLinux Version

34.4.3.0

Windows Build

(de)
Betriebssystemname: Microsoft Windows 10 Pro
Betriebssystemversion: 10.0.19042 Nicht zutreffend Build 19042
Betriebssystemhersteller: Microsoft Corporation
Betriebssystemkonfiguration: Mitglied der Domäne/Arbeitsgruppe
Typ des Betriebssystembuilds: Multiprocessor Free

@crramirez
Copy link
Contributor

crramirez commented May 29, 2021

Hello @xasx ,

Please run the upgrade.sh script to solve the issue.

Regards,
Carlos

@xasx
Copy link
Author

xasx commented May 29, 2021

Gracias @crramirez, that did it.

I am curious: which part of the script is responsible for fixing the issue?

@crramirez
Copy link
Contributor

crramirez commented May 29, 2021

The part around gpgcheck=0. I don't know exactly what changed but looks like the dnf update is using an unsupported function in the WSL1 kernel. You can see also in the script that the fix only applies to WSL1.

We recommend that you always use upgrade.sh instead of dnf update. Because we include fixes and improvement in this script.

Happy that this solved your issue. Next week we will release a new image with this fix included.

Regards,
Carlos

@xasx
Copy link
Author

xasx commented May 29, 2021

Just found that too, after adding external repos.

Thx for your support.

@xasx xasx closed this as completed May 29, 2021
@crramirez
Copy link
Contributor

Hello @xasx ,

We made a release with this fix built in: https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/releases/tag/34.5.6

Regards,
Carlos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants