diff --git a/0002-Revert-rhel10-autopart-on-RHEL-does-not-support-typ.patch b/0002-Revert-rhel10-autopart-on-RHEL-does-not-support-typ.patch new file mode 100644 index 0000000..af826f2 --- /dev/null +++ b/0002-Revert-rhel10-autopart-on-RHEL-does-not-support-typ.patch @@ -0,0 +1,96 @@ +From 3a795ad4b0d49bef2ee1d8fab080ec79d356593e Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Thu, 26 Jun 2025 00:52:22 -0400 +Subject: [PATCH] Revert "rhel10: autopart on RHEL does not support + --type=btrfs" + +This restores Btrfs support for the autopart kickstart command. + +This reverts commit 8e24a29588b2c18f9e47a05d8be5c1cd654179a7. +--- + pykickstart/commands/autopart.py | 33 -------------------------------- + pykickstart/handlers/rhel10.py | 2 +- + tests/commands/autopart.py | 7 +------ + 3 files changed, 2 insertions(+), 40 deletions(-) + +diff --git a/pykickstart/commands/autopart.py b/pykickstart/commands/autopart.py +index d7b5c072..382cc3a2 100644 +--- a/pykickstart/commands/autopart.py ++++ b/pykickstart/commands/autopart.py +@@ -597,36 +597,3 @@ class F38_AutoPart(F29_AutoPart): + raise KickstartParseError(msg, lineno=self.lineno) + + return retval +- +-class RHEL10_AutoPart(F38_AutoPart): +- removedKeywords = F38_AutoPart.removedKeywords +- removedAttrs = F38_AutoPart.removedAttrs +- +- def parse(self, args): +- # call the overriden command to do it's job first +- retval = F38_AutoPart.parse(self, args) +- +- # btrfs is no more supported +- if self._typeAsStr() == "btrfs": +- raise KickstartParseError(_("autopart --type=btrfs is not supported"), +- lineno=self.lineno) +- +- return retval +- +- def _getParser(self): +- "Only necessary for the type change documentation" +- op = F38_AutoPart._getParser(self) +- for action in op._actions: +- if "--type" in action.option_strings: +- action.help += """ +- +- .. versionchanged:: %s +- +- Partitioning scheme 'btrfs' was removed.""" % versionToLongString(RHEL8) +- if "--fstype" in action.option_strings: +- action.help += """ +- +- .. versionchanged:: %s +- +- Partitioning scheme 'btrfs' was removed.""" % versionToLongString(RHEL8) +- return op +diff --git a/pykickstart/handlers/rhel10.py b/pykickstart/handlers/rhel10.py +index 3e67dc55..93926f34 100644 +--- a/pykickstart/handlers/rhel10.py ++++ b/pykickstart/handlers/rhel10.py +@@ -28,7 +28,7 @@ class RHEL10Handler(BaseHandler): + "auth": commands.authconfig.F35_Authconfig, # RemovedCommand + "authconfig": commands.authconfig.F35_Authconfig, # RemovedCommand + "authselect": commands.authselect.F28_Authselect, +- "autopart": commands.autopart.RHEL10_AutoPart, ++ "autopart": commands.autopart.F38_AutoPart, + "autostep": commands.autostep.F40_Autostep, # RemovedCommand + "bootloader": commands.bootloader.F39_Bootloader, + "btrfs": commands.btrfs.RHEL10_BTRFS, +diff --git a/tests/commands/autopart.py b/tests/commands/autopart.py +index e7e8b220..5ae7281d 100644 +--- a/tests/commands/autopart.py ++++ b/tests/commands/autopart.py +@@ -165,7 +165,7 @@ class F17_TestCase(F16_TestCase): + self.assert_parse("autopart --type=lvm", + "autopart --type=lvm\n") + +- if self.__class__.__name__ not in ["RHEL8_TestCase", "RHEL10_TestCase"]: ++ if self.__class__.__name__ != "RHEL8_TestCase": + self.assert_parse("autopart --type=btrfs", + "autopart --type=btrfs\n") + +@@ -355,10 +355,5 @@ class F38_TestCase(F29_TestCase): + "autopart --hibernation\n") + self.assert_parse_error("autopart --hibernation --noswap") + +-class RHEL10_TestCase(F38_TestCase): +- def runTest(self): +- F38_TestCase.runTest(self) +- self.assert_parse_error("autopart --type=btrfs") +- + if __name__ == "__main__": + unittest.main() +-- +2.49.0 + diff --git a/pykickstart.spec b/pykickstart.spec index 7dbd0c8..bf29b4d 100644 --- a/pykickstart.spec +++ b/pykickstart.spec @@ -5,7 +5,7 @@ Name: pykickstart Version: 3.52.9 -Release: 1%{?dist}.alma.1 +Release: 1%{?dist}.alma.2 License: GPL-2.0-only Summary: Python utilities for manipulating kickstart files. Url: http://fedoraproject.org/wiki/pykickstart @@ -19,6 +19,7 @@ Source1: %{name}-%{version}.tar.gz.asc # AlmaLinux changes Patch1001: 0001-btrfs-Restore-support-for-the-btrfs-command-on-RHEL.patch +Patch1002: 0002-Revert-rhel10-autopart-on-RHEL-does-not-support-typ.patch BuildArch: noarch @@ -81,6 +82,9 @@ LC_ALL=C make PYTHON=%{__python3} test-no-coverage %{python3_sitelib}/pykickstart*.egg-info %changelog +* Thu Jun 26 2025 Neal Gompa - 3.52.9-1.alma.2 +- AlmaLinux changes: Restore Btrfs support to the autopart kickstart command + * Wed May 28 2025 Neal Gompa - 3.52.9-1.alma.1 - AlmaLinux changes: Enable Btrfs support