third_party/qemu: fix tracetool-cli invocation

This makes the call actually go through the py_binary wrapper instead of
the source, making sure we execute with whatever shebang line is
appropriate per rules_python and not whatever happens to be in the
script already.

Change-Id: I1c12faef897ecae8c5f7621f34e113eea5db0a69
Reviewed-on: https://review.monogon.dev/c/monogon/+/1145
Reviewed-by: Leopold Schabel <leo@monogon.tech>
Tested-by: Jenkins CI
diff --git a/third_party/qemu/patches/bazel_support.patch b/third_party/qemu/patches/bazel_support.patch
index 8905c39..e2dcd05 100644
--- a/third_party/qemu/patches/bazel_support.patch
+++ b/third_party/qemu/patches/bazel_support.patch
@@ -1495,7 +1495,7 @@
 index 0000000000..70ce080a62
 --- /dev/null
 +++ b/scripts/tracetool/defs.bzl
-@@ -0,0 +1,65 @@
+@@ -0,0 +1,67 @@
 +def _impl_cc_qemu_trace(ctx):
 +    outs = []
 +    for src in ctx.files.srcs:
@@ -1508,15 +1508,17 @@
 +        outs.append(trace_h)
 +
 +        ctx.actions.run(
-+            inputs = [src] + ctx.files._tracetool,
++            inputs = [src],
++            tools = [ctx.executable._tracetool],
 +            executable = ctx.executable._savestdout,
-+            arguments = [trace_h.path, ctx.files._tracetool[0].path, "--backend", ctx.attr.backend, "--group", name, "--format=h", src.path],
++            arguments = [trace_h.path, ctx.executable._tracetool.path, "--backend", ctx.attr.backend, "--group", name, "--format=h", src.path],
 +            outputs = [trace_h],
 +        )
 +        ctx.actions.run(
-+            inputs = [src] + ctx.files._tracetool,
++            inputs = [src],
++            tools = [ctx.executable._tracetool],
 +            executable = ctx.executable._savestdout,
-+            arguments = [trace_c.path, ctx.files._tracetool[0].path, "--backend", ctx.attr.backend, "--group", name, "--format=c", src.path],
++            arguments = [trace_c.path, ctx.executable._tracetool.path, "--backend", ctx.attr.backend, "--group", name, "--format=c", src.path],
 +            outputs = [trace_c],
 +        )
 +    return [DefaultInfo(files = depset(outs))]