Skip to content

Commit

Permalink
app-admin/collectd: Update file capabilities
Browse files Browse the repository at this point in the history
Add missing capabilities for ceph, dns, exec and turbostat plugin when
"filecaps" USE flag is used.

Package-Manager: portage-2.3.1
  • Loading branch information
Whissi committed Oct 11, 2016
1 parent 506ca33 commit 22fb31f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion app-admin/collectd/collectd-5.5.2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,15 @@ src_install() {

pkg_postinst() {
local caps=()
use collectd_plugins_ping && caps+=('cap_net_raw')
use collectd_plugins_ceph && caps+=('cap_dac_override')
use collectd_plugins_exec && caps+=('cap_setuid' 'cap_setgid')
use collectd_plugins_iptables && caps+=('cap_net_admin')
use collectd_plugins_filecount && caps+=('cap_dac_read_search')
use collectd_plugins_turbostat && caps+=('cap_sys_rawio')

if use collectd_plugins_dns || use collectd_plugins_ping; then
caps+=('cap_net_raw')
fi

if [ ${#caps[@]} -gt 0 ]; then
local caps_str=$(IFS=","; echo "${caps[*]}")
Expand Down
8 changes: 7 additions & 1 deletion app-admin/collectd/collectd-5.6.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,15 @@ src_install() {

pkg_postinst() {
local caps=()
use collectd_plugins_ping && caps+=('cap_net_raw')
use collectd_plugins_ceph && caps+=('cap_dac_override')
use collectd_plugins_exec && caps+=('cap_setuid' 'cap_setgid')
use collectd_plugins_iptables && caps+=('cap_net_admin')
use collectd_plugins_filecount && caps+=('cap_dac_read_search')
use collectd_plugins_turbostat && caps+=('cap_sys_rawio')

if use collectd_plugins_dns || use collectd_plugins_ping; then
caps+=('cap_net_raw')
fi

if [ ${#caps[@]} -gt 0 ]; then
local caps_str=$(IFS=","; echo "${caps[*]}")
Expand Down
8 changes: 7 additions & 1 deletion app-admin/collectd/collectd-5.6.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,15 @@ src_install() {

pkg_postinst() {
local caps=()
use collectd_plugins_ping && caps+=('cap_net_raw')
use collectd_plugins_ceph && caps+=('cap_dac_override')
use collectd_plugins_exec && caps+=('cap_setuid' 'cap_setgid')
use collectd_plugins_iptables && caps+=('cap_net_admin')
use collectd_plugins_filecount && caps+=('cap_dac_read_search')
use collectd_plugins_turbostat && caps+=('cap_sys_rawio')

if use collectd_plugins_dns || use collectd_plugins_ping; then
caps+=('cap_net_raw')
fi

if [ ${#caps[@]} -gt 0 ]; then
local caps_str=$(IFS=","; echo "${caps[*]}")
Expand Down

0 comments on commit 22fb31f

Please sign in to comment.