2024-12-19 08:58:47 -05:00
|
|
|
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
|
|
|
load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files", "strip_prefix")
|
2023-09-11 09:52:05 -04:00
|
|
|
load("//bazel/mkosi:mkosi_image.bzl", "mkosi_image")
|
|
|
|
|
|
|
|
mkosi_image(
|
|
|
|
name = "initrd",
|
|
|
|
srcs = [
|
|
|
|
"mkosi.postinst",
|
2024-12-19 08:58:47 -05:00
|
|
|
],
|
2023-09-11 09:52:05 -04:00
|
|
|
outs = [
|
|
|
|
"image",
|
|
|
|
"image.cpio.zst",
|
|
|
|
],
|
|
|
|
extra_trees = [
|
2024-12-19 08:58:47 -05:00
|
|
|
":skeleton",
|
2023-09-11 09:52:05 -04:00
|
|
|
"//image:sysroot_tar",
|
2023-11-23 11:53:57 -05:00
|
|
|
"//image:cryptsetup_closure",
|
2023-09-11 09:52:05 -04:00
|
|
|
"//disk-mapper/cmd:disk-mapper-package.tar",
|
|
|
|
],
|
2023-10-16 10:45:36 -04:00
|
|
|
local_mirror = ["@mkosi_rpms//:repo"],
|
2023-09-11 09:52:05 -04:00
|
|
|
mkosi_conf = "mkosi.conf",
|
|
|
|
tags = [
|
|
|
|
"manual",
|
|
|
|
"no-cache",
|
|
|
|
],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
2024-12-19 08:58:47 -05:00
|
|
|
|
|
|
|
pkg_files(
|
|
|
|
name = "skeleton_files",
|
|
|
|
srcs = glob(["mkosi.skeleton/**"]),
|
|
|
|
attributes = pkg_attributes(mode = "0555"),
|
|
|
|
strip_prefix = strip_prefix.from_pkg("mkosi.skeleton"),
|
|
|
|
)
|
|
|
|
|
|
|
|
pkg_tar(
|
|
|
|
name = "skeleton",
|
|
|
|
srcs = [":skeleton_files"],
|
|
|
|
)
|