pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/security/pev



Module Name:    pkgsrc
Committed By:   khorben
Date:           Tue Oct 22 16:37:05 UTC 2019

Modified Files:
        pkgsrc/security/pev: Makefile PLIST distinfo
        pkgsrc/security/pev/patches: patch-src_Makefile
Added Files:
        pkgsrc/security/pev/patches: patch-src_pehash.c patch-src_pesec.c
            patch-src_plugins.c
Removed Files:
        pkgsrc/security/pev/patches: patch-Makefile patch-lib_libpe_Makefile
            patch-src_pepack.c

Log Message:
Update pev to version 0.80

The new patches fix compatibility with OpenSSL 1.1.0, and attempt to fix
the build on FreeBSD, NetBSD, and OpenBSD. It does not link on NetBSD
(like the previous version, 0.70) but it does on macOS.

There was no changelog upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/security/pev/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/security/pev/PLIST
cvs rdiff -u -r1.5 -r1.6 pkgsrc/security/pev/distinfo
cvs rdiff -u -r1.1 -r0 pkgsrc/security/pev/patches/patch-Makefile
cvs rdiff -u -r1.2 -r0 pkgsrc/security/pev/patches/patch-lib_libpe_Makefile \
    pkgsrc/security/pev/patches/patch-src_pepack.c
cvs rdiff -u -r1.3 -r1.4 pkgsrc/security/pev/patches/patch-src_Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/security/pev/patches/patch-src_pehash.c \
    pkgsrc/security/pev/patches/patch-src_pesec.c \
    pkgsrc/security/pev/patches/patch-src_plugins.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/security/pev/Makefile
diff -u pkgsrc/security/pev/Makefile:1.4 pkgsrc/security/pev/Makefile:1.5
--- pkgsrc/security/pev/Makefile:1.4    Sat Mar  5 11:29:24 2016
+++ pkgsrc/security/pev/Makefile        Tue Oct 22 16:37:05 2019
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2016/03/05 11:29:24 jperkin Exp $
+# $NetBSD: Makefile,v 1.5 2019/10/22 16:37:05 khorben Exp $
 #
 
-DISTNAME=      pev-0.70
-PKGREVISION=   1
+DISTNAME=      pev-0.80
 CATEGORIES=    security
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=pev/}
 

Index: pkgsrc/security/pev/PLIST
diff -u pkgsrc/security/pev/PLIST:1.2 pkgsrc/security/pev/PLIST:1.3
--- pkgsrc/security/pev/PLIST:1.2       Tue Dec  9 14:37:06 2014
+++ pkgsrc/security/pev/PLIST   Tue Oct 22 16:37:05 2019
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2014/12/09 14:37:06 khorben Exp $
+@comment $NetBSD: PLIST,v 1.3 2019/10/22 16:37:05 khorben Exp $
 bin/ofs2rva
 bin/pedis
 bin/pehash
@@ -12,14 +12,19 @@ bin/rva2ofs
 lib/libpe.so
 lib/libpe.so.1
 lib/libpe.so.1.0
-man/man1/ofs2rva.1.gz
-man/man1/pedis.1.gz
-man/man1/pehash.1.gz
-man/man1/pepack.1.gz
-man/man1/peres.1.gz
-man/man1/pescan.1.gz
-man/man1/pesec.1.gz
-man/man1/pestr.1.gz
-man/man1/readpe.1.gz
-man/man1/rva2ofs.1.gz
+lib/pev/plugins/csv_plugin.so
+lib/pev/plugins/html_plugin.so
+lib/pev/plugins/json_plugin.so
+lib/pev/plugins/text_plugin.so
+lib/pev/plugins/xml_plugin.so
+man/man1/ofs2rva.1
+man/man1/pedis.1
+man/man1/pehash.1
+man/man1/pepack.1
+man/man1/peres.1
+man/man1/pescan.1
+man/man1/pesec.1
+man/man1/pestr.1
+man/man1/readpe.1
+man/man1/rva2ofs.1
 share/pev/userdb.txt

Index: pkgsrc/security/pev/distinfo
diff -u pkgsrc/security/pev/distinfo:1.5 pkgsrc/security/pev/distinfo:1.6
--- pkgsrc/security/pev/distinfo:1.5    Wed Nov  4 01:18:00 2015
+++ pkgsrc/security/pev/distinfo        Tue Oct 22 16:37:05 2019
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.5 2015/11/04 01:18:00 agc Exp $
+$NetBSD: distinfo,v 1.6 2019/10/22 16:37:05 khorben Exp $
 
-SHA1 (pev-0.70.tar.gz) = b2d1191c3b57049c78ef77b8f54f7f78838af129
-RMD160 (pev-0.70.tar.gz) = 9ffe6dccecdfbeba09e34f9a212c2abcf3861ef0
-SHA512 (pev-0.70.tar.gz) = c98ea778b05b514ef26d87627484b5942247fb4190ad6a166ee2a01fc185dd4663848ca9b5ba3a26be5c8a40eaf42f476bec58ddea0565ac4c6fe0710c9575aa
-Size (pev-0.70.tar.gz) = 254821 bytes
-SHA1 (patch-Makefile) = 39b31541b2f51e82e9807aed36723105959aa26c
-SHA1 (patch-lib_libpe_Makefile) = 11d1beba07b313a4baf2e95b5b56dfd7da4787f9
-SHA1 (patch-src_Makefile) = 2f04a23d40c1859ba1094a00822c0a0294fe3e5b
-SHA1 (patch-src_pepack.c) = acb6dc0d1d9b20c13a61275b4f08f5903fec14f9
+SHA1 (pev-0.80.tar.gz) = 18dcb65269344b5047504cca8598477b33532bab
+RMD160 (pev-0.80.tar.gz) = 01ed4fa37c5349397dbd8aa3b592b9657e63acf8
+SHA512 (pev-0.80.tar.gz) = d0c8ff8fcd60470899d5dbccfd7a7e4d960da007f42be9c7eab6b22a3d7cf4dde3c3d5cd9c7d70e369164503fb124640cf508ceda3d4792244cf33d11ab83321
+Size (pev-0.80.tar.gz) = 921102 bytes
+SHA1 (patch-src_Makefile) = f51a9d6afa64de8ba761a9b889911403b0107aad
+SHA1 (patch-src_pehash.c) = c31083fca0d98dc607eb4f8b338bd93dd714f594
+SHA1 (patch-src_pesec.c) = fa302aa9bf2f07558f6cef0c41b0cd9063df7706
+SHA1 (patch-src_plugins.c) = c85c5c3b918850c7383f30d2efdae38985cdd143

Index: pkgsrc/security/pev/patches/patch-src_Makefile
diff -u pkgsrc/security/pev/patches/patch-src_Makefile:1.3 pkgsrc/security/pev/patches/patch-src_Makefile:1.4
--- pkgsrc/security/pev/patches/patch-src_Makefile:1.3  Tue Dec  9 14:37:06 2014
+++ pkgsrc/security/pev/patches/patch-src_Makefile      Tue Oct 22 16:37:05 2019
@@ -1,58 +1,18 @@
-$NetBSD: patch-src_Makefile,v 1.3 2014/12/09 14:37:06 khorben Exp $
+$NetBSD: patch-src_Makefile,v 1.4 2019/10/22 16:37:05 khorben Exp $
 
-Fixed DESTDIR support
+Only link with libdl on Linux
 
---- src/Makefile.orig  2013-12-27 10:39:49.000000000 +0000
+--- src/Makefile.orig  2017-01-07 22:34:07.000000000 +0000
 +++ src/Makefile
-@@ -56,7 +56,8 @@ ifeq ($(PLATFORM_OS), Darwin)
- endif
+@@ -52,7 +52,10 @@ endif
  
- PROGS = readpe rva2ofs ofs2rva pehash pesec pescan pepack pestr pedis peres
--SHAREDIR = $(datadir)/pev
-+MAN1DIR = $(DESTDIR)$(man1dir)
-+SHAREDIR = $(DESTDIR)$(datadir)/pev
- LIBPE = $(srcdir)/../lib/libpe
- LIBUDIS86 = $(srcdir)/../lib/libudis86
- LIBFUZZY = $(srcdir)/../lib/libfuzzy
-@@ -68,6 +69,8 @@ MANDIR = $(srcdir)/../doc/manpages
+ ####### Compiler options
  
- all: $(PROGS)
+-override LDFLAGS += -L$(LIBPE) -lpe -ldl
++override LDFLAGS += -L$(LIBPE) -lpe
++ifeq ($(PLATFORM_OS), Linux)
++override LDFLAGS += -ldl
++endif
+ override CFLAGS += -I$(LIBPE) -I"../include" -W -Wall -Wextra -std=c99 -pedantic
+ override CPPFLAGS += -D_GNU_SOURCE -DSHAREDIR="\"$(SHAREDIR)"\"
  
-+pepack: CPPFLAGS += -DPREFIX=\"$(prefix)\"
-+
- pesec: LDFLAGS += -lcrypto
- pesec: compat/strlcat.c
- 
-@@ -85,13 +88,13 @@ pescan: LDFLAGS += -lm
- # Generic rule matching binary names and sources
- 
- %: %.c
--      $(CC) $(CFLAGS) $(DFLAGS) output.c malloc_s.c $^ -o $@ $(LDFLAGS)
-+      $(CC) $(CPPFLAGS) $(CFLAGS) $(DFLAGS) output.c malloc_s.c $^ -o $@ $(LDFLAGS)
- 
- install: installdirs
-       for prog in $(PROGS); do \
--              $(INSTALL_PROGRAM) -m 755 $$prog $(DEST); \
-+              $(INSTALL_PROGRAM) -m 755 $$prog $(DEST)/$$prog; \
-               $(CHK_FILE_EXISTS) $(MANDIR)/$$prog$(man1ext) && \
--                      gzip -c -9 $(MANDIR)/$$prog$(man1ext) > $(man1dir)/$$prog$(man1ext).gz || \
-+                      gzip -c -9 $(MANDIR)/$$prog$(man1ext) > $(MAN1DIR)/$$prog$(man1ext).gz || \
-                       echo -n; \
-       done
-       # TODO: Should we copy it anyway if it already exists?
-@@ -99,13 +102,13 @@ install: installdirs
- 
- installdirs:
-       @$(CHK_DIR_EXISTS) $(DEST) || $(MKDIR) $(DEST)
--      @$(CHK_DIR_EXISTS) $(man1dir) || $(MKDIR) $(man1dir)
-+      @$(CHK_DIR_EXISTS) $(MAN1DIR) || $(MKDIR) $(MAN1DIR)
-       @$(CHK_DIR_EXISTS) $(SHAREDIR) || $(MKDIR) $(SHAREDIR)
- 
- uninstall:
-       for prog in $(PROGS); do \
-               $(RM) $(DEST)/$$prog; \
--              $(RM) $(man1dir)/$$prog$(man1ext).gz; \
-+              $(RM) $(MAN1DIR)/$$prog$(man1ext).gz; \
-       done
- 
- clean:

Added files:

Index: pkgsrc/security/pev/patches/patch-src_pehash.c
diff -u /dev/null pkgsrc/security/pev/patches/patch-src_pehash.c:1.1
--- /dev/null   Tue Oct 22 16:37:05 2019
+++ pkgsrc/security/pev/patches/patch-src_pehash.c      Tue Oct 22 16:37:05 2019
@@ -0,0 +1,30 @@
+$NetBSD: patch-src_pehash.c,v 1.1 2019/10/22 16:37:05 khorben Exp $
+
+Compatibility fix for OpenSSL 1.1.0
+
+--- src/pehash.c.orig  2017-01-06 22:49:50.000000000 +0000
++++ src/pehash.c
+@@ -215,13 +215,22 @@ static void calc_hash(const char *alg_na
+       unsigned char md_value[EVP_MAX_MD_SIZE];
+       unsigned int md_len;
+ 
+-      EVP_MD_CTX md_ctx;
+       // FIXME: Handle errors - Check return values.
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++      EVP_MD_CTX * md_ctx;
++      md_ctx = EVP_MD_CTX_new();
++      EVP_DigestInit_ex(md_ctx, md, NULL);
++      EVP_DigestUpdate(md_ctx, data, size);
++      EVP_DigestFinal_ex(md_ctx, md_value, &md_len);
++      EVP_MD_CTX_free(md_ctx);
++#else
++      EVP_MD_CTX md_ctx;
+       EVP_MD_CTX_init(&md_ctx);
+       EVP_DigestInit_ex(&md_ctx, md, NULL);
+       EVP_DigestUpdate(&md_ctx, data, size);
+       EVP_DigestFinal_ex(&md_ctx, md_value, &md_len);
+       EVP_MD_CTX_cleanup(&md_ctx);
++#endif
+ 
+       for (unsigned int i=0; i < md_len; i++)
+               sprintf(&output[i * 2], "%02x", md_value[i]);
Index: pkgsrc/security/pev/patches/patch-src_pesec.c
diff -u /dev/null pkgsrc/security/pev/patches/patch-src_pesec.c:1.1
--- /dev/null   Tue Oct 22 16:37:05 2019
+++ pkgsrc/security/pev/patches/patch-src_pesec.c       Tue Oct 22 16:37:05 2019
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_pesec.c,v 1.1 2019/10/22 16:37:05 khorben Exp $
+
+Fix build with OpenSSL >= 1.1.0
+
+--- src/pesec.c.orig   2017-01-06 22:27:18.000000000 +0000
++++ src/pesec.c
+@@ -225,7 +225,9 @@ static int parse_pkcs7_data(const option
+       PKCS7 *p7 = NULL;
+       BIO *in = NULL;
+ 
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+       CRYPTO_malloc_init();
++#endif
+       ERR_load_crypto_strings();
+       OpenSSL_add_all_algorithms();
+ 
Index: pkgsrc/security/pev/patches/patch-src_plugins.c
diff -u /dev/null pkgsrc/security/pev/patches/patch-src_plugins.c:1.1
--- /dev/null   Tue Oct 22 16:37:05 2019
+++ pkgsrc/security/pev/patches/patch-src_plugins.c     Tue Oct 22 16:37:05 2019
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_plugins.c,v 1.1 2019/10/22 16:37:05 khorben Exp $
+
+Build fix for FreeBSD, NetBSD, and OpenBSD.
+
+--- src/plugins.c.orig 2017-01-06 22:27:18.000000000 +0000
++++ src/plugins.c
+@@ -167,7 +167,7 @@ int plugins_load_all_from_directory(cons
+                               const char *filename = dir_entry->d_name;
+ 
+                               // TODO(jweyrich): Use macro conditions for each system: .so, .dylib, .dll
+-#if defined(__linux__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+                               const bool possible_plugin = utils_str_ends_with(filename, ".so") != 0;
+ #elif defined(__APPLE__)
+                               const bool possible_plugin = utils_str_ends_with(filename, ".dylib") != 0;



Home | Main Index | Thread Index | Old Index