From 13c5e884e38272cc515cab25ced3c53a94ecb65b Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Mon, 18 Nov 2024 09:43:46 +0300 Subject: [PATCH] import python-blivet-3.10.0-12.el10 --- SOURCES/0009-mod_pass_in_stratis_test.patch | 32 ++++++++++ .../0010-Fix_running_tests_in_FIPS_mode.patch | 58 +++++++++++++++++++ SPECS/python-blivet.spec | 12 +++- 3 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 SOURCES/0009-mod_pass_in_stratis_test.patch create mode 100644 SOURCES/0010-Fix_running_tests_in_FIPS_mode.patch diff --git a/SOURCES/0009-mod_pass_in_stratis_test.patch b/SOURCES/0009-mod_pass_in_stratis_test.patch new file mode 100644 index 0000000..67bb1c0 --- /dev/null +++ b/SOURCES/0009-mod_pass_in_stratis_test.patch @@ -0,0 +1,32 @@ +From c2177aa362d20278a0ebd5c25a776f952d83e5b1 Mon Sep 17 00:00:00 2001 +From: Jan Pokorny +Date: Fri, 11 Oct 2024 17:17:41 +0200 +Subject: [PATCH] Modified passphrase in stratis test + +FIPS requires at least 8 chars long passphrase. Dummy passphrase used +in stratis test was too short causing encryption +tests with FIPS enabled to fail. + +Changed passphrase. + +fixes RHEL-45173, RHEL-8029 +--- + tests/storage_tests/devices_test/stratis_test.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/storage_tests/devices_test/stratis_test.py b/tests/storage_tests/devices_test/stratis_test.py +index 5aaa12d4..21c4d0f5 100644 +--- a/tests/storage_tests/devices_test/stratis_test.py ++++ b/tests/storage_tests/devices_test/stratis_test.py +@@ -230,7 +230,7 @@ class StratisTestCaseClevis(StratisTestCaseBase): + blivet.partitioning.do_partitioning(self.storage) + + pool = self.storage.new_stratis_pool(name="blivetTestPool", parents=[bd], +- encrypted=True, passphrase="abcde", ++ encrypted=True, passphrase="fipsneeds8chars", + clevis=StratisClevisConfig(pin="tang", + tang_url=self._tang_server, + tang_thumbprint=None)) +-- +2.45.0 + diff --git a/SOURCES/0010-Fix_running_tests_in_FIPS_mode.patch b/SOURCES/0010-Fix_running_tests_in_FIPS_mode.patch new file mode 100644 index 0000000..b6bee25 --- /dev/null +++ b/SOURCES/0010-Fix_running_tests_in_FIPS_mode.patch @@ -0,0 +1,58 @@ +From cd9e137a2e33165a8af3a7e4a3d2615adcabf659 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Fri, 8 Nov 2024 09:19:45 +0100 +Subject: [PATCH 1/2] Fix "Modified passphrase in stratis test" + +Follow up for 68708e347ef7b2f98312c76aa80366091dd4aade, two more +places where the passphrase is too short for FIPS mode. + +Resolves: RHEL-45173 +--- + tests/storage_tests/devices_test/stratis_test.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/storage_tests/devices_test/stratis_test.py b/tests/storage_tests/devices_test/stratis_test.py +index 21c4d0f50..9792e0618 100644 +--- a/tests/storage_tests/devices_test/stratis_test.py ++++ b/tests/storage_tests/devices_test/stratis_test.py +@@ -105,7 +105,7 @@ def test_stratis_encrypted(self): + blivet.partitioning.do_partitioning(self.storage) + + pool = self.storage.new_stratis_pool(name="blivetTestPool", parents=[bd], +- encrypted=True, passphrase="abcde") ++ encrypted=True, passphrase="fipsneeds8chars") + self.storage.create_device(pool) + + self.storage.do_it() +@@ -260,7 +260,7 @@ def test_stratis_encrypted_clevis_tpm(self): + blivet.partitioning.do_partitioning(self.storage) + + pool = self.storage.new_stratis_pool(name="blivetTestPool", parents=[bd], +- encrypted=True, passphrase="abcde", ++ encrypted=True, passphrase="fipsneeds8chars", + clevis=StratisClevisConfig(pin="tpm2")) + self.storage.create_device(pool) + + +From ed10d97a5257c0f4fe8a2f53b0b2f787de91c355 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Fri, 8 Nov 2024 10:02:47 +0100 +Subject: [PATCH 2/2] tests: Fix writing key file for LUKS tests + +Related: RHEL-45173 +--- + tests/storage_tests/formats_test/luks_test.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/storage_tests/formats_test/luks_test.py b/tests/storage_tests/formats_test/luks_test.py +index 93c8d7524..b8ec229ba 100644 +--- a/tests/storage_tests/formats_test/luks_test.py ++++ b/tests/storage_tests/formats_test/luks_test.py +@@ -99,6 +99,7 @@ def test_setup_keyfile(self): + + with tempfile.NamedTemporaryFile(prefix="blivet_test") as temp: + temp.write(b"password2") ++ temp.flush() + + # create the luks format with both passphrase and keyfile + self.fmt._key_file = temp.name diff --git a/SPECS/python-blivet.spec b/SPECS/python-blivet.spec index 8dddff5..db2d11e 100644 --- a/SPECS/python-blivet.spec +++ b/SPECS/python-blivet.spec @@ -5,7 +5,7 @@ Version: 3.10.0 #%%global prerelease .b2 # prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 -Release: 10%{?prerelease}%{?dist} +Release: 12%{?prerelease}%{?dist} Epoch: 1 License: LGPL-2.1-or-later %global realname blivet @@ -24,6 +24,8 @@ Patch4: 0005-consolidated-s390-device-configuration.patch Patch5: 0006-Remove-support-for-the-MD-linear-RAID-level.patch Patch6: 0007-Fix-checking-for-NVMe-plugin-availability.patch Patch7: 0008-Align-sizes-up-for-growable-LVs.patch +Patch8: 0009-mod_pass_in_stratis_test.patch +Patch9: 0010-Fix_running_tests_in_FIPS_mode.patch # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -118,6 +120,14 @@ make DESTDIR=%{buildroot} install %{python3_sitelib}/* %changelog +* Tue Nov 12 2024 Vojtech Trefny - 3.10.0-12 +- Fix running tests in FIPS mode + Resolves: RHEL-45173 + +* Fri Nov 1 2024 Jan Pokorny - 3.10.0-11 +- Modified passphrase in stratis test + Resolves: RHEL-45173 + * Tue Oct 29 2024 Troy Dawson - 1:3.10.0-10 - Bump release for October 2024 mass rebuild: Resolves: RHEL-64018