Bug 2283086

Summary: Roboto-Flex.ttf is missing from the package
Product: [Fedora] Fedora Reporter: bbhtt.zn0i8
Component: python-sphinxext-opengraphAssignee: Yaroslav Sidlovsky <zawertun>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 40CC: zawertun
Target Milestone: ---Keywords: Desktop
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-sphinxext-opengraph-0.9.1-2.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-02 01:21:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description bbhtt.zn0i8 2024-05-24 03:43:35 UTC
The contents of https://github.com/wpilibsuite/sphinxext-opengraph/tree/main/sphinxext/opengraph/_static are missing from the package and it prevents building projects that use this extension.

Reproducible: Always

Steps to Reproduce:
1. Install package
2. Try to build a project that utilises this extension for example https://github.com/flatpak/flatpak-docs?tab=readme-ov-file#setup-development
Actual Results:  
```
Extension error (sphinxext.opengraph):
Handler <function html_page_context at 0x7f0678717ec0> for event 'html-page-context' threw an exception (exception: [Errno 2] No such file or directory: '/usr/lib/python3.12/site-packages/sphinxext/opengraph/_static/Roboto-Flex.ttf')
make: *** [Makefile:20: html] Error 2
make: Leaving directory '/home/bbhtt/Git/github/flatpak-docs/docs'
```

Expected Results:  
It would build

Package missing components. These are packaged by ArchLinux (see package contents https://archlinux.org/packages/extra/any/python-sphinxext-opengraph/ )

Comment 1 bbhtt.zn0i8 2024-05-24 04:17:51 UTC
```
$ grep "_static/Roboto-Flex.ttf" /usr/lib/python3.12/site-packages/sphinxext/opengraph/socialcards.py
        path_font = Path(__file__).parent / "_static/Roboto-Flex.ttf"
```

Comment 2 Yaroslav Sidlovsky 2024-05-24 09:12:43 UTC
Thanks for reporting.
Fedora packaging guidelines prohibits packaging compiled TTF files.

I can patch sphinxext-opengraph to use some other similar font from the system package.
I think "Roboto Regular" fill be fine.

Comment 3 Yaroslav Sidlovsky 2024-05-24 09:27:40 UTC
Fonts embedding prohibited either: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_avoid_bundling_of_fonts_in_other_packages

Comment 4 Fedora Update System 2024-05-24 10:01:24 UTC
FEDORA-2024-d1a3e1c97f (python-sphinxext-opengraph-0.9.1-2.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-d1a3e1c97f

Comment 5 Fedora Update System 2024-05-25 01:56:24 UTC
FEDORA-2024-d1a3e1c97f has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-d1a3e1c97f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-d1a3e1c97f

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

Comment 6 Fedora Update System 2024-06-02 01:21:23 UTC
FEDORA-2024-d1a3e1c97f (python-sphinxext-opengraph-0.9.1-2.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.