[Bug 258372] x11-fonts/fontconfig: cannot install as user (into non-default prefix)
Date: Wed, 02 Nov 2022 14:34:32 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258372 --- Comment #2 from John Hein <jcfyecrayz@liamekaens.com> --- I just tried 'make -C x11-fonts/fontconfig INSTALL_AS_USER=1 LOCALBASE=/usr/local.user PKG_DBDIR=/usr/local.user/var/db/pkg PORT_DBDIR=/usr/local.user/var/db/ports install' as a non-root user. This is with pkg-1.18.4. I did not get 'Fail to create /var/db/fontconfig:Permission denied'. 'deinstall' does produce 'pkg-static: unlinkat(var/db/fontconfig): Permission denied', but that is not fatal - it does remove the installed package and does return a exit code of 0 (indicating alleged success). That might be considered a bug in pkg. It seems pkg_delete.c does not treat EPERM as an error. But in that case (not treating a failed directory removal as an error) could be reported as a separate bug for pkg perhaps. If 'pkg delete' DID fail when doing deinstall with INSTALL_AS_USER=1 (especially if it failed to fully remove the package), then this current bug could become 'cannot deinstall as user'. That is a different bug than this one, however. I did notice that src/fccfg.c still points into a hard-coded /usr/local even if you define LOCALBASE (and/or PREFIX) to something that is not /usr/local. But that is a separate bug - it should replace /usr/local with %%LOCALBASE%%, and for that matter, files/fontconfig.ucl.in should use %%LOCALBASE%% instead of %%PREFIX%% for the 'path' that looks in share/fonts and etc/fonts/conf.d. So, it seems to me that the original problem reported here is not a problem now, or at least I could not reproduce the failure. I don't know what changed between now and when this problem was reported. In Sep 2021 (the latest pkg was 1.17.1 then), I think pkg did not treat @dir entries any differently than it does now - i.e., @dir is only used when the package is deleted, per pkg-create(8). Gerald, can you confirm whether or not your failure can be reproduced now? -- You are receiving this mail because: You are the assignee for the bug.