pkgsrc-WIP-changes archive

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

deepstate: add support for AFL



Module Name:	pkgsrc-wip
Committed By:	Pierre Pronchery <khorben%defora.org@localhost>
Pushed By:	khorben
Date:		Thu Sep 24 02:33:16 2020 +0200
Changeset:	468db7276a340461ad644177ef766bf05ce9defd

Modified Files:
	Makefile
	deepstate/Makefile
	deepstate/Makefile.common
	deepstate/PLIST
	py-deepstate/Makefile
	py-deepstate/PLIST
Added Files:
	deepstate-afl/DESCR
	deepstate-afl/Makefile
	deepstate-afl/PLIST

Log Message:
deepstate: add support for AFL

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=468db7276a340461ad644177ef766bf05ce9defd

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

diffstat:
 Makefile                  |  1 +
 deepstate-afl/DESCR       |  8 +++++
 deepstate-afl/Makefile    | 28 +++++++++++++++++
 deepstate-afl/PLIST       |  2 ++
 deepstate/Makefile        | 13 ++------
 deepstate/Makefile.common |  5 ++-
 deepstate/PLIST           |  8 -----
 py-deepstate/Makefile     |  7 +++--
 py-deepstate/PLIST        | 79 ++++++++++++++++++++++++++++++++++++++---------
 9 files changed, 113 insertions(+), 38 deletions(-)

diffs:
diff --git a/Makefile b/Makefile
index 0dd0d53970..f45660bf9d 100644
--- a/Makefile
+++ b/Makefile
@@ -611,6 +611,7 @@ SUBDIR+=	debugger-git
 SUBDIR+=	decode-dimms
 SUBDIR+=	dee
 SUBDIR+=	deepstate
+SUBDIR+=	deepstate-afl
 SUBDIR+=	deforaos-accessories
 SUBDIR+=	deforaos-desktop
 SUBDIR+=	deforaos-framer
diff --git a/deepstate-afl/DESCR b/deepstate-afl/DESCR
new file mode 100644
index 0000000000..c410c65f3d
--- /dev/null
+++ b/deepstate-afl/DESCR
@@ -0,0 +1,8 @@
+DeepState is a framework that provides C and C++ developers with a common
+interface to various symbolic execution and fuzzing engines. Users can write
+one test harness using a Google Test-like API, then execute it using multiple
+backends without having to learn the complexities of the underlying engines. It
+supports writing unit tests and API sequence tests, as well as automatic test
+generation.
+
+This package adds support for AFL to DeepState.
diff --git a/deepstate-afl/Makefile b/deepstate-afl/Makefile
new file mode 100644
index 0000000000..ae78fea5b9
--- /dev/null
+++ b/deepstate-afl/Makefile
@@ -0,0 +1,28 @@
+# $NetBSD$
+
+PKGNAME=	deepstate-afl-${VERSION}
+
+USE_LANGUAGES=	c99 c++
+USE_CMAKE=	yes
+AUTO_MKDIRS=	yes
+
+BUILD_DEPENDS+=	afl-[0-9]*:../../devel/afl
+DEPENDS+=	deepstate>=${VERSION}:../../wip/deepstate
+
+CMAKE_ARG_PATH=	${WRKSRC}
+CMAKE_ARGS+=	-DPYTHON=${PREFIX}/bin/python${PYVERSSUFFIX}
+CMAKE_ARGS+=	-DDEEPSTATE_AFL=ON
+CONFIGURE_DIRS=	${WRKSRC}/build
+#XXX should work with CONFIGURE_ENV instead
+PKGSRC_MAKE_ENV+=	CC=${LOCALBASE}/bin/afl-gcc
+PKGSRC_MAKE_ENV+=	CXX=${LOCALBASE}/bin/afl-g++
+
+pre-configure:
+	${MKDIR} ${CONFIGURE_DIRS}
+
+do-install:
+	${INSTALL_LIB} ${WRKSRC}/build/libdeepstate_AFL.a ${DESTDIR}${PREFIX}/lib
+
+.include "../../wip/deepstate/Makefile.common"
+.include "../../lang/python/pyversion.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/deepstate-afl/PLIST b/deepstate-afl/PLIST
new file mode 100644
index 0000000000..d798fd4a51
--- /dev/null
+++ b/deepstate-afl/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+lib/libdeepstate_AFL.a
diff --git a/deepstate/Makefile b/deepstate/Makefile
index 902819e3a8..3abfc2d815 100644
--- a/deepstate/Makefile
+++ b/deepstate/Makefile
@@ -1,15 +1,9 @@
 # $NetBSD$
 
-MASTER_SITES=	${MASTER_SITE_GITHUB:=trailofbits/}
-
 USE_LANGUAGES=	c99 c++
 USE_CMAKE=	yes
 AUTO_MKDIRS=	yes
 
-#XXX these two seem to require additional build steps
-BUILD_DEPENDS+=	afl-[0-9]*:../../devel/afl
-BUILD_DEPENDS+=	honggfuzz-[0-9]*:../../devel/honggfuzz
-
 DEPENDS+=	${PYPKGPREFIX}-angr-[0-9]*:../../wip/py-angr
 DEPENDS+=	${PYPKGPREFIX}-cachetools-[0-9]*:../../devel/py-cachetools
 DEPENDS+=	${PYPKGPREFIX}-cparser-[0-9]*:../../devel/py-cparser
