Bug 1900902 - yubikey-manager crashes due to missing qt5-qtquickcontrols dependency
Summary: yubikey-manager crashes due to missing qt5-qtquickcontrols dependency
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yubikey-manager-qt
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-23 23:30 UTC by Stephen Benjamin
Modified: 2020-12-04 19:51 UTC (History)
3 users (show)

Fixed In Version: yubikey-manager-qt-1.1.5-3.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-04 19:51:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Stephen Benjamin 2020-11-23 23:30:22 UTC
Description of problem:

$ ykman-gui
QSocketNotifier: Can only be used with threads started with QThread
QQmlApplicationEngine failed to load component
qrc:/qml/main.qml:30:13: Type Header unavailable
qrc:/qml/Header.qml:4:1: module "QtQuick.Dialogs" is not installed
[1]    9221 segmentation fault (core dumped)  ykman-gui


Version-Release number of selected component (if applicable):

yubikey-manager-qt-1.1.5-2.fc33.x86_64

How reproducible:

Always, for me

Steps to Reproduce:
1. Install ykman-gui on stock Fedora 33

Actual results:

Crashes

Expected results:

Doesn't crash

Additional info:

Seems to be missing a dependency on qt5-qtquickcontrols

Comment 1 Stephen Benjamin 2020-11-23 23:35:02 UTC
Looking at the spec, I'd expect to see more dependencies... 

https://src.fedoraproject.org/rpms/yubikey-manager-qt/blob/master/f/yubikey-manager-qt.spec

It probably needs at least python3-yubikey-manager and qt5-controls to work, no? They're listed as BuildRequires but not Requires.

Comment 2 Gerald Cox 2020-11-24 02:30:28 UTC
(In reply to Stephen Benjamin from comment #1)
> Looking at the spec, I'd expect to see more dependencies... 
> 
> https://src.fedoraproject.org/rpms/yubikey-manager-qt/blob/master/f/yubikey-
> manager-qt.spec
> 
> It probably needs at least python3-yubikey-manager and qt5-controls to work,
> no? They're listed as BuildRequires but not Requires.

Buildrequires implies requires for runtime, you don't specify them twice.

Check to see if you have this:
rpm -qa | grep yubikey-manager
yubikey-manager-3.1.1-3.git87dd1d8.fc33.noarch
python3-yubikey-manager-3.1.1-3.git87dd1d8.fc33.noarch
yubikey-manager-qt-1.1.5-2.fc33.x86_64

Comment 3 Stephen Benjamin 2020-11-24 12:44:08 UTC
> Buildrequires implies requires for runtime, you don't specify them twice.

That is not true. BuildRequires is only installed when the package is being built, for example in a package that's written in C and using Make, you would include BuildRequires: gcc make. The final installed package doesn't require a compiler.

Runtime requires are specified separately as Required. This spec file is incorrect.

You can read more about the preamble items at https://rpm-packaging-guide.github.io, for example:

> Next up we have BuildRequires and Requires, each of which define something that is required by the package. However, BuildRequires is to tell rpmbuild what is needed by your package at build time and Requires is what is needed by your package at run time.

If you look at my DNF transaction history:


> Transaction ID : 43
> Begin time     : Mon 23 Nov 2020 01:41:46 PM EST
> Begin rpmdb    : 2170:d445bff7daee458b5d5464c28ef268fd8efa7d67
> End time       : Mon 23 Nov 2020 01:41:48 PM EST (2 seconds)
> End rpmdb      : 2174:7bab36ba78d76ad32ed918abe8628f528411226f
> User           : Stephen Benjamin <stbenjam>
> Return-Code    : Success
> Releasever     : 33
> Command Line   : install yubikey-manager-qt.x86_64
> Comment        : 
> Packages Altered:
>     Install yubikey-manager-qt-1.1.5-2.fc33.x86_64      @updates
>     Install pyotherside-1.5.9-6.fc33.x86_64             @fedora
>     Install qt5-qtgraphicaleffects-5.15.1-1.fc33.x86_64 @fedora
>     Install qt5-qtquickcontrols2-5.15.1-1.fc33.x86_64   @fedora


You can see it didn't pull in qt5-quickcontrols, only quickcontrols2 which came in as a requirement under pyotherside.

If you also run `dnf deplist yubikey-manager-qt`, you will easily see the missing dependencies.

Comment 4 Jakub Jelen 2020-11-24 13:32:56 UTC
It looks like the requirements on this were not correctly derived during the build process (while it was for the rest of the packages)

I just tried removing python3-yubikey-manager package and yubikey-manager-qt still starts fine so it looks like that one is not needed.

Is there some other dependency missing or is adding the following line enough?

+Requires:      qt5-qtquickcontrols2

Comment 5 Stephen Benjamin 2020-11-24 13:40:08 UTC
> Is there some other dependency missing or is adding the following line enough?
> +Requires:      qt5-qtquickcontrols2

I think so. That's all I needed to install to make it work, although I already had the CLI ykman installed.

Comment 6 Stephen Benjamin 2020-11-24 13:40:56 UTC
Wait, sorry: it's not quickcontrols2, it needs to be qt5-qtquickcontrols. Not sure about the difference but the "2" package was already brought in by pyotherside.

+Requires:      qt5-qtquickcontrols

Comment 7 Jakub Jelen 2020-11-24 14:03:12 UTC
thanks for checking. Will update soon.

Comment 8 Fedora Update System 2020-11-24 14:14:19 UTC
FEDORA-2020-996ae442af has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-996ae442af

Comment 9 Gerald Cox 2020-11-24 21:54:49 UTC
(In reply to Stephen Benjamin from comment #3)
> > Buildrequires implies requires for runtime, you don't specify them twice.
> 
> That is not true. BuildRequires is only installed when the package is being
> built, for example in a package that's written in C and using Make, you
> would include BuildRequires: gcc make. The final installed package doesn't
> require a compiler.
> 
> Runtime requires are specified separately as Required. This spec file is
> incorrect.
> 
> You can read more about the preamble items at
> https://rpm-packaging-guide.github.io, for example:
> 
> > Next up we have BuildRequires and Requires, each of which define something that is required by the package. However, BuildRequires is to tell rpmbuild what is needed by your package at build 

Well, I didn't have an issue on my system.  RPM is suppose to have the intelligence to figure out runtime requirements.
Read here:  https://docs.fedoraproject.org/en-US/packaging-guidelines/

When you start specifying explicit requires you may run into a situation where 
packages start to be inadvertently deleted when another is removed - which
is extremely annoying.  

I'm just trying to understand why this happened to you.

Comment 10 Stephen Benjamin 2020-11-24 22:13:08 UTC
> I'm just trying to understand why this happened to you.

This didn't "happen to me" -- it is fully reproducible on a clean Fedora 33 system. If you were using a KDE spin of Fedora, or for some other reason had the Qt quickcontrols2 library installed, you would not have run into this problem.

I do not have enough Qt experience to tell you *why* rpmbuild's dynamic dependency detection didn't work, but it didn't, and in those cases a manual Requires is the correct solution until you figure out why.

Comment 11 Gerald Cox 2020-11-24 22:30:29 UTC
(In reply to Stephen Benjamin from comment #10)
> > I'm just trying to understand why this happened to you.
> 
> This didn't "happen to me" -- it is fully reproducible on a clean Fedora 33
> system. If you were using a KDE spin of Fedora, or for some other reason had
> the Qt quickcontrols2 library installed, you would not have run into this
> problem.
> 
> I do not have enough Qt experience to tell you *why* rpmbuild's dynamic
> dependency detection didn't work, but it didn't, and in those cases a manual
> Requires is the correct solution until you figure out why.

No need to get defensive.  I was just curious about this particular situation.  Probably 
the reason it surfaced with you was you didn't have yubioath-desktop installed.

Comment 12 Fedora Update System 2020-11-25 02:11:55 UTC
FEDORA-2020-996ae442af has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-996ae442af`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-996ae442af

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2020-12-04 19:51:38 UTC
FEDORA-2020-996ae442af has been pushed to the Fedora 33 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.