From 6cc5652a9a659e5d223db651f0e8562eb2440f04 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 16:38:42 +0000 Subject: [PATCH 1/9] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-yara.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-yara.spec b/python-yara.spec index c2d3d98..81ecedd 100644 --- a/python-yara.spec +++ b/python-yara.spec @@ -1,6 +1,6 @@ Name: python-yara Version: 4.1.3 -%global baserelease 2 +%global baserelease 3 Summary: Python binding for the YARA pattern matching tool License: ASL 2.0 URL: http://github.com/VirusTotal/yara-python/ @@ -186,6 +186,9 @@ PYTHONPATH=%{buildroot}/%{python3_sitearch}/ "$NOSETESTS3" -v ./tests.py:TestYar #==================================================================== %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 4.1.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Nov 10 2021 Michal Ambroz - 4.1.3-2 - rebuild due to koji hickup From fc26ff268896fa8e66902cf53f979496851758dd Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Fri, 10 Dec 2021 18:23:54 +0100 Subject: [PATCH 2/9] Use pytest instead of the deprecated nose test runner --- python-yara.spec | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/python-yara.spec b/python-yara.spec index 81ecedd..72116ed 100644 --- a/python-yara.spec +++ b/python-yara.spec @@ -60,7 +60,7 @@ BuildRequires: yara-devel >= %{version} BuildRequires: /usr/bin/sphinx-build BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-nose +BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-setuptools @@ -132,40 +132,13 @@ Summary: Python2 binding for the YARA pattern matching tool %check %if 0%{?with_check} # ============================================================================== -# Tests for python3 used to always fail on testModuleData testcase -# Tests for python3 used to randomly fail on testCompare testcase -# reported to upstream - https://github.com/VirusTotal/yara-python/issues/21 -# temporarily run the failing tests but ignore the results for those 2 -# EXCLUDE='--exclude=^testCompare$|^testModuleData$' -# seems to be fixed in 3.9.0 -EXCLUDE='--exclude=^nothing$' - -# Yara is not prepared to run on s390 - more tests failing on s390 -# http://s390.koji.fedoraproject.org/kojifiles/work/tasks/9135/2399135/build.log -# https://github.com/VirusTotal/yara-python/issues/25 -# 3.6.3 - testCompileFile started failing - https://kojipkgs.fedoraproject.org//work/tasks/9619/20589619/build.log -# https://github.com/VirusTotal/yara-python/issues/54 -# seems to be fixed in 3.9.0 -%ifarch s390 s390x %{power64} -# EXCLUDE='--exclude=^testCompare$|^testModuleData$|^testEntrypoint$|^testIn$|^testIntegerFunctions$|^testCompileFile$' -EXCLUDE='--exclude=^nothing$' -%endif # 3.9.0 - testModuleData is always failing for architecture armv7hl %ifarch armv7hl -EXCLUDE='--exclude=^testModuleData$' +EXCLUDE='not testModuleData' %endif - -# Find the NOSETEST binary or use false if not present -NOSETESTS3=`ls /usr/bin/nosetests-3.* || which false ` -PYTHONPATH=%{buildroot}/%{python3_sitearch}/ "$NOSETESTS3" -v "$EXCLUDE" - -# Run potentially ignored tests separately so we can at least see the results -PYTHONPATH=%{buildroot}/%{python3_sitearch}/ "$NOSETESTS3" -v ./tests.py:TestYara.testCompare \ - ./tests.py:TestYara.testModuleData ./tests.py:TestYara.testEntrypoint \ - ./tests.py:TestYara.testIn ./tests.py:TestYara.testIntegerFunctions \ - ./tests.py:TestYara.testCompileFile || true +%pytest -k "$EXCLUDE" tests.py -v # with_check %endif From 0feb574bcc46b7ac93ede6839df77ac1f5c7b28c Mon Sep 17 00:00:00 2001 From: Mikel Olasagasti Uranga Date: Sat, 28 May 2022 15:37:17 +0200 Subject: [PATCH 3/9] Update to 4.2.0 --- .gitignore | 1 + python-yara.spec | 76 +++++++++++++++++------------------------------- sources | 2 +- 3 files changed, 28 insertions(+), 51 deletions(-) diff --git a/.gitignore b/.gitignore index 251f12e..9c8d924 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/python-yara.spec b/python-yara.spec index 72116ed..4cf0501 100644 --- a/python-yara.spec +++ b/python-yara.spec @@ -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 - 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 - 4.1.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 80e0b4b..d90e2ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-yara-4.1.3.tar.gz) = 9c96ae78df7694dd55b8bdde4fad49043f120b94477fa9d7090610665072626eba4fa410cd9292205e0b18bb9f384f07288c0340232e163294b91051b84dcab2 +SHA512 (python-yara-4.2.0.tar.gz) = ba08d709fc51679ec9fe36165e0864b79fc241f85c681bf59823fe7bb0e34e928cded050ff296147eb5bcb837485f39949aa93425a0eb9ca8b3730e60fac93f4 From 0a7853c6fb34171b9820217ae17e6801e4f8239b Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 18:23:12 +0200 Subject: [PATCH 4/9] Rebuilt for Python 3.11 --- python-yara.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-yara.spec b/python-yara.spec index 4cf0501..c151aab 100644 --- a/python-yara.spec +++ b/python-yara.spec @@ -1,6 +1,6 @@ Name: python-yara Version: 4.2.0 -%global baserelease 1 +%global baserelease 2 Summary: Python binding for the YARA pattern matching tool License: ASL 2.0 URL: https://github.com/VirusTotal/yara-python/ @@ -130,6 +130,9 @@ Summary: Python2 binding for the YARA pattern matching tool #==================================================================== %changelog +* Mon Jun 13 2022 Python Maint - 4.2.0-2 +- Rebuilt for Python 3.11 + * Fri May 27 2022 Mikel Olasagasti Uranga - 4.2.0-1 - Bump to 4.2.0 rhbz#2063287 fixes FTBFS rhbz#2064646 - Minor changes to spec, like using https for URL From 4ef1161449358ef43baf12ebd7960c591258c1c9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 22 Jul 2022 23:36:12 +0000 Subject: [PATCH 5/9] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-yara.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-yara.spec b/python-yara.spec index c151aab..7de139d 100644 --- a/python-yara.spec +++ b/python-yara.spec @@ -1,6 +1,6 @@ Name: python-yara Version: 4.2.0 -%global baserelease 2 +%global baserelease 3 Summary: Python binding for the YARA pattern matching tool License: ASL 2.0 URL: https://github.com/VirusTotal/yara-python/ @@ -130,6 +130,9 @@ Summary: Python2 binding for the YARA pattern matching tool #==================================================================== %changelog +* Fri Jul 22 2022 Fedora Release Engineering - 4.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 13 2022 Python Maint - 4.2.0-2 - Rebuilt for Python 3.11 From 5e3e36a2b06b6a3987e230814e70a514b8d82592 Mon Sep 17 00:00:00 2001 From: Mikel Olasagasti Uranga Date: Mon, 8 Aug 2022 10:49:45 +0200 Subject: [PATCH 6/9] Skip testModuleData again for F36 --- python-yara.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python-yara.spec b/python-yara.spec index 7de139d..e4fbcec 100644 --- a/python-yara.spec +++ b/python-yara.spec @@ -113,7 +113,13 @@ Summary: Python2 binding for the YARA pattern matching tool #==================================================================== %check -%pytest tests.py -v +# testModuleData is always failing for architecture armv7hl +# Remove once Fedora 36 is EOL +%ifarch armv7hl +EXCLUDE='not testModuleData' +%endif + +%pytest -k "$EXCLUDE" tests.py -v #==================================================================== %files -n python%{python3_pkgversion}-yara From 2bd7b63f3fe9c2e5f83ca79373843e6d5938804b Mon Sep 17 00:00:00 2001 From: Mikel Olasagasti Uranga Date: Mon, 8 Aug 2022 10:51:51 +0200 Subject: [PATCH 7/9] Fix baserelease and add changelog --- python-yara.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-yara.spec b/python-yara.spec index e4fbcec..04dec94 100644 --- a/python-yara.spec +++ b/python-yara.spec @@ -1,6 +1,6 @@ Name: python-yara Version: 4.2.0 -%global baserelease 3 +%global baserelease 4 Summary: Python binding for the YARA pattern matching tool License: ASL 2.0 URL: https://github.com/VirusTotal/yara-python/ @@ -136,6 +136,9 @@ EXCLUDE='not testModuleData' #==================================================================== %changelog +* Fri May 27 2022 Mikel Olasagasti Uranga - 4.2.0-4 +- Skip testModuleData again for F36, fixes rhbz#2116289 + * Fri Jul 22 2022 Fedora Release Engineering - 4.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 401521419d8a2759bbdfc91527815f32161145e5 Mon Sep 17 00:00:00 2001 From: Mikel Olasagasti Uranga Date: Tue, 9 Aug 2022 11:51:37 +0200 Subject: [PATCH 8/9] Rebuilt for yara-4.2.3 --- python-yara.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-yara.spec b/python-yara.spec index 04dec94..7991442 100644 --- a/python-yara.spec +++ b/python-yara.spec @@ -1,6 +1,6 @@ Name: python-yara Version: 4.2.0 -%global baserelease 4 +%global baserelease 5 Summary: Python binding for the YARA pattern matching tool License: ASL 2.0 URL: https://github.com/VirusTotal/yara-python/ @@ -136,7 +136,10 @@ EXCLUDE='not testModuleData' #==================================================================== %changelog -* Fri May 27 2022 Mikel Olasagasti Uranga - 4.2.0-4 +* Tue Aug 09 2022 Mikel Olasagasti Uranga - 4.2.0-5 +- Rebuilt for yara-4.2.3 + +* Mon Aug 08 2022 Mikel Olasagasti Uranga - 4.2.0-4 - Skip testModuleData again for F36, fixes rhbz#2116289 * Fri Jul 22 2022 Fedora Release Engineering - 4.2.0-3 From 5f9aff5b8c94524a90ae29f90b5620cc29035c07 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Tue, 1 Nov 2022 15:57:17 +0100 Subject: [PATCH 9/9] bump to 4.2.3 --- .gitignore | 1 + python-yara.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 9c8d924..9900f72 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /python-yara-4.1.0.tar.gz /python-yara-4.1.3.tar.gz /python-yara-4.2.0.tar.gz +/python-yara-4.2.3.tar.gz diff --git a/python-yara.spec b/python-yara.spec index 7991442..4d3a80e 100644 --- a/python-yara.spec +++ b/python-yara.spec @@ -1,6 +1,6 @@ Name: python-yara -Version: 4.2.0 -%global baserelease 5 +Version: 4.2.3 +%global baserelease 1 Summary: Python binding for the YARA pattern matching tool License: ASL 2.0 URL: https://github.com/VirusTotal/yara-python/ @@ -10,8 +10,8 @@ URL: https://github.com/VirusTotal/yara-python/ # rpmbuild --rebuild python-yara.src.dpm --without release %bcond_without release -%global commit dc838e211e45442d219012099aaa63efa812c4be -%global gitdate 20210427 +%global commit 8106b84fa967bcd2fff4f5a40e558c36bb8d54e8 +%global gitdate 20220809 %global shortcommit %(c=%{commit}; echo ${c:0:7}) @@ -136,6 +136,9 @@ EXCLUDE='not testModuleData' #==================================================================== %changelog +* Tue Nov 01 2022 Michal Ambroz - 4.2.3-1 +- Rebuilt for yara-4.2.3 - second service :) + * Tue Aug 09 2022 Mikel Olasagasti Uranga - 4.2.0-5 - Rebuilt for yara-4.2.3 diff --git a/sources b/sources index d90e2ad..0e1be0c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-yara-4.2.0.tar.gz) = ba08d709fc51679ec9fe36165e0864b79fc241f85c681bf59823fe7bb0e34e928cded050ff296147eb5bcb837485f39949aa93425a0eb9ca8b3730e60fac93f4 +SHA512 (python-yara-4.2.3.tar.gz) = 588875d820f4e1b2aa5c6bbe83814ba2756f5ed301ba652efd280d5ca9745f7388f1f9eaa3875d11de5644ce9c41dcb76eebbee86269f8d6723c7d16ffa134be