Hi,

There is a RPM macro for it. You may find a good example in the spec file of wireshark


On November 10, 2017 5:07:28 PM GMT+01:00, nicolas.mailhot@laposte.net wrote:
Hi,

I'm building the prometheus blackbox exporter that needs the CAP_NET_RAW capability to conduct ICMP probes (I don't want to run it as root)

I've done the naïve
setcap cap_net_raw+ep /builddir/build/BUILDROOT/prometheus-blackbox-exporter-0.10.0-1.fc28.llt.x86_64/usr/bin/prometheus-blackbox-exporter

in the specfile, but that makes mock barf
unable to set CAP_SETFCAP effective capability: Operation not permitted

What is the correct way to handle this?

Regards,

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.