Upgrade magic library to version 5.45.

This commit is contained in:
Victor M. Alvarez
2024-02-06 13:53:11 +01:00
parent e065be6716
commit 3a2b4d16c5
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -29,7 +29,7 @@
# Rule for creating magic.h from magic.h.in. The two files are identical, except
# for magic.h.in not having the actual version number. Instead it has a X.YY
# placeholder that is replaced with the version number (i.e: 538) during build
# placeholder that is replaced with the version number (i.e: 545) during build
# time. When this library is updated the version number in this rule must be
# updated accordingly.
genrule(
@@ -37,7 +37,7 @@ genrule(
srcs = ["src/magic.h.in"],
outs = ["src/magic.h"],
cmd = """
sed -e 's/X.YY/538/' < $(location src/magic.h.in) > $(location src/magic.h)
sed -e 's/X.YY/545/' < $(location src/magic.h.in) > $(location src/magic.h)
""",
)
@@ -103,6 +103,7 @@ cc_library(
"src/gmtime_r.c",
"src/is_csv.c",
"src/is_json.c",
"src/is_simh.c",
"src/is_tar.c",
"src/localtime_r.c",
"src/magic.c",
@@ -113,7 +114,6 @@ cc_library(
"src/seccomp.c",
"src/softmagic.c",
"src/strcasestr.c",
"src/teststrchr.c",
"src/vasprintf.c",
] + select({
"@bazel_tools//src/conditions:darwin": [
+3 -3
View File
@@ -61,9 +61,9 @@ def yara_deps():
# in the bazel/magic.BUILD must be updated acordingly.
http_archive,
name = "magic",
url = "https://github.com/file/file/archive/FILE5_38.tar.gz",
sha256 = "338ebe8cb536a3f86750b4df62be2d382f6da66afdb0087b36a1a3e14ea4baf8",
strip_prefix = "file-FILE5_38",
url = "https://github.com/file/file/archive/FILE5_45.tar.gz",
sha256 = "28c01a5ef1a127ef71758222ca019ba6c6bfa4a8fe20c2b525ce75943ee9da3c",
strip_prefix = "file-FILE5_45",
build_file = "@com_github_virustotal_yara//:bazel/magic.BUILD",
)
maybe(