mtr: fix setcap

This commit is contained in:
Danny Rawlins 2020-11-24 22:38:37 +11:00
parent 6180bab122
commit 6b00cef92f
4 changed files with 24 additions and 6 deletions

View File

@ -1,7 +1,7 @@
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/mtr
-rwsr-xr-x root/root usr/bin/mtr-packet
-rwxr-xr-x root/root usr/bin/mtr-packet
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/bash-completion/
drwxr-xr-x root/root usr/share/bash-completion/completions/

View File

@ -1,5 +1,6 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF36w9KsL9e6xoGXobAvHFSltAc/yLGn8bZrwGh6+fyLOLDO9pAVEhNt9g45G871Fbpulg/125NwqTF+etpDE+cgI=
SHA256 (Pkgfile) = a097bc44365020a6421e3cd84085a9a37191dea4458f8d5e8e5d22433f996ed5
SHA256 (.footprint) = 1829935673a241b1ac26635cb94b1cad684bbc99aecad09b1745d225f08724ea
RWSagIOpLGJF31Rgi8/TskCOwz0tDF/kofnhha+6eSxI7ORbvERP3g/nlQG0lICb9uQbhkAP9b23ya9bUXoIoApv3am7I5ApFwg=
SHA256 (Pkgfile) = a9182f850b8a855e2412cab17c70e111fc51fbe81f24ff4187af1be0d831b500
SHA256 (.footprint) = ba9dc28bfd821a2bac57b3318376a437cf2f24a180c8c94175063d3d4bf530f4
SHA256 (mtr-v0.94.tar.gz) = ea036fdd45da488c241603f6ea59a06bbcfe6c26177ebd34fff54336a44494b8
SHA256 (mtr-setcap.patch) = 398d9c4a77282b4b354a47176595cfe842d363eefe4c5ec27356e02df98a2722

View File

@ -5,12 +5,15 @@
name=mtr
version=0.94
release=1
source=(https://github.com/traviscross/mtr/archive/v$version/$name-v$version.tar.gz)
release=2
source=(https://github.com/traviscross/mtr/archive/v$version/$name-v$version.tar.gz
mtr-setcap.patch)
build() {
cd $name-$version
patch -p1 -i $SRC/mtr-setcap.patch
./bootstrap.sh
./configure \
--prefix=/usr \

14
mtr/mtr-setcap.patch Normal file
View File

@ -0,0 +1,14 @@
diff -pruN mtr-0.94.orig/Makefile.am mtr-0.94/Makefile.am
--- mtr-0.94.orig/Makefile.am 2020-11-24 21:39:16.129195097 +1100
+++ mtr-0.94/Makefile.am 2020-11-24 21:39:54.722073566 +1100
@@ -40,10 +40,6 @@ $(PATHFILES): Makefile
dist_man_MANS = mtr.8 mtr-packet.8
PATHFILES += man/mtr.8 man/mtr-packet.8
-install-exec-hook:
- `setcap cap_net_raw+ep $(DESTDIR)$(sbindir)/mtr-packet` \
- || chmod u+s $(DESTDIR)$(sbindir)/mtr-packet
-
mtr_SOURCES = ui/mtr.c ui/mtr.h \
ui/net.c ui/net.h \
ui/cmdpipe.c ui/cmdpipe.h \