summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-04-09 12:26:14 +0100
committerSam James <sam@gentoo.org>2022-04-09 12:26:46 +0100
commit9767f9723c5c168a772653541283cb9065090c1e (patch)
treeefaa5a5565d14beefd3015c0a9646f4401397a7e /dev-util/ccache
parentwww-client/vivaldi: Add version 5.2.2623.26 (diff)
downloadgentoo-9767f9723c5c168a772653541283cb9065090c1e.tar.gz
gentoo-9767f9723c5c168a772653541283cb9065090c1e.tar.bz2
gentoo-9767f9723c5c168a772653541283cb9065090c1e.zip
dev-util/ccache: restore /run-skip patch
I still can't hit this but let's rebase the old patch given it makes sense for now. Closes: https://bugs.gentoo.org/837362 Bug: https://bugs.gentoo.org/837380 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/ccache')
-rw-r--r--dev-util/ccache/ccache-4.6.ebuild1
-rw-r--r--dev-util/ccache/files/ccache-4.6-avoid-run-user.patch28
2 files changed, 29 insertions, 0 deletions
diff --git a/dev-util/ccache/ccache-4.6.ebuild b/dev-util/ccache/ccache-4.6.ebuild
index 9bff72bc83a7..d3c7ceee833f 100644
--- a/dev-util/ccache/ccache-4.6.ebuild
+++ b/dev-util/ccache/ccache-4.6.ebuild
@@ -37,6 +37,7 @@ DOCS=( doc/{AUTHORS,MANUAL,NEWS}.adoc CONTRIBUTING.md README.md )
PATCHES=(
"${FILESDIR}"/${PN}-3.5-nvcc-test.patch
"${FILESDIR}"/${PN}-4.0-objdump.patch
+ "${FILESDIR}"/${PN}-4.6-avoid-run-user.patch
)
src_prepare() {
diff --git a/dev-util/ccache/files/ccache-4.6-avoid-run-user.patch b/dev-util/ccache/files/ccache-4.6-avoid-run-user.patch
new file mode 100644
index 000000000000..cfdd09f79e66
--- /dev/null
+++ b/dev-util/ccache/files/ccache-4.6-avoid-run-user.patch
@@ -0,0 +1,28 @@
+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.)
+
+https://bugs.gentoo.org/837362 for 4.6 issue.
+--- a/src/Config.cpp
++++ b/src/Config.cpp
+@@ -1031,14 +1031,5 @@ Config::check_key_tables_consistency()
+ std::string
+ Config::default_temporary_dir(const std::string& cache_dir)
+ {
+- static const std::string run_user_tmp_dir = [] {
+-#ifdef HAVE_GETEUID
+- auto dir = FMT("/run/user/{}/ccache-tmp", geteuid());
+- if (Util::create_dir(dir)) {
+- return dir;
+- }
+-#endif
+- return std::string();
+- }();
+- return !run_user_tmp_dir.empty() ? run_user_tmp_dir : cache_dir + "/tmp";
++ return cache_dir + "/tmp";
+ }