summaryrefslogtreecommitdiff
blob: 6e9c7c6a83544c7b6e25ca720212fc9a7ebc9724 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From 473be6467f995865244e7e68b2fa587a4ee79551 Mon Sep 17 00:00:00 2001
From: Michael Weiss <dev.primeos@gmail.com>
Date: Thu, 16 May 2019 09:44:27 +0000
Subject: [PATCH] build-sys: Make setcap really optional

The setcap dependency is marked as optional but meson.build depends on
setcap.path():

meson.build:246:7: ERROR:  add_install_script args must be strings
---
 meson.build | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 8af9e18..95c778a 100644
--- a/meson.build
+++ b/meson.build
@@ -221,10 +221,13 @@ config_h = configure_file(
 setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false)
 if get_option('NO_SETCAP_OR_SUID')
 	perm_type = 'none'
+	setcap_path = '/dev/null'
 elif cap_dep.found() and setcap.found()
 	perm_type = 'caps'
+	setcap_path = setcap.path()
 else
 	perm_type = 'setuid'
+	setcap_path = '/dev/null'
 endif
 
 ############################################################
@@ -243,7 +246,7 @@ if build_ping == true
 		join_paths(get_option('prefix'), get_option('bindir')),
 		'ping',
 		perm_type,
-		setcap.path()
+		setcap_path
 	)
 endif
 
@@ -263,7 +266,7 @@ if build_traceroute6 == true
 		join_paths(get_option('prefix'), get_option('bindir')),
 		'traceroute6',
 		perm_type,
-		setcap.path()
+		setcap_path
 	)
 endif
 
@@ -276,7 +279,7 @@ if build_clockdiff == true
 		join_paths(get_option('prefix'), get_option('bindir')),
 		'clockdiff',
 		perm_type,
-		setcap.path()
+		setcap_path
 	)
 endif
 
@@ -306,7 +309,7 @@ if build_arping == true
 		join_paths(get_option('prefix'), get_option('bindir')),
 		'arping',
 		perm_type,
-		setcap.path()
+		setcap_path
 	)
 endif