parent
4c489cc1da
commit
6aabfa7f30
Binary file not shown.
Binary file not shown.
@ -1,3 +1 @@
|
|||||||
DIST collectd-5.6.2.tar.bz2 1806969 BLAKE2B 2311b6cc51297264e1bfc705553c728ad2ae3355ce8b5fb25b8ac91aaef4b78921235c675ff26535e3388c1b1af37aec4d810b2e6c6b60fcc3d79e0149841989 SHA512 81438e2e653649cf8a447f475b41844b7adb8ec436b43fb395ba9cf8b09b56a068633fe4b6c802d5cde3909d85a3af2542f5804005b3843f7936a37553911d61
|
|
||||||
DIST collectd-5.7.1.tar.bz2 1797725 BLAKE2B 5a24d74ff26ed8745d3b50d3b22db0a939aedc6048ff279880f892572d5e5799b1e3b4630250ebb9066325b2583f99b441a42d0bd0ab4a3c20b1aba82b9d16f2 SHA512 f2edf4ecf3bbf5f4e10c797614a7ae39c18678601038574cec4f2ea6a8773444af4592e2872ed75a5afe5f746adaff2449df51443d98d2560a23722e46bef164
|
|
||||||
DIST collectd-5.7.2.tar.bz2 1798777 BLAKE2B 4af359a773457bb9c05b6a301d7728eea7598c200f7ca534875b07d1d011b280ab138f680d9607723f14523dd71dcbec3a41e0d8d183848c8ef809cef86c2b8f SHA512 8844b67159f8da2203b5ac57ef19fce0a01050a016174d196b48b5fb24925ad2935af9bdd9af06097ff663499abc496cdcc2d9e9a10f403f8d707c465c1a88f3
|
DIST collectd-5.7.2.tar.bz2 1798777 BLAKE2B 4af359a773457bb9c05b6a301d7728eea7598c200f7ca534875b07d1d011b280ab138f680d9607723f14523dd71dcbec3a41e0d8d183848c8ef809cef86c2b8f SHA512 8844b67159f8da2203b5ac57ef19fce0a01050a016174d196b48b5fb24925ad2935af9bdd9af06097ff663499abc496cdcc2d9e9a10f403f8d707c465c1a88f3
|
||||||
|
@ -1,532 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="6"
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
|
||||||
JAVA_PKG_OPT_USE="collectd_plugins_java"
|
|
||||||
|
|
||||||
inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info multilib perl-functions python-single-r1 systemd user
|
|
||||||
|
|
||||||
DESCRIPTION="Collects system statistics and provides mechanisms to store the values"
|
|
||||||
|
|
||||||
HOMEPAGE="https://collectd.org/"
|
|
||||||
SRC_URI="${HOMEPAGE%/}/files/${P}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="amd64 arm x86"
|
|
||||||
IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux 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
|
|
||||||
# aquaero: Requires aerotools-ng/libaquaero5
|
|
||||||
# barometer: Requires libi2c (i2c_smbus_read_i2c_block_data)
|
|
||||||
# grpc: Requires libgrpc
|
|
||||||
# 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)
|
|
||||||
# pf: Requires BSD packet filter
|
|
||||||
# pinba: Requires MySQL Pinba engine (http://pinba.org/)
|
|
||||||
# tape: Requires libkstat (Solaris only)
|
|
||||||
# write_mongodb: https://github.com/collectd/collectd/issues/492
|
|
||||||
# write_riemann: Requires riemann-c-client
|
|
||||||
# xmms: Requires libxmms (v1)
|
|
||||||
# zone: Solaris only...
|
|
||||||
COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors aquaero barometer grpc lpar mic
|
|
||||||
netapp pf pinba tape write_kafka write_mongodb 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
|
|
||||||
ceph cgroups chrony 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 hddtemp interface
|
|
||||||
ipc ipmi iptables ipvs irq java lua load logfile log_logstash lvm
|
|
||||||
madwifi match_empty_counter match_hashed match_regex match_timediff
|
|
||||||
match_value mbmon 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 perl ping postgresql powerdns processes protocols
|
|
||||||
python python redis routeros rrdcached rrdtool sensors serial
|
|
||||||
sigrok smart snmp statsd swap syslog table tail tail_csv
|
|
||||||
target_notification target_replace target_scale target_set tcpconns
|
|
||||||
teamspeak2 ted thermal threshold tokyotyrant turbostat unixsock
|
|
||||||
uptime users uuid varnish virt vmem vserver wireless write_graphite
|
|
||||||
write_http write_kafka write_log write_redis write_sensu 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="
|
|
||||||
dev-libs/libgcrypt:=
|
|
||||||
dev-libs/libltdl:0=
|
|
||||||
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_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_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? ( dev-lang/lua:0= )
|
|
||||||
collectd_plugins_lvm? ( sys-fs/lvm2 )
|
|
||||||
collectd_plugins_memcachec? ( dev-libs/libmemcached )
|
|
||||||
collectd_plugins_modbus? ( dev-libs/libmodbus )
|
|
||||||
collectd_plugins_mqtt? ( app-misc/mosquitto )
|
|
||||||
collectd_plugins_mysql? ( >=virtual/mysql-5.0 )
|
|
||||||
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_onewire? ( >=sys-fs/owfs-3.1:= )
|
|
||||||
collectd_plugins_oracle? ( dev-db/oracle-instantclient-basic )
|
|
||||||
collectd_plugins_perl? ( dev-lang/perl:=[ithreads] )
|
|
||||||
collectd_plugins_ping? ( net-libs/liboping )
|
|
||||||
collectd_plugins_postgresql? ( dev-db/postgresql:= )
|
|
||||||
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_smart? ( dev-libs/libatasmart )
|
|
||||||
collectd_plugins_snmp? ( net-analyzer/net-snmp )
|
|
||||||
collectd_plugins_tokyotyrant? ( net-misc/tokyotyrant )
|
|
||||||
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_redis? ( dev-libs/hiredis:= )
|
|
||||||
collectd_plugins_xencpu? ( app-emulation/xen-tools:= )
|
|
||||||
|
|
||||||
kernel_FreeBSD? (
|
|
||||||
collectd_plugins_disk? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_interface? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_load? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_memory? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_swap? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_users? ( sys-libs/libstatgrab:= )
|
|
||||||
)"
|
|
||||||
|
|
||||||
# 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 )
|
|
||||||
virtual/pkgconfig"
|
|
||||||
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
collectd_plugins_java? ( >=virtual/jre-1.6 )
|
|
||||||
collectd_plugins_syslog? ( virtual/logger )
|
|
||||||
selinux? ( sec-policy/selinux-collectd )
|
|
||||||
!<sys-apps/openrc-0.18.2"
|
|
||||||
|
|
||||||
REQUIRED_USE="
|
|
||||||
collectd_plugins_python? ( ${PYTHON_REQUIRED_USE} )
|
|
||||||
collectd_plugins_smart? ( udev )"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-5.6.0-gentoo.patch
|
|
||||||
"${FILESDIR}"/${PN}-5.6.2-CVE-2017-7401.patch
|
|
||||||
"${FILESDIR}"/${PN}-5.6.2-issue2303.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
# @FUNCTION: collectd_plugin_kernel_linux
|
|
||||||
# @DESCRIPTION:
|
|
||||||
# USAGE: <plugin name> <kernel_options> <severity>
|
|
||||||
# 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_python && python-single-r1_pkg_setup
|
|
||||||
|
|
||||||
enewgroup collectd
|
|
||||||
enewuser collectd -1 -1 /var/lib/collectd collectd
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# fix installdirs for perl, bug 444360
|
|
||||||
sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || 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
|
|
||||||
|
|
||||||
if use collectd_plugins_java; then
|
|
||||||
# Set javac -source and -target flags according to (R)DEPEND.
|
|
||||||
sed -i -e "s/\$(JAVAC)/\0 $(java-pkg_javac-args)/g" bindings/java/Makefile.am || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
ebegin "Removing bundled libltdl"
|
|
||||||
rm -rf libltdl || die
|
|
||||||
eend 0
|
|
||||||
|
|
||||||
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 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_FreeBSD; then
|
|
||||||
einfo "Enabling FreeBSD plugins."
|
|
||||||
myos_plugins=${bsd_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
|
|
||||||
myconf+=" --disable-${plugin}"
|
|
||||||
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})"
|
|
||||||
# ... must we link against libstatgrab? Bug #541518
|
|
||||||
if use kernel_FreeBSD && has ${plugin} ${libstatgrab_plugins}; then
|
|
||||||
einfo "We must link against libstatgrab due to plugin \"${plugin}\" ..."
|
|
||||||
need_libstatgrab=1
|
|
||||||
fi
|
|
||||||
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 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
|
|
||||||
|
|
||||||
fowners root:collectd /etc/collectd.conf
|
|
||||||
fperms u=rw,g=r,o= /etc/collectd.conf
|
|
||||||
|
|
||||||
dodoc AUTHORS ChangeLog NEWS README TODO
|
|
||||||
|
|
||||||
if use contrib ; then
|
|
||||||
insinto /usr/share/doc/${PF}
|
|
||||||
doins -r contrib
|
|
||||||
fi
|
|
||||||
|
|
||||||
keepdir /var/lib/${PN}
|
|
||||||
fowners collectd:collectd /var/lib/${PN}
|
|
||||||
|
|
||||||
newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
|
|
||||||
newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
|
|
||||||
systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service
|
|
||||||
|
|
||||||
insinto /etc/logrotate.d
|
|
||||||
newins "${FILESDIR}/${PN}.logrotate" ${PN}
|
|
||||||
|
|
||||||
sed -i -e 's:^.*PIDFile "/var/run/collectd.pid":PIDFile "/run/collectd/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# <LoadPlugin perl>\n# Globals true\n# </LoadPlugin>:' "${ED}"etc/collectd.conf || die
|
|
||||||
sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# <LoadPlugin python>\n# Globals true\n# </LoadPlugin>:' "${ED}"etc/collectd.conf || die
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
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="${EROOT}usr/lib/systemd/system/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
|
|
||||||
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/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,537 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="6"
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
|
||||||
JAVA_PKG_OPT_USE="collectd_plugins_java"
|
|
||||||
|
|
||||||
inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info multilib perl-functions python-single-r1 systemd user
|
|
||||||
|
|
||||||
DESCRIPTION="Collects system statistics and provides mechanisms to store the values"
|
|
||||||
|
|
||||||
HOMEPAGE="https://collectd.org/"
|
|
||||||
SRC_URI="${HOMEPAGE%/}/files/${P}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~arm ~x86"
|
|
||||||
IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux 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
|
|
||||||
# aquaero: Requires aerotools-ng/libaquaero5
|
|
||||||
# barometer: Requires libi2c (i2c_smbus_read_i2c_block_data)
|
|
||||||
# dpdkstat: Requires dpdk
|
|
||||||
# grpc: Requires libgrpc
|
|
||||||
# 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)
|
|
||||||
# pf: Requires BSD packet filter
|
|
||||||
# pinba: Requires MySQL Pinba engine (http://pinba.org/)
|
|
||||||
# tape: Requires libkstat (Solaris only)
|
|
||||||
# write_mongodb: https://github.com/collectd/collectd/issues/492
|
|
||||||
# write_riemann: Requires riemann-c-client
|
|
||||||
# xmms: Requires libxmms (v1)
|
|
||||||
# zone: Solaris only...
|
|
||||||
COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors aquaero barometer dpdkstat grpc
|
|
||||||
intel_rdt lpar mic netapp pf pinba tape write_mongodb
|
|
||||||
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
|
|
||||||
ceph cgroups chrony 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 hddtemp
|
|
||||||
hugepages interface ipc ipmi iptables ipvs irq java lua
|
|
||||||
load logfile log_logstash lvm madwifi match_empty_counter
|
|
||||||
match_hashed match_regex match_timediff match_value mbmon 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 perl ping
|
|
||||||
postgresql powerdns processes protocols python python redis
|
|
||||||
routeros rrdcached rrdtool sensors serial sigrok smart snmp statsd
|
|
||||||
swap syslog table tail tail_csv target_notification target_replace
|
|
||||||
target_scale target_set tcpconns teamspeak2 ted thermal threshold
|
|
||||||
tokyotyrant turbostat unixsock uptime users uuid varnish virt
|
|
||||||
vmem vserver wireless write_graphite write_http write_kafka
|
|
||||||
write_log write_prometheus write_redis write_sensu 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="
|
|
||||||
dev-libs/libgcrypt:=
|
|
||||||
dev-libs/libltdl:0=
|
|
||||||
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_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_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? ( dev-lang/lua:0= )
|
|
||||||
collectd_plugins_lvm? ( sys-fs/lvm2 )
|
|
||||||
collectd_plugins_memcachec? ( dev-libs/libmemcached )
|
|
||||||
collectd_plugins_modbus? ( dev-libs/libmodbus )
|
|
||||||
collectd_plugins_mqtt? ( app-misc/mosquitto )
|
|
||||||
collectd_plugins_mysql? ( >=virtual/mysql-5.0 )
|
|
||||||
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_onewire? ( >=sys-fs/owfs-3.1:= )
|
|
||||||
collectd_plugins_oracle? ( dev-db/oracle-instantclient-basic )
|
|
||||||
collectd_plugins_perl? ( dev-lang/perl:=[ithreads] )
|
|
||||||
collectd_plugins_ping? ( net-libs/liboping )
|
|
||||||
collectd_plugins_postgresql? ( dev-db/postgresql:= )
|
|
||||||
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_smart? ( dev-libs/libatasmart )
|
|
||||||
collectd_plugins_snmp? ( net-analyzer/net-snmp )
|
|
||||||
collectd_plugins_tokyotyrant? ( net-misc/tokyotyrant )
|
|
||||||
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_prometheus? ( >=dev-libs/protobuf-c-1.2.1-r1:= net-libs/libmicrohttpd:= )
|
|
||||||
collectd_plugins_write_redis? ( dev-libs/hiredis:= )
|
|
||||||
collectd_plugins_xencpu? ( app-emulation/xen-tools:= )
|
|
||||||
|
|
||||||
kernel_FreeBSD? (
|
|
||||||
collectd_plugins_disk? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_interface? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_load? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_memory? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_swap? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_users? ( sys-libs/libstatgrab:= )
|
|
||||||
)"
|
|
||||||
|
|
||||||
# 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 )
|
|
||||||
virtual/pkgconfig"
|
|
||||||
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
collectd_plugins_java? ( >=virtual/jre-1.6 )
|
|
||||||
collectd_plugins_syslog? ( virtual/logger )
|
|
||||||
selinux? ( sec-policy/selinux-collectd )
|
|
||||||
!<sys-apps/openrc-0.18.2"
|
|
||||||
|
|
||||||
REQUIRED_USE="
|
|
||||||
collectd_plugins_python? ( ${PYTHON_REQUIRED_USE} )
|
|
||||||
collectd_plugins_smart? ( udev )"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-5.6.0-gentoo.patch
|
|
||||||
"${FILESDIR}"/${PN}-5.6.2-CVE-2017-7401.patch
|
|
||||||
"${FILESDIR}"/${PN}-5.6.2-issue2303.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
# @FUNCTION: collectd_plugin_kernel_linux
|
|
||||||
# @DESCRIPTION:
|
|
||||||
# USAGE: <plugin name> <kernel_options> <severity>
|
|
||||||
# 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_python && python-single-r1_pkg_setup
|
|
||||||
|
|
||||||
enewgroup collectd
|
|
||||||
enewuser collectd -1 -1 /var/lib/collectd collectd
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# fix installdirs for perl, bug 444360
|
|
||||||
sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || 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
|
|
||||||
|
|
||||||
if use collectd_plugins_java; then
|
|
||||||
# Set javac -source and -target flags according to (R)DEPEND.
|
|
||||||
sed -i -e "s/\$(JAVAC)/\0 $(java-pkg_javac-args)/g" bindings/java/Makefile.am || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
ebegin "Removing bundled libltdl"
|
|
||||||
rm -rf libltdl || die
|
|
||||||
eend 0
|
|
||||||
|
|
||||||
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_FreeBSD; then
|
|
||||||
einfo "Enabling FreeBSD plugins."
|
|
||||||
myos_plugins=${bsd_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
|
|
||||||
myconf+=" --disable-${plugin}"
|
|
||||||
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})"
|
|
||||||
# ... must we link against libstatgrab? Bug #541518
|
|
||||||
if use kernel_FreeBSD && has ${plugin} ${libstatgrab_plugins}; then
|
|
||||||
einfo "We must link against libstatgrab due to plugin \"${plugin}\" ..."
|
|
||||||
need_libstatgrab=1
|
|
||||||
fi
|
|
||||||
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 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
|
|
||||||
|
|
||||||
fowners root:collectd /etc/collectd.conf
|
|
||||||
fperms u=rw,g=r,o= /etc/collectd.conf
|
|
||||||
|
|
||||||
dodoc AUTHORS ChangeLog README
|
|
||||||
|
|
||||||
if use contrib ; then
|
|
||||||
insinto /usr/share/doc/${PF}
|
|
||||||
doins -r contrib
|
|
||||||
fi
|
|
||||||
|
|
||||||
keepdir /var/lib/${PN}
|
|
||||||
fowners collectd:collectd /var/lib/${PN}
|
|
||||||
|
|
||||||
newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
|
|
||||||
newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
|
|
||||||
systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service
|
|
||||||
|
|
||||||
insinto /etc/logrotate.d
|
|
||||||
newins "${FILESDIR}/${PN}.logrotate" ${PN}
|
|
||||||
|
|
||||||
sed -i -e 's:^.*PIDFile "/var/run/collectd.pid":PIDFile "/run/collectd/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# <LoadPlugin perl>\n# Globals true\n# </LoadPlugin>:' "${ED}"etc/collectd.conf || die
|
|
||||||
sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# <LoadPlugin python>\n# Globals true\n# </LoadPlugin>:' "${ED}"etc/collectd.conf || die
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
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="${EROOT}usr/lib/systemd/system/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
|
|
||||||
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/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,536 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="6"
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
|
||||||
JAVA_PKG_OPT_USE="collectd_plugins_java"
|
|
||||||
|
|
||||||
inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info multilib perl-functions python-single-r1 systemd user
|
|
||||||
|
|
||||||
DESCRIPTION="Collects system statistics and provides mechanisms to store the values"
|
|
||||||
|
|
||||||
HOMEPAGE="https://collectd.org/"
|
|
||||||
SRC_URI="${HOMEPAGE%/}/files/${P}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~arm ~x86"
|
|
||||||
IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux 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
|
|
||||||
# aquaero: Requires aerotools-ng/libaquaero5
|
|
||||||
# barometer: Requires libi2c (i2c_smbus_read_i2c_block_data)
|
|
||||||
# dpdkstat: Requires dpdk
|
|
||||||
# grpc: Requires libgrpc
|
|
||||||
# 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)
|
|
||||||
# pf: Requires BSD packet filter
|
|
||||||
# pinba: Requires MySQL Pinba engine (http://pinba.org/)
|
|
||||||
# tape: Requires libkstat (Solaris only)
|
|
||||||
# write_mongodb: https://github.com/collectd/collectd/issues/492
|
|
||||||
# write_riemann: Requires riemann-c-client
|
|
||||||
# xmms: Requires libxmms (v1)
|
|
||||||
# zone: Solaris only...
|
|
||||||
COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors aquaero barometer dpdkstat grpc
|
|
||||||
intel_rdt lpar mic netapp pf pinba tape write_mongodb
|
|
||||||
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
|
|
||||||
ceph cgroups chrony 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 hddtemp
|
|
||||||
hugepages interface ipc ipmi iptables ipvs irq java lua
|
|
||||||
load logfile log_logstash lvm madwifi match_empty_counter
|
|
||||||
match_hashed match_regex match_timediff match_value mbmon 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 perl ping
|
|
||||||
postgresql powerdns processes protocols python python redis
|
|
||||||
routeros rrdcached rrdtool sensors serial sigrok smart snmp statsd
|
|
||||||
swap syslog table tail tail_csv target_notification target_replace
|
|
||||||
target_scale target_set tcpconns teamspeak2 ted thermal threshold
|
|
||||||
tokyotyrant turbostat unixsock uptime users uuid varnish virt
|
|
||||||
vmem vserver wireless write_graphite write_http write_kafka
|
|
||||||
write_log write_prometheus write_redis write_sensu 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="
|
|
||||||
dev-libs/libgcrypt:=
|
|
||||||
dev-libs/libltdl:0=
|
|
||||||
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_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_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? ( dev-lang/lua:0= )
|
|
||||||
collectd_plugins_lvm? ( sys-fs/lvm2 )
|
|
||||||
collectd_plugins_memcachec? ( dev-libs/libmemcached )
|
|
||||||
collectd_plugins_modbus? ( dev-libs/libmodbus )
|
|
||||||
collectd_plugins_mqtt? ( app-misc/mosquitto )
|
|
||||||
collectd_plugins_mysql? ( >=virtual/mysql-5.0 )
|
|
||||||
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_onewire? ( >=sys-fs/owfs-3.1:= )
|
|
||||||
collectd_plugins_oracle? ( dev-db/oracle-instantclient-basic )
|
|
||||||
collectd_plugins_perl? ( dev-lang/perl:=[ithreads] )
|
|
||||||
collectd_plugins_ping? ( net-libs/liboping )
|
|
||||||
collectd_plugins_postgresql? ( dev-db/postgresql:= )
|
|
||||||
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_smart? ( dev-libs/libatasmart )
|
|
||||||
collectd_plugins_snmp? ( net-analyzer/net-snmp )
|
|
||||||
collectd_plugins_tokyotyrant? ( net-misc/tokyotyrant )
|
|
||||||
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_prometheus? ( >=dev-libs/protobuf-c-1.2.1-r1:= net-libs/libmicrohttpd:= )
|
|
||||||
collectd_plugins_write_redis? ( dev-libs/hiredis:= )
|
|
||||||
collectd_plugins_xencpu? ( app-emulation/xen-tools:= )
|
|
||||||
|
|
||||||
kernel_FreeBSD? (
|
|
||||||
collectd_plugins_disk? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_interface? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_load? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_memory? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_swap? ( sys-libs/libstatgrab:= )
|
|
||||||
collectd_plugins_users? ( sys-libs/libstatgrab:= )
|
|
||||||
)"
|
|
||||||
|
|
||||||
# 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 )
|
|
||||||
virtual/pkgconfig"
|
|
||||||
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
collectd_plugins_java? ( >=virtual/jre-1.6 )
|
|
||||||
collectd_plugins_syslog? ( virtual/logger )
|
|
||||||
selinux? ( sec-policy/selinux-collectd )
|
|
||||||
!<sys-apps/openrc-0.18.2"
|
|
||||||
|
|
||||||
REQUIRED_USE="
|
|
||||||
collectd_plugins_python? ( ${PYTHON_REQUIRED_USE} )
|
|
||||||
collectd_plugins_smart? ( udev )"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-5.6.0-gentoo.patch
|
|
||||||
"${FILESDIR}"/${PN}-5.7.2-issue-2443.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
# @FUNCTION: collectd_plugin_kernel_linux
|
|
||||||
# @DESCRIPTION:
|
|
||||||
# USAGE: <plugin name> <kernel_options> <severity>
|
|
||||||
# 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_python && python-single-r1_pkg_setup
|
|
||||||
|
|
||||||
enewgroup collectd
|
|
||||||
enewuser collectd -1 -1 /var/lib/collectd collectd
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# fix installdirs for perl, bug 444360
|
|
||||||
sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || 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
|
|
||||||
|
|
||||||
if use collectd_plugins_java; then
|
|
||||||
# Set javac -source and -target flags according to (R)DEPEND.
|
|
||||||
sed -i -e "s/\$(JAVAC)/\0 $(java-pkg_javac-args)/g" bindings/java/Makefile.am || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
ebegin "Removing bundled libltdl"
|
|
||||||
rm -rf libltdl || die
|
|
||||||
eend 0
|
|
||||||
|
|
||||||
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_FreeBSD; then
|
|
||||||
einfo "Enabling FreeBSD plugins."
|
|
||||||
myos_plugins=${bsd_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
|
|
||||||
myconf+=" --disable-${plugin}"
|
|
||||||
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})"
|
|
||||||
# ... must we link against libstatgrab? Bug #541518
|
|
||||||
if use kernel_FreeBSD && has ${plugin} ${libstatgrab_plugins}; then
|
|
||||||
einfo "We must link against libstatgrab due to plugin \"${plugin}\" ..."
|
|
||||||
need_libstatgrab=1
|
|
||||||
fi
|
|
||||||
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 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
|
|
||||||
|
|
||||||
fowners root:collectd /etc/collectd.conf
|
|
||||||
fperms u=rw,g=r,o= /etc/collectd.conf
|
|
||||||
|
|
||||||
dodoc AUTHORS ChangeLog README
|
|
||||||
|
|
||||||
if use contrib ; then
|
|
||||||
insinto /usr/share/doc/${PF}
|
|
||||||
doins -r contrib
|
|
||||||
fi
|
|
||||||
|
|
||||||
keepdir /var/lib/${PN}
|
|
||||||
fowners collectd:collectd /var/lib/${PN}
|
|
||||||
|
|
||||||
newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
|
|
||||||
newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
|
|
||||||
systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service
|
|
||||||
|
|
||||||
insinto /etc/logrotate.d
|
|
||||||
newins "${FILESDIR}/${PN}.logrotate" ${PN}
|
|
||||||
|
|
||||||
sed -i -e 's:^.*PIDFile "/var/run/collectd.pid":PIDFile "/run/collectd/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# <LoadPlugin perl>\n# Globals true\n# </LoadPlugin>:' "${ED}"etc/collectd.conf || die
|
|
||||||
sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# <LoadPlugin python>\n# Globals true\n# </LoadPlugin>:' "${ED}"etc/collectd.conf || die
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
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="${EROOT}usr/lib/systemd/system/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
|
|
||||||
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/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
From f6be4f9b49b949b379326c3d7002476e6ce4f211 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pavel Rochnyack <pavel2000@ngs.ru>
|
|
||||||
Date: Mon, 3 Apr 2017 11:57:09 +0600
|
|
||||||
Subject: [PATCH] network plugin: Fix endless loop DOS in parse_packet()
|
|
||||||
|
|
||||||
When correct 'Signature part' is received by Collectd, configured without
|
|
||||||
AuthFile option, condition for endless loop occurs due to missing increase
|
|
||||||
of pointer to next unprocessed part.
|
|
||||||
|
|
||||||
This is a forward-port of #2233.
|
|
||||||
|
|
||||||
Fixes: CVE-2017-7401
|
|
||||||
Closes: #2174
|
|
||||||
Signed-off-by: Florian Forster <octo@collectd.org>
|
|
||||||
---
|
|
||||||
src/network.c | 20 ++++++++++++--------
|
|
||||||
1 file changed, 12 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/network.c b/src/network.c
|
|
||||||
index be4c3ba..2ff09af 100644
|
|
||||||
--- a/src/network.c
|
|
||||||
+++ b/src/network.c
|
|
||||||
@@ -1003,14 +1003,6 @@ static int parse_part_sign_sha256(sockent_t *se, /* {{{ */
|
|
||||||
buffer_len = *ret_buffer_len;
|
|
||||||
buffer_offset = 0;
|
|
||||||
|
|
||||||
- if (se->data.server.userdb == NULL) {
|
|
||||||
- c_complain(
|
|
||||||
- LOG_NOTICE, &complain_no_users,
|
|
||||||
- "network plugin: Received signed network packet but can't verify it "
|
|
||||||
- "because no user DB has been configured. Will accept it.");
|
|
||||||
- return (0);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
/* Check if the buffer has enough data for this structure. */
|
|
||||||
if (buffer_len <= PART_SIGNATURE_SHA256_SIZE)
|
|
||||||
return (-ENOMEM);
|
|
||||||
@@ -1027,6 +1019,18 @@ static int parse_part_sign_sha256(sockent_t *se, /* {{{ */
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (se->data.server.userdb == NULL) {
|
|
||||||
+ c_complain(
|
|
||||||
+ LOG_NOTICE, &complain_no_users,
|
|
||||||
+ "network plugin: Received signed network packet but can't verify it "
|
|
||||||
+ "because no user DB has been configured. Will accept it.");
|
|
||||||
+
|
|
||||||
+ *ret_buffer = buffer + pss_head_length;
|
|
||||||
+ *ret_buffer_len -= pss_head_length;
|
|
||||||
+
|
|
||||||
+ return (0);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/* Copy the hash. */
|
|
||||||
BUFFER_READ(pss.hash, sizeof(pss.hash));
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
|||||||
From fd01cdd0546ccbbda7f4cf5db2d0ae28e1e770cd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ruben Kerkhof <ruben@rubenkerkhof.com>
|
|
||||||
Date: Tue, 30 May 2017 17:25:17 +0200
|
|
||||||
Subject: [PATCH] Bind plugin: plug a few leaks
|
|
||||||
|
|
||||||
Fixes: #2303
|
|
||||||
---
|
|
||||||
src/bind.c | 10 ++++++++--
|
|
||||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/bind.c b/src/bind.c
|
|
||||||
index 4860f1b604..853b9c26a3 100644
|
|
||||||
--- a/src/bind.c
|
|
||||||
+++ b/src/bind.c
|
|
||||||
@@ -526,8 +526,10 @@ static int bind_parse_generic_name_value(const char *xpath_expression, /* {{{ */
|
|
||||||
status = bind_xml_read_gauge(doc, counter, &value.gauge);
|
|
||||||
else
|
|
||||||
status = bind_xml_read_derive(doc, counter, &value.derive);
|
|
||||||
- if (status != 0)
|
|
||||||
+ if (status != 0) {
|
|
||||||
+ xmlFree(name);
|
|
||||||
continue;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
status = (*list_callback)(name, value, current_time, user_data);
|
|
||||||
if (status == 0)
|
|
||||||
@@ -659,12 +661,16 @@ static int bind_parse_generic_name_attr_value_list(
|
|
||||||
status = bind_xml_read_gauge(doc, child, &value.gauge);
|
|
||||||
else
|
|
||||||
status = bind_xml_read_derive(doc, child, &value.derive);
|
|
||||||
- if (status != 0)
|
|
||||||
+ if (status != 0) {
|
|
||||||
+ xmlFree(attr_name);
|
|
||||||
continue;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
status = (*list_callback)(attr_name, value, current_time, user_data);
|
|
||||||
if (status == 0)
|
|
||||||
num_entries++;
|
|
||||||
+
|
|
||||||
+ xmlFree(attr_name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,45 +0,0 @@
|
|||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
# Nice value used to launch collectd, to change priority of the process. As
|
|
||||||
# you usually we want to run it in background, a default of 5 is used.
|
|
||||||
#
|
|
||||||
#COLLECTD_NICELEVEL=5
|
|
||||||
|
|
||||||
# Location of configuration file. Modify if you don't like the standard
|
|
||||||
# one.
|
|
||||||
#
|
|
||||||
#COLLECTD_CONFIGFILE="/etc/collectd.conf"
|
|
||||||
|
|
||||||
# File used to store the PID file. Usually you won't need to touch it.
|
|
||||||
#
|
|
||||||
#COLLECTD_PIDFILE="/run/collectd/collectd.pid"
|
|
||||||
|
|
||||||
# User to run collectd as (default is collectd, change to root or give
|
|
||||||
# collectd user appropriate privileges if you use one of the plugins that
|
|
||||||
# require it, as e.g. ping or iptables plugins)
|
|
||||||
#
|
|
||||||
#COLLECTD_USER="collectd"
|
|
||||||
|
|
||||||
# The group is only important if you are using collectd's UNIX socket
|
|
||||||
# in the default location (/run/collectd) because we will chown the
|
|
||||||
# default location to COLLECTD_USER:COLLECTD_GROUP. The default value
|
|
||||||
# is "collectd".
|
|
||||||
#COLLECTD_GROUP="collectd"
|
|
||||||
|
|
||||||
# You can use this configuration option to pass additional options to the
|
|
||||||
# start-stop-daemon, see start-stop-daemon(8) for more details.
|
|
||||||
# Per default we wait 1000ms after we have started the service to ensure
|
|
||||||
# that the daemon is really up and running.
|
|
||||||
#COLLECTD_SSDARGS="--wait 1000"
|
|
||||||
|
|
||||||
# The termination timeout (start-stop-daemon parameter "retry") ensures
|
|
||||||
# that the service will be terminated within a given time (25 + 5 seconds
|
|
||||||
# per default) when you are stopping the service.
|
|
||||||
#COLLECTD_TERMTIMEOUT="TERM/25/KILL/5"
|
|
||||||
|
|
||||||
# Options to collectd
|
|
||||||
# See collectd(8) for more details
|
|
||||||
# Notes:
|
|
||||||
# * Do not specify another PIDFILE but use the variable above to change the location
|
|
||||||
# * Do not specify another CONFIGFILE but use the variable above to change the location
|
|
||||||
#COLLECTD_OPTS=""
|
|
@ -1,78 +0,0 @@
|
|||||||
#!/sbin/openrc-run
|
|
||||||
# Copyright 1999-2016 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
COLLECTD_CONFIGFILE=${COLLECTD_CONFIGFILE:-"/etc/collectd.conf"}
|
|
||||||
COLLECTD_PIDFILE=${COLLECTD_PIDFILE:-"/run/collectd/collectd.pid"}
|
|
||||||
COLLECTD_NICELEVEL=${COLLECTD_NICELEVEL:-5}
|
|
||||||
COLLECTD_USER=${COLLECTD_USER:-"collectd"}
|
|
||||||
COLLECTD_GROUP=${COLLECTD_GROUP:-"collectd"}
|
|
||||||
COLLECTD_SSDARGS=${COLLECTD_SSDARGS:-"--wait 1000"}
|
|
||||||
COLLECTD_TERMTIMEOUT=${COLLECTD_TERMTIMEOUT:-"TERM/25/KILL/5"}
|
|
||||||
COLLECTD_OPTS=${COLLECTD_OPTS:-""}
|
|
||||||
|
|
||||||
command="/usr/sbin/collectd"
|
|
||||||
command_args="${COLLECTD_OPTS} -C \"${COLLECTD_CONFIGFILE}\" -P \"${COLLECTD_PIDFILE}\""
|
|
||||||
start_stop_daemon_args="${COLLECTD_SSDARGS} --nice ${COLLECTD_NICELEVEL} --user ${COLLECTD_USER}:${COLLECTD_GROUP}"
|
|
||||||
pidfile="${COLLECTD_PIDFILE}"
|
|
||||||
retry="${COLLECTD_TERMTIMEOUT}"
|
|
||||||
|
|
||||||
extra_commands="configtest"
|
|
||||||
description_configtest="Run collectd's internal config check."
|
|
||||||
|
|
||||||
required_files="\"${COLLECTD_CONFIGFILE}\""
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use dns
|
|
||||||
}
|
|
||||||
|
|
||||||
_checkconfig() {
|
|
||||||
if [ $(sed '/^$\|^#/d' "${COLLECTD_CONFIGFILE}" | grep 'LoadPlugin[[:space:]]\+oracle' | wc -l) -ge 1 ] ; then
|
|
||||||
if [ -e /etc/env.d/50oracle-instantclient-basic ] ; then
|
|
||||||
. /etc/env.d/50oracle-instantclient-basic
|
|
||||||
export ORACLE_HOME
|
|
||||||
export TNS_ADMIN
|
|
||||||
else
|
|
||||||
ewarn "Unable to set Oracle environment, Oracle plugin wont work"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
local test_command="${command} -t -C \"${COLLECTD_CONFIGFILE}\""
|
|
||||||
|
|
||||||
eval ${test_command} 1>/dev/null 2>&1
|
|
||||||
ret=$?
|
|
||||||
if [ $ret -ne 0 ]; then
|
|
||||||
eerror "${SVCNAME} has detected an error in your configuration:"
|
|
||||||
eval ${test_command}
|
|
||||||
fi
|
|
||||||
|
|
||||||
return $ret
|
|
||||||
}
|
|
||||||
|
|
||||||
configtest() {
|
|
||||||
ebegin "Checking ${SVCNAME} configuration"
|
|
||||||
_checkconfig
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
start_pre() {
|
|
||||||
if [ "${RC_CMD}" != "restart" ]; then
|
|
||||||
configtest || return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
checkpath --directory --mode 0770 --owner ${COLLECTD_USER}:${COLLECTD_GROUP} "$(dirname "${COLLECTD_PIDFILE}")"
|
|
||||||
}
|
|
||||||
|
|
||||||
stop_pre() {
|
|
||||||
if [ "${RC_CMD}" = "restart" ]; then
|
|
||||||
configtest || return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
stop_post() {
|
|
||||||
if [ -f "${COLLECTD_PIDFILE}" ]; then
|
|
||||||
vebegin "Removing stale PID file"
|
|
||||||
rm --force "${COLLECTD_PIDFILE}"
|
|
||||||
veend $?
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,9 +1,7 @@
|
|||||||
DIST mongo-tools-3.0.14.tar.gz 2413148 BLAKE2B a085b452019f7354a8f2fcb4d7a493746fd6504dc836b3bc522bca6dfd054dc4940db1b07021b305c52bc12da076220c3e137507b656a00ca1330ba336532458 SHA512 0e77417b2c36080515a2ff611427cb18f6d6c2432159c2a09af8d6ff14ae7f25ecbfe0a6631eeb7de084fdfe517a09364d731f5b63923404b6319fc1ca44b840
|
DIST mongo-tools-3.0.14.tar.gz 2413148 BLAKE2B a085b452019f7354a8f2fcb4d7a493746fd6504dc836b3bc522bca6dfd054dc4940db1b07021b305c52bc12da076220c3e137507b656a00ca1330ba336532458 SHA512 0e77417b2c36080515a2ff611427cb18f6d6c2432159c2a09af8d6ff14ae7f25ecbfe0a6631eeb7de084fdfe517a09364d731f5b63923404b6319fc1ca44b840
|
||||||
DIST mongo-tools-3.0.15.tar.gz 2413131 BLAKE2B 5f971d6b47685ef8db246a71f59a31a722e84b8191639fe7da849162701c944325bc4cbdb9a27b7a6ae32f1a8ccedac91d6a485dfbe54dd17b8735d5b32e4f2c SHA512 b5baeea89f5287e055c43c58cfc31e4618df2b7b7fffd7d77248131daf503522b1d041253df8d3ad2ffa22efff344334dc05e3a3462cf7c646d4e83040bd95dc
|
DIST mongo-tools-3.0.15.tar.gz 2413131 BLAKE2B 5f971d6b47685ef8db246a71f59a31a722e84b8191639fe7da849162701c944325bc4cbdb9a27b7a6ae32f1a8ccedac91d6a485dfbe54dd17b8735d5b32e4f2c SHA512 b5baeea89f5287e055c43c58cfc31e4618df2b7b7fffd7d77248131daf503522b1d041253df8d3ad2ffa22efff344334dc05e3a3462cf7c646d4e83040bd95dc
|
||||||
DIST mongo-tools-3.2.12.tar.gz 2712079 BLAKE2B 173301fb4b47460eb9674ba80540c9a2f42688a4753576ca5fe08c199a63ec71b1d50d3ed9291eede05e4de6540a654e5bcd8d65bc739ecdb7ed1b36114430f9 SHA512 66f7beb85a83ad6a217e65bba97ace6ad0bf84688f40e598e5fb1cf4bbe481b4069e1247d6829f8d06c8230d33c3e0c8bd8465a975576cad584065c361b6fb72
|
|
||||||
DIST mongo-tools-3.2.13.tar.gz 2712076 BLAKE2B 66e76e049b6a322e05dea21c241d983ebecb0005ceba915d9990b1d5b059a5b56ba7f7e52d9e5e54619a66e64cc57cb3db3265543f3ebd110197d97a01cd3cc6 SHA512 caa0ba0f1452a16921c187cb407258326324b7222af91b1cd1b870ee2c9e6909d4fa94087a6da148a807f75b40f0bb97808a85804134d53cdab7970d8adf59f8
|
|
||||||
DIST mongo-tools-3.2.16.tar.gz 2720003 BLAKE2B e5cb694549b5c70cd07fc8e891b1a78cffec0f99aab62978c70d38c01d9b1ae9c401f9618d24d9afc036ae66657eac40f710076d177497b51c97b963cff31d86 SHA512 61c8cfd04a36e329c3573b73945d20a5623e1aa0a3430b309530e85e4289a27a46a850ec48ede7f04e66e67e23745ef26f5f4ddcf68ffeb647128e3d2526a724
|
|
||||||
DIST mongo-tools-3.2.17.tar.gz 2719970 BLAKE2B 666b67d8abdd10f7fa7c557e3c3906fb3cc6bcfa0b97a05e39e5f1ea923d2beb5ec249b3b0a521c4cce4bd595bf18672d8bce38152f84825bb3fffb058fd3b29 SHA512 62c2540027e07b8276621e08d13657864d16021030e3c8f9bc0d351454319d448f889cf6a48b8467ea3270365376ed0c3beb42ceae3f28357910148c6b4054b2
|
DIST mongo-tools-3.2.17.tar.gz 2719970 BLAKE2B 666b67d8abdd10f7fa7c557e3c3906fb3cc6bcfa0b97a05e39e5f1ea923d2beb5ec249b3b0a521c4cce4bd595bf18672d8bce38152f84825bb3fffb058fd3b29 SHA512 62c2540027e07b8276621e08d13657864d16021030e3c8f9bc0d351454319d448f889cf6a48b8467ea3270365376ed0c3beb42ceae3f28357910148c6b4054b2
|
||||||
DIST mongo-tools-3.4.10.tar.gz 4719399 BLAKE2B 8165248bf58f2ea2b02e365a3609c72b72e98dd5902f176e251fa2add1ad26e90900e06c35dc6db4dbe161e541bedfc1776f5e15bbb41dcc9a7be17800424362 SHA512 b861bb3fb1a32c3aa2efefcf6a13bb6d4783ac1a9b006c477fd04deb338cbf6b7adc3944bc6919513b92bd96b8500813ff4af49c9dec0719ebd2fdaa99bc39a5
|
DIST mongo-tools-3.4.10.tar.gz 4719399 BLAKE2B 8165248bf58f2ea2b02e365a3609c72b72e98dd5902f176e251fa2add1ad26e90900e06c35dc6db4dbe161e541bedfc1776f5e15bbb41dcc9a7be17800424362 SHA512 b861bb3fb1a32c3aa2efefcf6a13bb6d4783ac1a9b006c477fd04deb338cbf6b7adc3944bc6919513b92bd96b8500813ff4af49c9dec0719ebd2fdaa99bc39a5
|
||||||
DIST mongo-tools-3.4.13.tar.gz 4719488 BLAKE2B 27c7716b21f1a23408d0f31aee111c5877f5172121a987c234ff01eb2690bbc71bca4e00fc13b701ca6b91dce0c9aaae43c2239a60a52e130e1390bf5bafef60 SHA512 c233268328ef868ec06c9a9d83009141b39c84ba642e7de7dece3210717ba8de600f39896a30ed23d1577db9f4697c3a8d720cf35248bca2b00a17642b043237
|
DIST mongo-tools-3.4.13.tar.gz 4719488 BLAKE2B 27c7716b21f1a23408d0f31aee111c5877f5172121a987c234ff01eb2690bbc71bca4e00fc13b701ca6b91dce0c9aaae43c2239a60a52e130e1390bf5bafef60 SHA512 c233268328ef868ec06c9a9d83009141b39c84ba642e7de7dece3210717ba8de600f39896a30ed23d1577db9f4697c3a8d720cf35248bca2b00a17642b043237
|
||||||
DIST mongo-tools-3.6.2.tar.gz 4693924 BLAKE2B 61c44d579f6eb4013ee6c0118ebe89a2d454ef8cf6ad933479885cb71d169185272b03d9c63fa738d67bbd1b9efd4bc964eb17adcc5002508589d198cdb17752 SHA512 5ac2b1d2b33271f63c406c69bd8a576a21f4dcaa6f75839e0f907ebc9968f0e121eb3800e88da050c120856e7ddda4f12d551bb731d4acac0f5cf09f66fc948a
|
DIST mongo-tools-3.6.2.tar.gz 4693924 BLAKE2B 61c44d579f6eb4013ee6c0118ebe89a2d454ef8cf6ad933479885cb71d169185272b03d9c63fa738d67bbd1b9efd4bc964eb17adcc5002508589d198cdb17752 SHA512 5ac2b1d2b33271f63c406c69bd8a576a21f4dcaa6f75839e0f907ebc9968f0e121eb3800e88da050c120856e7ddda4f12d551bb731d4acac0f5cf09f66fc948a
|
||||||
|
DIST mongo-tools-3.6.3.tar.gz 4693833 BLAKE2B fc7139984cf3dcb7b4ce6f6c2028296651aa59ac68d7068bdf748e28eeb65b1fd9b07580d0c93f3f41dbb01030a12433a07a04deadf28e0ff792387fa78ae4aa SHA512 7dba782c84a728aa9ceb28cbd9934f58b615dccfb238a9dbd63b18661ba4e74ddba21f93d9f12e6d80d293ebe42a82d31fa64448aacdba75bd07d964a5f631fc
|
||||||
|
@ -1,58 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=5
|
|
||||||
|
|
||||||
inherit eutils
|
|
||||||
|
|
||||||
MY_PV=${PV/_rc/-rc}
|
|
||||||
MY_P=${PN}-r${MY_PV}
|
|
||||||
|
|
||||||
DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
|
|
||||||
HOMEPAGE="http://www.mongodb.org"
|
|
||||||
SRC_URI="https://github.com/mongodb/mongo-tools/archive/r${MY_PV}.tar.gz -> mongo-tools-${MY_PV}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="Apache-2.0"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~x86"
|
|
||||||
IUSE="sasl ssl"
|
|
||||||
|
|
||||||
# Maintainer note:
|
|
||||||
# openssl DEPEND constraint, see:
|
|
||||||
# https://github.com/mongodb/mongo-tools/issues/11
|
|
||||||
|
|
||||||
RDEPEND="!<dev-db/mongodb-3.0.0"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
dev-lang/go:=
|
|
||||||
net-libs/libpcap
|
|
||||||
sasl? ( dev-libs/cyrus-sasl )
|
|
||||||
ssl? ( dev-libs/openssl )"
|
|
||||||
|
|
||||||
S=${WORKDIR}/${MY_P}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
sed -e 's|go build .*|go build -o "bin/$i" -tags "$tags" "$i/main/$i.go"|g' -i build.sh || die
|
|
||||||
|
|
||||||
# ensure we use bash wrt #582906
|
|
||||||
sed -e 's@/bin/sh@/bin/bash@g' -i build.sh || die
|
|
||||||
|
|
||||||
epatch "${FILESDIR}/${PN}-3.2.10-pie.patch"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
local myconf
|
|
||||||
|
|
||||||
if use sasl; then
|
|
||||||
myconf="${myconf} sasl"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use ssl; then
|
|
||||||
myconf="${myconf} ssl"
|
|
||||||
fi
|
|
||||||
|
|
||||||
./build.sh ${myconf} || die "build failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
dobin bin/*
|
|
||||||
}
|
|
@ -1,58 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=5
|
|
||||||
|
|
||||||
inherit eutils
|
|
||||||
|
|
||||||
MY_PV=${PV/_rc/-rc}
|
|
||||||
MY_P=${PN}-r${MY_PV}
|
|
||||||
|
|
||||||
DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
|
|
||||||
HOMEPAGE="http://www.mongodb.org"
|
|
||||||
SRC_URI="https://github.com/mongodb/mongo-tools/archive/r${MY_PV}.tar.gz -> mongo-tools-${MY_PV}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="Apache-2.0"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~x86"
|
|
||||||
IUSE="sasl ssl"
|
|
||||||
|
|
||||||
# Maintainer note:
|
|
||||||
# openssl DEPEND constraint, see:
|
|
||||||
# https://github.com/mongodb/mongo-tools/issues/11
|
|
||||||
|
|
||||||
RDEPEND="!<dev-db/mongodb-3.0.0"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
dev-lang/go:=
|
|
||||||
net-libs/libpcap
|
|
||||||
sasl? ( dev-libs/cyrus-sasl )
|
|
||||||
ssl? ( dev-libs/openssl )"
|
|
||||||
|
|
||||||
S=${WORKDIR}/${MY_P}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
sed -e 's|go build .*|go build -o "bin/$i" -tags "$tags" "$i/main/$i.go"|g' -i build.sh || die
|
|
||||||
|
|
||||||
# ensure we use bash wrt #582906
|
|
||||||
sed -e 's@/bin/sh@/bin/bash@g' -i build.sh || die
|
|
||||||
|
|
||||||
epatch "${FILESDIR}/${PN}-3.2.10-pie.patch"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
local myconf
|
|
||||||
|
|
||||||
if use sasl; then
|
|
||||||
myconf="${myconf} sasl"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use ssl; then
|
|
||||||
myconf="${myconf} ssl"
|
|
||||||
fi
|
|
||||||
|
|
||||||
./build.sh ${myconf} || die "build failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
dobin bin/*
|
|
||||||
}
|
|
Binary file not shown.
@ -1,2 +1,3 @@
|
|||||||
DIST clamav-0.99.2.tar.gz 16067497 BLAKE2B 4155e3125ccc45cc6828033f207b6b8d3514253dfb8156428ad4096c0901d5a8500f9dd253b8f40afdc49a6039b647627868f75d51829ab7bd247ada5f3b8383 SHA512 7744ba8a344b163cf98e9737cddfd25d2120b34ee9c4518380e028c9ec3cd50127b198b0dfa9fde30f5ce9aab0c0e6384712fbc11287e77d16ce052fd7b6ac44
|
DIST clamav-0.99.2.tar.gz 16067497 BLAKE2B 4155e3125ccc45cc6828033f207b6b8d3514253dfb8156428ad4096c0901d5a8500f9dd253b8f40afdc49a6039b647627868f75d51829ab7bd247ada5f3b8383 SHA512 7744ba8a344b163cf98e9737cddfd25d2120b34ee9c4518380e028c9ec3cd50127b198b0dfa9fde30f5ce9aab0c0e6384712fbc11287e77d16ce052fd7b6ac44
|
||||||
DIST clamav-0.99.3.tar.gz 16082645 BLAKE2B 3be06e563f17a07e4c7e95eb3efbb61e80858bcb3dffc584f13ec30dc2ef9c5257aec78605f1c03e183b4b7ed5b08343a25b579b2b12e54458694eff624aa01e SHA512 0d3c75d571ed4aa4937ef2b743a39a9a144f5adfd6f56f71046e5a8387b8ed7c3c4d9a4196aa85750f9ec4dc545720fdd659289d0cce086ab13a7cc505a0ab3e
|
DIST clamav-0.99.3.tar.gz 16082645 BLAKE2B 3be06e563f17a07e4c7e95eb3efbb61e80858bcb3dffc584f13ec30dc2ef9c5257aec78605f1c03e183b4b7ed5b08343a25b579b2b12e54458694eff624aa01e SHA512 0d3c75d571ed4aa4937ef2b743a39a9a144f5adfd6f56f71046e5a8387b8ed7c3c4d9a4196aa85750f9ec4dc545720fdd659289d0cce086ab13a7cc505a0ab3e
|
||||||
|
DIST clamav-0.99.4.tar.gz 16083015 BLAKE2B 3c2e7d11ee05fe846f75c3fb6501b5fd809a2e58f8e69c82e493e32fcbc87ca0e5b5f7ab83a0d7e251a5dc8e84aed1475c87c1248b393fa04b6924a2ab32b9bf SHA512 778d5ef510d8d4bdfac5dc33d92469ed4283c414b3d42da6e1a0b13ed70e37755d5c837622dc336bc728ba1f8bf5485fc8a8d3a67a90e9aaa9e4dc71ece0691d
|
||||||
|
@ -0,0 +1,156 @@
|
|||||||
|
# Copyright 1999-2018 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
inherit autotools eutils flag-o-matic user systemd
|
||||||
|
|
||||||
|
DESCRIPTION="Clam Anti-Virus Scanner"
|
||||||
|
HOMEPAGE="http://www.clamav.net/"
|
||||||
|
SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~hppa ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
|
||||||
|
IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs uclibc"
|
||||||
|
|
||||||
|
CDEPEND="bzip2? ( app-arch/bzip2 )
|
||||||
|
clamdtop? ( sys-libs/ncurses:0 )
|
||||||
|
iconv? ( virtual/libiconv )
|
||||||
|
metadata-analysis-api? ( dev-libs/json-c:= )
|
||||||
|
milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
|
||||||
|
dev-libs/libtommath
|
||||||
|
>=sys-libs/zlib-1.2.2:=
|
||||||
|
!libressl? ( dev-libs/openssl:0= )
|
||||||
|
libressl? ( dev-libs/libressl:0= )
|
||||||
|
sys-devel/libtool
|
||||||
|
|| ( dev-libs/libpcre2 >dev-libs/libpcre-6 )
|
||||||
|
!!<app-antivirus/clamav-0.99"
|
||||||
|
# hard block clamav < 0.99 due to linking problems Bug #567680
|
||||||
|
# openssl is now *required* see this link as to why
|
||||||
|
# http://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
|
||||||
|
DEPEND="${CDEPEND}
|
||||||
|
virtual/pkgconfig"
|
||||||
|
RDEPEND="${CDEPEND}
|
||||||
|
selinux? ( sec-policy/selinux-clamav )"
|
||||||
|
|
||||||
|
DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/${P}-pcre2-compile-erroffset.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
enewgroup clamav
|
||||||
|
enewuser clamav -1 -1 /dev/null clamav
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
|
||||||
|
eautoconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
use ppc64 && append-flags -mminimal-toc
|
||||||
|
use uclibc && export ac_cv_type_error_t=yes
|
||||||
|
|
||||||
|
econf \
|
||||||
|
$(use_enable bzip2) \
|
||||||
|
$(use_enable clamdtop) \
|
||||||
|
$(use_enable ipv6) \
|
||||||
|
$(use_enable milter) \
|
||||||
|
$(use_enable static-libs static) \
|
||||||
|
$(use_with iconv) \
|
||||||
|
$(use_with metadata-analysis-api libjson /usr) \
|
||||||
|
--cache-file="${S}"/config.cache \
|
||||||
|
--disable-experimental \
|
||||||
|
--disable-gcc-vcheck \
|
||||||
|
--disable-zlib-vcheck \
|
||||||
|
--enable-id-check \
|
||||||
|
--with-dbdir="${EPREFIX}"/var/lib/clamav \
|
||||||
|
--with-system-tommath \
|
||||||
|
--with-zlib="${EPREFIX}"/usr \
|
||||||
|
--disable-llvm
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
default
|
||||||
|
|
||||||
|
rm -rf "${ED}"/var/lib/clamav
|
||||||
|
newinitd "${FILESDIR}"/clamd.initd-r6 clamd
|
||||||
|
newconfd "${FILESDIR}"/clamd.conf-r1 clamd
|
||||||
|
|
||||||
|
systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
|
||||||
|
systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
|
||||||
|
systemd_dounit "${FILESDIR}/clamd.service"
|
||||||
|
systemd_dounit "${FILESDIR}/freshclamd.service"
|
||||||
|
|
||||||
|
keepdir /var/lib/clamav
|
||||||
|
fowners clamav:clamav /var/lib/clamav
|
||||||
|
keepdir /var/log/clamav
|
||||||
|
fowners clamav:clamav /var/log/clamav
|
||||||
|
|
||||||
|
dodir /etc/logrotate.d
|
||||||
|
insinto /etc/logrotate.d
|
||||||
|
newins "${FILESDIR}"/clamav.logrotate clamav
|
||||||
|
|
||||||
|
# Modify /etc/{clamd,freshclam}.conf to be usable out of the box
|
||||||
|
sed -i -e "s:^\(Example\):\# \1:" \
|
||||||
|
-e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
|
||||||
|
-e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
|
||||||
|
-e "s:.*\(User\) .*:\1 clamav:" \
|
||||||
|
-e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
|
||||||
|
-e "s:^\#\(LogTime\).*:\1 yes:" \
|
||||||
|
-e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
|
||||||
|
"${ED}"/etc/clamd.conf.sample || die
|
||||||
|
sed -i -e "s:^\(Example\):\# \1:" \
|
||||||
|
-e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
|
||||||
|
-e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
|
||||||
|
-e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
|
||||||
|
-e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
|
||||||
|
-e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
|
||||||
|
-e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
|
||||||
|
"${ED}"/etc/freshclam.conf.sample || die
|
||||||
|
|
||||||
|
if use milter ; then
|
||||||
|
# MilterSocket one to include ' /' because there is a 2nd line for
|
||||||
|
# inet: which we want to leave
|
||||||
|
dodoc "${FILESDIR}"/clamav-milter.README.gentoo
|
||||||
|
sed -i -e "s:^\(Example\):\# \1:" \
|
||||||
|
-e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
|
||||||
|
-e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
|
||||||
|
-e "s:.*\(User\) .*:\1 clamav:" \
|
||||||
|
-e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
|
||||||
|
-e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
|
||||||
|
-e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
|
||||||
|
"${ED}"/etc/clamav-milter.conf.sample || die
|
||||||
|
cat >> "${ED}"/etc/conf.d/clamd <<-EOF
|
||||||
|
MILTER_NICELEVEL=19
|
||||||
|
START_MILTER=no
|
||||||
|
EOF
|
||||||
|
|
||||||
|
systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
|
||||||
|
fi
|
||||||
|
|
||||||
|
for i in clamd freshclam clamav-milter
|
||||||
|
do
|
||||||
|
[[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
|
||||||
|
done
|
||||||
|
|
||||||
|
prune_libtool_files --all
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
emake quick-check
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
if use milter ; then
|
||||||
|
elog "For simple instructions how to setup the clamav-milter read the"
|
||||||
|
elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
|
||||||
|
fi
|
||||||
|
if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
|
||||||
|
ewarn "You must run freshclam manually to populate the virus database files"
|
||||||
|
ewarn "before starting clamav for the first time.\n"
|
||||||
|
fi
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
--- clamav-0.99.4/libclamav/regex_pcre.c_orig 2018-03-02 19:10:39.702899702 +0100
|
||||||
|
+++ clamav-0.99.4/libclamav/regex_pcre.c 2018-03-02 19:09:27.600901912 +0100
|
||||||
|
@@ -112,7 +112,8 @@
|
||||||
|
#if USING_PCRE2
|
||||||
|
int cli_pcre_compile(struct cli_pcre_data *pd, long long unsigned match_limit, long long unsigned match_limit_recursion, unsigned int options, int opt_override)
|
||||||
|
{
|
||||||
|
- int errornum, erroffset;
|
||||||
|
+ int errornum;
|
||||||
|
+ size_t erroffset;
|
||||||
|
pcre2_general_context *gctx;
|
||||||
|
pcre2_compile_context *cctx;
|
Binary file not shown.
@ -1 +1,2 @@
|
|||||||
DIST brotli-1.0.2.tar.gz 23736359 BLAKE2B c5467dc52f97942d790b835d5e2c06d2046c3df249446b775d58e56feeb5d5fdd3e1e8e42c5eff92df2bc2b47afabd36389e14afead5fd376e18c8517d1e67f7 SHA512 b3ec98159e63b4169dea3e958d60d89247dc1c0f78aab27bfffb2ece659fa024df990d410aa15c12b2082d42e3785e32ec248dce2b116c7f34e98bb6337f9fc9
|
DIST brotli-1.0.2.tar.gz 23736359 BLAKE2B c5467dc52f97942d790b835d5e2c06d2046c3df249446b775d58e56feeb5d5fdd3e1e8e42c5eff92df2bc2b47afabd36389e14afead5fd376e18c8517d1e67f7 SHA512 b3ec98159e63b4169dea3e958d60d89247dc1c0f78aab27bfffb2ece659fa024df990d410aa15c12b2082d42e3785e32ec248dce2b116c7f34e98bb6337f9fc9
|
||||||
|
DIST brotli-1.0.3.tar.gz 23815300 BLAKE2B 9569267782a8159d290e0f1b524a985144d1ae68a45a732443aca973dd0407c50249ce62389848d97cbc33eba3062ba471064570418c36158b97935ae4b7fb73 SHA512 93adcf437d730ac403e444285ac8aefbb2c8a6b5e1b064e8ee33684c067287a8159e0ee73d2217c167881e87da73fa494792d963a15508fd42b2ac4a5b52823c
|
||||||
|
@ -0,0 +1,66 @@
|
|||||||
|
# Copyright 1999-2018 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
|
||||||
|
DISTUTILS_OPTIONAL="1"
|
||||||
|
|
||||||
|
inherit cmake-utils distutils-r1
|
||||||
|
|
||||||
|
DESCRIPTION="Generic-purpose lossless compression algorithm"
|
||||||
|
HOMEPAGE="https://github.com/google/brotli"
|
||||||
|
|
||||||
|
SLOT="0/${PV}"
|
||||||
|
|
||||||
|
RDEPEND="python? ( ${PYTHON_DEPS} )"
|
||||||
|
DEPEND="${RDEPEND}"
|
||||||
|
|
||||||
|
IUSE="python test"
|
||||||
|
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||||
|
|
||||||
|
LICENSE="MIT python? ( Apache-2.0 )"
|
||||||
|
|
||||||
|
DOCS=( README.md CONTRIBUTING.md )
|
||||||
|
|
||||||
|
if [[ ${PV} == "9999" ]] ; then
|
||||||
|
SRC_URI=""
|
||||||
|
EGIT_REPO_URI="https://github.com/google/${PN}.git"
|
||||||
|
inherit git-r3
|
||||||
|
else
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
|
||||||
|
SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
cmake-utils_src_prepare
|
||||||
|
use python && distutils-r1_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local mycmakeargs=(
|
||||||
|
-DBUILD_SHARED_LIBS=ON
|
||||||
|
-DBUILD_TESTING="$(usex test)"
|
||||||
|
)
|
||||||
|
cmake-utils_src_configure
|
||||||
|
use python && distutils-r1_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
cmake-utils_src_compile
|
||||||
|
use python && distutils-r1_src_compile
|
||||||
|
}
|
||||||
|
|
||||||
|
python_test(){
|
||||||
|
esetup.py test || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
cmake-utils_src_test
|
||||||
|
use python && distutils-r1_src_test
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
cmake-utils_src_install
|
||||||
|
use python && distutils-r1_src_install
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +1,2 @@
|
|||||||
DIST ebuild-mode-1.38.tar.xz 30744 BLAKE2B a147fbb462f0e1a2ba3272c74b12c9357200b0ca6671d75263547d7b777489772504c9fda634a797fecff8dce35e40b7bb579cdbd9a7da99f68f74b08a48a4da SHA512 bfcc4fb100f7d9299e9b466c7661e865f9b93ee352780da1647f1a98159fe3e9eeb8cd4b7d1d9906d532316d1256ec7b6f821cac3d064cda15f2fd62ca7cb349
|
DIST ebuild-mode-1.38.tar.xz 30744 BLAKE2B a147fbb462f0e1a2ba3272c74b12c9357200b0ca6671d75263547d7b777489772504c9fda634a797fecff8dce35e40b7bb579cdbd9a7da99f68f74b08a48a4da SHA512 bfcc4fb100f7d9299e9b466c7661e865f9b93ee352780da1647f1a98159fe3e9eeb8cd4b7d1d9906d532316d1256ec7b6f821cac3d064cda15f2fd62ca7cb349
|
||||||
DIST ebuild-mode-1.41.tar.xz 34728 BLAKE2B c3863a249536c7df1ee4463879fb29a3b7243eee7192319ffeff527f40527891e02e9dec69601a1783a7ed28fa098b102b224eb5cdd5e9c95dcca37d48acc4a2 SHA512 8c85b8c5197162c936cbb4d8d204eb10e4f20d413b021c4b4d7b18793cef192063ea74441efa6ac69ec91e2297344027a0ea714537898cfa41ad8fd5a1262bce
|
|
||||||
DIST ebuild-mode-1.42.tar.xz 34936 BLAKE2B dd94d17dc57e2d32b329ab62ec6eec8ada6a4aeddadb8d978736f5dcb4d613759fd860043cab92d12db11614f8b7fa71fc5537576a2af3f5e6c9d56fc2fdcc05 SHA512 119f954eaf009bd0c9f0a75810b94a54d65ed91c6ffef20dd164c7a5ef095410dd0f3642426817f5efa6623d4f3e120ed3b27076222b02a90e75a83bb80b8703
|
DIST ebuild-mode-1.42.tar.xz 34936 BLAKE2B dd94d17dc57e2d32b329ab62ec6eec8ada6a4aeddadb8d978736f5dcb4d613759fd860043cab92d12db11614f8b7fa71fc5537576a2af3f5e6c9d56fc2fdcc05 SHA512 119f954eaf009bd0c9f0a75810b94a54d65ed91c6ffef20dd164c7a5ef095410dd0f3642426817f5efa6623d4f3e120ed3b27076222b02a90e75a83bb80b8703
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
# Copyright 1999-2018 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit elisp
|
|
||||||
|
|
||||||
DESCRIPTION="Emacs modes for editing ebuilds and other Gentoo specific files"
|
|
||||||
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Emacs"
|
|
||||||
SRC_URI="https://dev.gentoo.org/~ulm/emacs/${P}.tar.xz"
|
|
||||||
|
|
||||||
LICENSE="GPL-2+"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
|
|
||||||
|
|
||||||
DEPEND="sys-apps/texinfo"
|
|
||||||
|
|
||||||
DOCS="ChangeLog keyword-generation.sh"
|
|
||||||
ELISP_TEXINFO="${PN}.texi"
|
|
||||||
SITEFILE="50${PN}-gentoo-1.39.el"
|
|
@ -1 +1,2 @@
|
|||||||
|
DIST rust-mode-0.3.0_p20180221.tar.xz 37392 BLAKE2B 185511a2096400254e141f213f2e9a84861c2aaf5f2259cab724aa929e07b2691ae6f36c5568de5d978809588271486377a194a77a066413df6ee995e9bbe54a SHA512 004bd1536ab2e1e708193509a307ed47e22bf1f3dc5d84816958588e312c8bf6e75ee178cc99439ec0bd427ba02030c133bb21f96c5116b175d1d7cde89e9e6c
|
||||||
DIST rust-mode-1_beta20150411.tar.gz 18155 BLAKE2B 140cad8709f742216822b3933cac64dc7d136fe9fbf0ddec523b395cb148cd8935587a590be41187c4cdfce43b64a72ede9a67a2e77fa7b11b9562e20ae729da SHA512 fc9fe74ba4924cf54664f37c5a88d86b38e17e4ad5e0d4d924afd7f3c8428764dece81cfbe40397460685859f34c3eb841b2c83aef8f34526f4ed3f065cc504e
|
DIST rust-mode-1_beta20150411.tar.gz 18155 BLAKE2B 140cad8709f742216822b3933cac64dc7d136fe9fbf0ddec523b395cb148cd8935587a590be41187c4cdfce43b64a72ede9a67a2e77fa7b11b9562e20ae729da SHA512 fc9fe74ba4924cf54664f37c5a88d86b38e17e4ad5e0d4d924afd7f3c8428764dece81cfbe40397460685859f34c3eb841b2c83aef8f34526f4ed3f065cc504e
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
# Copyright 1999-2018 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
NEED_EMACS=24
|
||||||
|
|
||||||
|
inherit elisp
|
||||||
|
|
||||||
|
DESCRIPTION="A major emacs mode for editing Rust source code"
|
||||||
|
HOMEPAGE="https://github.com/rust-lang/rust-mode"
|
||||||
|
SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz"
|
||||||
|
|
||||||
|
LICENSE="|| ( MIT Apache-2.0 )"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
|
||||||
|
SITEFILE="50${PN}-gentoo.el"
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} \
|
||||||
|
-l rust-mode.el -l rust-mode-tests.el \
|
||||||
|
-f ert-run-tests-batch-and-exit || die "tests failed"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
elisp-install ${PN} rust-mode.{el,elc}
|
||||||
|
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
|
||||||
|
}
|
@ -1,5 +1 @@
|
|||||||
DIST slime-2.0_p20101103-patches.tar.bz2 4730 BLAKE2B 536f0953d7bb772a7c020b6b3d43f5096faca94f5f6b507dd1ec18de3d1f6df42b172aec30b1cb7c1ee06034a86bda6d4af246de6ba98321dc0f8fc398b4ad6e SHA512 7990a3ffa4a5867fe84e326034aa794d3396dd2a74125e256be33524e2e737e052094fa11f2f486db34dc619e89e9343d4c5d2f84f3972139c2c7ac33248ce2c
|
|
||||||
DIST slime-2.0_p20101103.tar.bz2 725888 BLAKE2B 6ab5ccc40fbe44839a24f2019ba982894932d7c2d0722b4881d0cb39bb0620009ce814026bb1dd85f637ef74f345df06aec456586f3f1d2f3a928c3c7e734825 SHA512 cb0cc3232304ef6efec5e01d3660cc649abb3e5803f17c82785b154b6f0b581889ea3b2dcf261be39b16ff22c912c34c7ec84c400856f5c4a29fbeaf7c49851d
|
|
||||||
DIST slime-2.11.tar.gz 1054516 BLAKE2B ca86f2dcf4826fb491cb86321e1ac92cb6c7ffac115a8e6daf7d1ea61e1a6048c1f4cee132f87244a98878414f470d122980bddaf58290f105b8275a7484feb8 SHA512 9507a4460a2f0d5b4f0857824fcaa36f6efeb09aebde7ca682bdc0214b6a722e471180c34ddce26a8f94d7cf3aae959954565ada314729e803d36767afc3e850
|
|
||||||
DIST slime-2.12.tar.gz 1057243 BLAKE2B 2b41fbef0fcc0588e56e187e849652a7671186a9dd231ed31c918039a16f1cce2feff20ae570ed02aec79b57e1809635946df85b945a6690232a2f609ee5afca SHA512 f18c79cba3eb75761982f2d1f163aab8213b77fa72a689d110fe91b1aa40953516566adc5f771638eee95d33ba8b4c8842ddf99738804483ccfb76a00290b2a1
|
|
||||||
DIST slime-2.15.tar.gz 1072190 BLAKE2B 7623d2d109486e35cb94a3bd8a6b72008c28fbc0bac5bdbcde5fcde19b2ebc74d488a6ff67f026922ea716e67ac732cc72f7b984cc4c2574f57323db93de300c SHA512 15f943981e35995b225b168a3d1c2099f7205c2ff359fa209f164464caf05f9fab4d24906442d94ddeb4222f7116d09a832c7377baf95fbe02d6a98a721fd611
|
DIST slime-2.15.tar.gz 1072190 BLAKE2B 7623d2d109486e35cb94a3bd8a6b72008c28fbc0bac5bdbcde5fcde19b2ebc74d488a6ff67f026922ea716e67ac732cc72f7b984cc4c2574f57323db93de300c SHA512 15f943981e35995b225b168a3d1c2099f7205c2ff359fa209f164464caf05f9fab4d24906442d94ddeb4222f7116d09a832c7377baf95fbe02d6a98a721fd611
|
||||||
|
@ -1,82 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=3
|
|
||||||
|
|
||||||
inherit common-lisp elisp eutils
|
|
||||||
|
|
||||||
DESCRIPTION="SLIME, the Superior Lisp Interaction Mode (Extended)"
|
|
||||||
HOMEPAGE="http://common-lisp.net/project/slime/"
|
|
||||||
SRC_URI="mirror://gentoo/${P}.tar.bz2
|
|
||||||
mirror://gentoo/${P}-patches.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="GPL-2 xref? ( xref.lisp )"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="amd64 ppc ~sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
|
|
||||||
IUSE="doc xref"
|
|
||||||
|
|
||||||
RDEPEND="virtual/commonlisp
|
|
||||||
dev-lisp/asdf"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
doc? ( virtual/texi2dvi )"
|
|
||||||
|
|
||||||
CLPACKAGE=swank
|
|
||||||
SITEFILE="70${PN}-gentoo.el"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
EPATCH_SUFFIX=patch epatch
|
|
||||||
mv "${WORKDIR}/swank.asd" "${S}" || die
|
|
||||||
|
|
||||||
# extract date of last update from ChangeLog, bug 233270
|
|
||||||
SLIME_CHANGELOG_DATE=$(awk '/^[-0-9]+ / { print $1; exit; }' ChangeLog)
|
|
||||||
[ -n "${SLIME_CHANGELOG_DATE}" ] || die "cannot determine ChangeLog date"
|
|
||||||
|
|
||||||
sed -i '/^section :=/d' doc/Makefile || die
|
|
||||||
sed -i "/(defvar \*swank-wire-protocol-version\*/s:nil:\"${SLIME_CHANGELOG_DATE}\":" swank.lisp || die
|
|
||||||
sed -i "s:@SLIME-CHANGELOG-DATE@:${SLIME_CHANGELOG_DATE}:" slime.el || die
|
|
||||||
sed -i "s/@itemx INIT-FUNCTION/@item INIT-FUNCTION/" doc/slime.texi \
|
|
||||||
|| die "sed doc/slime.texi failed"
|
|
||||||
|
|
||||||
# Remove xref.lisp (which is non-free) unless USE flag is set
|
|
||||||
use xref || rm -f xref.lisp
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
elisp-compile *.el || die
|
|
||||||
BYTECOMPFLAGS="${BYTECOMPFLAGS} -L contrib -l slime" \
|
|
||||||
elisp-compile contrib/*.el || die
|
|
||||||
emake -j1 -C doc slime.info || die
|
|
||||||
|
|
||||||
if use doc; then
|
|
||||||
VARTEXFONTS="${T}/fonts" emake -j1 -C doc slime.pdf || die
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
## install core
|
|
||||||
elisp-install ${PN} *.{el,elc} "${FILESDIR}/swank-loader.lisp" || die
|
|
||||||
sed "s:/usr/:${EPREFIX}&:g" "${FILESDIR}/${SITEFILE}" >"${T}/${SITEFILE}" \
|
|
||||||
|| die
|
|
||||||
elisp-site-file-install "${T}/${SITEFILE}" || die
|
|
||||||
|
|
||||||
# remove upstream swank-loader, since it won't be used
|
|
||||||
rm "${S}/swank-loader.lisp"
|
|
||||||
|
|
||||||
insinto "${CLSOURCEROOT%/}/swank"
|
|
||||||
doins *.lisp swank.asd || die
|
|
||||||
dodir "${CLSYSTEMROOT}" || die
|
|
||||||
dosym "${EPREFIX}${CLSOURCEROOT%/}/swank/swank.asd" \
|
|
||||||
"${CLSYSTEMROOT%/}/swank.asd" || die
|
|
||||||
|
|
||||||
## install contribs
|
|
||||||
elisp-install ${PN}/contrib/ contrib/*.{el,elc,scm,goo} || die
|
|
||||||
insinto "${CLSOURCEROOT%/}/swank/contrib"
|
|
||||||
doins contrib/*.lisp || die
|
|
||||||
|
|
||||||
## install docs
|
|
||||||
doinfo doc/slime.info || die
|
|
||||||
dodoc README* ChangeLog HACKING NEWS PROBLEMS
|
|
||||||
newdoc contrib/README README.contrib
|
|
||||||
newdoc contrib/ChangeLog ChangeLog.contrib
|
|
||||||
use doc && dodoc doc/slime.pdf
|
|
||||||
}
|
|
@ -1,125 +0,0 @@
|
|||||||
# Copyright 1999-2015 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=5
|
|
||||||
|
|
||||||
[[ ${PV} = *9999* ]] && GIT_ECLASS="git-r3" || GIT_ECLASS=""
|
|
||||||
|
|
||||||
inherit common-lisp-3 ${GIT_ECLASS} elisp eutils
|
|
||||||
|
|
||||||
DESCRIPTION="SLIME, the Superior Lisp Interaction Mode (Extended)"
|
|
||||||
HOMEPAGE="http://common-lisp.net/project/slime/"
|
|
||||||
if [[ ${PV} != *9999* ]]; then
|
|
||||||
SRC_URI="https://github.com/slime/slime/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LICENSE="GPL-2 xref? ( xref.lisp )"
|
|
||||||
SLOT="0"
|
|
||||||
if [[ ${PV} == *9999* ]]; then
|
|
||||||
KEYWORDS=""
|
|
||||||
else
|
|
||||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
|
|
||||||
fi
|
|
||||||
IUSE="doc xref"
|
|
||||||
RESTRICT=test # tests fail to contact sbcl
|
|
||||||
|
|
||||||
RDEPEND="virtual/commonlisp
|
|
||||||
dev-lisp/asdf"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
>=sys-apps/texinfo-5.1
|
|
||||||
doc? ( virtual/texi2dvi )"
|
|
||||||
|
|
||||||
CLPACKAGE=swank
|
|
||||||
CLSYSTEMS=swank
|
|
||||||
SITEFILE=70${PN}-gentoo.el
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
if [[ ${PV} == *9999* ]]; then
|
|
||||||
EGIT_REPO_URI="https://github.com/slime/slime.git"
|
|
||||||
${GIT_ECLASS}_src_unpack
|
|
||||||
fi
|
|
||||||
elisp_src_unpack
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
if [[ "${PV}" == "2.11" ]]; then
|
|
||||||
epatch "${FILESDIR}"/2.11/dont-load-sbcl-pprint.patch
|
|
||||||
fi
|
|
||||||
epatch "${FILESDIR}"/2.0_p20130214/gentoo-module-load.patch
|
|
||||||
epatch "${FILESDIR}"/2.0_p20110617/gentoo-dont-call-init.patch
|
|
||||||
has_version ">=app-editors/emacs-24" && rm -f lib/cl-lib.el
|
|
||||||
|
|
||||||
# extract date of last update from ChangeLog, bug 233270
|
|
||||||
SLIME_CHANGELOG_DATE=$(awk '/^[-0-9]+ / { print $1; exit; }' ChangeLog)
|
|
||||||
[ -n "${SLIME_CHANGELOG_DATE}" ] || die "cannot determine ChangeLog date"
|
|
||||||
|
|
||||||
if [[ "${PV}" == "2.11" ]] || [[ "${PV}" == "2.12" ]]; then
|
|
||||||
# SLIME uses the changelog date to make sure that the emacs side and the CL side
|
|
||||||
# are in sync. We hardcode it instead of letting slime determine it at runtime
|
|
||||||
# because ChangeLog doesn't get installed to $EMACSDIR
|
|
||||||
epatch "${FILESDIR}"/2.11/gentoo-changelog-date.patch
|
|
||||||
else
|
|
||||||
epatch "${FILESDIR}"/2.15/gentoo-changelog-date.patch
|
|
||||||
fi
|
|
||||||
|
|
||||||
# When starting slime in emacs, slime looks for ${S}/swank/backend.lisp as
|
|
||||||
# /usr/share/common-lisp/source/swank/swank-backend.lisp
|
|
||||||
pushd swank || die
|
|
||||||
for i in *.lisp
|
|
||||||
do
|
|
||||||
mv ${i} ../swank-${i}
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
|
|
||||||
sed -i "/(defvar \*swank-wire-protocol-version\*/s:nil:\"${SLIME_CHANGELOG_DATE}\":" swank.lisp \
|
|
||||||
|| die "sed swank.lisp failed"
|
|
||||||
sed -i "s:@SLIME-CHANGELOG-DATE@:${SLIME_CHANGELOG_DATE}:" slime.el \
|
|
||||||
|| die "sed slime.el failed"
|
|
||||||
sed -i "s/@itemx INIT-FUNCTION/@item INIT-FUNCTION/" doc/slime.texi \
|
|
||||||
|| die "sed doc/slime.texi failed"
|
|
||||||
|
|
||||||
# Remove xref.lisp (which is non-free) unless USE flag is set
|
|
||||||
use xref || rm -f xref.lisp
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
elisp-compile *.el || die
|
|
||||||
BYTECOMPFLAGS="${BYTECOMPFLAGS} -L contrib -l slime" \
|
|
||||||
elisp-compile contrib/*.el lib/*.el || die
|
|
||||||
emake -j1 -C doc slime.info || die "Cannot build info docs"
|
|
||||||
|
|
||||||
if use doc; then
|
|
||||||
VARTEXFONTS="${T}"/fonts \
|
|
||||||
emake -j1 -C doc slime.pdf || die "emake doc failed"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
## install core
|
|
||||||
elisp-install ${PN} *.{el,elc} "${FILESDIR}"/swank-loader.lisp \
|
|
||||||
|| die "Cannot install SLIME core"
|
|
||||||
sed "s:/usr/:${EPREFIX}&:g" "${FILESDIR}"/2.0_p20110617/${SITEFILE} \
|
|
||||||
>"${T}"/${SITEFILE} || die "sed failed"
|
|
||||||
elisp-site-file-install "${T}"/${SITEFILE} || die
|
|
||||||
cp "${FILESDIR}"/2.0_p20110617/swank.asd "${S}"
|
|
||||||
# remove upstream swank-loader, since it won't be used
|
|
||||||
rm "${S}"/swank-loader.lisp
|
|
||||||
common-lisp-install-sources *.lisp
|
|
||||||
common-lisp-install-asdf swank.asd
|
|
||||||
|
|
||||||
## install contribs
|
|
||||||
elisp-install ${PN}/contrib/ contrib/*.{el,elc,scm,goo} \
|
|
||||||
|| die "Cannot install contribs"
|
|
||||||
common-lisp-install-sources contrib/*.lisp
|
|
||||||
|
|
||||||
## install lib
|
|
||||||
elisp-install ${PN}/lib/ lib/*.{el,elc} \
|
|
||||||
|| die "Cannot install libs"
|
|
||||||
|
|
||||||
## install docs
|
|
||||||
dodoc README.md ChangeLog CONTRIBUTING.md NEWS PROBLEMS
|
|
||||||
newdoc contrib/README.md README-contrib.md
|
|
||||||
newdoc contrib/ChangeLog ChangeLog.contrib
|
|
||||||
doinfo doc/slime.info
|
|
||||||
use doc && dodoc doc/*.pdf
|
|
||||||
}
|
|
@ -1,125 +0,0 @@
|
|||||||
# Copyright 1999-2015 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=5
|
|
||||||
|
|
||||||
[[ ${PV} = *9999* ]] && GIT_ECLASS="git-r3" || GIT_ECLASS=""
|
|
||||||
|
|
||||||
inherit common-lisp-3 ${GIT_ECLASS} elisp eutils
|
|
||||||
|
|
||||||
DESCRIPTION="SLIME, the Superior Lisp Interaction Mode (Extended)"
|
|
||||||
HOMEPAGE="http://common-lisp.net/project/slime/"
|
|
||||||
if [[ ${PV} != *9999* ]]; then
|
|
||||||
SRC_URI="https://github.com/slime/slime/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LICENSE="GPL-2 xref? ( xref.lisp )"
|
|
||||||
SLOT="0"
|
|
||||||
if [[ ${PV} == *9999* ]]; then
|
|
||||||
KEYWORDS=""
|
|
||||||
else
|
|
||||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
|
|
||||||
fi
|
|
||||||
IUSE="doc xref"
|
|
||||||
RESTRICT=test # tests fail to contact sbcl
|
|
||||||
|
|
||||||
RDEPEND="virtual/commonlisp
|
|
||||||
dev-lisp/asdf"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
>=sys-apps/texinfo-5.1
|
|
||||||
doc? ( virtual/texi2dvi )"
|
|
||||||
|
|
||||||
CLPACKAGE=swank
|
|
||||||
CLSYSTEMS=swank
|
|
||||||
SITEFILE=70${PN}-gentoo.el
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
if [[ ${PV} == *9999* ]]; then
|
|
||||||
EGIT_REPO_URI="https://github.com/slime/slime.git"
|
|
||||||
${GIT_ECLASS}_src_unpack
|
|
||||||
fi
|
|
||||||
elisp_src_unpack
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
if [[ "${PV}" == "2.11" ]]; then
|
|
||||||
epatch "${FILESDIR}"/2.11/dont-load-sbcl-pprint.patch
|
|
||||||
fi
|
|
||||||
epatch "${FILESDIR}"/2.0_p20130214/gentoo-module-load.patch
|
|
||||||
epatch "${FILESDIR}"/2.0_p20110617/gentoo-dont-call-init.patch
|
|
||||||
has_version ">=app-editors/emacs-24" && rm -f lib/cl-lib.el
|
|
||||||
|
|
||||||
# extract date of last update from ChangeLog, bug 233270
|
|
||||||
SLIME_CHANGELOG_DATE=$(awk '/^[-0-9]+ / { print $1; exit; }' ChangeLog)
|
|
||||||
[ -n "${SLIME_CHANGELOG_DATE}" ] || die "cannot determine ChangeLog date"
|
|
||||||
|
|
||||||
if [[ "${PV}" == "2.11" ]] || [[ "${PV}" == "2.12" ]]; then
|
|
||||||
# SLIME uses the changelog date to make sure that the emacs side and the CL side
|
|
||||||
# are in sync. We hardcode it instead of letting slime determine it at runtime
|
|
||||||
# because ChangeLog doesn't get installed to $EMACSDIR
|
|
||||||
epatch "${FILESDIR}"/2.11/gentoo-changelog-date.patch
|
|
||||||
else
|
|
||||||
epatch "${FILESDIR}"/2.15/gentoo-changelog-date.patch
|
|
||||||
fi
|
|
||||||
|
|
||||||
# When starting slime in emacs, slime looks for ${S}/swank/backend.lisp as
|
|
||||||
# /usr/share/common-lisp/source/swank/swank-backend.lisp
|
|
||||||
pushd swank || die
|
|
||||||
for i in *.lisp
|
|
||||||
do
|
|
||||||
mv ${i} ../swank-${i}
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
|
|
||||||
sed -i "/(defvar \*swank-wire-protocol-version\*/s:nil:\"${SLIME_CHANGELOG_DATE}\":" swank.lisp \
|
|
||||||
|| die "sed swank.lisp failed"
|
|
||||||
sed -i "s:@SLIME-CHANGELOG-DATE@:${SLIME_CHANGELOG_DATE}:" slime.el \
|
|
||||||
|| die "sed slime.el failed"
|
|
||||||
sed -i "s/@itemx INIT-FUNCTION/@item INIT-FUNCTION/" doc/slime.texi \
|
|
||||||
|| die "sed doc/slime.texi failed"
|
|
||||||
|
|
||||||
# Remove xref.lisp (which is non-free) unless USE flag is set
|
|
||||||
use xref || rm -f xref.lisp
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
elisp-compile *.el || die
|
|
||||||
BYTECOMPFLAGS="${BYTECOMPFLAGS} -L contrib -l slime" \
|
|
||||||
elisp-compile contrib/*.el lib/*.el || die
|
|
||||||
emake -j1 -C doc slime.info || die "Cannot build info docs"
|
|
||||||
|
|
||||||
if use doc; then
|
|
||||||
VARTEXFONTS="${T}"/fonts \
|
|
||||||
emake -j1 -C doc slime.pdf || die "emake doc failed"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
## install core
|
|
||||||
elisp-install ${PN} *.{el,elc} "${FILESDIR}"/swank-loader.lisp \
|
|
||||||
|| die "Cannot install SLIME core"
|
|
||||||
sed "s:/usr/:${EPREFIX}&:g" "${FILESDIR}"/2.0_p20110617/${SITEFILE} \
|
|
||||||
>"${T}"/${SITEFILE} || die "sed failed"
|
|
||||||
elisp-site-file-install "${T}"/${SITEFILE} || die
|
|
||||||
cp "${FILESDIR}"/2.0_p20110617/swank.asd "${S}"
|
|
||||||
# remove upstream swank-loader, since it won't be used
|
|
||||||
rm "${S}"/swank-loader.lisp
|
|
||||||
common-lisp-install-sources *.lisp
|
|
||||||
common-lisp-install-asdf swank.asd
|
|
||||||
|
|
||||||
## install contribs
|
|
||||||
elisp-install ${PN}/contrib/ contrib/*.{el,elc,scm,goo} \
|
|
||||||
|| die "Cannot install contribs"
|
|
||||||
common-lisp-install-sources contrib/*.lisp
|
|
||||||
|
|
||||||
## install lib
|
|
||||||
elisp-install ${PN}/lib/ lib/*.{el,elc} \
|
|
||||||
|| die "Cannot install libs"
|
|
||||||
|
|
||||||
## install docs
|
|
||||||
dodoc README.md ChangeLog CONTRIBUTING.md NEWS PROBLEMS
|
|
||||||
newdoc contrib/README.md README-contrib.md
|
|
||||||
newdoc contrib/ChangeLog ChangeLog.contrib
|
|
||||||
doinfo doc/slime.info
|
|
||||||
use doc && dodoc doc/*.pdf
|
|
||||||
}
|
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
DIST RockboxUtility-v1.4.0-src.tar.bz2 1181116 BLAKE2B 64d0cbedb3917a8f3f79e2b47b8eb230bb5fd6627ffd0647d5fbb42973d07675ee8a8f0eb9ae6e3481a8bd4cb4a183fb463bf97a1edbb2a74076e7a595f09ade SHA512 705723d6ee2231c3b79d0c67cabc7c6c00d3f1a76a970c1bd15e028a98b4a25de987b0921ea932ca0098defbec0bc9bde9d9ed3a79dd46f81da18bb5472be9fe
|
@ -0,0 +1,88 @@
|
|||||||
|
This patch is a simplified version of a patch I have sent upstream.
|
||||||
|
http://gerrit.rockbox.org/1825
|
||||||
|
|
||||||
|
-- Chewi
|
||||||
|
|
||||||
|
diff -Naur a/base/ziputil.cpp b/base/ziputil.cpp
|
||||||
|
--- a/base/ziputil.cpp 2014-01-05 22:44:53.000000000 +0000
|
||||||
|
+++ b/base/ziputil.cpp 2018-02-25 10:55:36.994002648 +0000
|
||||||
|
@@ -22,9 +22,9 @@
|
||||||
|
#include "progressloggerinterface.h"
|
||||||
|
#include "Logger.h"
|
||||||
|
|
||||||
|
-#include "quazip/quazip.h"
|
||||||
|
-#include "quazip/quazipfile.h"
|
||||||
|
-#include "quazip/quazipfileinfo.h"
|
||||||
|
+#include <quazip5/quazip.h>
|
||||||
|
+#include <quazip5/quazipfile.h>
|
||||||
|
+#include <quazip5/quazipfileinfo.h>
|
||||||
|
|
||||||
|
|
||||||
|
ZipUtil::ZipUtil(QObject* parent) : ArchiveUtil(parent)
|
||||||
|
diff -Naur a/base/ziputil.h b/base/ziputil.h
|
||||||
|
--- a/base/ziputil.h 2014-01-05 22:44:54.000000000 +0000
|
||||||
|
+++ b/base/ziputil.h 2018-02-25 10:55:28.513838004 +0000
|
||||||
|
@@ -21,9 +21,9 @@
|
||||||
|
|
||||||
|
#include <QtCore>
|
||||||
|
#include "archiveutil.h"
|
||||||
|
-#include "quazip/quazip.h"
|
||||||
|
-#include "quazip/quazipfile.h"
|
||||||
|
-#include "quazip/quazipfileinfo.h"
|
||||||
|
+#include <quazip5/quazip.h>
|
||||||
|
+#include <quazip5/quazipfile.h>
|
||||||
|
+#include <quazip5/quazipfileinfo.h>
|
||||||
|
|
||||||
|
class ZipUtil : public ArchiveUtil
|
||||||
|
{
|
||||||
|
diff -Naur a/rbutilqt.pri b/rbutilqt.pri
|
||||||
|
--- a/rbutilqt.pri 2014-01-05 22:44:57.000000000 +0000
|
||||||
|
+++ b/rbutilqt.pri 2018-02-25 10:54:39.793852035 +0000
|
||||||
|
@@ -69,12 +69,6 @@
|
||||||
|
base/rockboxinfo.cpp \
|
||||||
|
../../tools/mkboot.c \
|
||||||
|
../../tools/iriver.c \
|
||||||
|
- quazip/quazip.cpp \
|
||||||
|
- quazip/quazipfile.cpp \
|
||||||
|
- quazip/quazipnewinfo.cpp \
|
||||||
|
- quazip/unzip.c \
|
||||||
|
- quazip/zip.c \
|
||||||
|
- quazip/ioapi.c \
|
||||||
|
base/ziputil.cpp \
|
||||||
|
gui/comboboxviewdelegate.cpp \
|
||||||
|
gui/selectiveinstallwidget.cpp \
|
||||||
|
@@ -156,14 +150,6 @@
|
||||||
|
base/rockboxinfo.h \
|
||||||
|
../../tools/mkboot.h \
|
||||||
|
../../tools/iriver.h \
|
||||||
|
- quazip/crypt.h \
|
||||||
|
- quazip/ioapi.h \
|
||||||
|
- quazip/quazipfile.h \
|
||||||
|
- quazip/quazipfileinfo.h \
|
||||||
|
- quazip/quazip.h \
|
||||||
|
- quazip/quazipnewinfo.h \
|
||||||
|
- quazip/unzip.h \
|
||||||
|
- quazip/zip.h \
|
||||||
|
base/ziputil.h \
|
||||||
|
lame/lame.h \
|
||||||
|
gui/comboboxviewdelegate.h \
|
||||||
|
diff -Naur a/rbutilqt.pro b/rbutilqt.pro
|
||||||
|
--- a/rbutilqt.pro 2014-01-05 22:45:00.000000000 +0000
|
||||||
|
+++ b/rbutilqt.pro 2018-02-25 10:55:04.577357613 +0000
|
||||||
|
@@ -114,7 +114,7 @@
|
||||||
|
|
||||||
|
DEPENDPATH = $$INCLUDEPATH
|
||||||
|
|
||||||
|
-LIBS += -L$$OUT_PWD -L$$MYLIBBUILDDIR
|
||||||
|
+LIBS += -L$$OUT_PWD -L$$MYLIBBUILDDIR -lquazip5
|
||||||
|
# append all RBLIBS to LIBS
|
||||||
|
for(rblib, RBLIBS) {
|
||||||
|
LIBS += -l$$rblib
|
||||||
|
@@ -122,7 +122,6 @@
|
||||||
|
|
||||||
|
# on win32 libz is linked implicitly.
|
||||||
|
!win32 {
|
||||||
|
- LIBS += -lz
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add a (possibly found) libspeex now, don't do this before -lrbspeex!
|
@ -1,4 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
<pkgmetadata>
|
<pkgmetadata>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>chewi@gentoo.org</email>
|
||||||
|
<name>James Le Cuirot</name>
|
||||||
|
</maintainer>
|
||||||
</pkgmetadata>
|
</pkgmetadata>
|
@ -0,0 +1,62 @@
|
|||||||
|
# Copyright 1999-2018 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
inherit desktop gnome2-utils qmake-utils
|
||||||
|
|
||||||
|
DESCRIPTION="Rockbox open source firmware manager for music players"
|
||||||
|
HOMEPAGE="https://www.rockbox.org/wiki/RockboxUtility"
|
||||||
|
SRC_URI="https://download.rockbox.org/${PN}/source/RockboxUtility-v${PV}-src.tar.bz2"
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
IUSE="debug"
|
||||||
|
|
||||||
|
RDEPEND="dev-libs/quazip
|
||||||
|
dev-qt/qtcore:5=
|
||||||
|
dev-qt/qtgui:5=
|
||||||
|
dev-qt/qtnetwork:5=
|
||||||
|
dev-qt/qtwidgets:5=
|
||||||
|
media-libs/speex
|
||||||
|
media-libs/speexdsp
|
||||||
|
virtual/libusb:1"
|
||||||
|
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
dev-qt/linguist-tools:5"
|
||||||
|
|
||||||
|
S="${WORKDIR}/RockboxUtility-v${PV}/${PN}/${PN}qt"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/quazip.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
rm -rv quazip/ zlib/ || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
# Generate binary translations.
|
||||||
|
lrelease ${PN}qt.pro || die
|
||||||
|
|
||||||
|
# noccache is required to call the correct compiler.
|
||||||
|
eqmake5 CONFIG+="noccache $(use debug && echo dbg)"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
local icon size
|
||||||
|
for icon in icons/rockbox-*.png; do
|
||||||
|
size=${icon##*-}
|
||||||
|
size=${size%%.*}
|
||||||
|
newicon -s "${size}" "${icon}" rockbox.png
|
||||||
|
done
|
||||||
|
|
||||||
|
dobin RockboxUtility
|
||||||
|
make_desktop_entry RockboxUtility "Rockbox Utility" rockbox
|
||||||
|
dodoc changelog.txt
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_preinst() { gnome2_icon_savelist; }
|
||||||
|
pkg_postinst() { gnome2_icon_cache_update; }
|
||||||
|
pkg_postrm() { gnome2_icon_cache_update; }
|
Binary file not shown.
@ -1,88 +0,0 @@
|
|||||||
# Copyright 1999-2018 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit rpm versionator
|
|
||||||
|
|
||||||
MY_PV=$(get_version_component_range 1-3)
|
|
||||||
|
|
||||||
DESCRIPTION="Translations for the Libreoffice suite"
|
|
||||||
HOMEPAGE="https://www.libreoffice.org"
|
|
||||||
BASE_SRC_URI_TESTING="https://download.documentfoundation.org/${PN/-l10n/}/testing/${MY_PV}/rpm"
|
|
||||||
BASE_SRC_URI_STABLE="https://download.documentfoundation.org/${PN/-l10n/}/stable/${MY_PV}/rpm"
|
|
||||||
|
|
||||||
LICENSE="|| ( LGPL-3 MPL-1.1 )"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
|
|
||||||
IUSE="offlinehelp"
|
|
||||||
|
|
||||||
#
|
|
||||||
# when changing the language lists, please be careful to preserve the spaces (bug 491728)
|
|
||||||
#
|
|
||||||
# "en:en-US" for mapping from Gentoo "en" to upstream "en-US" etc.
|
|
||||||
LANGUAGES_HELP=" am ast bg bn-IN bn bo bs ca-valencia ca cs da de dz el en-GB en:en-US en-ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko mk nb ne nl nn om pl pt-BR pt ru si sk sl sq sv tg tr ug uk vi zh-CN zh-TW "
|
|
||||||
LANGUAGES="${LANGUAGES_HELP}af ar as be br brx cy dgo fa ga gd gug kk kmr-Latn kn kok ks lb lo lt lv mai ml mn mni mr my nr nso oc or pa:pa-IN ro rw sa:sa-IN sat sd sid sr-Latn sr ss st sw-TZ ta te th tn ts tt uz ve xh zu "
|
|
||||||
|
|
||||||
for lang in ${LANGUAGES_HELP}; do
|
|
||||||
helppack="offlinehelp? ( ${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang#*:}.tar.gz )"
|
|
||||||
SRC_URI+=" l10n_${lang%:*}? ( ${helppack} )"
|
|
||||||
done
|
|
||||||
for lang in ${LANGUAGES}; do
|
|
||||||
if [[ ${lang%:*} != en ]]; then
|
|
||||||
langpack="${BASE_SRC_URI_STABLE}/x86/LibreOffice_${MY_PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz -> LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz ${BASE_SRC_URI_TESTING}/x86/LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang#*:}.tar.gz"
|
|
||||||
SRC_URI+=" l10n_${lang%:*}? ( ${langpack} )"
|
|
||||||
fi
|
|
||||||
IUSE+=" l10n_${lang%:*}"
|
|
||||||
done
|
|
||||||
unset lang helppack langpack
|
|
||||||
|
|
||||||
RDEPEND+="app-text/hunspell"
|
|
||||||
|
|
||||||
RESTRICT="strip"
|
|
||||||
|
|
||||||
S="${WORKDIR}"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
local lang dir rpmdir
|
|
||||||
|
|
||||||
# First remove dictionaries, we want to use system ones.
|
|
||||||
find "${S}" -name *dict*.rpm -delete || die "Failed to remove dictionaries"
|
|
||||||
|
|
||||||
for lang in ${LANGUAGES}; do
|
|
||||||
# break away if not enabled
|
|
||||||
use l10n_${lang%:*} || continue
|
|
||||||
|
|
||||||
dir=${lang#*:}
|
|
||||||
|
|
||||||
# for english we provide just helppack, as translation is always there
|
|
||||||
if [[ ${lang%:*} != en ]]; then
|
|
||||||
rpmdir="LibreOffice_${PV}_Linux_x86_rpm_langpack_${dir}/RPMS/"
|
|
||||||
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
|
|
||||||
rpm_unpack ./${rpmdir}/*.rpm
|
|
||||||
fi
|
|
||||||
if [[ "${LANGUAGES_HELP}" =~ " ${lang} " ]] && use offlinehelp; then
|
|
||||||
rpmdir="LibreOffice_${PV}_Linux_x86_rpm_helppack_${dir}/RPMS/"
|
|
||||||
[[ -d ${rpmdir} ]] || die "Missing directory: ${rpmdir}"
|
|
||||||
rpm_unpack ./${rpmdir}/*.rpm
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() { :; }
|
|
||||||
src_compile() { :; }
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local dir="${S}"/opt/${PN/-l10n/}$(get_version_component_range 1-2)/
|
|
||||||
# Condition required for people that do not install anything eg no l10n
|
|
||||||
# or just english with no offlinehelp.
|
|
||||||
if [[ -d "${dir}" ]] ; then
|
|
||||||
insinto /usr/$(get_libdir)/${PN/-l10n/}/
|
|
||||||
doins -r "${dir}"/*
|
|
||||||
fi
|
|
||||||
# remove extensions that are in the l10n for some weird reason
|
|
||||||
rm -rf "${ED}"usr/$(get_libdir)/${PN/-l10n/}/share/extensions/ || \
|
|
||||||
die "Failed to remove extensions"
|
|
||||||
}
|
|
@ -1,567 +0,0 @@
|
|||||||
# Copyright 1999-2018 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
|
||||||
PYTHON_REQ_USE="threads,xml"
|
|
||||||
|
|
||||||
# experimental ; release ; old
|
|
||||||
# Usually the tarballs are moved a lot so this should make
|
|
||||||
# everyone happy.
|
|
||||||
DEV_URI="
|
|
||||||
https://dev-builds.libreoffice.org/pre-releases/src
|
|
||||||
https://download.documentfoundation.org/libreoffice/src/${PV:0:5}/
|
|
||||||
https://download.documentfoundation.org/libreoffice/old/${PV}/
|
|
||||||
"
|
|
||||||
ADDONS_URI="https://dev-www.libreoffice.org/src/"
|
|
||||||
|
|
||||||
BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
|
|
||||||
PATCHSET="${PN}-6.0.0.3-patchset-01.tar.xz"
|
|
||||||
|
|
||||||
[[ ${PV} == *9999* ]] && SCM_ECLASS="git-r3"
|
|
||||||
inherit multiprocessing autotools bash-completion-r1 check-reqs gnome2-utils java-pkg-opt-2 pax-utils python-single-r1 toolchain-funcs flag-o-matic versionator xdg-utils qmake-utils ${SCM_ECLASS}
|
|
||||||
unset SCM_ECLASS
|
|
||||||
|
|
||||||
DESCRIPTION="A full office productivity suite"
|
|
||||||
HOMEPAGE="https://www.libreoffice.org"
|
|
||||||
SRC_URI="branding? ( https://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
|
|
||||||
[[ -n ${PATCHSET} ]] && SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}"
|
|
||||||
|
|
||||||
# Split modules following git/tarballs
|
|
||||||
# Core MUST be first!
|
|
||||||
# Help is used for the image generator
|
|
||||||
# Only release has the tarballs
|
|
||||||
if [[ ${PV} != *9999* ]]; then
|
|
||||||
for i in ${DEV_URI}; do
|
|
||||||
SRC_URI+=" ${i}/${P}.tar.xz"
|
|
||||||
SRC_URI+=" ${i}/${PN}-help-${PV}.tar.xz"
|
|
||||||
done
|
|
||||||
unset i
|
|
||||||
fi
|
|
||||||
unset DEV_URI
|
|
||||||
|
|
||||||
# Really required addons
|
|
||||||
# These are bundles that can't be removed for now due to huge patchsets.
|
|
||||||
# If you want them gone, patches are welcome.
|
|
||||||
ADDONS_SRC=(
|
|
||||||
"java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )"
|
|
||||||
# no release for 8 years, should we package it?
|
|
||||||
"libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )"
|
|
||||||
# Does not build with 1.6 rhino at all
|
|
||||||
"libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )"
|
|
||||||
# requirement of rhino
|
|
||||||
"libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )"
|
|
||||||
# not packageable
|
|
||||||
"odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )"
|
|
||||||
)
|
|
||||||
SRC_URI+=" ${ADDONS_SRC[*]}"
|
|
||||||
|
|
||||||
unset ADDONS_URI
|
|
||||||
unset ADDONS_SRC
|
|
||||||
|
|
||||||
# Extensions that need extra work:
|
|
||||||
LO_EXTS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
|
|
||||||
|
|
||||||
IUSE="bluetooth +branding coinmp +cups dbus debug eds firebird googledrive
|
|
||||||
gstreamer +gtk gtk2 jemalloc kde libressl mysql odk pdfimport postgres test vlc
|
|
||||||
$(printf 'libreoffice_extensions_%s ' ${LO_EXTS})"
|
|
||||||
|
|
||||||
LICENSE="|| ( LGPL-3 MPL-1.1 )"
|
|
||||||
SLOT="0"
|
|
||||||
[[ ${PV} == *9999* ]] || \
|
|
||||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
|
||||||
|
|
||||||
COMMON_DEPEND="${PYTHON_DEPS}
|
|
||||||
app-arch/unzip
|
|
||||||
app-arch/zip
|
|
||||||
app-crypt/gpgme[cxx]
|
|
||||||
app-text/hunspell:=
|
|
||||||
>=app-text/libabw-0.1.0
|
|
||||||
>=app-text/libebook-0.1
|
|
||||||
app-text/libepubgen
|
|
||||||
>=app-text/libetonyek-0.1
|
|
||||||
app-text/libexttextcat
|
|
||||||
app-text/liblangtag
|
|
||||||
>=app-text/libmspub-0.1.0
|
|
||||||
>=app-text/libmwaw-0.3.1
|
|
||||||
>=app-text/libodfgen-0.1.0
|
|
||||||
app-text/libqxp
|
|
||||||
app-text/libstaroffice
|
|
||||||
app-text/libwpd:0.10[tools]
|
|
||||||
app-text/libwpg:0.3
|
|
||||||
>=app-text/libwps-0.4
|
|
||||||
app-text/mythes
|
|
||||||
>=dev-cpp/clucene-2.3.3.4-r2
|
|
||||||
=dev-cpp/libcmis-0.5*
|
|
||||||
dev-db/unixODBC
|
|
||||||
dev-lang/perl
|
|
||||||
dev-libs/boost:=[nls]
|
|
||||||
dev-libs/expat
|
|
||||||
dev-libs/hyphen
|
|
||||||
dev-libs/icu:=
|
|
||||||
dev-libs/libassuan
|
|
||||||
dev-libs/libgpg-error
|
|
||||||
=dev-libs/liborcus-0.13*
|
|
||||||
dev-libs/librevenge
|
|
||||||
dev-libs/nspr
|
|
||||||
dev-libs/nss
|
|
||||||
!libressl? ( >=dev-libs/openssl-1.0.0d:0 )
|
|
||||||
libressl? ( dev-libs/libressl )
|
|
||||||
>=dev-libs/redland-1.0.16
|
|
||||||
>=dev-libs/xmlsec-1.2.24[nss]
|
|
||||||
media-gfx/graphite2
|
|
||||||
media-libs/fontconfig
|
|
||||||
media-libs/freetype:2
|
|
||||||
>=media-libs/harfbuzz-0.9.42:=[graphite,icu]
|
|
||||||
media-libs/lcms:2
|
|
||||||
>=media-libs/libcdr-0.1.0
|
|
||||||
>=media-libs/libepoxy-1.3.1[X]
|
|
||||||
>=media-libs/libfreehand-0.1.0
|
|
||||||
media-libs/libpagemaker
|
|
||||||
>=media-libs/libpng-1.4:0=
|
|
||||||
>=media-libs/libvisio-0.1.0
|
|
||||||
media-libs/libzmf
|
|
||||||
net-libs/neon
|
|
||||||
net-misc/curl
|
|
||||||
net-nds/openldap
|
|
||||||
sci-mathematics/lpsolve
|
|
||||||
virtual/glu
|
|
||||||
virtual/jpeg:0
|
|
||||||
virtual/opengl
|
|
||||||
x11-libs/cairo[X]
|
|
||||||
x11-libs/libXinerama
|
|
||||||
x11-libs/libXrandr
|
|
||||||
x11-libs/libXrender
|
|
||||||
bluetooth? ( net-wireless/bluez )
|
|
||||||
coinmp? ( sci-libs/coinor-mp )
|
|
||||||
cups? ( net-print/cups )
|
|
||||||
dbus? ( dev-libs/dbus-glib )
|
|
||||||
eds? (
|
|
||||||
dev-libs/glib:2
|
|
||||||
gnome-base/dconf
|
|
||||||
gnome-extra/evolution-data-server
|
|
||||||
)
|
|
||||||
firebird? ( >=dev-db/firebird-3.0.2.32703.0-r1 )
|
|
||||||
gstreamer? (
|
|
||||||
media-libs/gstreamer:1.0
|
|
||||||
media-libs/gst-plugins-base:1.0
|
|
||||||
)
|
|
||||||
gtk? (
|
|
||||||
dev-libs/glib:2
|
|
||||||
dev-libs/gobject-introspection
|
|
||||||
gnome-base/dconf
|
|
||||||
x11-libs/gtk+:3
|
|
||||||
)
|
|
||||||
gtk2? (
|
|
||||||
x11-libs/gdk-pixbuf
|
|
||||||
>=x11-libs/gtk+-2.24:2
|
|
||||||
)
|
|
||||||
kde? (
|
|
||||||
dev-qt/qtcore:5
|
|
||||||
dev-qt/qtgui:5
|
|
||||||
dev-qt/qtx11extras:5
|
|
||||||
dev-qt/qtwidgets:5
|
|
||||||
kde-frameworks/kconfig:5
|
|
||||||
kde-frameworks/kcoreaddons:5
|
|
||||||
kde-frameworks/ki18n:5
|
|
||||||
kde-frameworks/kio:5
|
|
||||||
kde-frameworks/kwindowsystem:5
|
|
||||||
)
|
|
||||||
jemalloc? ( dev-libs/jemalloc )
|
|
||||||
libreoffice_extensions_scripting-beanshell? ( dev-java/bsh )
|
|
||||||
libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 )
|
|
||||||
mysql? ( dev-db/mysql-connector-c++ )
|
|
||||||
pdfimport? ( app-text/poppler:=[cxx] )
|
|
||||||
postgres? ( >=dev-db/postgresql-9.0:*[kerberos] )
|
|
||||||
"
|
|
||||||
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
!app-office/libreoffice-bin
|
|
||||||
!app-office/libreoffice-bin-debug
|
|
||||||
!app-office/openoffice
|
|
||||||
media-fonts/dejavu
|
|
||||||
media-fonts/liberation-fonts
|
|
||||||
media-fonts/libertine
|
|
||||||
|| ( x11-misc/xdg-utils kde-plasma/kde-cli-tools )
|
|
||||||
java? ( >=virtual/jre-1.6 )
|
|
||||||
kde? ( kde-frameworks/oxygen-icons:* )
|
|
||||||
vlc? ( media-video/vlc )
|
|
||||||
"
|
|
||||||
|
|
||||||
if [[ ${PV} != *9999* ]]; then
|
|
||||||
PDEPEND="=app-office/libreoffice-l10n-$(get_version_component_range 1-2)*"
|
|
||||||
else
|
|
||||||
# Translations are not reliable on live ebuilds
|
|
||||||
# rather force people to use english only.
|
|
||||||
PDEPEND="!app-office/libreoffice-l10n"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# FIXME: cppunit should be moved to test conditional
|
|
||||||
# after everything upstream is under gbuild
|
|
||||||
# as dmake execute tests right away
|
|
||||||
DEPEND="${COMMON_DEPEND}
|
|
||||||
!<sys-devel/make-3.82
|
|
||||||
>=dev-libs/libatomic_ops-7.2d
|
|
||||||
>=dev-libs/libxml2-2.7.8
|
|
||||||
dev-libs/libxslt
|
|
||||||
dev-perl/Archive-Zip
|
|
||||||
>=dev-util/cppunit-1.14.0
|
|
||||||
>=dev-util/gperf-3
|
|
||||||
dev-util/intltool
|
|
||||||
>=dev-util/mdds-1.2.3:1=
|
|
||||||
media-libs/glm
|
|
||||||
sys-devel/bison
|
|
||||||
sys-devel/flex
|
|
||||||
sys-devel/gettext
|
|
||||||
sys-devel/ucpp
|
|
||||||
sys-libs/zlib
|
|
||||||
virtual/pkgconfig
|
|
||||||
x11-libs/libXt
|
|
||||||
x11-libs/libXtst
|
|
||||||
x11-proto/randrproto
|
|
||||||
x11-proto/xextproto
|
|
||||||
x11-proto/xineramaproto
|
|
||||||
x11-proto/xproto
|
|
||||||
java? (
|
|
||||||
dev-java/ant-core
|
|
||||||
>=virtual/jdk-1.6
|
|
||||||
)
|
|
||||||
odk? ( >=app-doc/doxygen-1.8.4 )
|
|
||||||
test? (
|
|
||||||
dev-util/cppunit
|
|
||||||
media-fonts/dejavu
|
|
||||||
)
|
|
||||||
"
|
|
||||||
|
|
||||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
|
||||||
bluetooth? ( dbus )
|
|
||||||
kde? ( gtk )
|
|
||||||
libreoffice_extensions_nlpsolver? ( java )
|
|
||||||
libreoffice_extensions_scripting-beanshell? ( java )
|
|
||||||
libreoffice_extensions_scripting-javascript? ( java )
|
|
||||||
libreoffice_extensions_wiki-publisher? ( java )
|
|
||||||
"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
# not upstreamable stuff
|
|
||||||
"${FILESDIR}/${PN}-5.4-system-pyuno.patch"
|
|
||||||
"${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch"
|
|
||||||
|
|
||||||
# TODO: upstream
|
|
||||||
"${FILESDIR}/${PN}-5.2.5.1-glibc-2.24.patch"
|
|
||||||
|
|
||||||
# gtk3-kde5 vcl plugin backported from master
|
|
||||||
"${WORKDIR}"/${PATCHSET/.tar.xz/}
|
|
||||||
)
|
|
||||||
|
|
||||||
pkg_pretend() {
|
|
||||||
use java || \
|
|
||||||
ewarn "If you plan to use Base application you should enable java or you will get various crashes."
|
|
||||||
|
|
||||||
if has_version "<app-office/libreoffice-5.3.0[firebird]"; then
|
|
||||||
ewarn "Firebird has been upgraded to version 3. It is unable to read back Firebird 2.5 data, so"
|
|
||||||
ewarn "embedded firebird odb files created in LibreOffice pre-5.3 can't be opened with this version."
|
|
||||||
ewarn "See also: https://wiki.documentfoundation.org/ReleaseNotes/5.3#Base"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
|
||||||
CHECKREQS_MEMORY="512M"
|
|
||||||
if is-flagq "-g*" && ! is-flagq "-g*0" ; then
|
|
||||||
CHECKREQS_DISK_BUILD="22G"
|
|
||||||
else
|
|
||||||
CHECKREQS_DISK_BUILD="6G"
|
|
||||||
fi
|
|
||||||
check-reqs_pkg_pretend
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
java-pkg-opt-2_pkg_setup
|
|
||||||
python-single-r1_pkg_setup
|
|
||||||
xdg_environment_reset
|
|
||||||
|
|
||||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
|
||||||
CHECKREQS_MEMORY="512M"
|
|
||||||
if is-flagq "-g*" && ! is-flagq "-g*0" ; then
|
|
||||||
CHECKREQS_DISK_BUILD="22G"
|
|
||||||
else
|
|
||||||
CHECKREQS_DISK_BUILD="6G"
|
|
||||||
fi
|
|
||||||
check-reqs_pkg_setup
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
default
|
|
||||||
|
|
||||||
if [[ ${PV} = *9999* ]]; then
|
|
||||||
local base_uri branch mypv
|
|
||||||
base_uri="https://anongit.freedesktop.org/git"
|
|
||||||
branch="master"
|
|
||||||
mypv=${PV/.9999}
|
|
||||||
[[ ${mypv} != ${PV} ]] && branch="${PN}-${mypv/./-}"
|
|
||||||
git-r3_fetch "${base_uri}/${PN}/core" "refs/heads/${branch}"
|
|
||||||
git-r3_checkout "${base_uri}/${PN}/core"
|
|
||||||
|
|
||||||
git-r3_fetch "${base_uri}/${PN}/help" "refs/heads/master"
|
|
||||||
git-r3_checkout "${base_uri}/${PN}/help" "helpcontent2" # doesn't match on help
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
|
|
||||||
AT_M4DIR="m4" eautoreconf
|
|
||||||
# hack in the autogen.sh
|
|
||||||
touch autogen.lastrun
|
|
||||||
|
|
||||||
# system pyuno mess
|
|
||||||
sed -i \
|
|
||||||
-e "s:%eprefix%:${EPREFIX}:g" \
|
|
||||||
-e "s:%libdir%:$(get_libdir):g" \
|
|
||||||
pyuno/source/module/uno.py \
|
|
||||||
pyuno/source/officehelper.py || die
|
|
||||||
# sed in the tests
|
|
||||||
sed -i \
|
|
||||||
-e "s#all : build unitcheck#all : build#g" \
|
|
||||||
solenv/gbuild/Module.mk || die
|
|
||||||
sed -i \
|
|
||||||
-e "s#check: dev-install subsequentcheck#check: unitcheck slowcheck dev-install subsequentcheck#g" \
|
|
||||||
-e "s#Makefile.gbuild all slowcheck#Makefile.gbuild all#g" \
|
|
||||||
Makefile.in || die
|
|
||||||
|
|
||||||
sed -i \
|
|
||||||
-e "s,/usr/share/bash-completion/completions,$(get_bashcompdir)," \
|
|
||||||
-e "s,\$INSTALLDIRNAME.sh,${PN}," \
|
|
||||||
bin/distro-install-desktop-integration || die
|
|
||||||
|
|
||||||
if use branding; then
|
|
||||||
# hack...
|
|
||||||
mv -v "${WORKDIR}/branding-intro.png" "${S}/icon-themes/galaxy/brand/intro.png" || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Don't list pdfimport support in desktop when built with none, bug # 605464
|
|
||||||
if ! use pdfimport; then
|
|
||||||
sed -i \
|
|
||||||
-e ":MimeType: s:application/pdf;::" \
|
|
||||||
-e ":Keywords: s:pdf;::" \
|
|
||||||
sysui/desktop/menus/draw.desktop || die
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
# Set up Google API keys, see https://www.chromium.org/developers/how-tos/api-keys
|
|
||||||
# Note: these are for Gentoo use ONLY. For your own distribution, please get
|
|
||||||
# your own set of keys. Feel free to contact chromium@gentoo.org for more info.
|
|
||||||
local google_default_client_id="329227923882.apps.googleusercontent.com"
|
|
||||||
local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
|
|
||||||
|
|
||||||
# optimization flags
|
|
||||||
export GMAKE_OPTIONS="${MAKEOPTS}"
|
|
||||||
# System python enablement:
|
|
||||||
export PYTHON_CFLAGS=$(python_get_CFLAGS)
|
|
||||||
export PYTHON_LIBS=$(python_get_LIBS)
|
|
||||||
|
|
||||||
if use kde; then
|
|
||||||
export QT_SELECT=5 # bug 639620 needs proper fix though
|
|
||||||
export QT5DIR="$(qt5_get_bindir)/../"
|
|
||||||
export MOC5="$(qt5_get_bindir)/moc"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# system headers/libs/...: enforce using system packages
|
|
||||||
# --disable-breakpad: requires not-yet-in-tree dev-utils/breakpad
|
|
||||||
# --enable-cairo: ensure that cairo is always required
|
|
||||||
# --enable-*-link: link to the library rather than just dlopen on runtime
|
|
||||||
# --enable-release-build: build the libreoffice as release
|
|
||||||
# --disable-fetch-external: prevent dowloading during compile phase
|
|
||||||
# --enable-extension-integration: enable any extension integration support
|
|
||||||
# --without-{fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
|
|
||||||
# --disable-report-builder: too much java packages pulled in without pkgs
|
|
||||||
# --without-system-sane: just sane.h header that is used for scan in writer,
|
|
||||||
# not linked or anything else, worthless to depend on
|
|
||||||
# --disable-pdfium: not yet packaged
|
|
||||||
local myeconfargs=(
|
|
||||||
--with-system-dicts
|
|
||||||
--with-system-epoxy
|
|
||||||
--with-system-headers
|
|
||||||
--with-system-jars
|
|
||||||
--with-system-libs
|
|
||||||
--enable-cairo-canvas
|
|
||||||
--enable-largefile
|
|
||||||
--enable-mergelibs
|
|
||||||
--enable-neon
|
|
||||||
--enable-python=system
|
|
||||||
--enable-randr
|
|
||||||
--enable-release-build
|
|
||||||
--disable-breakpad
|
|
||||||
--disable-ccache
|
|
||||||
--disable-dependency-tracking
|
|
||||||
--disable-epm
|
|
||||||
--disable-fetch-external
|
|
||||||
--disable-gstreamer-0-10
|
|
||||||
--disable-online-update
|
|
||||||
--disable-pdfium
|
|
||||||
--disable-report-builder
|
|
||||||
--with-alloc=$(use jemalloc && echo "jemalloc" || echo "system")
|
|
||||||
--with-build-version="Gentoo official package"
|
|
||||||
--enable-extension-integration
|
|
||||||
--with-external-dict-dir="${EPREFIX}/usr/share/myspell"
|
|
||||||
--with-external-hyph-dir="${EPREFIX}/usr/share/myspell"
|
|
||||||
--with-external-thes-dir="${EPREFIX}/usr/share/myspell"
|
|
||||||
--with-external-tar="${DISTDIR}"
|
|
||||||
--with-lang=""
|
|
||||||
--with-parallelism=$(makeopts_jobs)
|
|
||||||
--with-system-ucpp
|
|
||||||
--with-vendor="Gentoo Foundation"
|
|
||||||
--with-x
|
|
||||||
--without-fonts
|
|
||||||
--without-myspell-dicts
|
|
||||||
--without-help
|
|
||||||
--with-helppack-integration
|
|
||||||
--with-system-gpgmepp
|
|
||||||
--without-system-sane
|
|
||||||
$(use_enable bluetooth sdremote-bluetooth)
|
|
||||||
$(use_enable coinmp)
|
|
||||||
$(use_enable cups)
|
|
||||||
$(use_enable dbus)
|
|
||||||
$(use_enable debug)
|
|
||||||
$(use_enable eds evolution2)
|
|
||||||
$(use_enable firebird firebird-sdbc)
|
|
||||||
$(use_enable gstreamer gstreamer-1-0)
|
|
||||||
$(use_enable gtk gtk3)
|
|
||||||
$(use_enable gtk2 gtk)
|
|
||||||
$(use_enable kde gtk3-kde5)
|
|
||||||
$(use_enable kde qt5)
|
|
||||||
$(use_enable mysql ext-mariadb-connector)
|
|
||||||
$(use_enable odk)
|
|
||||||
$(use_enable pdfimport)
|
|
||||||
$(use_enable postgres postgresql-sdbc)
|
|
||||||
$(use_enable vlc)
|
|
||||||
$(use_with coinmp system-coinmp)
|
|
||||||
$(use_with googledrive gdrive-client-id ${google_default_client_id})
|
|
||||||
$(use_with googledrive gdrive-client-secret ${google_default_client_secret})
|
|
||||||
$(use_with java)
|
|
||||||
$(use_with mysql system-mysql-cppconn)
|
|
||||||
$(use_with odk doxygen)
|
|
||||||
)
|
|
||||||
|
|
||||||
if use eds || use gtk; then
|
|
||||||
myeconfargs+=( --enable-dconf --enable-gio )
|
|
||||||
else
|
|
||||||
myeconfargs+=( --disable-dconf --disable-gio )
|
|
||||||
fi
|
|
||||||
|
|
||||||
# libreoffice extensions handling
|
|
||||||
for lo_xt in ${LO_EXTS}; do
|
|
||||||
if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then
|
|
||||||
myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt}) )
|
|
||||||
else
|
|
||||||
myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt}) )
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if use java; then
|
|
||||||
# hsqldb: system one is too new
|
|
||||||
myeconfargs+=(
|
|
||||||
--without-junit
|
|
||||||
--without-system-hsqldb
|
|
||||||
--with-ant-home="${ANT_HOME}"
|
|
||||||
--with-jdk-home=$(java-config --jdk-home 2>/dev/null)
|
|
||||||
--with-jvm-path="${EPREFIX}/usr/lib/"
|
|
||||||
)
|
|
||||||
|
|
||||||
use libreoffice_extensions_scripting-beanshell && \
|
|
||||||
myeconfargs+=( --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar) )
|
|
||||||
|
|
||||||
use libreoffice_extensions_scripting-javascript && \
|
|
||||||
myeconfargs+=( --with-rhino-jar=$(java-pkg_getjar rhino-1.6 js.jar) )
|
|
||||||
fi
|
|
||||||
|
|
||||||
econf "${myeconfargs[@]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# more and more LO stuff tries to use OpenGL, including tests during build
|
|
||||||
# bug 501508, bug 540624, bug 545974 and probably more
|
|
||||||
addpredict /dev/dri
|
|
||||||
addpredict /dev/ati
|
|
||||||
addpredict /dev/nvidiactl
|
|
||||||
|
|
||||||
# hack for offlinehelp, this needs fixing upstream at some point
|
|
||||||
# it is broken because we send --without-help
|
|
||||||
# https://bugs.freedesktop.org/show_bug.cgi?id=46506
|
|
||||||
(
|
|
||||||
grep "^export" "${S}/config_host.mk" > "${T}/config_host.mk" || die
|
|
||||||
source "${T}/config_host.mk" 2&> /dev/null
|
|
||||||
|
|
||||||
local path="${WORKDIR}/helpcontent2/source/auxiliary/"
|
|
||||||
mkdir -p "${path}" || die
|
|
||||||
|
|
||||||
echo "perl \"${S}/helpcontent2/helpers/create_ilst.pl\" -dir=helpcontent2/source/media/helpimg > \"${path}/helpimg.ilst\""
|
|
||||||
perl "${S}/helpcontent2/helpers/create_ilst.pl" \
|
|
||||||
-dir=helpcontent2/source/media/helpimg \
|
|
||||||
> "${path}/helpimg.ilst"
|
|
||||||
[[ -s "${path}/helpimg.ilst" ]] || \
|
|
||||||
ewarn "The help images list is empty, something is fishy, report a bug."
|
|
||||||
)
|
|
||||||
|
|
||||||
local target
|
|
||||||
use test && target="build" || target="build-nocheck"
|
|
||||||
|
|
||||||
# this is not a proper make script
|
|
||||||
make ${target} || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
make unitcheck || die
|
|
||||||
make slowcheck || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
# This is not Makefile so no buildserver
|
|
||||||
make DESTDIR="${D}" distro-pack-install -o build -o check || die
|
|
||||||
|
|
||||||
# bug 593514
|
|
||||||
if use gtk; then
|
|
||||||
dosym libreoffice/program/liblibreofficekitgtk.so \
|
|
||||||
/usr/$(get_libdir)/liblibreofficekitgtk.so
|
|
||||||
fi
|
|
||||||
|
|
||||||
# bash completion aliases
|
|
||||||
bashcomp_alias \
|
|
||||||
libreoffice \
|
|
||||||
unopkg loimpress lobase localc lodraw lomath lowriter lofromtemplate loweb loffice
|
|
||||||
|
|
||||||
if use branding; then
|
|
||||||
insinto /usr/$(get_libdir)/${PN}/program
|
|
||||||
newins "${WORKDIR}/branding-sofficerc" sofficerc
|
|
||||||
dodir /etc/env.d
|
|
||||||
echo "CONFIG_PROTECT=/usr/$(get_libdir)/${PN}/program/sofficerc" > "${ED}"etc/env.d/99${PN} || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Hack for offlinehelp, this needs fixing upstream at some point.
|
|
||||||
# It is broken because we send --without-help
|
|
||||||
# https://bugs.freedesktop.org/show_bug.cgi?id=46506
|
|
||||||
insinto /usr/$(get_libdir)/libreoffice/help
|
|
||||||
doins xmlhelp/util/*.xsl
|
|
||||||
|
|
||||||
pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/soffice.bin
|
|
||||||
pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/unopkg.bin
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_preinst() {
|
|
||||||
gnome2_icon_savelist
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
gnome2_icon_cache_update
|
|
||||||
xdg_desktop_database_update
|
|
||||||
xdg_mimeinfo_database_update
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
gnome2_icon_cache_update
|
|
||||||
xdg_desktop_database_update
|
|
||||||
xdg_mimeinfo_database_update
|
|
||||||
}
|
|
Binary file not shown.
@ -1,2 +1,3 @@
|
|||||||
DIST eix-0.32.9.tar.xz 599072 BLAKE2B 40fd86520e5c98e4a7cf6710fcd16ce685cc14fbafa417f6694134702b61b83d8d47cfc908c5621d77ba827f7449c985de7dc16650358a8ccad2ab4b48644e38 SHA512 1a7c3d5f371150f5990fe1f1c4cadb0e3ee0a5810011702904aabd58ca250c10f820d6c64e7182096e0b7e2aa001cf573c5f2e83499ceb350cc59b599ec2ca5b
|
DIST eix-0.32.9.tar.xz 599072 BLAKE2B 40fd86520e5c98e4a7cf6710fcd16ce685cc14fbafa417f6694134702b61b83d8d47cfc908c5621d77ba827f7449c985de7dc16650358a8ccad2ab4b48644e38 SHA512 1a7c3d5f371150f5990fe1f1c4cadb0e3ee0a5810011702904aabd58ca250c10f820d6c64e7182096e0b7e2aa001cf573c5f2e83499ceb350cc59b599ec2ca5b
|
||||||
DIST eix-0.33.0.tar.xz 610600 BLAKE2B 484d70c3efcceebf54f2a2e0af69b701716d6c6c45aa867a8cc372b135db29bb1bf23cf0efa6d3d2a19224255113229fa30cdd40ab4d64f226eafa73991daa96 SHA512 6fd4ca253ee908eb192ee35c4228bea0fa8a04030070b35489bddc639053c2e3f6a2faf32f539ffd2c7d9da0c664ff5f29ac0d732d9a47b6c9976a65dd402de2
|
DIST eix-0.33.0.tar.xz 610600 BLAKE2B 484d70c3efcceebf54f2a2e0af69b701716d6c6c45aa867a8cc372b135db29bb1bf23cf0efa6d3d2a19224255113229fa30cdd40ab4d64f226eafa73991daa96 SHA512 6fd4ca253ee908eb192ee35c4228bea0fa8a04030070b35489bddc639053c2e3f6a2faf32f539ffd2c7d9da0c664ff5f29ac0d732d9a47b6c9976a65dd402de2
|
||||||
|
DIST eix-0.33.2.tar.xz 614192 BLAKE2B dcbbdb9b9ccf6f780d89c791c34cc588700720b7f015fb0db7ea86dd78a383892266b0e96c49282fdea58e78293c69e8acc153cea631443c35d3ee29dd4c016f SHA512 28ca4cc57e5c7ef81feb37fa90d598e681e192c442c7446c93a442908d2a9744340f7a93c71135ec3083fb85c48a65638c8929b6e1e632464132f4320225d637
|
||||||
|
@ -0,0 +1,109 @@
|
|||||||
|
# Copyright 1999-2018 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
inherit autotools bash-completion-r1 flag-o-matic tmpfiles
|
||||||
|
|
||||||
|
DESCRIPTION="Search and query ebuilds"
|
||||||
|
HOMEPAGE="https://github.com/vaeth/eix/"
|
||||||
|
SRC_URI="https://github.com/vaeth/eix/releases/download/v${PV}/${P}.tar.xz"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||||
|
IUSE="debug doc nls sqlite"
|
||||||
|
|
||||||
|
BOTHDEPEND="nls? ( virtual/libintl )
|
||||||
|
sqlite? ( >=dev-db/sqlite-3:= )"
|
||||||
|
RDEPEND="${BOTHDEPEND}
|
||||||
|
>=app-shells/push-2.0-r1
|
||||||
|
>=app-shells/quoter-3.0_p2-r1"
|
||||||
|
DEPEND="${BOTHDEPEND}
|
||||||
|
app-arch/xz-utils
|
||||||
|
nls? ( sys-devel/gettext )"
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
# remove stale cache file to prevent collisions
|
||||||
|
local old_cache=${EROOT%/}/var/cache/${PN}
|
||||||
|
if [[ -f ${old_cache} ]]; then
|
||||||
|
rm "${old_cache}" || die
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
sed -i -e "s:/:${EPREFIX}/:" tmpfiles.d/eix.conf || die
|
||||||
|
|
||||||
|
sed -e "/eixf_source=/s:push.sh:cat \"${EROOT}usr/share/push/push.sh\":" \
|
||||||
|
-e "/eixf_source=/s:quoter_pipe.sh:cat \"${EROOT}usr/share/quoter/quoter_pipe.sh\":" \
|
||||||
|
-i src/eix-functions.sh.in || die
|
||||||
|
sed -e "s:'\$(bindir)/eix-functions.sh':cat \\\\\"${EROOT}usr/share/eix/eix-functions\\\\\":" \
|
||||||
|
-i src/Makefile.am || die
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local myconf=(
|
||||||
|
$(use_enable debug paranoic-asserts)
|
||||||
|
$(use_enable nls)
|
||||||
|
$(use_with doc extra-doc)
|
||||||
|
$(use_with sqlite)
|
||||||
|
|
||||||
|
# default configuration
|
||||||
|
$(use_with prefix always-accept-keywords)
|
||||||
|
--with-dep-default
|
||||||
|
--with-required-use-default
|
||||||
|
|
||||||
|
# paths
|
||||||
|
--with-portage-rootpath="${ROOTPATH}"
|
||||||
|
--with-eprefix-default="${EPREFIX}"
|
||||||
|
|
||||||
|
# build a single executable with symlinks
|
||||||
|
--disable-separate-binaries
|
||||||
|
--disable-separate-tools
|
||||||
|
|
||||||
|
# used purely to control/disrespect *FLAGS
|
||||||
|
--disable-debugging
|
||||||
|
--disable-new_dialect
|
||||||
|
--disable-optimization
|
||||||
|
--disable-strong-optimization
|
||||||
|
--disable-security
|
||||||
|
--disable-nopie-security
|
||||||
|
--disable-strong-security
|
||||||
|
)
|
||||||
|
|
||||||
|
# https://github.com/vaeth/eix/issues/35
|
||||||
|
append-cxxflags -std=c++11
|
||||||
|
|
||||||
|
econf "${myconf[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
default
|
||||||
|
dobashcomp bash/eix
|
||||||
|
dotmpfiles tmpfiles.d/eix.conf
|
||||||
|
|
||||||
|
rm -r "${ED%/}"/usr/bin/eix-functions.sh || die
|
||||||
|
|
||||||
|
keepdir /var/cache/eix
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
if ! use prefix; then
|
||||||
|
# note: if this is done in src_install(), portage:portage
|
||||||
|
# ownership may be reset to root
|
||||||
|
tmpfiles_process eix.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
local obs=${EROOT%/}/var/cache/eix.previous
|
||||||
|
if [[ -f ${obs} ]]; then
|
||||||
|
ewarn "Found obsolete ${obs}, please remove it"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postrm() {
|
||||||
|
if [[ ! -n ${REPLACED_BY_VERSION} ]]; then
|
||||||
|
rm -rf "${EROOT%/}/var/cache/${PN}" || die
|
||||||
|
fi
|
||||||
|
}
|
Binary file not shown.
@ -1,3 +1,4 @@
|
|||||||
DIST gentoo-bashcomp-20101217.tar.bz2 23095 BLAKE2B a98757ad29d1356976f4196153f0b4a7763c96a9c4f8aae63fc563b52a9944d86c5098efa5ea1a7c4954cf331ae11fb7b1d8e74ad82998a49652eeb195d1af65 SHA512 29c4802b8f71585b7146e454f44700954de8655aa46dda7046338ed46e1e9835f4ea4141cfd5a813a5f75b6586b030e0e0cbde4c8030ec303f98110fa7a5e316
|
DIST gentoo-bashcomp-20101217.tar.bz2 23095 BLAKE2B a98757ad29d1356976f4196153f0b4a7763c96a9c4f8aae63fc563b52a9944d86c5098efa5ea1a7c4954cf331ae11fb7b1d8e74ad82998a49652eeb195d1af65 SHA512 29c4802b8f71585b7146e454f44700954de8655aa46dda7046338ed46e1e9835f4ea4141cfd5a813a5f75b6586b030e0e0cbde4c8030ec303f98110fa7a5e316
|
||||||
DIST gentoo-bashcomp-20121024.tar.bz2 28025 BLAKE2B 470f844707d31e2eb6af8ad34695960406e494eb81018675460e15def43c26979d73e3fa300283da1c40fee96039bcdac59ca3ce1f826db8362fca7929cb986e SHA512 ca755de801b8ecba6267395930024cbd6eb7f3f78c08de5caff6621bcf99554b68f8d3bb93f517f6a7fe27b08c42c8896910b0b93f8917db6e0172bfd614bacd
|
DIST gentoo-bashcomp-20121024.tar.bz2 28025 BLAKE2B 470f844707d31e2eb6af8ad34695960406e494eb81018675460e15def43c26979d73e3fa300283da1c40fee96039bcdac59ca3ce1f826db8362fca7929cb986e SHA512 ca755de801b8ecba6267395930024cbd6eb7f3f78c08de5caff6621bcf99554b68f8d3bb93f517f6a7fe27b08c42c8896910b0b93f8917db6e0172bfd614bacd
|
||||||
DIST gentoo-bashcomp-20140911.tar.bz2 30258 BLAKE2B c41814a51b74b169dc0e92e4af0630a152145f9d8fd81afb29c5c6e28d9c80caf3a57450a02a7f653762a0c91c8e1639f101e7749761b68e75482dad8e303467 SHA512 cacd1c3353bce7e67d00758a714829860111932ab7addd0a84a06cae9218ff18aff4ea562e0682ca4db859408ca15817edd81548d54144223ed5016667549f7f
|
DIST gentoo-bashcomp-20140911.tar.bz2 30258 BLAKE2B c41814a51b74b169dc0e92e4af0630a152145f9d8fd81afb29c5c6e28d9c80caf3a57450a02a7f653762a0c91c8e1639f101e7749761b68e75482dad8e303467 SHA512 cacd1c3353bce7e67d00758a714829860111932ab7addd0a84a06cae9218ff18aff4ea562e0682ca4db859408ca15817edd81548d54144223ed5016667549f7f
|
||||||
|
DIST gentoo-bashcomp-20180302.tar.bz2 21485 BLAKE2B 887ac5cfa8c6ba431a6aa5f5918b8bdfbe6a1ae9a2e7ac21b3c06ec2062b448d924f928b1372e81749ece6d4aa673bbbaaa364ca744124c842e3819349917169 SHA512 6b4551b078505e6348cb10ca2d67faab4d323a0f0ddefc872145314303d6f95fe31f9706d43d9f20c0139610ce47e4cf70ba7516d911dc4927cfbf5d863bc063
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
# Copyright 1999-2018 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
inherit bash-completion-r1
|
||||||
|
|
||||||
|
DESCRIPTION="Gentoo-specific bash command-line completions (emerge, ebuild, equery, etc)"
|
||||||
|
HOMEPAGE="https://www.gentoo.org/"
|
||||||
|
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
emake DESTDIR="${D}" install \
|
||||||
|
completionsdir="$(get_bashcompdir)" \
|
||||||
|
helpersdir="$(get_bashhelpersdir)" \
|
||||||
|
compatdir="${EPREFIX}/etc/bash_completion.d"
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +1,2 @@
|
|||||||
DIST ebuild-mode-1.38.tar.xz 30744 BLAKE2B a147fbb462f0e1a2ba3272c74b12c9357200b0ca6671d75263547d7b777489772504c9fda634a797fecff8dce35e40b7bb579cdbd9a7da99f68f74b08a48a4da SHA512 bfcc4fb100f7d9299e9b466c7661e865f9b93ee352780da1647f1a98159fe3e9eeb8cd4b7d1d9906d532316d1256ec7b6f821cac3d064cda15f2fd62ca7cb349
|
DIST ebuild-mode-1.38.tar.xz 30744 BLAKE2B a147fbb462f0e1a2ba3272c74b12c9357200b0ca6671d75263547d7b777489772504c9fda634a797fecff8dce35e40b7bb579cdbd9a7da99f68f74b08a48a4da SHA512 bfcc4fb100f7d9299e9b466c7661e865f9b93ee352780da1647f1a98159fe3e9eeb8cd4b7d1d9906d532316d1256ec7b6f821cac3d064cda15f2fd62ca7cb349
|
||||||
DIST ebuild-mode-1.41.tar.xz 34728 BLAKE2B c3863a249536c7df1ee4463879fb29a3b7243eee7192319ffeff527f40527891e02e9dec69601a1783a7ed28fa098b102b224eb5cdd5e9c95dcca37d48acc4a2 SHA512 8c85b8c5197162c936cbb4d8d204eb10e4f20d413b021c4b4d7b18793cef192063ea74441efa6ac69ec91e2297344027a0ea714537898cfa41ad8fd5a1262bce
|
|
||||||
DIST ebuild-mode-1.42.tar.xz 34936 BLAKE2B dd94d17dc57e2d32b329ab62ec6eec8ada6a4aeddadb8d978736f5dcb4d613759fd860043cab92d12db11614f8b7fa71fc5537576a2af3f5e6c9d56fc2fdcc05 SHA512 119f954eaf009bd0c9f0a75810b94a54d65ed91c6ffef20dd164c7a5ef095410dd0f3642426817f5efa6623d4f3e120ed3b27076222b02a90e75a83bb80b8703
|
DIST ebuild-mode-1.42.tar.xz 34936 BLAKE2B dd94d17dc57e2d32b329ab62ec6eec8ada6a4aeddadb8d978736f5dcb4d613759fd860043cab92d12db11614f8b7fa71fc5537576a2af3f5e6c9d56fc2fdcc05 SHA512 119f954eaf009bd0c9f0a75810b94a54d65ed91c6ffef20dd164c7a5ef095410dd0f3642426817f5efa6623d4f3e120ed3b27076222b02a90e75a83bb80b8703
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
inherit xemacs-elisp
|
|
||||||
|
|
||||||
DESCRIPTION="Emacs modes for editing ebuilds and other Gentoo specific files"
|
|
||||||
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Emacs"
|
|
||||||
SRC_URI="https://dev.gentoo.org/~ulm/emacs/${P}.tar.xz"
|
|
||||||
|
|
||||||
LICENSE="GPL-2+"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~hppa ~x86"
|
|
||||||
|
|
||||||
RDEPEND=">=app-editors/xemacs-21.4.20-r5
|
|
||||||
app-xemacs/sh-script"
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
${XEMACS_BATCH_CLEAN} -eval "(add-to-list 'load-path \".\")" \
|
|
||||||
-f batch-byte-compile ebuild-mode.el gentoo-newsitem-mode.el || die
|
|
||||||
xemacs-elisp-make-autoload-file \
|
|
||||||
ebuild-mode.el gentoo-newsitem-mode.el || die
|
|
||||||
}
|
|
Binary file not shown.
Binary file not shown.
@ -1,9 +1,7 @@
|
|||||||
DIST mongodb-src-r3.0.14.tar.gz 28093922 BLAKE2B c36f1868aaf8d149550d9e8fcfa3598b917426f896cdb9e1d12fb047345011b06975719d24db3ffadadf6e1f6007a3e32768eaaa9da9ec8f340c7a49c9239b45 SHA512 477fab29ca0ad2a0f24b895e30dc4770af8d6a1a57f3c10a02a989b58dd22510db554da0418129d4e81958342ad169696eed4b86bf5aa73916c7cec879db1152
|
DIST mongodb-src-r3.0.14.tar.gz 28093922 BLAKE2B c36f1868aaf8d149550d9e8fcfa3598b917426f896cdb9e1d12fb047345011b06975719d24db3ffadadf6e1f6007a3e32768eaaa9da9ec8f340c7a49c9239b45 SHA512 477fab29ca0ad2a0f24b895e30dc4770af8d6a1a57f3c10a02a989b58dd22510db554da0418129d4e81958342ad169696eed4b86bf5aa73916c7cec879db1152
|
||||||
DIST mongodb-src-r3.0.15.tar.gz 28096395 BLAKE2B 123194723e7f1057bc5497ce9bf51f8dd2d65495f6e2c84adde22e3b41cace9c0bce8134a7b85fa1c8e89ce953a3df780eae013d61bba44bbf9339c1e2e478af SHA512 21cec235a691dad7d1d2c625ef04a851b59223b8f2c0bdc979f2a0b8249ed46b4e62753fd595afa7b74bce13851d1f6547e54d8ffad8ba1f56e36db664f5b27e
|
DIST mongodb-src-r3.0.15.tar.gz 28096395 BLAKE2B 123194723e7f1057bc5497ce9bf51f8dd2d65495f6e2c84adde22e3b41cace9c0bce8134a7b85fa1c8e89ce953a3df780eae013d61bba44bbf9339c1e2e478af SHA512 21cec235a691dad7d1d2c625ef04a851b59223b8f2c0bdc979f2a0b8249ed46b4e62753fd595afa7b74bce13851d1f6547e54d8ffad8ba1f56e36db664f5b27e
|
||||||
DIST mongodb-src-r3.2.12.tar.gz 29178424 BLAKE2B 212a2aaac62460812874bb4d924f9cedcb591699367a72ace620e9635a6511048efa3f1202a51e4b58ca8e5f8879fbe4638284c5d3899290bff6b1ca9be565a3 SHA512 0c4ddaaddf15d97957faff46dc4a3f79c545cacc8a56dbe1d063778117ba9b645323b0cb7fd054fae805d092b8372c411a82e3370244b7939bda20a65fdb951c
|
|
||||||
DIST mongodb-src-r3.2.13.tar.gz 29273616 BLAKE2B 9fb9851953ef1561340bcb33cac6a2c96459fd68cb1d55af05faeddf50306bd545b40eef19adeb470b8d17abddc2cb76793c3e42d0e3ce01aecef816e67c0277 SHA512 649b599da65fc205a6e18cde82da6153fb4c03a21cf679e18fb57f705ac168690a37f9520be1242278bc0fe441fda08f1c10c9924cabc636ba153c545d32f91d
|
|
||||||
DIST mongodb-src-r3.2.16.tar.gz 29293555 BLAKE2B e2863ed0210bc66fcf2c80e28668674c254e78ee750a0eb84c45569c2224157f1db65aca5296a0ed0c32ef83ab6269de25bd69dbf1f0ef54b021bb0aecd2e46a SHA512 ba57aae430959f7df036b7e19e1b7d81956184bededd35631616c6e3dc9423dc79a50ab3265bc48b06d198a7043bca902aee2ea75954e38151ebead5b5ab2db2
|
|
||||||
DIST mongodb-src-r3.2.17.tar.gz 29295394 BLAKE2B 3fa9d8fa0b50b72c3b2aa86980dd4d46bd053f23d044e321d6f98f5edb76c566bf00455cf745110a8c39355843664d9d1fbbdf554fc8696de73db2b270446adc SHA512 0d6a01278bc61805afd164e4a29abe150a5a96d551ed2c7c5d385b269924a7c5f065315e4f19c0ab070aa275ac03447959af45f33826457e5db0c5f98e623512
|
DIST mongodb-src-r3.2.17.tar.gz 29295394 BLAKE2B 3fa9d8fa0b50b72c3b2aa86980dd4d46bd053f23d044e321d6f98f5edb76c566bf00455cf745110a8c39355843664d9d1fbbdf554fc8696de73db2b270446adc SHA512 0d6a01278bc61805afd164e4a29abe150a5a96d551ed2c7c5d385b269924a7c5f065315e4f19c0ab070aa275ac03447959af45f33826457e5db0c5f98e623512
|
||||||
DIST mongodb-src-r3.4.10.tar.gz 39959937 BLAKE2B f14f081525f694b939bc21f8cb6364c2a37573c0e1867322dd2062dc167b112751579c3e2d76730b3ff07b0c6bbfd36666bbea99162b7c10eef62d92eb1b0850 SHA512 6293dde40a8433477ba3b1cf77abbdb32b28ce58279cc616b488647c8ab71b5ab3eab2146058c4a74b9e00f0938f1415020e2f26ea01f2b29dd78a1a38d58c3a
|
DIST mongodb-src-r3.4.10.tar.gz 39959937 BLAKE2B f14f081525f694b939bc21f8cb6364c2a37573c0e1867322dd2062dc167b112751579c3e2d76730b3ff07b0c6bbfd36666bbea99162b7c10eef62d92eb1b0850 SHA512 6293dde40a8433477ba3b1cf77abbdb32b28ce58279cc616b488647c8ab71b5ab3eab2146058c4a74b9e00f0938f1415020e2f26ea01f2b29dd78a1a38d58c3a
|
||||||
DIST mongodb-src-r3.4.13.tar.gz 39992720 BLAKE2B 5620711c5ffddd9a96c29be1f2801a37f30536d1b7afe5a7b339a41cacf1f97caf8d03aafdf1d6b71cc488e48f5066ebc49a63a6bf318483d552863cd47a0c0e SHA512 295dbb38d44c99e0dce46c5e4aa5d73c64d813a3767e71a7187aff05e30f896d283ca7ef19c0a7bbd036eecf3d419e38ea3bc7d98ba93d12296c49e565df0f66
|
DIST mongodb-src-r3.4.13.tar.gz 39992720 BLAKE2B 5620711c5ffddd9a96c29be1f2801a37f30536d1b7afe5a7b339a41cacf1f97caf8d03aafdf1d6b71cc488e48f5066ebc49a63a6bf318483d552863cd47a0c0e SHA512 295dbb38d44c99e0dce46c5e4aa5d73c64d813a3767e71a7187aff05e30f896d283ca7ef19c0a7bbd036eecf3d419e38ea3bc7d98ba93d12296c49e565df0f66
|
||||||
DIST mongodb-src-r3.6.2.tar.gz 39999539 BLAKE2B 3e38917ebaf79b63bf054279fbb91a648fe52e69d8194998dc74453ad6766688929a80456f6cb4801f2806ac938a5dfc0407e5f46345b47a80ecce0ba03d7fde SHA512 7acfbcc68c1bd4e6e63eee09be1dfbb064be6f8b0144418105100a065f8162cafc9b776fe0429fd64c79b958561aa42d0bdef56588dda65acee27ccc98631f39
|
DIST mongodb-src-r3.6.2.tar.gz 39999539 BLAKE2B 3e38917ebaf79b63bf054279fbb91a648fe52e69d8194998dc74453ad6766688929a80456f6cb4801f2806ac938a5dfc0407e5f46345b47a80ecce0ba03d7fde SHA512 7acfbcc68c1bd4e6e63eee09be1dfbb064be6f8b0144418105100a065f8162cafc9b776fe0429fd64c79b958561aa42d0bdef56588dda65acee27ccc98631f39
|
||||||
|
DIST mongodb-src-r3.6.3.tar.gz 40093607 BLAKE2B bb21bf0487661eec6140ade22526617b26b2499bd36e138d955d14a4b13a0685ec7308bccfc11ef17c785cd8a71c5b6cd9d154d461b8973410b03952b93953ec SHA512 94aa9955f99d5f6bbbe65dc3755583952525398308ca7cb9224b91d1fa403de5bb3abb63a651583815cbecaff58966b5cfe7334a36ef6583f73d8c213410ddbc
|
||||||
|
@ -1,192 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=5
|
|
||||||
SCONS_MIN_VERSION="2.3.0"
|
|
||||||
CHECKREQS_DISK_BUILD="2400M"
|
|
||||||
CHECKREQS_DISK_USR="512M"
|
|
||||||
CHECKREQS_MEMORY="1024M"
|
|
||||||
|
|
||||||
inherit eutils flag-o-matic multilib pax-utils scons-utils systemd toolchain-funcs user versionator check-reqs
|
|
||||||
|
|
||||||
MY_P=${PN}-src-r${PV/_rc/-rc}
|
|
||||||
|
|
||||||
DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
|
|
||||||
HOMEPAGE="http://www.mongodb.org"
|
|
||||||
SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="AGPL-3 Apache-2.0"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~x86"
|
|
||||||
IUSE="debug kerberos libressl mms-agent ssl test +tools"
|
|
||||||
|
|
||||||
RDEPEND=">=app-arch/snappy-1.1.2
|
|
||||||
>dev-cpp/yaml-cpp-0.5.2
|
|
||||||
>=dev-libs/boost-1.57[threads(+)]
|
|
||||||
>=dev-libs/libpcre-8.39[cxx]
|
|
||||||
dev-libs/snowball-stemmer
|
|
||||||
net-libs/libpcap
|
|
||||||
>=sys-libs/zlib-1.2.8
|
|
||||||
mms-agent? ( app-admin/mms-agent )
|
|
||||||
ssl? (
|
|
||||||
!libressl? ( >=dev-libs/openssl-1.0.1g:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
)"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
>=sys-devel/gcc-4.8.2:*
|
|
||||||
sys-libs/ncurses
|
|
||||||
sys-libs/readline
|
|
||||||
debug? ( dev-util/valgrind )
|
|
||||||
kerberos? ( dev-libs/cyrus-sasl[kerberos] )
|
|
||||||
test? (
|
|
||||||
dev-python/pymongo
|
|
||||||
dev-python/pyyaml
|
|
||||||
)"
|
|
||||||
PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
|
|
||||||
|
|
||||||
S=${WORKDIR}/${MY_P}
|
|
||||||
|
|
||||||
pkg_pretend() {
|
|
||||||
if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then
|
|
||||||
ewarn "To upgrade an existing MongoDB deployment to 3.2, you must be"
|
|
||||||
ewarn "running a 3.0-series release. Please update to the latest 3.0"
|
|
||||||
ewarn "release before continuing if wish to keep your data."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
enewgroup mongodb
|
|
||||||
enewuser mongodb -1 -1 /var/lib/${PN} mongodb
|
|
||||||
|
|
||||||
# Maintainer notes
|
|
||||||
#
|
|
||||||
# --use-system-tcmalloc is strongly NOT recommended:
|
|
||||||
# https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
|
|
||||||
|
|
||||||
scons_opts=(
|
|
||||||
CC="$(tc-getCC)"
|
|
||||||
CXX="$(tc-getCXX)"
|
|
||||||
|
|
||||||
--disable-warnings-as-errors
|
|
||||||
--use-system-boost
|
|
||||||
--use-system-pcre
|
|
||||||
--use-system-snappy
|
|
||||||
--use-system-stemmer
|
|
||||||
--use-system-yaml
|
|
||||||
--use-system-zlib
|
|
||||||
)
|
|
||||||
|
|
||||||
# wiredtiger not supported on 32bit platforms #572166
|
|
||||||
use x86 && scons_opts+=( --wiredtiger=off )
|
|
||||||
|
|
||||||
if use debug; then
|
|
||||||
scons_opts+=( --dbg=on )
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use prefix; then
|
|
||||||
scons_opts+=(
|
|
||||||
--cpppath="${EPREFIX}/usr/include"
|
|
||||||
--libpath="${EPREFIX}/usr/$(get_libdir)"
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use kerberos; then
|
|
||||||
scons_opts+=( --use-sasl-client )
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use ssl; then
|
|
||||||
scons_opts+=( --ssl )
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
epatch \
|
|
||||||
"${FILESDIR}/${PN}-3.2.0-fix-scons.patch" \
|
|
||||||
"${FILESDIR}/${PN}-3.2.4-boost-1.60.patch"
|
|
||||||
if has_version ">=dev-libs/boost-1.62"; then
|
|
||||||
epatch "${FILESDIR}/${PN}-3.2.10-boost-1.62.patch"
|
|
||||||
fi
|
|
||||||
epatch_user
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# respect mongoDB upstream's basic recommendations
|
|
||||||
# see bug #536688 and #526114
|
|
||||||
if ! use debug; then
|
|
||||||
filter-flags '-m*'
|
|
||||||
filter-flags '-O?'
|
|
||||||
fi
|
|
||||||
escons "${scons_opts[@]}" core tools
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
|
|
||||||
|
|
||||||
for x in /var/{lib,log}/${PN}; do
|
|
||||||
keepdir "${x}"
|
|
||||||
fowners mongodb:mongodb "${x}"
|
|
||||||
done
|
|
||||||
|
|
||||||
doman debian/mongo*.1
|
|
||||||
dodoc README docs/building.md
|
|
||||||
|
|
||||||
newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
|
|
||||||
newconfd "${FILESDIR}/${PN}.confd-r2" ${PN}
|
|
||||||
newinitd "${FILESDIR}/${PN/db/s}.initd-r2" ${PN/db/s}
|
|
||||||
newconfd "${FILESDIR}/${PN/db/s}.confd-r2" ${PN/db/s}
|
|
||||||
|
|
||||||
insinto /etc
|
|
||||||
newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
|
|
||||||
newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
|
|
||||||
|
|
||||||
systemd_dounit "${FILESDIR}/${PN}.service"
|
|
||||||
|
|
||||||
insinto /etc/logrotate.d/
|
|
||||||
newins "${FILESDIR}/${PN}.logrotate" ${PN}
|
|
||||||
|
|
||||||
# see bug #526114
|
|
||||||
pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_preinst() {
|
|
||||||
# wrt bug #461466
|
|
||||||
if [[ "$(get_libdir)" == "lib64" ]]; then
|
|
||||||
rmdir "${ED}"/usr/lib/ &>/dev/null
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
# this one test fails
|
|
||||||
rm jstests/core/repl_write_threads_start_param.js
|
|
||||||
|
|
||||||
./buildscripts/resmoke.py --dbpathPrefix=test --suites core || die "Tests failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
local v
|
|
||||||
for v in ${REPLACING_VERSIONS}; do
|
|
||||||
if ! version_is_at_least 3.0 ${v}; then
|
|
||||||
ewarn "!! IMPORTANT !!"
|
|
||||||
ewarn " "
|
|
||||||
ewarn "${PN} configuration files have changed !"
|
|
||||||
ewarn " "
|
|
||||||
ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
|
|
||||||
ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
|
|
||||||
ewarn " "
|
|
||||||
ewarn "Make sure you also follow the upgrading process :"
|
|
||||||
ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
|
|
||||||
ewarn " "
|
|
||||||
ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
|
|
||||||
ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
|
|
||||||
ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
|
|
||||||
ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
ewarn "Make sure to read the release notes and follow the upgrade process:"
|
|
||||||
ewarn " https://docs.mongodb.org/manual/release-notes/3.2/"
|
|
||||||
ewarn " https://docs.mongodb.org/master/release-notes/3.2-upgrade/"
|
|
||||||
ewarn
|
|
||||||
ewarn " Starting in 3.2, MongoDB uses the WiredTiger as the default storage engine."
|
|
||||||
}
|
|
@ -1,192 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=5
|
|
||||||
SCONS_MIN_VERSION="2.3.0"
|
|
||||||
CHECKREQS_DISK_BUILD="2400M"
|
|
||||||
CHECKREQS_DISK_USR="512M"
|
|
||||||
CHECKREQS_MEMORY="1024M"
|
|
||||||
|
|
||||||
inherit eutils flag-o-matic multilib pax-utils scons-utils systemd toolchain-funcs user versionator check-reqs
|
|
||||||
|
|
||||||
MY_P=${PN}-src-r${PV/_rc/-rc}
|
|
||||||
|
|
||||||
DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
|
|
||||||
HOMEPAGE="http://www.mongodb.org"
|
|
||||||
SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="AGPL-3 Apache-2.0"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~x86"
|
|
||||||
IUSE="debug kerberos libressl mms-agent ssl test +tools"
|
|
||||||
|
|
||||||
RDEPEND=">=app-arch/snappy-1.1.2
|
|
||||||
>dev-cpp/yaml-cpp-0.5.2
|
|
||||||
>=dev-libs/boost-1.57[threads(+)]
|
|
||||||
>=dev-libs/libpcre-8.39[cxx]
|
|
||||||
dev-libs/snowball-stemmer
|
|
||||||
net-libs/libpcap
|
|
||||||
>=sys-libs/zlib-1.2.8
|
|
||||||
mms-agent? ( app-admin/mms-agent )
|
|
||||||
ssl? (
|
|
||||||
!libressl? ( >=dev-libs/openssl-1.0.1g:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
)"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
>=sys-devel/gcc-4.8.2:*
|
|
||||||
sys-libs/ncurses
|
|
||||||
sys-libs/readline
|
|
||||||
debug? ( dev-util/valgrind )
|
|
||||||
kerberos? ( dev-libs/cyrus-sasl[kerberos] )
|
|
||||||
test? (
|
|
||||||
dev-python/pymongo
|
|
||||||
dev-python/pyyaml
|
|
||||||
)"
|
|
||||||
PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
|
|
||||||
|
|
||||||
S=${WORKDIR}/${MY_P}
|
|
||||||
|
|
||||||
pkg_pretend() {
|
|
||||||
if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then
|
|
||||||
ewarn "To upgrade an existing MongoDB deployment to 3.2, you must be"
|
|
||||||
ewarn "running a 3.0-series release. Please update to the latest 3.0"
|
|
||||||
ewarn "release before continuing if wish to keep your data."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
enewgroup mongodb
|
|
||||||
enewuser mongodb -1 -1 /var/lib/${PN} mongodb
|
|
||||||
|
|
||||||
# Maintainer notes
|
|
||||||
#
|
|
||||||
# --use-system-tcmalloc is strongly NOT recommended:
|
|
||||||
# https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
|
|
||||||
|
|
||||||
scons_opts=(
|
|
||||||
CC="$(tc-getCC)"
|
|
||||||
CXX="$(tc-getCXX)"
|
|
||||||
|
|
||||||
--disable-warnings-as-errors
|
|
||||||
--use-system-boost
|
|
||||||
--use-system-pcre
|
|
||||||
--use-system-snappy
|
|
||||||
--use-system-stemmer
|
|
||||||
--use-system-yaml
|
|
||||||
--use-system-zlib
|
|
||||||
)
|
|
||||||
|
|
||||||
# wiredtiger not supported on 32bit platforms #572166
|
|
||||||
use x86 && scons_opts+=( --wiredtiger=off )
|
|
||||||
|
|
||||||
if use debug; then
|
|
||||||
scons_opts+=( --dbg=on )
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use prefix; then
|
|
||||||
scons_opts+=(
|
|
||||||
--cpppath="${EPREFIX}/usr/include"
|
|
||||||
--libpath="${EPREFIX}/usr/$(get_libdir)"
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use kerberos; then
|
|
||||||
scons_opts+=( --use-sasl-client )
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use ssl; then
|
|
||||||
scons_opts+=( --ssl )
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
epatch \
|
|
||||||
"${FILESDIR}/${PN}-3.2.0-fix-scons.patch" \
|
|
||||||
"${FILESDIR}/${PN}-3.2.4-boost-1.60.patch"
|
|
||||||
if has_version ">=dev-libs/boost-1.62"; then
|
|
||||||
epatch "${FILESDIR}/${PN}-3.2.10-boost-1.62.patch"
|
|
||||||
fi
|
|
||||||
epatch_user
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# respect mongoDB upstream's basic recommendations
|
|
||||||
# see bug #536688 and #526114
|
|
||||||
if ! use debug; then
|
|
||||||
filter-flags '-m*'
|
|
||||||
filter-flags '-O?'
|
|
||||||
fi
|
|
||||||
escons "${scons_opts[@]}" core tools
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
|
|
||||||
|
|
||||||
for x in /var/{lib,log}/${PN}; do
|
|
||||||
keepdir "${x}"
|
|
||||||
fowners mongodb:mongodb "${x}"
|
|
||||||
done
|
|
||||||
|
|
||||||
doman debian/mongo*.1
|
|
||||||
dodoc README docs/building.md
|
|
||||||
|
|
||||||
newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
|
|
||||||
newconfd "${FILESDIR}/${PN}.confd-r2" ${PN}
|
|
||||||
newinitd "${FILESDIR}/${PN/db/s}.initd-r2" ${PN/db/s}
|
|
||||||
newconfd "${FILESDIR}/${PN/db/s}.confd-r2" ${PN/db/s}
|
|
||||||
|
|
||||||
insinto /etc
|
|
||||||
newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
|
|
||||||
newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
|
|
||||||
|
|
||||||
systemd_dounit "${FILESDIR}/${PN}.service"
|
|
||||||
|
|
||||||
insinto /etc/logrotate.d/
|
|
||||||
newins "${FILESDIR}/${PN}.logrotate" ${PN}
|
|
||||||
|
|
||||||
# see bug #526114
|
|
||||||
pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_preinst() {
|
|
||||||
# wrt bug #461466
|
|
||||||
if [[ "$(get_libdir)" == "lib64" ]]; then
|
|
||||||
rmdir "${ED}"/usr/lib/ &>/dev/null
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
# this one test fails
|
|
||||||
rm jstests/core/repl_write_threads_start_param.js
|
|
||||||
|
|
||||||
./buildscripts/resmoke.py --dbpathPrefix=test --suites core || die "Tests failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
local v
|
|
||||||
for v in ${REPLACING_VERSIONS}; do
|
|
||||||
if ! version_is_at_least 3.0 ${v}; then
|
|
||||||
ewarn "!! IMPORTANT !!"
|
|
||||||
ewarn " "
|
|
||||||
ewarn "${PN} configuration files have changed !"
|
|
||||||
ewarn " "
|
|
||||||
ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
|
|
||||||
ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
|
|
||||||
ewarn " "
|
|
||||||
ewarn "Make sure you also follow the upgrading process :"
|
|
||||||
ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
|
|
||||||
ewarn " "
|
|
||||||
ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
|
|
||||||
ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
|
|
||||||
ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
|
|
||||||
ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
ewarn "Make sure to read the release notes and follow the upgrade process:"
|
|
||||||
ewarn " https://docs.mongodb.org/manual/release-notes/3.2/"
|
|
||||||
ewarn " https://docs.mongodb.org/master/release-notes/3.2-upgrade/"
|
|
||||||
ewarn
|
|
||||||
ewarn " Starting in 3.2, MongoDB uses the WiredTiger as the default storage engine."
|
|
||||||
}
|
|
@ -1,191 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
SCONS_MIN_VERSION="2.3.0"
|
|
||||||
CHECKREQS_DISK_BUILD="2400M"
|
|
||||||
CHECKREQS_DISK_USR="512M"
|
|
||||||
CHECKREQS_MEMORY="1024M"
|
|
||||||
|
|
||||||
inherit eutils flag-o-matic multilib pax-utils scons-utils systemd toolchain-funcs user versionator check-reqs
|
|
||||||
|
|
||||||
MY_P=${PN}-src-r${PV/_rc/-rc}
|
|
||||||
|
|
||||||
DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
|
|
||||||
HOMEPAGE="http://www.mongodb.org"
|
|
||||||
SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="AGPL-3 Apache-2.0"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~x86"
|
|
||||||
IUSE="debug kerberos libressl mms-agent ssl test +tools"
|
|
||||||
|
|
||||||
RDEPEND=">=app-arch/snappy-1.1.2
|
|
||||||
>=dev-cpp/yaml-cpp-0.5.1
|
|
||||||
>=dev-libs/boost-1.57[threads(+)]
|
|
||||||
>=dev-libs/libpcre-8.39[cxx]
|
|
||||||
dev-libs/snowball-stemmer
|
|
||||||
net-libs/libpcap
|
|
||||||
>=sys-libs/zlib-1.2.8
|
|
||||||
mms-agent? ( app-admin/mms-agent )
|
|
||||||
ssl? (
|
|
||||||
!libressl? ( >=dev-libs/openssl-1.0.1g:0= )
|
|
||||||
libressl? ( dev-libs/libressl:0= )
|
|
||||||
)"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
>=sys-devel/gcc-4.8.2:*
|
|
||||||
sys-libs/ncurses
|
|
||||||
sys-libs/readline
|
|
||||||
debug? ( dev-util/valgrind )
|
|
||||||
kerberos? ( dev-libs/cyrus-sasl[kerberos] )
|
|
||||||
test? (
|
|
||||||
dev-python/pymongo
|
|
||||||
dev-python/pyyaml
|
|
||||||
)"
|
|
||||||
PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}/${PN}-3.2.0-fix-scons.patch"
|
|
||||||
"${FILESDIR}/${PN}-3.2.4-boost-1.60.patch"
|
|
||||||
"${FILESDIR}/${PN}-3.2.10-boost-1.62.patch"
|
|
||||||
"${FILESDIR}/${PN}-3.2.16-Replace-string-with-explicit-std-string.patch"
|
|
||||||
"${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
|
|
||||||
)
|
|
||||||
|
|
||||||
S=${WORKDIR}/${MY_P}
|
|
||||||
|
|
||||||
pkg_pretend() {
|
|
||||||
if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then
|
|
||||||
ewarn "To upgrade an existing MongoDB deployment to 3.2, you must be"
|
|
||||||
ewarn "running a 3.0-series release. Please update to the latest 3.0"
|
|
||||||
ewarn "release before continuing if wish to keep your data."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
enewgroup mongodb
|
|
||||||
enewuser mongodb -1 -1 /var/lib/${PN} mongodb
|
|
||||||
|
|
||||||
# Maintainer notes
|
|
||||||
#
|
|
||||||
# --use-system-tcmalloc is strongly NOT recommended:
|
|
||||||
# https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
|
|
||||||
|
|
||||||
scons_opts=(
|
|
||||||
CC="$(tc-getCC)"
|
|
||||||
CXX="$(tc-getCXX)"
|
|
||||||
|
|
||||||
--disable-warnings-as-errors
|
|
||||||
--use-system-boost
|
|
||||||
--use-system-pcre
|
|
||||||
--use-system-snappy
|
|
||||||
--use-system-stemmer
|
|
||||||
--use-system-yaml
|
|
||||||
--use-system-zlib
|
|
||||||
)
|
|
||||||
|
|
||||||
# wiredtiger not supported on 32bit platforms #572166
|
|
||||||
use x86 && scons_opts+=( --wiredtiger=off )
|
|
||||||
|
|
||||||
if use debug; then
|
|
||||||
scons_opts+=( --dbg=on )
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use prefix; then
|
|
||||||
scons_opts+=(
|
|
||||||
--cpppath="${EPREFIX}/usr/include"
|
|
||||||
--libpath="${EPREFIX}/usr/$(get_libdir)"
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use kerberos; then
|
|
||||||
scons_opts+=( --use-sasl-client )
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use ssl; then
|
|
||||||
scons_opts+=( --ssl )
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# respect mongoDB upstream's basic recommendations
|
|
||||||
# see bug #536688 and #526114
|
|
||||||
if ! use debug; then
|
|
||||||
filter-flags '-m*'
|
|
||||||
filter-flags '-O?'
|
|
||||||
fi
|
|
||||||
escons "${scons_opts[@]}" core tools
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
|
|
||||||
|
|
||||||
local x
|
|
||||||
for x in /var/{lib,log}/${PN}; do
|
|
||||||
keepdir "${x}"
|
|
||||||
fowners mongodb:mongodb "${x}"
|
|
||||||
done
|
|
||||||
|
|
||||||
doman debian/mongo*.1
|
|
||||||
dodoc README docs/building.md
|
|
||||||
|
|
||||||
newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
|
|
||||||
newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
|
|
||||||
newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
|
|
||||||
newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
|
|
||||||
|
|
||||||
insinto /etc
|
|
||||||
newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
|
|
||||||
newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
|
|
||||||
|
|
||||||
systemd_dounit "${FILESDIR}/${PN}.service"
|
|
||||||
|
|
||||||
insinto /etc/logrotate.d/
|
|
||||||
newins "${FILESDIR}/${PN}.logrotate" ${PN}
|
|
||||||
|
|
||||||
# see bug #526114
|
|
||||||
pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_preinst() {
|
|
||||||
# wrt bug #461466
|
|
||||||
if [[ "$(get_libdir)" == "lib64" ]]; then
|
|
||||||
rmdir "${ED}"/usr/lib/ &>/dev/null
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
# this one test fails
|
|
||||||
rm jstests/core/repl_write_threads_start_param.js || die
|
|
||||||
|
|
||||||
./buildscripts/resmoke.py --dbpathPrefix=test --suites core || die "Tests failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
local v
|
|
||||||
for v in ${REPLACING_VERSIONS}; do
|
|
||||||
if ! version_is_at_least 3.0 ${v}; then
|
|
||||||
ewarn "!! IMPORTANT !!"
|
|
||||||
ewarn " "
|
|
||||||
ewarn "${PN} configuration files have changed !"
|
|
||||||
ewarn " "
|
|
||||||
ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
|
|
||||||
ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
|
|
||||||
ewarn " "
|
|
||||||
ewarn "Make sure you also follow the upgrading process :"
|
|
||||||
ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
|
|
||||||
ewarn " "
|
|
||||||
ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
|
|
||||||
ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
|
|
||||||
ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
|
|
||||||
ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
ewarn "Make sure to read the release notes and follow the upgrade process:"
|
|
||||||
ewarn " https://docs.mongodb.org/manual/release-notes/3.2/"
|
|
||||||
ewarn " https://docs.mongodb.org/master/release-notes/3.2-upgrade/"
|
|
||||||
ewarn
|
|
||||||
ewarn " Starting in 3.2, MongoDB uses the WiredTiger as the default storage engine."
|
|
||||||
}
|
|
@ -0,0 +1,170 @@
|
|||||||
|
# Copyright 1999-2018 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python2_7 )
|
||||||
|
|
||||||
|
SCONS_MIN_VERSION="2.5.0"
|
||||||
|
CHECKREQS_DISK_BUILD="2400M"
|
||||||
|
CHECKREQS_DISK_USR="512M"
|
||||||
|
CHECKREQS_MEMORY="1024M"
|
||||||
|
|
||||||
|
inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
|
||||||
|
|
||||||
|
MY_P=${PN}-src-r${PV/_rc/-rc}
|
||||||
|
|
||||||
|
DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
|
||||||
|
HOMEPAGE="https://www.mongodb.com"
|
||||||
|
SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="AGPL-3 Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
IUSE="debug kerberos libressl mms-agent ssl test +tools"
|
||||||
|
|
||||||
|
RDEPEND=">=app-arch/snappy-1.1.3
|
||||||
|
>=dev-cpp/yaml-cpp-0.5.3
|
||||||
|
>=dev-libs/boost-1.60:=[threads(+)]
|
||||||
|
>=dev-libs/libpcre-8.41[cxx]
|
||||||
|
dev-libs/snowball-stemmer
|
||||||
|
net-libs/libpcap
|
||||||
|
>=sys-libs/zlib-1.2.8:=
|
||||||
|
mms-agent? ( app-admin/mms-agent )
|
||||||
|
ssl? (
|
||||||
|
!libressl? ( >=dev-libs/openssl-1.0.1g:0= )
|
||||||
|
libressl? ( dev-libs/libressl:0= )
|
||||||
|
)"
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
${PYTHON_DEPS}
|
||||||
|
dev-python/cheetah[${PYTHON_USEDEP}]
|
||||||
|
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||||
|
dev-python/typing[${PYTHON_USEDEP}]
|
||||||
|
<dev-util/scons-3
|
||||||
|
sys-libs/ncurses
|
||||||
|
sys-libs/readline
|
||||||
|
debug? ( dev-util/valgrind )
|
||||||
|
kerberos? ( dev-libs/cyrus-sasl[kerberos] )
|
||||||
|
test? (
|
||||||
|
dev-python/pymongo[${PYTHON_USEDEP}]
|
||||||
|
)"
|
||||||
|
PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
|
||||||
|
"${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
|
||||||
|
"${FILESDIR}/${PN}-3.6.1-no-compass.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
S=${WORKDIR}/${MY_P}
|
||||||
|
|
||||||
|
pkg_pretend() {
|
||||||
|
if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.4 ]]; then
|
||||||
|
ewarn "To upgrade from a version earlier than the 3.4-series, you must"
|
||||||
|
ewarn "successively upgrade major releases until you have upgraded"
|
||||||
|
ewarn "to 3.4-series. Then upgrade to 3.6 series."
|
||||||
|
elif [[ -n ${REPLACING_VERSIONS} ]]; then
|
||||||
|
ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
enewgroup mongodb
|
||||||
|
enewuser mongodb -1 -1 /var/lib/${PN} mongodb
|
||||||
|
|
||||||
|
python-single-r1_pkg_setup
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
|
||||||
|
# remove bundled libs
|
||||||
|
rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
|
||||||
|
|
||||||
|
# remove compass
|
||||||
|
rm -rv src/mongo/installer/compass || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
# https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
|
||||||
|
# --use-system-icu fails tests
|
||||||
|
# --use-system-tcmalloc is strongly NOT recommended:
|
||||||
|
scons_opts=(
|
||||||
|
CC="$(tc-getCC)"
|
||||||
|
CXX="$(tc-getCXX)"
|
||||||
|
|
||||||
|
--disable-warnings-as-errors
|
||||||
|
--use-system-boost
|
||||||
|
--use-system-pcre
|
||||||
|
--use-system-snappy
|
||||||
|
--use-system-stemmer
|
||||||
|
--use-system-yaml
|
||||||
|
--use-system-zlib
|
||||||
|
)
|
||||||
|
|
||||||
|
use debug && scons_opts+=( --dbg=on )
|
||||||
|
use kerberos && scons_opts+=( --use-sasl-client )
|
||||||
|
use ssl && scons_opts+=( --ssl )
|
||||||
|
|
||||||
|
# respect mongoDB upstream's basic recommendations
|
||||||
|
# see bug #536688 and #526114
|
||||||
|
if ! use debug; then
|
||||||
|
filter-flags '-m*'
|
||||||
|
filter-flags '-O?'
|
||||||
|
fi
|
||||||
|
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
escons "${scons_opts[@]}" core tools
|
||||||
|
}
|
||||||
|
|
||||||
|
# FEATURES="test -usersandbox" emerge dev-db/mongodb
|
||||||
|
src_test() {
|
||||||
|
"${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
|
||||||
|
|
||||||
|
local x
|
||||||
|
for x in /var/{lib,log}/${PN}; do
|
||||||
|
keepdir "${x}"
|
||||||
|
fowners mongodb:mongodb "${x}"
|
||||||
|
fperms 0750 "${x}"
|
||||||
|
done
|
||||||
|
|
||||||
|
doman debian/mongo*.1
|
||||||
|
dodoc README docs/building.md
|
||||||
|
|
||||||
|
newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
|
||||||
|
newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
|
||||||
|
newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
|
||||||
|
newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
|
||||||
|
|
||||||
|
insinto /etc
|
||||||
|
newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
|
||||||
|
newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
|
||||||
|
|
||||||
|
systemd_dounit "${FILESDIR}/${PN}.service"
|
||||||
|
|
||||||
|
insinto /etc/logrotate.d/
|
||||||
|
newins "${FILESDIR}/${PN}.logrotate" ${PN}
|
||||||
|
|
||||||
|
# see bug #526114
|
||||||
|
pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_preinst() {
|
||||||
|
# wrt bug #461466
|
||||||
|
if [[ "$(get_libdir)" == "lib64" ]]; then
|
||||||
|
rmdir "${ED}"/usr/lib/ &>/dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
ewarn "Make sure to read the release notes and follow the upgrade process:"
|
||||||
|
ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
|
||||||
|
ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue