Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yara for openSUSE:Factory checked in 
at 2023-02-17 16:45:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yara (Old)
 and      /work/SRC/openSUSE:Factory/.yara.new.22824 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yara"

Fri Feb 17 16:45:22 2023 rev:17 rq:1066288 version:4.2.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/yara/yara.changes        2022-08-23 
14:29:49.723635422 +0200
+++ /work/SRC/openSUSE:Factory/.yara.new.22824/yara.changes     2023-02-17 
16:45:33.251048195 +0100
@@ -1,0 +2,5 @@
+Mon Feb  6 18:32:53 UTC 2023 - Hans-Peter Jansen <[email protected]>
+
+- backport upstream fixes for file magic tests: fix-test-magic.patch
+
+-------------------------------------------------------------------

New:
----
  fix-test-magic.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yara.spec ++++++
--- /var/tmp/diff_new_pack.GaNiGK/_old  2023-02-17 16:45:33.963052204 +0100
+++ /var/tmp/diff_new_pack.GaNiGK/_new  2023-02-17 16:45:33.971052250 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package yara
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,6 +25,8 @@
 Group:          System/Filesystems
 URL:            https://virustotal.github.io/yara/
 Source:         
https://github.com/VirusTotal/yara/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM -- backport upstream fixes for file magic tests
+Patch:          fix-test-magic.patch
 BuildRequires:  file-devel
 BuildRequires:  flex
 BuildRequires:  libtool
@@ -80,7 +82,7 @@
 determines its logic.
 
 %prep
-%setup -q
+%autosetup -p1
 
 %build
 autoreconf -fvi

++++++ fix-test-magic.patch ++++++
--- yara-4.2.3/tests/test-magic.c~      2022-08-08 13:29:28.000000000 +0200
+++ yara-4.2.3/tests/test-magic.c       2023-02-06 19:30:13.743779898 +0100
@@ -23,8 +23,11 @@ int main(int argc, char** argv)
 
   assert_true_rule_blob(
       "import \"magic\" rule test { condition: \
-      magic.type() contains \"MS-DOS executable\" and \
-      magic.mime_type() == \"application/x-dosexec\" }",
+      ( magic.type() contains \"MS-DOS executable\" or \
+        magic.type() contains \"PE32+ executable\" or \
+        magic.type() contains \"PE32 executable\" ) and \
+      ( magic.mime_type() == \"application/x-dosexec\" or \
+        magic.mime_type() == \"application/vnd.microsoft.portable-executable\" 
) }",
       PE32_FILE);
 
   // Test case for https://github.com/VirusTotal/yara/issues/1663

Reply via email to