From ab038494b25ebb942c021833b0c1ac0d91b98cd3 Mon Sep 17 00:00:00 2001 From: alexhulbert Date: Tue, 2 Dec 2025 17:25:49 +0900 Subject: [PATCH 1/2] Cleanups for L2 branch --- base/mkosi.skeleton/etc/sysconfig/.gitkeep | 0 kernel/mkosi.build | 3 -- l2/_op_rbuilder/mkosi.build | 8 ++-- l2/mkosi.postinst | 8 ++++ .../gcp/mkosi.extra/etc/systemd/journald.conf | 45 ------------------- mkosi.profiles/gcp/mkosi.postinst | 4 -- 6 files changed, 12 insertions(+), 56 deletions(-) delete mode 100644 base/mkosi.skeleton/etc/sysconfig/.gitkeep diff --git a/base/mkosi.skeleton/etc/sysconfig/.gitkeep b/base/mkosi.skeleton/etc/sysconfig/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/kernel/mkosi.build b/kernel/mkosi.build index c6e69f28..9b6869f2 100755 --- a/kernel/mkosi.build +++ b/kernel/mkosi.build @@ -54,9 +54,6 @@ else mkosi-chroot --chdir "/build/kernel-${KERNEL_VERSION}" make olddefconfig mkosi-chroot --chdir "/build/kernel-${KERNEL_VERSION}" make -j "$(nproc 2>/dev/null || echo 2)" bzImage ARCH=x86_64 CONFIG_EFI_STUB=y - echo "# kernel config:" - mkosi-chroot --chdir "/build/kernel-${KERNEL_VERSION}" cat .config - # Cache result mkdir -p "$cache_dir" cp arch/x86_64/boot/bzImage "$cache_dir/" diff --git a/l2/_op_rbuilder/mkosi.build b/l2/_op_rbuilder/mkosi.build index 8c5d7a10..1793fbb9 100755 --- a/l2/_op_rbuilder/mkosi.build +++ b/l2/_op_rbuilder/mkosi.build @@ -22,7 +22,7 @@ source scripts/build_rust_package.sh # build op-rbuilder -if [ -f "l2/_op_rbuilder/mkosi.extra/usr/bin/op-rbuilder" ]; then +if [ -f "$SRCDIR/l2/_op_rbuilder/mkosi.extra/usr/bin/op-rbuilder" ]; then echo "Using pre-built op-rbuilder binary" else build_rust_package \ @@ -34,7 +34,7 @@ fi # build tdx-quote-provider -if [ -f "l2/_op_rbuilder/mkosi.extra/usr/bin/tdx-quote-provider" ]; then +if [ -f "$SRCDIR/l2/_op_rbuilder/mkosi.extra/usr/bin/tdx-quote-provider" ]; then echo "Using pre-built tdx-quote-provider binary" else build_rust_package \ @@ -46,7 +46,7 @@ fi # build rproxy -if [ -f "l2/_op_rbuilder/mkosi.extra/usr/bin/rproxy" ]; then +if [ -f "$SRCDIR/l2/_op_rbuilder/mkosi.extra/usr/bin/rproxy" ]; then echo "Using pre-built rproxy binary" else make_git_package \ @@ -60,7 +60,7 @@ fi # build node-healthchecker -if [ -f "l2/mkosi.extra/usr/bin/node-healthchecker" ]; then +if [ -f "$SRCDIR/l2/_op_rbuilder/mkosi.extra/usr/bin/node-healthchecker" ]; then echo "Using pre-built node-healthchecker binary" else make_git_package \ diff --git a/l2/mkosi.postinst b/l2/mkosi.postinst index 8b2b36e9..d2efb00d 100755 --- a/l2/mkosi.postinst +++ b/l2/mkosi.postinst @@ -31,3 +31,11 @@ mkosi-chroot chmod 0770 /vault/secrets mkosi-chroot chmod 0750 /etc/vault-agent mkosi-chroot chmod 0750 /etc/vault-agent/gomplate mkosi-chroot sh -c "chmod 0640 /etc/vault-agent/gomplate/*" + +# Create /etc/sysconfig for vault-agent + +mkosi-chroot mkdir -p /etc/sysconfig + +# Limit root filesystem size to 4GB + +mkosi-chroot sed -i '1a mount -o remount,size=4G /' /init diff --git a/mkosi.profiles/gcp/mkosi.extra/etc/systemd/journald.conf b/mkosi.profiles/gcp/mkosi.extra/etc/systemd/journald.conf index 1000e11e..44e635ca 100644 --- a/mkosi.profiles/gcp/mkosi.extra/etc/systemd/journald.conf +++ b/mkosi.profiles/gcp/mkosi.extra/etc/systemd/journald.conf @@ -1,50 +1,5 @@ -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it under the -# terms of the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 2.1 of the License, or (at your option) -# any later version. -# -# Entries in this file show the compile time defaults. Local configuration -# should be created by either modifying this file (or a copy of it placed in -# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in -# the /etc/systemd/journald.conf.d/ directory. The latter is generally -# recommended. Defaults can be restored by simply deleting the main -# configuration file and all drop-ins located in /etc/. -# -# Use 'systemd-analyze cat-config systemd/journald.conf' to display the full config. -# -# See journald.conf(5) for details. - [Journal] -#Storage=auto -#Compress=yes -#Seal=yes -#SplitMode=uid -#SyncIntervalSec=5m -#RateLimitIntervalSec=30s -#RateLimitBurst=10000 -#SystemMaxUse= -#SystemKeepFree= SystemMaxFileSize=128M SystemMaxFiles=2 -#RuntimeMaxUse=64K -#RuntimeKeepFree= RuntimeMaxFileSize=512K RuntimeMaxFiles=2 -#MaxRetentionSec=0 -#MaxFileSec=1month -#ForwardToSyslog=no -#ForwardToKMsg=no -#ForwardToConsole=no -#ForwardToWall=yes -#TTYPath=/dev/console -#MaxLevelStore=debug -#MaxLevelSyslog=debug -#MaxLevelKMsg=notice -#MaxLevelConsole=info -#MaxLevelWall=emerg -#MaxLevelSocket=debug -#LineMax=48K -#ReadKMsg=yes -#Audit=yes diff --git a/mkosi.profiles/gcp/mkosi.postinst b/mkosi.profiles/gcp/mkosi.postinst index 067a5f84..46f0ec9f 100755 --- a/mkosi.profiles/gcp/mkosi.postinst +++ b/mkosi.profiles/gcp/mkosi.postinst @@ -30,10 +30,6 @@ if [ -f /etc/rsyslog.d/50-default.conf ]; then sed -i 's/^.*\/var\/log\/syslog.*$/# &/' /etc/rsyslog.d/50-default.conf fi -# Limit root filesystem size to 4GB - -mkosi-chroot sed -i '1a mount -o remount,size=4G /' /init - # Remove automatically generated nvme data rm -rf "$BUILDROOT/etc/nvme/hostid" "$BUILDROOT/etc/nvme/hostnqn" From 8c1e831ffa26a9ee3d238beac39993fab66c438f Mon Sep 17 00:00:00 2001 From: alexhulbert Date: Thu, 4 Dec 2025 18:34:48 +0900 Subject: [PATCH 2/2] Fix issue from testing --- l2/_op_rbuilder/mkosi.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l2/_op_rbuilder/mkosi.build b/l2/_op_rbuilder/mkosi.build index 1793fbb9..cf39b417 100755 --- a/l2/_op_rbuilder/mkosi.build +++ b/l2/_op_rbuilder/mkosi.build @@ -60,7 +60,7 @@ fi # build node-healthchecker -if [ -f "$SRCDIR/l2/_op_rbuilder/mkosi.extra/usr/bin/node-healthchecker" ]; then +if [ -f "$SRCDIR/l2/mkosi.extra/usr/bin/node-healthchecker" ]; then echo "Using pre-built node-healthchecker binary" else make_git_package \