Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 781869 - app-metrics/blackbox_exporter-0.18.0: binary missing file capabilities after install
Summary: app-metrics/blackbox_exporter-0.18.0: binary missing file capabilities after ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-09 20:54 UTC by Holger Hoffstätte
Modified: 2021-05-04 12:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Hoffstätte 2021-04-09 20:54:40 UTC
blackbox_exporter was updated to 0.18.0, but after installation the binary is missing the required (and intended) cap_net_rap capability; therefore e.g. ICMP probes will not work.


Reproducible: Always

Steps to Reproduce:
1. emerge blackbox_exporter-0.18.0
2. test ICMP probes
3. failure
Actual Results:  
Missing cap_net_raw capability on the binary

Expected Results:  
$getcap /usr/bin/blackbox_exporter-0.18.0 
/usr/bin/blackbox_exporter-0.18.0 cap_net_raw=ep


I briefly tried t fix the FILECAPS statement to refer to the binary (i.e. "blackbox_exporter-0.18.0") instead of the plain executable name (which ends up being a symlink), but that didn't work either. Not sure why.
Comment 1 Ionen Wolkens gentoo-dev 2021-04-10 01:27:42 UTC
The symlink is a problem but there's more to that (likely broke since 0.17.0).

    FILECAPS=(
        cap_net_raw usr/bin/blackbox_exporter-${PV}
    )

    pkg_postinst() {
        go-module_pkg_postinst
        fcaps_pkg_postinst
    }

$ getcap /usr/bin/blackbox_exporter-0.18.0 
/usr/bin/blackbox_exporter-0.18.0 cap_net_raw=ep
Comment 2 Larry the Git Cow gentoo-dev 2021-05-03 22:37:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13b2d4a97078e21b981c0c0ed1e9ad1952fc78ac

commit 13b2d4a97078e21b981c0c0ed1e9ad1952fc78ac
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2021-05-03 22:27:53 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2021-05-03 22:37:50 +0000

    app-metrics/blackbox_exporter: 0.18.2 rev bump
    
    - clean up binary renaming
    - disable tests (they require the network)
    
    Closes: https://bugs.gentoo.org/701232
    Closes: https://bugs.gentoo.org/731006
    Closes: https://bugs.gentoo.org/781869
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 .../blackbox_exporter-0.18.0-r2.ebuild             | 53 ++++++++++++++++++++++
 1 file changed, 53 insertions(+)
Comment 3 Holger Hoffstätte 2021-05-04 12:22:27 UTC
This isn't fixed at all with -r2:

- the exeutable still has the wrong name (with version), so the openrc init file no longer works since the plain symlink is now gone.

- the executable still does not have the necessary capabilities