summaryrefslogtreecommitdiff
path: root/net-analyzer/rrdtool
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2013-12-02 22:24:48 +0100
committerBertrand Jacquin <beber@meleeweb.net>2013-12-02 22:26:50 +0100
commitd457637474aa99202962f2ad423086c8667df548 (patch)
tree42d69a5c35eae2b1ff2c3756ef97cffb73bb961b /net-analyzer/rrdtool
parentmetadata: refresh cache (diff)
downloadportage-d457637474aa99202962f2ad423086c8667df548.tar.xz
net-analyzer/rrdtool: Add a few bunch of patchs from upstream
Package-Manager: portage-2.2.7
Diffstat (limited to 'net-analyzer/rrdtool')
-rw-r--r--net-analyzer/rrdtool/ChangeLog13
-rw-r--r--net-analyzer/rrdtool/Manifest14
-rw-r--r--net-analyzer/rrdtool/files/1.4.8-Add-prototype-for-bad_format_imginfo.patch33
-rw-r--r--net-analyzer/rrdtool/files/1.4.8-Added-imginfo-format-check.patch88
-rw-r--r--net-analyzer/rrdtool/files/1.4.8-Allow-empty-imginfo-string-format.patch45
-rw-r--r--net-analyzer/rrdtool/files/1.4.8-Fix-json-output-when-printing-infinity-values.patch31
-rw-r--r--net-analyzer/rrdtool/files/1.4.8-Fix-json-output-when-printing-legend-entries.patch27
-rw-r--r--net-analyzer/rrdtool/files/1.4.8-fix-a-bunch-of-json-syntax-issues-issue-380.patch25
-rw-r--r--net-analyzer/rrdtool/files/rrdcached.confd8
-rw-r--r--net-analyzer/rrdtool/files/rrdcached.init14
-rw-r--r--net-analyzer/rrdtool/files/rrdtool-1.4.5-automake-1.11.2.patch27
-rw-r--r--net-analyzer/rrdtool/files/rrdtool-1.4.7-configure.ac.patch22
-rw-r--r--net-analyzer/rrdtool/metadata.xml10
-rw-r--r--net-analyzer/rrdtool/rrdtool-1.4.8.ebuild162
14 files changed, 519 insertions, 0 deletions
diff --git a/net-analyzer/rrdtool/ChangeLog b/net-analyzer/rrdtool/ChangeLog
new file mode 100644
index 00000000..8a897eca
--- /dev/null
+++ b/net-analyzer/rrdtool/ChangeLog
@@ -0,0 +1,13 @@
+*rrdtool-1.4.8 (02 Dec 2013)
+
+ 02 Dec 2013; Bertrand Jacquin <beber@meleeweb.net>
+ +files/1.4.8-Add-prototype-for-bad_format_imginfo.patch,
+ +files/1.4.8-Added-imginfo-format-check.patch,
+ +files/1.4.8-Allow-empty-imginfo-string-format.patch,
+ +files/1.4.8-Fix-json-output-when-printing-infinity-values.patch,
+ +files/1.4.8-Fix-json-output-when-printing-legend-entries.patch,
+ +files/1.4.8-fix-a-bunch-of-json-syntax-issues-issue-380.patch,
+ +files/rrdcached.confd, +files/rrdcached.init,
+ +files/rrdtool-1.4.5-automake-1.11.2.patch,
+ +files/rrdtool-1.4.7-configure.ac.patch, +metadata.xml, +rrdtool-1.4.8.ebuild:
+ net-analyzer/rrdtool: Add a few bunch of patchs from upstream
diff --git a/net-analyzer/rrdtool/Manifest b/net-analyzer/rrdtool/Manifest
new file mode 100644
index 00000000..c97372a6
--- /dev/null
+++ b/net-analyzer/rrdtool/Manifest
@@ -0,0 +1,14 @@
+AUX 1.4.8-Add-prototype-for-bad_format_imginfo.patch 1054 SHA256 2e45ce6be78a2064ebd29d70a582656695141e349bd3c390f48ef7289ad5ce1e WHIRLPOOL 3f0720db86325ac2e0c001b6efd9663ff7b45ab76c92e1fbc698b0a79a1eb96c61a230fefff7ca11603a96bf757eddf2fb42767c8bf5b5fe10848135d5af6530
+AUX 1.4.8-Added-imginfo-format-check.patch 2339 SHA256 86b052119406b884b0c688a9b0b015c3c8476ff786808ffa2e77185eb093b8b0 WHIRLPOOL 0d16f5c4eee89712123fef6683bf170d419746384161309ca21c14b982533c8ef08df05d544fbfdf13009e34d9bb5f7ed88c6e9a13107b1eca4182fd63a8f739
+AUX 1.4.8-Allow-empty-imginfo-string-format.patch 1300 SHA256 119bcee22413c0dee8e815187684f5c6998ef3fb60a7ceaeae148a2f951150b6 WHIRLPOOL fab7448a2d38f85f868768d5c6e3bcdf1395bafd55775bceb6f2fbadddc421eb8f2dad35bf93a1b3e9de081bddf04d91bd65aa2841a5e5fc6117a048d2a833f4
+AUX 1.4.8-Fix-json-output-when-printing-infinity-values.patch 1127 SHA256 0a96d6c62d0a879fb0ff8e498028d0f64b9f987bfc4c106f66facd2470fe9ff7 WHIRLPOOL 1cc7acb3af2a5fada0e21ccb6b8ea2535aebcee91c02ceb934ccffdad8c0cb195326803ef12dd873ac9b9e4b0ade76b7c55042769f6c3a9c12f77bb2e0a1cb7b
+AUX 1.4.8-Fix-json-output-when-printing-legend-entries.patch 893 SHA256 e843c1bd3ae80eabc96c335766601ba60e2829bc8df784fd5c2ed19f3efb8686 WHIRLPOOL 2e82f2f533218b580b562b24630ea3e56cbb90738eba2f21643aa4fa6a1ddabeb81600a269f4a0d54f887b94564250c689baeae06d3affab11c3dd8f0efb072a
+AUX 1.4.8-fix-a-bunch-of-json-syntax-issues-issue-380.patch 727 SHA256 cdf476991152c89fb9c616ad450e767f4636716b26c30fa980c476dcd95fd2d1 WHIRLPOOL 2bf33ba21607e387294b299d6a2d57635eeb3ad55f55da62820ca798c1f347ee41a09167b6a63112e9a1ab9a719238656d6982d6628c02bd9b79ee0dc6efd7f3
+AUX rrdcached.confd 150 SHA256 f544145d142ab85f5efa578c24ab6b813c4a236af2b3ddc51d5fb2cd847cf976 WHIRLPOOL af0317711dfd276e8047dbf285125104931a9ea696d8b73e54d41bbce7d1d7c08da0d71564346a95b485171d4990005b2f944be227962aed44b332807f300838
+AUX rrdcached.init 449 SHA256 063798427765d08d2c3592480a7a4a480a3efc0d04459f85448648dfae1f9653 WHIRLPOOL 873a708d6429fb26178e61a97b31d94352ec29d6d35882734cd7428cdc1635e7abb0e8893b5549254cd63a2ee6c7af3456ec7ef94794b684906f33f28e0dd0be
+AUX rrdtool-1.4.5-automake-1.11.2.patch 857 SHA256 d72b5b9f7713832fa946f2310938f8df14b980548f789a4e629951cc4040b3ef WHIRLPOOL 46a707e5aba8f7577a8d9cd40fa96886209a5f55ce3919aae9f0fd9b5209ffefb6ef103ce54155b8de2cf7fdca92a86c1bddf13f6574941aabab90e917ed1bc9
+AUX rrdtool-1.4.7-configure.ac.patch 492 SHA256 00ac12cee29a579532cfa82d3bba88588f4cc938667801743c40097dd38f73e5 WHIRLPOOL f453a9ae54853a9d2546edc6394e71eae2c28ca77c9751b8d5add5495360c20cd5d70046d5a9a9122ec5979cfba238fe799a965814399f51588758ed5fe37b6b
+DIST rrdtool-1.4.8.tar.gz 1379482 SHA256 de95b9f5aa488b0683600aad5a07c316f8d98cbe8d00aa0a1c87e2b2ef89f3d6 WHIRLPOOL f3926aed715a80c8d8287b057c39bbe614d81ebf9f24d1e285a9a438594d5c4c66b59934cc7c6be0550f0f729f319b01a46efc32ccf0b412563c43cf74a21564
+EBUILD rrdtool-1.4.8.ebuild 4638 SHA256 6982d775a31fc95ef657f44d13f2eb8f6f5bf606d336cdb96d6d1a23fb1791cb WHIRLPOOL de3afe9e77631bca19834c1034f72c9f0ad6053c17f59e7468f7c040692413b59134bbe7b68752294400f38e03752e42ab612edad8609bd1a31914348303d6da
+MISC ChangeLog 688 SHA256 ee7b4db17a553ae6f4c5cc53d05efa8c9852b0be8f6a1dad04af07bdeaa2695d WHIRLPOOL c7565d3e24da5424b9c3fd03ebb801cfe1965fea0961eb21a44ec4192892ec5c96599393a81bd28dbb4a84e4cd3964b205d1077eca8023270e36e95b1a7e59bf
+MISC metadata.xml 382 SHA256 61ecf5c79b1a7801d054184a5b79c9ecfbe89d3633b8eb8f29e2297ef4f201ab WHIRLPOOL b34ad3e79ae530ac2ef811e561cdb5a0666eb873a575c4aed970daf330be5ab6490aa12cc15dc13c53387c6c3530ccd572e1abb4a7a0cf351c5c77136dc38f8d
diff --git a/net-analyzer/rrdtool/files/1.4.8-Add-prototype-for-bad_format_imginfo.patch b/net-analyzer/rrdtool/files/1.4.8-Add-prototype-for-bad_format_imginfo.patch
new file mode 100644
index 00000000..6f8015f2
--- /dev/null
+++ b/net-analyzer/rrdtool/files/1.4.8-Add-prototype-for-bad_format_imginfo.patch
@@ -0,0 +1,33 @@
+From 5d5616019cfc25e2ab08a14cc475628addcb5106 Mon Sep 17 00:00:00 2001
+From: Julien Thomas <jthomas@exosec.fr>
+Date: Tue, 25 Jun 2013 13:11:27 +0200
+Subject: [PATCH] Add prototype for bad_format_imginfo
+
+This patch solve implicit declaration of function 'bad_format_imginfo'
+warning introduced by commit 37d3050 "Added imginfo format check".
+
+rrd_graph.c: In function 'rrd_graph_v':
+rrd_graph.c:4025: warning: implicit declaration of function 'bad_format_imginfo'
+rrd_graph.c:4025: warning: nested extern declaration of 'bad_format_imginfo'
+rrd_graph.c: At top level:
+rrd_graph.c:4836: warning: no previous prototype for 'bad_format_imginfo'
+---
+ src/rrd_graph.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/rrd_graph.h b/src/rrd_graph.h
+index 397c5b2..b97a742 100644
+--- a/src/rrd_graph.h
++++ b/src/rrd_graph.h
+@@ -452,6 +452,8 @@ int rrd_graph_color(
+ int);
+ int bad_format(
+ char *);
++int bad_format_imginfo(
++ char *);
+ int vdef_parse(
+ struct graph_desc_t *,
+ const char *const);
+--
+1.8.3.2
+
diff --git a/net-analyzer/rrdtool/files/1.4.8-Added-imginfo-format-check.patch b/net-analyzer/rrdtool/files/1.4.8-Added-imginfo-format-check.patch
new file mode 100644
index 00000000..23182113
--- /dev/null
+++ b/net-analyzer/rrdtool/files/1.4.8-Added-imginfo-format-check.patch
@@ -0,0 +1,88 @@
+From f23edd9010b2331a2047cab9d1c7ae6c966564f4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
+Date: Mon, 3 Jun 2013 17:06:26 +0200
+Subject: [PATCH] Added imginfo format check
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Resolves: http://bugzilla.redhat.com/show_bug.cgi?id=969296
+(CVE-2013-2131)
+
+Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
+---
+ src/rrd_graph.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 51 insertions(+)
+
+diff --git a/src/rrd_graph.c b/src/rrd_graph.c
+index d783a35..223063b 100644
+--- a/src/rrd_graph.c
++++ b/src/rrd_graph.c
+@@ -4022,6 +4022,12 @@ rrd_info_t *rrd_graph_v(
+ char *path;
+ char *filename;
+
++ if (bad_format_imginfo(im.imginfo)) {
++ rrd_info_free(im.grinfo);
++ im_free(&im);
++ rrd_set_error("bad format for imginfo");
++ return NULL;
++ }
+ path = strdup(im.graphfile);
+ filename = basename(path);
+ info.u_str =
+@@ -4827,6 +4833,51 @@ int bad_format(
+ }
+
+
++int bad_format_imginfo(
++ char *fmt)
++{
++ char *ptr;
++ int n = 0;
++
++ ptr = fmt;
++ while (*ptr != '\0')
++ if (*ptr++ == '%') {
++
++ /* line cannot end with percent char */
++ if (*ptr == '\0')
++ return 1;
++ /* '%%' is allowed */
++ if (*ptr == '%')
++ ptr++;
++ /* '%s', '%S' are allowed */
++ else if (*ptr == 's' || *ptr == 'S') {
++ n = 1;
++ ptr++;
++ }
++
++ /* or else '% 4lu' and such are allowed */
++ else {
++ /* optional padding character */
++ if (*ptr == ' ')
++ ptr++;
++ /* This should take care of 'm' */
++ while (*ptr >= '0' && *ptr <= '9')
++ ptr++;
++ /* 'lu' must follow here */
++ if (*ptr++ != 'l')
++ return 1;
++ if (*ptr == 'u')
++ ptr++;
++ else
++ return 1;
++ n++;
++ }
++ }
++
++ return (n != 3);
++}
++
++
+ int vdef_parse(
+ struct graph_desc_t
+ *gdes,
+--
+1.8.3.2
+
diff --git a/net-analyzer/rrdtool/files/1.4.8-Allow-empty-imginfo-string-format.patch b/net-analyzer/rrdtool/files/1.4.8-Allow-empty-imginfo-string-format.patch
new file mode 100644
index 00000000..b90e02f7
--- /dev/null
+++ b/net-analyzer/rrdtool/files/1.4.8-Allow-empty-imginfo-string-format.patch
@@ -0,0 +1,45 @@
+From c6145ebf927bb4be899b71df630522d0cfdde6ba Mon Sep 17 00:00:00 2001
+From: Julien Thomas <jthomas@exosec.fr>
+Date: Tue, 25 Jun 2013 13:22:40 +0200
+Subject: [PATCH] Allow empty imginfo string format
+
+Commit 37d3050 "Added imginfo format check" breaks -f "" which used
+to be very usefull to print data as text format on stdout. Allowing
+an empty -f was particularly interesting because there was no
+<width>x<height> printed out.
+
+Before :
+
+[root@nagios-2b ~]# rrdtool graph /dev/null -f "" --start -1d \
+ DEF:d=/var/lib/rrd/nagios-2b/load.rrd:load5:AVERAGE \
+ VDEF:v=d,AVERAGE \
+ PRINT:v:%.6lf
+5.284605
+
+After :
+
+[root@nagios-2b ~]# rrdtool graph /dev/null -f "" --start -1d \
+ DEF:d=/var/lib/rrd/nagios-2b/load.rrd:load5:AVERAGE \
+ VDEF:v=d,AVERAGE \
+ PRINT:v:%.6lf
+ERROR: bad format for imginfo
+---
+ src/rrd_graph.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/rrd_graph.c b/src/rrd_graph.c
+index e714e4f..4d91793 100644
+--- a/src/rrd_graph.c
++++ b/src/rrd_graph.c
+@@ -4139,7 +4139,7 @@ rrd_info_t *rrd_graph_v(
+ ** Also, if needed, print a line with information about the image.
+ */
+
+- if (im.imginfo) {
++ if (im.imginfo && *im.imginfo) {
+ rrd_infoval_t info;
+ char *path;
+ char *filename;
+--
+1.8.3.2
+
diff --git a/net-analyzer/rrdtool/files/1.4.8-Fix-json-output-when-printing-infinity-values.patch b/net-analyzer/rrdtool/files/1.4.8-Fix-json-output-when-printing-infinity-values.patch
new file mode 100644
index 00000000..1c0920c9
--- /dev/null
+++ b/net-analyzer/rrdtool/files/1.4.8-Fix-json-output-when-printing-infinity-values.patch
@@ -0,0 +1,31 @@
+From d43be0938c2a2fbc1499b0d0fa5e8680b2d07a19 Mon Sep 17 00:00:00 2001
+From: Julien Thomas <jthomas@exosec.fr>
+Date: Wed, 20 Nov 2013 15:48:06 +0100
+Subject: [PATCH] Fix json output when printing infinity values
+
+The printf of a rrd_value_t variable can output inf in case of an
+infinity value. That inf value is not JSON valid, nor are Infinity,
+NaN, Number.NEGATIVE_INFINITY or Number.POSITIVE_INFINITY.
+
+This commit adds a test for infinity values by using isinf() and
+outputs a null in such case.
+---
+ src/rrd_tool.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/rrd_tool.c b/src/rrd_tool.c
+index 57e22ce..3002d38 100644
+--- a/src/rrd_tool.c
++++ b/src/rrd_tool.c
+@@ -804,7 +804,7 @@ int HandleInputLine(
+ rrd_value_t newval = DNAN;
+ newval = *ptr;
+ if (json){
+- if (isnan(newval)){
++ if (isnan(newval) || isinf(newval)){
+ printf("null");
+ } else {
+ printf("%0.10e",newval);
+--
+1.8.3.2
+
diff --git a/net-analyzer/rrdtool/files/1.4.8-Fix-json-output-when-printing-legend-entries.patch b/net-analyzer/rrdtool/files/1.4.8-Fix-json-output-when-printing-legend-entries.patch
new file mode 100644
index 00000000..628994f1
--- /dev/null
+++ b/net-analyzer/rrdtool/files/1.4.8-Fix-json-output-when-printing-legend-entries.patch
@@ -0,0 +1,27 @@
+From ebaf3b1d197a17a20d00960508af80db5fb06401 Mon Sep 17 00:00:00 2001
+From: Julien Thomas <jthomas@exosec.fr>
+Date: Fri, 8 Nov 2013 01:07:16 +0100
+Subject: [PATCH] Fix json output when printing legend entries
+
+Branch 1.4 is missing this patch in order to produce valid json output.
+This is related to issue #380 reported by apfeiffe.
+---
+ src/rrd_tool.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/rrd_tool.c b/src/rrd_tool.c
+index ddcdccc..57e22ce 100644
+--- a/src/rrd_tool.c
++++ b/src/rrd_tool.c
+@@ -766,7 +766,7 @@ int HandleInputLine(
+ char *entry = NULL;
+ entry = legend_v[j];
+ if (json){
+- printf(" '%s'", entry);
++ printf(" \"%s\"", entry);
+ if (j < col_cnt -1){
+ printf(",");
+ }
+--
+1.8.3.2
+
diff --git a/net-analyzer/rrdtool/files/1.4.8-fix-a-bunch-of-json-syntax-issues-issue-380.patch b/net-analyzer/rrdtool/files/1.4.8-fix-a-bunch-of-json-syntax-issues-issue-380.patch
new file mode 100644
index 00000000..2543ce0a
--- /dev/null
+++ b/net-analyzer/rrdtool/files/1.4.8-fix-a-bunch-of-json-syntax-issues-issue-380.patch
@@ -0,0 +1,25 @@
+From d7374efc3b39679828138073bf1330752a560dc5 Mon Sep 17 00:00:00 2001
+From: Tobias Oetiker <tobi@oetiker.ch>
+Date: Mon, 19 Aug 2013 16:48:11 +0200
+Subject: [PATCH] fix a bunch of json syntax issues (issue 380)
+
+---
+ src/rrd_tool.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/rrd_tool.c b/src/rrd_tool.c
+index ea80d18..ddcdccc 100644
+--- a/src/rrd_tool.c
++++ b/src/rrd_tool.c
+@@ -737,7 +737,7 @@ int HandleInputLine(
+ printf(" <%s>\n", META_TAG);
+ }
+ else {
+- printf("{ about: 'RRDtool xport JSON output',\n meta: {\n");
++ printf("{ \"about\": \"RRDtool xport JSON output\",\n \"meta\": {\n");
+ }
+
+
+--
+1.8.3.2
+
diff --git a/net-analyzer/rrdtool/files/rrdcached.confd b/net-analyzer/rrdtool/files/rrdcached.confd
new file mode 100644
index 00000000..0463a792
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdcached.confd
@@ -0,0 +1,8 @@
+RRCACHE_ARGS="-l unix:/var/run/rrdcached.sock -j /var/lib/rrdcached/journal/ -F -b /var/lib/rrdcached/db/ -B"
+
+USER=""
+GROUP=""
+
+MODE=""
+
+MAXWAIT=30
diff --git a/net-analyzer/rrdtool/files/rrdcached.init b/net-analyzer/rrdtool/files/rrdcached.init
new file mode 100644
index 00000000..90f6248a
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdcached.init
@@ -0,0 +1,14 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/rrdtool/files/rrdcached.init,v 1.1 2012/09/06 16:50:41 maksbotan Exp $
+
+command="/usr/bin/rrdcached"
+command_args="${RRCACHE_ARGS} -p /run/rrdcached.pid"
+start_stop_daemon_args="--quiet"
+description="RRDtool data caching daemon"
+
+depend() {
+ need localmount net
+ use logger
+}
diff --git a/net-analyzer/rrdtool/files/rrdtool-1.4.5-automake-1.11.2.patch b/net-analyzer/rrdtool/files/rrdtool-1.4.5-automake-1.11.2.patch
new file mode 100644
index 00000000..64206f44
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdtool-1.4.5-automake-1.11.2.patch
@@ -0,0 +1,27 @@
+Install dir:
+ /usr/$(get_libdir)/rrdtool/ifOctets.tcl
+ /usr/$(get_libdir)/rrdtool/pkgIndex.tcl
+
+Due to the following change, pkglib_{DATA,SCRIPTS} is invalid:
+ http://git.savannah.gnu.org/cgit/automake.git/commit/?id=9ca632642b006ac6b0fc4ce0ae5b34023faa8cbf
+
+---
+ bindings/tcl/Makefile.am | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/bindings/tcl/Makefile.am b/bindings/tcl/Makefile.am
+index c0e8b0f..b7205e7 100644
+--- a/bindings/tcl/Makefile.am
++++ b/bindings/tcl/Makefile.am
+@@ -27,8 +27,9 @@ tclpkgdir = @TCL_PACKAGE_DIR@
+ tclpkg_DATA = pkgIndex.tcl
+ tclpkg_SCRIPTS = ifOctets.tcl
+ else
+-pkglib_DATA = pkgIndex.tcl
+-pkglib_SCRIPTS = ifOctets.tcl
++tclpkgdir = $(libdir)/@PACKAGE@
++tclpkg_DATA = pkgIndex.tcl
++tclpkg_SCRIPTS = ifOctets.tcl
+ endif
+
+ # Automake doen't like `tclrrd$(VERSION)$(TCL_SHLIB_SUFFIX)' as
diff --git a/net-analyzer/rrdtool/files/rrdtool-1.4.7-configure.ac.patch b/net-analyzer/rrdtool/files/rrdtool-1.4.7-configure.ac.patch
new file mode 100644
index 00000000..ad97bec2
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdtool-1.4.7-configure.ac.patch
@@ -0,0 +1,22 @@
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -148,7 +148,7 @@
+ AC_PROG_CPP
+ AC_PROG_CC
+ AM_PROG_CC_C_O
+-AC_PROG_LIBTOOL
++LT_INIT
+
+ dnl Try to detect/use GNU features
+ CFLAGS="$CFLAGS -D_GNU_SOURCE"
+@@ -204,9 +204,6 @@
+ AC_CHECK_FUNC(acos, , AC_CHECK_LIB(m, acos))
+
+
+-dnl add pic flag in any case this makes sure all our code is relocatable
+-eval `./libtool --config | grep pic_flag=`
+-CFLAGS="$CFLAGS $pic_flag"
+
+
+ dnl Checks for library functions.
diff --git a/net-analyzer/rrdtool/metadata.xml b/net-analyzer/rrdtool/metadata.xml
new file mode 100644
index 00000000..36e53733
--- /dev/null
+++ b/net-analyzer/rrdtool/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>A system to store and display time-series data</longdescription>
+ <use>
+ <flag name='rrdcgi'>Build rrdcgi support</flag>
+ <flag name='graph'>Enable support for graphing functions</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-analyzer/rrdtool/rrdtool-1.4.8.ebuild b/net-analyzer/rrdtool/rrdtool-1.4.8.ebuild
new file mode 100644
index 00000000..f8f30c65
--- /dev/null
+++ b/net-analyzer/rrdtool/rrdtool-1.4.8.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/rrdtool/rrdtool-1.4.8.ebuild,v 1.1 2013/08/01 15:14:59 jer Exp $
+
+EAPI="5"
+
+GENTOO_DEPEND_ON_PERL="no"
+PYTHON_COMPAT=( python2_7 )
+inherit eutils distutils-r1 flag-o-matic multilib perl-module autotools
+
+DESCRIPTION="A system to store and display time-series data"
+HOMEPAGE="http://oss.oetiker.ch/rrdtool/"
+SRC_URI="http://oss.oetiker.ch/rrdtool/pub/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="dbi doc +graph lua perl python ruby rrdcgi static-libs tcl tcpd"
+
+RDEPEND="
+ >=dev-libs/glib-2.28.7[static-libs(+)?]
+ >=dev-libs/libxml2-2.7.8[static-libs(+)?]
+ dbi? ( dev-db/libdbi[static-libs(+)?] )
+ graph? (
+ >=media-libs/libpng-1.5.10[static-libs(+)?]
+ >=x11-libs/cairo-1.10.2[svg,static-libs(+)?]
+ >=x11-libs/pango-1.28
+ )
+ lua? ( dev-lang/lua[deprecated] )
+ perl? ( dev-lang/perl )
+ python? ( ${PYTHON_DEPS} )
+ ruby? ( >=dev-lang/ruby-1.8.6_p287-r13 )
+ tcl? ( dev-lang/tcl )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ virtual/awk
+"
+
+python_compile() {
+ cd bindings/python || die 'can not enter to python bindings directory'
+ distutils-r1_python_compile
+}
+
+python_install() {
+ cd bindings/python || die 'can not enter to python bindings directory'
+ distutils-r1_python_install
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.4.7-configure.ac.patch
+
+ epatch "${FILESDIR}/${PV}-Added-imginfo-format-check.patch"
+ epatch "${FILESDIR}/${PV}-fix-a-bunch-of-json-syntax-issues-issue-380.patch"
+ epatch "${FILESDIR}/${PV}-Fix-json-output-when-printing-legend-entries.patch"
+ epatch "${FILESDIR}/${PV}-Fix-json-output-when-printing-infinity-values.patch"
+ epatch "${FILESDIR}/${PV}-Add-prototype-for-bad_format_imginfo.patch"
+ epatch "${FILESDIR}/${PV}-Allow-empty-imginfo-string-format.patch"
+
+ # bug 281694
+ # bug 456810
+ # no time to sleep
+ sed -i \
+ -e '/PERLLD/s:same as PERLCC:same-as-PERLCC:' \
+ -e 's|$LUA_CFLAGS|IGNORE_THIS_BAD_TEST|g' \
+ -e 's|^sleep 1$||g' \
+ configure.ac || die
+
+ # Python bindings are built/installed manually
+ sed -i \
+ -e '/^all-local:/s| @COMP_PYTHON@||' \
+ bindings/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags -ffast-math
+
+ export RRDDOCDIR=${EPREFIX}/usr/share/doc/${PF}
+
+ # to solve bug #260380
+ [[ ${CHOST} == *-solaris* ]] && append-flags -D__EXTENSIONS__
+
+ # Stub configure.ac
+ local myconf=()
+ if ! use tcpd; then
+ myconf+=( "--disable-libwrap" )
+ fi
+ if ! use dbi; then
+ myconf+=( "--disable-libdbi" )
+ fi
+
+ econf \
+ $(use_enable graph rrd_graph) \
+ $(use_enable lua lua-site-install) \
+ $(use_enable lua) \
+ $(use_enable perl perl-site-install) \
+ $(use_enable perl) \
+ $(use_enable python) \
+ $(use_enable rrdcgi) \
+ $(use_enable ruby ruby-site-install) \
+ $(use_enable ruby) \
+ $(use_enable static-libs static) \
+ $(use_enable tcl) \
+ $(use_with tcl tcllib "${EPREFIX}"/usr/$(get_libdir)) \
+ --with-perl-options=INSTALLDIRS=vendor \
+ ${myconf[@]}
+}
+
+src_compile() {
+ default
+
+ use python && distutils-r1_src_compile
+}
+
+src_install() {
+ default
+
+ if ! use doc ; then
+ rm -rf "${ED}"usr/share/doc/${PF}/{html,txt}
+ fi
+
+ if use !rrdcgi ; then
+ # uses rrdcgi, causes invalid shebang error in Prefix, useless
+ # without rrdcgi installed
+ rm -f "${ED}"usr/share/${PN}/examples/cgi-demo.cgi
+ fi
+
+ if use perl ; then
+ perl_delete_localpod
+ perl_delete_packlist
+ fi
+
+ use python && distutils-r1_src_install
+
+ dodoc CHANGES CONTRIBUTORS NEWS README THREADS TODO
+
+ find "${ED}"usr -name '*.la' -exec rm -f {} +
+
+ keepdir /var/lib/rrdcached/journal/
+ keepdir /var/lib/rrdcached/db/
+
+ newconfd "${FILESDIR}"/rrdcached.confd rrdcached
+ newinitd "${FILESDIR}"/rrdcached.init rrdcached
+}
+
+pkg_postinst() {
+ ewarn "Since version 1.3, rrdtool dump emits completely legal xml. Basically this"
+ ewarn "means that it contains an xml header and a DOCTYPE definition. Unfortunately"
+ ewarn "this causes older versions of rrdtool restore to be unhappy."
+ ewarn
+ ewarn "To restore a new dump with an old rrdtool restore version, either remove"
+ ewarn "the xml header and the doctype by hand (both on the first line of the dump)"
+ ewarn "or use rrdtool dump --no-header."
+ ewarn
+ ewarn ">=net-analyzer/rrdtool-1.3 does not have any default font bundled. Thus if"
+ ewarn ">you've upgraded from rrdtool-1.2.x and don't have any font installed to make"
+ ewarn ">lables visible, please, install some font, e.g. media-fonts/dejavu."
+}