2015-02-16 14:04:02 +01:00
|
|
|
#
|
|
|
|
# spec file for package afl
|
|
|
|
#
|
2023-01-05 17:01:05 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2015-02-16 14:04:02 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-12-27 17:48:56 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-02-16 14:04:02 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-03-31 11:27:56 +02:00
|
|
|
%define afl_rt compiler-rt,llvm-rt,llvm-rt-lto
|
|
|
|
|
|
|
|
%ifarch %{arm} %ix86 s390x x86_64
|
|
|
|
%define afl_32 1
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifarch aarch64 ppc64 ppc64le riscv64 s390x x86_64
|
|
|
|
%define afl_64 1
|
|
|
|
%endif
|
|
|
|
|
2015-02-16 14:04:02 +01:00
|
|
|
Name: afl
|
2023-08-14 11:21:29 +02:00
|
|
|
Version: 4.08c
|
2015-02-16 14:04:02 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: American fuzzy lop is a security-oriented fuzzer
|
2022-01-31 14:22:18 +01:00
|
|
|
#URL: https://lcamtuf.coredump.cx/afl/
|
2015-02-16 14:04:02 +01:00
|
|
|
License: Apache-2.0
|
2022-01-31 14:22:18 +01:00
|
|
|
URL: https://github.com/AFLplusplus/AFLplusplus
|
2023-08-14 11:21:29 +02:00
|
|
|
Source: https://github.com/AFLplusplus/AFLplusplus/archive/v%{version}.tar.gz
|
2015-03-27 15:44:52 +01:00
|
|
|
Source1: afl-rpmlintrc
|
2020-12-15 14:57:19 +01:00
|
|
|
Patch1: afl-3.0c-fix-paths.patch
|
2015-02-16 14:04:02 +01:00
|
|
|
BuildRequires: gcc-c++
|
2023-04-12 11:29:04 +02:00
|
|
|
BuildRequires: (clang < 16 or clang15)
|
2021-09-26 13:20:54 +02:00
|
|
|
%ifarch x86_64
|
|
|
|
BuildRequires: gcc-32bit
|
|
|
|
%endif
|
|
|
|
%if %?suse_version >= 1550
|
|
|
|
BuildRequires: gcc-devel
|
|
|
|
%endif
|
2021-04-04 10:47:30 +02:00
|
|
|
BuildRequires: lld
|
2020-12-15 14:57:19 +01:00
|
|
|
BuildRequires: python3-devel
|
2023-04-12 11:29:04 +02:00
|
|
|
BuildRequires: ((llvm-devel >= 11.0.0 with llvm-devel < 16) or llvm15-devel)
|
2021-04-04 10:47:30 +02:00
|
|
|
Requires: lld
|
2015-02-16 14:04:02 +01:00
|
|
|
|
|
|
|
%description
|
2016-10-20 20:27:52 +02:00
|
|
|
American fuzzy lop is a security-oriented fuzzer that employs a novel type
|
|
|
|
of compile-time instrumentation and genetic algorithms to automatically
|
|
|
|
discover clean, interesting test cases that trigger new internal states in
|
|
|
|
the targeted binary. This substantially improves the functional coverage
|
|
|
|
for the fuzzed code. The compact synthesized corpora produced by the tool
|
|
|
|
are also useful for seeding other, more labor- or resource-intensive
|
|
|
|
testing regimes down the road.
|
2015-02-16 14:04:02 +01:00
|
|
|
|
2016-10-20 20:27:52 +02:00
|
|
|
Compared to other instrumented fuzzers, afl-fuzz is designed to be
|
|
|
|
practical: it has modest performance overhead, uses a variety of highly
|
|
|
|
effective fuzzing strategies and effort minimization tricks, requires
|
|
|
|
essentially no configuration, and seamlessly handles complex, real-world
|
|
|
|
use cases - say, common image parsing or file compression libraries.
|
2015-02-16 14:04:02 +01:00
|
|
|
|
|
|
|
%prep
|
2019-06-24 09:24:50 +02:00
|
|
|
%setup -q -n AFLplusplus-%version
|
2015-03-27 21:33:36 +01:00
|
|
|
%patch1 -p1
|
2021-04-04 10:47:30 +02:00
|
|
|
sed -i 's|#!/usr/bin/env sh|#!/bin/sh|g' afl-cmin
|
|
|
|
sed -i 's|#!/usr/bin/env bash|#!/bin/bash|g' afl-cmin.bash
|
2015-02-16 14:04:02 +01:00
|
|
|
|
|
|
|
%build
|
2021-03-16 12:48:35 +01:00
|
|
|
export CFLAGS="$CFLAGS %{optflags} -fno-lto"
|
2018-08-30 17:07:23 +02:00
|
|
|
%ifnarch %{ix86} x86_64
|
|
|
|
export AFL_NO_X86=1
|
|
|
|
%endif
|
2021-04-04 10:47:30 +02:00
|
|
|
make %{?_smp_mflags} PREFIX=%{_prefix} LIBEXEC_DIR=%{_libexecdir} DOC_DIR=%{_docdir}
|
2020-07-02 15:33:33 +02:00
|
|
|
# make radamsa
|
2015-02-16 14:04:02 +01:00
|
|
|
|
|
|
|
%install
|
2018-08-30 17:07:23 +02:00
|
|
|
%ifnarch %{ix86} x86_64
|
|
|
|
export AFL_NO_X86=1
|
|
|
|
%endif
|
2019-11-10 11:24:08 +01:00
|
|
|
make %{?_smp_mflags} PREFIX=%{_prefix} LIBEXEC_DIR=%{_libexecdir} DOC_DIR=%{_docdir} MAN_PATH=%{_mandir}/man8 DESTDIR=%{buildroot} install
|
2021-04-04 10:47:30 +02:00
|
|
|
chmod -x %{buildroot}/%{_libexecdir}/%{name}/*.o
|
2015-02-16 14:04:02 +01:00
|
|
|
|
|
|
|
%files
|
2020-02-25 17:42:55 +01:00
|
|
|
%license docs/COPYING LICENSE
|
|
|
|
%doc /usr/share/doc/packages/%name/
|
2015-02-16 14:04:02 +01:00
|
|
|
%{_bindir}/%{name}-*
|
2015-03-27 15:44:52 +01:00
|
|
|
%dir %{_libexecdir}/%{name}
|
|
|
|
%{_libexecdir}/%{name}/%{name}-as
|
|
|
|
%{_libexecdir}/%{name}/as
|
2022-03-31 11:27:56 +02:00
|
|
|
%if 0%{?afl_64}
|
|
|
|
%{_libexecdir}/%{name}/afl-{%{afl_rt}}-64.o
|
2020-12-15 14:57:19 +01:00
|
|
|
%endif
|
2022-03-31 11:27:56 +02:00
|
|
|
%if 0%{?afl_32}
|
|
|
|
%{_libexecdir}/%{name}/afl-{%{afl_rt}}-32.o
|
2021-06-08 11:11:00 +02:00
|
|
|
%endif
|
2022-03-31 11:27:56 +02:00
|
|
|
%ifarch aarch64
|
2021-04-04 10:47:30 +02:00
|
|
|
%{_libexecdir}/%{name}/afl-llvm-rt-lto-32.o
|
2020-12-15 14:57:19 +01:00
|
|
|
%endif
|
2022-03-31 11:27:56 +02:00
|
|
|
%{_libexecdir}/%{name}/afl-{%{afl_rt}}.o
|
2020-12-15 14:57:19 +01:00
|
|
|
%{_libexecdir}/%{name}/dynamic_list.txt
|
2021-03-16 12:48:35 +01:00
|
|
|
%{_libexecdir}/%{name}/*.so
|
2021-07-20 10:02:42 +02:00
|
|
|
%{_libexecdir}/%{name}/*.a
|
2015-02-16 14:04:02 +01:00
|
|
|
%dir %{_datadir}/%{name}
|
|
|
|
%dir %{_datadir}/%{name}/testcases
|
|
|
|
%{_datadir}/%{name}/testcases/*
|
2016-10-20 20:27:52 +02:00
|
|
|
%dir %{_datadir}/afl/dictionaries/
|
|
|
|
%{_datadir}/afl/dictionaries/*
|
2019-11-10 11:24:08 +01:00
|
|
|
%{_mandir}/man8/afl*.8*
|
2015-02-16 14:04:02 +01:00
|
|
|
|
2015-03-27 15:44:52 +01:00
|
|
|
%changelog
|