diff --git a/bazel_variables.bzl b/bazel_variables.bzl index fd9bce8bf80..c21c59770ae 100644 --- a/bazel_variables.bzl +++ b/bazel_variables.bzl @@ -22,3 +22,18 @@ edition_deps = { "//non-free/packages/cmk-otel-collector:pkg_tar", ], } + +edition_skel_permissions = { + "cce": [ + "//non-free/packages/cmk-mknotifyd:skel.permissions", + ], + "cee": [ + "//non-free/packages/cmk-mknotifyd:skel.permissions", + ], + "cme": [ + "//non-free/packages/cmk-mknotifyd:skel.permissions", + ], + "cse": [ + "//non-free/packages/cmk-mknotifyd:skel.permissions", + ], +} diff --git a/omd/BUILD b/omd/BUILD index fd1e82f94fb..59f4422641f 100644 --- a/omd/BUILD +++ b/omd/BUILD @@ -1,5 +1,6 @@ +load("@bazel_skylib//rules:write_file.bzl", "write_file") load("@rules_pkg//pkg:tar.bzl", "pkg_tar") -load("//:bazel_variables.bzl", "edition_deps") +load("//:bazel_variables.bzl", "edition_deps", "edition_skel_permissions") pkg_tar( name = "intermediate_install", @@ -52,3 +53,22 @@ pkg_tar( "cme", "cse", ]] + +[genrule( + name = "skel_permissions_" + edition, + srcs = edition_skel_permissions[edition], + outs = ["skel.permissions_" + edition], + cmd = "cat $< > $@", +) for edition in [ + "cce", + "cee", + "cme", + "cse", +]] + +# Placeholder since we have no cre specfic skel.permissions so far (will come soon) +write_file( + name = "skel_permissions_cre", + out = "skel.permissions_cre", + content = [], +) diff --git a/omd/Makefile b/omd/Makefile index 4755bc65b30..22a5c3ad49e 100644 --- a/omd/Makefile +++ b/omd/Makefile @@ -191,6 +191,8 @@ $(SKEL_PERMISSIONS): $(INSTALL) OUTPUT="$${OUTPUT}# $$p\n$$(cat $$p/skel.permissions)\n"; \ fi ; \ done ; \ + bazel build //omd:skel_permissions_$(EDITION_SHORT) ; \ + OUTPUT="$${OUTPUT}# Bazel\n$$(cat $(REPO_PATH)/bazel-bin/omd/skel.permissions_cee)\n" ; \ echo -e "$$OUTPUT" > $(SKEL_PERMISSIONS) $(INSTALL_GLOBAL): $(SKEL_PERMISSIONS) $(BOM)