[packages/yara] up to 4.3.2 (new soname)
atler
atler at pld-linux.org
Tue Jun 13 12:39:49 CEST 2023
commit 9ab70fd26012329db0404ef6578de7f25ee19528
Author: Jan Palus <atler at pld-linux.org>
Date: Tue Jun 13 12:38:35 2023 +0200
up to 4.3.2 (new soname)
- python module separeted again and moved back to python-yara.spec
cflags.patch | 21 ++++++++++++++-------
openssl.patch | 11 -----------
yara.spec | 52 +++++++---------------------------------------------
3 files changed, 21 insertions(+), 63 deletions(-)
---
diff --git a/yara.spec b/yara.spec
index f0a8653..2dbd702 100644
--- a/yara.spec
+++ b/yara.spec
@@ -4,32 +4,26 @@
# Conditional build:
%bcond_without static_libs # don't build static libraries
-%bcond_without python2 # CPython 2.x module
%bcond_without crypto # build without tests
Summary: The pattern matching swiss knife for malware researchers (and everyone else)
Name: yara
-Version: 3.4.0
-Release: 7
+Version: 4.3.2
+Release: 1
License: Apache v2.0
Group: Libraries
Source0: https://github.com/VirusTotal/yara/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: b3f9d4e00c1da4d37af05b1f4488255f
+# Source0-md5: cace2a274542e9c611c90b92b406a188
Patch0: cflags.patch
-Patch1: openssl.patch
URL: https://virustotal.github.io/yara/
BuildRequires: autoconf
BuildRequires: automake
+BuildRequires: bison
+BuildRequires: flex
BuildRequires: libtool
%{?with_crypto:BuildRequires: openssl-devel}
-BuildRequires: pcre-devel
BuildRequires: pkgconfig
BuildRequires: rpmbuild(macros) >= 1.714
-%if %{with python2}
-BuildRequires: python-devel
-BuildRequires: python-modules
-BuildRequires: rpm-pythonprov
-%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -65,36 +59,21 @@ Static yara library.
%description static -l pl.UTF-8
Statyczna biblioteka yara.
-%package -n python-%{name}
-Summary: Python bindings to yara library
-Group: Development/Languages/Python
-Requires: python-modules
-
-%description -n python-%{name}
-This is a Python extension that gives you access to YARA's powerful
-features from your own Python scripts.
-
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
%build
%{__aclocal} -I m4
%{__libtoolize}
%{__autoconf}
-%{__autoheader}
%{__automake}
%configure \
+ --disable-silent-rules \
%{__with_without crypto} \
%{!?with_static_libs:--disable-static}
%{__make}
-%if %{with python2}
-cd yara-python
-%py_build
-%endif
-
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
@@ -103,15 +82,6 @@ rm -rf $RPM_BUILD_ROOT
# obsoleted by pkg-config
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libyara.la
-%if %{with python2}
-cd yara-python
-%py_install
-
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
-%py_postclean
-%endif
-
%clean
rm -rf $RPM_BUILD_ROOT
@@ -124,7 +94,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/yara
%attr(755,root,root) %{_bindir}/yarac
%attr(755,root,root) %{_libdir}/libyara.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libyara.so.3
+%attr(755,root,root) %ghost %{_libdir}/libyara.so.10
%{_mandir}/man1/yara.1*
%{_mandir}/man1/yarac.1*
@@ -140,11 +110,3 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%{_libdir}/libyara.a
%endif
-
-%if %{with python2}
-%files -n python-%{name}
-%defattr(644,root,root,755)
-%doc yara-python/README
-%attr(755,root,root) %{py_sitedir}/yara.so
-%{py_sitedir}/yara_python-*.egg-info
-%endif
diff --git a/cflags.patch b/cflags.patch
index c418f10..81b6e4e 100644
--- a/cflags.patch
+++ b/cflags.patch
@@ -1,8 +1,15 @@
---- yara-3.4.0/Makefile.am~ 2015-06-18 16:33:39.000000000 +0300
-+++ yara-3.4.0/Makefile.am 2015-07-27 08:23:31.883410486 +0300
-@@ -1,4 +1,4 @@
--AM_CFLAGS=-O3 -std=gnu99 -Wall -I$(srcdir)/libyara/include
-+AM_CFLAGS= -std=gnu99 -Wall -I$(srcdir)/libyara/include
+--- yara-4.3.2/Makefile.am.orig 2023-06-13 12:11:39.686650055 +0200
++++ yara-4.3.2/Makefile.am 2023-06-13 12:13:32.926221667 +0200
+@@ -43,12 +43,6 @@
+ AM_CFLAGS+=-g -fno-omit-frame-pointer
+ endif
- # Build the library in the hand subdirectory first.
- SUBDIRS = libyara
+-if OPTIMIZATION
+-AM_CFLAGS+=-O3
+-else
+-AM_CFLAGS+=-O0
+-endif
+-
+ endif
+
+ if ADDRESS_SANITIZER
diff --git a/openssl.patch b/openssl.patch
deleted file mode 100644
index 2e7176d..0000000
--- a/openssl.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- yara-3.4.0/libyara/modules/pe.c.org 2018-09-22 16:41:31.655766625 +0200
-+++ yara-3.4.0/libyara/modules/pe.c 2018-09-22 16:50:38.629314185 +0200
-@@ -1155,7 +1155,7 @@ void pe_parse_certificates(
- pe->object,
- "signatures[%i].version", counter);
-
-- const char* sig_alg = OBJ_nid2ln(OBJ_obj2nid(cert->sig_alg->algorithm));
-+ const char* sig_alg = OBJ_nid2ln(X509_get_signature_nid(cert));
-
- set_string(sig_alg, pe->object, "signatures[%i].algorithm", counter);
-
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/yara.git/commitdiff/9ab70fd26012329db0404ef6578de7f25ee19528
More information about the pld-cvs-commit
mailing list