From c85e43a6f6feb290d292e55504430c7f8aac1f66 Mon Sep 17 00:00:00 2001
From: Davide Cavalca <dcavalca@fedoraproject.org>
Date: Mar 02 2025 23:27:43 +0000
Subject: [PATCH 1/5] components: add x86-emulation and kde-pim


---

diff --git a/components/desktop-environments.xml b/components/desktop-environments.xml
index 9f4a273..e99bc86 100644
--- a/components/desktop-environments.xml
+++ b/components/desktop-environments.xml
@@ -17,6 +17,7 @@
 		<namedCollection name="libreoffice"/>
 		<namedCollection name="multimedia"/>
 		<namedCollection name="printing"/>
+		<namedCollection name="x86-emulation"/>
 		<package name="aajohan-comfortaa-fonts"/>
 		<package name="mediawriter"/>
 		<package name="mesa-dri-drivers"/>
@@ -41,6 +42,7 @@
 		<namedCollection name="kde-desktop-environment"/>
 		<namedCollection name="kde-apps"/>
 		<namedCollection name="kde-media"/>
+		<namedCollection name="kde-pim"/>
 		<package name="fuse"/>
 		<package name="kde-l10n"/>
 		<package name="calamares-firstboot-config"/>

From ff11a427dc86e5a71fc8e3255fdfa84eb9750277 Mon Sep 17 00:00:00 2001
From: Janne Grunau <j@jannau.net>
Date: Apr 27 2025 16:03:20 +0000
Subject: [PATCH 2/5] Stop setting GRUB_DEFAULT=saved after kiwi is fixed


---

diff --git a/config.sh b/config.sh
index 92e1072..6354276 100755
--- a/config.sh
+++ b/config.sh
@@ -36,9 +36,6 @@ rm -f /var/lib/systemd/random-seed
 #======================================
 # Configure grub correctly
 #--------------------------------------
-## Works around issues with grub-bls
-## See: https://github.com/OSInside/kiwi/issues/2198
-echo "GRUB_DEFAULT=saved" >> /etc/default/grub
 ## Disable submenus to match Fedora
 echo "GRUB_DISABLE_SUBMENU=true" >> /etc/default/grub
 ## Disable recovery entries to match Fedora

From 2ad0b5ac8a673e0576ec444cf2dc7f13046bebec Mon Sep 17 00:00:00 2001
From: Janne Grunau <j@jannau.net>
Date: Apr 29 2025 21:04:48 +0000
Subject: [PATCH 3/5] *Desktop: Use the same grub2 config as Fedora anaconda installs


The main part of this is setting `menu_auto_hide=1` in the grubenv file.
This will result in a usually hidden menu with a 1 second timeout. It
enables Fedora's boot success tracking and thus will display the menu
after an unsuccessful boot and will revert to booting the previous
kernel.
This hopefully will result in less support effort after failed kernel
updates as recovery will be more obvious.
Change "GRUB_TIMEOUT" to 5 and omit "GRUB_TIMEOUT_STYLE" in
/etc/default/grub to match Fedora Workstation installs.

---

diff --git a/config.sh b/config.sh
index 6354276..3da2ed8 100755
--- a/config.sh
+++ b/config.sh
@@ -44,6 +44,12 @@ echo "GRUB_DISABLE_RECOVERY=true" >> /etc/default/grub
 ## the native startup disk selection
 echo "GRUB_DISABLE_OS_PROBER=true" >> /etc/default/grub
 
+if [[ "$kiwi_profiles" == *"-Desktop"* ]]; then
+	## Enable menu_auto_hide to match Fedora anaconda installs
+	## Set boot_success to avoid displaying the grub menu on first boot
+	grub2-editenv /boot/grub2/grubenv set menu_auto_hide=1 boot_success=1
+fi
+
 #======================================
 # Delete & lock the root user password
 #--------------------------------------
diff --git a/platforms/workstation.xml b/platforms/workstation.xml
index dfb5798..59a75f5 100644
--- a/platforms/workstation.xml
+++ b/platforms/workstation.xml
@@ -15,7 +15,7 @@
 	</profiles>
 	<preferences profiles="WorkstationCommon">
 		<type image="oem" filesystem="btrfs" kernelcmdline="rhgb quiet" target_blocksize="4096" bootpartition="true" bootpartsize="1024" bootfilesystem="ext4" efipartsize="500" firmware="uefi" btrfs_root_is_subvolume="true" btrfs_set_default_volume="false" rootfs_label="fedora" fsmountoptions="x-systemd.growfs,compress=zstd:1">
