From ce01c7535ce536a17fecb491da538c232f5c87de Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Wed, 12 Jul 2023 20:12:07 +0200 Subject: [PATCH 1/2] New package: afl++-4.07c --- srcpkgs/afl++/patches/limits.patch | 11 +++++++++++ srcpkgs/afl++/template | 27 +++++++++++++++++++++++++++ srcpkgs/afl++/update | 1 + 3 files changed, 39 insertions(+) create mode 100644 srcpkgs/afl++/patches/limits.patch create mode 100644 srcpkgs/afl++/template create mode 100644 srcpkgs/afl++/update diff --git a/srcpkgs/afl++/patches/limits.patch b/srcpkgs/afl++/patches/limits.patch new file mode 100644 index 0000000000000..c8463b898a642 --- /dev/null +++ b/srcpkgs/afl++/patches/limits.patch @@ -0,0 +1,11 @@ +--- a/src/afl-ld-lto.c ++++ b/src/afl-ld-lto.c +@@ -45,7 +45,7 @@ + + #include + +-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || \ ++#if 1 || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || \ + defined(__DragonFly__) + #include + #endif diff --git a/srcpkgs/afl++/template b/srcpkgs/afl++/template new file mode 100644 index 0000000000000..705a67310b529 --- /dev/null +++ b/srcpkgs/afl++/template @@ -0,0 +1,27 @@ +# Template file for 'afl++' +pkgname=afl++ +version=4.07c +revision=1 +# x86 only currently +archs="i686* x86_64*" +build_style=gnu-makefile +hostmakedepends="which" +makedepends="clang gmp-devel lld llvm python3-devel" +short_desc="American fuzzy lop Plus Plus - a brute-force fuzzer" +maintainer="Leah Neukirchen " +license="Apache-2.0" +homepage="https://aflplus.plus/" +distfiles="https://github.com/AFLplusplus/AFLplusplus/archive/refs/tags/${version}.tar.gz" +checksum=cdb42834359b17336047814d1c24845f606456dbe4e6aff5edac66c21aa577db +conflicts="afl>=0" +replaces="afl>=0" + +nostrip_files="small_archive.a small_exec.elf" + +export LLVM_CONFIG=llvm-config + +post_install() { + # Test cases contain binary .../testcases/others/elf/small_exec.elf + # so move them to /usr/lib/afl + mv ${DESTDIR}/usr/{share,lib}/afl/testcases +} diff --git a/srcpkgs/afl++/update b/srcpkgs/afl++/update new file mode 100644 index 0000000000000..bb22392e73315 --- /dev/null +++ b/srcpkgs/afl++/update @@ -0,0 +1 @@ +pattern='/\K\d+\.[\d.]+c' From c5b509aacf0f3343146a00166a6ef0408194b143 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Wed, 12 Jul 2023 20:12:17 +0200 Subject: [PATCH 2/2] afl: remove, upstream unmaintained. Replaced by afl++. --- srcpkgs/afl/template | 32 -------------------------------- srcpkgs/afl/update | 1 - 2 files changed, 33 deletions(-) delete mode 100644 srcpkgs/afl/template delete mode 100644 srcpkgs/afl/update diff --git a/srcpkgs/afl/template b/srcpkgs/afl/template deleted file mode 100644 index 0f5562dee17c1..0000000000000 --- a/srcpkgs/afl/template +++ /dev/null @@ -1,32 +0,0 @@ -# Template file for 'afl' -pkgname=afl -version=2.57b -revision=1 -# x86 only currently -archs="i686* x86_64*" -build_style=gnu-makefile -hostmakedepends="clang llvm which" -short_desc="American fuzzy lop - a brute-force fuzzer" -maintainer="Leah Neukirchen " -license="Apache-2.0" -homepage="https://github.com/google/AFL/" -distfiles="https://github.com/google/AFL/archive/v${version}.tar.gz" -checksum=6f05a6515c07abe49f6f292bd13c96004cc1e016bda0c3cc9c2769dd43f163ee - -nostrip_files="small_archive.a small_exec.elf" - -do_build() { - make PREFIX=/usr - - CFLAGS="${CFLAGS//-fstack-clash-protection} -fPIC" \ - CXXFLAGS="${CXXFLAGS//-fstack-clash-protection} -fPIC" \ - LDFLAGS="${LDFLAGS} -pie" \ - make PREFIX=/usr CC=clang CXX=clang++ -C llvm_mode -} - -post_install() { - # Test cases contain binary .../testcases/others/elf/small_exec.elf - # so move them to /usr/lib/afl - mv ${DESTDIR}/usr/{share,lib}/afl/testcases -} - diff --git a/srcpkgs/afl/update b/srcpkgs/afl/update deleted file mode 100644 index a7e36afa8b61f..0000000000000 --- a/srcpkgs/afl/update +++ /dev/null @@ -1 +0,0 @@ -pattern='v\K[\d.]+b'