Build yara-4.2.3 & remove androguard module

This commit is contained in:
Mark Huth 2022-08-16 14:40:22 +10:00 committed by Stepan Oksanichenko
parent 2bf1690134
commit f9fe03e3d7
4 changed files with 13 additions and 55 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/androguard-yara-2020-04-22-3eea86a.tar.gz
/yara-4.2.1.tar.gz
/yara-4.2.3.tar.gz

1
.yara.metadata Normal file
View File

@ -0,0 +1 @@
1c0776d0b147e260dc51b1f2002235f07d9cacd8 yara-4.2.3.tar.gz

View File

@ -1,2 +1 @@
SHA512 (androguard-yara-2020-04-22-3eea86a.tar.gz) = 827962b3c6f46cb9106e40156c85ec5a99fd0d4fa3584434b5ba60adbd8265df9c85d03172df36cc15a2a0983bad0297317b27e25372aa09121411e01c1d29be
SHA512 (yara-4.2.1.tar.gz) = 036a35d713647b23998135da0d27c13a8876aa44e18e3c9dc99fa425273d7c4a953cbdc78f413f29e8bf818d84b340d0719e241d2a83b7165a16d97e952c45b0
SHA512 (yara-4.2.3.tar.gz) = 1df23837d14d3f9f72db901190e7412241514a8914d72b753df32ad8a44c7a49ad8f14941a95de83754e4d1dd0f23d712d8e6a43916343341b92cb1bc66f3c09

View File

@ -1,6 +1,6 @@
Name: yara
Version: 4.2.1
Release: 4%{?dist}
Version: 4.2.3
Release: 1%{?dist}
Summary: Pattern matching Swiss knife for malware researchers
License: BSD-3-Clause
@ -11,44 +11,10 @@ URL: http://VirusTotal.github.io/yara/
%global gituser VirusTotal
%global gitname yara
# Commit of version 4.1.1
%global commit 8206dc6f728fe50e21af92cb40e454b68ef6af05
%global shortcommit %(c=%{commit}; echo ${c:0:7})
# additional module for yara
%global androguard_gituser Koodous
%global androguard_gitname androguard-yara
# Commit from 2020-04-22
%global androguard_commit 3eea86ae2c4ee6ad3cc1cb3c2711b03db078831a
%global androguard_shortcommit %(c=%{androguard_commit}; echo ${c:0:7})
%global androguard_gitdate 2020-04-22
# Build from git commit baseline
#Source0: https://github.com/%%{gituser}/%%{gitname}/archive/%%{commit}/%%{name}-%%{version}-%%{shortcommit}.tar.gz
# Build from git release version
Source0: https://github.com/%{gituser}/%{gitname}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# http://github.com/Koodous/androguard-yara/
Source1: https://github.com/%{androguard_gituser}/%{androguard_gitname}/archive/%{androguard_commit}/%{androguard_gitname}-%{androguard_gitdate}-%{androguard_shortcommit}.tar.gz
# Patch based on the androguard-yara installation guide to enable the androguard module
Patch0: yara-androguard.patch
# Use default sphix theme to generate documentation rather than sphinx_rtd_theme
# to avoid static installation of font files on fedora >= 24
Patch1: yara-docs-theme.patch
# Fixed in 3.6.0 upstream
# Patch https://patch-diff.githubusercontent.com/raw/VirusTotal/yara/pull/627.patch
# Fixes: CVE-2016-10210 CVE-2016-10211 CVE-2017-5923 CVE-2017-5924
# Patch2: %%{name}-pull627.patch
# API of yr_re_match changed, fix needed for Androguard
# https://github.com/Koodous/androguard-yara/issues/8
# merged in https://github.com/Koodous/androguard-yara/commit/034f0a49e58d798abcaa28c9864451da9da29413
# Patch3: yara-androguard-matchapi.patch
BuildRequires: git
BuildRequires: gcc
@ -102,19 +68,8 @@ developing applications that use %{name}.
%prep
# autosetup -n %%{gitname}-%%{commit} -p 1 -S git
%autosetup -p 1 -S git
# Add the Androguard module
# %%setup -qn %%{gitname}-%%{commit} -a 1 -D -T
%setup -q -a 1 -D -T
pushd %{androguard_gitname}-%{androguard_commit}
mkdir -p ../libyara/modules/androguard
cp -p androguard.c ../libyara/modules/androguard/
popd
%setup -q
autoreconf --force --install
@ -150,11 +105,6 @@ rm %{buildroot}%{_libdir}/lib%{name}.a
rm -f %{buildroot}%{_datadir}/doc/%{name}/html/.buildinfo
#%if 0%{?rhel} && 0%{?rhel} <= 7
#%ldconfig_scriptlets
#%endif
%files
%license COPYING
%doc AUTHORS CONTRIBUTORS README.md
@ -178,6 +128,13 @@ rm -f %{buildroot}%{_datadir}/doc/%{name}/html/.buildinfo
%changelog
* Tue Aug 16 2022 Mark Huth <mhuth@redhat.com> - 4.2.3-1
- Bump to 4.2.3
- Remove androguard module - github repo no longer exists
* Thu Jun 16 2022 Mark Huth <mhuth@redhat.com> - 4.2.1-4
- Use licence identifier BSD-3-Clause
* Thu Jun 9 2022 Mark Huth <mhuth@redhat.com> - 4.2.1-2
- Change spec file license to match COPYING file