Update to 4.2.0
This commit is contained in:
parent
fc26ff2688
commit
0feb574bcc
3 changed files with 28 additions and 51 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -12,3 +12,4 @@
|
|||
/python-yara-4.0.5.tar.gz
|
||||
/python-yara-4.1.0.tar.gz
|
||||
/python-yara-4.1.3.tar.gz
|
||||
/python-yara-4.2.0.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,21 +1,15 @@
|
|||
Name: python-yara
|
||||
Version: 4.1.3
|
||||
%global baserelease 3
|
||||
Version: 4.2.0
|
||||
%global baserelease 1
|
||||
Summary: Python binding for the YARA pattern matching tool
|
||||
License: ASL 2.0
|
||||
URL: http://github.com/VirusTotal/yara-python/
|
||||
VCS: http://github.com/VirusTotal/yara-python/
|
||||
# http://VirusTotal.github.io/yara/
|
||||
# https://github.com/VirusTotal/yara-python/releases
|
||||
URL: https://github.com/VirusTotal/yara-python/
|
||||
|
||||
# By default build from a release tarball.
|
||||
# If you want to rebuild from a unversioned commit from git do that with
|
||||
# rpmbuild --rebuild python-yara.src.dpm --without release
|
||||
%bcond_without release
|
||||
|
||||
%global srcname yara
|
||||
%global gituser VirusTotal
|
||||
%global gitname %{srcname}-python
|
||||
%global commit dc838e211e45442d219012099aaa63efa812c4be
|
||||
%global gitdate 20210427
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
|
|
@ -29,27 +23,17 @@ of malware families (or whatever you want to describe) based on textual or
|
|||
binary patterns. Each description, a.k.a rule, consists of a set of strings
|
||||
and a Boolean expression which determine its logic.}
|
||||
|
||||
# Do the check during build
|
||||
%if 0%{?fedora} || ( 0%{?rhel} && 0%{?rhel} >= 7 )
|
||||
%global with_check 1
|
||||
# Build with python2 support for RHEL7
|
||||
%if ( 0%{?rhel} && 0%{?rhel} < 8 )
|
||||
%bcond_without python2
|
||||
%endif
|
||||
|
||||
%if ( 0%{?fedora} && 0%{?fedora} >= 30 ) || ( 0%{?rhel} && 0%{?rhel} >= 8 )
|
||||
# by default build without the python2 support on systems f30+ or rhel8+
|
||||
%bcond_with python2
|
||||
%else
|
||||
# build with the python2 support on system up to f29 and/or rhel7
|
||||
%bcond_without python2
|
||||
%endif
|
||||
|
||||
|
||||
|
||||
%if 0%{?with_release}
|
||||
Release: %{baserelease}%{?dist}
|
||||
Source0: https://github.com/%{gituser}/%{gitname}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source0: https://github.com/VirusTotal/yara-python/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
%else
|
||||
Release: %{baserelease}.%{gitdate}git%{shortcommit}%{?dist}
|
||||
Source0: https://github.com/%{gituser}/%{gitname}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
|
||||
Source0: https://github.com/VirusTotal/yara-python/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
|
||||
%endif
|
||||
|
||||
BuildRequires: gcc
|
||||
|
|
@ -75,24 +59,23 @@ BuildRequires: python2-setuptools
|
|||
%{common_description}
|
||||
|
||||
|
||||
|
||||
#====================================================================
|
||||
%package -n python%{python3_pkgversion}-%{srcname}
|
||||
%package -n python%{python3_pkgversion}-yara
|
||||
Summary: Python3 binding for the YARA pattern matching tool
|
||||
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
||||
%{?python_provide:%python_provide python%{python3_pkgversion}-yara}
|
||||
|
||||
|
||||
|
||||
%description -n python%{python3_pkgversion}-%{srcname}
|
||||
%description -n python%{python3_pkgversion}-yara
|
||||
%{common_description}
|
||||
|
||||
%if 0%{?with_python2} > 0
|
||||
%package -n python2-%{srcname}
|
||||
%package -n python2-yara
|
||||
Summary: Python2 binding for the YARA pattern matching tool
|
||||
%{?python_provide:%python_provide python2-%{srcname}}
|
||||
%{?python_provide:%python_provide python2-yara}
|
||||
|
||||
|
||||
%description -n python2-%{srcname}
|
||||
%description -n python2-yara
|
||||
%{common_description}
|
||||
%endif
|
||||
|
||||
|
|
@ -100,11 +83,11 @@ Summary: Python2 binding for the YARA pattern matching tool
|
|||
%prep
|
||||
%if 0%{?with_release}
|
||||
# Build from git release version
|
||||
%autosetup -n %{gitname}-%{version}
|
||||
%autosetup -n yara-python-%{version}
|
||||
|
||||
%else
|
||||
# Build from git commit
|
||||
%autosetup -n %{gitname}-%{commit}
|
||||
%autosetup -n yara-python-%{commit}
|
||||
%endif
|
||||
|
||||
|
||||
|
|
@ -130,35 +113,28 @@ Summary: Python2 binding for the YARA pattern matching tool
|
|||
|
||||
#====================================================================
|
||||
%check
|
||||
%if 0%{?with_check}
|
||||
# ==============================================================================
|
||||
|
||||
# 3.9.0 - testModuleData is always failing for architecture armv7hl
|
||||
%ifarch armv7hl
|
||||
EXCLUDE='not testModuleData'
|
||||
%endif
|
||||
|
||||
%pytest -k "$EXCLUDE" tests.py -v
|
||||
|
||||
# with_check
|
||||
%endif
|
||||
|
||||
%pytest tests.py -v
|
||||
|
||||
#====================================================================
|
||||
%files -n python%{python3_pkgversion}-%{srcname}
|
||||
%files -n python%{python3_pkgversion}-yara
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python3_sitearch}/%{srcname}*
|
||||
%{python3_sitearch}/yara*
|
||||
|
||||
%if 0%{?with_python2} > 0
|
||||
%files -n python2-%{srcname}
|
||||
%files -n python2-yara
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python2_sitearch}/%{srcname}*
|
||||
%{python2_sitearch}/yara*
|
||||
%endif
|
||||
|
||||
#====================================================================
|
||||
%changelog
|
||||
* Fri May 27 2022 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 4.2.0-1
|
||||
- Bump to 4.2.0 rhbz#2063287 fixes FTBFS rhbz#2064646
|
||||
- Minor changes to spec, like using https for URL
|
||||
- Simplify some of checks for different builds
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (python-yara-4.1.3.tar.gz) = 9c96ae78df7694dd55b8bdde4fad49043f120b94477fa9d7090610665072626eba4fa410cd9292205e0b18bb9f384f07288c0340232e163294b91051b84dcab2
|
||||
SHA512 (python-yara-4.2.0.tar.gz) = ba08d709fc51679ec9fe36165e0864b79fc241f85c681bf59823fe7bb0e34e928cded050ff296147eb5bcb837485f39949aa93425a0eb9ca8b3730e60fac93f4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue