Skip to content

Commit

Permalink
Upgrade magic library to version 5.45.
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Feb 6, 2024
1 parent e065be6 commit 3a2b4d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bazel/magic.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@

# 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(
name = "magic_h",
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)
""",
)

Expand Down Expand Up @@ -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",
Expand All @@ -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": [
Expand Down
6 changes: 3 additions & 3 deletions bazel/yara_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 3a2b4d1

Please sign in to comment.