[Bug 258372] x11-fonts/fontconfig: cannot install as user (into non-default prefix)

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 29 Jan 2023 04:35:10 UTC

--- Comment #9 from John Hein <jcfyecrayz@liamekaens.com> ---
(In reply to Tatsuki Makino from comment #8)
> mv /var/db/fontconfig{,.orig}
> fc-cache --force --system-only --verbose
>   .
>   .
> It seems that /var/db/fontconfig is not hard-coded
>   .
>   .
> Let's see, that means we don't need to create /var/db/fontconfig when we install > fontconfig, do we? :)

Tatsuki, this bug is all about how installing fontconfig without being root can
fail.  If you do your 'mv /var/db/fontconfig{,.orig}' without your 'fc-cache',
then do 'make INSTALL_AS_USER=1 LOCALBASE=... install', then you get the error.

And INSTALL_AS_USER is all about doing builds without having to be root.

/var/db/fontconfig is definitely hard-coded as the '@dir /var/db/fontconfig'
line in pkg-plist.

Yes, you could create /var/db/fontconfig ahead of time (either with mkdir or by
running fc-cache).  But if you don't, then the install will try to create it
(due to the @dir entry).  Assuming /var/db is owned by root (as it is by
default), then you get the Permission denied failure as shown in comment 0.

There are various options to work around that error.  One of them is the option
you are talking about - namely to create /var/db/fontconfig ahead of time. 
That is not a fix for this particular INSTALL_AS_USER problem.  It's a hack. 
You won't know about that failure until you try to do the install with
INSTALL_AS_USER and hit the error.  'make install INSTALL_AS_USER=1 ...' should
work without having to do something else like creating /var/db/fontconfig

You are receiving this mail because:
You are the assignee for the bug.