pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/security/pev Update pev to version 0.80



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b66f682d9758
branches:  trunk
changeset: 342630:b66f682d9758
user:      khorben <khorben%pkgsrc.org@localhost>
date:      Tue Oct 22 16:37:05 2019 +0000

description:
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.

diffstat:

 security/pev/Makefile                         |   5 +-
 security/pev/PLIST                            |  27 ++++++----
 security/pev/distinfo                         |  18 +++---
 security/pev/patches/patch-Makefile           |  24 ----------
 security/pev/patches/patch-lib_libpe_Makefile |  35 --------------
 security/pev/patches/patch-src_Makefile       |  64 +++++---------------------
 security/pev/patches/patch-src_pehash.c       |  30 ++++++++++++
 security/pev/patches/patch-src_pepack.c       |  29 ------------
 security/pev/patches/patch-src_pesec.c        |  16 ++++++
 security/pev/patches/patch-src_plugins.c      |  15 ++++++
 10 files changed, 100 insertions(+), 163 deletions(-)

diffs (truncated from 323 to 300 lines):

diff -r 9a4196d4c31a -r b66f682d9758 security/pev/Makefile
--- a/security/pev/Makefile     Tue Oct 22 16:24:55 2019 +0000
+++ b/security/pev/Makefile     Tue Oct 22 16:37:05 2019 +0000
@@ -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/}
 
diff -r 9a4196d4c31a -r b66f682d9758 security/pev/PLIST
--- a/security/pev/PLIST        Tue Oct 22 16:24:55 2019 +0000
+++ b/security/pev/PLIST        Tue Oct 22 16:37:05 2019 +0000
@@ -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 @@
 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
diff -r 9a4196d4c31a -r b66f682d9758 security/pev/distinfo
--- a/security/pev/distinfo     Tue Oct 22 16:24:55 2019 +0000
+++ b/security/pev/distinfo     Tue Oct 22 16:37:05 2019 +0000
@@ -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
diff -r 9a4196d4c31a -r b66f682d9758 security/pev/patches/patch-Makefile
--- a/security/pev/patches/patch-Makefile       Tue Oct 22 16:24:55 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-$NetBSD: patch-Makefile,v 1.1 2014/12/09 14:37:06 khorben Exp $
-
-No longer insist on a particular make(1) flavor
-
---- Makefile.orig      2013-12-27 10:39:49.000000000 +0000
-+++ Makefile
-@@ -1,14 +1,14 @@
- LIBPE_DIR = lib/libpe
- PEV_DIR = src
--MAKE = make
-+#MAKE = make
- VERSION = 0.70
- ZIPFILE = pev-$(VERSION)-win32.zip
- 
- # just call each separated Makefile
- all:
- %:
--      cd $(LIBPE_DIR); $(MAKE) $@
--      cd $(PEV_DIR); $(MAKE) $@
-+      cd $(LIBPE_DIR) && $(MAKE) $@
-+      cd $(PEV_DIR) && $(MAKE) $@
- 
- # zip rule only Cygwin targets
- zip:
diff -r 9a4196d4c31a -r b66f682d9758 security/pev/patches/patch-lib_libpe_Makefile
--- a/security/pev/patches/patch-lib_libpe_Makefile     Tue Oct 22 16:24:55 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-$NetBSD: patch-lib_libpe_Makefile,v 1.2 2014/12/09 14:37:06 khorben Exp $
-
-Fixed generation and installation of the libpe shared library on NetBSD
-
---- lib/libpe/Makefile.orig    2013-12-27 10:39:52.000000000 +0000
-+++ lib/libpe/Makefile
-@@ -70,6 +70,8 @@ libpe: CPPFLAGS += -D_GNU_SOURCE
- libpe: $(libpe_OBJS)
- ifeq ($(PLATFORM_OS), Linux)
-       $(LINK) -shared -Wl,-soname,$(LIBNAME).so.1 $(LDFLAGS) -o $(LIBNAME).so $^
-+else ifeq ($(PLATFORM_OS), NetBSD)
-+      $(LINK) -shared -Wl,-soname,$(LIBNAME).so.1 $(LDFLAGS) -o $(LIBNAME).so $^
- else ifeq ($(PLATFORM_OS), Darwin)
-       $(LINK) -headerpad_max_install_names -dynamiclib \
-               -flat_namespace -install_name $(LIBNAME).$(VERSION).dylib \
-@@ -88,6 +90,10 @@ ifeq ($(PLATFORM_OS), Linux)
-       $(INSTALL_DATA) $(LIBNAME).so $(DEST)/$(LIBNAME).so.$(VERSION)
-       cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so
-       cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so.1
-+else ifeq ($(PLATFORM_OS), NetBSD)
-+      $(INSTALL_DATA) $(LIBNAME).so $(DEST)/$(LIBNAME).so.$(VERSION)
-+      cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so
-+      cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so.1
- else ifeq ($(PLATFORM_OS), Darwin)
-       $(INSTALL_DATA) $(LIBNAME).dylib $(DEST)/$(LIBNAME).$(VERSION).dylib
-       cd $(DEST); $(SYMLINK) $(LIBNAME).$(VERSION).dylib $(LIBNAME).dylib
-@@ -102,6 +108,8 @@ installdirs:
- strip-binaries:
- ifeq ($(PLATFORM_OS), Linux)
-       $(STRIP) $(LIBNAME).so
-+else ifeq ($(PLATFORM_OS), NetBSD)
-+      $(STRIP) $(LIBNAME).so
- else ifeq ($(PLATFORM_OS), Darwin)
-       $(STRIP) $(LIBNAME).dylib
- else ifeq ($(PLATFORM_OS), CYGWIN)
diff -r 9a4196d4c31a -r b66f682d9758 security/pev/patches/patch-src_Makefile
--- a/security/pev/patches/patch-src_Makefile   Tue Oct 22 16:24:55 2019 +0000
+++ b/security/pev/patches/patch-src_Makefile   Tue Oct 22 16:37:05 2019 +0000
@@ -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
- 
- 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
- 
- all: $(PROGS)
- 
-+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
+@@ -52,7 +52,10 @@ endif
  
