[gentoo-commits] repo/gentoo:master commit in: net-analyzer/vnstat/files/
commit: 448be2e9cd6a28910a76a34fc3de396dd3e591d7 Author: Michael Mair-Keimberger levelnine at> AuthorDate: Fri May 6 16:29:37 2022 + Commit: Sam James gentoo org> CommitDate: Sat May 7 05:28:28 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=448be2e9 net-analyzer/vnstat: remove unused patch Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Michael Mair-Keimberger levelnine.at> Closes: https://github.com/gentoo/gentoo/pull/25352 Signed-off-by: Sam James gentoo.org> net-analyzer/vnstat/files/vnstat-2.2-run.patch | 11 --- 1 file changed, 11 deletions(-) diff --git a/net-analyzer/vnstat/files/vnstat-2.2-run.patch b/net-analyzer/vnstat/files/vnstat-2.2-run.patch deleted file mode 100644 index bb9222b5fe2f.. --- a/net-analyzer/vnstat/files/vnstat-2.2-run.patch +++ /dev/null @@ -1,11 +0,0 @@ a/src/common.h -+++ b/src/common.h -@@ -229,7 +229,7 @@ - #define CREATEDIRS 1 - #define UPDATEFILEOWNER 1 - #define LOGFILE "/var/log/vnstat/vnstat.log" --#define PIDFILE "/var/run/vnstat/vnstat.pid" -+#define PIDFILE "/run/vnstat/vnstat.pid" - #define IS64BIT -2 - - /* no transparency by default */
[gentoo-commits] repo/gentoo:master commit in: net-analyzer/vnstat/files/, net-analyzer/vnstat/
commit: 9ede51cacd883bab9167e570ae27ad391bfd5c95 Author: Sam James gentoo org> AuthorDate: Tue Jan 25 16:35:49 2022 + Commit: Sam James gentoo org> CommitDate: Tue Jan 25 16:37:00 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ede51ca net-analyzer/vnstat: add 2.9 Signed-off-by: Sam James gentoo.org> net-analyzer/vnstat/Manifest | 2 ++ net-analyzer/vnstat/files/vnstat-2.9-conf.patch| 39 ++ .../{vnstat-.ebuild => vnstat-2.9.ebuild} | 8 ++--- net-analyzer/vnstat/vnstat-.ebuild | 8 ++--- 4 files changed, 47 insertions(+), 10 deletions(-) diff --git a/net-analyzer/vnstat/Manifest b/net-analyzer/vnstat/Manifest index 398dbd978b5b..522f2f8774e3 100644 --- a/net-analyzer/vnstat/Manifest +++ b/net-analyzer/vnstat/Manifest @@ -2,3 +2,5 @@ DIST vnstat-1.17.tar.gz 238397 BLAKE2B 73aaffda3c91a1146b1d6a21f637272be227a15a7 DIST vnstat-1.17.tar.gz.asc 819 BLAKE2B 3186e28dc29edb37eb0bbef9b29f1ea682e4a9de208b69b83a8bc99c81f272eb6865176aaa30e415bf8423d94f385e0725e1256eeb822c3152638eaace23b749 SHA512 c26af29daefe6431c1769812d04ba5bff92ac1241a6a49df11e28f0e51b21d4eb84ff1f1fb133a388fd8ac59967162bc5d60d5f02c409d34be5414acd34f7818 DIST vnstat-2.8.tar.gz 290644 BLAKE2B 21ff801ce6abb135c26eb937eadb447bea9fd3dcb2af123051edb9861e088d8fc217f84ef2d924fe8b480388cfc761d0259f8abb2312ae49c2840643787d49bd SHA512 207aa1699df298ce3008153701782634a96a239599d17a5b2f1fbb298a9cf8edb35298e2de1f4f93415ddf34e0bdb831f95984b47fdd7f89ecc6aeb4821a0afd DIST vnstat-2.8.tar.gz.asc 833 BLAKE2B 097d37e1916924901f10d09bba882357c0eb81cf71fca921dbc642735ec8c0bde97f7ab63cd3953718c21687e6f39099cf2446210f41f3698b39b74116c4c025 SHA512 d5448d68da92d434cc6a34e007002c81ed8d97e533bf99364d3f65b4125bd6f21fe2f6f6efb97775ecc4ba4afd09e12add71ae2299a2d990a7a9d0a591c32811 +DIST vnstat-2.9.tar.gz 300796 BLAKE2B 1671fe49f3add0087431b57aaa69d4c6280066a299e6899c00cd5bf6ec21380d1457295f884f683ebfb89959eea08a9d900e898a865e3f6ff2a82ecf354d974a SHA512 883f273c02f6d91478991d95deffba9d90457a1bb0b9dd818c01398365df97ffb72dda88299231d9076756192b05524b6f8820470c9caf6ee6a12e5914a82176 +DIST vnstat-2.9.tar.gz.asc 833 BLAKE2B 4dd17e02e6c0c5232354ea8c4dea1d86ac43015ac66c60dc227b143aa5352e5a1eb0870932662778b2350928b124e2bbc56dfa13cfe7c2fd74538d84c00f9b4c SHA512 bf57974afb028fef7ec311a15bb1dcf275f10b845c5512efe73711b622b5912c4de0ff0553db4152389d2421a468c888191eab8fca08212e164f997ad1e04778 diff --git a/net-analyzer/vnstat/files/vnstat-2.9-conf.patch b/net-analyzer/vnstat/files/vnstat-2.9-conf.patch new file mode 100644 index ..d2cfa3977cfb --- /dev/null +++ b/net-analyzer/vnstat/files/vnstat-2.9-conf.patch @@ -0,0 +1,39 @@ +diff --git a/cfg/vnstat.conf b/cfg/vnstat.conf +index f404de5..d2bd928 100644 +--- a/cfg/vnstat.conf b/cfg/vnstat.conf +@@ -80,10 +80,10 @@ + ## + + # switch to given user when started as root (leave empty to disable) +-;DaemonUser "" ++;DaemonUser "vnstat" + + # switch to given group when started as root (leave empty to disable) +-;DaemonGroup "" ++;DaemonGroup "vnstat" + + # try to detect interface maximum bandwidth, 0 = disable feature + # MaxBandwidth will be used as fallback value when enabled +@@ -161,7 +161,7 @@ + ;LogFile "/var/log/vnstat/vnstat.log" + + # file used as daemon pid / lock file +-;PidFile "/var/run/vnstat/vnstat.pid" ++;PidFile "/run/vnstat/vnstat.pid" + + # 1 = 64-bit, 0 = 32-bit, -1 = old style logic, -2 = automatic detection + ;64bitInterfaceCounters -2 +diff --git a/src/common.h b/src/common.h +index bb2fb56..f148004 100644 +--- a/src/common.h b/src/common.h +@@ -241,7 +241,7 @@ and most can be changed later from the config file. + #define CREATEDIRS 1 + #define UPDATEFILEOWNER 1 + #define LOGFILE "/var/log/vnstat/vnstat.log" +-#define PIDFILE "/var/run/vnstat/vnstat.pid" ++#define PIDFILE "/run/vnstat/vnstat.pid" + #define IS64BIT -2 + #define WALDB 0 + #define WALDBCHECKPOINTINTERVALMINS 240 diff --git a/net-analyzer/vnstat/vnstat-.ebuild b/net-analyzer/vnstat/vnstat-2.9.ebuild similarity index 91% copy from net-analyzer/vnstat/vnstat-.ebuild copy to net-analyzer/vnstat/vnstat-2.9.ebuild index 407176bb06b7..f9877e7f008d 100644 --- a/net-analyzer/vnstat/vnstat-.ebuild +++ b/net-analyzer/vnstat/vnstat-2.9.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit systemd tmpfiles @@ -41,9 +41,7 @@ DEPEND=" RDEPEND+=" selinux? ( sec-policy/selinux-vnstatd )" PATCHES=( - "${FILESDIR}"/${PN}-2.2-conf.patch - "${FILESDIR}"/${PN}-2.2-drop-root.patch - "${FILESDIR}"/${PN}-2.2-run.patch + "${FILESDIR}"/${PN}-2.9-conf.patch ) src_compile() { diff --git a/net-analyzer/vnstat/vnstat-.ebuild b/net-analyzer/vnstat/vnstat-.ebuild index 407176bb06b7..f9877e7f008d 100644 ---
[gentoo-commits] repo/gentoo:master commit in: net-analyzer/vnstat/files/, net-analyzer/vnstat/
commit: d7d5091e957eef385af8236032cf6ab0a4ef1170 Author: Jeroen Roovers gentoo org> AuthorDate: Tue Apr 30 13:56:17 2019 + Commit: Jeroen Roovers gentoo org> CommitDate: Tue Apr 30 14:02:03 2019 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7d5091e net-analyzer/vnstat: Version 2.2 Package-Manager: Portage-2.3.65, Repoman-2.3.12 Signed-off-by: Jeroen Roovers gentoo.org> net-analyzer/vnstat/Manifest | 1 + net-analyzer/vnstat/files/vnstat-2.2-conf.patch | 11 +++ net-analyzer/vnstat/files/vnstat-2.2-drop-root.patch | 15 +++ net-analyzer/vnstat/files/vnstat-2.2-run.patch | 11 +++ .../vnstat/{vnstat-.ebuild => vnstat-2.2.ebuild} | 16 net-analyzer/vnstat/vnstat-.ebuild | 14 +++--- 6 files changed, 53 insertions(+), 15 deletions(-) diff --git a/net-analyzer/vnstat/Manifest b/net-analyzer/vnstat/Manifest index 8fc1998d237..2b4f0f02c40 100644 --- a/net-analyzer/vnstat/Manifest +++ b/net-analyzer/vnstat/Manifest @@ -2,3 +2,4 @@ DIST vnstat-1.17.tar.gz 238397 BLAKE2B 73aaffda3c91a1146b1d6a21f637272be227a15a7 DIST vnstat-1.18.tar.gz 242502 BLAKE2B 2190c33ddf1c0a573e638234a94a86eb44fcc39e106ce8ece1f5ee5314dcc1efee237376ec109eb0873b9cf27ac3fe663526512f98a130114d417380bcb82a31 SHA512 4f9f08a57586bc57ede3d66802ee977c69b5f76ab42aa36e942e8d827dfce806dfc04916646fac01f57b026742a639fc5f7395b141a1c03ad11a1f977d02aa68 DIST vnstat-2.0.tar.gz 259439 BLAKE2B f28f10962ae2acf04fc6669268bf5cf911ca2a5c77422b773f82a1ae25a0f90c2022aa5981c701bfa0246340113e24e0c3854174f6b3bee17d5474b9ba0916f0 SHA512 d5c9012b692adc9032ca1abde8619bd6a5de53c7c03b0fcae5b4b901c9769285a9de0b3a4f1bc21cfd74b96cfb10130a95e90cf179126ea676a777e1a9579a62 DIST vnstat-2.1.tar.gz 259622 BLAKE2B 703e1260d0ea81a016ed89dbfa830f97ff6e38ca2dd4c96ea08ca8293e71cde8cf0048e6a68b9cb6f2f94aaec66764bbfc718173897d40fd6e8166c07d7e627c SHA512 4c88795ee254cb550873e7db72a5f7b795553ef944c3f4df4c351e83376ea02ae6f3376b01edf727072fe2ba178372705a73483c24269acc4c173ee0e03f8930 +DIST vnstat-2.2.tar.gz 264037 BLAKE2B dc82798a0c619d2aea3d3cbdd42bb10f73769b0e64443407daabc8838e5af5b0ef718c0769321116269f1bc6f50e99133a1d38ccb730f658f3215a83180589b7 SHA512 47bd544ed071268774bf55a8269f50694d2af0b14fe3eb50b707c4f09c9a0c0653360ac892136275355b2a647a0fed731f007d135edf4bc9b04dc537bf248acc diff --git a/net-analyzer/vnstat/files/vnstat-2.2-conf.patch b/net-analyzer/vnstat/files/vnstat-2.2-conf.patch new file mode 100644 index 000..7bea5d8ffe9 --- /dev/null +++ b/net-analyzer/vnstat/files/vnstat-2.2-conf.patch @@ -0,0 +1,11 @@ +--- a/cfg/vnstat.conf b/cfg/vnstat.conf +@@ -143,7 +143,7 @@ + LogFile "/var/log/vnstat/vnstat.log" + + # file used as daemon pid / lock file +-PidFile "/var/run/vnstat/vnstat.pid" ++PidFile "/run/vnstat/vnstat.pid" + + # 1 = 64-bit, 0 = 32-bit, -1 = old style logic, -2 = automatic detection + 64bitInterfaceCounters -2 diff --git a/net-analyzer/vnstat/files/vnstat-2.2-drop-root.patch b/net-analyzer/vnstat/files/vnstat-2.2-drop-root.patch new file mode 100644 index 000..2ed3ec1404a --- /dev/null +++ b/net-analyzer/vnstat/files/vnstat-2.2-drop-root.patch @@ -0,0 +1,15 @@ +--- a/cfg/vnstat.conf b/cfg/vnstat.conf +@@ -69,10 +69,10 @@ + ## + + # switch to given user when started as root (leave empty to disable) +-DaemonUser "" ++DaemonUser "vnstat" + + # switch to given group when started as root (leave empty to disable) +-DaemonGroup "" ++DaemonGroup "vnstat" + + # try to detect interface maximum bandwidth, 0 = disable feature + # MaxBandwidth will be used as fallback value when enabled diff --git a/net-analyzer/vnstat/files/vnstat-2.2-run.patch b/net-analyzer/vnstat/files/vnstat-2.2-run.patch new file mode 100644 index 000..bb9222b5fe2 --- /dev/null +++ b/net-analyzer/vnstat/files/vnstat-2.2-run.patch @@ -0,0 +1,11 @@ +--- a/src/common.h b/src/common.h +@@ -229,7 +229,7 @@ + #define CREATEDIRS 1 + #define UPDATEFILEOWNER 1 + #define LOGFILE "/var/log/vnstat/vnstat.log" +-#define PIDFILE "/var/run/vnstat/vnstat.pid" ++#define PIDFILE "/run/vnstat/vnstat.pid" + #define IS64BIT -2 + + /* no transparency by default */ diff --git a/net-analyzer/vnstat/vnstat-.ebuild b/net-analyzer/vnstat/vnstat-2.2.ebuild similarity index 81% copy from net-analyzer/vnstat/vnstat-.ebuild copy to net-analyzer/vnstat/vnstat-2.2.ebuild index 5e41cb65356..c5e123218ab 100644 --- a/net-analyzer/vnstat/vnstat-.ebuild +++ b/net-analyzer/vnstat/vnstat-2.2.ebuild @@ -1,16 +1,16 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 -inherit git-r3 systemd user +EAPI=7 +inherit systemd user DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage" HOMEPAGE="https://humdi.net/vnstat/;
[gentoo-commits] repo/gentoo:master commit in: net-analyzer/vnstat/files/
commit: 54709adf9e1f4a8f0671896664e2cf02477afc48 Author: Jeroen Roovers gentoo org> AuthorDate: Sat Oct 14 13:11:26 2017 + Commit: Jeroen Roovers gentoo org> CommitDate: Sat Oct 14 13:11:26 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54709adf net-analyzer/vnstat: Fix patches. Package-Manager: Portage-2.3.11, Repoman-2.3.3 net-analyzer/vnstat/files/vnstat-1.17-conf.patch | 2 +- net-analyzer/vnstat/files/vnstat-1.17-run.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net-analyzer/vnstat/files/vnstat-1.17-conf.patch b/net-analyzer/vnstat/files/vnstat-1.17-conf.patch index b939e7c0435..5bcbdafb2a7 100644 --- a/net-analyzer/vnstat/files/vnstat-1.17-conf.patch +++ b/net-analyzer/vnstat/files/vnstat-1.17-conf.patch @@ -1,4 +1,4 @@ a/cfg/vnstat.conf.JeR +--- a/cfg/vnstat.conf +++ b/cfg/vnstat.conf @@ -115,10 +115,10 @@ UpdateFileOwner 1 diff --git a/net-analyzer/vnstat/files/vnstat-1.17-run.patch b/net-analyzer/vnstat/files/vnstat-1.17-run.patch index e3b514d0c6b..4afe449ceed 100644 --- a/net-analyzer/vnstat/files/vnstat-1.17-run.patch +++ b/net-analyzer/vnstat/files/vnstat-1.17-run.patch @@ -1,4 +1,4 @@ a/src/common.h.JeR +--- a/src/common.h +++ b/src/common.h @@ -198,7 +198,7 @@ #define CREATEDIRS 1
[gentoo-commits] repo/gentoo:master commit in: net-analyzer/vnstat/files/, net-analyzer/vnstat/
commit: 3901be72186d7e9cd269179eb915145d33e1e805 Author: Jeroen Roovers gentoo org> AuthorDate: Fri Oct 13 18:00:18 2017 + Commit: Jeroen Roovers gentoo org> CommitDate: Fri Oct 13 18:00:18 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3901be72 net-analyzer/vnstat: Revert patching the test, drop sed script instead (bug #623906). Package-Manager: Portage-2.3.11, Repoman-2.3.3 net-analyzer/vnstat/files/vnstat-1.17-conf.patch | 15 ++ net-analyzer/vnstat/files/vnstat-1.17-limit.patch | 11 -- net-analyzer/vnstat/files/vnstat-1.17-run.patch| 11 ++ ...vnstat-1.17-r1.ebuild => vnstat-1.17-r2.ebuild} | 24 -- 4 files changed, 30 insertions(+), 31 deletions(-) diff --git a/net-analyzer/vnstat/files/vnstat-1.17-conf.patch b/net-analyzer/vnstat/files/vnstat-1.17-conf.patch new file mode 100644 index 000..b939e7c0435 --- /dev/null +++ b/net-analyzer/vnstat/files/vnstat-1.17-conf.patch @@ -0,0 +1,15 @@ +--- a/cfg/vnstat.conf.JeR b/cfg/vnstat.conf +@@ -115,10 +115,10 @@ + UpdateFileOwner 1 + + # file used for logging if UseLogging is set to 1 +-LogFile "/var/log/vnstat/vnstat.log" ++LogFile "/var/log/vnstat/vnstatd.log" + + # file used as daemon pid / lock file +-PidFile "/var/run/vnstat/vnstat.pid" ++PidFile "/run/vnstat/vnstatd/vnstatd.pid" + + + # vnstati diff --git a/net-analyzer/vnstat/files/vnstat-1.17-limit.patch b/net-analyzer/vnstat/files/vnstat-1.17-limit.patch deleted file mode 100644 index e1706977e52..000 --- a/net-analyzer/vnstat/files/vnstat-1.17-limit.patch +++ /dev/null @@ -1,11 +0,0 @@ a/tests/config_tests.c -+++ b/tests/config_tests.c -@@ -99,7 +99,7 @@ - cfg.maxbw = 10; - ret = ibwget("ethnone", ); - ck_assert_int_eq(ret, 1); -- ck_assert_int_eq(limit, 8); -+ ck_assert_int_eq(limit, 10); - } - END_TEST - diff --git a/net-analyzer/vnstat/files/vnstat-1.17-run.patch b/net-analyzer/vnstat/files/vnstat-1.17-run.patch new file mode 100644 index 000..e3b514d0c6b --- /dev/null +++ b/net-analyzer/vnstat/files/vnstat-1.17-run.patch @@ -0,0 +1,11 @@ +--- a/src/common.h.JeR b/src/common.h +@@ -198,7 +198,7 @@ + #define CREATEDIRS 1 + #define UPDATEFILEOWNER 1 + #define LOGFILE "/var/log/vnstat/vnstat.log" +-#define PIDFILE "/var/run/vnstat/vnstat.pid" ++#define PIDFILE "/run/vnstat/vnstat.pid" + + /* no transparency by default */ + #define TRANSBG 0 diff --git a/net-analyzer/vnstat/vnstat-1.17-r1.ebuild b/net-analyzer/vnstat/vnstat-1.17-r2.ebuild similarity index 76% rename from net-analyzer/vnstat/vnstat-1.17-r1.ebuild rename to net-analyzer/vnstat/vnstat-1.17-r2.ebuild index c3c76c43018..88ba28fdb0e 100644 --- a/net-analyzer/vnstat/vnstat-1.17-r1.ebuild +++ b/net-analyzer/vnstat/vnstat-1.17-r2.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI="6" -inherit systemd toolchain-funcs user +EAPI=6 +inherit systemd user DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage" HOMEPAGE="http://humdi.net/vnstat/; @@ -25,7 +25,8 @@ RDEPEND=" selinux? ( sec-policy/selinux-vnstatd ) " PATCHES=( - "${FILESDIR}"/${PN}-1.17-limit.patch + "${FILESDIR}"/${PN}-1.17-conf.patch + "${FILESDIR}"/${PN}-1.17-run.patch ) pkg_setup() { @@ -33,23 +34,6 @@ pkg_setup() { enewuser vnstat -1 -1 /var/lib/vnstat vnstat } -src_prepare() { - default - - tc-export CC - - sed -i \ - -e 's|^\(MaxBWethnone.*\)$|#\1|' \ - -e 's|^Daemon\(.*\) ""$|Daemon\1 "vnstat"|' \ - -e 's|vnstat[.]log|vnstatd.log|' \ - -e 's|vnstat[.]pid|vnstatd.pid|' \ - -e 's|/var/run|/run|' \ - cfg/${PN}.conf || die - sed -i \ - -e '/PIDFILE/s|/var/run|/run|' \ - src/common.h || die -} - src_compile() { emake ${PN} ${PN}d $(usex gd ${PN}i '') }
[gentoo-commits] repo/gentoo:master commit in: net-analyzer/vnstat/files/, net-analyzer/vnstat/
commit: 9bedfaa050827b35da830925cfd8a2e1469b3411 Author: Thomas Deutschmann gentoo org> AuthorDate: Tue Jun 27 16:24:27 2017 + Commit: Thomas Deutschmann gentoo org> CommitDate: Tue Jun 27 16:25:56 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bedfaa0 net-analyzer/vnstat: Rev bump to improve runscript and to add systemd support (bug #56) Package-Manager: Portage-2.3.5, Repoman-2.3.2 net-analyzer/vnstat/files/vnstat.cron-r1 | 7 ++ net-analyzer/vnstat/files/vnstatd.confd-r1 | 18 + net-analyzer/vnstat/files/vnstatd.initd-r2 | 29 +++ net-analyzer/vnstat/files/vnstatd.systemd | 11 +++ net-analyzer/vnstat/files/vnstatd.tmpfile | 1 + net-analyzer/vnstat/vnstat-1.17-r1.ebuild | 123 + 6 files changed, 189 insertions(+) diff --git a/net-analyzer/vnstat/files/vnstat.cron-r1 b/net-analyzer/vnstat/files/vnstat.cron-r1 new file mode 100644 index 000..178133675c6 --- /dev/null +++ b/net-analyzer/vnstat/files/vnstat.cron-r1 @@ -0,0 +1,7 @@ +#!/bin/bash + +# run vnstat if installed and at least one database exists + +if [ -x /usr/bin/vnstat ] && [ `ls /var/lib/vnstat/ | wc -l` -ge 1 ] ; then + exec /usr/bin/vnstat -u +fi diff --git a/net-analyzer/vnstat/files/vnstatd.confd-r1 b/net-analyzer/vnstat/files/vnstatd.confd-r1 new file mode 100644 index 000..33edf3560ee --- /dev/null +++ b/net-analyzer/vnstat/files/vnstatd.confd-r1 @@ -0,0 +1,18 @@ +# /etc/conf.d/vnstatd: config file for /etc/init.d/vnstatd + +# Configuration file +VNSTATD_CONFIGFILE="/etc/vnstat.conf" + +# PID file +VNSTATD_PIDFILE="/run/vnstat/vnstatd.pid" + +# Options to vnstatd +# See vnstatd(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 +VNSTATD_OPTS="" + +# Wait x milliseconds after starting and check that daemon is still running. +# See start-stop-daemon(8) for more details +SSD_STARTWAIT=500 diff --git a/net-analyzer/vnstat/files/vnstatd.initd-r2 b/net-analyzer/vnstat/files/vnstatd.initd-r2 new file mode 100644 index 000..2b4a9336c2a --- /dev/null +++ b/net-analyzer/vnstat/files/vnstatd.initd-r2 @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +VNSTATD_CONFIGFILE=${VNSTATD_CONFIGFILE:-"/etc/vnstat.conf"} +VNSTATD_PIDFILE=${VNSTATD_PIDFILE:-"/run/vnstat/vnstatd.pid"} + +pidfile="${VNSTATD_PIDFILE}" +command="/usr/bin/vnstatd" +command_args="${VNSTATD_OPTS} --daemon --config \"${VNSTATD_CONFIGFILE}\" --pidfile \"${pidfile}\"" +start_stop_daemon_args="--wait ${SSD_STARTWAIT:-500}" +name="vnStat daemon" + +description="vnstatd updates vnStat databases." +description_reload="Reload ${name}'s configuration" + +required_files="${VNSTATD_CONFIGFILE}" + +start_pre() { + checkpath --directory --mode 0775 --owner vnstat:vnstat $(dirname "${pidfile}") +} + +reload() { + ebegin "Reloading ${name} configuration" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} diff --git a/net-analyzer/vnstat/files/vnstatd.systemd b/net-analyzer/vnstat/files/vnstatd.systemd new file mode 100644 index 000..51b079c5a9f --- /dev/null +++ b/net-analyzer/vnstat/files/vnstatd.systemd @@ -0,0 +1,11 @@ +[Unit] +Description=vnStat network traffic monitor +Documentation=man:vnstatd(1) man:vnstat(1) man:vnstat.conf(5) +After=network-online.target + +[Service] +ExecStart=/usr/bin/vnstatd --nodaemon +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/vnstat/files/vnstatd.tmpfile b/net-analyzer/vnstat/files/vnstatd.tmpfile new file mode 100644 index 000..36ecf225949 --- /dev/null +++ b/net-analyzer/vnstat/files/vnstatd.tmpfile @@ -0,0 +1 @@ +d /run/vnstat 0775 vnstat vnstat - diff --git a/net-analyzer/vnstat/vnstat-1.17-r1.ebuild b/net-analyzer/vnstat/vnstat-1.17-r1.ebuild new file mode 100644 index 000..0c24c6dc601 --- /dev/null +++ b/net-analyzer/vnstat/vnstat-1.17-r1.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +inherit systemd toolchain-funcs user versionator + +DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage" +HOMEPAGE="http://humdi.net/vnstat/; +SRC_URI="http://humdi.net/vnstat/${P}.tar.gz; + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="gd selinux test" + +COMMON_DEPEND=" + gd? ( media-libs/gd[png] ) +" +DEPEND=" + ${COMMON_DEPEND} + test? ( dev-libs/check ) +" +RDEPEND=" + ${COMMON_DEPEND} + selinux? ( sec-policy/selinux-vnstatd ) +" + +pkg_setup() { + enewgroup vnstat + enewuser vnstat -1 -1