From c05fd1f35fd93890f7b0807125783ae6169258d7 Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Fri, 30 May 2025 17:53:30 +0000 Subject: [PATCH] Enable Btrfs support for AlmaLinux --- config.yaml | 10 ++++ files/0001-Add-Minimal-repo-support.patch | 2 +- ...002-Change-anaconda-background-color.patch | 2 +- ...003-Remove-visible-Fedora-references.patch | 2 +- ...emove-support-for-the-btrfs-command-.patch | 54 +++++++++++++++++++ ...lmalinux-Restore-btrfs-progs-to-the-.patch | 31 +++++++++++ 6 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 files/0004-Revert-storage-Remove-support-for-the-btrfs-command-.patch create mode 100644 files/0005-data-profile.d-almalinux-Restore-btrfs-progs-to-the-.patch diff --git a/config.yaml b/config.yaml index 72700a6..9afc3f1 100644 --- a/config.yaml +++ b/config.yaml @@ -30,6 +30,10 @@ actions: enabled: true - changelog_entry: + - name: "Neal Gompa" + email: "ngompa@almalinux.org" + line: + - "Enable Btrfs support for AlmaLinux" - name: "Eduard Abdullin" email: "eabdullin@almalinux.org" line: @@ -46,3 +50,9 @@ actions: - type: "patch" name: "0003-Remove-visible-Fedora-references.patch" number: "Latest" + - type: "patch" + name: "0004-Revert-storage-Remove-support-for-the-btrfs-command-.patch" + number: "Latest" + - type: "patch" + name: "0005-data-profile.d-almalinux-Restore-btrfs-progs-to-the-.patch" + number: "Latest" diff --git a/files/0001-Add-Minimal-repo-support.patch b/files/0001-Add-Minimal-repo-support.patch index a4fd827..2f9d030 100644 --- a/files/0001-Add-Minimal-repo-support.patch +++ b/files/0001-Add-Minimal-repo-support.patch @@ -1,7 +1,7 @@ From 2b5791f0ed5a4b6886b49eeefeed66511e7218ce Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Fri, 9 Aug 2024 16:50:16 +0000 -Subject: [PATCH 1/3] Add Minimal repo support +Subject: [PATCH 1/5] Add Minimal repo support --- pyanaconda/core/constants.py | 1 + diff --git a/files/0002-Change-anaconda-background-color.patch b/files/0002-Change-anaconda-background-color.patch index 78d9db4..4ecbf3e 100644 --- a/files/0002-Change-anaconda-background-color.patch +++ b/files/0002-Change-anaconda-background-color.patch @@ -1,7 +1,7 @@ From 7d0eaa2ebb521e327b98171689e4731a7db5d503 Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Fri, 9 Aug 2024 16:59:05 +0000 -Subject: [PATCH 2/3] Change anaconda background color +Subject: [PATCH 2/5] Change anaconda background color --- data/anaconda-gtk.css | 2 +- diff --git a/files/0003-Remove-visible-Fedora-references.patch b/files/0003-Remove-visible-Fedora-references.patch index 3de2486..52c1404 100644 --- a/files/0003-Remove-visible-Fedora-references.patch +++ b/files/0003-Remove-visible-Fedora-references.patch @@ -1,7 +1,7 @@ From 36a77712950b1462573ade28c1bd6f175a201174 Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Fri, 9 Aug 2024 17:03:55 +0000 -Subject: [PATCH 3/3] Remove visible Fedora references +Subject: [PATCH 3/5] Remove visible Fedora references --- data/liveinst/gnome/fedora-welcome.js | 6 +++--- diff --git a/files/0004-Revert-storage-Remove-support-for-the-btrfs-command-.patch b/files/0004-Revert-storage-Remove-support-for-the-btrfs-command-.patch new file mode 100644 index 0000000..f94d808 --- /dev/null +++ b/files/0004-Revert-storage-Remove-support-for-the-btrfs-command-.patch @@ -0,0 +1,54 @@ +From 97723cd95779e09d448bae6f0d3eb0313fc875d1 Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Sat, 25 Jan 2025 17:14:07 -0500 +Subject: [PATCH 4/5] Revert "storage: Remove support for the btrfs command on + RHEL10" + +Restore Btrfs support so system installations can use Btrfs and +images can be built using Lorax with Btrfs as the filesystem. + +This reverts commit d426413bb7bae72a7f4f6770a567998c75d62a23. +--- + pyanaconda/modules/storage/kickstart.py | 19 ++++++++++++++++++- + 1 file changed, 18 insertions(+), 1 deletion(-) + +diff --git a/pyanaconda/modules/storage/kickstart.py b/pyanaconda/modules/storage/kickstart.py +index f435dd7f4c..e154c79a79 100644 +--- a/pyanaconda/modules/storage/kickstart.py ++++ b/pyanaconda/modules/storage/kickstart.py +@@ -100,6 +100,23 @@ class AutoPart(COMMANDS.AutoPart): + return retval + + ++class BTRFS(COMMANDS.BTRFS): ++ """The btrfs kickstart command.""" ++ ++ def parse(self, args): ++ """Parse the command.""" ++ retval = super().parse(args) ++ ++ # Check the file system type. ++ fmt = get_format("btrfs") ++ ++ if not fmt.supported or not fmt.formattable: ++ msg = _("Btrfs file system is not supported.") ++ raise KickstartParseError(msg, lineno=self.lineno) ++ ++ return retval ++ ++ + class ClearPart(COMMANDS.ClearPart): + """The clearpart kickstart command.""" + +@@ -295,7 +312,7 @@ class StorageKickstartSpecification(KickstartSpecification): + commands = { + "autopart": AutoPart, + "bootloader": COMMANDS.Bootloader, +- "btrfs": COMMANDS.BTRFS, ++ "btrfs": BTRFS, + "clearpart": ClearPart, + "fcoe": Fcoe, + "ignoredisk": IgnoreDisk, +-- +2.49.0 + diff --git a/files/0005-data-profile.d-almalinux-Restore-btrfs-progs-to-the-.patch b/files/0005-data-profile.d-almalinux-Restore-btrfs-progs-to-the-.patch new file mode 100644 index 0000000..f8f6ae5 --- /dev/null +++ b/files/0005-data-profile.d-almalinux-Restore-btrfs-progs-to-the-.patch @@ -0,0 +1,31 @@ +From 67da322d724f6cb075479264a615ccd728e33bc9 Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Mon, 26 May 2025 20:43:19 -0400 +Subject: [PATCH 5/5] data/profile.d/almalinux: Restore btrfs-progs to the + payload + +As part of enabling Btrfs support, allow it to be part of the +payload of requested packages to be installed so that installs +with Btrfs are not broken out of the box. +--- + data/profile.d/almalinux.conf | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/data/profile.d/almalinux.conf b/data/profile.d/almalinux.conf +index b40c556adc..f98d95c416 100644 +--- a/data/profile.d/almalinux.conf ++++ b/data/profile.d/almalinux.conf +@@ -17,6 +17,10 @@ forbidden_modules = + efi_dir = almalinux + + [Payload] ++# RHEL removes btrfs-progs, but we want it back ++ignored_packages = ++ ntfsprogs ++ + enable_closest_mirror = True + default_source = CLOSEST_MIRROR + +-- +2.49.0 +