Summary: | app-editors/neovim-8.0.0: sandbox violation when XDG_STATE_HOME is set, combined with other XDG_* vars (* ACCESS DENIED: mkdir: /home/sicro/.local/state) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | ignamartinoli |
Component: | Current packages | Assignee: | Vim Maintainers <vim> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gyakovlev, rust, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=753764 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge neovim
emerge --info env |
Description
ignamartinoli
2022-10-01 06:54:27 UTC
Created attachment 814909 [details]
emerge --info
Created attachment 814912 [details]
env
Thanks! I can reproduce if I export: ``` export XDG_DATA_HOME=/home/sicro/.local/share export XDG_CACHE_HOME=/home/sicro/.cache export XDG_CONFIG_HOME=/home/sicro/.config export XDG_STATE_HOME=/home/sicro/.local/state ``` even with my fix from earlier: commit 737b23a0af4224a9d02d23ede7f41ab6dbd97319 Author: Sam James <sam@gentoo.org> Date: Sat Oct 1 07:32:31 2022 +0100 app-editors/neovim: fix respecting CFLAGS; try avoid sandbox violation - RelWithDebInfo sets -Og -g after our flags. (Made a local hook for now to try catch these in future, along with -ffast-math, although that wasn't being set here.) - Use xdg_environment_reset to try avoid sandbox issues (see https://forums.gentoo.org/viewtopic-p-8750050.html). Also sent a patch to gentoo-dev ML for adding XDG_STATE_HOME to the unset/reset list for the eclass. Signed-off-by: Sam James <sam@gentoo.org> The patch I proposed on gentoo-dev ML works: https://archives.gentoo.org/gentoo-dev/message/037169c03916ba5f07f9d9c8b56a7b76. Hey Sam I had a related problem caused by XDG compatibily when I tried to update dev-lang/rust. I reported it here: https://forums.gentoo.org/viewtopic-t-1156684-highlight-.html (In reply to ignamartinoli from comment #5) > Hey Sam > > I had a related problem caused by XDG compatibily when I tried to update > dev-lang/rust. I reported it here: > https://forums.gentoo.org/viewtopic-t-1156684-highlight-.html Hey! grknight is right there, but on the other hand, we have these mechanisms like ENV_UNSET for a reason, so we may as well use them ;) Now, CARGO_HOME is interesting and it's actually already fixed in a way but not for librsvg, because it still uses EAPI 6, and ENV_UNSET is only supported for EAPI 7+. Also, do you know if we need to unset RUSTUP_HOME? Could you try unsetting CARGO_HOME but keep RUSTUP_HOME set, and see if librsvg breaks? I can confirm: is possible to emerge gnome-base/librsvg while having CARGO_HOME unset and RUSTUP_HOME set. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fb3a73f31ff39601211278c9d75e1505ca64fac commit 3fb3a73f31ff39601211278c9d75e1505ca64fac Author: Sam James <sam@gentoo.org> AuthorDate: 2022-10-01 07:09:51 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-10-04 04:13:00 +0000 profiles: add XDG_STATE_DIR to ENV_UNSET XDG_STATE_HOME is defined in the basedir spec just like XDG_DATA_HOME and XDG_CONFIG_HOME, so we should cover it. Closes: https://bugs.gentoo.org/873802 Signed-off-by: Sam James <sam@gentoo.org> profiles/base/make.defaults | 2 +- profiles/embedded/make.defaults | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75c077cf32fee0bd5c496487e53c68f460775f12 commit 75c077cf32fee0bd5c496487e53c68f460775f12 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-10-01 06:21:23 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-10-04 04:12:59 +0000 xdg-utils.eclass: reset XDG_STATE_HOME XDG_STATE_HOME is defined in the basedir spec just like XDG_DATA_HOME and XDG_CONFIG_HOME, so we should cover it. We have to set in eclass because we still have < EAPI 7 ebuilds in tree (no ENV_UNSET). Closes: https://bugs.gentoo.org/873802 Signed-off-by: Sam James <sam@gentoo.org> eclass/xdg-utils.eclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (In reply to ignamartinoli from comment #7) > I can confirm: is possible to emerge gnome-base/librsvg while having > CARGO_HOME unset and RUSTUP_HOME set. Thanks! |