Bug 1835491

Summary: DejaVu fonts issue
Product: [Fedora] Fedora Reporter: Bruno Wolff III <bruno>
Component: 0ad-dataAssignee: Bruno Wolff III <bruno>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bioinfornatics, bruno, hdegoede, igor.raits, paulo.cesar.pereira.de.andrade, walter.pete
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-05 00:34:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1806272    

Description Bruno Wolff III 2020-05-13 22:39:34 UTC
It looks like your package uses DejaVu fonts in a way that might be affected by changes to the way DejaVu fonts are packaged. As a temporary measure symlinks were added so that the old paths would still work in f32.  However, they are going to be removed in f33 and you will want to make sure your package will work there. Typically the issue does not result in obvious build errors, but rather problems will show up at run time.

One way to work around this issue is to make finding the font paths more automated at build time. This can be done using fontconfig to search for fonts installed in the build root and use the returned path to create symlinks.

So you might use something like the following to set up the build environment:

%global fonts font(dejavusans)
BuildRequires: fontconfig %{fonts}
Requires: %{fonts}

Then in the install section you might use something like the following to create the symlinks:

pushd $RPM_BUILD_ROOT
ln -f -s $(fc-match -f "%{file}" "sans") \
  $RPM_BUILD_ROOT%{_datadir}/%{name}/data/fonts/sans.ttf
popd

There is additional information in a bug convering the DevaVu change (bug 1806272) and an example fix discussed in a hedgewars bug (bug 1823360).

Comment 1 Ben Cotton 2020-08-11 13:31:01 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 2 Bruno Wolff III 2021-10-02 06:32:17 UTC
Since I'm doing stuff for the 0ad package now and was involved with dejavu fonts issue, I'm going to take a look at getting this bug resolved in rawhide.

Comment 3 Bruno Wolff III 2022-02-04 23:02:48 UTC
It looks like the package is set up to get the fonts at run time, so in theory we don't need this.
Bit it also looks like removing esising ttf files during the build is messed up as they are ending up in the package. So it might be that they thought the fonts were getting grabbed from the system packages at runtime, when they weren't.

Comment 4 Bruno Wolff III 2022-02-05 00:34:04 UTC
Testing does suggest that the package doesn't need to link into font packages. So this bug doesn't seem to apply.
There was a seperate issue of embedded fonts not being properly removed which clouds whether more really needs to be done, but initial testing seems to indicate things are OK.