diff options
Diffstat (limited to 'net-analyzer/vnstat')
-rw-r--r-- | net-analyzer/vnstat/Manifest | 4 | ||||
-rw-r--r-- | net-analyzer/vnstat/files/vnstat-1.17-conf.patch | 15 | ||||
-rw-r--r-- | net-analyzer/vnstat/files/vnstat-1.17-run.patch | 11 | ||||
-rw-r--r-- | net-analyzer/vnstat/vnstat-1.17-r1.ebuild | 123 | ||||
-rw-r--r-- | net-analyzer/vnstat/vnstat-1.17-r2.ebuild | 66 |
5 files changed, 95 insertions, 124 deletions
diff --git a/net-analyzer/vnstat/Manifest b/net-analyzer/vnstat/Manifest index 06ac28a3be46..ebbbc3d48c61 100644 --- a/net-analyzer/vnstat/Manifest +++ b/net-analyzer/vnstat/Manifest @@ -1,3 +1,5 @@ +AUX vnstat-1.17-conf.patch 356 SHA256 3193bdf800a73715f1c34b62a734056325c80a38e0dfb53885ee3edd35ec85b0 SHA512 52a063ff1b99fdbc43912ee3efbcfc30f514fd1394724fefb883eed7cf650071c4877581d64d5534be1a84a631deb4880201ad6e1dd05017a06cbec652aae227 WHIRLPOOL 1250ac8983feda813978bee03481387dc6c7afc4e2b0166474514f42581bb5d47c7d0d245a6fe5b02448c3a8ebb8026465c5e7a94e5a70a4bae8189a773a5a89 +AUX vnstat-1.17-run.patch 300 SHA256 f8f8152d8bc368886a08288be10894357261492afc4ac9f3838174be2d47e123 SHA512 d0dfec867d8d169967a5a7724360cf4833d3c933a47bcba329e0f7c007bbdd58c0d7b14e209385f209027f75f5892e062b081456bd2d54c88e818c86a4061f9e WHIRLPOOL 32c303fba762945cbbdc37c27bd53059c90cd8337913baa37ddaa19ab5529b6254d3b9f9864d7cbc4e87fdda6116fe609bd204c90ce9c6de469e16fa4a4187c4 AUX vnstat.cron 220 SHA256 b6b437c680606061b98af19758cbacc3f883f73cd86f0bbfbcfe756c982cd3fd SHA512 c901385f97323d1a686cee63d015eaf9ad38ed195a1c0e25dae671dd7061ebc918498684c55b90b0674960891dfca4b83f458174892c1b9efb48cd362fdb8477 WHIRLPOOL 1432dfdfdf2f121deeff6f8147b344ff61838a8fe54d7bc5bb3ac6c1b9675a64b6e331bd3e33ee0e9fe2488bde42ad8c4e279ea3b1d1d5ed304b4b2ef4205429 AUX vnstat.cron-r1 177 SHA256 614966fa153b024515a4d6363d3046df9bdda07c7d18bc7aeb4f8347d80e7134 SHA512 8074d65cf2f28bd5c02fe741dbe20f8404bc2e25b94b43d0bcc829ca088828227805caf9cb8cae020ae0a9370d68dc3c757fedf07d48c0fc71ba944f2da1cb94 WHIRLPOOL 9c44e29673064d7c1ac77f8af0bd5aa3117bb46560f4cddee829a3e6a3d617ba468a867298d6d7e58c840c752402e35a8b82dedd8571d13454a167bdbc188676 AUX vnstatd.confd 216 SHA256 2cd5b91f86bc26aca85166a50de89faaccbf1ea8f219efb48b50b7ed0f3fe377 SHA512 d645817913d5b52e928561b3d6a0e869d8ae5db81b97af91c1ebfc6a8cd2df666c1653e6dc5f91c0a890033a89692f77eaf081c1cae5590446c69a70ea263946 WHIRLPOOL 3a974a3dc30a33a3a2ca22db551068f1df3444f4248e896482e26d1c5b0bd717706ef30e18f5a6ee193966bef1466a13d3c6ad35e86f42f025ebb3c02e622a22 @@ -7,7 +9,7 @@ AUX vnstatd.initd-r2 874 SHA256 5ce75e189239ab52b9114defda6c46f57c18ed88d0ffc811 AUX vnstatd.systemd 262 SHA256 26c4a8e6e1800fd912229bb9463355cde8591261d51f4936765bb94a4ea25cff SHA512 35f9714641d1b3288bed659bd010ef1b8f0316f915622dcf5d3250e1acdd3b438762ae934fab2f6cd350274c7ec0f70a7d8946448bbc6db67be6f91cd86aa47c WHIRLPOOL 3d7f67a773204d3f933c7692b006419376aeead550c3bd169545586f7e7f69deb20585b44bd264be5ec0e83002f2cab3c8d8e11d4d12103fe07c3ae84b52df9f AUX vnstatd.tmpfile 35 SHA256 91c9577f36c7f7ec32bb2963035a6ac49e7556ac6adc41564c033db8889b669e SHA512 e13b52e3c4fe8743074ab2704b6a6cbe0c855589fe19e05bba98f0193473437f350dfdc9675689172c54ed83491d9caef0cbb842f6c2533b98366cd78a4f0bac WHIRLPOOL dd6b74ff518ba3b652b3db0519bb45a370c50341ba5e1c8f37b01c2a5dc03341dffda2a88e389e66f6d620fa90a63f6ddf5e05c474d92d7644be156312989cda DIST vnstat-1.17.tar.gz 238397 SHA256 18e4c53576ca9e1ef2f0e063a6d83b0c44e3b1cf008560d658745df5c9aa7971 SHA512 c9c119a89054dacdc15026c766a20d88336d7689dd4264530d0347fcc58f3cbfc806b271e0f83e76c3b4a31ab793a628ee7d7b696943da919ee4cd2fdb481cc3 WHIRLPOOL 38f64c6eadf7bbfcc1cd6cc3d8f8ea3da4846dd64caf242628ce9d0e6f9b8f565dff9d31ecd1633b3a0a8b5e7dcd4545f1adeafeb4f42547ad87be77317622e3 -EBUILD vnstat-1.17-r1.ebuild 3245 SHA256 eef8bbf28b4d7b375d1c1bc7641c3030905d1af52eda262b511404919bc7a2e9 SHA512 e057cc84373e4c60fe84e97836a066067b54ce13409f3eb83033fcd3f73dc7186276a00b89793602dbfc68d9a5dfa0cf18ba4619dcb6bd47a1bdf14b9a8bd6f7 WHIRLPOOL 2a0d5e64c8c23db5df2b119f5b797995cb4577c1ca6233aad80809019887046ecf5ccccd51fd1470b08753db73ca56629c115ac4f81d1571fec3cdeb3821229c +EBUILD vnstat-1.17-r2.ebuild 1472 SHA256 35e2fac6008e530c4d02b9247ad909b02ccfbca81c11a2a899fad60cc8eef92e SHA512 194cf7b43dd74ba43844827ae20f57853bbbaab16808a3ce1f6911bd78f3d5d5a684b884d07794464c1e04afd0048363d0b3a07f12f8575a8fdaebb998b1e2b2 WHIRLPOOL bef4f21c7236efc316bfa46b5d58b54f8a7fc0298a02933668a3410a3b9edc240ed0a26b5f3c72df037d5a49f1cdbea249ab98ea2764984fed1207cad3a51652 EBUILD vnstat-1.17.ebuild 1430 SHA256 d05f7cede84c40a709d44a69e1717fb1d9a801df75ce95a51f6ec144aa58a8d8 SHA512 14d709e9ba19b7707d62fd5a82dc483f50b76efa884015a14600dd1489132a1c0a687444b802bbd917252acbfa84c291210cd2078778a16796d0bacb576b360d WHIRLPOOL 1bab57fa5b8b832d7277c4b05820af2898b66f9c5b4617ebcbdd52049020e87344f5e78c44756571ae1bc2201fda0a0fa36dbb9ce6078e4dd8aeaee1080d109c MISC ChangeLog 4350 SHA256 8dc324d38ef67a70ae4206f377deed192838d9685f91f11e4faf44045ae48dd4 SHA512 cef200253f77a3059ed18d1630da13c5f33aad335d2399d0fc8e94f687643a983e02fd749480324f77ba0d905e95196ffb73e3d238d1d0436b5b75fa05f30d19 WHIRLPOOL 3a3cf0f596faa146a4127436274dbaec11a604ed129cd95709027701c0b41827012a2db7564b0d1812e1bf726aa47c437c374e245ce0386e6277677cea15eb4c MISC ChangeLog-2015 9786 SHA256 db76c2eba2b1cd31b5afd4096dd5e15479842d0dc2835c22b4b6c70d7be0f0c5 SHA512 483b71d6778421520e2696c2ed0e2efc480a40f7f4a36ea0aeaa6fe02b386393c4805f551079e1d304eb73d1c1a443248b6b3449dba7e6734eb0ea54fbdd93bf WHIRLPOOL f721d1991070b8dc468a8ca6d6692b049d8e2ed78ae3100ab0dcc67246c3a005f9cbe2016bc8c45015a92d6d9393070d7f9cf30b0eefbedcebbcc9d6731be09e 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 000000000000..b939e7c04351 --- /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-run.patch b/net-analyzer/vnstat/files/vnstat-1.17-run.patch new file mode 100644 index 000000000000..e3b514d0c6b6 --- /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-r1.ebuild deleted file mode 100644 index 0c24c6dc6014..000000000000 --- a/net-analyzer/vnstat/vnstat-1.17-r1.ebuild +++ /dev/null @@ -1,123 +0,0 @@ -# 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 /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 '') -} - -src_install() { - use gd && dobin vnstati - dobin vnstat vnstatd - - exeinto /usr/share/${PN} - newexe "${FILESDIR}"/vnstat.cron-r1 vnstat.cron - - insinto /etc - doins cfg/vnstat.conf - fowners root:vnstat /etc/vnstat.conf - - keepdir /var/lib/vnstat - fowners vnstat:vnstat /var/lib/vnstat - - newconfd "${FILESDIR}"/vnstatd.confd-r1 vnstatd - newinitd "${FILESDIR}"/vnstatd.initd-r2 vnstatd - - systemd_newunit "${FILESDIR}"/vnstatd.systemd vnstatd.service - systemd_newtmpfilesd "${FILESDIR}"/vnstatd.tmpfile vnstatd.conf - - use gd && doman man/vnstati.1 - doman man/vnstat.1 man/vnstatd.1 - - newdoc INSTALL README.setup - dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi -} - -pkg_postinst() { - local _v - for _v in ${REPLACING_VERSIONS}; do - if ! version_is_at_least 1.17-r1 ${_v}; then - # This is an upgrade - elog "" - elog "Beginning with ${PN}-1.17-r1, we no longer install and use the cron job" - elog "per default to update vnStat databases because you will lose some traffic" - elog "if your interface transfers more than ~4GB in the time between two cron" - elog "runs". - elog "" - elog "Please make sure that the vnstatd service is enabled if you want to" - elog "continue monitoring your traffic." - - # Show this elog only once - break - fi - done - - if [[ -z "${REPLACING_VERSIONS}" ]]; then - # This is a new installation - - elog - elog "Repeat the following command for every interface you" - elog "wish to monitor (replace eth0):" - elog " vnstat -u -i eth0" - elog "and set correct permissions after that, e.g." - elog " chown -R vnstat:vnstat /var/lib/vnstat" - elog - elog "It is highly recommended to use the included vnstatd to update your" - elog "vnStat databases." - elog - elog "If you want to use the old cron way to update your vnStat databases," - elog "you have to install the cron job manually:" - elog "" - elog " cp /usr/share/${PN}/vnstat.cron /etc/cron.hourly/vnstat" - elog "" - elog "Note: if an interface transfers more than ~4GB in" - elog "the time between cron runs, you may miss traffic." - elog "That's why using vnstatd instead of the cronjob is" - elog "the recommended way to update your vnStat databases." - fi -} diff --git a/net-analyzer/vnstat/vnstat-1.17-r2.ebuild b/net-analyzer/vnstat/vnstat-1.17-r2.ebuild new file mode 100644 index 000000000000..88ba28fdb0e4 --- /dev/null +++ b/net-analyzer/vnstat/vnstat-1.17-r2.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit systemd user + +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 ) +" +PATCHES=( + "${FILESDIR}"/${PN}-1.17-conf.patch + "${FILESDIR}"/${PN}-1.17-run.patch +) + +pkg_setup() { + enewgroup vnstat + enewuser vnstat -1 -1 /var/lib/vnstat vnstat +} + +src_compile() { + emake ${PN} ${PN}d $(usex gd ${PN}i '') +} + +src_install() { + use gd && dobin vnstati + dobin vnstat vnstatd + + exeinto /usr/share/${PN} + newexe "${FILESDIR}"/vnstat.cron-r1 vnstat.cron + + insinto /etc + doins cfg/vnstat.conf + fowners root:vnstat /etc/vnstat.conf + + keepdir /var/lib/vnstat + fowners vnstat:vnstat /var/lib/vnstat + + newconfd "${FILESDIR}"/vnstatd.confd-r1 vnstatd + newinitd "${FILESDIR}"/vnstatd.initd-r2 vnstatd + + systemd_newunit "${FILESDIR}"/vnstatd.systemd vnstatd.service + systemd_newtmpfilesd "${FILESDIR}"/vnstatd.tmpfile vnstatd.conf + + use gd && doman man/vnstati.1 + doman man/vnstat.1 man/vnstatd.1 + + newdoc INSTALL README.setup + dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi +} |