wok-next rev 20669
vde2: up / fix build
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri May 11 14:21:30 2018 +0300 (2018-05-11) |
parents | 94fc545eb649 |
children | bc4842f06e07 |
files | vde2/receipt vde2/stuff/patches/series vde2/stuff/patches/vde_cryptcab-compile-against-openssl-1.1.0.patch |
line diff
1.1 --- a/vde2/receipt Fri May 11 13:08:01 2018 +0300 1.2 +++ b/vde2/receipt Fri May 11 14:21:30 2018 +0300 1.3 @@ -1,7 +1,7 @@ 1.4 # SliTaz package receipt v2. 1.5 1.6 PACKAGE="vde2" 1.7 -VERSION="2.3.1" 1.8 +VERSION="2.3.2" 1.9 CATEGORY="network" 1.10 SHORT_DESC="Virtual Distributed Ethernet" 1.11 MAINTAINER="pascal.bellard@slitaz.org" 1.12 @@ -11,16 +11,23 @@ 1.13 TARBALL="$PACKAGE-$VERSION.tar.bz2" 1.14 WGET_URL="$SF_MIRROR/vde/$TARBALL" 1.15 1.16 -BUILD_DEPENDS="openssl openssl-dev" 1.17 +BUILD_DEPENDS="openssl-dev" # python-dev libpcap-dev 1.18 SPLIT="vde2-dev" 1.19 1.20 compile_rules() { 1.21 + # Disable size optimization (and use default) because inlining functions 1.22 + # in the src/vde_switch/fstp.c will produce errors: 1.23 + # undefined reference to `nstringtol' 1.24 + # undefined reference to `ltonstring' 1.25 + export CFLAGS="${CFLAGS/-Os/}" 1.26 + 1.27 ./configure \ 1.28 --libexecdir=/usr/lib/$PACKAGE \ 1.29 + --enable-experimental \ 1.30 $CONFIGURE_ARGS && 1.31 fix libtool && 1.32 - make && 1.33 - make DESTDIR=$DESTDIR install 1.34 + make -j1 && 1.35 + make -j1 install 1.36 } 1.37 1.38 genpkg_rules() {
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/vde2/stuff/patches/series Fri May 11 14:21:30 2018 +0300 2.3 @@ -0,0 +1,2 @@ 2.4 +# from https://www.archlinux.org/packages/extra/x86_64/vde2/ 2.5 +vde_cryptcab-compile-against-openssl-1.1.0.patch
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/vde2/stuff/patches/vde_cryptcab-compile-against-openssl-1.1.0.patch Fri May 11 14:21:30 2018 +0300 3.3 @@ -0,0 +1,92 @@ 3.4 +--- a/src/vde_cryptcab/cryptcab.c 2011-11-23 16:41:17.000000000 +0000 3.5 ++++ b/src/vde_cryptcab/cryptcab.c 2017-03-20 22:54:20.452975075 +0000 3.6 +@@ -22,7 +22,7 @@ 3.7 + exit(1); 3.8 + } 3.9 + 3.10 +-static EVP_CIPHER_CTX ctx; 3.11 ++static EVP_CIPHER_CTX *ctx; 3.12 + static int ctx_initialized = 0; 3.13 + static int encryption_disabled = 0; 3.14 + static int nfd; 3.15 +@@ -30,6 +30,10 @@ 3.16 + static struct vde_open_args open_args={.port=0,.group=NULL,.mode=0700}; 3.17 + static int verbose = 0; 3.18 + 3.19 ++#if OPENSSL_VERSION_NUMBER < 0x10100000 3.20 ++#define EVP_CIPHER_CTX_reset(x) EVP_CIPHER_CTX_cleanup(x) 3.21 ++#endif 3.22 ++ 3.23 + void vc_printlog(int priority, const char *format, ...) 3.24 + { 3.25 + va_list arg; 3.26 +@@ -103,19 +107,21 @@ 3.27 + } 3.28 + 3.29 + if (!ctx_initialized) { 3.30 +- EVP_CIPHER_CTX_init (&ctx); 3.31 ++ ctx = EVP_CIPHER_CTX_new (); 3.32 ++ if (!ctx) 3.33 ++ return -1; 3.34 + ctx_initialized = 1; 3.35 + } 3.36 + 3.37 +- EVP_EncryptInit (&ctx, EVP_bf_cbc (), p->key, p->iv); 3.38 +- if (EVP_EncryptUpdate (&ctx, dst, &olen, src, len) != 1) 3.39 ++ EVP_EncryptInit (ctx, EVP_bf_cbc (), p->key, p->iv); 3.40 ++ if (EVP_EncryptUpdate (ctx, dst, &olen, src, len) != 1) 3.41 + { 3.42 + fprintf (stderr,"error in encrypt update\n"); 3.43 + olen = -1; 3.44 + goto cleanup; 3.45 + } 3.46 + 3.47 +- if (EVP_EncryptFinal (&ctx, dst + olen, &tlen) != 1) 3.48 ++ if (EVP_EncryptFinal (ctx, dst + olen, &tlen) != 1) 3.49 + { 3.50 + fprintf (stderr,"error in encrypt final\n"); 3.51 + olen = -1; 3.52 +@@ -124,7 +130,7 @@ 3.53 + olen += tlen; 3.54 + 3.55 + cleanup: 3.56 +- EVP_CIPHER_CTX_cleanup(&ctx); 3.57 ++ EVP_CIPHER_CTX_reset(ctx); 3.58 + return olen; 3.59 + } 3.60 + 3.61 +@@ -138,19 +144,21 @@ 3.62 + } 3.63 + 3.64 + if (!ctx_initialized) { 3.65 +- EVP_CIPHER_CTX_init (&ctx); 3.66 ++ ctx = EVP_CIPHER_CTX_new (); 3.67 ++ if (!ctx) 3.68 ++ return -1; 3.69 + ctx_initialized = 1; 3.70 + } 3.71 + 3.72 +- EVP_DecryptInit (&ctx, EVP_bf_cbc (), p->key, p->iv); 3.73 +- if (EVP_DecryptUpdate (&ctx, dst, &olen, src, len) != 1) 3.74 ++ EVP_DecryptInit (ctx, EVP_bf_cbc (), p->key, p->iv); 3.75 ++ if (EVP_DecryptUpdate (ctx, dst, &olen, src, len) != 1) 3.76 + { 3.77 + fprintf (stderr,"error in decrypt update\n"); 3.78 + olen = -1; 3.79 + goto cleanup; 3.80 + } 3.81 + 3.82 +- if (EVP_DecryptFinal (&ctx, dst + olen, &tlen) != 1) 3.83 ++ if (EVP_DecryptFinal (ctx, dst + olen, &tlen) != 1) 3.84 + { 3.85 + fprintf (stderr,"error in decrypt final\n"); 3.86 + olen = -1; 3.87 +@@ -159,7 +167,7 @@ 3.88 + olen += tlen; 3.89 + 3.90 + cleanup: 3.91 +- EVP_CIPHER_CTX_cleanup(&ctx); 3.92 ++ EVP_CIPHER_CTX_reset (ctx); 3.93 + return olen; 3.94 + } 3.95 +