treewide: replace static mentions of repo name with dynamic ones
This does change the CONFIG_QEMU_FIRMWAREPATH to "/nonexistant", but
since we are using OVMF everywhere anyway this should behave the same.
Closes monogon-dev/monogon#343
Change-Id: I865e5ba5e62579c3ff1f31a25e46cbcb78dba688
Reviewed-on: https://review.monogon.dev/c/monogon/+/3450
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
Tested-by: Jenkins CI
diff --git a/third_party/libtpms/patches/0006-bazel-support-implement.patch b/third_party/libtpms/patches/0006-bazel-support-implement.patch
index ed540b1..47ce11a 100644
--- a/third_party/libtpms/patches/0006-bazel-support-implement.patch
+++ b/third_party/libtpms/patches/0006-bazel-support-implement.patch
@@ -19,18 +19,24 @@
index 0000000..591942d
--- /dev/null
+++ b/BUILD.bazel
-@@ -0,0 +1,45 @@
+@@ -0,0 +1,51 @@
++filegroup(
++ name = "all",
++ srcs = glob(["**"]),
++ visibility = ["//visibility:public"],
++)
++
+cc_library(
+ name = "libtpms_tpm2",
+ includes = [
+ "include",
+ ],
+ copts = [
-+ "-Iexternal/_main~_repo_rules~libtpms/include/libtpms",
-+ "-Iexternal/_main~_repo_rules~libtpms/src",
-+ "-Iexternal/_main~_repo_rules~libtpms/src/tpm2",
-+ "-Iexternal/_main~_repo_rules~libtpms/src/tpm2/crypto",
-+ "-Iexternal/_main~_repo_rules~libtpms/src/tpm2/crypto/openssl",
++ "-I{path}/include/libtpms".format(path = package_relative_label(":all").workspace_root),
++ "-I{path}/src".format(path = package_relative_label(":all").workspace_root),
++ "-I{path}/src/tpm2".format(path = package_relative_label(":all").workspace_root),
++ "-I{path}/src/tpm2/crypto".format(path = package_relative_label(":all").workspace_root),
++ "-I{path}/src/tpm2/crypto/openssl".format(path = package_relative_label(":all").workspace_root),
+ ],
+ defines = [
+ "TPM_LIBTPMS_CALLBACKS",