File syzkaller.spec of Package syzkaller

#
# spec file for package syzkaller
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define version_unconverted 0.0+git.20160902
Name:           syzkaller
Version:        0.0+git.20160902
Release:        0
Summary:        Distributed, unsupervised, coverage-guided Linux syscall fuzzer
License:        Apache-2.0
Group:          Development/Tools/Other
Url:            https://github.com/google/syzkaller
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  gcc-c++
BuildRequires:  go >= 1.4
BuildRequires:  golang-packaging
BuildRequires:  make
BuildRequires:  xz
# for -fsanitize-coverage
Recommends:     gcc6
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  x86_64 aarch64 ppc64le
%{go_provides}

%description
syzkaller is a distributed, unsupervised, coverage-guided Linux syscall fuzzer.
It is meant to be used with KASAN (CONFIG_KASAN=y), KTSAN (CONFIG_KTSAN=y), or
KUBSAN.

%prep
%setup -q

%build
%goprep github.com/google/syzkaller
%gobuild ...

mkdir bin
make %{?_smp_mflags} CFLAGS="%{optflags}" NOSTATIC=1 executor

%install
%goinstall
install -m 0755 bin/syz-executor %{buildroot}/%{_bindir}

rm -rf $RPM_BUILD_ROOT%{go_contribdir} $RPM_BUILD_ROOT%{_bindir}/sysgen

%files
%defattr(-,root,root)
%doc AUTHORS CONTRIBUTORS LICENSE README.md syz-manager/example.cfg structure.png sys/sys.txt tools/create-image.sh
%{_bindir}/syz-execprog
%{_bindir}/syz-executor
%{_bindir}/syz-extract
%{_bindir}/syz-fuzzer
%{_bindir}/syz-manager
%{_bindir}/syz-mutate
%{_bindir}/syz-prog2c
%{_bindir}/syz-report
%{_bindir}/syz-repro
%{_bindir}/syz-stress
%{_bindir}/syz-upgrade

%changelog
openSUSE Build Service is sponsored by