FS#58125 - [fontconfig] Broken validation of xml conf files using fonts.dtd

Attached to Project: Arch Linux
Opened by Juan Simón (j1simon) - Thursday, 05 April 2018, 13:16 GMT
Last edited by Jan Alexander Steffens (heftig) - Friday, 06 April 2018, 10:31 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Jan de Groot (JGC)
Andreas Radke (AndyRTR)
Jan Alexander Steffens (heftig)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Since fontconfig 2.13.0 release, the validation of the conf files is broken:

xmllint --noout --dtdvalid fonts.dtd fonts.conf
fonts.conf:4: element fontconfig: validity error : Element fontconfig content does not follow the DTD, expecting (dir | cache | cachedir | include | config | selectfont | match | alias)*, got (its:rules description dir dir dir dir match match match include cachedir cachedir cachedir config )
fonts.conf:5: element rules: validity error : No declaration for element rules
fonts.conf:5: element rules: validity error : No declaration for attribute version of element rules
fonts.conf:5: element rules: validity error : No declaration for attribute xmlns:its of element rules
fonts.conf:6: element translateRule: validity error : No declaration for element translateRule
fonts.conf:6: element translateRule: validity error : No declaration for attribute translate of element translateRule
fonts.conf:6: element translateRule: validity error : No declaration for attribute selector of element translateRule
fonts.conf:9: element description: validity error : No declaration for element description
Document fonts.conf does not validate against fonts.dtd

This seems to prevent some applis fom starting.

See https://bbs.archlinux.org/viewtopic.php?id=235643

For other details.

The fonts.dtd files misses the new lines in the conf files:

<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>

<description>Default configuration file</description>

The dtd file needs some update to take this into account.
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Friday, 06 April 2018, 10:31 GMT
Reason for closing:  Upstream
Comment by Juan Simón (j1simon) - Thursday, 05 April 2018, 13:16 GMT
This is a copy of freedesktop bug: https://bugs.freedesktop.org/show_bug.cgi?id=105818
Comment by Juan Simón (j1simon) - Friday, 06 April 2018, 09:53 GMT
The error is produced by a bad combination for both library and config files: https://bugs.freedesktop.org/show_bug.cgi?id=105818#c4
Comment by Jan Alexander Steffens (heftig) - Friday, 06 April 2018, 10:27 GMT
No, that's a different problem.
Comment by Jan Alexander Steffens (heftig) - Friday, 06 April 2018, 10:30 GMT
Anyway, apparently the `its` elements are expected as fontconfig translates the files at runtime instead of at compile time.

Our fontconfig is fine. Google Chrome shipping an old version of fontconfig is Chrome's problem.

Loading...