1 |
commit: 65b9e956aecf309c5b57b61699c3ee4e6180b439 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 12 15:36:12 2017 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 12 15:36:29 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65b9e956 |
7 |
|
8 |
net-analyzer/nfdump: Fix USE=sflow. Install README.md by Hanno Boeck (bug #611998). |
9 |
|
10 |
Package-Manager: Portage-2.3.18, Repoman-2.3.6 |
11 |
|
12 |
.../nfdump/files/nfdump-1.6.16-DEVEL.patch | 104 +++++++++++++++++++++ |
13 |
...fdump-1.6.15.ebuild => nfdump-1.6.15-r1.ebuild} | 4 +- |
14 |
...fdump-1.6.16.ebuild => nfdump-1.6.16-r1.ebuild} | 3 +- |
15 |
3 files changed, 108 insertions(+), 3 deletions(-) |
16 |
|
17 |
diff --git a/net-analyzer/nfdump/files/nfdump-1.6.16-DEVEL.patch b/net-analyzer/nfdump/files/nfdump-1.6.16-DEVEL.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..21aeb6f0e34 |
20 |
--- /dev/null |
21 |
+++ b/net-analyzer/nfdump/files/nfdump-1.6.16-DEVEL.patch |
22 |
@@ -0,0 +1,104 @@ |
23 |
+--- a/bin/flowtree.c |
24 |
++++ b/bin/flowtree.c |
25 |
+@@ -467,9 +467,8 @@ void Push_Node(NodeList_t *NodeList, struct FlowNode *node) { |
26 |
+ NodeList->last = node; |
27 |
+ NodeList->length++; |
28 |
+ #ifdef DEVEL |
29 |
+- int proto = node->proto; |
30 |
+ printf("pushed node 0x%llx proto: %u, length: %u first: %llx, last: %llx\n", |
31 |
+- (unsigned long long)node, proto, NodeList->length, (unsigned long long)NodeList->list, (unsigned long long)NodeList->last); |
32 |
++ (unsigned long long)node, node->proto, NodeList->length, (unsigned long long)NodeList->list, (unsigned long long)NodeList->last); |
33 |
+ ListCheck(NodeList); |
34 |
+ #endif |
35 |
+ if ( NodeList->waiting ) { |
36 |
+@@ -483,7 +482,6 @@ void Push_Node(NodeList_t *NodeList, struct FlowNode *node) { |
37 |
+ |
38 |
+ struct FlowNode *Pop_Node(NodeList_t *NodeList, int *done) { |
39 |
+ struct FlowNode *node; |
40 |
+-int proto; |
41 |
+ |
42 |
+ GetTreeLock(NodeList); |
43 |
+ while ( NodeList->length == 0 && !*done ) { |
44 |
+@@ -522,12 +520,11 @@ int proto; |
45 |
+ |
46 |
+ node->left = NULL; |
47 |
+ node->right = NULL; |
48 |
+- proto = node->proto; |
49 |
+ |
50 |
+ NodeList->length--; |
51 |
+ #ifdef DEVEL |
52 |
+ printf("popped node 0x%llx proto: %u, length: %u first: %llx, last: %llx\n", |
53 |
+- (unsigned long long)node, proto, NodeList->length, (unsigned long long)NodeList->list, (unsigned long long)NodeList->last); |
54 |
++ (unsigned long long)node, node->proto, NodeList->length, (unsigned long long)NodeList->list, (unsigned long long)NodeList->last); |
55 |
+ |
56 |
+ ListCheck(NodeList); |
57 |
+ #endif |
58 |
+--- a/bin/nfexpire.c |
59 |
++++ b/bin/nfexpire.c |
60 |
+@@ -212,12 +212,12 @@ int main( int argc, char **argv ) { |
61 |
+ struct stat fstat; |
62 |
+ int c, err, maxsize_set, maxlife_set; |
63 |
+ int do_rescan, do_expire, do_list, print_stat, do_update_param, print_books, is_profile, nfsen_format; |
64 |
+-char *maxsize_string, *lifetime_string, *datadir; |
65 |
++char *lifetime_string, *datadir; |
66 |
+ uint64_t maxsize, lifetime, low_water; |
67 |
+ uint32_t runtime; |
68 |
+ channel_t *channel, *current_channel; |
69 |
+ |
70 |
+- maxsize_string = lifetime_string = NULL; |
71 |
++ lifetime_string = NULL; |
72 |
+ datadir = NULL; |
73 |
+ maxsize = lifetime = 0; |
74 |
+ do_rescan = 0; |
75 |
+--- a/bin/nfstat.c |
76 |
++++ b/bin/nfstat.c |
77 |
+@@ -1670,7 +1670,7 @@ uint32_t maxindex, c; |
78 |
+ else |
79 |
+ printf("Top flows ordered by %s:\n", order_mode[order_index].string); |
80 |
+ } |
81 |
+- if ( !record_header ) |
82 |
++ if ( record_header ) |
83 |
+ printf("%s\n", record_header); |
84 |
+ } |
85 |
+ PrintSortedFlowcache(SortList, maxindex, topN, 0, print_record, tag, DESCENDING, extension_map_list); |
86 |
+--- a/bin/sflow.c |
87 |
++++ b/bin/sflow.c |
88 |
+@@ -515,11 +515,17 @@ static inline void readCountersSample_v2v4(SFSample *sample, FlowSource_t *fs); |
89 |
+ |
90 |
+ static inline void StoreSflowRecord(SFSample *sample, FlowSource_t *fs); |
91 |
+ |
92 |
++extern int verbose; |
93 |
++ |
94 |
+ #ifdef DEVEL |
95 |
+ static inline char *printTag(uint32_t tag, char *buf, int bufLen); |
96 |
+-#endif |
97 |
+ |
98 |
+-extern int verbose; |
99 |
++static inline char *printTag(uint32_t tag, char *buf, int bufLen) { |
100 |
++ snprintf(buf, bufLen, "%u:%u", (tag >> 12), (tag & 0x00000FFF)); |
101 |
++ return buf; |
102 |
++} // End of printTag |
103 |
++ |
104 |
++#endif |
105 |
+ |
106 |
+ |
107 |
+ /*_________________---------------------------__________________ |
108 |
+@@ -1410,15 +1416,11 @@ static inline uint32_t getAddress(SFSample *sample, SFLAddress *address) { |
109 |
+ static inline void skipTLVRecord(SFSample *sample, uint32_t tag, uint32_t len, char *description) { |
110 |
+ |
111 |
+ #ifdef DEVEL |
112 |
+-static inline char *printTag(uint32_t tag, char *buf, int bufLen) { |
113 |
+- snprintf(buf, bufLen, "%u:%u", (tag >> 12), (tag & 0x00000FFF)); |
114 |
+- return buf; |
115 |
+-} // End of printTag |
116 |
+- |
117 |
+-char buf[51]; |
118 |
++ char buf[51]; |
119 |
++ snprintf(buf, 50, "%u:%u", (tag >> 12), (tag & 0x00000FFF)); |
120 |
++ printf("skipping unknown %s: 0x%x, %s len=%d\n", description, tag, buf, len); |
121 |
+ #endif |
122 |
+ |
123 |
+- dbg_printf("skipping unknown %s: 0x%x, %s len=%d\n", description, tag, printTag(tag, buf, 50), len); |
124 |
+ skipBytes(sample, len); |
125 |
+ } // End of skipTLVRecord |
126 |
+ |
127 |
|
128 |
diff --git a/net-analyzer/nfdump/nfdump-1.6.15.ebuild b/net-analyzer/nfdump/nfdump-1.6.15-r1.ebuild |
129 |
similarity index 94% |
130 |
rename from net-analyzer/nfdump/nfdump-1.6.15.ebuild |
131 |
rename to net-analyzer/nfdump/nfdump-1.6.15-r1.ebuild |
132 |
index baa417bf417..86fcde96ecd 100644 |
133 |
--- a/net-analyzer/nfdump/nfdump-1.6.15.ebuild |
134 |
+++ b/net-analyzer/nfdump/nfdump-1.6.15-r1.ebuild |
135 |
@@ -1,4 +1,4 @@ |
136 |
-# Copyright 1999-2016 Gentoo Foundation |
137 |
+# Copyright 1999-2017 Gentoo Foundation |
138 |
# Distributed under the terms of the GNU General Public License v2 |
139 |
|
140 |
EAPI=6 |
141 |
@@ -33,7 +33,7 @@ RDEPEND=" |
142 |
dev-lang/perl |
143 |
" |
144 |
|
145 |
-DOCS=( AUTHORS ChangeLog NEWS README ) |
146 |
+DOCS=( AUTHORS ChangeLog README.md ) |
147 |
|
148 |
src_prepare() { |
149 |
eapply \ |
150 |
|
151 |
diff --git a/net-analyzer/nfdump/nfdump-1.6.16.ebuild b/net-analyzer/nfdump/nfdump-1.6.16-r1.ebuild |
152 |
similarity index 94% |
153 |
rename from net-analyzer/nfdump/nfdump-1.6.16.ebuild |
154 |
rename to net-analyzer/nfdump/nfdump-1.6.16-r1.ebuild |
155 |
index 4c9925d973e..f76dd9f58c5 100644 |
156 |
--- a/net-analyzer/nfdump/nfdump-1.6.16.ebuild |
157 |
+++ b/net-analyzer/nfdump/nfdump-1.6.16-r1.ebuild |
158 |
@@ -32,10 +32,11 @@ RDEPEND=" |
159 |
${COMMON_DEPEND} |
160 |
dev-lang/perl |
161 |
" |
162 |
-DOCS=( AUTHORS ChangeLog NEWS README ) |
163 |
+DOCS=( AUTHORS ChangeLog README.md ) |
164 |
PATCHES=( |
165 |
"${FILESDIR}"/${PN}-1.6.14-libft.patch |
166 |
"${FILESDIR}"/${PN}-1.6.16-libnfdump.patch |
167 |
+ "${FILESDIR}"/${PN}-1.6.16-DEVEL.patch |
168 |
) |
169 |
|
170 |
src_prepare() { |