mtr: fix libcap dependency not linking

This commit is contained in:
eater 2023-05-16 10:03:39 +02:00 committed by Leah Neukirchen
parent f41c5eaeef
commit 61e0bfcea6
2 changed files with 26 additions and 1 deletions

View file

@ -0,0 +1,25 @@
Upstream fix: https://github.com/traviscross/mtr/pull/472
Makes sure `libcap` gets linked and dropping of capabilities is enabled:w
diff --git a/configure.ac b/configure.ac
index 3175d56b..286ede60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -127,9 +127,13 @@ AS_IF([test "x$with_ncurses" = "xyes"],
])
AM_CONDITIONAL([WITH_CURSES], [test "x$with_ncurses" = xyes])
-AC_CHECK_LIB([cap], [cap_set_proc], [have_cap="yes"],
- AS_IF([test "$host_os" = linux-gnu],
- AC_MSG_WARN([Capabilities support is strongly recommended for increased security. See SECURITY for more information.])))
+have_cap="yes"
+AC_CHECK_LIB([cap], [cap_set_proc], [], [
+ have_cap="no"
+ AS_IF([test "$host_os" = linux-gnu], [
+ AC_MSG_WARN([Capabilities support is strongly recommended for increased security. See SECURITY for more information.])
+ ])
+])
# Enable ipinfo
AC_ARG_WITH([ipinfo],

View file

@ -1,7 +1,7 @@
# Template file for 'mtr'
pkgname=mtr
version=0.95
revision=1
revision=2
build_style="gnu-configure"
hostmakedepends="automake pkg-config gtk+3-devel"
makedepends="ncurses-devel gtk+3-devel libcap-devel"