From f019a919bf109460ee009a5f9210b99d0467db97 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 23 Aug 2022 02:44:06 +0100 Subject: gentoo auto-resync : 23:08:2022 - 02:44:06 --- .../ccache/files/ccache-4.6.2-avoid-run-user.patch | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 dev-util/ccache/files/ccache-4.6.2-avoid-run-user.patch (limited to 'dev-util/ccache/files/ccache-4.6.2-avoid-run-user.patch') diff --git a/dev-util/ccache/files/ccache-4.6.2-avoid-run-user.patch b/dev-util/ccache/files/ccache-4.6.2-avoid-run-user.patch new file mode 100644 index 000000000000..ff579ca7fdb6 --- /dev/null +++ b/dev-util/ccache/files/ccache-4.6.2-avoid-run-user.patch @@ -0,0 +1,30 @@ +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. +--- a/src/Config.cpp ++++ b/src/Config.cpp +@@ -1039,14 +1039,5 @@ Config::check_key_tables_consistency() + std::string + Config::default_temporary_dir() const + { +- static const std::string run_user_tmp_dir = [] { +-#ifdef HAVE_GETEUID +- auto dir = FMT("/run/user/{}/ccache-tmp", geteuid()); +- if (Util::create_dir(dir) && access(dir.c_str(), W_OK) == 0) { +- return dir; +- } +-#endif +- return std::string(); +- }(); +- return !run_user_tmp_dir.empty() ? run_user_tmp_dir : m_cache_dir + "/tmp"; ++ return m_cache_dir + "/tmp"; + } -- cgit v1.2.3