[arch-commits] Commit in tcpflow/trunk (PKGBUILD tcpflow-openssl-1.1.patch)
Antonio Rojas
arojas at archlinux.org
Tue Mar 7 08:08:57 UTC 2017
Date: Tuesday, March 7, 2017 @ 08:08:56
Author: arojas
Revision: 215222
openssl 1.1 rebuild
Added:
tcpflow/trunk/tcpflow-openssl-1.1.patch
Modified:
tcpflow/trunk/PKGBUILD
---------------------------+
PKGBUILD | 14 ++++++---
tcpflow-openssl-1.1.patch | 67 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 77 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-03-07 07:28:17 UTC (rev 215221)
+++ PKGBUILD 2017-03-07 08:08:56 UTC (rev 215222)
@@ -5,21 +5,23 @@
pkgname=tcpflow
pkgver=1.4.5
-pkgrel=2
+pkgrel=3
pkgdesc="Captures data transmitted as part of TCP connections then stores the data conveniently"
arch=('i686' 'x86_64')
url="https://github.com/simsong/tcpflow"
license=('GPL')
-depends=('libpcap' 'cairo')
+depends=('libpcap' 'cairo' 'openssl' 'sqlite')
makedepends=('git' 'boost')
source=("git+https://github.com/simsong/$pkgname.git#tag=$pkgname-$pkgver"
'git+https://github.com/simsong/be13_api.git'
'git+https://github.com/simsong/dfxml.git'
- 'git+https://github.com/joyent/http-parser.git')
+ 'git+https://github.com/joyent/http-parser.git'
+ tcpflow-openssl-1.1.patch)
md5sums=('SKIP'
'SKIP'
'SKIP'
- 'SKIP')
+ 'SKIP'
+ 'bd2f6fd8df59a0e93fde5fcb8098398a')
prepare() {
cd $pkgname
@@ -28,6 +30,10 @@
git config submodule."src/dfxml".url "$srcdir/dfxml"
git config submodule."src/http-parser".url "$srcdir/http-parser"
git submodule update
+
+ # Fix build with openssl 1.1
+ patch -p1 -i ../tcpflow-openssl-1.1.patch
+ autoreconf -vi
}
build() {
Added: tcpflow-openssl-1.1.patch
===================================================================
--- tcpflow-openssl-1.1.patch (rev 0)
+++ tcpflow-openssl-1.1.patch 2017-03-07 08:08:56 UTC (rev 215222)
@@ -0,0 +1,67 @@
+--- tcpflow/configure.ac.orig 2017-03-07 07:59:04.852848391 +0000
++++ tcpflow/configure.ac 2017-03-07 07:59:22.136158400 +0000
+@@ -214,7 +214,7 @@
+ AC_CHECK_LIB([dl],[dlopen]) dnl apparently OpenSSL now needs -ldl on some Linux
+ AC_CHECK_LIB([crypto],[EVP_get_digestbyname]) # if crypto is available, get it
+ AC_CHECK_LIB([md],[MD5]) # if libmd is available, get it
+-AC_CHECK_LIB([ssl],[SSL_library_init],,
++AC_CHECK_LIB([ssl],[SSL_CTX_new],,
+ AC_MSG_ERROR([OpenSSL developer library 'libssl-dev' or 'openssl-devel' not installed]))
+ AC_CHECK_FUNCS([MD5_Init EVP_get_digestbyname])
+
+--- tcpflow.orig/src/dfxml/src/hash_t.h
++++ tcpflow/src/dfxml/src/hash_t.h
+@@ -189,7 +189,7 @@ inline std::string digest_name<sha512_t>
+
+ template<const EVP_MD *md(),size_t SIZE>
+ class hash_generator__ { /* generates the hash */
+- EVP_MD_CTX mdctx; /* the context for computing the value */
++ EVP_MD_CTX* mdctx; /* the context for computing the value */
+ bool initialized; /* has the context been initialized? */
+ bool finalized;
+ /* Static function to determine if something is zero */
+@@ -202,21 +202,21 @@ class hash_generator__ { /* generates
+ public:
+ int64_t hashed_bytes;
+ /* This function takes advantage of the fact that different hash functions produce residues with different sizes */
+- hash_generator__():mdctx(),initialized(false),finalized(false),hashed_bytes(0){ }
++ hash_generator__():mdctx(NULL),initialized(false),finalized(false),hashed_bytes(0){ }
+ ~hash_generator__(){
+ release();
+ }
+ void release(){ /* free allocated memory */
+ if(initialized){
+- EVP_MD_CTX_cleanup(&mdctx);
++ EVP_MD_CTX_destroy(mdctx);
+ initialized = false;
+ hashed_bytes = 0;
+ }
+ }
+ void init(){
+ if(initialized==false){
+- EVP_MD_CTX_init(&mdctx);
+- EVP_DigestInit_ex(&mdctx, md(), NULL);
++ mdctx = EVP_MD_CTX_create();
++ EVP_DigestInit_ex(mdctx, md(), NULL);
+ initialized = true;
+ finalized = false;
+ hashed_bytes = 0;
+@@ -228,7 +228,7 @@ public:
+ std::cerr << "hashgen_t::update called after finalized\n";
+ exit(1);
+ }
+- EVP_DigestUpdate(&mdctx,buf,bufsize);
++ EVP_DigestUpdate(mdctx,buf,bufsize);
+ hashed_bytes += bufsize;
+ }
+ hash__<md,SIZE> final() {
+@@ -242,7 +242,7 @@ public:
+ }
+ hash__<md,SIZE> val;
+ unsigned int len = sizeof(val.digest);
+- EVP_DigestFinal(&mdctx,val.digest,&len);
++ EVP_DigestFinal(mdctx,val.digest,&len);
+ finalized = true;
+ return val;
+ }
+
More information about the arch-commits
mailing list