@@ -35,15 +29,12 @@ PYTHON_VERSIONS_ACCEPTED=	37 36
 CMAKE_ARG_PATH=	${WRKSRC}
 CMAKE_ARGS+=       -DPYTHON=${PREFIX}/bin/python${PYVERSSUFFIX}
 CONFIGURE_DIRS=	${WRKSRC}/build
-PYSETUPSUBDIR=	build
 
 pre-configure:
-	${MKDIR} ${WRKSRC}/build
+	${MKDIR} ${CONFIGURE_DIRS}
 
 post-install:
-.for binaryfile in deepstate-afl deepstate-angora deepstate-eclipser \
-	deepstate-ensembler deepstate-honggfuzz deepstate-libfuzzer \
-	deepstate-manticore deepstate-reduce futurize pasteurize
+.for binaryfile in futurize pasteurize
 	${MV} ${FAKEHOMEDIR}/.local/bin/${binaryfile} ${DESTDIR}${PREFIX}/bin
 .endfor
 
diff --git a/deepstate/Makefile.common b/deepstate/Makefile.common
index e565eee5c9..658366033d 100644
--- a/deepstate/Makefile.common
+++ b/deepstate/Makefile.common
@@ -1,9 +1,11 @@
 # $NetBSD$
 #
 # used by wip/deepstate/Makefile
+# used by wip/deepstate-afl/Makefile
 # used by wip/py-deepstate/Makefile
 
-DISTNAME=	deepstate-0.1
+VERSION=	0.1
+DISTNAME=	deepstate-${VERSION}
 CATEGORIES=	devel
 MASTER_SITES=	${MASTER_SITE_GITHUB:=trailofbits/}
 GITHUB_PROJECT=	deepstate
@@ -15,3 +17,4 @@ COMMENT=	Augments C/C++ Test-Driven Development with Symbolic Execution
 LICENSE=	apache-2.0
 
 DISTINFO_FILE=	${.CURDIR}/../../wip/deepstate/distinfo
+PATCHDIR=	${.CURDIR}/../../wip/deepstate/patches
diff --git a/deepstate/PLIST b/deepstate/PLIST
index d9c09cf723..efe1f05521 100644
--- a/deepstate/PLIST
+++ b/deepstate/PLIST
@@ -1,12 +1,4 @@
 @comment $NetBSD$
-bin/deepstate-afl
-bin/deepstate-angora
-bin/deepstate-eclipser
-bin/deepstate-ensembler
-bin/deepstate-honggfuzz
-bin/deepstate-libfuzzer
-bin/deepstate-manticore
-bin/deepstate-reduce
 bin/futurize
 bin/pasteurize
 include/deepstate/Compiler.h
diff --git a/py-deepstate/Makefile b/py-deepstate/Makefile
index 2f43c725b0..d881ec4621 100644
--- a/py-deepstate/Makefile
+++ b/py-deepstate/Makefile
@@ -6,9 +6,10 @@ USE_LANGUAGES=	c99 c++
 USE_CMAKE=	yes
 AUTO_MKDIRS=	yes
 
-DEPENDS+=	deepstate-[0-9]*:../../wip/deepstate
+DEPENDS+=	deepstate>=${VERSION}:../../wip/deepstate
+DEPENDS+=	deepstate-afl>=${VERSION}:../../wip/deepstate-afl
 
-PYTHON_VERSIONS_ACCEPTED=	27
+PYTHON_VERSIONS_ACCEPTED=	37 36
 
 CMAKE_ARG_PATH=	${WRKSRC}
 CONFIGURE_DIRS=	${WRKSRC}/build
@@ -18,5 +19,5 @@ pre-configure:
 	${MKDIR} ${WRKSRC}/build
 
 .include "../../wip/deepstate/Makefile.common"
-.include "../../lang/python/distutils.mk"
+.include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/py-deepstate/PLIST b/py-deepstate/PLIST
index bf5e328569..36082ad455 100644
--- a/py-deepstate/PLIST
+++ b/py-deepstate/PLIST
@@ -1,22 +1,71 @@
 @comment $NetBSD$
 bin/deepstate
+bin/deepstate-afl
+bin/deepstate-angora
 bin/deepstate-angr
+bin/deepstate-eclipser
+bin/deepstate-ensembler
+bin/deepstate-honggfuzz
+bin/deepstate-libfuzzer
 bin/deepstate-manticore
