0 | |
Description: build-sys: Make setcap really optional
|
1 | |
Author: Michael Weiss <dev.primeos@gmail.com>
|
2 | |
Origin: upstream, https://github.com/iputils/iputils/commit/473be6467f995865244e7e68b2fa587a4ee79551
|
3 | |
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931491
|
4 | |
Last-Update: 2019-07-07
|
5 | |
---
|
6 | |
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
7 | |
Index: iputils/meson.build
|
8 | |
===================================================================
|
9 | |
--- iputils.orig/meson.build
|
10 | |
+++ iputils/meson.build
|
11 | |
@@ -221,10 +221,13 @@ config_h = configure_file(
|
12 | |
setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false)
|
13 | |
if get_option('NO_SETCAP_OR_SUID')
|
14 | |
perm_type = 'none'
|
15 | |
+ setcap_path = '/dev/null'
|
16 | |
elif cap_dep.found() and setcap.found()
|
17 | |
perm_type = 'caps'
|
18 | |
+ setcap_path = setcap.path()
|
19 | |
else
|
20 | |
perm_type = 'setuid'
|
21 | |
+ setcap_path = '/dev/null'
|
22 | |
endif
|
23 | |
|
24 | |
############################################################
|
25 | |
@@ -243,7 +246,7 @@ if build_ping == true
|
26 | |
join_paths(get_option('prefix'), get_option('bindir')),
|
27 | |
'ping',
|
28 | |
perm_type,
|
29 | |
- setcap.path()
|
30 | |
+ setcap_path
|
31 | |
)
|
32 | |
endif
|
33 | |
|
34 | |
@@ -263,7 +266,7 @@ if build_traceroute6 == true
|
35 | |
join_paths(get_option('prefix'), get_option('bindir')),
|
36 | |
'traceroute6',
|
37 | |
perm_type,
|
38 | |
- setcap.path()
|
39 | |
+ setcap_path
|
40 | |
)
|
41 | |
endif
|
42 | |
|
43 | |
@@ -276,7 +279,7 @@ if build_clockdiff == true
|
44 | |
join_paths(get_option('prefix'), get_option('bindir')),
|
45 | |
'clockdiff',
|
46 | |
perm_type,
|
47 | |
- setcap.path()
|
48 | |
+ setcap_path
|
49 | |
)
|
50 | |
endif
|
51 | |
|
52 | |
@@ -306,7 +309,7 @@ if build_arping == true
|
53 | |
join_paths(get_option('prefix'), get_option('bindir')),
|
54 | |
'arping',
|
55 | |
perm_type,
|
56 | |
- setcap.path()
|
57 | |
+ setcap_path
|
58 | |
)
|
59 | |
endif
|
60 | |
|