From c3775617e64a542a897d93be9de02fc00993a10e Mon Sep 17 00:00:00 2001 From: eater <=@eater.me> Date: Tue, 16 May 2023 10:03:39 +0200 Subject: [PATCH] mtr: fix libcap dependency not linking --- srcpkgs/mtr/patches/libcap-fix.patch | 25 +++++++++++++++++++++++++ srcpkgs/mtr/template | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/mtr/patches/libcap-fix.patch diff --git a/srcpkgs/mtr/patches/libcap-fix.patch b/srcpkgs/mtr/patches/libcap-fix.patch new file mode 100644 index 000000000000..e564f38e409e --- /dev/null +++ b/srcpkgs/mtr/patches/libcap-fix.patch @@ -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], diff --git a/srcpkgs/mtr/template b/srcpkgs/mtr/template index 5f159dfc025b..3bb62dbe3cc0 100644 --- a/srcpkgs/mtr/template +++ b/srcpkgs/mtr/template @@ -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"