From 401101f9c8077911929d3f2b60a37098460a5d89 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 24 Mar 2022 23:59:54 +0000 Subject: gentoo resync : 25.03.2022 --- app-metrics/Manifest.gz | Bin 5796 -> 5799 bytes app-metrics/collectd/Manifest | 4 +- app-metrics/collectd/collectd-5.12.0-r3.ebuild | 552 --------------------- app-metrics/collectd/collectd-5.12.0-r4.ebuild | 552 --------------------- app-metrics/collectd/collectd-5.12.0-r5.ebuild | 552 +++++++++++++++++++++ app-metrics/collectd/collectd-5.12.0-r6.ebuild | 552 +++++++++++++++++++++ app-metrics/elasticsearch_exporter/Manifest | 11 +- .../elasticsearch_exporter-1.0.2.ebuild | 47 -- .../elasticsearch_exporter-1.0.4_rc1.ebuild | 49 -- .../elasticsearch_exporter-1.1.0.ebuild | 49 -- .../elasticsearch_exporter-1.1.0_rc1.ebuild | 49 -- .../elasticsearch_exporter-1.3.0.ebuild | 38 ++ app-metrics/grok_exporter/Manifest | 14 +- .../grok_exporter/files/grok_exporter.initd | 8 +- .../grok_exporter/grok_exporter-0.2.6.ebuild | 64 --- .../grok_exporter/grok_exporter-1.0.0_rc5.ebuild | 44 ++ app-metrics/rabbitmq_exporter/Manifest | 2 +- .../rabbitmq_exporter-0.29.0-r1.ebuild | 59 +++ .../rabbitmq_exporter-0.29.0.ebuild | 59 --- app-metrics/snmp_exporter/Manifest | 5 +- .../snmp_exporter/snmp_exporter-0.15.0.ebuild | 55 -- .../snmp_exporter/snmp_exporter-0.20.0-r1.ebuild | 48 ++ 22 files changed, 1309 insertions(+), 1504 deletions(-) delete mode 100644 app-metrics/collectd/collectd-5.12.0-r3.ebuild delete mode 100644 app-metrics/collectd/collectd-5.12.0-r4.ebuild create mode 100644 app-metrics/collectd/collectd-5.12.0-r5.ebuild create mode 100644 app-metrics/collectd/collectd-5.12.0-r6.ebuild delete mode 100644 app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.0.2.ebuild delete mode 100644 app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.0.4_rc1.ebuild delete mode 100644 app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.1.0.ebuild delete mode 100644 app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.1.0_rc1.ebuild create mode 100644 app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.3.0.ebuild delete mode 100644 app-metrics/grok_exporter/grok_exporter-0.2.6.ebuild create mode 100644 app-metrics/grok_exporter/grok_exporter-1.0.0_rc5.ebuild create mode 100644 app-metrics/rabbitmq_exporter/rabbitmq_exporter-0.29.0-r1.ebuild delete mode 100644 app-metrics/rabbitmq_exporter/rabbitmq_exporter-0.29.0.ebuild delete mode 100644 app-metrics/snmp_exporter/snmp_exporter-0.15.0.ebuild create mode 100644 app-metrics/snmp_exporter/snmp_exporter-0.20.0-r1.ebuild (limited to 'app-metrics') diff --git a/app-metrics/Manifest.gz b/app-metrics/Manifest.gz index 68d752c0057d..97ba499f169d 100644 Binary files a/app-metrics/Manifest.gz and b/app-metrics/Manifest.gz differ diff --git a/app-metrics/collectd/Manifest b/app-metrics/collectd/Manifest index aca76d739045..f622a3d4ad69 100644 --- a/app-metrics/collectd/Manifest +++ b/app-metrics/collectd/Manifest @@ -4,6 +4,6 @@ AUX collectd.initd-r2 1843 BLAKE2B ccb12e55de72565aa7b6bb0f2c4e7a5a6d15ff23d5bc7 AUX collectd.logrotate 115 BLAKE2B ce2a79787096b04af6ecd128633dde68fb868a02cc1d246c3e512c1733133fcc8da41b3ab2a0051b4da78c53e6629b2ad8085872dec1d4c28e397c88cafe3a90 SHA512 87ec01784d415f00834c2b20614f11f7e08b70f88d7c87509a8b8fd7e1af8758565b9ed6a6840af7bf1006cb941a61a6ff4f3176f6ded722728f24483b08bc8e AUX collectd.tmpfile 39 BLAKE2B 0d1ee2f02e539e854b62b47032308d08505fa31d8428e98f8d150c924201074c5edae22eea3990edf3a7837f1473193fe009a501645bf064638c532ec53a36cc SHA512 55fb70da9ece74b143c3e971b890954842230691039f8ad2240cc4c8d699e4e7a21efcbfd0b3cb2503e90af0bbdd0c7d886e09baf9fc86ec26c115a0bce6a668 DIST collectd-5.12.0.tar.bz2 1902756 BLAKE2B 9567c55b47c0ea5b7836c0d858c16a637c4a2054486a9d9ca6cd9951a92381bdf4f49d7dc0be0c9c9131802120d0af2e542a3997f01484c89ba135b3c46db795 SHA512 7a15e4c0ae587db4987d673a790a4f3bea1cab29ce24a506fb21fa7bd2f60bfec70867eaa1c1395cb5b0e0ae81a024fb6109b064da0ef50e7c146d2198871c70 -EBUILD collectd-5.12.0-r3.ebuild 19958 BLAKE2B 4d6dc70562a7b0d6157e8eb3ed9c614772eeb421c90c5c988b896c771d53ed3a7c8c39493a272d992ad5d0f7611eea190b3521434bf5f60a04b37e3cf04288f2 SHA512 c7f61f1c563877421a63e9c281c7689721dff98a98aae278ae2264331f7e2efd36fe05e220d605cd23be2ee1614e92687d8fe01199413e60bcf5a2c58d2b6210 -EBUILD collectd-5.12.0-r4.ebuild 19961 BLAKE2B aa32edf23721d3ed1929046d9e3ca44e75eeb9c8ee2a8385e47375d45e10bb4e6484e3a35781e8f580fdaf7275ddf73ec213429b0fdb66ef8513f98c48e59bd1 SHA512 deb54aeecb2620b6321f9803360057ea0720a526d85cf874962830ead8f6d2e61326f47046f62c13751d215d7b30a5e472342eaaa2be7fb61a6a7f2b55e546df +EBUILD collectd-5.12.0-r5.ebuild 19964 BLAKE2B 493a161c5b075a596b1e7e37a3ff441eeeb6bddb523677444117e647115883c2a3d7754a091bcc1c2ede8959181aa74951c397a9da1e0f8376d678da3a916017 SHA512 27cc2f269430f8ff4b4ddab8f62ac1531dfec5902f5e088b4a0f44a2dce6715f1606dfb3010ebcdd5ae9ff8bc5c897143e0a7f9453d6ff3d15abbb5021d31beb +EBUILD collectd-5.12.0-r6.ebuild 19967 BLAKE2B 07a3c9083a3d6047149460d1f938760377500162d8e82dbfaf080a0b916a2ee6cabac5f5c219b05f84376805e4aa6d60d2a0a43e302b0b1fbfb9ec0ce6aedeff SHA512 c03f2c1c704e39fe072be1a57a379e9f0d5e360c11e8d39ae396eb6ea97d1aef45a31fbdd079bd359147b45774b7d2a58e9e31248d785313927072eae93827f8 MISC metadata.xml 1516 BLAKE2B eeea8862f3581f61af71394f5862cc88940d7831b3f0902e04fd4f7231cc07f100dc711222b8be6815e36cd683908861b61aeca5f2483623de0b29fd6dea0e11 SHA512 1e7aaf9759e726767b11e5be8e114fdb3b993c035db614f98d2fc31583bfb17951e8eb1c56eb8fdf56b375c05b97e67ce1efd7c4bd2e72ec60b0dfa0eaf67302 diff --git a/app-metrics/collectd/collectd-5.12.0-r3.ebuild b/app-metrics/collectd/collectd-5.12.0-r3.ebuild deleted file mode 100644 index 90d4dfa6324a..000000000000 --- a/app-metrics/collectd/collectd-5.12.0-r3.ebuild +++ /dev/null @@ -1,552 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -JAVA_PKG_OPT_USE="collectd_plugins_java" -LUA_COMPAT=( lua5-{1..3} ) -PYTHON_COMPAT=( python3_{7..9} ) - -inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info lua-single \ - multilib perl-functions python-single-r1 systemd tmpfiles udev - -DESCRIPTION="Collects system statistics and provides mechanisms to store the values" - -HOMEPAGE="https://collectd.org/" -SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.bz2" - -LICENSE="MIT GPL-2 GPL-2+ GPL-3 GPL-3+" -SLOT="0" -KEYWORDS="~alpha amd64 arm x86" -IUSE="contrib debug java perl selinux static-libs udev xfs" - -# The plugin lists have to follow here since they extend IUSE - -# Plugins that don't build (e.g. dependencies not in Gentoo) -# apple_sensors: Requires libIOKit -# amqp1: Requires libqpid-proton -# aquaero: Requires aerotools-ng/libaquaero5 -# barometer: Requires libi2c (i2c_smbus_read_i2c_block_data) -# dpdkevents: Requires dpdk -# dpdkstat: Requires dpdk -# dpdk_telemetry: Requires dpdk -# grpc: Requires libgrpc -# intel_pmu: Requires libjevents (pmu-tools) -# intel_rdt: Requires libpqos from intel-cmt-cat project -# lpar: Requires libperfstat (AIX only) -# mic: Requires Intel Many Integrated Core Architecture API -# (part of Intel's Xeon Phi software) -# netapp: Requires libnetapp (http://communities.netapp.com/docs/DOC-1110) -# onewire: Requires sys-fs/owfs which was removed from repository -# pf: Requires BSD packet filter -# pinba: Requires MySQL Pinba engine (http://pinba.org/) -# redfish: Requires libredfish -# tape: Requires libkstat (Solaris only) -# tokyotyrant: Requires tokyotyrant -# write_riemann: Requires riemann-c-client -# xmms: Requires libxmms (v1) -# zone: Solaris only... -COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors amqp1 aquaero barometer - dpdkevents dpdkstat dpdk_telemetry grpc intel_pmu intel_rdt lpar - mic netapp onewire pf pinba redfish tape tokyotyrant write_riemann - xmms zone" - -# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS -COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind - buddyinfo capabilities ceph cgroups check_uptime chrony connectivity - conntrack contextswitch cpu cpufreq cpusleep csv curl curl_json - curl_xml dbi df disk dns drbd email entropy ethstat exec fhcount - filecount fscache gmond gps gpu_nvidia hddtemp hugepages interface ipc - ipmi iptables ipvs irq java lua load logfile logparser log_logstash - madwifi match_empty_counter match_hashed match_regex match_timediff - match_value mbmon mcelog md memcachec memcached memory modbus mqtt - multimeter mysql netlink network network nfs nginx notify_desktop - notify_email notify_nagios ntpd numa nut olsrd onewire openldap - openvpn oracle ovs_events ovs_stats pcie_errors perl ping postgresql - powerdns procevent processes protocols python redis routeros - rrdcached rrdtool sensors serial sigrok slurm smart snmp snmp_agent - statsd swap synproxy sysevent syslog table tail tail_csv - target_notification target_replace target_scale target_set tcpconns - teamspeak2 ted thermal threshold turbostat ubi unixsock uptime users - uuid varnish virt vmem vserver wireless write_graphite write_http - write_influxdb_udp write_kafka write_log write_mongodb write_prometheus - write_redis write_sensu write_stackdriver write_syslog write_tsdb - xencpu zfs_arc zookeeper" - -COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}" - -COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS} - -for plugin in ${COLLECTD_ALL_PLUGINS}; do - IUSE="${IUSE} collectd_plugins_${plugin}" -done -unset plugin - -# Now come the dependencies. - -COMMON_DEPEND=" - acct-group/collectd - acct-user/collectd - dev-libs/libgcrypt:= - dev-libs/libltdl:0= - sys-libs/libcap - perl? ( dev-lang/perl:=[ithreads] ) - udev? ( virtual/udev ) - xfs? ( sys-fs/xfsprogs ) - collectd_plugins_amqp? ( net-libs/rabbitmq-c ) - collectd_plugins_apache? ( net-misc/curl:0= ) - collectd_plugins_ascent? ( net-misc/curl:0= dev-libs/libxml2:2= ) - collectd_plugins_bind? ( net-misc/curl:0= dev-libs/libxml2:2= ) - collectd_plugins_ceph? ( dev-libs/yajl:= ) - collectd_plugins_capabilities? ( dev-libs/jansson net-libs/libmicrohttpd:= ) - collectd_plugins_connectivity? ( dev-libs/yajl:= net-libs/libmnl ) - collectd_plugins_curl? ( net-misc/curl:0= ) - collectd_plugins_curl_json? ( net-misc/curl:0= dev-libs/yajl:= ) - collectd_plugins_curl_xml? ( net-misc/curl:0= dev-libs/libxml2:2= ) - collectd_plugins_dbi? ( dev-db/libdbi ) - collectd_plugins_dns? ( net-libs/libpcap ) - collectd_plugins_gmond? ( sys-cluster/ganglia ) - collectd_plugins_gps? ( sci-geosciences/gpsd:= ) - collectd_plugins_gpu_nvidia? ( dev-util/nvidia-cuda-toolkit ) - collectd_plugins_ipmi? ( >=sys-libs/openipmi-2.0.16-r1 ) - collectd_plugins_iptables? ( >=net-firewall/iptables-1.4.13:0= ) - collectd_plugins_log_logstash? ( dev-libs/yajl:= ) - collectd_plugins_lua? ( ${LUA_DEPS} ) - collectd_plugins_memcachec? ( dev-libs/libmemcached ) - collectd_plugins_modbus? ( dev-libs/libmodbus ) - collectd_plugins_mqtt? ( app-misc/mosquitto ) - collectd_plugins_mysql? ( dev-db/mysql-connector-c:= ) - collectd_plugins_netlink? ( net-libs/libmnl ) - collectd_plugins_nginx? ( net-misc/curl:0= ) - collectd_plugins_notify_desktop? ( x11-libs/libnotify ) - collectd_plugins_notify_email? ( net-libs/libesmtp:= ) - collectd_plugins_nut? ( >=sys-power/nut-2.7.2-r2 ) - collectd_plugins_openldap? ( net-nds/openldap ) - collectd_plugins_oracle? ( dev-db/oracle-instantclient[sdk] ) - collectd_plugins_ovs_events? ( dev-libs/yajl:= ) - collectd_plugins_ovs_stats? ( dev-libs/yajl:= ) - collectd_plugins_perl? ( dev-lang/perl:=[ithreads] ) - collectd_plugins_ping? ( net-libs/liboping ) - collectd_plugins_postgresql? ( dev-db/postgresql:= ) - collectd_plugins_procevent? ( dev-libs/yajl:= ) - collectd_plugins_python? ( ${PYTHON_DEPS} ) - collectd_plugins_redis? ( dev-libs/hiredis:= ) - collectd_plugins_routeros? ( net-libs/librouteros ) - collectd_plugins_rrdcached? ( net-analyzer/rrdtool:= ) - collectd_plugins_rrdtool? ( net-analyzer/rrdtool:= ) - collectd_plugins_sensors? ( sys-apps/lm-sensors:= ) - collectd_plugins_sigrok? ( >=sci-libs/libsigrok-0.4:= dev-libs/glib:2 ) - collectd_plugins_slurm? ( sys-cluster/slurm ) - collectd_plugins_smart? ( dev-libs/libatasmart:0= ) - collectd_plugins_snmp? ( net-analyzer/net-snmp ) - collectd_plugins_snmp_agent? ( net-analyzer/net-snmp ) - collectd_plugins_sysevent? ( dev-libs/yajl:= ) - collectd_plugins_varnish? ( www-servers/varnish:= ) - collectd_plugins_virt? ( app-emulation/libvirt:= dev-libs/libxml2:2= ) - collectd_plugins_write_http? ( net-misc/curl:0= dev-libs/yajl:= ) - collectd_plugins_write_kafka? ( >=dev-libs/librdkafka-0.9.0.99:= dev-libs/yajl:= ) - collectd_plugins_write_mongodb? ( >=dev-libs/mongo-c-driver-1.8.2:= ) - collectd_plugins_write_prometheus? ( >=dev-libs/protobuf-c-1.2.1-r1:= net-libs/libmicrohttpd:= ) - collectd_plugins_write_redis? ( dev-libs/hiredis:= ) - collectd_plugins_write_stackdriver? ( net-misc/curl:0= dev-libs/yajl:= ) - collectd_plugins_xencpu? ( app-emulation/xen-tools:= ) -" - -# FIXME: should virtual/jdk be here as well? -BDEPEND="virtual/pkgconfig" - -# Enforcing !=sys-kernel/linux-headers-4.5 > due to #577846 -DEPEND="${COMMON_DEPEND} - collectd_plugins_iptables? ( || ( <=sys-kernel/linux-headers-4.4 >=sys-kernel/linux-headers-4.6 ) ) - collectd_plugins_java? ( >=virtual/jdk-1.6 )" - -RDEPEND="${COMMON_DEPEND} - collectd_plugins_java? ( >=virtual/jre-1.6 ) - collectd_plugins_syslog? ( virtual/logger ) - selinux? ( sec-policy/selinux-collectd )" - -REQUIRED_USE=" - collectd_plugins_lua? ( ${LUA_REQUIRED_USE} ) - collectd_plugins_python? ( ${PYTHON_REQUIRED_USE} ) - collectd_plugins_smart? ( udev ) - contrib? ( perl )" - -PATCHES=( "${FILESDIR}"/${PN}-5.11.0-libsigrok-0.4+.patch ) - -# @FUNCTION: collectd_plugin_kernel_linux -# @DESCRIPTION: -# USAGE: -# kernel_options is a list of kernel configurations options; the check tests whether at least -# one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message -# is emitted. -collectd_plugin_kernel_linux() { - local multi_opt opt - if has ${1} ${COLLECTD_ALL_PLUGINS}; then - if use collectd_plugins_${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} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel" - ;; - (warn) - ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel" - ;; - (error) - eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel" - ;; - (*) - die "function collectd_plugin_kernel_linux called with invalid third argument" - ;; - esac - fi - fi -} - -collectd_linux_kernel_checks() { - if ! linux_chkconfig_present PROC_FS; then - ewarn "/proc file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable PROC_FS in your kernel" - fi - - if ! linux_chkconfig_present SYSFS; then - ewarn "/sys file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable SYSFS in your kernel" - fi - - # battery.c: /proc/pmu/battery_%i - # battery.c: /proc/acpi/battery - collectd_plugin_kernel_linux battery ACPI_BATTERY warn - - # cgroups.c: /sys/fs/cgroup/ - collectd_plugin_kernel_linux cgroups CGROUPS warn - - # 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 - - # drbd.c: /proc/drbd - collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn - - # conntrack.c: /proc/sys/net/netfilter/* - collectd_plugin_kernel_linux conntrack NETFILTER warn - - # fscache.c: /proc/fs/fscache/stats - collectd_plugin_kernel_linux fscache FSCACHE warn - - # nfs.c: /proc/net/rpc/nfs - # nfs.c: /proc/net/rpc/nfsd - collectd_plugin_kernel_linux nfs NFS_COMMON warn - - # serial.c: /proc/tty/driver/serial - # serial.c: /proc/tty/driver/ttyS - collectd_plugin_kernel_linux serial SERIAL_CORE warn - - # swap.c: /proc/meminfo - collectd_plugin_kernel_linux swap SWAP warn - - # thermal.c: /proc/acpi/thermal_zone - # thermal.c: /sys/class/thermal - collectd_plugin_kernel_linux thermal ACPI_THERMAL warn - - # turbostat.c: /dev/cpu/%d/msr - collectd_plugin_kernel_linux turbostat X86_MSR warn - - # vmem.c: /proc/vmstat - collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn - - # vserver.c: /proc/virtual - collectd_plugin_kernel_linux vserver VSERVER warn - - # uuid.c: /sys/hypervisor/uuid - collectd_plugin_kernel_linux uuid SYSFS info - - # wireless.c: /proc/net/wireless - collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn - - # zfs_arc.c: /proc/spl/kstat/zfs/arcstats - collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn -} - -pkg_setup() { - if use kernel_linux; then - linux-info_pkg_setup - - if linux_config_exists; then - einfo "Checking your linux kernel configuration:" - collectd_linux_kernel_checks - else - elog "Cannot find a linux kernel configuration. Continuing anyway." - fi - fi - - if use collectd_plugins_java; then - java-pkg-opt-2_pkg_setup - fi - - use collectd_plugins_lua && lua-single_pkg_setup - use collectd_plugins_python && python-single-r1_pkg_setup -} - -src_prepare() { - default - - # 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 - - # Adjust upstream's systemd unit - # - Get rid of EnvironmentFile directive; These files don't exist on Gentoo! - # - Add User=collectd to run collectd as user "collectd" per default - sed -i \ - -e '/^EnvironmentFile=.*/d' \ - -e '/^\[Service\]/aUser=collectd' \ - contrib/systemd.${PN}.service || die - - eautoreconf -} - -src_configure() { - # Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here - # should work independent of the operating system. - - local linux_plugins="barometer battery cpu cpufreq disk - drbd entropy ethstat hugepages interface iptables - ipvs irq ipc load memory md netlink nfs numa processes - serial swap tcpconns thermal turbostat users vmem wireless - zfc_arc" - - local need_libstatgrab=0 - local libstatgrab_plugins="cpu disk interface load memory swap users" - local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc" - - local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns" - - local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}" - local myos_plugins="" - if use kernel_linux; then - einfo "Enabling Linux plugins." - myos_plugins=${linux_plugins} - elif use kernel_Darwin; then - einfo "Enabling Darwin plugins." - myos_plugins=${darwin_plugins} - fi - - local myconf="--disable-werror" - - # Do we debug? - myconf+=" $(use_enable debug)" - - # udev support? - # Required for smart plugin via REQUIRED_USE; Optional for disk plugin - if use udev; then - myconf+=" --with-libudev" - else - myconf+=" --without-libudev" - fi - - local plugin - - # Disable what needs to be disabled. - for plugin in ${COLLECTD_DISABLED_PLUGINS}; do - if [[ "${plugin}" == 'dpdkstat' ]]; then - myconf+=" --without-libdpdk" - else - myconf+=" --disable-${plugin}" - fi - done - - # Set enable/disable for each single plugin. - for plugin in ${COLLECTD_ALL_PLUGINS}; do - if has ${plugin} ${osdependent_plugins}; then - # plugin is os-dependent ... - if has ${plugin} ${myos_plugins}; then - # ... and available in this os - myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" - else - # ... and NOT available in this os - if use collectd_plugins_${plugin}; then - ewarn "You try to enable the ${plugin} plugin, but it is not available for this" - ewarn "kernel. Disabling it automatically." - fi - myconf+=" --disable-${plugin}" - fi - elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then - if use collectd_plugins_perl && ! use perl; then - ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag" - myconf+= --disable-perl - else - myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" - fi - else - myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" - fi - done - - if [ "${need_libstatgrab}" -eq 1 ]; then - myconf+=" --with-libstatgrab" - else - myconf+=" --without-libstatgrab" - fi - - # JAVA_HOME is set by eclasses. - if use collectd_plugins_java; then - myconf+=" --with-java" - fi - - # Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens. - # lots of libs are only needed for plugins, if they are disabled, also disable the lib - use collectd_plugins_iptables || myconf+=" --with-libiptc=no" - use collectd_plugins_openldap || myconf+=" --with-libldap=no" - use collectd_plugins_redis || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no" - use collectd_plugins_smart || myconf+=" --with-libatasmart=no" - use collectd_plugins_gps || myconf+=" --with-libgps=no" - - if use collectd_plugins_gpu_nvidia; then - myconf+=" --with-cuda=${EPREFIX}/opt/cuda" - else - myconf+=" --with-cuda=no" - fi - - if use perl; then - myconf+=" --with-perl-bindings=INSTALLDIRS=vendor" - else - myconf+=" --without-perl-bindings" - fi - - # No need for v5upgrade - myconf+=" --disable-target_v5upgrade" - - # Python - if use collectd_plugins_python; then - myconf+=" --with-libpython=yes" - export PYTHON_CONFIG=$(python_get_PYTHON_CONFIG) - else - myconf+=" --with-libpython=no" - fi - - # XFS support - myconf+=" $(use_enable xfs)" - - # Finally, run econf. - KERNEL_DIR="${KERNEL_DIR}" econf --config-cache \ - $(use_enable static-libs static) \ - --localstatedir=/var ${myconf} -} - -src_install() { - emake DESTDIR="${D}" install - - perl_delete_localpod - - find "${ED}"/usr/ -name "*.la" -delete || die - - if use collectd_plugins_java; then - java-pkg_regjar "${ED}"/usr/share/${PN}/java/*.jar - fi - - if use collectd_plugins_disk && use udev; then - udev_newrules contrib/99-storage-collectd.rules 60-persistent-storage-collectd.rules - fi - - fowners root:collectd /etc/collectd.conf - fperms u=rw,g=r,o= /etc/collectd.conf - - einstalldocs - - if use contrib; then - insinto /usr/share/${PN} - doins -r contrib - fi - - keepdir /var/lib/${PN} - fowners collectd:collectd /var/lib/${PN} - - newinitd "${FILESDIR}/${PN}.initd-r2" ${PN} - newconfd "${FILESDIR}/${PN}.confd-r2" ${PN} - systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service - - insinto /etc/logrotate.d - newins "${FILESDIR}/${PN}.logrotate" ${PN} - - newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf - - sed -i -e 's:^.*PIDFile "/var/run/collectd.pid":#PIDFile "/run/collectd.pid":' "${ED}"/etc/collectd.conf || die - sed -i -e 's:^# SocketFile "/var/run/collectd-unixsock":# SocketFile "/run/collectd/collectd.socket":' "${ED}"/etc/collectd.conf || die - sed -i -e 's:^.*LoadPlugin perl$:# The new, correct way to load the perl plugin -- \n# \n# Globals true\n# :' "${ED}"/etc/collectd.conf || die - sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# \n# Globals true\n# :' "${ED}"/etc/collectd.conf || die -} - -pkg_postinst() { - tmpfiles_process "${PN}.conf" - - if use filecaps; then - local caps=() - 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') - - if use collectd_plugins_dns || use collectd_plugins_ping; then - caps+=('CAP_NET_RAW') - fi - - if use collectd_plugins_turbostat || use collectd_plugins_smart; then - caps+=('CAP_SYS_RAWIO') - fi - - if [ ${#caps[@]} -gt 0 ]; then - local caps_str=$(IFS=","; echo "${caps[*]}") - fcaps ${caps_str} usr/sbin/collectd - elog "Capabilities for ${EROOT}/usr/sbin/collectd set to:" - elog " ${caps_str}+EP" - elog - - local systemd_unit="$(systemd_get_systemunitdir)/collectd.service" - if [[ -e "${systemd_unit}" ]]; then - caps_str="${caps[*]}" - sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \ - die "Failed to set CapabilityBoundingSet in '${systemd_unit}'" - - elog "CapabilityBoundingSet in '${systemd_unit}'" - elog "updated to match capabilities set above." - elog - else - if has_version "sys-apps/systemd"; then - # Bug 596852 - ewarn "Failed to update CapabilityBoundingSet in '${systemd_unit}'" - ewarn "because unit was not found. Please file a bug about this." - fi - fi - fi - fi - - elog "Note: Collectd is only the collector." - elog " You need to install 'data' sources (applications) locally or" - elog " remotely on your own." - - elog - elog "Collectd is configured to run as unprivileged user by default." - elog "You may want to revisit the configuration." - elog - - if use collectd_plugins_email; then - ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin." - fi - - if use collectd_plugins_smart; then - elog "" - elog "If you are using smart plugin and don't run collectd as root make sure" - elog "that the collectd user is allowed to access the disk you want to monitor" - elog "(can be done via udev rule for example) and that collectd has the required" - elog "capabilities set (which is the default when package was emerged with" - elog "'filecaps' USE flag set)." - fi - - if use contrib; then - elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser," - elog "dev-perl/CGI, dev-perl/Config-General and net-analyzer/rrdtool[perl] to be installed." - fi -} diff --git a/app-metrics/collectd/collectd-5.12.0-r4.ebuild b/app-metrics/collectd/collectd-5.12.0-r4.ebuild deleted file mode 100644 index 6e2aae300ac5..000000000000 --- a/app-metrics/collectd/collectd-5.12.0-r4.ebuild +++ /dev/null @@ -1,552 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -JAVA_PKG_OPT_USE="collectd_plugins_java" -LUA_COMPAT=( lua5-{1..3} ) -PYTHON_COMPAT=( python3_{7..9} ) - -inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info lua-single \ - multilib perl-functions python-single-r1 systemd tmpfiles udev - -DESCRIPTION="Collects system statistics and provides mechanisms to store the values" - -HOMEPAGE="https://collectd.org/" -SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.bz2" - -LICENSE="MIT GPL-2 GPL-2+ GPL-3 GPL-3+" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~x86" -IUSE="contrib debug java perl selinux static-libs udev xfs" - -# The plugin lists have to follow here since they extend IUSE - -# Plugins that don't build (e.g. dependencies not in Gentoo) -# apple_sensors: Requires libIOKit -# amqp1: Requires libqpid-proton -# aquaero: Requires aerotools-ng/libaquaero5 -# barometer: Requires libi2c (i2c_smbus_read_i2c_block_data) -# dpdkevents: Requires dpdk -# dpdkstat: Requires dpdk -# dpdk_telemetry: Requires dpdk -# grpc: Requires libgrpc -# intel_pmu: Requires libjevents (pmu-tools) -# intel_rdt: Requires libpqos from intel-cmt-cat project -# lpar: Requires libperfstat (AIX only) -# mic: Requires Intel Many Integrated Core Architecture API -# (part of Intel's Xeon Phi software) -# netapp: Requires libnetapp (http://communities.netapp.com/docs/DOC-1110) -# onewire: Requires sys-fs/owfs which was removed from repository -# pf: Requires BSD packet filter -# pinba: Requires MySQL Pinba engine (http://pinba.org/) -# redfish: Requires libredfish -# tape: Requires libkstat (Solaris only) -# tokyotyrant: Requires tokyotyrant -# write_riemann: Requires riemann-c-client -# xmms: Requires libxmms (v1) -# zone: Solaris only... -COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors amqp1 aquaero barometer - dpdkevents dpdkstat dpdk_telemetry grpc intel_pmu intel_rdt lpar - mic netapp onewire pf pinba redfish tape tokyotyrant write_riemann - xmms zone" - -# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS -COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind - buddyinfo capabilities ceph cgroups check_uptime chrony connectivity - conntrack contextswitch cpu cpufreq cpusleep csv curl curl_json - curl_xml dbi df disk dns drbd email entropy ethstat exec fhcount - filecount fscache gmond gps gpu_nvidia hddtemp hugepages interface ipc - ipmi iptables ipvs irq java lua load logfile logparser log_logstash - madwifi match_empty_counter match_hashed match_regex match_timediff - match_value mbmon mcelog md memcachec memcached memory modbus mqtt - multimeter mysql netlink network network nfs nginx notify_desktop - notify_email notify_nagios ntpd numa nut olsrd onewire openldap - openvpn oracle ovs_events ovs_stats pcie_errors perl ping postgresql - powerdns procevent processes protocols python redis routeros - rrdcached rrdtool sensors serial sigrok slurm smart snmp snmp_agent - statsd swap synproxy sysevent syslog table tail tail_csv - target_notification target_replace target_scale target_set tcpconns - teamspeak2 ted thermal threshold turbostat ubi unixsock uptime users - uuid varnish virt vmem vserver wireless write_graphite write_http - write_influxdb_udp write_kafka write_log write_mongodb write_prometheus - write_redis write_sensu write_stackdriver write_syslog write_tsdb - xencpu zfs_arc zookeeper" - -COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}" - -COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS} - -for plugin in ${COLLECTD_ALL_PLUGINS}; do - IUSE="${IUSE} collectd_plugins_${plugin}" -done -unset plugin - -# Now come the dependencies. - -COMMON_DEPEND=" - acct-group/collectd - acct-user/collectd - dev-libs/libgcrypt:= - dev-libs/libltdl:0= - sys-libs/libcap - perl? ( dev-lang/perl:=[ithreads] ) - udev? ( virtual/udev ) - xfs? ( sys-fs/xfsprogs ) - collectd_plugins_amqp? ( net-libs/rabbitmq-c ) - collectd_plugins_apache? ( net-misc/curl:0= ) - collectd_plugins_ascent? ( net-misc/curl:0= dev-libs/libxml2:2= ) - collectd_plugins_bind? ( net-misc/curl:0= dev-libs/libxml2:2= ) - collectd_plugins_ceph? ( dev-libs/yajl:= ) - collectd_plugins_capabilities? ( dev-libs/jansson net-libs/libmicrohttpd:= ) - collectd_plugins_connectivity? ( dev-libs/yajl:= net-libs/libmnl ) - collectd_plugins_curl? ( net-misc/curl:0= ) - collectd_plugins_curl_json? ( net-misc/curl:0= dev-libs/yajl:= ) - collectd_plugins_curl_xml? ( net-misc/curl:0= dev-libs/libxml2:2= ) - collectd_plugins_dbi? ( dev-db/libdbi ) - collectd_plugins_dns? ( net-libs/libpcap ) - collectd_plugins_gmond? ( sys-cluster/ganglia ) - collectd_plugins_gps? ( sci-geosciences/gpsd:= ) - collectd_plugins_gpu_nvidia? ( dev-util/nvidia-cuda-toolkit ) - collectd_plugins_ipmi? ( >=sys-libs/openipmi-2.0.16-r1 ) - collectd_plugins_iptables? ( >=net-firewall/iptables-1.4.13:0= ) - collectd_plugins_log_logstash? ( dev-libs/yajl:= ) - collectd_plugins_lua? ( ${LUA_DEPS} ) - collectd_plugins_memcachec? ( dev-libs/libmemcached ) - collectd_plugins_modbus? ( dev-libs/libmodbus ) - collectd_plugins_mqtt? ( app-misc/mosquitto ) - collectd_plugins_mysql? ( dev-db/mysql-connector-c:= ) - collectd_plugins_netlink? ( net-libs/libmnl ) - collectd_plugins_nginx? ( net-misc/curl:0= ) - collectd_plugins_notify_desktop? ( x11-libs/libnotify ) - collectd_plugins_notify_email? ( net-libs/libesmtp:= ) - collectd_plugins_nut? ( >=sys-power/nut-2.7.2-r2 ) - collectd_plugins_openldap? ( net-nds/openldap ) - collectd_plugins_oracle? ( dev-db/oracle-instantclient[sdk] ) - collectd_plugins_ovs_events? ( dev-libs/yajl:= ) - collectd_plugins_ovs_stats? ( dev-libs/yajl:= ) - collectd_plugins_perl? ( dev-lang/perl:=[ithreads] ) - collectd_plugins_ping? ( net-libs/liboping ) - collectd_plugins_postgresql? ( dev-db/postgresql:= ) - collectd_plugins_procevent? ( dev-libs/yajl:= ) - collectd_plugins_python? ( ${PYTHON_DEPS} ) - collectd_plugins_redis? ( dev-libs/hiredis:= ) - collectd_plugins_routeros? ( net-libs/librouteros ) - collectd_plugins_rrdcached? ( net-analyzer/rrdtool:= ) - collectd_plugins_rrdtool? ( net-analyzer/rrdtool:= ) - collectd_plugins_sensors? ( sys-apps/lm-sensors:= ) - collectd_plugins_sigrok? ( >=sci-libs/libsigrok-0.4:= dev-libs/glib:2 ) - collectd_plugins_slurm? ( sys-cluster/slurm ) - collectd_plugins_smart? ( dev-libs/libatasmart:0= ) - collectd_plugins_snmp? ( net-analyzer/net-snmp ) - collectd_plugins_snmp_agent? ( net-analyzer/net-snmp ) - collectd_plugins_sysevent? ( dev-libs/yajl:= ) - collectd_plugins_varnish? ( www-servers/varnish:= ) - collectd_plugins_virt? ( app-emulation/libvirt:= dev-libs/libxml2:2= ) - collectd_plugins_write_http? ( net-misc/curl:0= dev-libs/yajl:= ) - collectd_plugins_write_kafka? ( >=dev-libs/librdkafka-0.9.0.99:= dev-libs/yajl:= ) - collectd_plugins_write_mongodb? ( >=dev-libs/mongo-c-driver-1.8.2:= ) - collectd_plugins_write_prometheus? ( >=dev-libs/protobuf-c-1.2.1-r1:= net-libs/libmicrohttpd:= ) - collectd_plugins_write_redis? ( dev-libs/hiredis:= ) - collectd_plugins_write_stackdriver? ( net-misc/curl:0= dev-libs/yajl:= ) - collectd_plugins_xencpu? ( app-emulation/xen-tools:= ) -" - -# FIXME: should virtual/jdk be here as well? -BDEPEND="virtual/pkgconfig" - -# Enforcing !=sys-kernel/linux-headers-4.5 > due to #577846 -DEPEND="${COMMON_DEPEND} - collectd_plugins_iptables? ( || ( <=sys-kernel/linux-headers-4.4 >=sys-kernel/linux-headers-4.6 ) ) - collectd_plugins_java? ( >=virtual/jdk-1.8 )" - -RDEPEND="${COMMON_DEPEND} - collectd_plugins_java? ( >=virtual/jre-1.8 ) - collectd_plugins_syslog? ( virtual/logger ) - selinux? ( sec-policy/selinux-collectd )" - -REQUIRED_USE=" - collectd_plugins_lua? ( ${LUA_REQUIRED_USE} ) - collectd_plugins_python? ( ${PYTHON_REQUIRED_USE} ) - collectd_plugins_smart? ( udev ) - contrib? ( perl )" - -PATCHES=( "${FILESDIR}"/${PN}-5.11.0-libsigrok-0.4+.patch ) - -# @FUNCTION: collectd_plugin_kernel_linux -# @DESCRIPTION: -# USAGE: -# kernel_options is a list of kernel configurations options; the check tests whether at least -# one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message -# is emitted. -collectd_plugin_kernel_linux() { - local multi_opt opt - if has ${1} ${COLLECTD_ALL_PLUGINS}; then - if use collectd_plugins_${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} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel" - ;; - (warn) - ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel" - ;; - (error) - eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel" - ;; - (*) - die "function collectd_plugin_kernel_linux called with invalid third argument" - ;; - esac - fi - fi -} - -collectd_linux_kernel_checks() { - if ! linux_chkconfig_present PROC_FS; then - ewarn "/proc file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable PROC_FS in your kernel" - fi - - if ! linux_chkconfig_present SYSFS; then - ewarn "/sys file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable SYSFS in your kernel" - fi - - # battery.c: /proc/pmu/battery_%i - # battery.c: /proc/acpi/battery - collectd_plugin_kernel_linux battery ACPI_BATTERY warn - - # cgroups.c: /sys/fs/cgroup/ - collectd_plugin_kernel_linux cgroups CGROUPS warn - - # 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 - - # drbd.c: /proc/drbd - collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn - - # conntrack.c: /proc/sys/net/netfilter/* - collectd_plugin_kernel_linux conntrack NETFILTER warn - - # fscache.c: /proc/fs/fscache/stats - collectd_plugin_kernel_linux fscache FSCACHE warn - - # nfs.c: /proc/net/rpc/nfs - # nfs.c: /proc/net/rpc/nfsd - collectd_plugin_kernel_linux nfs NFS_COMMON warn - - # serial.c: /proc/tty/driver/serial - # serial.c: /proc/tty/driver/ttyS - collectd_plugin_kernel_linux serial SERIAL_CORE warn - - # swap.c: /proc/meminfo - collectd_plugin_kernel_linux swap SWAP warn - - # thermal.c: /proc/acpi/thermal_zone - # thermal.c: /sys/class/thermal - collectd_plugin_kernel_linux thermal ACPI_THERMAL warn - - # turbostat.c: /dev/cpu/%d/msr - collectd_plugin_kernel_linux turbostat X86_MSR warn - - # vmem.c: /proc/vmstat - collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn - - # vserver.c: /proc/virtual - collectd_plugin_kernel_linux vserver VSERVER warn - - # uuid.c: /sys/hypervisor/uuid - collectd_plugin_kernel_linux uuid SYSFS info - - # wireless.c: /proc/net/wireless - collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn - - # zfs_arc.c: /proc/spl/kstat/zfs/arcstats - collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn -} - -pkg_setup() { - if use kernel_linux; then - linux-info_pkg_setup - - if linux_config_exists; then - einfo "Checking your linux kernel configuration:" - collectd_linux_kernel_checks - else - elog "Cannot find a linux kernel configuration. Continuing anyway." - fi - fi - - if use collectd_plugins_java; then - java-pkg-opt-2_pkg_setup - fi - - use collectd_plugins_lua && lua-single_pkg_setup - use collectd_plugins_python && python-single-r1_pkg_setup -} - -src_prepare() { - default - - # 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 - - # Adjust upstream's systemd unit - # - Get rid of EnvironmentFile directive; These files don't exist on Gentoo! - # - Add User=collectd to run collectd as user "collectd" per default - sed -i \ - -e '/^EnvironmentFile=.*/d' \ - -e '/^\[Service\]/aUser=collectd' \ - contrib/systemd.${PN}.service || die - - eautoreconf -} - -src_configure() { - # Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here - # should work independent of the operating system. - - local linux_plugins="barometer battery cpu cpufreq disk - drbd entropy ethstat hugepages interface iptables - ipvs irq ipc load memory md netlink nfs numa processes - serial swap tcpconns thermal turbostat users vmem wireless - zfc_arc" - - local need_libstatgrab=0 - local libstatgrab_plugins="cpu disk interface load memory swap users" - local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc" - - local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns" - - local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}" - local myos_plugins="" - if use kernel_linux; then - einfo "Enabling Linux plugins." - myos_plugins=${linux_plugins} - elif use kernel_Darwin; then - einfo "Enabling Darwin plugins." - myos_plugins=${darwin_plugins} - fi - - local myconf="--disable-werror" - - # Do we debug? - myconf+=" $(use_enable debug)" - - # udev support? - # Required for smart plugin via REQUIRED_USE; Optional for disk plugin - if use udev; then - myconf+=" --with-libudev" - else - myconf+=" --without-libudev" - fi - - local plugin - - # Disable what needs to be disabled. - for plugin in ${COLLECTD_DISABLED_PLUGINS}; do - if [[ "${plugin}" == 'dpdkstat' ]]; then - myconf+=" --without-libdpdk" - else - myconf+=" --disable-${plugin}" - fi - done - - # Set enable/disable for each single plugin. - for plugin in ${COLLECTD_ALL_PLUGINS}; do - if has ${plugin} ${osdependent_plugins}; then - # plugin is os-dependent ... - if has ${plugin} ${myos_plugins}; then - # ... and available in this os - myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" - else - # ... and NOT available in this os - if use collectd_plugins_${plugin}; then - ewarn "You try to enable the ${plugin} plugin, but it is not available for this" - ewarn "kernel. Disabling it automatically." - fi - myconf+=" --disable-${plugin}" - fi - elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then - if use collectd_plugins_perl && ! use perl; then - ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag" - myconf+= --disable-perl - else - myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" - fi - else - myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" - fi - done - - if [ "${need_libstatgrab}" -eq 1 ]; then - myconf+=" --with-libstatgrab" - else - myconf+=" --without-libstatgrab" - fi - - # JAVA_HOME is set by eclasses. - if use collectd_plugins_java; then - myconf+=" --with-java" - fi - - # Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens. - # lots of libs are only needed for plugins, if they are disabled, also disable the lib - use collectd_plugins_iptables || myconf+=" --with-libiptc=no" - use collectd_plugins_openldap || myconf+=" --with-libldap=no" - use collectd_plugins_redis || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no" - use collectd_plugins_smart || myconf+=" --with-libatasmart=no" - use collectd_plugins_gps || myconf+=" --with-libgps=no" - - if use collectd_plugins_gpu_nvidia; then - myconf+=" --with-cuda=${EPREFIX}/opt/cuda" - else - myconf+=" --with-cuda=no" - fi - - if use perl; then - myconf+=" --with-perl-bindings=INSTALLDIRS=vendor" - else - myconf+=" --without-perl-bindings" - fi - - # No need for v5upgrade - myconf+=" --disable-target_v5upgrade" - - # Python - if use collectd_plugins_python; then - myconf+=" --with-libpython=yes" - export PYTHON_CONFIG=$(python_get_PYTHON_CONFIG) - else - myconf+=" --with-libpython=no" - fi - - # XFS support - myconf+=" $(use_enable xfs)" - - # Finally, run econf. - KERNEL_DIR="${KERNEL_DIR}" econf --config-cache \ - $(use_enable static-libs static) \ - --localstatedir=/var ${myconf} -} - -src_install() { - emake DESTDIR="${D}" install - - perl_delete_localpod - - find "${ED}"/usr/ -name "*.la" -delete || die - - if use collectd_plugins_java; then - java-pkg_regjar "${ED}"/usr/share/${PN}/java/*.jar - fi - - if use collectd_plugins_disk && use udev; then - udev_newrules contrib/99-storage-collectd.rules 60-persistent-storage-collectd.rules - fi - - fowners root:collectd /etc/collectd.conf - fperms u=rw,g=r,o= /etc/collectd.conf - - einstalldocs - - if use contrib; then - insinto /usr/share/${PN} - doins -r contrib - fi - - keepdir /var/lib/${PN} - fowners collectd:collectd /var/lib/${PN} - - newinitd "${FILESDIR}/${PN}.initd-r2" ${PN} - newconfd "${FILESDIR}/${PN}.confd-r2" ${PN} - systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service - - insinto /etc/logrotate.d - newins "${FILESDIR}/${PN}.logrotate" ${PN} - - newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf - - sed -i -e 's:^.*PIDFile "/var/run/collectd.pid":#PIDFile "/run/collectd.pid":' "${ED}"/etc/collectd.conf || die - sed -i -e 's:^# SocketFile "/var/run/collectd-unixsock":# SocketFile "/run/collectd/collectd.socket":' "${ED}"/etc/collectd.conf || die - sed -i -e 's:^.*LoadPlugin perl$:# The new, correct way to load the perl plugin -- \n# \n# Globals true\n# :' "${ED}"/etc/collectd.conf || die - sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# \n# Globals true\n# :' "${ED}"/etc/collectd.conf || die -} - -pkg_postinst() { - tmpfiles_process "${PN}.conf" - - if use filecaps; then - local caps=() - 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') - - if use collectd_plugins_dns || use collectd_plugins_ping; then - caps+=('CAP_NET_RAW') - fi - - if use collectd_plugins_turbostat || use collectd_plugins_smart; then - caps+=('CAP_SYS_RAWIO') - fi - - if [ ${#caps[@]} -gt 0 ]; then - local caps_str=$(IFS=","; echo "${caps[*]}") - fcaps ${caps_str} usr/sbin/collectd - elog "Capabilities for ${EROOT}/usr/sbin/collectd set to:" - elog " ${caps_str}+EP" - elog - - local systemd_unit="$(systemd_get_systemunitdir)/collectd.service" - if [[ -e "${systemd_unit}" ]]; then - caps_str="${caps[*]}" - sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \ - die "Failed to set CapabilityBoundingSet in '${systemd_unit}'" - - elog "CapabilityBoundingSet in '${systemd_unit}'" - elog "updated to match capabilities set above." - elog - else - if has_version "sys-apps/systemd"; then - # Bug 596852 - ewarn "Failed to update CapabilityBoundingSet in '${systemd_unit}'" - ewarn "because unit was not found. Please file a bug about this." - fi - fi - fi - fi - - elog "Note: Collectd is only the collector." - elog " You need to install 'data' sources (applications) locally or" - elog " remotely on your own." - - elog - elog "Collectd is configured to run as unprivileged user by default." - elog "You may want to revisit the configuration." - elog - - if use collectd_plugins_email; then - ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin." - fi - - if use collectd_plugins_smart; then - elog "" - elog "If you are using smart plugin and don't run collectd as root make sure" - elog "that the collectd user is allowed to access the disk you want to monitor" - elog "(can be done via udev rule for example) and that collectd has the required" - elog "capabilities set (which is the default when package was emerged with" - elog "'filecaps' USE flag set)." - fi - - if use contrib; then - elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser," - elog "dev-perl/CGI, dev-perl/Config-General and net-analyzer/rrdtool[perl] to be installed." - fi -} diff --git a/app-metrics/collectd/collectd-5.12.0-r5.ebuild b/app-metrics/collectd/collectd-5.12.0-r5.ebuild new file mode 100644 index 000000000000..31e9c7f7be72 --- /dev/null +++ b/app-metrics/collectd/collectd-5.12.0-r5.ebuild @@ -0,0 +1,552 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +JAVA_PKG_OPT_USE="collectd_plugins_java" +LUA_COMPAT=( lua5-{1..3} ) +PYTHON_COMPAT=( python3_{7..9} ) + +inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info lua-single \ + multilib perl-functions python-single-r1 systemd tmpfiles udev + +DESCRIPTION="Collects system statistics and provides mechanisms to store the values" + +HOMEPAGE="https://collectd.org/" +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.bz2" + +LICENSE="MIT GPL-2 GPL-2+ GPL-3 GPL-3+" +SLOT="0" +KEYWORDS="~alpha amd64 arm x86" +IUSE="contrib debug java perl selinux static-libs udev xfs" + +# The plugin lists have to follow here since they extend IUSE + +# Plugins that don't build (e.g. dependencies not in Gentoo) +# apple_sensors: Requires libIOKit +# amqp1: Requires libqpid-proton +# aquaero: Requires aerotools-ng/libaquaero5 +# barometer: Requires libi2c (i2c_smbus_read_i2c_block_data) +# dpdkevents: Requires dpdk +# dpdkstat: Requires dpdk +# dpdk_telemetry: Requires dpdk +# grpc: Requires libgrpc +# intel_pmu: Requires libjevents (pmu-tools) +# intel_rdt: Requires libpqos from intel-cmt-cat project +# lpar: Requires libperfstat (AIX only) +# mic: Requires Intel Many Integrated Core Architecture API +# (part of Intel's Xeon Phi software) +# netapp: Requires libnetapp (http://communities.netapp.com/docs/DOC-1110) +# onewire: Requires sys-fs/owfs which was removed from repository +# pf: Requires BSD packet filter +# pinba: Requires MySQL Pinba engine (http://pinba.org/) +# redfish: Requires libredfish +# tape: Requires libkstat (Solaris only) +# tokyotyrant: Requires tokyotyrant +# write_riemann: Requires riemann-c-client +# xmms: Requires libxmms (v1) +# zone: Solaris only... +COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors amqp1 aquaero barometer + dpdkevents dpdkstat dpdk_telemetry grpc intel_pmu intel_rdt lpar + mic netapp onewire pf pinba redfish tape tokyotyrant write_riemann + xmms zone" + +# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS +COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind + buddyinfo capabilities ceph cgroups check_uptime chrony connectivity + conntrack contextswitch cpu cpufreq cpusleep csv curl curl_json + curl_xml dbi df disk dns drbd email entropy ethstat exec fhcount + filecount fscache gmond gps gpu_nvidia hddtemp hugepages interface ipc + ipmi iptables ipvs irq java lua load logfile logparser log_logstash + madwifi match_empty_counter match_hashed match_regex match_timediff + match_value mbmon mcelog md memcachec memcached memory modbus mqtt + multimeter mysql netlink network network nfs nginx notify_desktop + notify_email notify_nagios ntpd numa nut olsrd onewire openldap + openvpn oracle ovs_events ovs_stats pcie_errors perl ping postgresql + powerdns procevent processes protocols python redis routeros + rrdcached rrdtool sensors serial sigrok slurm smart snmp snmp_agent + statsd swap synproxy sysevent syslog table tail tail_csv + target_notification target_replace target_scale target_set tcpconns + teamspeak2 ted thermal threshold turbostat ubi unixsock uptime users + uuid varnish virt vmem vserver wireless write_graphite write_http + write_influxdb_udp write_kafka write_log write_mongodb write_prometheus + write_redis write_sensu write_stackdriver write_syslog write_tsdb + xencpu zfs_arc zookeeper" + +COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}" + +COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS} + +for plugin in ${COLLECTD_ALL_PLUGINS}; do + IUSE="${IUSE} collectd_plugins_${plugin}" +done +unset plugin + +# Now come the dependencies. + +COMMON_DEPEND=" + acct-group/collectd + acct-user/collectd + dev-libs/libgcrypt:= + dev-libs/libltdl:0= + sys-libs/libcap + perl? ( dev-lang/perl:=[ithreads] ) + udev? ( virtual/udev ) + xfs? ( sys-fs/xfsprogs ) + collectd_plugins_amqp? ( net-libs/rabbitmq-c ) + collectd_plugins_apache? ( net-misc/curl:0= ) + collectd_plugins_ascent? ( net-misc/curl:0= dev-libs/libxml2:2= ) + collectd_plugins_bind? ( net-misc/curl:0= dev-libs/libxml2:2= ) + collectd_plugins_ceph? ( dev-libs/yajl:= ) + collectd_plugins_capabilities? ( dev-libs/jansson net-libs/libmicrohttpd:= ) + collectd_plugins_connectivity? ( dev-libs/yajl:= net-libs/libmnl ) + collectd_plugins_curl? ( net-misc/curl:0= ) + collectd_plugins_curl_json? ( net-misc/curl:0= dev-libs/yajl:= ) + collectd_plugins_curl_xml? ( net-misc/curl:0= dev-libs/libxml2:2= ) + collectd_plugins_dbi? ( dev-db/libdbi ) + collectd_plugins_dns? ( net-libs/libpcap ) + collectd_plugins_gmond? ( sys-cluster/ganglia ) + collectd_plugins_gps? ( sci-geosciences/gpsd:= ) + collectd_plugins_gpu_nvidia? ( dev-util/nvidia-cuda-toolkit ) + collectd_plugins_ipmi? ( >=sys-libs/openipmi-2.0.16-r1 ) + collectd_plugins_iptables? ( >=net-firewall/iptables-1.4.13:0= ) + collectd_plugins_log_logstash? ( dev-libs/yajl:= ) + collectd_plugins_lua? ( ${LUA_DEPS} ) + collectd_plugins_memcachec? ( dev-libs/libmemcached ) + collectd_plugins_modbus? ( dev-libs/libmodbus ) + collectd_plugins_mqtt? ( app-misc/mosquitto ) + collectd_plugins_mysql? ( dev-db/mysql-connector-c:= ) + collectd_plugins_netlink? ( net-libs/libmnl ) + collectd_plugins_nginx? ( net-misc/curl:0= ) + collectd_plugins_notify_desktop? ( x11-libs/libnotify ) + collectd_plugins_notify_email? ( net-libs/libesmtp:= ) + collectd_plugins_nut? ( >=sys-power/nut-2.7.2-r2 ) + collectd_plugins_openldap? ( net-nds/openldap:= ) + collectd_plugins_oracle? ( dev-db/oracle-instantclient[sdk] ) + collectd_plugins_ovs_events? ( dev-libs/yajl:= ) + collectd_plugins_ovs_stats? ( dev-libs/yajl:= ) + collectd_plugins_perl? ( dev-lang/perl:=[ithreads] ) + collectd_plugins_ping? ( net-libs/liboping ) + collectd_plugins_postgresql? ( dev-db/postgresql:= ) + collectd_plugins_procevent? ( dev-libs/yajl:= ) + collectd_plugins_python? ( ${PYTHON_DEPS} ) + collectd_plugins_redis? ( dev-libs/hiredis:= ) + collectd_plugins_routeros? ( net-libs/librouteros ) + collectd_plugins_rrdcached? ( net-analyzer/rrdtool:= ) + collectd_plugins_rrdtool? ( net-analyzer/rrdtool:= ) + collectd_plugins_sensors? ( sys-apps/lm-sensors:= ) + collectd_plugins_sigrok? ( >=sci-libs/libsigrok-0.4:= dev-libs/glib:2 ) + collectd_plugins_slurm? ( sys-cluster/slurm ) + collectd_plugins_smart? ( dev-libs/libatasmart:0= ) + collectd_plugins_snmp? ( net-analyzer/net-snmp:= ) + collectd_plugins_snmp_agent? ( net-analyzer/net-snmp:= ) + collectd_plugins_sysevent? ( dev-libs/yajl:= ) + collectd_plugins_varnish? ( www-servers/varnish:= ) + collectd_plugins_virt? ( app-emulation/libvirt:= dev-libs/libxml2:2= ) + collectd_plugins_write_http? ( net-misc/curl:0= dev-libs/yajl:= ) + collectd_plugins_write_kafka? ( >=dev-libs/librdkafka-0.9.0.99:= dev-libs/yajl:= ) + collectd_plugins_write_mongodb? ( >=dev-libs/mongo-c-driver-1.8.2:= ) + collectd_plugins_write_prometheus? ( >=dev-libs/protobuf-c-1.2.1-r1:= net-libs/libmicrohttpd:= ) + collectd_plugins_write_redis? ( dev-libs/hiredis:= ) + collectd_plugins_write_stackdriver? ( net-misc/curl:0= dev-libs/yajl:= ) + collectd_plugins_xencpu? ( app-emulation/xen-tools:= ) +" + +# FIXME: should virtual/jdk be here as well? +BDEPEND="virtual/pkgconfig" + +# Enforcing !=sys-kernel/linux-headers-4.5 > due to #577846 +DEPEND="${COMMON_DEPEND} + collectd_plugins_iptables? ( || ( <=sys-kernel/linux-headers-4.4 >=sys-kernel/linux-headers-4.6 ) ) + collectd_plugins_java? ( >=virtual/jdk-1.6 )" + +RDEPEND="${COMMON_DEPEND} + collectd_plugins_java? ( >=virtual/jre-1.6 ) + collectd_plugins_syslog? ( virtual/logger ) + selinux? ( sec-policy/selinux-collectd )" + +REQUIRED_USE=" + collectd_plugins_lua? ( ${LUA_REQUIRED_USE} ) + collectd_plugins_python? ( ${PYTHON_REQUIRED_USE} ) + collectd_plugins_smart? ( udev ) + contrib? ( perl )" + +PATCHES=( "${FILESDIR}"/${PN}-5.11.0-libsigrok-0.4+.patch ) + +# @FUNCTION: collectd_plugin_kernel_linux +# @DESCRIPTION: +# USAGE: +# kernel_options is a list of kernel configurations options; the check tests whether at least +# one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message +# is emitted. +collectd_plugin_kernel_linux() { + local multi_opt opt + if has ${1} ${COLLECTD_ALL_PLUGINS}; then + if use collectd_plugins_${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} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel" + ;; + (warn) + ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel" + ;; + (error) + eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel" + ;; + (*) + die "function collectd_plugin_kernel_linux called with invalid third argument" + ;; + esac + fi + fi +} + +collectd_linux_kernel_checks() { + if ! linux_chkconfig_present PROC_FS; then + ewarn "/proc file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable PROC_FS in your kernel" + fi + + if ! linux_chkconfig_present SYSFS; then + ewarn "/sys file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable SYSFS in your kernel" + fi + + # battery.c: /proc/pmu/battery_%i + # battery.c: /proc/acpi/battery + collectd_plugin_kernel_linux battery ACPI_BATTERY warn + + # cgroups.c: /sys/fs/cgroup/ + collectd_plugin_kernel_linux cgroups CGROUPS warn + + # 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 + + # drbd.c: /proc/drbd + collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn + + # conntrack.c: /proc/sys/net/netfilter/* + collectd_plugin_kernel_linux conntrack NETFILTER warn + + # fscache.c: /proc/fs/fscache/stats + collectd_plugin_kernel_linux fscache FSCACHE warn + + # nfs.c: /proc/net/rpc/nfs + # nfs.c: /proc/net/rpc/nfsd + collectd_plugin_kernel_linux nfs NFS_COMMON warn + + # serial.c: /proc/tty/driver/serial + # serial.c: /proc/tty/driver/ttyS + collectd_plugin_kernel_linux serial SERIAL_CORE warn + + # swap.c: /proc/meminfo + collectd_plugin_kernel_linux swap SWAP warn + + # thermal.c: /proc/acpi/thermal_zone + # thermal.c: /sys/class/thermal + collectd_plugin_kernel_linux thermal ACPI_THERMAL warn + + # turbostat.c: /dev/cpu/%d/msr + collectd_plugin_kernel_linux turbostat X86_MSR warn + + # vmem.c: /proc/vmstat + collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn + + # vserver.c: /proc/virtual + collectd_plugin_kernel_linux vserver VSERVER warn + + # uuid.c: /sys/hypervisor/uuid + collectd_plugin_kernel_linux uuid SYSFS info + + # wireless.c: /proc/net/wireless + collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn + + # zfs_arc.c: /proc/spl/kstat/zfs/arcstats + collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn +} + +pkg_setup() { + if use kernel_linux; then + linux-info_pkg_setup + + if linux_config_exists; then + einfo "Checking your linux kernel configuration:" + collectd_linux_kernel_checks + else + elog "Cannot find a linux kernel configuration. Continuing anyway." + fi + fi + + if use collectd_plugins_java; then + java-pkg-opt-2_pkg_setup + fi + + use collectd_plugins_lua && lua-single_pkg_setup + use collectd_plugins_python && python-single-r1_pkg_setup +} + +src_prepare() { + default + + # 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 + + # Adjust upstream's systemd unit + # - Get rid of EnvironmentFile directive; These files don't exist on Gentoo! + # - Add User=collectd to run collectd as user "collectd" per default + sed -i \ + -e '/^EnvironmentFile=.*/d' \ + -e '/^\[Service\]/aUser=collectd' \ + contrib/systemd.${PN}.service || die + + eautoreconf +} + +src_configure() { + # Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here + # should work independent of the operating system. + + local linux_plugins="barometer battery cpu cpufreq disk + drbd entropy ethstat hugepages interface iptables + ipvs irq ipc load memory md netlink nfs numa processes + serial swap tcpconns thermal turbostat users vmem wireless + zfc_arc" + + local need_libstatgrab=0 + local libstatgrab_plugins="cpu disk interface load memory swap users" + local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc" + + local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns" + + local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}" + local myos_plugins="" + if use kernel_linux; then + einfo "Enabling Linux plugins." + myos_plugins=${linux_plugins} + elif use kernel_Darwin; then + einfo "Enabling Darwin plugins." + myos_plugins=${darwin_plugins} + fi + + local myconf="--disable-werror" + + # Do we debug? + myconf+=" $(use_enable debug)" + + # udev support? + # Required for smart plugin via REQUIRED_USE; Optional for disk plugin + if use udev; then + myconf+=" --with-libudev" + else + myconf+=" --without-libudev" + fi + + local plugin + + # Disable what needs to be disabled. + for plugin in ${COLLECTD_DISABLED_PLUGINS}; do + if [[ "${plugin}" == 'dpdkstat' ]]; then + myconf+=" --without-libdpdk" + else + myconf+=" --disable-${plugin}" + fi + done + + # Set enable/disable for each single plugin. + for plugin in ${COLLECTD_ALL_PLUGINS}; do + if has ${plugin} ${osdependent_plugins}; then + # plugin is os-dependent ... + if has ${plugin} ${myos_plugins}; then + # ... and available in this os + myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" + else + # ... and NOT available in this os + if use collectd_plugins_${plugin}; then + ewarn "You try to enable the ${plugin} plugin, but it is not available for this" + ewarn "kernel. Disabling it automatically." + fi + myconf+=" --disable-${plugin}" + fi + elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then + if use collectd_plugins_perl && ! use perl; then + ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag" + myconf+= --disable-perl + else + myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" + fi + else + myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" + fi + done + + if [ "${need_libstatgrab}" -eq 1 ]; then + myconf+=" --with-libstatgrab" + else + myconf+=" --without-libstatgrab" + fi + + # JAVA_HOME is set by eclasses. + if use collectd_plugins_java; then + myconf+=" --with-java" + fi + + # Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens. + # lots of libs are only needed for plugins, if they are disabled, also disable the lib + use collectd_plugins_iptables || myconf+=" --with-libiptc=no" + use collectd_plugins_openldap || myconf+=" --with-libldap=no" + use collectd_plugins_redis || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no" + use collectd_plugins_smart || myconf+=" --with-libatasmart=no" + use collectd_plugins_gps || myconf+=" --with-libgps=no" + + if use collectd_plugins_gpu_nvidia; then + myconf+=" --with-cuda=${EPREFIX}/opt/cuda" + else + myconf+=" --with-cuda=no" + fi + + if use perl; then + myconf+=" --with-perl-bindings=INSTALLDIRS=vendor" + else + myconf+=" --without-perl-bindings" + fi + + # No need for v5upgrade + myconf+=" --disable-target_v5upgrade" + + # Python + if use collectd_plugins_python; then + myconf+=" --with-libpython=yes" + export PYTHON_CONFIG=$(python_get_PYTHON_CONFIG) + else + myconf+=" --with-libpython=no" + fi + + # XFS support + myconf+=" $(use_enable xfs)" + + # Finally, run econf. + KERNEL_DIR="${KERNEL_DIR}" econf --config-cache \ + $(use_enable static-libs static) \ + --localstatedir=/var ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + perl_delete_localpod + + find "${ED}"/usr/ -name "*.la" -delete || die + + if use collectd_plugins_java; then + java-pkg_regjar "${ED}"/usr/share/${PN}/java/*.jar + fi + + if use collectd_plugins_disk && use udev; then + udev_newrules contrib/99-storage-collectd.rules 60-persistent-storage-collectd.rules + fi + + fowners root:collectd /etc/collectd.conf + fperms u=rw,g=r,o= /etc/collectd.conf + + einstalldocs + + if use contrib; then + insinto /usr/share/${PN} + doins -r contrib + fi + + keepdir /var/lib/${PN} + fowners collectd:collectd /var/lib/${PN} + + newinitd "${FILESDIR}/${PN}.initd-r2" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r2" ${PN} + systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service + + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf + + sed -i -e 's:^.*PIDFile "/var/run/collectd.pid":#PIDFile "/run/collectd.pid":' "${ED}"/etc/collectd.conf || die + sed -i -e 's:^# SocketFile "/var/run/collectd-unixsock":# SocketFile "/run/collectd/collectd.socket":' "${ED}"/etc/collectd.conf || die + sed -i -e 's:^.*LoadPlugin perl$:# The new, correct way to load the perl plugin -- \n# \n# Globals true\n# :' "${ED}"/etc/collectd.conf || die + sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# \n# Globals true\n# :' "${ED}"/etc/collectd.conf || die +} + +pkg_postinst() { + tmpfiles_process "${PN}.conf" + + if use filecaps; then + local caps=() + 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') + + if use collectd_plugins_dns || use collectd_plugins_ping; then + caps+=('CAP_NET_RAW') + fi + + if use collectd_plugins_turbostat || use collectd_plugins_smart; then + caps+=('CAP_SYS_RAWIO') + fi + + if [ ${#caps[@]} -gt 0 ]; then + local caps_str=$(IFS=","; echo "${caps[*]}") + fcaps ${caps_str} usr/sbin/collectd + elog "Capabilities for ${EROOT}/usr/sbin/collectd set to:" + elog " ${caps_str}+EP" + elog + + local systemd_unit="$(systemd_get_systemunitdir)/collectd.service" + if [[ -e "${systemd_unit}" ]]; then + caps_str="${caps[*]}" + sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \ + die "Failed to set CapabilityBoundingSet in '${systemd_unit}'" + + elog "CapabilityBoundingSet in '${systemd_unit}'" + elog "updated to match capabilities set above." + elog + else + if has_version "sys-apps/systemd"; then + # Bug 596852 + ewarn "Failed to update CapabilityBoundingSet in '${systemd_unit}'" + ewarn "because unit was not found. Please file a bug about this." + fi + fi + fi + fi + + elog "Note: Collectd is only the collector." + elog " You need to install 'data' sources (applications) locally or" + elog " remotely on your own." + + elog + elog "Collectd is configured to run as unprivileged user by default." + elog "You may want to revisit the configuration." + elog + + if use collectd_plugins_email; then + ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin." + fi + + if use collectd_plugins_smart; then + elog "" + elog "If you are using smart plugin and don't run collectd as root make sure" + elog "that the collectd user is allowed to access the disk you want to monitor" + elog "(can be done via udev rule for example) and that collectd has the required" + elog "capabilities set (which is the default when package was emerged with" + elog "'filecaps' USE flag set)." + fi + + if use contrib; then + elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser," + elog "dev-perl/CGI, dev-perl/Config-General and net-analyzer/rrdtool[perl] to be installed." + fi +} diff --git a/app-metrics/collectd/collectd-5.12.0-r6.ebuild b/app-metrics/collectd/collectd-5.12.0-r6.ebuild new file mode 100644 index 000000000000..0d9005d31c3f --- /dev/null +++ b/app-metrics/collectd/collectd-5.12.0-r6.ebuild @@ -0,0 +1,552 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +JAVA_PKG_OPT_USE="collectd_plugins_java" +LUA_COMPAT=( lua5-{1..3} ) +PYTHON_COMPAT=( python3_{7..9} ) + +inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info lua-single \ + multilib perl-functions python-single-r1 systemd tmpfiles udev + +DESCRIPTION="Collects system statistics and provides mechanisms to store the values" + +HOMEPAGE="https://collectd.org/" +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.bz2" + +LICENSE="MIT GPL-2 GPL-2+ GPL-3 GPL-3+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~x86" +IUSE="contrib debug java perl selinux static-libs udev xfs" + +# The plugin lists have to follow here since they extend IUSE + +# Plugins that don't build (e.g. dependencies not in Gentoo) +# apple_sensors: Requires libIOKit +# amqp1: Requires libqpid-proton +# aquaero: Requires aerotools-ng/libaquaero5 +# barometer: Requires libi2c (i2c_smbus_read_i2c_block_data) +# dpdkevents: Requires dpdk +# dpdkstat: Requires dpdk +# dpdk_telemetry: Requires dpdk +# grpc: Requires libgrpc +# intel_pmu: Requires libjevents (pmu-tools) +# intel_rdt: Requires libpqos from intel-cmt-cat project +# lpar: Requires libperfstat (AIX only) +# mic: Requires Intel Many Integrated Core Architecture API +# (part of Intel's Xeon Phi software) +# netapp: Requires libnetapp (http://communities.netapp.com/docs/DOC-1110) +# onewire: Requires sys-fs/owfs which was removed from repository +# pf: Requires BSD packet filter +# pinba: Requires MySQL Pinba engine (http://pinba.org/) +# redfish: Requires libredfish +# tape: Requires libkstat (Solaris only) +# tokyotyrant: Requires tokyotyrant +# write_riemann: Requires riemann-c-client +# xmms: Requires libxmms (v1) +# zone: Solaris only... +COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors amqp1 aquaero barometer + dpdkevents dpdkstat dpdk_telemetry grpc intel_pmu intel_rdt lpar + mic netapp onewire pf pinba redfish tape tokyotyrant write_riemann + xmms zone" + +# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS +COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind + buddyinfo capabilities ceph cgroups check_uptime chrony connectivity + conntrack contextswitch cpu cpufreq cpusleep csv curl curl_json + curl_xml dbi df disk dns drbd email entropy ethstat exec fhcount + filecount fscache gmond gps gpu_nvidia hddtemp hugepages interface ipc + ipmi iptables ipvs irq java lua load logfile logparser log_logstash + madwifi match_empty_counter match_hashed match_regex match_timediff + match_value mbmon mcelog md memcachec memcached memory modbus mqtt + multimeter mysql netlink network network nfs nginx notify_desktop + notify_email notify_nagios ntpd numa nut olsrd onewire openldap + openvpn oracle ovs_events ovs_stats pcie_errors perl ping postgresql + powerdns procevent processes protocols python redis routeros + rrdcached rrdtool sensors serial sigrok slurm smart snmp snmp_agent + statsd swap synproxy sysevent syslog table tail tail_csv + target_notification target_replace target_scale target_set tcpconns + teamspeak2 ted thermal threshold turbostat ubi unixsock uptime users + uuid varnish virt vmem vserver wireless write_graphite write_http + write_influxdb_udp write_kafka write_log write_mongodb write_prometheus + write_redis write_sensu write_stackdriver write_syslog write_tsdb + xencpu zfs_arc zookeeper" + +COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}" + +COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS} + +for plugin in ${COLLECTD_ALL_PLUGINS}; do + IUSE="${IUSE} collectd_plugins_${plugin}" +done +unset plugin + +# Now come the dependencies. + +COMMON_DEPEND=" + acct-group/collectd + acct-user/collectd + dev-libs/libgcrypt:= + dev-libs/libltdl:0= + sys-libs/libcap + perl? ( dev-lang/perl:=[ithreads] ) + udev? ( virtual/udev ) + xfs? ( sys-fs/xfsprogs ) + collectd_plugins_amqp? ( net-libs/rabbitmq-c ) + collectd_plugins_apache? ( net-misc/curl:0= ) + collectd_plugins_ascent? ( net-misc/curl:0= dev-libs/libxml2:2= ) + collectd_plugins_bind? ( net-misc/curl:0= dev-libs/libxml2:2= ) + collectd_plugins_ceph? ( dev-libs/yajl:= ) + collectd_plugins_capabilities? ( dev-libs/jansson net-libs/libmicrohttpd:= ) + collectd_plugins_connectivity? ( dev-libs/yajl:= net-libs/libmnl ) + collectd_plugins_curl? ( net-misc/curl:0= ) + collectd_plugins_curl_json? ( net-misc/curl:0= dev-libs/yajl:= ) + collectd_plugins_curl_xml? ( net-misc/curl:0= dev-libs/libxml2:2= ) + collectd_plugins_dbi? ( dev-db/libdbi ) + collectd_plugins_dns? ( net-libs/libpcap ) + collectd_plugins_gmond? ( sys-cluster/ganglia ) + collectd_plugins_gps? ( sci-geosciences/gpsd:= ) + collectd_plugins_gpu_nvidia? ( dev-util/nvidia-cuda-toolkit ) + collectd_plugins_ipmi? ( >=sys-libs/openipmi-2.0.16-r1 ) + collectd_plugins_iptables? ( >=net-firewall/iptables-1.4.13:0= ) + collectd_plugins_log_logstash? ( dev-libs/yajl:= ) + collectd_plugins_lua? ( ${LUA_DEPS} ) + collectd_plugins_memcachec? ( dev-libs/libmemcached ) + collectd_plugins_modbus? ( dev-libs/libmodbus ) + collectd_plugins_mqtt? ( app-misc/mosquitto ) + collectd_plugins_mysql? ( dev-db/mysql-connector-c:= ) + collectd_plugins_netlink? ( net-libs/libmnl ) + collectd_plugins_nginx? ( net-misc/curl:0= ) + collectd_plugins_notify_desktop? ( x11-libs/libnotify ) + collectd_plugins_notify_email? ( net-libs/libesmtp:= ) + collectd_plugins_nut? ( >=sys-power/nut-2.7.2-r2 ) + collectd_plugins_openldap? ( net-nds/openldap:= ) + collectd_plugins_oracle? ( dev-db/oracle-instantclient[sdk] ) + collectd_plugins_ovs_events? ( dev-libs/yajl:= ) + collectd_plugins_ovs_stats? ( dev-libs/yajl:= ) + collectd_plugins_perl? ( dev-lang/perl:=[ithreads] ) + collectd_plugins_ping? ( net-libs/liboping ) + collectd_plugins_postgresql? ( dev-db/postgresql:= ) + collectd_plugins_procevent? ( dev-libs/yajl:= ) + collectd_plugins_python? ( ${PYTHON_DEPS} ) + collectd_plugins_redis? ( dev-libs/hiredis:= ) + collectd_plugins_routeros? ( net-libs/librouteros ) + collectd_plugins_rrdcached? ( net-analyzer/rrdtool:= ) + collectd_plugins_rrdtool? ( net-analyzer/rrdtool:= ) + collectd_plugins_sensors? ( sys-apps/lm-sensors:= ) + collectd_plugins_sigrok? ( >=sci-libs/libsigrok-0.4:= dev-libs/glib:2 ) + collectd_plugins_slurm? ( sys-cluster/slurm ) + collectd_plugins_smart? ( dev-libs/libatasmart:0= ) + collectd_plugins_snmp? ( net-analyzer/net-snmp:= ) + collectd_plugins_snmp_agent? ( net-analyzer/net-snmp:= ) + collectd_plugins_sysevent? ( dev-libs/yajl:= ) + collectd_plugins_varnish? ( www-servers/varnish:= ) + collectd_plugins_virt? ( app-emulation/libvirt:= dev-libs/libxml2:2= ) + collectd_plugins_write_http? ( net-misc/curl:0= dev-libs/yajl:= ) + collectd_plugins_write_kafka? ( >=dev-libs/librdkafka-0.9.0.99:= dev-libs/yajl:= ) + collectd_plugins_write_mongodb? ( >=dev-libs/mongo-c-driver-1.8.2:= ) + collectd_plugins_write_prometheus? ( >=dev-libs/protobuf-c-1.2.1-r1:= net-libs/libmicrohttpd:= ) + collectd_plugins_write_redis? ( dev-libs/hiredis:= ) + collectd_plugins_write_stackdriver? ( net-misc/curl:0= dev-libs/yajl:= ) + collectd_plugins_xencpu? ( app-emulation/xen-tools:= ) +" + +# FIXME: should virtual/jdk be here as well? +BDEPEND="virtual/pkgconfig" + +# Enforcing !=sys-kernel/linux-headers-4.5 > due to #577846 +DEPEND="${COMMON_DEPEND} + collectd_plugins_iptables? ( || ( <=sys-kernel/linux-headers-4.4 >=sys-kernel/linux-headers-4.6 ) ) + collectd_plugins_java? ( >=virtual/jdk-1.8 )" + +RDEPEND="${COMMON_DEPEND} + collectd_plugins_java? ( >=virtual/jre-1.8 ) + collectd_plugins_syslog? ( virtual/logger ) + selinux? ( sec-policy/selinux-collectd )" + +REQUIRED_USE=" + collectd_plugins_lua? ( ${LUA_REQUIRED_USE} ) + collectd_plugins_python? ( ${PYTHON_REQUIRED_USE} ) + collectd_plugins_smart? ( udev ) + contrib? ( perl )" + +PATCHES=( "${FILESDIR}"/${PN}-5.11.0-libsigrok-0.4+.patch ) + +# @FUNCTION: collectd_plugin_kernel_linux +# @DESCRIPTION: +# USAGE: +# kernel_options is a list of kernel configurations options; the check tests whether at least +# one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message +# is emitted. +collectd_plugin_kernel_linux() { + local multi_opt opt + if has ${1} ${COLLECTD_ALL_PLUGINS}; then + if use collectd_plugins_${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} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel" + ;; + (warn) + ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel" + ;; + (error) + eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel" + ;; + (*) + die "function collectd_plugin_kernel_linux called with invalid third argument" + ;; + esac + fi + fi +} + +collectd_linux_kernel_checks() { + if ! linux_chkconfig_present PROC_FS; then + ewarn "/proc file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable PROC_FS in your kernel" + fi + + if ! linux_chkconfig_present SYSFS; then + ewarn "/sys file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable SYSFS in your kernel" + fi + + # battery.c: /proc/pmu/battery_%i + # battery.c: /proc/acpi/battery + collectd_plugin_kernel_linux battery ACPI_BATTERY warn + + # cgroups.c: /sys/fs/cgroup/ + collectd_plugin_kernel_linux cgroups CGROUPS warn + + # 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 + + # drbd.c: /proc/drbd + collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn + + # conntrack.c: /proc/sys/net/netfilter/* + collectd_plugin_kernel_linux conntrack NETFILTER warn + + # fscache.c: /proc/fs/fscache/stats + collectd_plugin_kernel_linux fscache FSCACHE warn + + # nfs.c: /proc/net/rpc/nfs + # nfs.c: /proc/net/rpc/nfsd + collectd_plugin_kernel_linux nfs NFS_COMMON warn + + # serial.c: /proc/tty/driver/serial + # serial.c: /proc/tty/driver/ttyS + collectd_plugin_kernel_linux serial SERIAL_CORE warn + + # swap.c: /proc/meminfo + collectd_plugin_kernel_linux swap SWAP warn + + # thermal.c: /proc/acpi/thermal_zone + # thermal.c: /sys/class/thermal + collectd_plugin_kernel_linux thermal ACPI_THERMAL warn + + # turbostat.c: /dev/cpu/%d/msr + collectd_plugin_kernel_linux turbostat X86_MSR warn + + # vmem.c: /proc/vmstat + collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn + + # vserver.c: /proc/virtual + collectd_plugin_kernel_linux vserver VSERVER warn + + # uuid.c: /sys/hypervisor/uuid + collectd_plugin_kernel_linux uuid SYSFS info + + # wireless.c: /proc/net/wireless + collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn + + # zfs_arc.c: /proc/spl/kstat/zfs/arcstats + collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn +} + +pkg_setup() { + if use kernel_linux; then + linux-info_pkg_setup + + if linux_config_exists; then + einfo "Checking your linux kernel configuration:" + collectd_linux_kernel_checks + else + elog "Cannot find a linux kernel configuration. Continuing anyway." + fi + fi + + if use collectd_plugins_java; then + java-pkg-opt-2_pkg_setup + fi + + use collectd_plugins_lua && lua-single_pkg_setup + use collectd_plugins_python && python-single-r1_pkg_setup +} + +src_prepare() { + default + + # 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 + + # Adjust upstream's systemd unit + # - Get rid of EnvironmentFile directive; These files don't exist on Gentoo! + # - Add User=collectd to run collectd as user "collectd" per default + sed -i \ + -e '/^EnvironmentFile=.*/d' \ + -e '/^\[Service\]/aUser=collectd' \ + contrib/systemd.${PN}.service || die + + eautoreconf +} + +src_configure() { + # Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here + # should work independent of the operating system. + + local linux_plugins="barometer battery cpu cpufreq disk + drbd entropy ethstat hugepages interface iptables + ipvs irq ipc load memory md netlink nfs numa processes + serial swap tcpconns thermal turbostat users vmem wireless + zfc_arc" + + local need_libstatgrab=0 + local libstatgrab_plugins="cpu disk interface load memory swap users" + local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc" + + local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns" + + local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}" + local myos_plugins="" + if use kernel_linux; then + einfo "Enabling Linux plugins." + myos_plugins=${linux_plugins} + elif use kernel_Darwin; then + einfo "Enabling Darwin plugins." + myos_plugins=${darwin_plugins} + fi + + local myconf="--disable-werror" + + # Do we debug? + myconf+=" $(use_enable debug)" + + # udev support? + # Required for smart plugin via REQUIRED_USE; Optional for disk plugin + if use udev; then + myconf+=" --with-libudev" + else + myconf+=" --without-libudev" + fi + + local plugin + + # Disable what needs to be disabled. + for plugin in ${COLLECTD_DISABLED_PLUGINS}; do + if [[ "${plugin}" == 'dpdkstat' ]]; then + myconf+=" --without-libdpdk" + else + myconf+=" --disable-${plugin}" + fi + done + + # Set enable/disable for each single plugin. + for plugin in ${COLLECTD_ALL_PLUGINS}; do + if has ${plugin} ${osdependent_plugins}; then + # plugin is os-dependent ... + if has ${plugin} ${myos_plugins}; then + # ... and available in this os + myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" + else + # ... and NOT available in this os + if use collectd_plugins_${plugin}; then + ewarn "You try to enable the ${plugin} plugin, but it is not available for this" + ewarn "kernel. Disabling it automatically." + fi + myconf+=" --disable-${plugin}" + fi + elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then + if use collectd_plugins_perl && ! use perl; then + ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag" + myconf+= --disable-perl + else + myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" + fi + else + myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" + fi + done + + if [ "${need_libstatgrab}" -eq 1 ]; then + myconf+=" --with-libstatgrab" + else + myconf+=" --without-libstatgrab" + fi + + # JAVA_HOME is set by eclasses. + if use collectd_plugins_java; then + myconf+=" --with-java" + fi + + # Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens. + # lots of libs are only needed for plugins, if they are disabled, also disable the lib + use collectd_plugins_iptables || myconf+=" --with-libiptc=no" + use collectd_plugins_openldap || myconf+=" --with-libldap=no" + use collectd_plugins_redis || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no" + use collectd_plugins_smart || myconf+=" --with-libatasmart=no" + use collectd_plugins_gps || myconf+=" --with-libgps=no" + + if use collectd_plugins_gpu_nvidia; then + myconf+=" --with-cuda=${EPREFIX}/opt/cuda" + else + myconf+=" --with-cuda=no" + fi + + if use perl; then + myconf+=" --with-perl-bindings=INSTALLDIRS=vendor" + else + myconf+=" --without-perl-bindings" + fi + + # No need for v5upgrade + myconf+=" --disable-target_v5upgrade" + + # Python + if use collectd_plugins_python; then + myconf+=" --with-libpython=yes" + export PYTHON_CONFIG=$(python_get_PYTHON_CONFIG) + else + myconf+=" --with-libpython=no" + fi + + # XFS support + myconf+=" $(use_enable xfs)" + + # Finally, run econf. + KERNEL_DIR="${KERNEL_DIR}" econf --config-cache \ + $(use_enable static-libs static) \ + --localstatedir=/var ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + perl_delete_localpod + + find "${ED}"/usr/ -name "*.la" -delete || die + + if use collectd_plugins_java; then + java-pkg_regjar "${ED}"/usr/share/${PN}/java/*.jar + fi + + if use collectd_plugins_disk && use udev; then + udev_newrules contrib/99-storage-collectd.rules 60-persistent-storage-collectd.rules + fi + + fowners root:collectd /etc/collectd.conf + fperms u=rw,g=r,o= /etc/collectd.conf + + einstalldocs + + if use contrib; then + insinto /usr/share/${PN} + doins -r contrib + fi + + keepdir /var/lib/${PN} + fowners collectd:collectd /var/lib/${PN} + + newinitd "${FILESDIR}/${PN}.initd-r2" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r2" ${PN} + systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service + + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf + + sed -i -e 's:^.*PIDFile "/var/run/collectd.pid":#PIDFile "/run/collectd.pid":' "${ED}"/etc/collectd.conf || die + sed -i -e 's:^# SocketFile "/var/run/collectd-unixsock":# SocketFile "/run/collectd/collectd.socket":' "${ED}"/etc/collectd.conf || die + sed -i -e 's:^.*LoadPlugin perl$:# The new, correct way to load the perl plugin -- \n# \n# Globals true\n# :' "${ED}"/etc/collectd.conf || die + sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# \n# Globals true\n# :' "${ED}"/etc/collectd.conf || die +} + +pkg_postinst() { + tmpfiles_process "${PN}.conf" + + if use filecaps; then + local caps=() + 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') + + if use collectd_plugins_dns || use collectd_plugins_ping; then + caps+=('CAP_NET_RAW') + fi + + if use collectd_plugins_turbostat || use collectd_plugins_smart; then + caps+=('CAP_SYS_RAWIO') + fi + + if [ ${#caps[@]} -gt 0 ]; then + local caps_str=$(IFS=","; echo "${caps[*]}") + fcaps ${caps_str} usr/sbin/collectd + elog "Capabilities for ${EROOT}/usr/sbin/collectd set to:" + elog " ${caps_str}+EP" + elog + + local systemd_unit="$(systemd_get_systemunitdir)/collectd.service" + if [[ -e "${systemd_unit}" ]]; then + caps_str="${caps[*]}" + sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \ + die "Failed to set CapabilityBoundingSet in '${systemd_unit}'" + + elog "CapabilityBoundingSet in '${systemd_unit}'" + elog "updated to match capabilities set above." + elog + else + if has_version "sys-apps/systemd"; then + # Bug 596852 + ewarn "Failed to update CapabilityBoundingSet in '${systemd_unit}'" + ewarn "because unit was not found. Please file a bug about this." + fi + fi + fi + fi + + elog "Note: Collectd is only the collector." + elog " You need to install 'data' sources (applications) locally or" + elog " remotely on your own." + + elog + elog "Collectd is configured to run as unprivileged user by default." + elog "You may want to revisit the configuration." + elog + + if use collectd_plugins_email; then + ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin." + fi + + if use collectd_plugins_smart; then + elog "" + elog "If you are using smart plugin and don't run collectd as root make sure" + elog "that the collectd user is allowed to access the disk you want to monitor" + elog "(can be done via udev rule for example) and that collectd has the required" + elog "capabilities set (which is the default when package was emerged with" + elog "'filecaps' USE flag set)." + fi + + if use contrib; then + elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser," + elog "dev-perl/CGI, dev-perl/Config-General and net-analyzer/rrdtool[perl] to be installed." + fi +} diff --git a/app-metrics/elasticsearch_exporter/Manifest b/app-metrics/elasticsearch_exporter/Manifest index fd486445cf55..8d38f95b1680 100644 --- a/app-metrics/elasticsearch_exporter/Manifest +++ b/app-metrics/elasticsearch_exporter/Manifest @@ -1,11 +1,6 @@ AUX elasticsearch_exporter.confd 96 BLAKE2B 4a65204509588b3bc93dfc5aa8f32c68a78b9dad05a3d8f95ba1095ee8bce8a2b3e94eb9b1b7d912b4d5953d99317233715e8c25e9ec1ee79809f0cdea09cf23 SHA512 f50fda8691d50ff59ba0679641d8211c117ba24b00b3ad4035ad5fdd144fdea909e26a9474e640049e778c256327642437d4b178aaa9f652b840420875ff152a AUX elasticsearch_exporter.initd 616 BLAKE2B ea0a311d6cf94063375a2369868ff258fe1f1e1335ccb664f032de975d7e2824c4d1d78716e706828e5a83efa91435ff225570eb68c18f330e3c46dc9e505aad SHA512 9780cc87adaca2be90e94baad679685781112de02e2eb68ff3270162ea38b228bc8960e670e80e20015855f6256d772208898e43f5924a1633ffdef98d2b4621 -DIST elasticsearch_exporter-1.0.2.tar.gz 207764 BLAKE2B f626c53d04e05912d1db480d6078b44fb6a05e42ec1751bfc2ddd45ff2f0bc0550517e16b10064adcf8c2ab2db175011543a2953fff1624cd575318e6fad943b SHA512 f610660761d761a26b840a969008763ecb19bdc07ab4a076cec7fc40f7d00a68e863fb72b0ea3b56446621a99fa31384ab79789a2e6526fc5b12dcc20df3c684 -DIST elasticsearch_exporter-1.0.4_rc1.tar.gz 212553 BLAKE2B 9f6f8f0117af4e59a483eda378df8a2ac5419a5319a02f69210250be952dc6cd401f0c20dbc3d416446d3af183750919f190112795652180d64ea3f6c62f5a56 SHA512 073fcce3417ae2147076b0fbbe3387494f9e2e8613284f03c6761d5e81d50aba648c6b47d423d79209d0b9221963951c21b2fa44aabe29c1eb0c36546dd140eb -DIST elasticsearch_exporter-1.1.0.tar.gz 316279 BLAKE2B 86e994ea0765a231b8ebaeaf495fa160ce53795e191e25cf82994214b53c62f03030b27040e95b770dc526ed2b772961b12ac73700b0da9f8994d532a0958789 SHA512 81cd7a44a2cd07bde7e716eac688c06ca93059de5ba7e1d3e009683b133f8c84c91a09a9e4775a558a3856389e165ce8ec2f04bd856b7b39b8f4a6072623b103 -DIST elasticsearch_exporter-1.1.0_rc1.tar.gz 314275 BLAKE2B 1548cbecb6f5a0ae70ffb7a1ccceedbc5e9f980841b9ddb47f56c522a0f0fdc4f9c0613ec95c6a8705f1affd8d713e70d6cfaeacd84cd552a21466a490cac387 SHA512 ba571fec3cdbc32279008ddfc6b72b093fef4ba4ee0eaed98000cecadf81f61adcce24989f36c8dc6abde51129ed638473267e2636ec669ac30440338001930e -EBUILD elasticsearch_exporter-1.0.2.ebuild 1170 BLAKE2B 0c4d4f884255a96c24aa5639af0cbbe4be19cb412c41feb182858d8b4aef1782033c7ea486194dc3b8c92abbb481e8ef2fc6ddc3beb6df7752677ec2853024ef SHA512 a3a6d2d52c12bf0d1494147e89e03d37a202d9e311e6bc6cff508fee519be8ecf62b80f9caa8bf73628d710758c588a1e5b37e188389f0489c526689248295ea -EBUILD elasticsearch_exporter-1.0.4_rc1.ebuild 1189 BLAKE2B dfee20a2d0c5e9cb4941148a45585508aa0ecab57665cffea2e25730d9cd5afdafbce1c992c9aaab35fe1592c1beac9775d5bd79d54ff5d7d53976d609d964ca SHA512 dbb8aaebc071629bd5c8c356a9edfb10876755116ab8d488f63c860ec0f513b9e277e2bbf7acccbe5787bfd005a08e0d6c20bdcb41e85a85de5428eaeb8d763f -EBUILD elasticsearch_exporter-1.1.0.ebuild 1186 BLAKE2B 9ec84f9289ea5d930c4f22b6192667060177590617aa311a784c13adc1ae8e7401d4ba5a0e6f9405b3c283557a1ce205eaad09b990f2c615b79f5cedf8205f27 SHA512 33f5b40c584de7421f06e69db5dbb49eebacd7e18079a0fbe0b922f861947c6c66f868e2884260a9f41ee3dc0ef9f9d56e65dab6d2acbf1e423dbdfd8fdd853f -EBUILD elasticsearch_exporter-1.1.0_rc1.ebuild 1186 BLAKE2B d071fec2ae82368c6771c6a69adf8061997058f5d24e17c11ddb5f676e0cced84780b48cb07a4eb325fce21428a494f0be6f52df5bcdfb6fbbc3a364f31a6eca SHA512 4f1ee8deec35959ab73a64101f5e236f2bf2380d2f42454b374583f698c9c4cf6665fbdd0f9ca9e733963eeee53144c6eb4602ab2e16674f225c3c5d746db3f2 +DIST elasticsearch_exporter-1.3.0-deps.tar.xz 106387304 BLAKE2B d67e8b746ecf9f05310194485ac99b95768b813a7265b3ec445261d52708551c37bc14718021ee67306c84fedc323f5ef4e87cba043354b3b49c9ba0764e5575 SHA512 0374030189927deb14c8bd34b6472e9be8f7025aea525394a5eca5d6899311296e7eeefb7d05a2b4a75549c4590b9590dd592ab3c0aaf008c311922a01ea81d5 +DIST elasticsearch_exporter-1.3.0.tar.gz 93489 BLAKE2B 33e2dbe9608bd052bc4f31fc2a38774981d96f30fd54465bd2b10d075f0fade29fe6c40d2e32370a38edc41d04b3772100c39f5670c302a0a334e2a7d5ee6463 SHA512 a88ec20cd7f2f9859d2e169f7813b84c3286b65dfc3a625545608416dbee5f96d4e223e7d2ea2f2b788be766ead1abb11b795d3059a628d0c3c56f567eebea00 +EBUILD elasticsearch_exporter-1.3.0.ebuild 1055 BLAKE2B 29da25e0921b20ee9e7f9012567de13d5de3407d0e09c7f2da785fb4ee2a539771be8e6b0aecb17976893218b715bc7d5f45ac2d7b55a1c644b015db1407ecc1 SHA512 1aa9b47c50d8c86d4f7a839557534313c02c63858a291a07b41af478a90b5b7a13ddcba70e4c79590e3339d456fe4fbc3bce171ee4018c16177383b2710c7685 MISC metadata.xml 349 BLAKE2B 4044bc0be243da6bd421f354c01862cd04347f996222ef4a7648510eae36516ab79260ef0e48ff1555702bb9a26715e9cbaedaa7c47bb6f1f55c16ef6941933a SHA512 b310261a85a2d5bb23ad4ee1c08c5678f348392f57cae3ffe442087f596b75e63a0fe279495642950d108d3b68398f30b9063ed23571c61b081c947a0b4a60de diff --git a/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.0.2.ebuild b/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.0.2.ebuild deleted file mode 100644 index 7b98a004a46d..000000000000 --- a/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.0.2.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit user golang-build golang-vcs-snapshot - -EGO_PN="github.com/justwatchcom/elasticsearch_exporter" -EXPORTER_COMMIT="92dcbf3" -ARCHIVE_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" -KEYWORDS="~amd64" - -DESCRIPTION="Elasticsearch stats exporter for Prometheus" -HOMEPAGE="https://github.com/justwatchcom/elasticsearch_exporter" -SRC_URI="${ARCHIVE_URI}" -LICENSE="Apache-2.0 BSD MIT" -SLOT="0" -IUSE="" - -DEPEND="dev-util/promu" - -pkg_setup() { - enewgroup ${PN} - enewuser ${PN} -1 -1 -1 ${PN} -} - -src_prepare() { - default - sed -i -e "/-s$/d" -e "s/{{.Revision}}/${EXPORTER_COMMIT}/" src/${EGO_PN}/.promu.yml || die -} - -src_compile() { - pushd src/${EGO_PN} || die - mkdir -p bin || die - GOPATH="${S}" promu build -v --prefix bin || die - popd || die -} - -src_install() { - pushd src/${EGO_PN} || die - dobin bin/elasticsearch_exporter - dodoc {README,CHANGELOG}.md - popd || die - keepdir /var/log/elasticsearch_exporter - fowners ${PN}:${PN} /var/log/elasticsearch_exporter - newinitd "${FILESDIR}"/${PN}.initd ${PN} - newconfd "${FILESDIR}"/${PN}.confd ${PN} -} diff --git a/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.0.4_rc1.ebuild b/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.0.4_rc1.ebuild deleted file mode 100644 index b238ed08aed5..000000000000 --- a/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.0.4_rc1.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit user golang-build golang-vcs-snapshot - -MY_PV=${PV/_/} - -EGO_PN="github.com/justwatchcom/elasticsearch_exporter" -EXPORTER_COMMIT="68340fd" -ARCHIVE_URI="https://${EGO_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" -KEYWORDS="~amd64" - -DESCRIPTION="Elasticsearch stats exporter for Prometheus" -HOMEPAGE="https://github.com/justwatchcom/elasticsearch_exporter" -SRC_URI="${ARCHIVE_URI}" -LICENSE="Apache-2.0 BSD MIT" -SLOT="0" -IUSE="" - -DEPEND="dev-util/promu" - -pkg_setup() { - enewgroup ${PN} - enewuser ${PN} -1 -1 -1 ${PN} -} - -src_prepare() { - default - sed -i -e "/-s$/d" -e "s/{{.Revision}}/${EXPORTER_COMMIT}/" src/${EGO_PN}/.promu.yml || die -} - -src_compile() { - pushd src/${EGO_PN} || die - mkdir -p bin || die - GOPATH="${S}" promu build -v --prefix bin || die - popd || die -} - -src_install() { - pushd src/${EGO_PN} || die - dobin bin/elasticsearch_exporter - dodoc {README,CHANGELOG}.md - popd || die - keepdir /var/log/elasticsearch_exporter - fowners ${PN}:${PN} /var/log/elasticsearch_exporter - newinitd "${FILESDIR}"/${PN}.initd ${PN} - newconfd "${FILESDIR}"/${PN}.confd ${PN} -} diff --git a/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.1.0.ebuild b/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.1.0.ebuild deleted file mode 100644 index 50bebfc26e14..000000000000 --- a/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.1.0.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit user golang-build golang-vcs-snapshot - -MY_PV=${PV/_/} - -EGO_PN="github.com/justwatchcom/elasticsearch_exporter" -EXPORTER_COMMIT="fe20e49" -ARCHIVE_URI="https://${EGO_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" -KEYWORDS="~amd64" - -DESCRIPTION="Elasticsearch stats exporter for Prometheus" -HOMEPAGE="https://github.com/justwatchcom/elasticsearch_exporter" -SRC_URI="${ARCHIVE_URI}" -LICENSE="Apache-2.0 BSD MIT" -SLOT="0" -IUSE="" - -DEPEND="dev-util/promu" - -pkg_setup() { - enewgroup ${PN} - enewuser ${PN} -1 -1 -1 ${PN} -} - -src_prepare() { - default - sed -i -e "/-s$/d" -e "s/{{.Revision}}/${EXPORTER_COMMIT}/" src/${EGO_PN}/.promu.yml || die -} - -src_compile() { - pushd src/${EGO_PN} || die - mkdir -p bin || die - GOPATH="${S}" promu build -v --prefix bin || die - popd || die -} - -src_install() { - pushd src/${EGO_PN} || die - dobin bin/elasticsearch_exporter - dodoc {README,CHANGELOG}.md - popd || die - keepdir /var/log/elasticsearch_exporter - fowners ${PN}:${PN} /var/log/elasticsearch_exporter - newinitd "${FILESDIR}"/${PN}.initd ${PN} - newconfd "${FILESDIR}"/${PN}.confd ${PN} -} diff --git a/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.1.0_rc1.ebuild b/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.1.0_rc1.ebuild deleted file mode 100644 index ba5fb81cb6fa..000000000000 --- a/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.1.0_rc1.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit user golang-build golang-vcs-snapshot - -MY_PV=${PV/_/} - -EGO_PN="github.com/justwatchcom/elasticsearch_exporter" -EXPORTER_COMMIT="c0ec042" -ARCHIVE_URI="https://${EGO_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" -KEYWORDS="~amd64" - -DESCRIPTION="Elasticsearch stats exporter for Prometheus" -HOMEPAGE="https://github.com/justwatchcom/elasticsearch_exporter" -SRC_URI="${ARCHIVE_URI}" -LICENSE="Apache-2.0 BSD MIT" -SLOT="0" -IUSE="" - -DEPEND="dev-util/promu" - -pkg_setup() { - enewgroup ${PN} - enewuser ${PN} -1 -1 -1 ${PN} -} - -src_prepare() { - default - sed -i -e "/-s$/d" -e "s/{{.Revision}}/${EXPORTER_COMMIT}/" src/${EGO_PN}/.promu.yml || die -} - -src_compile() { - pushd src/${EGO_PN} || die - mkdir -p bin || die - GOPATH="${S}" promu build -v --prefix bin || die - popd || die -} - -src_install() { - pushd src/${EGO_PN} || die - dobin bin/elasticsearch_exporter - dodoc {README,CHANGELOG}.md - popd || die - keepdir /var/log/elasticsearch_exporter - fowners ${PN}:${PN} /var/log/elasticsearch_exporter - newinitd "${FILESDIR}"/${PN}.initd ${PN} - newconfd "${FILESDIR}"/${PN}.confd ${PN} -} diff --git a/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.3.0.ebuild b/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.3.0.ebuild new file mode 100644 index 000000000000..77d0612e73c4 --- /dev/null +++ b/app-metrics/elasticsearch_exporter/elasticsearch_exporter-1.3.0.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +GIT_COMMIT=fe20e49 +MY_PV=${PV/_/} +inherit go-module +DESCRIPTION="Elasticsearch stats exporter for Prometheus" +HOMEPAGE="https://github.com/justwatchcom/elasticsearch_exporter" +SRC_URI="https://github.com/justwatchcom/elasticsearch_exporter/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz" + +LICENSE="Apache-2.0 BSD MIT" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="acct-group/elasticsearch_exporter + acct-user/elasticsearch_exporter" + RDEPEND="${DEPEND}" +BDEPEND="dev-util/promu" + +src_prepare() { + default + sed -i -e "/-s$/d" -e "s/{{.Revision}}/${GIT_COMMIT}/" .promu.yml || die +} + +src_compile() { + promu build --prefix bin || die +} + +src_install() { + dobin bin/elasticsearch_exporter + dodoc {README,CHANGELOG}.md + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + keepdir /var/log/elasticsearch_exporter + fowners ${PN}:${PN} /var/log/elasticsearch_exporter +} diff --git a/app-metrics/grok_exporter/Manifest b/app-metrics/grok_exporter/Manifest index 86b15deb7453..89b714be60c6 100644 --- a/app-metrics/grok_exporter/Manifest +++ b/app-metrics/grok_exporter/Manifest @@ -1,12 +1,4 @@ -AUX grok_exporter.initd 582 BLAKE2B e9501f3b3a50860d2fddc0c0d84854422ae40df6aaac7dffc94fa74989f34287d6bf0b4a8c68a853c6f72c28d4fa532729405c72eb03f18f3f7f9e75ee204298 SHA512 589efbe89ff0655fcc13ea55907da0276f41c6fb9fc20f241365815b6fe8e429f3cf613c88df2b3e086d043f919d7ecdc094691a6271ed7e9e6757ccad60a14d -DIST github.com-beorn7-perks-3a771d992973f24aa725d07868b467d1ddfceafb.tar.gz 10800 BLAKE2B 5487155a4d010af70b6ea2625d10ae03b6642507902d7dc168edb5d7cf0efa1777b248d0df34ed1a2564950b12613256c1c6ce1d8c9723cc34977ed883b21c8d SHA512 c6aa5df262ab607c0a5f64372fc2fec1ddda9e5624e9d9a22cdd1bc11822c99736d88bdf5e3fc6050217b5084548417cb2926c3940e156da9397d828d59ce277 -DIST github.com-go-yaml-yaml-51d6538a90f86fe93ac480b35f37b2be17fef232.tar.gz 70766 BLAKE2B 3ea4412e259626b25145feacbe68b529d2bcf353bd098899c3a906d01f75bac5f93ec20967f7261feb388356d7b12fa945ec73822e21e029e38ce7c0b27855e7 SHA512 dec54681845fb5cdb159d44bf91cb703bb38a6af1821566d7b11a0668ee50247f542e3b7bfc21571198f9bda8ff31ce32cf67f98a8c906dee7ea9194643699f9 -DIST github.com-golang-protobuf-347cf4a86c1cb8d262994d8ef5924d4576c5b331.tar.gz 329489 BLAKE2B 828678cee603917e7f4efee2dd0902730a73932b94b12d4f4b35f0fcecaa329cdc39c3fa9926ce3706f86cc52c0aa4984f68ee0943ecc6d9571b0175ff671ab0 SHA512 de4307b91923a6890ab2f8eaf2ed4f7f32a45a4a0cc7b0d6f53ce31c5fe3ed08f378072075456d2c99c89a3b5acbca315814b8e5ec70e6ceb0ca62f7013f618c -DIST github.com-matttproud-golang_protobuf_extensions-c182affec369e30f25d3eb8cd8a478dee585ae7d.tar.gz 37541 BLAKE2B f78899afa1390aca6cb1b412271713c60107771d512ead83482e0bb1716d175b791b4b04bd24b7f469cc1a29176eadcf0545ac3bf166c5b350602420d3c05aec SHA512 141b1b781a4d1c59f5eb1af93c966343b80ed405a5f63774e6cda9f12c34536e892c7a84699d6cf2e9c775457a4c2ad5d5d0b4d302fc25a923ab81d46ad65580 -DIST github.com-prometheus-client_golang-18d13eacc9cce330610a70daf4ed0fef2e846589.tar.gz 133489 BLAKE2B 75ba882c9378d9062ed510af425f39e81e1d980dbd183f4e1228110880b3143cac74fecaa5d224e8516afcab71886041d1fbcff0832c8ab604976bbf34977eb3 SHA512 80142c7e659c3213a0990f1f871b3578b2899b14c5082a04d8eb67048da768203bb7228b2fa33d2f49d0f57596f6ad12fed47b54790a3c16d8a4cd43eb35005d -DIST github.com-prometheus-client_model-56726106282f1985ea77d5305743db7231b0c0a8.tar.gz 57192 BLAKE2B 83bbc3c756f993a8bbf3b3f4bd5437b466b8fddc1f434554f1138eb6a830dd76ac495ceaa8b8a324498b05513c4ae67d571f263cce2de5275d87cadc2bf9691a SHA512 531b3e185f96ef23c8d5791f3caa7ccbb78870811343a4630d79dcf3e217a1f9a176390752cbb427ba3550bebb984e31ade8529a2b56ea93af2ab6b7a2e98320 -DIST github.com-prometheus-common-2998b132700a7d019ff618c06a234b47c1f3f681.tar.gz 87368 BLAKE2B fc6c6e197d4cc61afefa9fb8e3a8d6b36ab029f62e3cf9adf8359e4885554f94427f17218d45c90c9d7f4a6985b2e4143a4d304d39f806bd70d2c6f05de29bc2 SHA512 b2095da96596fc500ece6b331cda2558f8c813720853f2489aee3dec65de95eb13f7b0853e3812433fdc040f16990d2f05b2a6b8b41275210c504ff333ca625d -DIST github.com-prometheus-procfs-b1a0a9a36d7453ba0f62578b99712f3a6c5f82d1.tar.gz 61720 BLAKE2B 2f9b25506527aaf6e1bf560a1b680b958d1281acbaa2bb896bfea50b5b7de8992d10e8e812f8ae449ab67145c88179c15afe1f719851d1717b28963071088082 SHA512 5938b4a8fa9a5ee32be995fed0d0e6b26941765470aca4eda63a7c42db457e83da43fde2f33b2d4ded3545e5643f607ec7060406b0a1b15e64cc732bb2badd4a -DIST grok_exporter-0.2.6.tar.gz 478354 BLAKE2B 082331eb7606517fb103af7a74088bae75740ae77d2b1fdeaee87791c4a0be706883ca505cb723f3853d3786692477086183b303de0ad82833499b231fc55909 SHA512 5204974702a8d29cc80fb7857a46f3242c78019d8a37e18e595d4bfc2f64662dbd48f9e0d5cae7b2f4f2390c35b0d621a7212718bf3c88d675601af2977de874 -EBUILD grok_exporter-0.2.6.ebuild 1977 BLAKE2B d030fa9023e0a0dabbb847654d7538d2c9b6a552ae64758ce8091fd324dd5f91ee9f41f50377d9d50ca22b2ac63f4650e3730e5d9e0aeca9a373a7317dac1a5b SHA512 dcb554df90b76ffbb958b4f7c0047e6877aa7013c882de568de103cbb32788a356644e8d4bec1fcd84ab5e307824ee4afdf7151ffa0e6157c2fa694934fb945f +AUX grok_exporter.initd 566 BLAKE2B b95ccaa8e4829a02b1bf57f22693629b6e853ac7fb9410c88c5ece617209d52ae4453123300032fc1e424c13c9ab4f0f19cad2b417c0f3b1e62500e44b4dc613 SHA512 b3ff88a1339dfc54b694a4bd73e9256eaef75cbfcf7a8a077fa5b7e51548fef9b0887e5d42892b8b985d9b200605eea6bf5da579fba9732fe3e066dea9e36c3b +DIST grok_exporter-1.0.0_rc5.tar.gz 2324696 BLAKE2B 2042067127e18fb63d2ecc412fa75184b410e27a755fd06c3634c7b345c13b1bd1d000e323467d10cc5a0cf13363b6782c4c98532875158a793111fe56a36edd SHA512 5b4772aa4b147dadc2d8298d043cc8329cbfeb081dc9bc686c34e16ae0c8a4fa30e55478a8328293349fda2d3f785a5feeda22d5ea1722ab3fa586375b696a92 +EBUILD grok_exporter-1.0.0_rc5.ebuild 1012 BLAKE2B e8adb17a75b2e6413fa55927c1885a1c35ef7975323eaab8ffc05b88151ab958c25f89b021c7ff9b852a252cb827758e19e14414393ecfcb6cf910d2d4193acc SHA512 65f937922d192e63469d108011f113c2a64e34ed57132299d4408baecbfd851f0bc94d7544c31e354dc0d8e93cf478516d6d5d260ef6b63a08fbde57e7ba1605 MISC metadata.xml 249 BLAKE2B 08603bf9d754b59bae12620988552abc7f76b87a1390d02038789eba034c22412a3593d10f443794a5171ff3905c2b5c822368b2eb9f53a528097b7b6c80ffe9 SHA512 338d72efbd040697be98aad4229b81c9694eb27ecbc39f3a18332f4cc766a46b4a0a92f32612203259bf58f5838d0aff7f0b1abec7766f6cd2394c73f7f0b251 diff --git a/app-metrics/grok_exporter/files/grok_exporter.initd b/app-metrics/grok_exporter/files/grok_exporter.initd index d38d0af63ab3..bd25c5170e9a 100644 --- a/app-metrics/grok_exporter/files/grok_exporter.initd +++ b/app-metrics/grok_exporter/files/grok_exporter.initd @@ -3,13 +3,13 @@ # Distributed under the terms of the GNU General Public License v2 description="Unstructured log data exporter for Prometheus" -config_file="${config_file:-/etc/${RC_SVCNAME}/${RC_SVCNAME}.yml}" +config_file="/etc/grok_exporter/${RC_SVCNAME}.yml" command=/usr/bin/grok_exporter command_background=yes -command_user=${RC_SVCNAME}:${RC_SVCNAME} +command_user=grok_exporter:grok_exporter pidfile=/var/run/${RC_SVCNAME}.pid -error_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log" -output_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log" +error_log="/var/log/grok_exporter/${RC_SVCNAME}.log" +output_log="/var/log/grok_exporter/${RC_SVCNAME}.log" required_files="${config_file}" command_args="-config \"${config_file}\"" diff --git a/app-metrics/grok_exporter/grok_exporter-0.2.6.ebuild b/app-metrics/grok_exporter/grok_exporter-0.2.6.ebuild deleted file mode 100644 index 29464c26fe09..000000000000 --- a/app-metrics/grok_exporter/grok_exporter-0.2.6.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -EGO_PN=github.com/fstab/grok_exporter -EGO_REVISION=81c0afe -EGO_VENDOR=( - "github.com/prometheus/client_model 56726106282f1985ea77d5305743db7231b0c0a8" - "github.com/prometheus/common 2998b132700a7d019ff618c06a234b47c1f3f681" - "github.com/prometheus/client_golang 18d13eacc9cce330610a70daf4ed0fef2e846589" - "github.com/prometheus/procfs b1a0a9a36d7453ba0f62578b99712f3a6c5f82d1" - "github.com/matttproud/golang_protobuf_extensions c182affec369e30f25d3eb8cd8a478dee585ae7d" - "github.com/golang/protobuf 347cf4a86c1cb8d262994d8ef5924d4576c5b331" - "github.com/beorn7/perks 3a771d992973f24aa725d07868b467d1ddfceafb" - "gopkg.in/yaml.v2 51d6538a90f86fe93ac480b35f37b2be17fef232 github.com/go-yaml/yaml" # branch v2.2.2 -) - -inherit user golang-build golang-vcs-snapshot - -DESCRIPTION="Unstructured log data exporter for Prometheus" -HOMEPAGE="https://github.com/fstab/Grok_exporter" -SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz - ${EGO_VENDOR_URI}" -LICENSE="Apache-2.0 BSD MIT" -SLOT="0" -KEYWORDS="~amd64" - -DEPEND=">=dev-libs/oniguruma-6.9.0" -RDEPEND=">=dev-libs/oniguruma-6.9.0:=" - -RESTRICT="strip" - -pkg_setup() { - enewgroup ${PN} - enewuser ${PN} -1 -1 -1 ${PN} -} - -src_compile() { - cd src/${EGO_PN} || die - GOPATH="${S}" go build -ldflags=" - -X ${EGO_PN}/exporter.Version=${PV} - -X ${EGO_PN}/exporter.BuildDate=$(date +%Y-%m-%d) - -X ${EGO_PN}/exporter.Branch=master - -X ${EGO_PN}/exporter.Revision=${EGO_REVISION}" || die "compile failed" -} - -src_install() { - cd src/${EGO_PN} || die - dobin ${PN} - dodoc -r *.md example - keepdir /var/log/${PN} - fowners ${PN}:${PN} /var/log/${PN} - newconfd "${FILESDIR}"/${PN}.confd ${PN} - newinitd "${FILESDIR}"/${PN}.initd ${PN} -keepdir /etc/"${PN}" -} - -pkg_postinst() { - if [[ -z "${REPLACING_VERSIONS}" ]]; then - elog "You need to create /etc/${PN}/${PN}.yml" - elog "Please see /usr/share/doc/${PVR} for examples" - fi -} diff --git a/app-metrics/grok_exporter/grok_exporter-1.0.0_rc5.ebuild b/app-metrics/grok_exporter/grok_exporter-1.0.0_rc5.ebuild new file mode 100644 index 000000000000..04782b54343c --- /dev/null +++ b/app-metrics/grok_exporter/grok_exporter-1.0.0_rc5.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +MY_PV=${PV/_rc/.RC} +inherit go-module + +DESCRIPTION="Unstructured log data exporter for Prometheus" +HOMEPAGE="https://github.com/fstab/Grok_exporter" +SRC_URI="https://github.com/fstab/grok_exporter/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0 BSD MIT" +SLOT="0" +KEYWORDS="~amd64" + +COMMON_DEPEND="acct-group/grok_exporter + acct-user/grok_exporter" +DEPEND="${COMMON_DEPEND} + >=dev-libs/oniguruma-6.9.0" +RDEPEND="${COMMON_DEPEND} + >=dev-libs/oniguruma-6.9.0:=" + +RESTRICT="strip" +S="${WORKDIR}/${PN}-${MY_PV}" + +src_compile() { + ego build . +} + +src_install() { + dobin ${PN} + dodoc -r *.md example + newinitd "${FILESDIR}"/${PN}.initd ${PN} +keepdir /etc/"${PN}" + keepdir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "You need to create /etc/${PN}/${PN}.yml" + elog "Please see /usr/share/doc/${PVR} for examples" + fi +} diff --git a/app-metrics/rabbitmq_exporter/Manifest b/app-metrics/rabbitmq_exporter/Manifest index 305f51bc57c8..75a1e4f64c47 100644 --- a/app-metrics/rabbitmq_exporter/Manifest +++ b/app-metrics/rabbitmq_exporter/Manifest @@ -12,5 +12,5 @@ DIST github.com-prometheus-client_model-f287a105a20ec685d797f65cd0ce8fbeaef42da1 DIST github.com-prometheus-common-2998b132700a7d019ff618c06a234b47c1f3f681.tar.gz 87368 BLAKE2B fc6c6e197d4cc61afefa9fb8e3a8d6b36ab029f62e3cf9adf8359e4885554f94427f17218d45c90c9d7f4a6985b2e4143a4d304d39f806bd70d2c6f05de29bc2 SHA512 b2095da96596fc500ece6b331cda2558f8c813720853f2489aee3dec65de95eb13f7b0853e3812433fdc040f16990d2f05b2a6b8b41275210c504ff333ca625d DIST github.com-prometheus-procfs-b1a0a9a36d7453ba0f62578b99712f3a6c5f82d1.tar.gz 61720 BLAKE2B 2f9b25506527aaf6e1bf560a1b680b958d1281acbaa2bb896bfea50b5b7de8992d10e8e812f8ae449ab67145c88179c15afe1f719851d1717b28963071088082 SHA512 5938b4a8fa9a5ee32be995fed0d0e6b26941765470aca4eda63a7c42db457e83da43fde2f33b2d4ded3545e5643f607ec7060406b0a1b15e64cc732bb2badd4a DIST rabbitmq_exporter-0.29.0.tar.gz 36950 BLAKE2B c4e10acb4fb610725dfc82c227ccf79ca60ffc30cd6c3f4ff741020cd7d2a757895af046bc2ded8a9b6a8c3fec870abb746e0f363e12d5221ccbce4b0fa6ca3c SHA512 8806e4a0c62126ef3575be2d558663165c04bf9b94a865d078e1ca92c0bb2d4ab057f6c37993236ab2327c1932bcf155c90ce9729924a06066da74e68086485d -EBUILD rabbitmq_exporter-0.29.0.ebuild 1873 BLAKE2B 1cb7f995e87d961886eb707c55a8c4bb0823291301c0da860d486392230dc285d0c34e236b3590f1069670d238e5ea04cb6301fb0e19bd8cab23f74e617ef750 SHA512 07d198a133ffc1158411657fcb38be08f9aa4552cee6724ce169c27c14c2566fd0523f5044582acdd923901e63aa04d2ad92f51b6ce0d8f9f8467e98a50e1cc6 +EBUILD rabbitmq_exporter-0.29.0-r1.ebuild 1912 BLAKE2B 651f68d19bf87354a76b5881d577a3ec7aeb51cbf1ac1c61aa4f285bd70c5d7d1bc0d650f52286e3d2db67bb0e615bf4452ca995165029c5847c78c7e89d7637 SHA512 43388411f40a618b5a18bf5db0be7eb6b3422ca22f9da43acdd1e7d06227776628b0c4bd276bc45fe81899f1bf3f44adc347f930164adaac39a8992a9805bb62 MISC metadata.xml 249 BLAKE2B 08603bf9d754b59bae12620988552abc7f76b87a1390d02038789eba034c22412a3593d10f443794a5171ff3905c2b5c822368b2eb9f53a528097b7b6c80ffe9 SHA512 338d72efbd040697be98aad4229b81c9694eb27ecbc39f3a18332f4cc766a46b4a0a92f32612203259bf58f5838d0aff7f0b1abec7766f6cd2394c73f7f0b251 diff --git a/app-metrics/rabbitmq_exporter/rabbitmq_exporter-0.29.0-r1.ebuild b/app-metrics/rabbitmq_exporter/rabbitmq_exporter-0.29.0-r1.ebuild new file mode 100644 index 000000000000..9fede10a764d --- /dev/null +++ b/app-metrics/rabbitmq_exporter/rabbitmq_exporter-0.29.0-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +EGO_PN=github.com/kbudde/rabbitmq_exporter +EGO_VENDOR=( + "github.com/kbudde/gobert a6daecb9ddeb548b7cfb3f5ac9deef9ded522730" + "github.com/prometheus/client_model f287a105a20ec685d797f65cd0ce8fbeaef42da1" + "github.com/prometheus/common 2998b132700a7d019ff618c06a234b47c1f3f681" + "github.com/prometheus/client_golang d2ead25884778582e740573999f7b07f47e171b4" + "github.com/prometheus/procfs b1a0a9a36d7453ba0f62578b99712f3a6c5f82d1" + "github.com/matttproud/golang_protobuf_extensions c182affec369e30f25d3eb8cd8a478dee585ae7d" + "github.com/golang/protobuf 347cf4a86c1cb8d262994d8ef5924d4576c5b331" + "github.com/beorn7/perks 3a771d992973f24aa725d07868b467d1ddfceafb" + "github.com/Sirupsen/logrus 78fb3852d92683dc28da6cc3d5f965100677c27d" + "golang.org/x/crypto ff983b9c42bc9fbf91556e191cc8efb585c16908 github.com/golang/crypto" + "golang.org/x/sys 2be51725563103c17124a318f1745b66f2347acb github.com/golang/sys" +) + +inherit golang-build golang-vcs-snapshot + +DESCRIPTION="Rabbitmq exporter for Prometheus" +HOMEPAGE="https://github.com/kbudde/rabbitmq_exporter" +SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + ${EGO_VENDOR_URI}" +LICENSE="MIT Apache-2.0 BSD" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="acct-group/rabbitmq_exporter + acct-user/rabbitmq_exporter" + RDEPEND="${DEPEND}" +BDEPEND="dev-util/promu" + +RESTRICT+=" test " + +src_prepare() { + default + sed -i -e "/-s$/d" -e "s/{{.Revision}}/v${PV}/" src/${EGO_PN}/.promu.yml || die +} + +src_compile() { + pushd src/${EGO_PN} || die + mkdir -p bin || die + GOPATH="${S}" promu build -v --prefix bin || die + popd || die +} + +src_install() { + pushd src/${EGO_PN} || die + dobin bin/${PN} + dodoc *.md + popd || die + newconfd "${FILESDIR}"/${PN}.confd ${PN} + newinitd "${FILESDIR}"/${PN}.initd ${PN} + keepdir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} +} diff --git a/app-metrics/rabbitmq_exporter/rabbitmq_exporter-0.29.0.ebuild b/app-metrics/rabbitmq_exporter/rabbitmq_exporter-0.29.0.ebuild deleted file mode 100644 index db1dbce3de09..000000000000 --- a/app-metrics/rabbitmq_exporter/rabbitmq_exporter-0.29.0.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -EGO_PN=github.com/kbudde/rabbitmq_exporter -EGO_VENDOR=( - "github.com/kbudde/gobert a6daecb9ddeb548b7cfb3f5ac9deef9ded522730" - "github.com/prometheus/client_model f287a105a20ec685d797f65cd0ce8fbeaef42da1" - "github.com/prometheus/common 2998b132700a7d019ff618c06a234b47c1f3f681" - "github.com/prometheus/client_golang d2ead25884778582e740573999f7b07f47e171b4" - "github.com/prometheus/procfs b1a0a9a36d7453ba0f62578b99712f3a6c5f82d1" - "github.com/matttproud/golang_protobuf_extensions c182affec369e30f25d3eb8cd8a478dee585ae7d" - "github.com/golang/protobuf 347cf4a86c1cb8d262994d8ef5924d4576c5b331" - "github.com/beorn7/perks 3a771d992973f24aa725d07868b467d1ddfceafb" - "github.com/Sirupsen/logrus 78fb3852d92683dc28da6cc3d5f965100677c27d" - "golang.org/x/crypto ff983b9c42bc9fbf91556e191cc8efb585c16908 github.com/golang/crypto" - "golang.org/x/sys 2be51725563103c17124a318f1745b66f2347acb github.com/golang/sys" -) - -inherit user golang-build golang-vcs-snapshot - -DESCRIPTION="Rabbitmq exporter for Prometheus" -HOMEPAGE="https://github.com/kbudde/rabbitmq_exporter" -SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz - ${EGO_VENDOR_URI}" -LICENSE="MIT Apache-2.0 BSD" -SLOT="0" -KEYWORDS="~amd64" - -DEPEND="dev-util/promu" - -pkg_setup() { - enewgroup ${PN} - enewuser ${PN} -1 -1 -1 ${PN} -} - -src_prepare() { - default - sed -i -e "/-s$/d" -e "s/{{.Revision}}/v${PV}/" src/${EGO_PN}/.promu.yml || die -} - -src_compile() { - pushd src/${EGO_PN} || die - mkdir -p bin || die - GOPATH="${S}" promu build -v --prefix bin || die - popd || die -} - -src_install() { - pushd src/${EGO_PN} || die - dobin bin/${PN} - dodoc *.md - popd || die - keepdir /var/log/${PN} - fowners ${PN}:${PN} /var/log/${PN} - newconfd "${FILESDIR}"/${PN}.confd ${PN} - newinitd "${FILESDIR}"/${PN}.initd ${PN} -} diff --git a/app-metrics/snmp_exporter/Manifest b/app-metrics/snmp_exporter/Manifest index 7ec9a1f5ba20..b2a644a2d76d 100644 --- a/app-metrics/snmp_exporter/Manifest +++ b/app-metrics/snmp_exporter/Manifest @@ -1,6 +1,7 @@ AUX snmp_exporter.confd 98 BLAKE2B 3058ed314dd66772e0d299f135cc1ddb4f3c1f47403848fd249e949173430673991a12e794c74bfb53d0f25f313513d2d70c03d589b6d947659d03e33e6dea8a SHA512 e757dd327252ffd29a65170837aea147128d8effee3d88ac4f0474efffaa10748b51bfbecab999605284030a3026b13ce3ce2c1a7ec347a6ff191e44040d84aa AUX snmp_exporter.initd 591 BLAKE2B 103fec1c2e4ad46bf86893faaaf23bd64c7f22ecc905b059e31199c08d610d58852f678d18826cb06f51beab65c8777f49a05a005ad35b77dcfc3e5eef398926 SHA512 903fbcf43a737d2823ab74e954f40134a64414cc1e79a14c78ad51682baa52c3443e85e94ec1abb294753c93a55483c148239e738b72c03bcdc7d4a595580f41 AUX snmp_exporter.logrotated 99 BLAKE2B b0e459df102728238b137443ced2cf717ace780d83caaa7f18117ca8605453e8f325a48f8a4375956209feac210dc452da9cd0a267cf2d663b64f0a2c80f1eb5 SHA512 c1e1264b5a5612b4794c49613b79826245d3d31db65c1541c3ddfb41872993e7039fb0a84f25260d92a78e8e20005560bdd5e41ee6373e85f8f5e866726c9af4 -DIST snmp_exporter-0.15.0.tar.gz 1482592 BLAKE2B f7695eb37f2d702f3a6792337de7a1e878229ec20c8f4bea17d35e174219b71958aaf09bf91daaaffe12c5d03840887ce2ef3b37ce58a56352e8bcbb418bdb5f SHA512 1050a25d12a8201deab0ab7ea95dc35e250954a321d14251c10f87b016c879cf036e01f4043e3463607200381de63f12ea6bcf094dea2939707545f978c2675b -EBUILD snmp_exporter-0.15.0.ebuild 1576 BLAKE2B d5d657d3898b8acac133f0651e3f3e457909d1eb0b2f4840e727e40d7051e01368f68063f9e27e5addd4b4e357c263bffc612462e06fa832d87de3dc32458b27 SHA512 6fea24a17f4448f1fc2c02e28ec9e6a9345e4f7f2a2f1c5f973b543292eb4899ce262bdd2d08893141fe2aefa026ca7a72a415e78de792e711484be90b31eb32 +DIST snmp_exporter-0.20.0-deps.tar.xz 167938880 BLAKE2B 26db1effd4c74c1d8ad063e390e3ebc2f652bc901b679a70dfa2fda479ead9622eb3bf729f24a3a0088d9b154be108e472218a84109ef23d8413e0db2f8afc9e SHA512 f2b2e72967bd7255abf5f808d1dbb5691755d232b32e0c833ebc9b74a469b5c2b704afb7f32c1c591653a4ad6162efc5ec13345e9f5e2d08c7f01d24bdddf3a1 +DIST snmp_exporter-0.20.0.tar.gz 290899 BLAKE2B 81c2c6e8b1f61fe322cf040910744857f0628b61172774069675f5702d7e8dcc443a5567d5fe9d3e26139fee87c3cae8ed5fb7ce21c13b8a0f0cab1cd76384aa SHA512 fe09033e713f12b5a6ad79445def55c8d94c75cbee5e4e7c4683e853c1a8335005462d607e0c7306d2ee6e70178edeb9b6cff0c35aa6d36a4d0fa5ce45cedb51 +EBUILD snmp_exporter-0.20.0-r1.ebuild 1374 BLAKE2B fb03375643db903a2eb6b542b473cc98c830325b8b92d281ed1f6d6ff9280b55d33ccdbbde61419918f8dd2dc6a7e5781f3051b35c9841fb569295639e9f40e1 SHA512 d56680295b61b8ed7f43b5e374e32c883b76b9f8b7e28b4183dd2169a0280121420601bf1f54c875de6ada485c439ffd9d9c8fd664400906e8810bb6ba876166 MISC metadata.xml 338 BLAKE2B 74a81881d38a3e761120c6d6a4618a7ee680a512b11f9f611177e69a9e8a2010c231b45d7cc15f58ea746268e3e584ddb5f5bb9dba5fe1c9725a6a11a3f704e0 SHA512 280a333a484837548652059d2d13bd3f9ad304c6d4a746c2f2e6e7e9ce229979feeaca7f61de4d64704da207b73e22045dca6596b8102bd92529d88af71e4861 diff --git a/app-metrics/snmp_exporter/snmp_exporter-0.15.0.ebuild b/app-metrics/snmp_exporter/snmp_exporter-0.15.0.ebuild deleted file mode 100644 index aaf7c2142f37..000000000000 --- a/app-metrics/snmp_exporter/snmp_exporter-0.15.0.ebuild +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit user golang-build golang-vcs-snapshot - -EGO_PN="github.com/prometheus/snmp_exporter" -EGIT_COMMIT="v${PV/_rc/-rc.}" -SNMP_EXPORTER_COMMIT="92a3da4" -ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" -KEYWORDS="~amd64" - -DESCRIPTION="Prometheus exporter for snmp metrics" -HOMEPAGE="https://github.com/prometheus/snmp_exporter" -SRC_URI="${ARCHIVE_URI}" -LICENSE="Apache-2.0 BSD BSD-2 MIT" -SLOT="0" -IUSE="" - -DEPEND=">=dev-lang/go-1.11 - dev-util/promu - net-analyzer/net-snmp" - -pkg_setup() { - enewgroup ${PN} - enewuser ${PN} -1 -1 -1 ${PN} -} - -src_prepare() { - default - sed -i -e "s/{{.Revision}}/${SNMP_EXPORTER_COMMIT}/" src/${EGO_PN}/.promu.yml || die -} - -src_compile() { - pushd src/${EGO_PN} || die - GO111MODULE=on GOPATH="${S}" GOCACHE="${T}"/go-cache promu build -v || die - pushd generator || die - GO111MODULE=on GOPATH="${S}" GOCACHE="${T}"/go-cache go build -mod=vendor -o ../bin/generator . || die - popd || die -} - -src_install() { - pushd src/${EGO_PN} || die - dobin bin/generator snmp_exporter - dodoc {README,CONTRIBUTING}.md generator/{FORMAT,README}.md generator/generator.yml - insinto /etc/snmp_exporter - newins snmp.yml snmp.yml.example - popd || die - keepdir /var/lib/snmp_exporter /var/log/snmp_exporter - fowners ${PN}:${PN} /var/lib/snmp_exporter /var/log/snmp_exporter - newinitd "${FILESDIR}"/${PN}.initd ${PN} - newconfd "${FILESDIR}"/${PN}.confd ${PN} - insinto /etc/logrotate.d - newins "${FILESDIR}/${PN}.logrotated" "${PN}" -} diff --git a/app-metrics/snmp_exporter/snmp_exporter-0.20.0-r1.ebuild b/app-metrics/snmp_exporter/snmp_exporter-0.20.0-r1.ebuild new file mode 100644 index 000000000000..e05f22ca1588 --- /dev/null +++ b/app-metrics/snmp_exporter/snmp_exporter-0.20.0-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +SNMP_EXPORTER_COMMIT=c33572b6 +inherit go-module + +DESCRIPTION="Prometheus exporter for snmp metrics" +HOMEPAGE="https://github.com/prometheus/snmp_exporter" +SRC_URI="https://github.com/prometheus/${PN}/archive/v${PV/_rc/-rc.}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz" + +LICENSE="Apache-2.0 BSD BSD-2 MIT" +SLOT="0" +KEYWORDS="~amd64" + +COMMON_DEPEND="acct-group/snmp_exporter + acct-user/snmp_exporter + net-analyzer/net-snmp" + DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +BDEPEND="dev-util/promu" + +src_prepare() { + default + sed -i -e "s/{{.Revision}}/${SNMP_EXPORTER_COMMIT}/" .promu.yml || die +} + +src_compile() { + promu build --prefix bin || die + pushd generator || die + ego build -o ../bin/generator + popd || die +} + +src_install() { + dobin bin/generator + newbin bin/${PN}-${PV} ${PN} + dodoc {README,CONTRIBUTING}.md generator/{FORMAT,README}.md generator/generator.yml + insinto /etc/snmp_exporter + newins snmp.yml snmp.yml.example + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotated" "${PN}" + keepdir /var/lib/snmp_exporter /var/log/snmp_exporter + fowners ${PN}:${PN} /var/lib/snmp_exporter /var/log/snmp_exporter +} -- cgit v1.2.3