summaryrefslogtreecommitdiff
path: root/net-analyzer
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-18 23:20:40 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-18 23:20:40 +0100
commitf39c6dab71f5188f95650d367ece1df4f263e474 (patch)
tree9c30c203b3f09174814c41e6a63aa3522c7b7610 /net-analyzer
parent1b295861f983d29f9bd5d5906c7ca3cee4cf1f9a (diff)
gentoo auto-resync : 18:09:2022 - 23:20:40
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/Manifest.gzbin45034 -> 44716 bytes
-rw-r--r--net-analyzer/sguil-sensor/Manifest6
-rw-r--r--net-analyzer/sguil-sensor/files/log_packets.confd18
-rw-r--r--net-analyzer/sguil-sensor/files/log_packets.initd91
-rw-r--r--net-analyzer/sguil-sensor/files/sensor_agent.initd29
-rw-r--r--net-analyzer/sguil-sensor/metadata.xml12
-rw-r--r--net-analyzer/sguil-sensor/sguil-sensor-1.0.0-r3.ebuild81
-rw-r--r--net-analyzer/smokeping/Manifest7
-rw-r--r--net-analyzer/smokeping/files/79_smokeping.conf15
-rw-r--r--net-analyzer/smokeping/files/smokeping.conf1
-rw-r--r--net-analyzer/smokeping/files/smokeping.init.556
-rw-r--r--net-analyzer/smokeping/files/smokeping.service10
-rw-r--r--net-analyzer/smokeping/metadata.xml12
-rw-r--r--net-analyzer/smokeping/smokeping-2.7.3-r1.ebuild143
14 files changed, 0 insertions, 481 deletions
diff --git a/net-analyzer/Manifest.gz b/net-analyzer/Manifest.gz
index e50e9b59a34b..7f9de2c471ef 100644
--- a/net-analyzer/Manifest.gz
+++ b/net-analyzer/Manifest.gz
Binary files differ
diff --git a/net-analyzer/sguil-sensor/Manifest b/net-analyzer/sguil-sensor/Manifest
deleted file mode 100644
index ea353e5369bf..000000000000
--- a/net-analyzer/sguil-sensor/Manifest
+++ /dev/null
@@ -1,6 +0,0 @@
-AUX log_packets.confd 527 BLAKE2B 568a785fab6f027218269378d345986c354246dad66673ef9968e2188ea3f2f0377cdd84db0a1a4a165a428ba9f4270eb28096361291ac2bcddfbf0430916b03 SHA512 a4f9ed9abb050184773c59271d7e13f6bcbf853341dd31c72909ee6d31bb92990d84f31bf3111d8950fb4311747694c714498552eb26ca8a82ed3cb645847e82
-AUX log_packets.initd 2093 BLAKE2B a251bc9692a599e66943d5b3f6615f281d7872da22a76699875853f72836102cdb94fdf558250ee74e8618f8c45725dea0410e5fb635f153aadf5499575b4fe9 SHA512 43bc027f4769e986641a9820a1dfcb8a794ae417cb49efe333fd6a960953e1f9854c660e95ae9c0e14f4c1ec59da9e3096ae7352bbbb77805dc71729ed76514d
-AUX sensor_agent.initd 742 BLAKE2B 6d8a1aee38f81f4d9d971ec3a2d56112c0789ca60d5ee51ff7444109e55ddac889db81199e5883070031fe247cc06506febcb3ae27b5a215974a4f953121b887 SHA512 3a025479579ee9eec6a26d2a2c70efc362d37b7821dfa211236d8fe9dc2ea7b7b0694dccfd9b208655702401c1b0e3ecb08bac9e3b177ee77f161e5c774c1611
-DIST sguil-1.0.0.tar.gz 892934 BLAKE2B 69459eed682d91a1b57ba08c141dd655dbbfaa0d9d2956e6a26065f1b6820307b0e0e4dcbcad89537eba7499aea38f81739c351246e3dd6c46cab46bdf0d054f SHA512 fc3007383f90c99a0ace3eeebac75864f9aa549676e784c7bf1d81222282e3a5a3d5290b121097ae3c027dee3dd35bbe8ac9dfede04dbd561edfd3948a0465ab
-EBUILD sguil-sensor-1.0.0-r3.ebuild 2174 BLAKE2B a23c9fc26f29367328f82d3dbefeb8ff66f4858ebb3fbfc220c9579dad462e72f3123b48dad33ddb48fca836baeca95b79cca145c13e9fbebba57deaa269c2ad SHA512 1508bd7e96b5e9b3f839f7567688eb8ff4b7025a3bd56498df97ebb5647a6ad80bd2610c9a4795455cc9cef3ff2ab2268639138576776970e3dd97ce441063b3
-MISC metadata.xml 419 BLAKE2B 76c75b2fa0ab27ba2b14a933a754deeef6d22888b2bc250df8e4af9022db855705824ddd05bc9711db106d7e3b05db5bd4c902d581e095917cc29792759db004 SHA512 72e547ece836ed046185e22a42ca7f807f2affb9d9ddae3633a1c1aec926b0b3c9b37550dda6c057f8c69d51e75ce2ee0bb39f292a172709d1309dc237a18b6f
diff --git a/net-analyzer/sguil-sensor/files/log_packets.confd b/net-analyzer/sguil-sensor/files/log_packets.confd
deleted file mode 100644
index 93bdc772bff7..000000000000
--- a/net-analyzer/sguil-sensor/files/log_packets.confd
+++ /dev/null
@@ -1,18 +0,0 @@
-# Config file for /etc/init.d/log_packets
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# This tell snort which interface to listen on (any for every interface)
-IFACE=eth1
-
-# Make sure this matches your IFACE
-PIDFILE=/run/sguil-log_packets_$IFACE.pid
-
-# You probably don't want to change this, but in case you do
-LOGDIR="/var/lib/sguil"
-
-# Percentage of disk to try and maintain
-MAX_DISK_USE=95
-
-# This pulls in the options above
-OPTIONS="-m 122 -u sguil -g sguil"
diff --git a/net-analyzer/sguil-sensor/files/log_packets.initd b/net-analyzer/sguil-sensor/files/log_packets.initd
deleted file mode 100644
index f372c82c905b..000000000000
--- a/net-analyzer/sguil-sensor/files/log_packets.initd
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_commands="cleandisk"
-
-LOG_DIR="${LOGDIR}/${HOSTNAME}/dailylogs"
-
-start() {
- ebegin "Starting Log_packest"
- if [ ! -x /usr/bin/snort ]
- then
- eerror "No snort - cannot start"
- eend 1
- return 1
- fi
-
- if [ ! -d ${LOG_DIR} ]
- then
- mkdir -p ${LOG_DIR}
- chmod 770 ${LOG_DIR}
- fi
-
- today=$(date '+%Y-%m-%d')
-
- if [ ! -d "${LOG_DIR}/${today}" ]
- then
- mkdir "${LOG_DIR}/${today}"
- chmod 770 "${LOG_DIR}/${today}"
- chown root:sguil "${LOG_DIR}/${today}"
- fi
- start-stop-daemon --start --quiet -b -m --pidfile "${PIDFILE}" \
- --exec /usr/bin/snort \
- -- ${OPTIONS} -l "${LOG_DIR}/${today}" -b -i "${IFACE}" "${FILTER}"
- real_cleandisk
- eend $?
-}
-
-stop() {
- ebegin "Stopping Sensor Agent"
- start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
- eend $?
-}
-
-cleandisk() {
- ebegin "Cleaning Disk"
- real_cleandisk
- eend $?
-}
-
-# This func checks the current space being used by LOG_DIR
-# and rm's data as necessary.
-real_cleandisk() {
- einfo "Checking disk space (limited to ${MAX_DISK_USE}%)..."
- # grep, awk, tr...woohoo!
- CUR_USE=$(df -P ${LOG_DIR} | grep -v -i filesystem | awk '{print $5}' | tr -d %)
- einfo " Current Disk Use: ${CUR_USE}%"
-
- if [ ${CUR_USE} -gt ${MAX_DISK_USE} ]
- then
- # If we are here then we passed our disk limit
- # First find the oldest DIR
- cd "${LOG_DIR}"
- # Can't use -t on the ls since the mod time changes each time we
- # delete a file. Good thing we use YYYY-MM-DD so we can sort.
- OLDEST_DIR=$(ls | sort | head -n 1)
- cd "${OLDEST_DIR}"
-
- OLDEST_FILE=$(ls -t | tail -n 1)
-
- if [ -f "${OLDEST_FILE}" ]
- then
- einfo " Removing file: ${OLDEST_DIR}/${OLDEST_FILE}"
- rm -f "${OLDEST_FILE}"
- else
- einfo " Removing empty dir: ${OLDEST_DIR}"
- cd ..
- rm -rf "${OLDEST_DIR}"
- fi
-
- # Run cleandisk again as rm'ing one file might been enough
- # but we wait 5 secs in hopes any open writes are done.
- sync
- einfo " Waiting 5 secs for disk to sync..."
- sleep 5
- real_cleandisk
- else
- einfo "Done."
- fi
-}
-
diff --git a/net-analyzer/sguil-sensor/files/sensor_agent.initd b/net-analyzer/sguil-sensor/files/sensor_agent.initd
deleted file mode 100644
index 08b45e511f8c..000000000000
--- a/net-analyzer/sguil-sensor/files/sensor_agent.initd
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
- need net
-}
-
-checkconfig() {
- if [ ! -e /etc/sguil/sensor_agent.conf ] ; then
- eerror "You need an /etc/snort/sensor_agent.conf to run the Sensor Agent"
- return 1
- fi
-}
-
-start() {
- checkconfig || return 1
- ebegin "Starting Sensor Agent"
- start-stop-daemon --start -c sguil --quiet --exec /usr/bin/sensor_agent.tcl \
- -- -D -c "/etc/sguil/sensor_agent.conf">/dev/null 2>&1
- eend $?
-}
-
-stop() {
- ebegin "Stopping Sensor Agent"
- start-stop-daemon --stop --quiet --pidfile /run/sguil-sensor.pid
- eend $?
-}
-
diff --git a/net-analyzer/sguil-sensor/metadata.xml b/net-analyzer/sguil-sensor/metadata.xml
deleted file mode 100644
index e0c75486e6c0..000000000000
--- a/net-analyzer/sguil-sensor/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>netmon@gentoo.org</email>
- <name>Gentoo network monitoring and analysis project</name>
- </maintainer>
- <upstream>
- <remote-id type="github">bammv/sguil</remote-id>
- <remote-id type="sourceforge">sguil</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/net-analyzer/sguil-sensor/sguil-sensor-1.0.0-r3.ebuild b/net-analyzer/sguil-sensor/sguil-sensor-1.0.0-r3.ebuild
deleted file mode 100644
index 0403ede4f1b6..000000000000
--- a/net-analyzer/sguil-sensor/sguil-sensor-1.0.0-r3.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-MY_PV="${PV/_p/p}"
-DESCRIPTION="Sensor part of sguil Network Security Monitoring"
-HOMEPAGE="https://github.com/bammv/sguil"
-SRC_URI="https://github.com/bammv/sguil/archive/v${PV}.tar.gz -> ${P/-sensor}.tar.gz"
-S="${WORKDIR}/sguil-${MY_PV}"
-
-LICENSE="GPL-3 GPL-2+ QPL-1.0 GPL-2" # GPL-2 for init script
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-DEPEND="
- acct-group/sguil
- acct-user/sguil
-"
-
-RDEPEND="
- ${DEPEND}
- >=dev-lang/tcl-8.3:0=[-threads]
- >=dev-tcltk/tclx-8.3
- dev-tcltk/tls
- >=net-analyzer/barnyard-0.2.0-r1
- >=net-analyzer/snort-2.4.1-r1
- dev-ml/pcre-ocaml:=
- net-analyzer/sancp
-"
-
-src_prepare() {
- default
-
- sed -i \
- -e "s:gateway:${HOSTNAME}:" \
- -e 's:/snort_data:/var/lib/sguil:' \
- -e 's:DAEMON 0:DAEMON 1:' \
- -e 's:DEBUG 1:DEBUG 0:g' \
- sensor/sensor_agent.conf || die
-
- sed -i \
- -e 's:/var/run/sensor_agent.pid:/run/sguil-sensor.pid:' \
- sensor/sensor_agent.tcl || die
-}
-
-src_install() {
- dodoc doc/*
-
- dobin sensor/sensor_agent.tcl
-
- newinitd "${FILESDIR}/log_packets.initd" log_packets
- newinitd "${FILESDIR}/sensor_agent.initd" sensor_agent
- newconfd "${FILESDIR}/log_packets.confd" log_packets
- insinto /etc/sguil
- doins sensor/sensor_agent.conf
-
- # Create the directory structure
- diropts -g sguil -o sguil
- keepdir /var/lib/sguil/archive \
- "/var/lib/sguil/${HOSTNAME}" \
- "/var/lib/sguil/${HOSTNAME}/portscans" \
- "/var/lib/sguil/${HOSTNAME}/ssn_logs" \
- "/var/lib/sguil/${HOSTNAME}/dailylogs" \
- "/var/lib/sguil/${HOSTNAME}/sancp"
-
-}
-
-pkg_postinst() {
- elog
- elog "You should check /etc/sguil/sensor_agent.conf and"
- elog "/etc/init.d/logpackets and ensure that they are accurate"
- elog "for your environment. They should work providing that you"
- elog "are running the sensor on the same machine as the server."
- elog "This ebuild assumes that you are running a single sensor"
- elog "environment, if this is not the case then you must make sure"
- elog "to modify /etc/sguil/sensor_agent.conf and change the HOSTNAME variable."
- elog "You should crontab the /etc/init.d/log_packets script to restart"
- elog "each hour."
- elog
-}
diff --git a/net-analyzer/smokeping/Manifest b/net-analyzer/smokeping/Manifest
deleted file mode 100644
index 51a9944fabc6..000000000000
--- a/net-analyzer/smokeping/Manifest
+++ /dev/null
@@ -1,7 +0,0 @@
-AUX 79_smokeping.conf 351 BLAKE2B 97e09d4cf9d4b1fe4b334165a0f46bb11dea32cf6a2678a04c48e5290940a197c2efee0fa540726493e623a0f0235fdffde8ee28b2c89af22a804a8dfca29149 SHA512 d53abdf29e8f6bad67a654b17088c3f8dee7908ff82b0b911599e2ac6a11be84b8fa2c30b1f0b6142803ff9a5058f586946eafa112dfd26ca4f8f8664d19cfc6
-AUX smokeping.conf 32 BLAKE2B ea64af0cebbb847c89503b3d893c902ab2d761afbce6594731d8851cc5f9a81118c9ce9ff76888b0bddcbf6b4341a47a76a74f64aecdc3d1610510714f119ee7 SHA512 75863f16f8b57ca9ae7c7d65076acaf28aac66fa2d52ed78bce2bb3a4938dc75a1e8ed54236c52c3965b170a8348145780dd5c0f3d0fc8c95f4b88085252a4ef
-AUX smokeping.init.5 1360 BLAKE2B 4213a42dcd43c1166c5f10d287c9e50be37265f8be6db3a8b9e18351dfbe7259a8ca98eff044cd1c7ef657356e3960e60745aea63a79bdc73fd009b3bd746bd7 SHA512 64adf577c9d7d79c268cf46c40ed7db23c93cbd49897070d9028ee6636794b1c101d1a9d1ff6f92c24512e18bf0f06b10b67117090918920fb8b8189dec85d4f
-AUX smokeping.service 200 BLAKE2B 77110386e5d304c04d00114800c1f42bb5e8b5ce1eab419afd2fa7c59c1a569fe244c7f7c18e01519d82389bf66f5b6935dd212b3bf68ace9b480e981c311001 SHA512 2f8824143b8283ad02274107c5ed0e84f0c1465fc089823e36ef44a42fec68564d8cc4ff5fb0ad6dc0443e21fac5a8cbcbb0a9bea151b57efaff2a082d15f344
-DIST smokeping-2.7.3.tar.gz 6614710 BLAKE2B 7fa10c19487427a3092a1e5591422cb37f66a6eab86b8b43eebbc8af441d5426b99f3c7b54040660f6f150ade99b1ea2555b4fcd6f80d8306d6f86ac9f95974e SHA512 d46d61539ffdd9cac41391aa813364260f90f84443c328b1c9233ab6ba3a0c157861694614e6c33e18b153f6a6afc0769c5fc7752b3ab52f114d984e53232830
-EBUILD smokeping-2.7.3-r1.ebuild 4069 BLAKE2B e184cf1644685eec1f6dc077304cbe95902b60a35ee47c3542943837f72d24579297986195d8c4a1ff63923970d86c155cdbd24b353a8dd69825d1b6fb6b18fe SHA512 d67b8fe64ba07aeeb047cafdc1a3d54df0e581ad7bbce2ee8b8b31c7e85f7197ec4c872c4ce62a4642e3b0394f720423239cc4af6bbcdda91fd678299de2a8a1
-MISC metadata.xml 469 BLAKE2B 1036c99c507a4962ddb63ea0e55a4937efabcf7f534238c2e83cb63bc967172db6fe48eeda496e41ca532508e2792ea59961a5a17a19fcd47bba54db575f37cd SHA512 452a0d2ff248a80e8fd24f12aa00f517f7625dd37355f265f6c1f1f1632d8397b159ca2d586f3e8d40d42a1857306b92fcbcf3e86d4f981327e1c1af43fa47f2
diff --git a/net-analyzer/smokeping/files/79_smokeping.conf b/net-analyzer/smokeping/files/79_smokeping.conf
deleted file mode 100644
index 1e9361ba501a..000000000000
--- a/net-analyzer/smokeping/files/79_smokeping.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-###
-### Setup the smokeping image cache and perl cgi script
-###
-<IfModule mod_alias.c>
- Alias "/.simg/" "/var/lib/smokeping/.simg/"
- <IfModule mod_perl.c>
- <Directory "/var/lib/smokeping/.simg/">
- Options -Indexes MultiViews
- AllowOverride None
- Order deny,allow
- Deny from all
- Allow from 127.0.0.1
- </Directory>
- </IfModule>
-</IfModule>
diff --git a/net-analyzer/smokeping/files/smokeping.conf b/net-analyzer/smokeping/files/smokeping.conf
deleted file mode 100644
index 729726316fbd..000000000000
--- a/net-analyzer/smokeping/files/smokeping.conf
+++ /dev/null
@@ -1 +0,0 @@
-d /run/smokeping 0755 root root
diff --git a/net-analyzer/smokeping/files/smokeping.init.5 b/net-analyzer/smokeping/files/smokeping.init.5
deleted file mode 100644
index 3c08c3fdc65e..000000000000
--- a/net-analyzer/smokeping/files/smokeping.init.5
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-command="/usr/bin/smokeping"
-command_args="--nodaemon"
-command_background="true"
-command_user="smokeping:smokeping"
-pidfile="/run/${RC_SVCNAME}.pid"
-extra_started_commands="dump reload restore"
-required_files="/etc/smokeping/config"
-
-depend() {
- need net
- use dns
-}
-
-start_pre() {
- export LC_ALL=C
-}
-
-reload() {
- ebegin "Reloading smokeping"
- "${command}" --reload 2>&1 >/dev/null
- eend $?
-}
-
-dump() {
- ebegin "Dumping smokeping rrd files to XML for backup or upgrade use"
- if service_started "${myservice}" ; then
- eerror "You need to stop smokeping before dumping files!"
- return 1
- fi
- for f in $(find /var/lib/smokeping -name '*.rrd' -print) ; do
- f_xml=$(dirname $f)/$(basename $f .rrd).xml
- rrdtool dump "$f" > "${f_xml}"
- chown root:0 "${f_xml}"
- done
- eend $?
-}
-
-restore() {
- ebegin "Restoring smokeping rrd files from XML dump files"
- if service_started "${myservice}" ; then
- eerror "You need to stop smokeping before restoring files!"
- return 1
- fi
- for f in $(find /var/lib/smokeping -name '*.xml' -print) ; do
- f_rrd=$(dirname $f)/$(basename $f .xml).rrd
- mv -f "${f_rrd}" "${f_rrd}.bak"
- chown root:0 "${f_rrd}.bak"
- rrdtool restore "$f" "${f_rrd}"
- chown smokeping:smokeping "${f_rrd}"
- done
- eend $?
-}
diff --git a/net-analyzer/smokeping/files/smokeping.service b/net-analyzer/smokeping/files/smokeping.service
deleted file mode 100644
index 2130aca23627..000000000000
--- a/net-analyzer/smokeping/files/smokeping.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Latency Logging and Graphing System
-After=network.target
-
-[Service]
-ExecStart=/usr/bin/smokeping --nodaemon
-ExecReload=/bin/kill -HUP $MAINPID
-
-[Install]
-WantedBy=multi-user.target
diff --git a/net-analyzer/smokeping/metadata.xml b/net-analyzer/smokeping/metadata.xml
deleted file mode 100644
index 795b447a52c6..000000000000
--- a/net-analyzer/smokeping/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
-<email>netmon@gentoo.org</email>
-<name>Gentoo network monitoring and analysis project</name>
-</maintainer>
-<use>
-<flag name="dig">Install <pkg>net-dns/bind-tools</pkg> for dig functionality</flag>
-<flag name="echoping">Install <pkg>net-analyzer/echoping</pkg> for echoping functionality</flag>
-</use>
-</pkgmetadata>
diff --git a/net-analyzer/smokeping/smokeping-2.7.3-r1.ebuild b/net-analyzer/smokeping/smokeping-2.7.3-r1.ebuild
deleted file mode 100644
index 26e3c02ce8a7..000000000000
--- a/net-analyzer/smokeping/smokeping-2.7.3-r1.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools systemd tmpfiles
-
-DESCRIPTION="A powerful latency measurement tool"
-HOMEPAGE="https://oss.oetiker.ch/smokeping/"
-SRC_URI="https://oss.oetiker.ch/smokeping/pub/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE="apache2 curl dig echoping ipv6 radius"
-
-DEPEND="
- acct-group/smokeping
- acct-user/smokeping
- >=dev-lang/perl-5.8.8-r8
- >=dev-perl/SNMP_Session-1.13
- >=net-analyzer/fping-2.4_beta2-r2[suid]
- >=net-analyzer/rrdtool-1.2[graph,perl]
- dev-perl/CGI
- dev-perl/CGI-Session
- dev-perl/Config-Grammar
- dev-perl/Digest-HMAC
- dev-perl/FCGI
- dev-perl/IO-Socket-SSL
- dev-perl/IO-Tty
- dev-perl/Net-DNS
- dev-perl/Net-OpenSSH
- dev-perl/Net-SNMP
- dev-perl/Net-Telnet
- dev-perl/libwww-perl
- dev-perl/perl-ldap
- virtual/perl-libnet
- dev-perl/CGI-Fast
- !apache2? ( virtual/httpd-cgi )
- apache2? (
- >=www-apache/mod_perl-2.0.1
- www-apache/mod_fcgid
- )
- curl? ( >=net-misc/curl-7.21.4 )
- dig? ( net-dns/bind-tools )
- echoping? ( >=net-analyzer/echoping-6.0.2 )
- ipv6? ( >=dev-perl/Socket6-0.20 )
- radius? ( dev-perl/Authen-Radius )
-"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- default
-
- sed -i -e '/^SUBDIRS = / s|thirdparty||g' Makefile.am || die
- sed -i -e '/^perllibdir = / s|= .*|= $(libdir)|g' lib/Makefile.am || die
- # bundled(?) dev-perl/SNMP_Session
- rm -r lib/{BER.pm,SNMP_Session.pm,SNMP_util.pm} || die
- echo ${PV} > VERSION || die
-
- eautoreconf
-}
-
-src_configure() {
- econf \
- --sysconfdir=/etc/smokeping \
- --with-htdocs-dir=/var/www/localhost/smokeping
-}
-
-src_compile() {
- LC_ALL=C emake
-}
-
-src_install() {
- dodir /usr/$(get_libdir)
- default
-
- newinitd "${FILESDIR}"/${PN}.init.5 ${PN}
- dotmpfiles "${FILESDIR}"/${PN}.conf
- systemd_dounit "${FILESDIR}"/${PN}.service
-
- mv "${ED}/etc/smokeping/basepage.html.dist" "${ED}/etc/smokeping/basepage.html" || die
- mv "${ED}/etc/smokeping/config.dist" "${ED}/etc/smokeping/config" || die
- mv "${ED}/etc/smokeping/smokemail.dist" "${ED}/etc/smokeping/smokemail" || die
- mv "${ED}/etc/smokeping/smokeping_secrets.dist" "${ED}/etc/smokeping/smokeping_secrets" || die
- mv "${ED}/etc/smokeping/tmail.dist" "${ED}/etc/smokeping/tmail" || die
-
- sed -i \
- -e '/^imgcache/{s:\(^imgcache[ \t]*=\).*:\1 /var/lib/smokeping/.simg:}' \
- -e '/^imgurl/{s:\(^imgurl[ \t]*=\).*:\1 ../.simg:}' \
- -e '/^datadir/{s:\(^datadir[ \t]*=\).*:\1 /var/lib/smokeping:}' \
- -e '/^piddir/{s:\(^piddir[ \t]*=\).*:\1 /run/smokeping:}' \
- -e '/^cgiurl/{s#\(^cgiurl[ \t]*=\).*#\1 http://some.place.xyz/perl/smokeping.pl#}' \
- -e '/^smokemail/{s:\(^smokemail[ \t]*=\).*:\1 /etc/smokeping/smokemail:}' \
- -e '/^tmail/{s:\(^tmail[ \t]*=\).*:\1 /etc/smokeping/tmail:}' \
- -e '/^secrets/{s:\(^secrets[ \t]*=\).*:\1 /etc/smokeping/smokeping_secrets:}' \
- -e '/^template/{s:\(^template[ \t]*=\).*:\1 /etc/smokeping/basepage.html:}' \
- "${ED}/etc/${PN}/config" || die
-
- sed -i \
- -e '/^<script/{s:cropper/:/cropper/:}' \
- "${ED}/etc/${PN}/basepage.html" || die
-
- sed -i \
- -e 's/$FindBin::RealBin\/..\/etc\/config/\/etc\/smokeping\/config/g' \
- "${ED}/usr/bin/smokeping" "${ED}/usr/bin/smokeping_cgi" || die
-
- sed -i \
- -e 's:etc/config.dist:/etc/smokeping/config:' \
- "${ED}/usr/bin/tSmoke" || die
-
- sed -i \
- -e 's:/usr/etc/config:/etc/smokeping/config:' \
- "${ED}/var/www/localhost/smokeping/smokeping.fcgi.dist" || die
-
- dodir /var/www/localhost/cgi-bin
- mv "${ED}/var/www/localhost/smokeping/smokeping.fcgi.dist" \
- "${ED}/var/www/localhost/cgi-bin/smokeping.fcgi" || die
-
- fperms 700 /etc/${PN}/smokeping_secrets
-
- if use apache2 ; then
- insinto /etc/apache2/modules.d
- doins "${FILESDIR}/79_${PN}.conf"
- fi
-
- # Create the files in /var for rrd file storage
- keepdir /var/lib/${PN}/.simg
- fowners smokeping:smokeping /var/lib/${PN}
-
- if use apache2 ; then
- fowners apache:apache /var/lib/${PN}/.simg
- fowners -R apache:apache /var/www
- else
- fowners smokeping:smokeping /var/lib/${PN}/.simg
- fi
-
- fperms 775 /var/lib/${PN} /var/lib/${PN}/.simg
-}
-
-pkg_postinst() {
- tmpfiles_process ${PN}.conf
-}