- %: %.c
--      $(CC) $(CFLAGS) $(DFLAGS) output.c malloc_s.c $^ -o $@ $(LDFLAGS)
-+      $(CC) $(CPPFLAGS) $(CFLAGS) $(DFLAGS) output.c malloc_s.c $^ -o $@ $(LDFLAGS)
+ ####### Compiler options
  
- 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
+-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)"\"
  
- 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:
diff -r 9a4196d4c31a -r b66f682d9758 security/pev/patches/patch-src_pehash.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/pev/patches/patch-src_pehash.c   Tue Oct 22 16:37:05 2019 +0000
@@ -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]);
diff -r 9a4196d4c31a -r b66f682d9758 security/pev/patches/patch-src_pepack.c
--- a/security/pev/patches/patch-src_pepack.c   Tue Oct 22 16:24:55 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-$NetBSD: patch-src_pepack.c,v 1.2 2014/12/09 14:37:06 khorben Exp $
-
-Fixed the path to userdb.txt (see pkg/49458)
-
---- src/pepack.c.orig  2013-12-27 10:39:49.000000000 +0000
-+++ src/pepack.c
-@@ -21,6 +21,13 @@
- 
- #include "common.h"
- 
-+#ifndef PREFIX
-+# define PREFIX "/usr"
-+#endif
-+#ifndef DATADIR
-+# define DATADIR PREFIX "/share"
-+#endif
-+
- #define PROGRAM "pepack"
- #define MAX_SIG_SIZE 2048
- 
-@@ -133,7 +140,7 @@ static bool loaddb(FILE **fp, const opti
-       *fp = fopen(dbfile, "r");       
-       if (!*fp) {
-               // TODO(jweyrich): This might change - Should we use a config.h with a constant from $(SHAREDIR)?
--              *fp = fopen("/usr/share/pev/userdb.txt", "r");
-+              *fp = fopen(DATADIR "/pev/userdb.txt", "r");
-       }
- 
-       return *fp != NULL;
diff -r 9a4196d4c31a -r b66f682d9758 security/pev/patches/patch-src_pesec.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/pev/patches/patch-src_pesec.c    Tue Oct 22 16:37:05 2019 +0000
@@ -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();



Home | Main Index | Thread Index | Old Index