From 275f42d7b344b4b59c6dfad99c6ac13f60b0c992 Mon Sep 17 00:00:00 2001 From: Wim de With Date: Wed, 7 Feb 2024 16:02:26 +0100 Subject: [PATCH] arp-scan: 1.9.8 -> 1.10.0 --- pkgs/tools/misc/arp-scan/default.nix | 9 +++++-- .../arp-scan/remove-install-exec-hook.patch | 24 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 pkgs/tools/misc/arp-scan/remove-install-exec-hook.patch diff --git a/pkgs/tools/misc/arp-scan/default.nix b/pkgs/tools/misc/arp-scan/default.nix index 50915ebf7201..35d528598381 100644 --- a/pkgs/tools/misc/arp-scan/default.nix +++ b/pkgs/tools/misc/arp-scan/default.nix @@ -2,19 +2,24 @@ stdenv.mkDerivation rec { pname = "arp-scan"; - version = "1.9.8"; + version = "1.10.0"; src = fetchFromGitHub { owner = "royhills"; repo = "arp-scan"; rev = version; - sha256 = "sha256-zSihemqGaQ5z6XjA/dALoSJOuAkxF5/nnV6xE+GY7KI="; + sha256 = "sha256-BS+ItZd6cSMX92M6XGYrIeAiCB2iBdvbMvKdLfwawLQ="; }; + patches = [ + ./remove-install-exec-hook.patch + ]; + perlModules = with perlPackages; [ HTTPDate HTTPMessage LWP + TextCSV URI ]; diff --git a/pkgs/tools/misc/arp-scan/remove-install-exec-hook.patch b/pkgs/tools/misc/arp-scan/remove-install-exec-hook.patch new file mode 100644 index 000000000000..38421400384c --- /dev/null +++ b/pkgs/tools/misc/arp-scan/remove-install-exec-hook.patch @@ -0,0 +1,24 @@ +diff --git a/Makefile.am b/Makefile.am +index c02e1cc..0dd6321 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -29,19 +29,3 @@ arp-scan.1: arp-scan.1.dist Makefile + $(do_subst) < $(srcdir)/arp-scan.1.dist > arp-scan.1 + get-oui.1: get-oui.1.dist Makefile + $(do_subst) < $(srcdir)/get-oui.1.dist > get-oui.1 +-# Install arp-scan with cap_net_raw if possible, otherwise SUID root +-install-exec-hook: +- @if command -v setcap > /dev/null; then \ +- if setcap cap_net_raw+p $(DESTDIR)$(bindir)/arp-scan$(EXEEXT); then \ +- echo "setcap cap_net_raw+p $(DESTDIR)$(bindir)/arp-scan$(EXEEXT)"; \ +- chmod u-s $(DESTDIR)$(bindir)/arp-scan$(EXEEXT); \ +- else \ +- echo "Setcap failed on $(DESTDIR)$(bindir)/arp-scan$(EXEEXT), falling back to setuid" >&2; \ +- echo "chmod u+s $(DESTDIR)$(bindir)/arp-scan$(EXEEXT)"; \ +- chmod u+s $(DESTDIR)$(bindir)/arp-scan$(EXEEXT); \ +- fi \ +- else \ +- echo "Setcap is not installed, falling back to setuid" >&2 ; \ +- echo "chmod u+s $(DESTDIR)$(bindir)/arp-scan$(EXEEXT)" ;\ +- chmod u+s $(DESTDIR)$(bindir)/arp-scan$(EXEEXT) ;\ +- fi