Date: Wed, 02 Nov 2022 14:34:32 +0000 From: bugzilla-noreply@freebsd.org To: desktop@FreeBSD.org Subject: [Bug 258372] x11-fonts/fontconfig: cannot install as user (into non-default prefix) Message-ID: <bug-258372-39348-INWiPp4Yp4@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-258372-39348@https.bugs.freebsd.org/bugzilla/> References: <bug-258372-39348@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258372 --- Comment #2 from John Hein <jcfyecrayz@liamekaens.com> --- I just tried 'make -C x11-fonts/fontconfig INSTALL_AS_USER=3D1 LOCALBASE=3D/usr/local.user PKG_DBDIR=3D/usr/local.user/var/db/pkg PORT_DBDIR=3D/usr/local.user/var/db/ports install' as a non-root user. Thi= s is with pkg-1.18.4. I did not get 'Fail to create /var/db/fontconfig:Permissi= on denied'. 'deinstall' does produce 'pkg-static: unlinkat(var/db/fontconfig): Permissi= on denied', but that is not fatal - it does remove the installed package and d= oes return a exit code of 0 (indicating alleged success). That might be consid= ered 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=3D1 (especially if it failed to fully = remove the package), then this current bug could become 'cannot deinstall as user'= .=20 That is a different bug than this one, however. I did notice that src/fccfg.c still points into a hard-coded /usr/local eve= n 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%%, a= nd 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 chan= ged 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 th= an 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? --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-258372-39348-INWiPp4Yp4>