From 2afd2f50827f67e432df7107bad36b1a31476eb2 Mon Sep 17 00:00:00 2001 From: Malte Poll <1780588+malt3@users.noreply.github.com> Date: Thu, 23 Nov 2023 17:53:57 +0100 Subject: [PATCH] image: provide runtime dependencies of cryptsetup in OS image. This adds nix store paths to the initrd and sysroot of bootable Fedora images. --- image/BUILD.bazel | 9 +++++++++ image/base/BUILD.bazel | 1 + image/initrd/BUILD.bazel | 1 + image/system/mkosi.repart/00-esp.conf | 4 ++-- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/image/BUILD.bazel b/image/BUILD.bazel index 76acdd21239..681c6f385c7 100644 --- a/image/BUILD.bazel +++ b/image/BUILD.bazel @@ -1,3 +1,4 @@ +load("@aspect_bazel_lib//lib:copy_file.bzl", "copy_file") load("@rules_pkg//:pkg.bzl", "pkg_tar") load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix") @@ -18,3 +19,11 @@ pkg_tar( srcs = [":sysroot"], visibility = ["//visibility:public"], ) + +copy_file( + name = "cryptsetup_closure", + src = "@cryptsetup_x86_64-linux//:closure.tar", + out = "cryptsetup_closure.tar", + allow_symlink = True, + visibility = ["//visibility:public"], +) diff --git a/image/base/BUILD.bazel b/image/base/BUILD.bazel index b226f472dfd..1d02317b241 100644 --- a/image/base/BUILD.bazel +++ b/image/base/BUILD.bazel @@ -49,6 +49,7 @@ mkosi_image( ], extra_trees = [ "//image:sysroot_tar", + "//image:cryptsetup_closure", ], local_mirror = ["@mkosi_rpms//:repo"], mkosi_conf = "mkosi.conf", diff --git a/image/initrd/BUILD.bazel b/image/initrd/BUILD.bazel index 18372f279a5..682c9d70e76 100644 --- a/image/initrd/BUILD.bazel +++ b/image/initrd/BUILD.bazel @@ -14,6 +14,7 @@ mkosi_image( ], extra_trees = [ "//image:sysroot_tar", + "//image:cryptsetup_closure", "//disk-mapper/cmd:disk-mapper-package.tar", ], local_mirror = ["@mkosi_rpms//:repo"], diff --git a/image/system/mkosi.repart/00-esp.conf b/image/system/mkosi.repart/00-esp.conf index 2876e410779..1b5bc6328e0 100644 --- a/image/system/mkosi.repart/00-esp.conf +++ b/image/system/mkosi.repart/00-esp.conf @@ -2,5 +2,5 @@ Type=esp Format=vfat CopyFiles=/efi:/ -SizeMinBytes=256M -SizeMaxBytes=512M +SizeMinBytes=512M +SizeMaxBytes=1024M