-			<bootloader name="grub2" console="console" timeout="1" timeout_style="hidden"/>
+			<bootloader name="grub2" console="console" timeout="5"/>
 			<systemdisk name="fedora">
 				<volume name="@root=root"/>
 				<volume name="home" parent="/"/>

From 01a781abac76e53a0f361c5382df92e76b0ecfe1 Mon Sep 17 00:00:00 2001
From: Janne Grunau <j@jannau.net>
Date: Apr 29 2025 21:04:48 +0000
Subject: [PATCH 4/5] Enable grub2 BLS to match Fedora


---

diff --git a/platforms/minimal.xml b/platforms/minimal.xml
index 586a273..a651895 100644
--- a/platforms/minimal.xml
+++ b/platforms/minimal.xml
@@ -7,7 +7,7 @@
 	</profiles>
 	<preferences profiles="Minimal">
 		<type image="oem" filesystem="btrfs" kernelcmdline="" target_blocksize="4096" bootpartition="true" bootpartsize="1024" bootfilesystem="ext4" efipartsize="500" firmware="uefi" btrfs_root_is_subvolume="true" btrfs_set_default_volume="false" rootfs_label="fedora" fsmountoptions="x-systemd.growfs,compress=zstd:1">
-			<bootloader name="grub2" console="none" timeout="5" timeout_style="menu"/>
+			<bootloader name="grub2" bls="true" console="none" timeout="5" timeout_style="menu"/>
 			<systemdisk name="fedora">
 				<volume name="@root=root"/>
 				<volume name="home" parent="/"/>
diff --git a/platforms/server.xml b/platforms/server.xml
index c91c287..1764112 100644
--- a/platforms/server.xml
+++ b/platforms/server.xml
@@ -7,7 +7,7 @@
 	</profiles>
 	<preferences profiles="Server">
 		<type image="oem" filesystem="btrfs" kernelcmdline="" target_blocksize="4096" bootpartition="true" bootpartsize="1024" bootfilesystem="ext4" efipartsize="500" firmware="uefi" btrfs_root_is_subvolume="true" btrfs_set_default_volume="false" rootfs_label="fedora" fsmountoptions="x-systemd.growfs,compress=zstd:1">
-			<bootloader name="grub2" console="none" timeout="5" timeout_style="menu"/>
+			<bootloader name="grub2" bls="true" console="none" timeout="5" timeout_style="menu"/>
 			<systemdisk name="fedora">
 				<volume name="@root=root"/>
 				<volume name="home" parent="/"/>
diff --git a/platforms/workstation.xml b/platforms/workstation.xml
index 59a75f5..c289da3 100644
--- a/platforms/workstation.xml
+++ b/platforms/workstation.xml
@@ -15,7 +15,7 @@
 	</profiles>
 	<preferences profiles="WorkstationCommon">
 		<type image="oem" filesystem="btrfs" kernelcmdline="rhgb quiet" target_blocksize="4096" bootpartition="true" bootpartsize="1024" bootfilesystem="ext4" efipartsize="500" firmware="uefi" btrfs_root_is_subvolume="true" btrfs_set_default_volume="false" rootfs_label="fedora" fsmountoptions="x-systemd.growfs,compress=zstd:1">
-			<bootloader name="grub2" console="console" timeout="5"/>
+			<bootloader name="grub2" bls="true" console="console" timeout="5"/>
 			<systemdisk name="fedora">
 				<volume name="@root=root"/>
 				<volume name="home" parent="/"/>

From 99a9af254e0f4f8e6d58f1057585fe6ec72a7b76 Mon Sep 17 00:00:00 2001
From: Janne Grunau <j@jannau.net>
Date: May 02 2025 19:58:04 +0000
Subject: [PATCH 5/5] Merge branch 'rawhide' into f41


Imports the boot resilience changes but reverts commit c85e43a
("components: add x86-emulation and kde-pim").

