Subject: [Git][archlinux/packaging/packages/nethogs][main] Setcap to allow running without root

From: Orhun Parmaksız (@orhun) <[email-masked]>
Date: Sat, 01 Mar 2025 14:05:14 +0000

Orhun Parmaksız pushed to branch main at Arch Linux / Packaging / Packages / nethogs

Commits:
28a5c6d1 by Acid Xeon at 2025-03-01T14:05:14+00:00
Setcap to allow running without root

- - - - -

2 changed files:

- PKGBUILD
- + nethogs.install

Changes:

=====================================
PKGBUILD
=====================================
@@ -9,6 +9,7 @@ url="https://github.com/raboof/nethogs"
 license=('GPL')
 depends=('libpcap' 'ncurses' 'gcc-libs')
 arch=('x86_64')
+install=nethogs.install
 #source=(https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
 source=(nethogs-$pkgver.tgz::https://github.com/raboof/nethogs/archive/v$pkgver.tar.gz)
 sha256sums=('111ade20cc545e8dfd7ce4e293bd6b31cd1678a989b6a730bd2fa2acc6254818')

=====================================
nethogs.install
=====================================
@@ -0,0 +1,7 @@
+post_install() {
+    setcap "cap_net_admin,cap_net_raw,cap_dac_read_search,cap_sys_ptrace+pe" usr/bin/nethogs
+}
+
+post_upgrade() {
+    post_install "$1"
+}

View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/nethogs/-/commit/28a5c6d1d01a429480595870020f37ab50482a74

-- 
View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/nethogs/-/commit/28a5c6d1d01a429480595870020f37ab50482a74
You're receiving this email because of your account on gitlab.archlinux.org.