Update yara to 4.2.2

Sounds good rpointel@ (maintainer), ok kn@, Tested by Matthias Schmidt
This commit is contained in:
rsadowski 2022-07-10 12:19:03 +00:00
parent 5e19d31183
commit 7178bcae4e
11 changed files with 59 additions and 43 deletions

View File

@ -1,4 +1,4 @@
SUBDIR =
SUBDIR =
SUBDIR += main
SUBDIR += python
SUBDIR += python,python3

View File

@ -1,13 +1,13 @@
VERSION ?= 3.11.0
VERSION ?= 4.2.2
CATEGORIES = security
HOMEPAGE = http://virustotal.github.io/yara/
HOMEPAGE = https://virustotal.github.io/yara/
GH_ACCOUNT = VirusTotal
GH_TAGNAME = v${VERSION}
GH_ACCOUNT = VirusTotal
GH_TAGNAME ?= v${VERSION}
# Apache v2
PERMIT_PACKAGE = Yes
MAINTAINER ?= Remi Pointel <rpointel@openbsd.org>
MAINTAINER ?= Remi Pointel <rpointel@openbsd.org>

View File

@ -1,24 +1,25 @@
COMMENT = pattern matching swiss knife
DISTNAME = yara-${VERSION}
REVISION = 0
GH_PROJECT = yara
WANTLIB += c crypto m magic pthread z
WANTLIB += c crypto jansson m magic pthread z
SHARED_LIBS += yara 0.0 # 0.0
SHARED_LIBS += yara 1.0 # 0.0
CONFIGURE_STYLE = autoreconf
CONFIGURE_ARGS += --with-crypto \
--enable-magic
CONFIGURE_STYLE = autoreconf
CONFIGURE_ARGS += --enable-cuckoo \
--enable-magic \
--with-crypto
CONFIGURE_ENV += LDFLAGS="-L${LOCALBASE}/lib" \
CFLAGS="-I${LOCALBASE}/include"
LIB_DEPENDS += devel/libmagic
LIB_DEPENDS += devel/libmagic \
devel/jansson
AUTOCONF_VERSION = 2.69
AUTOMAKE_VERSION = 1.14
AUTOCONF_VERSION = 2.69
AUTOMAKE_VERSION = 1.14
AUTORECONF = ./bootstrap.sh
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (yara-3.11.0.tar.gz) = 3oxUAoyEh1HAb1rMO3ScPvaxEQkLOfb/mRKVr0S9RjM=
SIZE (yara-3.11.0.tar.gz) = 772122
SHA256 (yara-4.2.2.tar.gz) = IL1WhXxLA3xLqucVh7fSLQt7uwdaevpRa6NdrlD63SU=
SIZE (yara-4.2.2.tar.gz) = 1287486

View File

@ -0,0 +1,12 @@
Index: Makefile.am
--- Makefile.am.orig
+++ Makefile.am
@@ -15,7 +15,7 @@ AM_CFLAGS+=-g
endif
if OPTIMIZATION
-AM_CFLAGS+=-O3
+#AM_CFLAGS+=-O3
else
AM_CFLAGS+=-O0
endif

View File

@ -0,0 +1,12 @@
Index: libyara/Makefile.am
--- libyara/Makefile.am.orig
+++ libyara/Makefile.am
@@ -107,7 +107,7 @@ AM_CFLAGS+=-g
endif
if OPTIMIZATION
-AM_CFLAGS+=-O3
+#AM_CFLAGS+=-O3
else
AM_CFLAGS+=-O0
endif

View File

@ -1,12 +0,0 @@
Index: libyara/modules/pe.c
--- libyara/modules/pe.c.orig
+++ libyara/modules/pe.c
@@ -38,7 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH D
#include <openssl/bio.h>
#include <openssl/pkcs7.h>
#include <openssl/x509.h>
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
#define X509_get_signature_nid(o) OBJ_obj2nid((o)->sig_alg->algorithm)
#define X509_getm_notBefore X509_get_notBefore
#define X509_getm_notAfter X509_get_notAfter

View File

@ -5,6 +5,7 @@ include/yara.h
include/yara/ahocorasick.h
include/yara/arena.h
include/yara/atoms.h
include/yara/base64.h
include/yara/bitmask.h
include/yara/compiler.h
include/yara/error.h
@ -17,6 +18,7 @@ include/yara/libyara.h
include/yara/limits.h
include/yara/mem.h
include/yara/modules.h
include/yara/notebook.h
include/yara/object.h
include/yara/parser.h
include/yara/proc.h
@ -32,7 +34,7 @@ include/yara/strutils.h
include/yara/threading.h
include/yara/types.h
include/yara/utils.h
lib/libyara.a
@static-lib lib/libyara.a
lib/libyara.la
@lib lib/libyara.so.${LIByara_VERSION}
lib/pkgconfig/yara.pc

View File

@ -2,9 +2,9 @@ COMMENT = Python extension that gives access to YARA
GH_PROJECT = yara-python
MODPY_EGG_VERSION = ${VERSION}
PKGNAME = py-yara-${VERSION}
REVISION =3
MODPY_EGG_VERSION = 4.2.0
PKGNAME = py-yara-${MODPY_EGG_VERSION}
GH_TAGNAME = v${MODPY_EGG_VERSION}
WANTLIB += pthread ${MODPY_WANTLIB} yara
@ -18,12 +18,12 @@ MODPY_DISTUTILS_BUILDARGS = --dynamic-linking
MAKE_FLAG += CPPFLAGS="-I${LOCALBASE}/include/yara/"
pre-configure:
${SUBST_CMD} ${WRKSRC}/setup.py
${SUBST_CMD} ${WRKSRC}/setup.py
BUILD_DEPENDS = security/yara/main>=${VERSION}
RUN_DEPENDS = security/yara/main>=${VERSION}
RUN_DEPENDS = security/yara/main>=${VERSION}
TEST_DEPENDS = security/yara/python${MODPY_FLAVOR}=${VERSION}
TEST_DEPENDS = security/yara/python${MODPY_FLAVOR}=${MODPY_EGG_VERSION}
do-test:
cd ${WRKSRC} && ${MODPY_BIN} ./tests.py

View File

@ -1,2 +1,2 @@
SHA256 (yara-python-3.11.0.tar.gz) = EoDPpIRJAunVhIyE7Mh9o/wF+6y9dDcbtzjR9Pu6KFA=
SIZE (yara-python-3.11.0.tar.gz) = 31830
SHA256 (yara-python-4.2.0.tar.gz) = 6y331LSyYxqfoJt/5+Qe6hmgPS9yBO/xCnNB+KRD9VA=
SIZE (yara-python-4.2.0.tar.gz) = 34459

View File

@ -1,8 +1,9 @@
--- setup.py.orig Thu Aug 11 14:22:08 2016
+++ setup.py Thu Aug 11 14:31:24 2016
@@ -122,6 +122,10 @@ class BuildCommand(build):
else:
building_for_osx = False
Index: setup.py
--- setup.py.orig
+++ setup.py
@@ -245,6 +245,10 @@ class BuildExtCommand(build_ext):
if has_header('stdbool.h'):
module.define_macros.append(('HAVE_STDBOOL_H', '1'))
+ if 'openbsd' in self.plat_name:
+ module.include_dirs.append('${LOCALBASE}/include')