commit:     65b9e956aecf309c5b57b61699c3ee4e6180b439
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 12 15:36:12 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Tue Dec 12 15:36:29 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65b9e956

net-analyzer/nfdump: Fix USE=sflow. Install README.md by Hanno Boeck (bug 
#611998).

Package-Manager: Portage-2.3.18, Repoman-2.3.6

 .../nfdump/files/nfdump-1.6.16-DEVEL.patch         | 104 +++++++++++++++++++++
 ...fdump-1.6.15.ebuild => nfdump-1.6.15-r1.ebuild} |   4 +-
 ...fdump-1.6.16.ebuild => nfdump-1.6.16-r1.ebuild} |   3 +-
 3 files changed, 108 insertions(+), 3 deletions(-)

diff --git a/net-analyzer/nfdump/files/nfdump-1.6.16-DEVEL.patch 
b/net-analyzer/nfdump/files/nfdump-1.6.16-DEVEL.patch
new file mode 100644
index 00000000000..21aeb6f0e34
--- /dev/null
+++ b/net-analyzer/nfdump/files/nfdump-1.6.16-DEVEL.patch
@@ -0,0 +1,104 @@
+--- a/bin/flowtree.c
++++ b/bin/flowtree.c
+@@ -467,9 +467,8 @@ void Push_Node(NodeList_t *NodeList, struct FlowNode 
*node) {
+       NodeList->last = node;
+       NodeList->length++;
+ #ifdef DEVEL
+-      int proto = node->proto;
+       printf("pushed node 0x%llx proto: %u, length: %u first: %llx, last: 
%llx\n", 
+-              (unsigned long long)node, proto, NodeList->length, (unsigned 
long long)NodeList->list, (unsigned long long)NodeList->last);
++              (unsigned long long)node, node->proto, NodeList->length, 
(unsigned long long)NodeList->list, (unsigned long long)NodeList->last);
+       ListCheck(NodeList);
+ #endif
+       if ( NodeList->waiting ) {
+@@ -483,7 +482,6 @@ void Push_Node(NodeList_t *NodeList, struct FlowNode 
*node) {
+ 
+ struct FlowNode *Pop_Node(NodeList_t *NodeList, int *done) {
+ struct FlowNode *node;
+-int proto;
+ 
+       GetTreeLock(NodeList);
+     while ( NodeList->length == 0 && !*done ) {
+@@ -522,12 +520,11 @@ int proto;
+ 
+       node->left = NULL;
+       node->right = NULL;
+-      proto = node->proto;
+ 
+       NodeList->length--;
+ #ifdef DEVEL
+       printf("popped node 0x%llx proto: %u, length: %u first: %llx, last: 
%llx\n", 
+-              (unsigned long long)node, proto, NodeList->length, (unsigned 
long long)NodeList->list, (unsigned long long)NodeList->last);
++              (unsigned long long)node, node->proto, NodeList->length, 
(unsigned long long)NodeList->list, (unsigned long long)NodeList->last);
+ 
+       ListCheck(NodeList);
+ #endif
+--- a/bin/nfexpire.c
++++ b/bin/nfexpire.c
+@@ -212,12 +212,12 @@ int main( int argc, char **argv ) {
+ struct stat fstat;
+ int           c, err, maxsize_set, maxlife_set;
+ int                   do_rescan, do_expire, do_list, print_stat, 
do_update_param, print_books, is_profile, nfsen_format;
+-char          *maxsize_string, *lifetime_string, *datadir;
++char          *lifetime_string, *datadir;
+ uint64_t      maxsize, lifetime, low_water;
+ uint32_t      runtime;
+ channel_t     *channel, *current_channel;
+ 
+-      maxsize_string = lifetime_string = NULL;
++      lifetime_string = NULL;
+       datadir = NULL;
+       maxsize = lifetime = 0;
+       do_rescan               = 0;
+--- a/bin/nfstat.c
++++ b/bin/nfstat.c
+@@ -1670,7 +1670,7 @@ uint32_t                 maxindex, c;
+                                       else
+                                               printf("Top flows ordered by 
%s:\n", order_mode[order_index].string);
+                               }
+-                              if ( !record_header ) 
++                              if ( record_header ) 
+                                       printf("%s\n", record_header);
+                       }
+                       PrintSortedFlowcache(SortList, maxindex, topN, 0, 
print_record, tag, DESCENDING, extension_map_list);
+--- a/bin/sflow.c
++++ b/bin/sflow.c
+@@ -515,11 +515,17 @@ static inline void readCountersSample_v2v4(SFSample 
*sample, FlowSource_t *fs);
+ 
+ static inline void StoreSflowRecord(SFSample *sample, FlowSource_t *fs);
+ 
++extern int verbose;
++
+ #ifdef DEVEL
+ static inline char *printTag(uint32_t tag, char *buf, int bufLen);
+-#endif
+ 
+-extern int verbose;
++static inline char *printTag(uint32_t tag, char *buf, int bufLen) {
++    snprintf(buf, bufLen, "%u:%u", (tag >> 12), (tag & 0x00000FFF));
++    return buf;
++} // End of printTag
++
++#endif
+ 
+ 
+ /*_________________---------------------------__________________
+@@ -1410,15 +1416,11 @@ static inline uint32_t getAddress(SFSample *sample, 
SFLAddress *address) {
+ static inline void skipTLVRecord(SFSample *sample, uint32_t tag, uint32_t 
len, char *description) {
+ 
+ #ifdef DEVEL
+-static inline char *printTag(uint32_t tag, char *buf, int bufLen) {
+-      snprintf(buf, bufLen, "%u:%u", (tag >> 12), (tag & 0x00000FFF));
+-      return buf;
+-} // End of printTag
+-
+-char buf[51];
++      char buf[51];
++      snprintf(buf, 50, "%u:%u", (tag >> 12), (tag & 0x00000FFF));
++      printf("skipping unknown %s: 0x%x, %s len=%d\n", description, tag, buf, 
len);
+ #endif
+ 
+-      dbg_printf("skipping unknown %s: 0x%x, %s len=%d\n", description, tag, 
printTag(tag, buf, 50), len);
+       skipBytes(sample, len);
+ } // End of skipTLVRecord
+ 

diff --git a/net-analyzer/nfdump/nfdump-1.6.15.ebuild 
b/net-analyzer/nfdump/nfdump-1.6.15-r1.ebuild
similarity index 94%
rename from net-analyzer/nfdump/nfdump-1.6.15.ebuild
rename to net-analyzer/nfdump/nfdump-1.6.15-r1.ebuild
index baa417bf417..86fcde96ecd 100644
--- a/net-analyzer/nfdump/nfdump-1.6.15.ebuild
+++ b/net-analyzer/nfdump/nfdump-1.6.15-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -33,7 +33,7 @@ RDEPEND="
        dev-lang/perl
 "
 
-DOCS=( AUTHORS ChangeLog NEWS README )
+DOCS=( AUTHORS ChangeLog README.md )
 
 src_prepare() {
        eapply \

diff --git a/net-analyzer/nfdump/nfdump-1.6.16.ebuild 
b/net-analyzer/nfdump/nfdump-1.6.16-r1.ebuild
similarity index 94%
rename from net-analyzer/nfdump/nfdump-1.6.16.ebuild
rename to net-analyzer/nfdump/nfdump-1.6.16-r1.ebuild
index 4c9925d973e..f76dd9f58c5 100644
--- a/net-analyzer/nfdump/nfdump-1.6.16.ebuild
+++ b/net-analyzer/nfdump/nfdump-1.6.16-r1.ebuild
@@ -32,10 +32,11 @@ RDEPEND="
        ${COMMON_DEPEND}
        dev-lang/perl
 "
-DOCS=( AUTHORS ChangeLog NEWS README )
+DOCS=( AUTHORS ChangeLog README.md )
 PATCHES=(
        "${FILESDIR}"/${PN}-1.6.14-libft.patch
        "${FILESDIR}"/${PN}-1.6.16-libnfdump.patch
+       "${FILESDIR}"/${PN}-1.6.16-DEVEL.patch
 )
 
 src_prepare() {

Reply via email to