commit: 3901be72186d7e9cd269179eb915145d33e1e805 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> AuthorDate: Fri Oct 13 18:00:18 2017 +0000 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> CommitDate: Fri Oct 13 18:00:18 2017 +0000 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 00000000000..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..00000000000 --- 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", &limit); - 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 00000000000..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 '') }