From d457637474aa99202962f2ad423086c8667df548 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Mon, 2 Dec 2013 22:24:48 +0100 Subject: net-analyzer/rrdtool: Add a few bunch of patchs from upstream Package-Manager: portage-2.2.7 --- metadata/md5-cache/net-analyzer/rrdtool-1.4.8 | 14 ++ net-analyzer/rrdtool/ChangeLog | 13 ++ net-analyzer/rrdtool/Manifest | 14 ++ ....4.8-Add-prototype-for-bad_format_imginfo.patch | 33 +++++ .../files/1.4.8-Added-imginfo-format-check.patch | 88 +++++++++++ .../1.4.8-Allow-empty-imginfo-string-format.patch | 45 ++++++ ...json-output-when-printing-infinity-values.patch | 31 ++++ ...-json-output-when-printing-legend-entries.patch | 27 ++++ ...x-a-bunch-of-json-syntax-issues-issue-380.patch | 25 ++++ net-analyzer/rrdtool/files/rrdcached.confd | 8 + net-analyzer/rrdtool/files/rrdcached.init | 14 ++ .../files/rrdtool-1.4.5-automake-1.11.2.patch | 27 ++++ .../rrdtool/files/rrdtool-1.4.7-configure.ac.patch | 22 +++ net-analyzer/rrdtool/metadata.xml | 10 ++ net-analyzer/rrdtool/rrdtool-1.4.8.ebuild | 162 +++++++++++++++++++++ profiles/use.local.desc | 2 + 16 files changed, 535 insertions(+) create mode 100644 metadata/md5-cache/net-analyzer/rrdtool-1.4.8 create mode 100644 net-analyzer/rrdtool/ChangeLog create mode 100644 net-analyzer/rrdtool/Manifest create mode 100644 net-analyzer/rrdtool/files/1.4.8-Add-prototype-for-bad_format_imginfo.patch create mode 100644 net-analyzer/rrdtool/files/1.4.8-Added-imginfo-format-check.patch create mode 100644 net-analyzer/rrdtool/files/1.4.8-Allow-empty-imginfo-string-format.patch create mode 100644 net-analyzer/rrdtool/files/1.4.8-Fix-json-output-when-printing-infinity-values.patch create mode 100644 net-analyzer/rrdtool/files/1.4.8-Fix-json-output-when-printing-legend-entries.patch create mode 100644 net-analyzer/rrdtool/files/1.4.8-fix-a-bunch-of-json-syntax-issues-issue-380.patch create mode 100644 net-analyzer/rrdtool/files/rrdcached.confd create mode 100644 net-analyzer/rrdtool/files/rrdcached.init create mode 100644 net-analyzer/rrdtool/files/rrdtool-1.4.5-automake-1.11.2.patch create mode 100644 net-analyzer/rrdtool/files/rrdtool-1.4.7-configure.ac.patch create mode 100644 net-analyzer/rrdtool/metadata.xml create mode 100644 net-analyzer/rrdtool/rrdtool-1.4.8.ebuild diff --git a/metadata/md5-cache/net-analyzer/rrdtool-1.4.8 b/metadata/md5-cache/net-analyzer/rrdtool-1.4.8 new file mode 100644 index 00000000..e6e20add --- /dev/null +++ b/metadata/md5-cache/net-analyzer/rrdtool-1.4.8 @@ -0,0 +1,14 @@ +DEFINED_PHASES=compile configure install postinst prepare test unpack +DEPEND=>=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_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) dev-lang/python-exec:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] ) ruby? ( >=dev-lang/ruby-1.8.6_p287-r13 ) tcl? ( dev-lang/tcl ) tcpd? ( sys-apps/tcp-wrappers ) virtual/pkgconfig virtual/awk userland_GNU? ( >=sys-apps/coreutils-8.5 ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) dev-lang/python-exec:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] || ( >=sys-devel/automake-1.13:1.13 >=sys-devel/automake-1.14:1.14 ) >=sys-devel/autoconf-2.68 sys-devel/libtool +DESCRIPTION=A system to store and display time-series data +EAPI=5 +HOMEPAGE=http://oss.oetiker.ch/rrdtool/ +IUSE=dbi doc +graph lua perl python ruby rrdcgi static-libs tcl tcpd python_targets_python2_7 +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 +LICENSE=GPL-2 +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_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) dev-lang/python-exec:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] ) ruby? ( >=dev-lang/ruby-1.8.6_p287-r13 ) tcl? ( dev-lang/tcl ) tcpd? ( sys-apps/tcp-wrappers ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) dev-lang/python-exec:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] +REQUIRED_USE=|| ( python_targets_python2_7 ) +SLOT=0 +SRC_URI=http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.8.tar.gz +_eclasses_=autotools d491cbee372fe390ce066f901abdaaaf base ec46b36a6f6fd1d0b505a33e0b74e413 distutils-r1 6216c7baa73ce2ae738ea0466ffcd025 eutils 4878e7f88afc0ba0866ac112190b0fd4 flag-o-matic 65cef1287b9d62b1a0f180765d1e0c69 libtool 5932e418cf62147cad2d902718aacc56 multibuild 56d4120419072116417e8de1bd1040ff multilib 892e597faee02a5b94eb02ab512e7622 multiprocessing 67154e3c80516dc77f9f56956f5beebe perl-module d93571ca1c77e98760e5aa406388b02d python-r1 cd956d5a4bac2209a64d0f4851cc115d python-utils-r1 49ee0ca5e1019d8f256a23692dad2642 toolchain-funcs 51e6c948e72c43bcc8edc7544411c953 user d0a4d0735a6c0183d707ca919bd72f28 +_md5_=809b494bc259fb0be79e6354fab1da6c 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 + +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 +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?= +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 +--- + 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 +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 +x 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 +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 +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 +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 @@ + + + + netmon + A system to store and display time-series data + + Build rrdcgi support + Enable support for graphing functions + + 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." +} diff --git a/profiles/use.local.desc b/profiles/use.local.desc index 3bbc8a6a..65d6919f 100644 --- a/profiles/use.local.desc +++ b/profiles/use.local.desc @@ -79,6 +79,8 @@ media-sound/pulseaudio:webrtc-aec - Uses the webrtc.org AudioProcessing library media-sound/pulseaudio:xen - Builds a special paravirtualized module for running in a Xen guest. media-video/rtmpdump:gnutls - Use GnuTLS library instead of the default OpenSSL media-video/rtmpdump:polarssl - Use PolarSSL library instead of the default OpenSSL +net-analyzer/rrdtool:graph - Enable support for graphing functions +net-analyzer/rrdtool:rrdcgi - Build rrdcgi support net-dialup/freeradius-client:scp - Add service type hints derived from username prefix net-dialup/freeradius-client:shadow - Enable shadow password support net-misc/icmptx:client - Enable client support -- cgit v1.2.3