Bug 2241351 - Apps depending on python-QtAwesome fail to start due to changes to fontawesome fonts
Summary: Apps depending on python-QtAwesome fail to start due to changes to fontawesom...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-QtAwesome
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jonathan Wright
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: RejectedFreezeException
Depends On:
Blocks: 2244252
TreeView+ depends on / blocked
 
Reported: 2023-09-29 13:17 UTC by TR Bentley
Modified: 2023-11-03 18:29 UTC (History)
6 users (show)

Fixed In Version: python-QtAwesome-1.2.3-4.fc40 python-QtAwesome-1.2.3-4.fc39
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-03 18:29:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description TR Bentley 2023-09-29 13:17:48 UTC
The changes for fonts in above package produce this crash in qta-browser.
○ → qta-browser
QSettings::value: Empty key passed
QSettings::value: Empty key passed
Traceback (most recent call last):
  File "/usr/bin/qta-browser", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/usr/lib/python3.12/site-packages/qtawesome/icon_browser.py", line 270, in run
    browser = IconBrowser()
              ^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/qtawesome/icon_browser.py", line 28, in __init__
    qtawesome._instance()
  File "/usr/lib/python3.12/site-packages/qtawesome/__init__.py", line 125, in _instance
    with open(ttf_filepath, "rb") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.12/site-packages/qtawesome/fonts/fontawesome4.7-webfont.ttf'

This happens in other applications using QT fonts.
The cause is this line in the SPEC file
	
ln -s %{_datadir}/fonts/fontawesome4/fontawesome-webfont.ttf \
      %{buildroot}%{python3_sitelib}/qtawesome/fonts/fontawesome4.7-webfont.ttf

when change to 
	
ln -s %{_datadir}/fonts/fontawesome/fontawesome-webfont.ttf \
      %{buildroot}%{python3_sitelib}/qtawesome/fonts/fontawesome4.7-webfont.ttf

This issue goes away but you get the following 

± |master → origin {5} ✓| → qta-browser 
QSettings::value: Empty key passed
QSettings::value: Empty key passed
Traceback (most recent call last):
  File "/usr/bin/qta-browser", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/usr/lib/python3.12/site-packages/qtawesome/icon_browser.py", line 270, in run
    browser = IconBrowser()
              ^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/qtawesome/icon_browser.py", line 28, in __init__
    qtawesome._instance()
  File "/usr/lib/python3.12/site-packages/qtawesome/__init__.py", line 128, in _instance
    raise FontError(f"Font is corrupt at: '{ttf_filepath}'")
qtawesome.iconic_font.FontError: Font is corrupt at: '/usr/lib/python3.12/site-packages/qtawesome/fonts/fontawesome5-regular-webfont.ttf'



Reproducible: Always

Steps to Reproduce:
1. install python3-QtAwesome
2. run qta-browser
3.
Actual Results:  
Full crash and program fails to work

Expected Results:  
A working application

Comment 1 Alessandro Astone 2023-10-03 19:33:45 UTC
The two issues are unrelated.
The symlink should definitely be moved: https://src.fedoraproject.org/rpms/fontawesome4-fonts/c/0ebae3a6758b67f038a8e21469771ea264a7a0e3?branch=rawhide

But then some fonts fail to load because they verify their checksum against some precomputed values: https://github.com/spyder-ide/qtawesome/blob/0bda7bf65c842b23711169d6563683b021300e13/qtawesome/__init__.py#L70
These are not bundled anymore but instead are symlinks to the fontawesome package which gets updated so the checksum may change: https://github.com/FortAwesome/Font-Awesome/commits/6.x/webfonts/fa-regular-400.ttf

Either the qtawesome package gets a patch to disable the checksum verification, or it goes back to bundling fonts

Comment 4 TR Bentley 2023-10-04 07:28:46 UTC
Works on F39 and allows bundled qta-browser and OpenLP (Package) to work again.

Comment 5 Fedora Update System 2023-10-04 08:27:18 UTC
FEDORA-2023-c433d4bccf has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-c433d4bccf

Comment 6 Sandro 2023-10-04 08:45:35 UTC
The issue is due to `fontawesome-fonts` having been updated to 6.4.2 in rawhide and f39. Older branches are still on 4.7.0.

I merged the PR as a quick fix. Thanks Alessandro! We can have a look later if we want to solve this differently. I saw that `python-QtAwesome` does not depend on `fontawesome-fonts`. So, maintainers of that package were probably not aware.

Anyway, we are in freeze now. Proposing this as a FE. But I doubt they'll take it. In which case, please update directly from testing or wait until the freeze is lifted.

