From owner-svn-ports-all@freebsd.org Thu Mar 2 08:58:58 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 284AACF521B; Thu, 2 Mar 2017 08:58:58 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFD75BE1; Thu, 2 Mar 2017 08:58:57 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v228wv8K093143; Thu, 2 Mar 2017 08:58:57 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v228wuRK093140; Thu, 2 Mar 2017 08:58:56 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201703020858.v228wuRK093140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Thu, 2 Mar 2017 08:58:56 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r435215 - in head/security/afl: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2017 08:58:58 -0000 Author: tobik Date: Thu Mar 2 08:58:56 2017 New Revision: 435215 URL: https://svnweb.freebsd.org/changeset/ports/435215 Log: Update to 2.39b - Move to LLVM 3.9 - Remove TEST_INSTRUMENTATION option and move instrumentation tests to the test stage - Remove MINIMIZE_CORPUS option: afl-cmin was always installed anyway - Remove useless pkg-message: afl-cplot prompts you to install gnuplot on its own Changes: http://lcamtuf.coredump.cx/afl/ChangeLog.txt Approved by: mat (mentor) Differential Revision: https://reviews.freebsd.org/D9820 Deleted: head/security/afl/files/ head/security/afl/pkg-message Modified: head/security/afl/Makefile head/security/afl/distinfo head/security/afl/pkg-plist Modified: head/security/afl/Makefile ============================================================================== --- head/security/afl/Makefile Thu Mar 2 08:56:14 2017 (r435214) +++ head/security/afl/Makefile Thu Mar 2 08:58:56 2017 (r435215) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= afl -PORTVERSION= 2.36 +PORTVERSION= 2.39 DISTVERSIONSUFFIX= b CATEGORIES= security MASTER_SITES= http://lcamtuf.coredump.cx/afl/releases/ @@ -13,24 +13,25 @@ COMMENT= Fast instrumented fuzzer LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/docs/COPYING -USES= compiler gmake tar:tgz - -OPTIONS_DEFINE= DEBUG DOCS MINIMIZE_CORPUS LLVM TEST_INSTRUMENTATION -MINIMIZE_CORPUS_DESC= Install afl-cmin. Adds bash dependency -TEST_INSTRUMENTATION_DESC= Execute tests (expected to fail in jails) -LLVM_DESC= LLVM-based instrumentation (broken on 9.x) -OPTIONS_DEFAULT= LLVM MINIMIZE_CORPUS - -OPTIONS_SUB= yes - +# In theory afl supports other architectures with the LLVM plugin. +# It has to be compiled with AFL_NO_X86=1 in that case. ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= Uses binary instrumentation -LLVM_VERSION= 38 +USES= gmake tar:tgz + +TEST_TARGET= test_build +OPTIONS_DEFINE= DEBUG DOCS LLVM +OPTIONS_DEFAULT= LLVM +OPTIONS_SUB= yes + +LLVM_DESC= LLVM-based instrumentation +LLVM_VERSION= 39 LLVM_BUILD_DEPENDS= clang${LLVM_VERSION}:devel/llvm${LLVM_VERSION} LLVM_RUN_DEPENDS= clang${LLVM_VERSION}:devel/llvm${LLVM_VERSION} -MINIMIZE_CORPUS_RUN_DEPENDS= ${LOCALBASE}/bin/bash:shells/bash +LLVM_VARS= CC=clang${LLVM_VERSION} CXX=clang++${LLVM_VERSION} \ + MAKE_ARGS=LLVM_CONFIG=llvm-config${LLVM_VERSION} .include @@ -40,44 +41,40 @@ BUILD_DEPENDS+= ${LOCALBASE}/bin/as:deve RUN_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils .endif -MAKE_ARGS= INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ - INSTALL_SCRIPT="${INSTALL_SCRIPT}" - -post-patch-TEST_INSTRUMENTATION-off: -# afl needs shmget() which usually isn't available in jails. Disabling -# the instrumentation tests makes sure building packages in jails works -# by default anyway. - ${REINPLACE_CMD} -e 's@^\(all.*\) test_build@\1@' ${WRKSRC}/Makefile - ${REINPLACE_CMD} -e 's@^\(all.*\) test_build@\1@' ${WRKSRC}/llvm_mode/Makefile - post-patch: +# Disable the instrumentation tests to make sure building packages in +# jails works by default. afl needs shmget() which usually isn't +# available in jails. + @${REINPLACE_CMD} 's@^\(all.*\) test_build@\1@' \ + ${WRKSRC}/Makefile ${WRKSRC}/llvm_mode/Makefile .if ${ARCH} == "i386" - ${REINPLACE_CMD} -e 's@\( as_params\[0\] = afl_as ? afl_as : \)\(.*\)@\1(u8*)"${LOCALBASE}/bin/as";@' \ + @${REINPLACE_CMD} 's@\( as_params\[0\] = afl_as ? afl_as : \)\(.*\)@\1(u8*)"${LOCALBASE}/bin/as";@' \ ${WRKSRC}/afl-as.c .endif post-patch-LLVM-on: - ${REINPLACE_CMD} \ + @${REINPLACE_CMD} \ -e 's|"clang"|"clang${LLVM_VERSION}"|g' \ -e 's|"clang\+\+"|"clang\+\+${LLVM_VERSION}"|g' \ ${WRKSRC}/llvm_mode/afl-clang-fast.c post-build-LLVM-on: - @(cd ${WRKSRC}/llvm_mode; ${SETENV} \ - CC=clang${LLVM_VERSION} \ - CXX=clang++${LLVM_VERSION} \ - LLVM_CONFIG=llvm-config${LLVM_VERSION} \ - CFLAGS="${CFLAGS}" \ - CXXFLAGS="${CXXFLAGS}" \ - ${GMAKE}) + @(cd ${WRKSRC}/llvm_mode; ${DO_MAKE_BUILD} ${ALL_TARGET}) + +post-test-LLVM-on: + @(cd ${WRKSRC}/llvm_mode; ${DO_MAKE_BUILD} ${TEST_TARGET}) post-install: - ${INSTALL_DATA} ${WRKSRC}/docs/COPYING ${STAGEDIR}${DOCSDIR}/ -.for afl_script in afl-cmin afl-plot afl-whatsup - ${INSTALL_SCRIPT} ${WRKSRC}/${afl_script} ${STAGEDIR}${PREFIX}/bin/ +.for script in afl-cmin afl-plot afl-whatsup + ${INSTALL_SCRIPT} ${WRKSRC}/${script} ${STAGEDIR}${PREFIX}/bin +.endfor + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/afl/afl-as +.for prog in afl-analyze afl-fuzz afl-gcc afl-gotcpu afl-showmap afl-tmin + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${prog} .endfor -post-install-MINIMIZE_CORPUS-on: - ${INSTALL_SCRIPT} ${WRKSRC}/afl-cmin ${STAGEDIR}${PREFIX}/bin/ +post-install-LLVM-on: + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/afl/afl-llvm-pass.so + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/afl-clang-fast .include Modified: head/security/afl/distinfo ============================================================================== --- head/security/afl/distinfo Thu Mar 2 08:56:14 2017 (r435214) +++ head/security/afl/distinfo Thu Mar 2 08:58:56 2017 (r435215) @@ -1,3 +1,3 @@ -TIMESTAMP = 1484928306 -SHA256 (afl-2.36b.tgz) = d36e2643eaddbd6e79a0dd835fd6e23428198a7a7cd640e96ccbf21d5bd8bcc8 -SIZE (afl-2.36b.tgz) = 830689 +TIMESTAMP = 1487164780 +SHA256 (afl-2.39b.tgz) = 968eceae4d013eee62bc8f2fdddbb7060b92e03a0175153b0285ec7f5c78f141 +SIZE (afl-2.39b.tgz) = 830897 Modified: head/security/afl/pkg-plist ============================================================================== --- head/security/afl/pkg-plist Thu Mar 2 08:56:14 2017 (r435214) +++ head/security/afl/pkg-plist Thu Mar 2 08:58:56 2017 (r435215) @@ -7,7 +7,7 @@ bin/afl-clang++ %%LLVM%%lib/afl/afl-llvm-rt.o %%LLVM%%lib/afl/afl-llvm-rt-32.o %%LLVM%%lib/afl/afl-llvm-rt-64.o -%%MINIMIZE_CORPUS%%bin/afl-cmin +bin/afl-cmin bin/afl-fuzz bin/afl-g++ bin/afl-gcc @@ -69,7 +69,6 @@ lib/afl/as %%DATADIR%%/others/sql/simple_queries.sql %%DATADIR%%/others/text/hello_world.txt %%DATADIR%%/others/xml/small_document.xml -%%PORTDOCS%%%%DOCSDIR%%/COPYING %%PORTDOCS%%%%DOCSDIR%%/ChangeLog %%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%%%DOCSDIR%%/env_variables.txt