---

diff --git a/config.sh b/config.sh
index 92e1072..3da2ed8 100755
--- a/config.sh
+++ b/config.sh
@@ -36,9 +36,6 @@ rm -f /var/lib/systemd/random-seed
 #======================================
 # Configure grub correctly
 #--------------------------------------
-## Works around issues with grub-bls
-## See: https://github.com/OSInside/kiwi/issues/2198
-echo "GRUB_DEFAULT=saved" >> /etc/default/grub
 ## Disable submenus to match Fedora
 echo "GRUB_DISABLE_SUBMENU=true" >> /etc/default/grub
 ## Disable recovery entries to match Fedora
@@ -47,6 +44,12 @@ echo "GRUB_DISABLE_RECOVERY=true" >> /etc/default/grub
 ## the native startup disk selection
 echo "GRUB_DISABLE_OS_PROBER=true" >> /etc/default/grub
 
+if [[ "$kiwi_profiles" == *"-Desktop"* ]]; then
+	## Enable menu_auto_hide to match Fedora anaconda installs
+	## Set boot_success to avoid displaying the grub menu on first boot
+	grub2-editenv /boot/grub2/grubenv set menu_auto_hide=1 boot_success=1
+fi
+
 #======================================
 # Delete & lock the root user password
 #--------------------------------------
diff --git a/platforms/minimal.xml b/platforms/minimal.xml
index 586a273..a651895 100644
--- a/platforms/minimal.xml
+++ b/platforms/minimal.xml
@@ -7,7 +7,7 @@
 	</profiles>
 	<preferences profiles="Minimal">
 		<type image="oem" filesystem="btrfs" kernelcmdline="" target_blocksize="4096" bootpartition="true" bootpartsize="1024" bootfilesystem="ext4" efipartsize="500" firmware="uefi" btrfs_root_is_subvolume="true" btrfs_set_default_volume="false" rootfs_label="fedora" fsmountoptions="x-systemd.growfs,compress=zstd:1">
-			<bootloader name="grub2" console="none" timeout="5" timeout_style="menu"/>
+			<bootloader name="grub2" bls="true" console="none" timeout="5" timeout_style="menu"/>
 			<systemdisk name="fedora">
 				<volume name="@root=root"/>
 				<volume name="home" parent="/"/>
diff --git a/platforms/server.xml b/platforms/server.xml
index c91c287..1764112 100644
--- a/platforms/server.xml
+++ b/platforms/server.xml
@@ -7,7 +7,7 @@
 	</profiles>
 	<preferences profiles="Server">
 		<type image="oem" filesystem="btrfs" kernelcmdline="" target_blocksize="4096" bootpartition="true" bootpartsize="1024" bootfilesystem="ext4" efipartsize="500" firmware="uefi" btrfs_root_is_subvolume="true" btrfs_set_default_volume="false" rootfs_label="fedora" fsmountoptions="x-systemd.growfs,compress=zstd:1">
-			<bootloader name="grub2" console="none" timeout="5" timeout_style="menu"/>
+			<bootloader name="grub2" bls="true" console="none" timeout="5" timeout_style="menu"/>
 			<systemdisk name="fedora">
 				<volume name="@root=root"/>
 				<volume name="home" parent="/"/>
diff --git a/platforms/workstation.xml b/platforms/workstation.xml
index dfb5798..c289da3 100644
--- a/platforms/workstation.xml
+++ b/platforms/workstation.xml
@@ -15,7 +15,7 @@
 	</profiles>
 	<preferences profiles="WorkstationCommon">
 		<type image="oem" filesystem="btrfs" kernelcmdline="rhgb quiet" target_blocksize="4096" bootpartition="true" bootpartsize="1024" bootfilesystem="ext4" efipartsize="500" firmware="uefi" btrfs_root_is_subvolume="true" btrfs_set_default_volume="false" rootfs_label="fedora" fsmountoptions="x-systemd.growfs,compress=zstd:1">
-			<bootloader name="grub2" console="console" timeout="1" timeout_style="hidden"/>
+			<bootloader name="grub2" bls="true" console="console" timeout="5"/>
 			<systemdisk name="fedora">
 				<volume name="@root=root"/>
 				<volume name="home" parent="/"/>

