Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/afl: add profile file

From: Sören Tempel <soeren+git_at_soeren-tempel.net>
Date: Tue, 3 Jan 2017 01:32:59 +0100

Seems to be needed by afl-clang-fast.
---
 testing/afl/APKBUILD   | 26 ++++++++++++++++----------
 testing/afl/profile.sh |  1 +
 2 files changed, 17 insertions(+), 10 deletions(-)
 create mode 100644 testing/afl/profile.sh
diff --git a/testing/afl/APKBUILD b/testing/afl/APKBUILD
index 22db693239..9e87b98e71 100644
--- a/testing/afl/APKBUILD
+++ b/testing/afl/APKBUILD
_at_@ -6,26 +6,29 @@ pkgrel=0
 pkgdesc="american fuzzy lop is a fuzzer relying on genetic algorithms instead brute force"
 url="http://lcamtuf.coredump.cx/afl/"
 arch="all"
-license="apache_2_0"
+license="ASL 2.0"
 depends="clang clang-libs llvm llvm-libs"
 depends_dev=""
 makedepends="llvm-dev clang-dev"
 install=""
 subpackages="$pkgname-doc"
-source="http://lcamtuf.coredump.cx/afl/releases/$pkgname-$pkgver.tgz"
-
-_builddir="${srcdir}/${pkgname}-${pkgver}"
+source="http://lcamtuf.coredump.cx/$pkgname/releases/$pkgname-$pkgver.tgz
+	profile.sh"
 
+builddir="${srcdir}/${pkgname}-${pkgver}"
 build() {
 	# using the llvm mode, which is faster and portable
-	cd "$_builddir"
+	cd "$builddir"
 	make CC=clang BINDIR=/usr/bin AFL_NO_X86=1
 	make CC=clang BINDIR=/usr/bin AFL_NO_X86=1 -C llvm_mode
 }
 
 package() {
-	cd "$_builddir"
-	make AFL_NO_X86=1 BINDIR=/usr/bin PREFIX=/usr DESTDIR="$pkgdir" install
+	cd "$builddir"
+	make AFL_NO_X86=1 BINDIR=/usr/bin \
+		PREFIX=/usr DESTDIR="$pkgdir" install || return 1
+	install -Dm644 "$srcdir"/profile.sh \
+		"$pkgdir"/etc/profile.d/$pkgname.sh || return 1
 	
 	# Removing non llvm_mode compiler wrappers, which are slower and only
 	# working on x86
_at_@ -33,6 +36,9 @@ package() {
 	   "${pkgdir}/usr/bin/afl-gcc" "${pkgdir}/usr/bin/afl-g++"
 }
 
-md5sums="c28045f5f4703187cb308b2ac3fdd650  afl-2.35b.tgz"
-sha256sums="596167527ad7a69cf06dc8143a051eb8b2ee04f159447a3086f6e60ae460bcea  afl-2.35b.tgz"
-sha512sums="77f286d0008055770812b7429a671caed54adb2355cd88e1cbdd13f9e739763f46ed6f3e25ddfbe7aa2679e0a71c9b1af9767d1c367df1778338fcf260bc38c5  afl-2.35b.tgz"
+md5sums="c28045f5f4703187cb308b2ac3fdd650  afl-2.35b.tgz
+14486c5209f80bc7adc2c07db5c16024  profile.sh"
+sha256sums="596167527ad7a69cf06dc8143a051eb8b2ee04f159447a3086f6e60ae460bcea  afl-2.35b.tgz
+42f9597fb558fd80a37838362d25421716598af386e155f10ea76f62d93dcda6  profile.sh"
+sha512sums="77f286d0008055770812b7429a671caed54adb2355cd88e1cbdd13f9e739763f46ed6f3e25ddfbe7aa2679e0a71c9b1af9767d1c367df1778338fcf260bc38c5  afl-2.35b.tgz
+bad387c3a4fbdf40507b2f2f98307547ef0b4302a837f72ae44493561ee25b378d8fbfe6284aaa348b4df4c6d7059bba2dd47e357443e6eb0800bd4866aefb82  profile.sh"
diff --git a/testing/afl/profile.sh b/testing/afl/profile.sh
new file mode 100644
index 0000000000..a516cffd25
--- /dev/null
+++ b/testing/afl/profile.sh
_at_@ -0,0 +1 @@
+export AFL_PATH=/usr/lib/afl
-- 
2.11.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Jan 03 2017 - 01:32:59 GMT