<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>34032</bug_id>
          
          <creation_ts>2017-10-19 17:19:46 +0300</creation_ts>
          <short_desc>lcdtest: fatal error: can&apos;t open font</short_desc>
          <delta_ts>2017-10-20 18:52:44 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>lcdtest</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrew Savchenko">bircoph</reporter>
          <assigned_to name="Vitaly Lipatov">lav</assigned_to>
          <cc>lav</cc>
    
    <cc>mike</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>166406</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew Savchenko">bircoph</who>
    <bug_when>2017-10-19 17:19:46 +0300</bug_when>
    <thetext>After lcdtest installation:

$ lcdtest
fatal error: can&apos;t open font

$ strace -e file lcdtest
[...]
open(&quot;/usr/share/fonts/liberation/LiberationMono-Regular.ttf&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)

As can be seen from the above, lcdtest tries to read from /usr/share/fonts/liberation, while fonts-ttf-liberation package puts it into /usr/share/fonts/ttf/liberation:

$ rpm -ql fonts-ttf-liberation | grep Mono-Regular
/usr/share/fonts/ttf/liberation/LiberationMono-Regular.ttf

lcdtest has hardcoded font path in the lcdtest.c:

lcdtest.c:745:
const char font_path [] = &quot;/usr/share/fonts/liberation/LiberationMono-Regular.ttf&quot;;

This should be fixed. At the very least it should use correct path, preferably it should use some ttf font path finder.

(As a temporary workaround symlink liberation -&gt; ttf/liberation in the /usr/share/fonts was created.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166422</commentid>
    <comment_count>1</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2017-10-20 18:47:53 +0300</bug_when>
    <thetext>Сделал исправление, после этого проверяю:
$ strings /usr/bin/lcdtest | grep fonts | xargs ls -l
-rw-r--r-- 1 rooter rooter 313408 Nov  9  2015 /usr/share/fonts/ttf/liberation/LiberationMono-Regular.ttf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166423</commentid>
    <comment_count>2</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2017-10-20 18:52:44 +0300</bug_when>
    <thetext>lcdtest-1.18-alt2 -&gt; sisyphus:

Fri Oct 20 2017 Vitaly Lipatov &lt;lav@altlinux.ru&gt; 1.18-alt2
- fix path to Liberation font and require package with it (ALT bug 34032)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>