From: Jeremy Puhlman <[email protected]> Somewhere a long the line someone hand modified the yara_grammar.h file but didn't add code to generate the same code. The result is if the file is regenerated from the .y file it complains about a missing definition of YR_COMPILER.
This is fixed in 0.103. Backported code snippet to resolve the issue. Signed-off-by: Jeremy Puhlman <[email protected]> --- ...yara_grammar.h-to-include-yara_compi.patch | 32 +++++++++++++++++++ recipes-scanners/clamav/clamav_0.101.5.bb | 1 + 2 files changed, 33 insertions(+) create mode 100644 recipes-scanners/clamav/clamav-0.101.5/0001-force-generated-yara_grammar.h-to-include-yara_compi.patch diff --git a/recipes-scanners/clamav/clamav-0.101.5/0001-force-generated-yara_grammar.h-to-include-yara_compi.patch b/recipes-scanners/clamav/clamav-0.101.5/0001-force-generated-yara_grammar.h-to-include-yara_compi.patch new file mode 100644 index 0000000..1abbaea --- /dev/null +++ b/recipes-scanners/clamav/clamav-0.101.5/0001-force-generated-yara_grammar.h-to-include-yara_compi.patch @@ -0,0 +1,32 @@ +From e7201870e19dea1bc3bc1bb16288c5135709ec6c Mon Sep 17 00:00:00 2001 +From: Jeremy Puhlman <[email protected]> +Date: Thu, 2 Jul 2020 23:41:17 +0000 +Subject: [PATCH] force generated yara_grammar.h to include yara_compiler.h + +Someone manually modified yara_grammar.h to inlude yara_compiler.h, +however if yara_grammar.h is generated from yara_grammar.y, it fails +to build because YR_COMPILER is not defined. + +Upstream-Status: Backport [https://github.com/Cisco-Talos/clamav-devel/commit/8e765853d07098a13b4f352c2c77e4d3873905f6#diff-0a6403048e9f5a96598ba9d1d45c7b31] +--- + libclamav/yara_grammar.y | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/libclamav/yara_grammar.y b/libclamav/yara_grammar.y +index cb893975d..eb0784a2a 100644 +--- a/libclamav/yara_grammar.y ++++ b/libclamav/yara_grammar.y +@@ -36,6 +36,10 @@ See the License for the specific language governing permissions and + limitations under the License. + */ + ++%code requires { ++#include "yara_compiler.h" ++} ++ + %{ + + #include <assert.h> +-- +2.24.3 + diff --git a/recipes-scanners/clamav/clamav_0.101.5.bb b/recipes-scanners/clamav/clamav_0.101.5.bb index 2ea2c9b..7694265 100644 --- a/recipes-scanners/clamav/clamav_0.101.5.bb +++ b/recipes-scanners/clamav/clamav_0.101.5.bb @@ -18,6 +18,7 @@ SRC_URI = "git://github.com/vrtadmin/clamav-devel;branch=rel/0.101 \ file://tmpfiles.clamav \ file://${BPN}.service \ file://freshclam-native.conf \ + file://0001-force-generated-yara_grammar.h-to-include-yara_compi.patch \ " S = "${WORKDIR}/git" -- 2.20.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#49840): https://lists.yoctoproject.org/g/yocto/message/49840 Mute This Topic: https://lists.yoctoproject.org/mt/75270626/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
