Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/distcc/, sys-devel/distcc/files/
Date: Sun, 09 Dec 2018 19:16:11
Message-Id: 1544382960.1ae7ddd19bc5c2713e5b6a100c69663d58ca72fa.mgorny@gentoo
1 commit: 1ae7ddd19bc5c2713e5b6a100c69663d58ca72fa
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 9 19:06:09 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 9 19:16:00 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ae7ddd1
7
8 sys-devel/distcc: Backport fix for crash on non-existing dir
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 ...stcc-3.3.2-r3.ebuild => distcc-3.3.2-r4.ebuild} | 2 ++
13 .../distcc/files/distcc-3.3.2-noexist-crash.patch | 22 ++++++++++++++++++++++
14 2 files changed, 24 insertions(+)
15
16 diff --git a/sys-devel/distcc/distcc-3.3.2-r3.ebuild b/sys-devel/distcc/distcc-3.3.2-r4.ebuild
17 similarity index 98%
18 rename from sys-devel/distcc/distcc-3.3.2-r3.ebuild
19 rename to sys-devel/distcc/distcc-3.3.2-r4.ebuild
20 index 1266d913df9..01cca1f446a 100644
21 --- a/sys-devel/distcc/distcc-3.3.2-r3.ebuild
22 +++ b/sys-devel/distcc/distcc-3.3.2-r4.ebuild
23 @@ -56,6 +56,8 @@ src_prepare() {
24 eapply "${FILESDIR}/${PN}-3.3.2-freedesktop.patch"
25 # SOCKSv5 support needed for Portage, bug #537616
26 eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch"
27 + # crash on missing directory
28 + eapply "${FILESDIR}"/distcc-3.3.2-noexist-crash.patch
29 eapply_user
30
31 # Bugs #120001, #167844 and probably more. See patch for description.
32
33 diff --git a/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch b/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch
34 new file mode 100644
35 index 00000000000..7f378082d99
36 --- /dev/null
37 +++ b/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch
38 @@ -0,0 +1,22 @@
39 +From 24f73c5cd8f839bd520eb52e91d0d26e07689373 Mon Sep 17 00:00:00 2001
40 +From: Shawn Landden <shawn@×××.icu>
41 +Date: Wed, 29 Aug 2018 04:52:38 -0700
42 +Subject: [PATCH] fix #304
43 +
44 +---
45 + src/daemon.c | 2 +-
46 + 1 file changed, 1 insertion(+), 1 deletion(-)
47 +
48 +diff --git a/src/daemon.c b/src/daemon.c
49 +index 5765982..c8fee7c 100644
50 +--- a/src/daemon.c
51 ++++ b/src/daemon.c
52 +@@ -166,7 +166,7 @@ static void dcc_warn_masquerade_whitelist(void) {
53 + rs_log_crit(LIBDIR "/distcc not found. %s", warn);
54 + dcc_exit(EXIT_COMPILER_MISSING);
55 + }
56 +- if (!readdir(e) && !readdir(d)) {
57 ++ if ((!e || !readdir(e)) && (!d || !readdir(d))) {
58 + rs_log_crit(LIBDIR "/distcc empty. %s", warn);
59 + dcc_exit(EXIT_COMPILER_MISSING);
60 + }