From 5285a3ebb78db5127d86d856d3edf4c54fb2f8cd Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Tue, 23 May 2017 00:21:05 +0000 Subject: [PATCH] yara: update to 3.6.0. --- srcpkgs/yara/patches/libressl.patch | 45 +++++++++++++++++++++++------ srcpkgs/yara/template | 6 ++-- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/srcpkgs/yara/patches/libressl.patch b/srcpkgs/yara/patches/libressl.patch index e5032b399a7..e0bef7e3f28 100644 --- a/srcpkgs/yara/patches/libressl.patch +++ b/srcpkgs/yara/patches/libressl.patch @@ -1,25 +1,52 @@ ---- libyara/libyara.c.orig 2016-09-06 20:09:47.000000000 +0000 -+++ libyara/libyara.c 2017-05-10 12:40:13.393089280 +0000 +--- libyara/libyara.c.orig 2017-05-22 10:24:23.000000000 +0000 ++++ libyara/libyara.c 2017-05-23 00:18:32.658793790 +0000 +@@ -37,7 +37,7 @@ + #include + #include + +-#if defined(HAVE_LIBCRYPTO) && OPENSSL_VERSION_NUMBER < 0x10100000L ++#if defined(HAVE_LIBCRYPTO) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)) + #include + #endif + @@ -71,7 +71,7 @@ - char altercase[256]; + char yr_altercase[256]; --#if defined HAVE_LIBCRYPTO && OPENSSL_VERSION_NUMBER < 0x10100000L -+#if defined HAVE_LIBCRYPTO && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)) +-#if defined(HAVE_LIBCRYPTO) && OPENSSL_VERSION_NUMBER < 0x10100000L ++#if defined(HAVE_LIBCRYPTO) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)) // The OpenSSL library before version 1.1 requires some locks in order // to be thread-safe. These locks are initialized in yr_initialize @@ -133,7 +133,7 @@ - FAIL_ON_ERROR(yr_thread_storage_create(&tidx_key)); - FAIL_ON_ERROR(yr_thread_storage_create(&recovery_state_key)); + FAIL_ON_ERROR(yr_thread_storage_create(&yr_tidx_key)); + FAIL_ON_ERROR(yr_thread_storage_create(&yr_recovery_state_key)); - #if defined HAVE_LIBCRYPTO && OPENSSL_VERSION_NUMBER < 0x10100000L + #if defined HAVE_LIBCRYPTO && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)) openssl_locks = (YR_MUTEX*) OPENSSL_malloc( CRYPTO_num_locks() * sizeof(YR_MUTEX)); ---- libyara/modules/pe.c.orig 2016-09-06 20:09:47.000000000 +0000 -+++ libyara/modules/pe.c 2017-05-10 12:38:23.755095815 +0000 +@@ -178,7 +178,7 @@ + + YR_API int yr_finalize(void) + { +- #if defined HAVE_LIBCRYPTO && OPENSSL_VERSION_NUMBER < 0x10100000L ++ #if defined HAVE_LIBCRYPTO && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)) + int i; + #endif + +@@ -194,7 +194,7 @@ + if (init_count > 0) + return ERROR_SUCCESS; + +- #if defined HAVE_LIBCRYPTO && OPENSSL_VERSION_NUMBER < 0x10100000L ++ #if defined HAVE_LIBCRYPTO && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)) + + for (i = 0; i < CRYPTO_num_locks(); i ++) + yr_mutex_destroy(&openssl_locks[i]); +--- libyara/modules/pe.c.orig 2016-09-06 20:09:47.000000000 +0000 ++++ libyara/modules/pe.c 2017-05-10 12:38:23.755095815 +0000 @@ -42,7 +42,7 @@ #include #include diff --git a/srcpkgs/yara/template b/srcpkgs/yara/template index 4867db233bd..2d6d984a45c 100644 --- a/srcpkgs/yara/template +++ b/srcpkgs/yara/template @@ -1,7 +1,7 @@ # Template file for 'yara' pkgname=yara -version=3.5.0 -revision=2 +version=3.6.0 +revision=1 build_style=gnu-configure configure_args="--enable-magic --enable-cuckoo" hostmakedepends="automake libtool" @@ -11,7 +11,7 @@ maintainer="Michael Gehring " license="3-clause-BSD" homepage="http://virustotal.github.io/yara/" distfiles="https://github.com/VirusTotal/yara/archive/v${version}.tar.gz" -checksum=4bc72ee755db85747f7e856afb0e817b788a280ab5e73dee42f159171a9b5299 +checksum=fb27784b3989db509871652aae26063d87e9cc6330929abed1ab824c5bd600e0 pre_configure() { autoreconf -fi