-${PYSITELIB}/deepstate-0.1-py${PYVERSSUFFIX}.egg-info/PKG-INFO
-${PYSITELIB}/deepstate-0.1-py${PYVERSSUFFIX}.egg-info/SOURCES.txt
-${PYSITELIB}/deepstate-0.1-py${PYVERSSUFFIX}.egg-info/dependency_links.txt
-${PYSITELIB}/deepstate-0.1-py${PYVERSSUFFIX}.egg-info/entry_points.txt
-${PYSITELIB}/deepstate-0.1-py${PYVERSSUFFIX}.egg-info/requires.txt
-${PYSITELIB}/deepstate-0.1-py${PYVERSSUFFIX}.egg-info/top_level.txt
+bin/deepstate-reduce
+${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
+${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
+${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
+${PYSITELIB}/${EGG_INFODIR}/entry_points.txt
+${PYSITELIB}/${EGG_INFODIR}/requires.txt
+${PYSITELIB}/${EGG_INFODIR}/top_level.txt
 ${PYSITELIB}/deepstate/__init__.py
 ${PYSITELIB}/deepstate/__init__.pyc
 ${PYSITELIB}/deepstate/__init__.pyo
-${PYSITELIB}/deepstate/common.py
-${PYSITELIB}/deepstate/common.pyc
-${PYSITELIB}/deepstate/common.pyo
-${PYSITELIB}/deepstate/main_angr.py
-${PYSITELIB}/deepstate/main_angr.pyc
-${PYSITELIB}/deepstate/main_angr.pyo
-${PYSITELIB}/deepstate/main_manticore.py
-${PYSITELIB}/deepstate/main_manticore.pyc
-${PYSITELIB}/deepstate/main_manticore.pyo
+${PYSITELIB}/deepstate/core/__init__.py
+${PYSITELIB}/deepstate/core/__init__.pyc
+${PYSITELIB}/deepstate/core/__init__.pyo
+${PYSITELIB}/deepstate/core/base.py
+${PYSITELIB}/deepstate/core/base.pyc
+${PYSITELIB}/deepstate/core/base.pyo
+${PYSITELIB}/deepstate/core/fuzz.py
+${PYSITELIB}/deepstate/core/fuzz.pyc
+${PYSITELIB}/deepstate/core/fuzz.pyo
+${PYSITELIB}/deepstate/core/symex.py
+${PYSITELIB}/deepstate/core/symex.pyc
+${PYSITELIB}/deepstate/core/symex.pyo
+${PYSITELIB}/deepstate/executors/__init__.py
+${PYSITELIB}/deepstate/executors/__init__.pyc
+${PYSITELIB}/deepstate/executors/__init__.pyo
+${PYSITELIB}/deepstate/executors/auxiliary/__init__.py
+${PYSITELIB}/deepstate/executors/auxiliary/__init__.pyc
+${PYSITELIB}/deepstate/executors/auxiliary/__init__.pyo
+${PYSITELIB}/deepstate/executors/auxiliary/ensembler.py
+${PYSITELIB}/deepstate/executors/auxiliary/ensembler.pyc
+${PYSITELIB}/deepstate/executors/auxiliary/ensembler.pyo
+${PYSITELIB}/deepstate/executors/auxiliary/reducer.py
+${PYSITELIB}/deepstate/executors/auxiliary/reducer.pyc
+${PYSITELIB}/deepstate/executors/auxiliary/reducer.pyo
+${PYSITELIB}/deepstate/executors/fuzz/__init__.py
+${PYSITELIB}/deepstate/executors/fuzz/__init__.pyc
+${PYSITELIB}/deepstate/executors/fuzz/__init__.pyo
+${PYSITELIB}/deepstate/executors/fuzz/afl.py
+${PYSITELIB}/deepstate/executors/fuzz/afl.pyc
+${PYSITELIB}/deepstate/executors/fuzz/afl.pyo
+${PYSITELIB}/deepstate/executors/fuzz/angora.py
+${PYSITELIB}/deepstate/executors/fuzz/angora.pyc
+${PYSITELIB}/deepstate/executors/fuzz/angora.pyo
+${PYSITELIB}/deepstate/executors/fuzz/eclipser.py
+${PYSITELIB}/deepstate/executors/fuzz/eclipser.pyc
+${PYSITELIB}/deepstate/executors/fuzz/eclipser.pyo
+${PYSITELIB}/deepstate/executors/fuzz/honggfuzz.py
+${PYSITELIB}/deepstate/executors/fuzz/honggfuzz.pyc
+${PYSITELIB}/deepstate/executors/fuzz/honggfuzz.pyo
+${PYSITELIB}/deepstate/executors/fuzz/libfuzzer.py
+${PYSITELIB}/deepstate/executors/fuzz/libfuzzer.pyc
+${PYSITELIB}/deepstate/executors/fuzz/libfuzzer.pyo
+${PYSITELIB}/deepstate/executors/symex/__init__.py
+${PYSITELIB}/deepstate/executors/symex/__init__.pyc
+${PYSITELIB}/deepstate/executors/symex/__init__.pyo
+${PYSITELIB}/deepstate/executors/symex/angr.py
+${PYSITELIB}/deepstate/executors/symex/angr.pyc
+${PYSITELIB}/deepstate/executors/symex/angr.pyo
+${PYSITELIB}/deepstate/executors/symex/manticore.py
+${PYSITELIB}/deepstate/executors/symex/manticore.pyc
+${PYSITELIB}/deepstate/executors/symex/manticore.pyo


Home | Main Index | Thread Index | Old Index