Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/, dev-util/ccache/files/
Date: Sat, 09 Apr 2022 11:26:59
Message-Id: 1649503606.9767f9723c5c168a772653541283cb9065090c1e.sam@gentoo
1 commit: 9767f9723c5c168a772653541283cb9065090c1e
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 9 11:26:14 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 9 11:26:46 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9767f972
7
8 dev-util/ccache: restore /run-skip patch
9
10 I still can't hit this but let's rebase the old patch
11 given it makes sense for now.
12
13 Closes: https://bugs.gentoo.org/837362
14 Bug: https://bugs.gentoo.org/837380
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16
17 dev-util/ccache/ccache-4.6.ebuild | 1 +
18 .../ccache/files/ccache-4.6-avoid-run-user.patch | 28 ++++++++++++++++++++++
19 2 files changed, 29 insertions(+)
20
21 diff --git a/dev-util/ccache/ccache-4.6.ebuild b/dev-util/ccache/ccache-4.6.ebuild
22 index 9bff72bc83a7..d3c7ceee833f 100644
23 --- a/dev-util/ccache/ccache-4.6.ebuild
24 +++ b/dev-util/ccache/ccache-4.6.ebuild
25 @@ -37,6 +37,7 @@ DOCS=( doc/{AUTHORS,MANUAL,NEWS}.adoc CONTRIBUTING.md README.md )
26 PATCHES=(
27 "${FILESDIR}"/${PN}-3.5-nvcc-test.patch
28 "${FILESDIR}"/${PN}-4.0-objdump.patch
29 + "${FILESDIR}"/${PN}-4.6-avoid-run-user.patch
30 )
31
32 src_prepare() {
33
34 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
35 new file mode 100644
36 index 000000000000..cfdd09f79e66
37 --- /dev/null
38 +++ b/dev-util/ccache/files/ccache-4.6-avoid-run-user.patch
39 @@ -0,0 +1,28 @@
40 +Gentoo's sandbox does not whitelist this path by default yet.
41 +
42 +(4.1 update:
43 +https://github.com/ccache/ccache/issues/984
44 +https://github.com/ccache/ccache/issues/1044
45 +https://github.com/ccache/ccache/commit/a0edd4294f6a5a2d3f0c7b01273736f975f250e1
46 +https://github.com/ccache/ccache/commit/ef2e922f9642f943199138447b29ec53fa63ea68
47 +... gets us closer, but not there yet.)
48 +
49 +https://bugs.gentoo.org/837362 for 4.6 issue.
50 +--- a/src/Config.cpp
51 ++++ b/src/Config.cpp
52 +@@ -1031,14 +1031,5 @@ Config::check_key_tables_consistency()
53 + std::string
54 + Config::default_temporary_dir(const std::string& cache_dir)
55 + {
56 +- static const std::string run_user_tmp_dir = [] {
57 +-#ifdef HAVE_GETEUID
58 +- auto dir = FMT("/run/user/{}/ccache-tmp", geteuid());
59 +- if (Util::create_dir(dir)) {
60 +- return dir;
61 +- }
62 +-#endif
63 +- return std::string();
64 +- }();
65 +- return !run_user_tmp_dir.empty() ? run_user_tmp_dir : cache_dir + "/tmp";
66 ++ return cache_dir + "/tmp";
67 + }