summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Weiman2018-10-17 10:37:27 -0400
committerMark Weiman2018-10-17 10:37:27 -0400
commit868e8cbd63089fd9871bb5f5a4b86ff577b60ba1 (patch)
treed28c928fe7afd14788e7e607c07eeef6737da1da
parent5e0d70903523170c49a81caf8b8556f069183bea (diff)
downloadaur-corsaro.tar.gz
Update to 2.1.0-3
-rw-r--r--.SRCINFO4
-rw-r--r--0003-corsaro_flowtuple.h-Remove-includes-to-unavailable-h.patch92
-rw-r--r--PKGBUILD9
3 files changed, 101 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3e7bf904958..f2378f9fbe0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = corsaro
pkgdesc = A software suite for performing large-scale analysis of trace data
pkgver = 2.1.0
- pkgrel = 2
+ pkgrel = 3
url = https://www.caida.org/tools/measurement/corsaro/
arch = i686
arch = x86_64
@@ -10,9 +10,11 @@ pkgbase = corsaro
source = https://www.caida.org/tools/measurement/corsaro/downloads/corsaro-2.1.0.tar.gz
source = 0001-cors-trace2tuple.c-Remove-missing-header.patch
source = 0002-Removes-include-to-config.h-in-public-headers.patch
+ source = 0003-corsaro_flowtuple.h-Remove-includes-to-unavailable-h.patch
md5sums = f4970360525b5d112a1040a27503e87f
md5sums = 4ea8f2e5a1bd608e8a65e8f7dbd9a2f8
md5sums = 440716d2539a211ad4105d4ff7bac9b1
+ md5sums = 27ebf0e1d74a5daa98a6812cb540dade
pkgname = corsaro
diff --git a/0003-corsaro_flowtuple.h-Remove-includes-to-unavailable-h.patch b/0003-corsaro_flowtuple.h-Remove-includes-to-unavailable-h.patch
new file mode 100644
index 00000000000..785e2bd6a89
--- /dev/null
+++ b/0003-corsaro_flowtuple.h-Remove-includes-to-unavailable-h.patch
@@ -0,0 +1,92 @@
+From 86f210253dc9302097e8cfbacf1e8cf7977bb755 Mon Sep 17 00:00:00 2001
+From: Mark Weiman <mweiman@merit.edu>
+Date: Wed, 17 Oct 2018 10:13:45 -0400
+Subject: [PATCH] corsaro_flowtuple.h: Remove includes to unavailable headers
+
+corsaro_flowtuple.h currently has includes for three files, khash.h,
+ksort.h, and corsaro_plugin.h. Since corsaro_flowtuple.h is installed
+as part of libcorsaro, these headers cannot be mentioned in that file.
+
+Removing these includes also required other changes:
+
+ corsaro_flowtuple_hash_func(): changed return type from khint32_t to
+ uint32_t
+ corsaro_flowtuple.c: Include khash.h and ksort.h
+ cors-ft-aggregate.c: Include khash.h
+---
+ libcorsaro/plugins/corsaro_flowtuple.c | 7 +++++--
+ libcorsaro/plugins/corsaro_flowtuple.h | 7 +------
+ tools/cors-ft-aggregate.c | 2 ++
+ 3 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/libcorsaro/plugins/corsaro_flowtuple.c b/libcorsaro/plugins/corsaro_flowtuple.c
+index 8b5d569..82111be 100644
+--- a/libcorsaro/plugins/corsaro_flowtuple.c
++++ b/libcorsaro/plugins/corsaro_flowtuple.c
+@@ -37,6 +37,9 @@
+
+ #include "utils.h"
+
++#include "khash.h"
++#include "ksort.h"
++
+ #include "corsaro_io.h"
+ #include "corsaro_file.h"
+ #include "corsaro_log.h"
+@@ -1303,7 +1306,7 @@ int corsaro_flowtuple_add_inc(void *h, corsaro_flowtuple_t *t,
+ * | TTL |TCP_FLG|PROTO| LEN |
+ * --------------------------------
+ */
+-khint32_t corsaro_flowtuple_hash_func(struct corsaro_flowtuple *ft)
++uint32_t corsaro_flowtuple_hash_func(struct corsaro_flowtuple *ft)
+ {
+ khint32_t h = (khint32_t)ft->src_ip*59;
+ #ifdef CORSARO_SLASH_EIGHT
+@@ -1320,5 +1323,5 @@ khint32_t corsaro_flowtuple_hash_func(struct corsaro_flowtuple *ft)
+ #else
+ CORSARO_FLOWTUPLE_SHIFT_AND_XOR((ft->protocol<<8)|(ft->ip_len));
+ #endif
+- return h;
++ return (uint32_t)h;
+ }
+diff --git a/libcorsaro/plugins/corsaro_flowtuple.h b/libcorsaro/plugins/corsaro_flowtuple.h
+index 33aaa59..2e65a46 100644
+--- a/libcorsaro/plugins/corsaro_flowtuple.h
++++ b/libcorsaro/plugins/corsaro_flowtuple.h
+@@ -26,11 +26,6 @@
+ #ifndef __CORSARO_FLOWTUPLE_H
+ #define __CORSARO_FLOWTUPLE_H
+
+-#include "khash.h"
+-#include "ksort.h"
+-
+-#include "corsaro_plugin.h"
+-
+ /** @file
+ *
+ * @brief Header file which exports corsaro_flowtuple plugin API
+@@ -352,7 +347,7 @@ int corsaro_flowtuple_record_print(corsaro_in_record_type_t record_type,
+ * | TTL |TCP_FLG|PROTO| LEN |
+ * --------------------------------
+ */
+-khint32_t corsaro_flowtuple_hash_func(struct corsaro_flowtuple *ft);
++uint32_t corsaro_flowtuple_hash_func(struct corsaro_flowtuple *ft);
+
+ /** Tests two flowtuples for equality */
+ #ifdef CORSARO_SLASH_EIGHT
+diff --git a/tools/cors-ft-aggregate.c b/tools/cors-ft-aggregate.c
+index c6f1bd1..df57f4c 100644
+--- a/tools/cors-ft-aggregate.c
++++ b/tools/cors-ft-aggregate.c
+@@ -40,6 +40,8 @@
+
+ #include "corsaro_flowtuple.h"
+
++#include "khash.h"
++
+ /** @file
+ *
+ * @brief Code which uses libcorsaro to convert an corsaro output file to ascii
+--
+2.19.1
+
diff --git a/PKGBUILD b/PKGBUILD
index c29668fa2ea..c9dfa916e9c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=corsaro
pkgver=2.1.0
-pkgrel=2
+pkgrel=3
pkgdesc="A software suite for performing large-scale analysis of trace data"
arch=('i686' 'x86_64')
url="https://www.caida.org/tools/measurement/corsaro/"
@@ -10,16 +10,19 @@ depends=('libtrace')
license=('GPL2')
source=("https://www.caida.org/tools/measurement/${pkgname}/downloads/${pkgname}-${pkgver}.tar.gz"
0001-cors-trace2tuple.c-Remove-missing-header.patch
- 0002-Removes-include-to-config.h-in-public-headers.patch)
+ 0002-Removes-include-to-config.h-in-public-headers.patch
+ 0003-corsaro_flowtuple.h-Remove-includes-to-unavailable-h.patch)
md5sums=('f4970360525b5d112a1040a27503e87f'
'4ea8f2e5a1bd608e8a65e8f7dbd9a2f8'
- '440716d2539a211ad4105d4ff7bac9b1')
+ '440716d2539a211ad4105d4ff7bac9b1'
+ '27ebf0e1d74a5daa98a6812cb540dade')
build() {
cd "${pkgname}-${pkgver}"
patch -p1 -i ../0001-cors-trace2tuple.c-Remove-missing-header.patch
patch -p1 -i ../0002-Removes-include-to-config.h-in-public-headers.patch
+ patch -p1 -i ../0003-corsaro_flowtuple.h-Remove-includes-to-unavailable-h.patch
./configure --prefix=/usr
make