Summary: | x11-fonts/fontconfig update to 2.13.93 breaks building as non-root | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Piotr Smyrak <ps.ports> | ||||||||||||
Component: | Individual Port(s) | Assignee: | freebsd-desktop (Team) <desktop> | ||||||||||||
Status: | Closed FIXED | ||||||||||||||
Severity: | Affects Some People | CC: | diizzy, gerald, jcfyecrayz | ||||||||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(desktop) ps.ports: maintainer-feedback? |
||||||||||||
Version: | Latest | ||||||||||||||
Hardware: | Any | ||||||||||||||
OS: | Any | ||||||||||||||
Attachments: |
|
This is still a problem with 2.13.94 Obviously, 'make stage' should not be running 'fc-cache' on files in /usr/local (and fc-cache/meson.build tries to do this). I mentioned this in bug 257119. Committer CC'd. Hi, Just to confirm, commenting out https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/main/fc-cache/meson.build#L11 resolves the issue? That seems to have been the previous workaround looking at https://cgit.freebsd.org/ports/tree/x11-fonts/fontconfig/files/patch-Makefile.in?id=475b88f2899abefb323e1ebf44db4590d08a4ac7 Sorry for not noticing this bug report earlier. Best regards, Daniel (In reply to Daniel Engberg from comment #3) Indeed. The suggested change to fc-cache/meson.build got this through. Created attachment 227303 [details]
Patch for fontconfig
Fix generation of cache
Comment on attachment 224004 [details]
Reproducible failure log
Use SUB_ functions instead manually invoking sed (thanks tcberner@)
Created attachment 227305 [details]
Patch for fontconfig v2
Created attachment 227307 [details]
[patch] add option to disable running fc-cache
Here's the patch I came up with (meant to send this a couple days ago). This can be upstreamed.
Verified with poudriere (used testport -i to manually run 'make stage' in the jail with a regular user account).
QA:
- testport (ok)
- portlint (ok, no new warnings)
(In reply to John Hein from comment #8) Upstream issue: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/296 Created attachment 227310 [details]
[patch] add option to disable running fc-cache (v2)
In my previous patch, I forgot to remove pkg-install.in, made unnecessary by this patch (use pkg-plist instead).
Comment on attachment 227310 [details]
[patch] add option to disable running fc-cache (v2)
Interestingly this has not triggered for me, building as a regular user.
Alas there is another problem (which has been there for longer):
@dir /var/db/fontconfig
in pkg-plist. This ignore $PREFIX and also breaks building as user.
In any case, thank you for addressing the fc-cache issue and working
this upstream!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=1215cfdc188e71f377e4274a7525f4afc2315ba8 commit 1215cfdc188e71f377e4274a7525f4afc2315ba8 Author: Daniel Engberg <diizzy@FreeBSD.org> AuthorDate: 2021-09-06 17:54:36 +0000 Commit: Daniel Engberg <diizzy@FreeBSD.org> CommitDate: 2021-09-06 18:05:09 +0000 x11-fonts/fontconfig: Restore generation of font cache Restore generation of cache prior to Meson switch Upstream patch provided by John Hein PR: 254963 Reported by: Piotr Smyrak Tested by: Piotr Smyrak and John Hein Approved by: arrowd (mentor) Obtained from: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/296 Differential Revision: https://reviews.freebsd.org/D31602 x11-fonts/fontconfig/Makefile | 4 +++- x11-fonts/fontconfig/files/patch-fc-cache_meson.build (new) | 10 ++++++++++ x11-fonts/fontconfig/files/patch-meson__options.txt (new) | 8 ++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) Thanks everyone for reporting and debugging this issue (In reply to Daniel Engberg from comment #13) I don't think the SUB_FILES & SUB_LIST additions were needed, right? (In reply to John Hein from comment #14) They are as only the patch you submitted upstream is in repo (In reply to Daniel Engberg from comment #15) Ah... I didn't notice you didn't use my full patch which included removal of pkg-install.in in favor of @postexec in pkg-plist. I still carry that change locally, and the SUB_* settings in Makefile are not needed. (In reply to Gerald Pfeifer from comment #11) > Alas there is another problem (which has been there for longer): > > @dir /var/db/fontconfig > > in pkg-plist. This ignore $PREFIX and also breaks building as user. I filed a separate issue for this in bug #258372. |
Created attachment 224004 [details] Reproducible failure log The changes of 253212 seem to prevent the port from being buildable as non-root user. See attached log for a reproducible build failure as a non privileged user.