summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Böhm <bb@xnull.de>2010-07-22 10:09:21 +0200
committerBenedikt Böhm <bb@xnull.de>2010-07-22 10:09:21 +0200
commit1d492be7c3237025aa860e50b192b6b25ddce5e0 (patch)
tree6b8d3357c4551f6112e25bda647be4000bdcd3a7 /app-admin
parentsplit plugin categories like upstream and add some default use flags (diff)
downloadbetagarden-1d492be7c3237025aa860e50b192b6b25ddce5e0.tar.gz
betagarden-1d492be7c3237025aa860e50b192b6b25ddce5e0.tar.bz2
betagarden-1d492be7c3237025aa860e50b192b6b25ddce5e0.zip
try to fix the kernel check logic
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/collectd/Manifest2
-rw-r--r--app-admin/collectd/collectd-4.10.1.ebuild102
2 files changed, 42 insertions, 62 deletions
diff --git a/app-admin/collectd/Manifest b/app-admin/collectd/Manifest
index ea0e4ef..5a96b03 100644
--- a/app-admin/collectd/Manifest
+++ b/app-admin/collectd/Manifest
@@ -1,4 +1,4 @@
AUX collectd.confd 529 RMD160 59ab4aa9eab3db05d025676a4c59d6bc4769cfdf SHA1 496c7b3aadcc1483d6cf1741f92c9a67d3f09ebc SHA256 f4200b094b8e5eaea2f9aba94cdf75cdc8731c346f590e6530917e0dd5f2f903
AUX collectd.initd 659 RMD160 98d3ba6f160a928b9358ceb5a7759c335a459fcd SHA1 45bead8031f01f2a179c623b66ee63ee556d3c82 SHA256 3965a97e764d4459b7b1f6663fcb0287a7b262afcc93e4ce2158470b6f136aa9
DIST collectd-4.10.1.tar.bz2 1415626 RMD160 f609f70bd7bb789ab54ca72edd34c3753692ff00 SHA1 bda5c918761b98e82fa18da056f60916703b5805 SHA256 607ea5d22164eaf434223dd39a1df453103e2f3c2f2b8c1dbfc1531eefb6df56
-EBUILD collectd-4.10.1.ebuild 10801 RMD160 6366dd1a2caf0b5b8fd5b9faea454513be634e78 SHA1 d52080112841ad3ec4119d2a7804b857f40ddcbd SHA256 54d76278c5a241ff99f8705fdb13ee7f3021d223041ce1feb876dcd4d5352e8f
+EBUILD collectd-4.10.1.ebuild 10108 RMD160 34755c8e57bde4e0e91fb0a86b944e3f055d6d21 SHA1 ee2cb5fe74a7672a1738fa0b615d4cf5f242a292 SHA256 16874e77343214c8733cca572d33f3d484543868ffbc1f0aae5c6bf90517d98f
diff --git a/app-admin/collectd/collectd-4.10.1.ebuild b/app-admin/collectd/collectd-4.10.1.ebuild
index 649dc58..3cfc125 100644
--- a/app-admin/collectd/collectd-4.10.1.ebuild
+++ b/app-admin/collectd/collectd-4.10.1.ebuild
@@ -120,120 +120,96 @@ RDEPEND="${COMMON_DEPEND}
cd_syslog? ( virtual/logger )"
collectd_plugin_kernel_linux() {
- #
- # USAGE: <plug-in name> <kernel_options> <severity>
- # kernel_options is a list of kernel configurations options; the check tests whether at least
- # one of them is enabled.
- #
- local multi_opt
- if use cd_${1}; then
- for opt in ${2}; do
- if linux_chkconfig_present ${opt}; then return 0; fi
- done
- multi_opt=${2//\ /\ or\ }
- case ${3} in
- (info)
- elog "The ${1} plug-in\tcan use features enabled by\t${multi_opt}\tin your kernel"
- ;;
- (warn)
- ewarn "The ${1} plug-in\tuses features enabled by\t${multi_opt}\tin your kernel"
- ;;
- (error)
- eerror "The ${1} plug-in\tneeds features enabled by\t${multi_opt}\tin your kernel"
- ;;
- (*)
- die "function collectd_plugin_kernel_linux called with invalid third argument"
- ;;
- esac
+ if use cd_${1} && ! has ~$2 $CONFIG_CHECK; then
+ CONFIG_CHECK+=" ~$2"
fi
}
collectd_linux_kernel_checks() {
- linux-info_pkg_setup
-
- elog
+ CONFIG_CHECK=""
# battery.c:/proc/pmu/battery_%i
# battery.c:/proc/acpi/battery
- collectd_plugin_kernel_linux battery PROC_FS warn
- collectd_plugin_kernel_linux battery ACPI_BATTERY warn
+ collectd_plugin_kernel_linux battery PROC_FS
+ collectd_plugin_kernel_linux battery ACPI_BATTERY
# cpu.c:/proc/stat
- collectd_plugin_kernel_linux cpu PROC_FS warn
+ collectd_plugin_kernel_linux cpu PROC_FS
# cpufreq.c:/sys/devices/system/cpu/cpu%d/cpufreq/
- collectd_plugin_kernel_linux cpufreq SYSFS warn
- collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn
+ collectd_plugin_kernel_linux cpufreq SYSFS
+ collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT
# utils_mount.c:/proc/partitions
- collectd_plugin_kernel_linux df PROC_FS warn
+ collectd_plugin_kernel_linux df PROC_FS
# disk.c:/proc/diskstats
# disk.c:/proc/partitions
- collectd_plugin_kernel_linux disk PROC_FS warn
+ collectd_plugin_kernel_linux disk PROC_FS
# entropy.c:/proc/sys/kernel/random/entropy_avail
- collectd_plugin_kernel_linux entropy PROC_FS warn
+ collectd_plugin_kernel_linux entropy PROC_FS
# hddtemp.c:/proc/partitions
- collectd_plugin_kernel_linux hddtemp PROC_FS info
+ collectd_plugin_kernel_linux hddtemp PROC_FS
# interface.c:/proc/net/dev
- collectd_plugin_kernel_linux interface PROC_FS warn
- collectd_plugin_kernel_linux ipmi IPMI_HANDLER warn
- collectd_plugin_kernel_linux ipvs IP_VS warn
+ collectd_plugin_kernel_linux interface PROC_FS
+ collectd_plugin_kernel_linux ipmi IPMI_HANDLER
+ collectd_plugin_kernel_linux ipvs IP_VS
# irq.c:/proc/interrupts
- collectd_plugin_kernel_linux irq PROC_FS warn
+ collectd_plugin_kernel_linux irq PROC_FS
# load.c:/proc/loadavg
- collectd_plugin_kernel_linux load PROC_FS warn
+ collectd_plugin_kernel_linux load PROC_FS
# memory.c:/proc/meminfo
- collectd_plugin_kernel_linux memory PROC_FS warn
+ collectd_plugin_kernel_linux memory PROC_FS
# nfs.c:/proc/net/rpc/nfs
# nfs.c:/proc/net/rpc/nfsd
- collectd_plugin_kernel_linux nfs PROC_FS warn
- collectd_plugin_kernel_linux nfs NFS_COMMON warn
+ collectd_plugin_kernel_linux nfs PROC_FS
+ collectd_plugin_kernel_linux nfs NFS_COMMON
# processes.c:/proc/%i/task
# processes.c:/proc/%i/stat
- collectd_plugin_kernel_linux processes PROC_FS warn
+ collectd_plugin_kernel_linux processes PROC_FS
# serial.c:/proc/tty/driver/serial
# serial.c:/proc/tty/driver/ttyS
- collectd_plugin_kernel_linux serial PROC_FS warn
- collectd_plugin_kernel_linux serial SERIAL_CORE warn
+ collectd_plugin_kernel_linux serial PROC_FS
+ collectd_plugin_kernel_linux serial SERIAL_CORE
# swap.c:/proc/meminfo
- collectd_plugin_kernel_linux swap PROC_FS warn
- collectd_plugin_kernel_linux swap SWAP warn
+ collectd_plugin_kernel_linux swap PROC_FS
+ collectd_plugin_kernel_linux swap SWAP
# tcpconns.c:/proc/net/tcp
# tcpconns.c:/proc/net/tcp6
- collectd_plugin_kernel_linux tcpconns PROC_FS warn
+ collectd_plugin_kernel_linux tcpconns PROC_FS
# thermal.c:/proc/acpi/thermal_zone
# thermal.c:/sys/class/thermal
- collectd_plugin_kernel_linux thermal "PROC_FS SYSFS" warn
- collectd_plugin_kernel_linux thermal ACPI_THERMAL warn
+ collectd_plugin_kernel_linux thermal PROC_FS
+ collectd_plugin_kernel_linux thermal SYSFS
+ collectd_plugin_kernel_linux thermal ACPI_THERMAL
# vmem.c:/proc/vmstat
- collectd_plugin_kernel_linux vmem PROC_FS warn
- collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn
+ collectd_plugin_kernel_linux vmem PROC_FS
+ collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS
# vserver.c:/proc/virtual
- collectd_plugin_kernel_linux vserver PROC_FS warn
+ collectd_plugin_kernel_linux vserver PROC_FS
# uuid.c:/sys/hypervisor/uuid
- collectd_plugin_kernel_linux uuid SYSFS info
+ collectd_plugin_kernel_linux uuid SYSFS
# wireless.c:/proc/net/wireless
- collectd_plugin_kernel_linux wireless PROC_FS warn
- collectd_plugin_kernel_linux wireless "MAC80211 IEEE80211" warn
+ collectd_plugin_kernel_linux wireless PROC_FS
+ collectd_plugin_kernel_linux wireless MAC80211
- elog
+ linux-info_pkg_setup
}
pkg_setup() {
@@ -255,7 +231,10 @@ pkg_setup() {
src_prepare() {
# There's some strange prefix handling in the default config file, resulting in
# paths like "/usr/var/..."
- sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die
+ sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in
+
+ # xtables.h:193:1: error: "aligned_u64" redefined
+ sed -i -e "/define aligned_u64/d" src/owniptc/xtables.h
}
src_configure() {
@@ -294,6 +273,7 @@ src_configure() {
# Set enable/disable for each single plugin.
for plugin in ${COLLECTD_PLUGINS}; do
+ plugin=${plugin#+}
if has ${plugin} ${osdependent_plugins}; then
# plugin is os-dependent ...
if has ${plugin} ${myos_plugins}; then