Comment 7 Fedora Update System 2023-10-04 08:46:18 UTC
FEDORA-2023-c433d4bccf has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 TR Bentley 2023-10-04 08:48:23 UTC
(In reply to Sandro from comment #6)
> The issue is due to `fontawesome-fonts` having been updated to 6.4.2 in
> rawhide and f39. Older branches are still on 4.7.0.
> 
> I merged the PR as a quick fix. Thanks Alessandro! We can have a look later
> if we want to solve this differently. I saw that `python-QtAwesome` does not
> depend on `fontawesome-fonts`. So, maintainers of that package were probably
> not aware.
> 
> Anyway, we are in freeze now. Proposing this as a FE. But I doubt they'll
> take it. In which case, please update directly from testing or wait until
> the freeze is lifted.

One mitigation is that the OpenLP package is totally broken due the this issue.
This fix allows the application to work again.

Comment 9 Sandro 2023-10-04 08:50:06 UTC
Reopening for FE proposal.

Comment 10 Fedora Blocker Bugs Application 2023-10-04 08:50:24 UTC
Proposed as a Freeze Exception for 39-final by Fedora user gui1ty using the blocker tracking app because:

 The update of `fontawesome-fonts` broke `qta-browser`. This fixes it. It's a minor change. No impact on other packages.

Comment 11 Alessandro Astone 2023-10-04 08:55:01 UTC
This is not a FE unless these packages are included in a release-blocking deliverable.
When upgrading from F38 you'll get the updated version, and when installing fresh from F39 you'll also get the updated version.

Comment 12 Sandro 2023-10-04 08:59:51 UTC
(In reply to Alessandro Astone from comment #11)
> This is not a FE unless these packages are included in a release-blocking
> deliverable.
> When upgrading from F38 you'll get the updated version, and when installing
> fresh from F39 you'll also get the updated version.

Yeah. You are right. But using the beta release you would be running into this, right? Anyway, since it has already been submitted, I'll let it proceed.

Comment 13 Sandro 2023-10-04 09:36:57 UTC
(In reply to Fedora Blocker Bugs Application from comment #10)
>  The update of `fontawesome-fonts` broke `qta-browser`. This fixes it. It's
> a minor change. No impact on other packages.

Actually, two packages depend on it:

$ fedrq wr -s python3-QtAwesome
NiaAML-GUI-0.1.13-6.fc39.src
spyder-5.4.5-23.fc40.src

I haven't checked to what extend these packages are affected.

Comment 14 TR Bentley 2023-10-04 09:55:12 UTC
Also, OpenLP-3.0.2-1.fc39 is broken without this fix.

Comment 15 Sandro 2023-10-04 10:59:51 UTC
(In reply to TR Bentley from comment #14)
> Also, OpenLP-3.0.2-1.fc39 is broken without this fix.

Indeed.

$ fedrq wr python3-QtAwesome
NiaAML-GUI-0.1.13-6.fc39.noarch
NiaAML-GUI-0.1.13-6.fc39.src
OpenLP-3.0.2-3.fc39.noarch
python3-spyder-5.4.5-23.fc40.noarch
spyder-5.4.5-23.fc40.src

Comment 16 Adam Williamson 2023-10-04 15:43:25 UTC
"But using the beta release you would be running into this, right?"

No, because you should have updates-testing enabled by default (this is the default configuration for pre-releases until shortly before release).

Comment 17 Adam Williamson 2023-10-04 15:46:53 UTC
BTW, I do not love the "fix" here. It clearly violates a packaging guideline - https://docs.fedoraproject.org/en-US/packaging-guidelines/#_avoid_bundling_of_fonts_in_other_packages :

"Avoid Bundling of Fonts in Other Packages

Fonts in general-purpose formats such as Type1, OpenType TT (TTF) or OpenType CFF (OTF) are subject to specific packaging guidelines (Packaging/FontsPolicy), and should always be packaged in the system-wide font repositories instead of private application directories. For more information, see: Packaging/FontsPolicy."

If the problem is incompatibility between the app and FontAwesome 6, would it not be better to just tweak it to use fontawesome4-fonts instead? https://src.fedoraproject.org/rpms/fontawesome4-fonts

Comment 18 Adam Williamson 2023-10-04 15:48:33 UTC
Oh, never mind, I think I read the PR backwards.

Comment 19 Geoffrey Marr 2023-10-09 18:01:18 UTC
Discussed during the 2023-10-09 blocker review meeting: [0]

The decision to classify this bug as a "RejectedFreezeException (Final)" was made as there is no clear rationale for breaking the freeze to fix this. It can just be a 0-day update.

[0] https://meetbot.fedoraproject.org/fedora-blocker-review/2023-10-09/f39-blocker-review.2023-10-09-16.00.txt

Comment 20 Fedora Update System 2023-10-15 08:41:28 UTC
FEDORA-2023-d62861b776 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-d62861b776

Comment 21 Fedora Update System 2023-11-03 18:29:19 UTC
FEDORA-2023-d62861b776 has been pushed to the Fedora 39 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.