summaryrefslogtreecommitdiff
path: root/dev-util/ccache/files/ccache-4.11-avoid-run-user.patch
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2025-03-10 05:05:43 +0000
committerSam James <sam@gentoo.org>2025-03-10 05:05:43 +0000
commit3c0cece41a7ee3234ac108fcf81ccb744a344c89 (patch)
tree1d4ba50497646eb52b0ba826ef5456648b86d1f6 /dev-util/ccache/files/ccache-4.11-avoid-run-user.patch
parentcaef53e0502bff881904dd983a07b1ce8ef79e35 (diff)
downloadgentoo-3c0cece41a7ee3234ac108fcf81ccb744a344c89.tar.gz
gentoo-3c0cece41a7ee3234ac108fcf81ccb744a344c89.tar.bz2
gentoo-3c0cece41a7ee3234ac108fcf81ccb744a344c89.zip
dev-util/ccache: add 4.11
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/ccache/files/ccache-4.11-avoid-run-user.patch')
-rw-r--r--dev-util/ccache/files/ccache-4.11-avoid-run-user.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/dev-util/ccache/files/ccache-4.11-avoid-run-user.patch b/dev-util/ccache/files/ccache-4.11-avoid-run-user.patch
new file mode 100644
index 000000000000..0a890a7db7d9
--- /dev/null
+++ b/dev-util/ccache/files/ccache-4.11-avoid-run-user.patch
@@ -0,0 +1,34 @@
+Gentoo's sandbox does not whitelist this path by default yet.
+
+(4.1 update:
+https://github.com/ccache/ccache/issues/984
+https://github.com/ccache/ccache/issues/1044
+https://github.com/ccache/ccache/commit/a0edd4294f6a5a2d3f0c7b01273736f975f250e1
+https://github.com/ccache/ccache/commit/ef2e922f9642f943199138447b29ec53fa63ea68
+... gets us closer, but not there yet.)
+
+And see https://github.com/ccache/ccache/discussions/1086#discussioncomment-3327565.
+
+https://bugs.gentoo.org/837362 for 4.6 issue.
+https://bugs.gentoo.org/883799 and https://bugs.gentoo.org/887019 for 4.8 issue.
+--- a/src/ccache/config.cpp
++++ b/src/ccache/config.cpp
+@@ -1240,17 +1240,5 @@ Config::check_key_tables_consistency()
+ fs::path
+ Config::default_temporary_dir() const
+ {
+- static const fs::path run_user_tmp_dir = [] {
+-#ifndef _WIN32
+- const char* const xdg_runtime_dir = getenv("XDG_RUNTIME_DIR");
+- if (xdg_runtime_dir && DirEntry(xdg_runtime_dir).is_directory()) {
+- fs::path dir = FMT("{}/ccache-tmp", xdg_runtime_dir);
+- if (fs::create_directories(dir) && access(dir.c_str(), W_OK) == 0) {
+- return dir;
+- }
+- }
+-#endif
+- return fs::path();
+- }();
+- return !run_user_tmp_dir.empty() ? run_user_tmp_dir : m_cache_dir / "tmp";
++ return m_cache_dir / "tmp";
+ }