1 |
commit: 67362b18b2c01dfe7deb017f6e7e929138fa932e |
2 |
Author: Marty E. Plummer <hanetzer <AT> startmail <DOT> com> |
3 |
AuthorDate: Thu Jun 27 23:00:15 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 27 23:13:50 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67362b18 |
7 |
|
8 |
net-misc/iputils: fix build with USE="-caps" |
9 |
|
10 |
Upstream patch. Without this change, attempting to emerge |
11 |
net-misc/iputils-20190515 with USE="-caps" without having |
12 |
had sys-libs/libcap installed for some other reason will fail during |
13 |
src_configure due to wrong type of arguments for add_install_script. |
14 |
|
15 |
Package-Manager: Portage-2.3.67, Repoman-2.3.16 |
16 |
Signed-off-by: Signed-off-by: Marty E. Plummer <hanetzer <AT> startmail.com> |
17 |
Closes: https://github.com/gentoo/gentoo/pull/12344 |
18 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
19 |
|
20 |
.../files/iputils-20190515-fix-setcap.patch | 67 ++++++++++++++++++++++ |
21 |
net-misc/iputils/iputils-20190515.ebuild | 4 +- |
22 |
2 files changed, 70 insertions(+), 1 deletion(-) |
23 |
|
24 |
diff --git a/net-misc/iputils/files/iputils-20190515-fix-setcap.patch b/net-misc/iputils/files/iputils-20190515-fix-setcap.patch |
25 |
new file mode 100644 |
26 |
index 00000000000..6e9c7c6a835 |
27 |
--- /dev/null |
28 |
+++ b/net-misc/iputils/files/iputils-20190515-fix-setcap.patch |
29 |
@@ -0,0 +1,67 @@ |
30 |
+From 473be6467f995865244e7e68b2fa587a4ee79551 Mon Sep 17 00:00:00 2001 |
31 |
+From: Michael Weiss <dev.primeos@×××××.com> |
32 |
+Date: Thu, 16 May 2019 09:44:27 +0000 |
33 |
+Subject: [PATCH] build-sys: Make setcap really optional |
34 |
+ |
35 |
+The setcap dependency is marked as optional but meson.build depends on |
36 |
+setcap.path(): |
37 |
+ |
38 |
+meson.build:246:7: ERROR: add_install_script args must be strings |
39 |
+--- |
40 |
+ meson.build | 11 +++++++---- |
41 |
+ 1 file changed, 7 insertions(+), 4 deletions(-) |
42 |
+ |
43 |
+diff --git a/meson.build b/meson.build |
44 |
+index 8af9e18..95c778a 100644 |
45 |
+--- a/meson.build |
46 |
++++ b/meson.build |
47 |
+@@ -221,10 +221,13 @@ config_h = configure_file( |
48 |
+ setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false) |
49 |
+ if get_option('NO_SETCAP_OR_SUID') |
50 |
+ perm_type = 'none' |
51 |
++ setcap_path = '/dev/null' |
52 |
+ elif cap_dep.found() and setcap.found() |
53 |
+ perm_type = 'caps' |
54 |
++ setcap_path = setcap.path() |
55 |
+ else |
56 |
+ perm_type = 'setuid' |
57 |
++ setcap_path = '/dev/null' |
58 |
+ endif |
59 |
+ |
60 |
+ ############################################################ |
61 |
+@@ -243,7 +246,7 @@ if build_ping == true |
62 |
+ join_paths(get_option('prefix'), get_option('bindir')), |
63 |
+ 'ping', |
64 |
+ perm_type, |
65 |
+- setcap.path() |
66 |
++ setcap_path |
67 |
+ ) |
68 |
+ endif |
69 |
+ |
70 |
+@@ -263,7 +266,7 @@ if build_traceroute6 == true |
71 |
+ join_paths(get_option('prefix'), get_option('bindir')), |
72 |
+ 'traceroute6', |
73 |
+ perm_type, |
74 |
+- setcap.path() |
75 |
++ setcap_path |
76 |
+ ) |
77 |
+ endif |
78 |
+ |
79 |
+@@ -276,7 +279,7 @@ if build_clockdiff == true |
80 |
+ join_paths(get_option('prefix'), get_option('bindir')), |
81 |
+ 'clockdiff', |
82 |
+ perm_type, |
83 |
+- setcap.path() |
84 |
++ setcap_path |
85 |
+ ) |
86 |
+ endif |
87 |
+ |
88 |
+@@ -306,7 +309,7 @@ if build_arping == true |
89 |
+ join_paths(get_option('prefix'), get_option('bindir')), |
90 |
+ 'arping', |
91 |
+ perm_type, |
92 |
+- setcap.path() |
93 |
++ setcap_path |
94 |
+ ) |
95 |
+ endif |
96 |
+ |
97 |
|
98 |
diff --git a/net-misc/iputils/iputils-20190515.ebuild b/net-misc/iputils/iputils-20190515.ebuild |
99 |
index ff6506c4be4..fab32c416ff 100644 |
100 |
--- a/net-misc/iputils/iputils-20190515.ebuild |
101 |
+++ b/net-misc/iputils/iputils-20190515.ebuild |
102 |
@@ -71,7 +71,9 @@ fi |
103 |
|
104 |
[ "${PV}" == "99999999" ] || S="${WORKDIR}/${PN}-s${PV}" |
105 |
|
106 |
-PATCHES=() |
107 |
+PATCHES=( |
108 |
+ "${FILESDIR}"/${PN}-20190515-fix-setcap.patch |
109 |
+) |
110 |
|
111 |
src_prepare() { |
112 |
use SECURITY_HAZARD && PATCHES+=( "${FILESDIR}"/${PN}-20150815-nonroot-floodping.patch ) |