Bug 170852 - [PATCH] x11-fonts/encodings: encodings.dir includes bogus entries
Summary: [PATCH] x11-fonts/encodings: encodings.dir includes bogus entries
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-22 05:00 UTC by hiroto.kagotani
Modified: 2018-01-12 10:55 UTC (History)
6 users (show)

See Also:


Attachments
encodings-1.0.4,1.patch (1.39 KB, patch)
2012-08-22 05:00 UTC, hiroto.kagotani
no flags Details | Diff
Regenerate encodings.dir post-install (500 bytes, patch)
2015-07-04 15:21 UTC, Jia-Shiun Li
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hiroto.kagotani 2012-08-22 05:00:22 UTC
This is closely related to my comments on PR ports/170108.

Since only *.enc.gz files are installed while the encodings.dir file is
genareted for directories containing both *.enc and *.enc.gz files,
the installed encodings.dir file includes bogus entries for *.enc.
It causes libfontenc to fail to find encoding files, then X to fail to
open TrueType fonts with some encodings such as ascii-0 or jisx0208.1990-0.

Added file(s):
- files/patch-Makefile.in
- files/patch-large__Makefile.in

Port maintainer (x11@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: suffix)

How-To-Repeat: Just install x11-fonts/encodings.
/usr/local/lib/X11/fonts/encodings/encodings.dir file includes entries
for *.enc files, which are not installed in that directory.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-08-22 05:00:32 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-x11

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Carlo Strub freebsd_committer freebsd_triage 2014-08-29 22:06:52 UTC
back to pool
Comment 3 Hiroki Sato freebsd_committer freebsd_triage 2014-08-30 06:35:40 UTC
Take.
Comment 4 Niclas Zeising freebsd_committer freebsd_triage 2014-08-30 07:34:50 UTC
Force this back to x11 team.  This is x11 land and interdependencies and similar stuff is quite hairy.
Comment 5 Jia-Shiun Li 2015-07-04 15:21:04 UTC
Created attachment 158337 [details]
Regenerate encodings.dir post-install

Anyone still working on this? Because this affects primarily non-English non-unicode, mostly legacy applications.

I use similar (incomplete, attached) patch that basically does the same thing - generate encodings.dir without non-compressed files listed.

Last time I peeked Ubuntu seems to have done the same fix.


For easier reproducing and verifying this bug, this is what I do:

=== Original:
jsli@rpi2:~ % luit -v -encoding big5
G0 is ASCII, G1 is Unknown (94), G2 is Unknown (94), G3 is Unknown (94).
GL is G0, GR is G1.
jsli@rpi2:~ % exit

=== Modified:
jsli@rpi2:~ % luit -v -encoding big5
G0 is ASCII, G1 is Big 5, G2 is Unknown (94), G3 is Unknown (94).
GL is G0, GR is G1.
jsli@rpi2:~ % exit
Comment 6 Hiroki Sato freebsd_committer freebsd_triage 2015-07-06 18:30:27 UTC
I have had this problem for a long time.  I tried to take this PR a year ago but it was cancelled forcibly by freebsd-x11@ team.  Is anyone working on this?
Comment 7 Baptiste Daroussin freebsd_committer freebsd_triage 2015-07-06 22:42:13 UTC
with my x11@ hat I would be really happy if you do work on it.

For sure x11@ will like to review any patch before it hits the tree, but I think we lack resources to work on this issue, so glad to see you volunteering :)
Comment 8 Jia-Shiun Li 2015-07-16 10:37:08 UTC
Is there any additional tests (against x11) need to be done to commit Sato san's patch? On my system except xorg-fonts-* only pango directly depends on it. Quick grep over /usr/ports reveals qt{4,5}-gui additionally. And xorg primarily uses it via libfontenc.

Being a user of encodings.dir, libfontenc fails at the first non-existing entry like OP found. I cannot think of any cases this patch will make current state worse.
Comment 9 Jia-Shiun Li 2017-05-20 12:41:19 UTC
PING.

Any more testing or other things required to get this committed?

For some reason I need this patch again and am surprised to see this still hanging here. Who should I poke?
Comment 10 Walter Schwarzenfeld freebsd_triage 2018-01-12 03:24:40 UTC
Still no reply or feedback from maintainer. Maintainer timeout?
Comment 11 Walter Schwarzenfeld freebsd_triage 2018-01-12 03:29:27 UTC
Patch still applies clean.
Comment 12 commit-hook freebsd_committer freebsd_triage 2018-01-12 09:16:29 UTC
A commit references this bug:

Author: pi
Date: Fri Jan 12 09:16:20 UTC 2018
New revision: 458811
URL: https://svnweb.freebsd.org/changeset/ports/458811

Log:
  x11-fonts/encodings: run mkfontscale to fix encodings.dir post-install

  - Since only *.enc.gz files are installed while the encodings.dir file is
    genareted for directories containing both *.enc and *.enc.gz files,
    the installed encodings.dir file includes bogus entries for *.enc.
  - It causes libfontenc to fail to find encoding files, then X to fail to
    open TrueType fonts with some encodings such as ascii-0 or jisx0208.1990-0.

  PR:		170852
  Submitted by:	hiroto.kagotani@gmail.com, Jia-Shiun Li <jiashiun@gmail.com>

Changes:
  head/x11-fonts/encodings/Makefile
  head/x11-fonts/encodings/pkg-descr
Comment 13 Kurt Jaeger freebsd_committer freebsd_triage 2018-01-12 09:16:58 UTC
Committed, thanks.
Comment 14 commit-hook freebsd_committer freebsd_triage 2018-01-12 09:31:44 UTC
A commit references this bug:

Author: pi
Date: Fri Jan 12 09:30:42 UTC 2018
New revision: 458812
URL: https://svnweb.freebsd.org/changeset/ports/458812

Log:
  x11-fonts/encodings: expect $PATH to work, use ${PREFIX} instead of hardcoded /usr/local

  PR:		170852
  Submitted by:	bapt

Changes:
  head/x11-fonts/encodings/Makefile
Comment 15 commit-hook freebsd_committer freebsd_triage 2018-01-12 10:55:56 UTC
A commit references this bug:

Author: pi
Date: Fri Jan 12 10:55:33 UTC 2018
New revision: 458816
URL: https://svnweb.freebsd.org/changeset/ports/458816

Log:
  x11-fonts/encodings: one more /usr/local replaced by $PREFIX

  PR:		170852
  Submitted by:	remko

Changes:
  head/x11-fonts/encodings/Makefile