diff --git a/1006-Reconfig-blivet-ABI-version-to-3.0.patch b/1006-Reconfig-blivet-ABI-version-to-3.0.patch new file mode 100644 index 0000000000000000000000000000000000000000..cfb4dd71e01effc923ad06fcfa22fa5821b230d8 --- /dev/null +++ b/1006-Reconfig-blivet-ABI-version-to-3.0.patch @@ -0,0 +1,123 @@ +From 9a6d3b179df9fab2a4e0e0ee8347deed1fa01301 Mon Sep 17 00:00:00 2001 +From: gc-taifu +Date: Thu, 27 Mar 2025 19:42:06 +0800 +Subject: [PATCH] Reconfig blivet ABI version to 3.0 + +--- + pyanaconda/modules/storage/checker/utils.py | 2 +- + pyanaconda/modules/storage/dasd/discover.py | 2 +- + pyanaconda/modules/storage/dasd/format.py | 2 +- + pyanaconda/modules/storage/devicetree/fsset.py | 2 +- + pyanaconda/modules/storage/initialization.py | 2 +- + pyanaconda/modules/storage/installation.py | 2 +- + pyanaconda/modules/storage/nvdimm/nvdimm.py | 2 +- + pyanaconda/modules/storage/zfcp/discover.py | 2 +- + 8 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/pyanaconda/modules/storage/checker/utils.py b/pyanaconda/modules/storage/checker/utils.py +index 5df68e4..ed2bf6c 100644 +--- a/pyanaconda/modules/storage/checker/utils.py ++++ b/pyanaconda/modules/storage/checker/utils.py +@@ -16,7 +16,7 @@ + # Red Hat, Inc. + # + import gi +-gi.require_version("BlockDev", "2.0") ++gi.require_version("BlockDev", "3.0") + from gi.repository import BlockDev as blockdev + + from collections import defaultdict +diff --git a/pyanaconda/modules/storage/dasd/discover.py b/pyanaconda/modules/storage/dasd/discover.py +index 06e3b39..d1de38e 100644 +--- a/pyanaconda/modules/storage/dasd/discover.py ++++ b/pyanaconda/modules/storage/dasd/discover.py +@@ -18,7 +18,7 @@ + # Red Hat, Inc. + # + import gi +-gi.require_version("BlockDev", "2.0") ++gi.require_version("BlockDev", "3.0") + from gi.repository import BlockDev as blockdev + + from pyanaconda.core.regexes import DASD_DEVICE_NUMBER +diff --git a/pyanaconda/modules/storage/dasd/format.py b/pyanaconda/modules/storage/dasd/format.py +index 7ae389b..48d5c46 100644 +--- a/pyanaconda/modules/storage/dasd/format.py ++++ b/pyanaconda/modules/storage/dasd/format.py +@@ -21,7 +21,7 @@ from pyanaconda.modules.common.task import Task + from pyanaconda.anaconda_loggers import get_module_logger + + import gi +-gi.require_version("BlockDev", "2.0") ++gi.require_version("BlockDev", "3.0") + from gi.repository import BlockDev as blockdev + + log = get_module_logger(__name__) +diff --git a/pyanaconda/modules/storage/devicetree/fsset.py b/pyanaconda/modules/storage/devicetree/fsset.py +index 0d151d3..4db3759 100644 +--- a/pyanaconda/modules/storage/devicetree/fsset.py ++++ b/pyanaconda/modules/storage/devicetree/fsset.py +@@ -20,7 +20,7 @@ import shutil + import time + + import gi +-gi.require_version("BlockDev", "2.0") ++gi.require_version("BlockDev", "3.0") + from gi.repository import BlockDev as blockdev + + from blivet.devices import NoDevice, DirectoryDevice, NFSDevice, FileDevice, MDRaidArrayDevice, \ +diff --git a/pyanaconda/modules/storage/initialization.py b/pyanaconda/modules/storage/initialization.py +index c9fa787..e2a55f0 100644 +--- a/pyanaconda/modules/storage/initialization.py ++++ b/pyanaconda/modules/storage/initialization.py +@@ -26,7 +26,7 @@ from pyanaconda.anaconda_logging import program_log_lock + from pyanaconda.core.configuration.anaconda import conf + + import gi +-gi.require_version("BlockDev", "2.0") ++gi.require_version("BlockDev", "3.0") + from gi.repository import BlockDev as blockdev + + __all__ = ["enable_installer_mode"] +diff --git a/pyanaconda/modules/storage/installation.py b/pyanaconda/modules/storage/installation.py +index e57f56d..4daaf7b 100644 +--- a/pyanaconda/modules/storage/installation.py ++++ b/pyanaconda/modules/storage/installation.py +@@ -41,7 +41,7 @@ from pyanaconda.modules.common.errors.installation import StorageInstallationErr + from pyanaconda.modules.common.task import Task + + import gi +-gi.require_version("BlockDev", "2.0") ++gi.require_version("BlockDev", "3.0") + from gi.repository import BlockDev as blockdev + + log = get_module_logger(__name__) +diff --git a/pyanaconda/modules/storage/nvdimm/nvdimm.py b/pyanaconda/modules/storage/nvdimm/nvdimm.py +index f9aef8b..1aa6295 100644 +--- a/pyanaconda/modules/storage/nvdimm/nvdimm.py ++++ b/pyanaconda/modules/storage/nvdimm/nvdimm.py +@@ -32,7 +32,7 @@ from pyanaconda.modules.storage.nvdimm.nvdimm_interface import NVDIMMInterface + from pyanaconda.modules.storage.nvdimm.reconfigure import NVDIMMReconfigureTask + + import gi +-gi.require_version("BlockDev", "2.0") ++gi.require_version("BlockDev", "3.0") + from gi.repository import BlockDev as blockdev + + log = get_module_logger(__name__) +diff --git a/pyanaconda/modules/storage/zfcp/discover.py b/pyanaconda/modules/storage/zfcp/discover.py +index c212a79..21ae02f 100644 +--- a/pyanaconda/modules/storage/zfcp/discover.py ++++ b/pyanaconda/modules/storage/zfcp/discover.py +@@ -18,7 +18,7 @@ + # Red Hat, Inc. + # + import gi +-gi.require_version("BlockDev", "2.0") ++gi.require_version("BlockDev", "3.0") + from gi.repository import BlockDev as blockdev + + from blivet.zfcp import zfcp +-- +2.47.1 + diff --git a/1007-Remove-nvdimm-support.patch b/1007-Remove-nvdimm-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..61678e43b95b4239affb588bf492514cb60f09b2 --- /dev/null +++ b/1007-Remove-nvdimm-support.patch @@ -0,0 +1,3011 @@ +From d9db0eabf401f0af359201c3ff2ecbac8e056b5c Mon Sep 17 00:00:00 2001 +From: gc-taifu +Date: Thu, 27 Mar 2025 20:03:43 +0800 +Subject: [PATCH] Remove nvdimm support + +--- + anaconda.py | 4 - + configure | 3 +- + .../modules/common/constants/objects.py | 5 - + .../modules/common/structures/storage.py | 5 - + pyanaconda/modules/storage/Makefile.am | 2 +- + pyanaconda/modules/storage/Makefile.in | 2 +- + .../modules/storage/devicetree/viewer.py | 8 - + pyanaconda/modules/storage/kickstart.py | 36 +- + pyanaconda/modules/storage/nvdimm/Makefile.am | 21 - + pyanaconda/modules/storage/nvdimm/Makefile.in | 568 ------------------ + pyanaconda/modules/storage/nvdimm/__init__.py | 20 - + pyanaconda/modules/storage/nvdimm/nvdimm.py | 256 -------- + .../storage/nvdimm/nvdimm_interface.py | 59 -- + .../modules/storage/nvdimm/reconfigure.py | 59 -- + pyanaconda/modules/storage/storage.py | 7 - + .../ui/gui/spokes/advanced_storage.glade | 308 ---------- + pyanaconda/ui/gui/spokes/advanced_storage.py | 77 +-- + .../ui/gui/spokes/advstorage/nvdimm.glade | 363 ----------- + pyanaconda/ui/gui/spokes/advstorage/nvdimm.py | 175 ------ + pyanaconda/ui/gui/spokes/storage.py | 4 - + pyanaconda/ui/lib/storage.py | 25 +- + .../storage/test_module_device_tree.py | 22 +- + .../modules/storage/test_module_nvdimm.py | 484 --------------- + .../modules/storage/test_module_storage.py | 64 +- + 24 files changed, 11 insertions(+), 2566 deletions(-) + delete mode 100644 pyanaconda/modules/storage/nvdimm/Makefile.am + delete mode 100644 pyanaconda/modules/storage/nvdimm/Makefile.in + delete mode 100644 pyanaconda/modules/storage/nvdimm/__init__.py + delete mode 100644 pyanaconda/modules/storage/nvdimm/nvdimm.py + delete mode 100644 pyanaconda/modules/storage/nvdimm/nvdimm_interface.py + delete mode 100644 pyanaconda/modules/storage/nvdimm/reconfigure.py + delete mode 100644 pyanaconda/ui/gui/spokes/advstorage/nvdimm.glade + delete mode 100644 pyanaconda/ui/gui/spokes/advstorage/nvdimm.py + delete mode 100644 tests/unit_tests/pyanaconda_tests/modules/storage/test_module_nvdimm.py + +diff --git a/anaconda.py b/anaconda.py +index d56002f..291abab 100755 +--- a/anaconda.py ++++ b/anaconda.py +@@ -477,10 +477,6 @@ if __name__ == "__main__": + from pyanaconda.ui.lib.storage import ignore_oemdrv_disks + ignore_oemdrv_disks() + +- # Ignore nvdimm devices. +- from pyanaconda.ui.lib.storage import ignore_nvdimm_blockdevs +- ignore_nvdimm_blockdevs() +- + # Specify protected devices. + from pyanaconda.modules.common.constants.services import STORAGE + +diff --git a/configure b/configure +index edb8709..66670c2 100755 +--- a/configure ++++ b/configure +@@ -15639,7 +15639,7 @@ s_arch="`echo $build_cpu | sed -e s/i.86/i386/ -e s/powerpc.*/ppc/`" + subdirs="$subdirs widgets" + + +-ac_config_files="$ac_config_files Makefile anaconda.spec data/Makefile data/command-stubs/Makefile docs/Makefile dracut/Makefile data/conf.d/Makefile data/profile.d/Makefile data/liveinst/Makefile data/liveinst/console.apps/Makefile data/liveinst/gnome/Makefile data/liveinst/pam.d/Makefile data/systemd/Makefile data/dbus/Makefile data/window-manager/Makefile data/window-manager/config/Makefile po/Makefile scripts/Makefile pyanaconda/Makefile pyanaconda/version.py pyanaconda/core/Makefile pyanaconda/core/kickstart/Makefile pyanaconda/core/configuration/Makefile pyanaconda/core/startup/Makefile pyanaconda/payload/Makefile pyanaconda/payload/dnf/Makefile pyanaconda/payload/live/Makefile pyanaconda/payload/source/Makefile pyanaconda/ui/Makefile pyanaconda/ui/categories/Makefile pyanaconda/ui/lib/Makefile pyanaconda/ui/gui/hubs/Makefile pyanaconda/ui/gui/spokes/Makefile pyanaconda/ui/gui/spokes/advstorage/Makefile pyanaconda/ui/gui/spokes/lib/Makefile pyanaconda/ui/gui/Makefile pyanaconda/ui/tui/hubs/Makefile pyanaconda/ui/tui/spokes/Makefile pyanaconda/ui/tui/Makefile pyanaconda/ui/webui/Makefile pyanaconda/modules/Makefile pyanaconda/modules/common/Makefile pyanaconda/modules/common/base/Makefile pyanaconda/modules/common/task/Makefile pyanaconda/modules/common/errors/Makefile pyanaconda/modules/common/constants/Makefile pyanaconda/modules/common/structures/Makefile pyanaconda/modules/boss/Makefile pyanaconda/modules/boss/install_manager/Makefile pyanaconda/modules/boss/kickstart_manager/Makefile pyanaconda/modules/boss/module_manager/Makefile pyanaconda/modules/boss/user_interface/Makefile pyanaconda/modules/security/Makefile pyanaconda/modules/timezone/Makefile pyanaconda/modules/network/Makefile pyanaconda/modules/network/firewall/Makefile pyanaconda/modules/localization/Makefile pyanaconda/modules/users/Makefile pyanaconda/modules/payloads/Makefile pyanaconda/modules/payloads/payload/Makefile pyanaconda/modules/payloads/payload/dnf/Makefile pyanaconda/modules/payloads/payload/live_os/Makefile pyanaconda/modules/payloads/payload/live_image/Makefile pyanaconda/modules/payloads/payload/rpm_ostree/Makefile pyanaconda/modules/payloads/base/Makefile pyanaconda/modules/payloads/source/Makefile pyanaconda/modules/payloads/source/cdn/Makefile pyanaconda/modules/payloads/source/cdrom/Makefile pyanaconda/modules/payloads/source/closest_mirror/Makefile pyanaconda/modules/payloads/source/flatpak/Makefile pyanaconda/modules/payloads/source/harddrive/Makefile pyanaconda/modules/payloads/source/hmc/Makefile pyanaconda/modules/payloads/source/live_image/Makefile pyanaconda/modules/payloads/source/live_os/Makefile pyanaconda/modules/payloads/source/live_tar/Makefile pyanaconda/modules/payloads/source/nfs/Makefile pyanaconda/modules/payloads/source/repo_files/Makefile pyanaconda/modules/payloads/source/rpm_ostree/Makefile pyanaconda/modules/payloads/source/url/Makefile pyanaconda/modules/storage/Makefile pyanaconda/modules/storage/bootloader/Makefile pyanaconda/modules/storage/checker/Makefile pyanaconda/modules/storage/dasd/Makefile pyanaconda/modules/storage/devicetree/Makefile pyanaconda/modules/storage/disk_initialization/Makefile pyanaconda/modules/storage/disk_selection/Makefile pyanaconda/modules/storage/fcoe/Makefile pyanaconda/modules/storage/iscsi/Makefile pyanaconda/modules/storage/nvdimm/Makefile pyanaconda/modules/storage/partitioning/Makefile pyanaconda/modules/storage/partitioning/automatic/Makefile pyanaconda/modules/storage/partitioning/blivet/Makefile pyanaconda/modules/storage/partitioning/custom/Makefile pyanaconda/modules/storage/partitioning/interactive/Makefile pyanaconda/modules/storage/partitioning/manual/Makefile pyanaconda/modules/storage/snapshot/Makefile pyanaconda/modules/storage/zfcp/Makefile pyanaconda/modules/services/Makefile pyanaconda/modules/subscription/Makefile data/pixmaps/Makefile tests/Makefile ui/Makefile utils/Makefile utils/dd/Makefile" ++ac_config_files="$ac_config_files Makefile anaconda.spec data/Makefile data/command-stubs/Makefile docs/Makefile dracut/Makefile data/conf.d/Makefile data/profile.d/Makefile data/liveinst/Makefile data/liveinst/console.apps/Makefile data/liveinst/gnome/Makefile data/liveinst/pam.d/Makefile data/systemd/Makefile data/dbus/Makefile data/window-manager/Makefile data/window-manager/config/Makefile po/Makefile scripts/Makefile pyanaconda/Makefile pyanaconda/version.py pyanaconda/core/Makefile pyanaconda/core/kickstart/Makefile pyanaconda/core/configuration/Makefile pyanaconda/core/startup/Makefile pyanaconda/payload/Makefile pyanaconda/payload/dnf/Makefile pyanaconda/payload/live/Makefile pyanaconda/payload/source/Makefile pyanaconda/ui/Makefile pyanaconda/ui/categories/Makefile pyanaconda/ui/lib/Makefile pyanaconda/ui/gui/hubs/Makefile pyanaconda/ui/gui/spokes/Makefile pyanaconda/ui/gui/spokes/advstorage/Makefile pyanaconda/ui/gui/spokes/lib/Makefile pyanaconda/ui/gui/Makefile pyanaconda/ui/tui/hubs/Makefile pyanaconda/ui/tui/spokes/Makefile pyanaconda/ui/tui/Makefile pyanaconda/ui/webui/Makefile pyanaconda/modules/Makefile pyanaconda/modules/common/Makefile pyanaconda/modules/common/base/Makefile pyanaconda/modules/common/task/Makefile pyanaconda/modules/common/errors/Makefile pyanaconda/modules/common/constants/Makefile pyanaconda/modules/common/structures/Makefile pyanaconda/modules/boss/Makefile pyanaconda/modules/boss/install_manager/Makefile pyanaconda/modules/boss/kickstart_manager/Makefile pyanaconda/modules/boss/module_manager/Makefile pyanaconda/modules/boss/user_interface/Makefile pyanaconda/modules/security/Makefile pyanaconda/modules/timezone/Makefile pyanaconda/modules/network/Makefile pyanaconda/modules/network/firewall/Makefile pyanaconda/modules/localization/Makefile pyanaconda/modules/users/Makefile pyanaconda/modules/payloads/Makefile pyanaconda/modules/payloads/payload/Makefile pyanaconda/modules/payloads/payload/dnf/Makefile pyanaconda/modules/payloads/payload/live_os/Makefile pyanaconda/modules/payloads/payload/live_image/Makefile pyanaconda/modules/payloads/payload/rpm_ostree/Makefile pyanaconda/modules/payloads/base/Makefile pyanaconda/modules/payloads/source/Makefile pyanaconda/modules/payloads/source/cdn/Makefile pyanaconda/modules/payloads/source/cdrom/Makefile pyanaconda/modules/payloads/source/closest_mirror/Makefile pyanaconda/modules/payloads/source/flatpak/Makefile pyanaconda/modules/payloads/source/harddrive/Makefile pyanaconda/modules/payloads/source/hmc/Makefile pyanaconda/modules/payloads/source/live_image/Makefile pyanaconda/modules/payloads/source/live_os/Makefile pyanaconda/modules/payloads/source/live_tar/Makefile pyanaconda/modules/payloads/source/nfs/Makefile pyanaconda/modules/payloads/source/repo_files/Makefile pyanaconda/modules/payloads/source/rpm_ostree/Makefile pyanaconda/modules/payloads/source/url/Makefile pyanaconda/modules/storage/Makefile pyanaconda/modules/storage/bootloader/Makefile pyanaconda/modules/storage/checker/Makefile pyanaconda/modules/storage/dasd/Makefile pyanaconda/modules/storage/devicetree/Makefile pyanaconda/modules/storage/disk_initialization/Makefile pyanaconda/modules/storage/disk_selection/Makefile pyanaconda/modules/storage/fcoe/Makefile pyanaconda/modules/storage/iscsi/Makefile pyanaconda/modules/storage/partitioning/Makefile pyanaconda/modules/storage/partitioning/automatic/Makefile pyanaconda/modules/storage/partitioning/blivet/Makefile pyanaconda/modules/storage/partitioning/custom/Makefile pyanaconda/modules/storage/partitioning/interactive/Makefile pyanaconda/modules/storage/partitioning/manual/Makefile pyanaconda/modules/storage/snapshot/Makefile pyanaconda/modules/storage/zfcp/Makefile pyanaconda/modules/services/Makefile pyanaconda/modules/subscription/Makefile data/pixmaps/Makefile tests/Makefile ui/Makefile utils/Makefile utils/dd/Makefile" + + + ### Include Cockpit part to the make execution as optional ### +@@ -16767,7 +16767,6 @@ do + "pyanaconda/modules/storage/disk_selection/Makefile") CONFIG_FILES="$CONFIG_FILES pyanaconda/modules/storage/disk_selection/Makefile" ;; + "pyanaconda/modules/storage/fcoe/Makefile") CONFIG_FILES="$CONFIG_FILES pyanaconda/modules/storage/fcoe/Makefile" ;; + "pyanaconda/modules/storage/iscsi/Makefile") CONFIG_FILES="$CONFIG_FILES pyanaconda/modules/storage/iscsi/Makefile" ;; +- "pyanaconda/modules/storage/nvdimm/Makefile") CONFIG_FILES="$CONFIG_FILES pyanaconda/modules/storage/nvdimm/Makefile" ;; + "pyanaconda/modules/storage/partitioning/Makefile") CONFIG_FILES="$CONFIG_FILES pyanaconda/modules/storage/partitioning/Makefile" ;; + "pyanaconda/modules/storage/partitioning/automatic/Makefile") CONFIG_FILES="$CONFIG_FILES pyanaconda/modules/storage/partitioning/automatic/Makefile" ;; + "pyanaconda/modules/storage/partitioning/blivet/Makefile") CONFIG_FILES="$CONFIG_FILES pyanaconda/modules/storage/partitioning/blivet/Makefile" ;; +diff --git a/pyanaconda/modules/common/constants/objects.py b/pyanaconda/modules/common/constants/objects.py +index 639ef53..4c97447 100644 +--- a/pyanaconda/modules/common/constants/objects.py ++++ b/pyanaconda/modules/common/constants/objects.py +@@ -89,11 +89,6 @@ ISCSI = DBusObjectIdentifier( + basename="iSCSI" + ) + +-NVDIMM = DBusObjectIdentifier( +- namespace=STORAGE_NAMESPACE, +- basename="NVDIMM" +-) +- + SNAPSHOT = DBusObjectIdentifier( + namespace=STORAGE_NAMESPACE, + basename="Snapshot" +diff --git a/pyanaconda/modules/common/structures/storage.py b/pyanaconda/modules/common/structures/storage.py +index 96de552..cbf440a 100644 +--- a/pyanaconda/modules/common/structures/storage.py ++++ b/pyanaconda/modules/common/structures/storage.py +@@ -168,11 +168,6 @@ class DeviceData(DBusData): + target + path-id + +- Attributes for NVDIMM: +- mode +- namespace +- path-id +- + Attributes for ZFCP: + fcp-lun + wwpn +diff --git a/pyanaconda/modules/storage/Makefile.am b/pyanaconda/modules/storage/Makefile.am +index 88b2b0a..554903f 100644 +--- a/pyanaconda/modules/storage/Makefile.am ++++ b/pyanaconda/modules/storage/Makefile.am +@@ -14,7 +14,7 @@ + # You should have received a copy of the GNU Lesser General Public License + # along with this program. If not, see . + +-SUBDIRS = disk_initialization disk_selection bootloader partitioning dasd zfcp fcoe nvdimm \ ++SUBDIRS = disk_initialization disk_selection bootloader partitioning dasd zfcp fcoe \ + snapshot devicetree checker iscsi + + pkgpyexecdir = $(pyexecdir)/py$(PACKAGE_NAME) +diff --git a/pyanaconda/modules/storage/Makefile.in b/pyanaconda/modules/storage/Makefile.in +index f23f360..0e156fb 100644 +--- a/pyanaconda/modules/storage/Makefile.in ++++ b/pyanaconda/modules/storage/Makefile.in +@@ -376,7 +376,7 @@ target_alias = @target_alias@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-SUBDIRS = disk_initialization disk_selection bootloader partitioning dasd zfcp fcoe nvdimm \ ++SUBDIRS = disk_initialization disk_selection bootloader partitioning dasd zfcp fcoe \ + snapshot devicetree checker iscsi + + storage_moduledir = $(pkgpyexecdir)/modules/storage +diff --git a/pyanaconda/modules/storage/devicetree/viewer.py b/pyanaconda/modules/storage/devicetree/viewer.py +index cb08da7..82bf2da 100644 +--- a/pyanaconda/modules/storage/devicetree/viewer.py ++++ b/pyanaconda/modules/storage/devicetree/viewer.py +@@ -102,8 +102,6 @@ class DeviceTreeViewer(ABC): + self._set_device_data_fcoe(device, data) + elif device.type == "iscsi": + self._set_device_data_iscsi(device, data) +- elif device.type == "nvdimm": +- self._set_device_data_nvdimm(device, data) + elif device.type == "zfcp": + self._set_device_data_zfcp(device, data) + +@@ -149,12 +147,6 @@ class DeviceTreeViewer(ABC): + data.attrs["target"] = self._get_attribute(device, "target") + data.attrs["path-id"] = self._get_attribute(device, "id_path") + +- def _set_device_data_nvdimm(self, device, data): +- """Set data for an NVDIMM device.""" +- data.attrs["mode"] = self._get_attribute(device, "mode") +- data.attrs["namespace"] = self._get_attribute(device, "devname") +- data.attrs["path-id"] = self._get_attribute(device, "id_path") +- + def _set_device_data_zfcp(self, device, data): + """Set data for a ZFCP device.""" + data.attrs["fcp-lun"] = self._get_attribute(device, "fcp_lun") +diff --git a/pyanaconda/modules/storage/kickstart.py b/pyanaconda/modules/storage/kickstart.py +index 0e4ddda..cdd0fff 100644 +--- a/pyanaconda/modules/storage/kickstart.py ++++ b/pyanaconda/modules/storage/kickstart.py +@@ -19,11 +19,10 @@ + # + from blivet.fcoe import fcoe + from blivet.iscsi import iscsi +-from blivet.static_data import nvdimm + from blivet.zfcp import zfcp + from blivet.formats import get_format + from blivet.formats.disklabel import DiskLabel +-from pykickstart.constants import CLEARPART_TYPE_NONE, NVDIMM_ACTION_RECONFIGURE, NVDIMM_ACTION_USE ++from pykickstart.constants import CLEARPART_TYPE_NONE + from pykickstart.errors import KickstartParseError + + from pyanaconda.network import get_supported_devices, wait_for_network_devices +@@ -217,37 +216,6 @@ class IscsiName(COMMANDS.IscsiName): + return retval + + +-class Nvdimm(COMMANDS.Nvdimm): +- """The nvdimm kickstart command.""" +- +- def parse(self, args): +- action = super().parse(args) +- +- if action.action == NVDIMM_ACTION_RECONFIGURE: +- if action.namespace not in nvdimm.namespaces: +- raise KickstartParseError(_("Namespace \"{}\" given in nvdimm command was not " +- "found.").format(action.namespace), lineno=self.lineno) +- +- log.info("Reconfiguring the namespace %s to %s mode", action.namespace, action.mode) +- nvdimm.reconfigure_namespace( +- action.namespace, +- action.mode, +- sector_size=action.sectorsize +- ) +- +- elif action.action == NVDIMM_ACTION_USE: +- if action.namespace and action.namespace not in nvdimm.namespaces: +- raise KickstartParseError(_("Namespace \"{}\" given in nvdimm command was not " +- "found.").format(action.namespace), lineno=self.lineno) +- +- devs = action.blockdevs +- action.blockdevs = get_device_names(devs, disks_only=True, lineno=self.lineno, +- msg=_("Disk \"{}\" given in nvdimm command does " +- "not exist.")) +- +- return action +- +- + class Snapshot(COMMANDS.Snapshot): + """The snapshot kickstart command.""" + +@@ -291,7 +259,7 @@ class StorageKickstartSpecification(KickstartSpecification): + "iscsiname": IscsiName, + "logvol": COMMANDS.LogVol, + "mount": COMMANDS.Mount, +- "nvdimm": Nvdimm, ++ "nvdimm": COMMANDS.Nvdimm, + "part": COMMANDS.Partition, + "partition": COMMANDS.Partition, + "raid": COMMANDS.Raid, +diff --git a/pyanaconda/modules/storage/nvdimm/Makefile.am b/pyanaconda/modules/storage/nvdimm/Makefile.am +deleted file mode 100644 +index da50638..0000000 +--- a/pyanaconda/modules/storage/nvdimm/Makefile.am ++++ /dev/null +@@ -1,21 +0,0 @@ +-# +-# Copyright (C) 2019 Red Hat, Inc. +-# +-# This program 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. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU Lesser General Public License for more details. +-# +-# You should have received a copy of the GNU Lesser General Public License +-# along with this program. If not, see . +- +-pkgpyexecdir = $(pyexecdir)/py$(PACKAGE_NAME) +-nvdimm_moduledir = $(pkgpyexecdir)/modules/storage/nvdimm +-nvdimm_module_PYTHON = $(srcdir)/*.py +- +-MAINTAINERCLEANFILES = Makefile.in +diff --git a/pyanaconda/modules/storage/nvdimm/Makefile.in b/pyanaconda/modules/storage/nvdimm/Makefile.in +deleted file mode 100644 +index e397cdf..0000000 +--- a/pyanaconda/modules/storage/nvdimm/Makefile.in ++++ /dev/null +@@ -1,568 +0,0 @@ +-# Makefile.in generated by automake 1.16.5 from Makefile.am. +-# @configure_input@ +- +-# Copyright (C) 1994-2021 Free Software Foundation, Inc. +- +-# This Makefile.in is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. +- +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +-# PARTICULAR PURPOSE. +- +-@SET_MAKE@ +- +-# +-# Copyright (C) 2019 Red Hat, Inc. +-# +-# This program 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. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU Lesser General Public License for more details. +-# +-# You should have received a copy of the GNU Lesser General Public License +-# along with this program. If not, see . +-VPATH = @srcdir@ +-am__is_gnu_make = { \ +- if test -z '$(MAKELEVEL)'; then \ +- false; \ +- elif test -n '$(MAKE_HOST)'; then \ +- true; \ +- elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ +- true; \ +- else \ +- false; \ +- fi; \ +-} +-am__make_running_with_option = \ +- case $${target_option-} in \ +- ?) ;; \ +- *) echo "am__make_running_with_option: internal error: invalid" \ +- "target option '$${target_option-}' specified" >&2; \ +- exit 1;; \ +- esac; \ +- has_opt=no; \ +- sane_makeflags=$$MAKEFLAGS; \ +- if $(am__is_gnu_make); then \ +- sane_makeflags=$$MFLAGS; \ +- else \ +- case $$MAKEFLAGS in \ +- *\\[\ \ ]*) \ +- bs=\\; \ +- sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ +- | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ +- esac; \ +- fi; \ +- skip_next=no; \ +- strip_trailopt () \ +- { \ +- flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ +- }; \ +- for flg in $$sane_makeflags; do \ +- test $$skip_next = yes && { skip_next=no; continue; }; \ +- case $$flg in \ +- *=*|--*) continue;; \ +- -*I) strip_trailopt 'I'; skip_next=yes;; \ +- -*I?*) strip_trailopt 'I';; \ +- -*O) strip_trailopt 'O'; skip_next=yes;; \ +- -*O?*) strip_trailopt 'O';; \ +- -*l) strip_trailopt 'l'; skip_next=yes;; \ +- -*l?*) strip_trailopt 'l';; \ +- -[dEDm]) skip_next=yes;; \ +- -[JT]) skip_next=yes;; \ +- esac; \ +- case $$flg in \ +- *$$target_option*) has_opt=yes; break;; \ +- esac; \ +- done; \ +- test $$has_opt = yes +-am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +-am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +-pkgdatadir = $(datadir)/@PACKAGE@ +-pkgincludedir = $(includedir)/@PACKAGE@ +-pkglibdir = $(libdir)/@PACKAGE@ +-pkglibexecdir = $(libexecdir)/@PACKAGE@ +-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +-install_sh_DATA = $(install_sh) -c -m 644 +-install_sh_PROGRAM = $(install_sh) -c +-install_sh_SCRIPT = $(install_sh) -c +-INSTALL_HEADER = $(INSTALL_DATA) +-transform = $(program_transform_name) +-NORMAL_INSTALL = : +-PRE_INSTALL = : +-POST_INSTALL = : +-NORMAL_UNINSTALL = : +-PRE_UNINSTALL = : +-POST_UNINSTALL = : +-build_triplet = @build@ +-host_triplet = @host@ +-subdir = pyanaconda/modules/storage/nvdimm +-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ +- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ +- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ +- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ +- $(ACLOCAL_M4) +-DIST_COMMON = $(srcdir)/Makefile.am $(nvdimm_module_PYTHON) \ +- $(am__DIST_COMMON) +-mkinstalldirs = $(install_sh) -d +-CONFIG_HEADER = $(top_builddir)/config.h +-CONFIG_CLEAN_FILES = +-CONFIG_CLEAN_VPATH_FILES = +-AM_V_P = $(am__v_P_@AM_V@) +-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +-am__v_P_0 = false +-am__v_P_1 = : +-AM_V_GEN = $(am__v_GEN_@AM_V@) +-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +-am__v_GEN_0 = @echo " GEN " $@; +-am__v_GEN_1 = +-AM_V_at = $(am__v_at_@AM_V@) +-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +-am__v_at_0 = @ +-am__v_at_1 = +-SOURCES = +-DIST_SOURCES = +-am__can_run_installinfo = \ +- case $$AM_UPDATE_INFO_DIR in \ +- n|no|NO) false;; \ +- *) (install-info --version) >/dev/null 2>&1;; \ +- esac +-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +-am__vpath_adj = case $$p in \ +- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ +- *) f=$$p;; \ +- esac; +-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +-am__install_max = 40 +-am__nobase_strip_setup = \ +- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +-am__nobase_strip = \ +- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +-am__nobase_list = $(am__nobase_strip_setup); \ +- for p in $$list; do echo "$$p $$p"; done | \ +- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ +- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ +- if (++n[$$2] == $(am__install_max)) \ +- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ +- END { for (dir in files) print dir, files[dir] }' +-am__base_list = \ +- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ +- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +-am__uninstall_files_from_dir = { \ +- test -z "$$files" \ +- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ +- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ +- $(am__cd) "$$dir" && rm -f $$files; }; \ +- } +-am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile) +-am__installdirs = "$(DESTDIR)$(nvdimm_moduledir)" +-am__pep3147_tweak = \ +- sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.pyc __pycache__/&.*.pyo|' +-py_compile = $(top_srcdir)/py-compile +-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/py-compile +-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +-ACLOCAL = @ACLOCAL@ +-AMTAR = @AMTAR@ +-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +-ANACONDA_RELEASE = @ANACONDA_RELEASE@ +-AR = @AR@ +-AUTOCONF = @AUTOCONF@ +-AUTOHEADER = @AUTOHEADER@ +-AUTOMAKE = @AUTOMAKE@ +-AWK = @AWK@ +-CC = @CC@ +-CCDEPMODE = @CCDEPMODE@ +-CFLAGS = @CFLAGS@ +-CPPFLAGS = @CPPFLAGS@ +-CSCOPE = @CSCOPE@ +-CTAGS = @CTAGS@ +-CYGPATH_W = @CYGPATH_W@ +-DEFS = @DEFS@ +-DEPDIR = @DEPDIR@ +-DLLTOOL = @DLLTOOL@ +-DSYMUTIL = @DSYMUTIL@ +-DUMPBIN = @DUMPBIN@ +-ECHO_C = @ECHO_C@ +-ECHO_N = @ECHO_N@ +-ECHO_T = @ECHO_T@ +-EGREP = @EGREP@ +-ETAGS = @ETAGS@ +-EXEEXT = @EXEEXT@ +-FGREP = @FGREP@ +-FILECMD = @FILECMD@ +-GIT_L10N_BRANCH = @GIT_L10N_BRANCH@ +-GREP = @GREP@ +-INSTALL = @INSTALL@ +-INSTALL_DATA = @INSTALL_DATA@ +-INSTALL_PROGRAM = @INSTALL_PROGRAM@ +-INSTALL_SCRIPT = @INSTALL_SCRIPT@ +-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +-L10N_REPOSITORY = @L10N_REPOSITORY@ +-LD = @LD@ +-LDFLAGS = @LDFLAGS@ +-LIBARCHIVE_CFLAGS = @LIBARCHIVE_CFLAGS@ +-LIBARCHIVE_LIBS = @LIBARCHIVE_LIBS@ +-LIBOBJS = @LIBOBJS@ +-LIBS = @LIBS@ +-LIBTOOL = @LIBTOOL@ +-LIPO = @LIPO@ +-LN_S = @LN_S@ +-LTLIBOBJS = @LTLIBOBJS@ +-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +-MAKEINFO = @MAKEINFO@ +-MANIFEST_TOOL = @MANIFEST_TOOL@ +-MKDIR_P = @MKDIR_P@ +-MSGCAT = @MSGCAT@ +-MSGFMT = @MSGFMT@ +-MSGMERGE = @MSGMERGE@ +-NM = @NM@ +-NMEDIT = @NMEDIT@ +-OBJDUMP = @OBJDUMP@ +-OBJEXT = @OBJEXT@ +-OTOOL = @OTOOL@ +-OTOOL64 = @OTOOL64@ +-PACKAGE = @PACKAGE@ +-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +-PACKAGE_NAME = @PACKAGE_NAME@ +-PACKAGE_RELEASE = @PACKAGE_RELEASE@ +-PACKAGE_STRING = @PACKAGE_STRING@ +-PACKAGE_TARNAME = @PACKAGE_TARNAME@ +-PACKAGE_URL = @PACKAGE_URL@ +-PACKAGE_VERSION = @PACKAGE_VERSION@ +-PATH_SEPARATOR = @PATH_SEPARATOR@ +-PKG_CONFIG = @PKG_CONFIG@ +-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +-PYTHON = @PYTHON@ +-PYTHON3_CFLAGS = @PYTHON3_CFLAGS@ +-PYTHON3_LIBS = @PYTHON3_LIBS@ +-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +-PYTHON_PLATFORM = @PYTHON_PLATFORM@ +-PYTHON_PREFIX = @PYTHON_PREFIX@ +-PYTHON_VERSION = @PYTHON_VERSION@ +-RANLIB = @RANLIB@ +-RPM_CFLAGS = @RPM_CFLAGS@ +-RPM_LIBS = @RPM_LIBS@ +-SED = @SED@ +-SET_MAKE = @SET_MAKE@ +-SHELL = @SHELL@ +-STRIP = @STRIP@ +-VERSION = @VERSION@ +-WEBUI_SUBDIR = @WEBUI_SUBDIR@ +-XGETTEXT = @XGETTEXT@ +-abs_builddir = @abs_builddir@ +-abs_srcdir = @abs_srcdir@ +-abs_top_builddir = @abs_top_builddir@ +-abs_top_srcdir = @abs_top_srcdir@ +-ac_ct_AR = @ac_ct_AR@ +-ac_ct_CC = @ac_ct_CC@ +-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +-am__include = @am__include@ +-am__leading_dot = @am__leading_dot@ +-am__quote = @am__quote@ +-am__tar = @am__tar@ +-am__untar = @am__untar@ +-bindir = @bindir@ +-build = @build@ +-build_alias = @build_alias@ +-build_cpu = @build_cpu@ +-build_os = @build_os@ +-build_vendor = @build_vendor@ +-builddir = @builddir@ +-datadir = @datadir@ +-datarootdir = @datarootdir@ +-docdir = @docdir@ +-dvidir = @dvidir@ +-exec_prefix = @exec_prefix@ +-host = @host@ +-host_alias = @host_alias@ +-host_cpu = @host_cpu@ +-host_os = @host_os@ +-host_vendor = @host_vendor@ +-htmldir = @htmldir@ +-includedir = @includedir@ +-infodir = @infodir@ +-install_sh = @install_sh@ +-libdir = @libdir@ +-libexecdir = @libexecdir@ +-localedir = @localedir@ +-localstatedir = @localstatedir@ +-mandir = @mandir@ +-mkdir_p = @mkdir_p@ +-oldincludedir = @oldincludedir@ +-pdfdir = @pdfdir@ +-pkgpyexecdir = $(pyexecdir)/py$(PACKAGE_NAME) +-pkgpythondir = @pkgpythondir@ +-prefix = @prefix@ +-program_transform_name = @program_transform_name@ +-psdir = @psdir@ +-pyexecdir = @pyexecdir@ +-pythondir = @pythondir@ +-runstatedir = @runstatedir@ +-sbindir = @sbindir@ +-sharedstatedir = @sharedstatedir@ +-srcdir = @srcdir@ +-subdirs = @subdirs@ +-sysconfdir = @sysconfdir@ +-target_alias = @target_alias@ +-top_build_prefix = @top_build_prefix@ +-top_builddir = @top_builddir@ +-top_srcdir = @top_srcdir@ +-nvdimm_moduledir = $(pkgpyexecdir)/modules/storage/nvdimm +-nvdimm_module_PYTHON = $(srcdir)/*.py +-MAINTAINERCLEANFILES = Makefile.in +-all: all-am +- +-.SUFFIXES: +-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +- @for dep in $?; do \ +- case '$(am__configure_deps)' in \ +- *$$dep*) \ +- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ +- && { if test -f $@; then exit 0; else break; fi; }; \ +- exit 1;; \ +- esac; \ +- done; \ +- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign pyanaconda/modules/storage/nvdimm/Makefile'; \ +- $(am__cd) $(top_srcdir) && \ +- $(AUTOMAKE) --foreign pyanaconda/modules/storage/nvdimm/Makefile +-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +- @case '$?' in \ +- *config.status*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ +- *) \ +- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ +- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ +- esac; +- +-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +- +-$(top_srcdir)/configure: $(am__configure_deps) +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +-$(ACLOCAL_M4): $(am__aclocal_m4_deps) +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +-$(am__aclocal_m4_deps): +- +-mostlyclean-libtool: +- -rm -f *.lo +- +-clean-libtool: +- -rm -rf .libs _libs +-install-nvdimm_modulePYTHON: $(nvdimm_module_PYTHON) +- @$(NORMAL_INSTALL) +- @list='$(nvdimm_module_PYTHON)'; dlist=; list2=; test -n "$(nvdimm_moduledir)" || list=; \ +- if test -n "$$list"; then \ +- echo " $(MKDIR_P) '$(DESTDIR)$(nvdimm_moduledir)'"; \ +- $(MKDIR_P) "$(DESTDIR)$(nvdimm_moduledir)" || exit 1; \ +- fi; \ +- for p in $$list; do \ +- if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ +- if test -f $$b$$p; then \ +- $(am__strip_dir) \ +- dlist="$$dlist $$f"; \ +- list2="$$list2 $$b$$p"; \ +- else :; fi; \ +- done; \ +- for file in $$list2; do echo $$file; done | $(am__base_list) | \ +- while read files; do \ +- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(nvdimm_moduledir)'"; \ +- $(INSTALL_DATA) $$files "$(DESTDIR)$(nvdimm_moduledir)" || exit $$?; \ +- done || exit $$?; \ +- if test -n "$$dlist"; then \ +- $(am__py_compile) --destdir "$(DESTDIR)" \ +- --basedir "$(nvdimm_moduledir)" $$dlist; \ +- else :; fi +- +-uninstall-nvdimm_modulePYTHON: +- @$(NORMAL_UNINSTALL) +- @list='$(nvdimm_module_PYTHON)'; test -n "$(nvdimm_moduledir)" || list=; \ +- py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ +- test -n "$$py_files" || exit 0; \ +- dir='$(DESTDIR)$(nvdimm_moduledir)'; \ +- pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ +- pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ +- st=0; \ +- for files in "$$py_files" "$$pyc_files" "$$pyo_files"; do \ +- $(am__uninstall_files_from_dir) || st=$$?; \ +- done; \ +- dir='$(DESTDIR)$(nvdimm_moduledir)'; \ +- echo "$$py_files" | $(am__pep3147_tweak) | $(am__base_list) | \ +- while read files; do \ +- $(am__uninstall_files_from_dir) || st=$$?; \ +- done || exit $$?; \ +- exit $$st +-tags TAGS: +- +-ctags CTAGS: +- +-cscope cscopelist: +- +-distdir: $(BUILT_SOURCES) +- $(MAKE) $(AM_MAKEFLAGS) distdir-am +- +-distdir-am: $(DISTFILES) +- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ +- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ +- list='$(DISTFILES)'; \ +- dist_files=`for file in $$list; do echo $$file; done | \ +- sed -e "s|^$$srcdirstrip/||;t" \ +- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ +- case $$dist_files in \ +- */*) $(MKDIR_P) `echo "$$dist_files" | \ +- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ +- sort -u` ;; \ +- esac; \ +- for file in $$dist_files; do \ +- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ +- if test -d $$d/$$file; then \ +- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ +- if test -d "$(distdir)/$$file"; then \ +- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ +- fi; \ +- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ +- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ +- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ +- fi; \ +- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ +- else \ +- test -f "$(distdir)/$$file" \ +- || cp -p $$d/$$file "$(distdir)/$$file" \ +- || exit 1; \ +- fi; \ +- done +-check-am: all-am +-check: check-am +-all-am: Makefile +-installdirs: +- for dir in "$(DESTDIR)$(nvdimm_moduledir)"; do \ +- test -z "$$dir" || $(MKDIR_P) "$$dir"; \ +- done +-install: install-am +-install-exec: install-exec-am +-install-data: install-data-am +-uninstall: uninstall-am +- +-install-am: all-am +- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +- +-installcheck: installcheck-am +-install-strip: +- if test -z '$(STRIP)'; then \ +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- install; \ +- else \ +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ +- fi +-mostlyclean-generic: +- +-clean-generic: +- +-distclean-generic: +- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) +- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) +- +-maintainer-clean-generic: +- @echo "This command is intended for maintainers to use" +- @echo "it deletes files that may require special tools to rebuild." +- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +-clean: clean-am +- +-clean-am: clean-generic clean-libtool mostlyclean-am +- +-distclean: distclean-am +- -rm -f Makefile +-distclean-am: clean-am distclean-generic +- +-dvi: dvi-am +- +-dvi-am: +- +-html: html-am +- +-html-am: +- +-info: info-am +- +-info-am: +- +-install-data-am: install-nvdimm_modulePYTHON +- +-install-dvi: install-dvi-am +- +-install-dvi-am: +- +-install-exec-am: +- +-install-html: install-html-am +- +-install-html-am: +- +-install-info: install-info-am +- +-install-info-am: +- +-install-man: +- +-install-pdf: install-pdf-am +- +-install-pdf-am: +- +-install-ps: install-ps-am +- +-install-ps-am: +- +-installcheck-am: +- +-maintainer-clean: maintainer-clean-am +- -rm -f Makefile +-maintainer-clean-am: distclean-am maintainer-clean-generic +- +-mostlyclean: mostlyclean-am +- +-mostlyclean-am: mostlyclean-generic mostlyclean-libtool +- +-pdf: pdf-am +- +-pdf-am: +- +-ps: ps-am +- +-ps-am: +- +-uninstall-am: uninstall-nvdimm_modulePYTHON +- +-.MAKE: install-am install-strip +- +-.PHONY: all all-am check check-am clean clean-generic clean-libtool \ +- cscopelist-am ctags-am distclean distclean-generic \ +- distclean-libtool distdir dvi dvi-am html html-am info info-am \ +- install install-am install-data install-data-am install-dvi \ +- install-dvi-am install-exec install-exec-am install-html \ +- install-html-am install-info install-info-am install-man \ +- install-nvdimm_modulePYTHON install-pdf install-pdf-am \ +- install-ps install-ps-am install-strip installcheck \ +- installcheck-am installdirs maintainer-clean \ +- maintainer-clean-generic mostlyclean mostlyclean-generic \ +- mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ +- uninstall-am uninstall-nvdimm_modulePYTHON +- +-.PRECIOUS: Makefile +- +- +-# Tell versions [3.59,3.63) of GNU make to not export all variables. +-# Otherwise a system limit (for SysV at least) may be exceeded. +-.NOEXPORT: +diff --git a/pyanaconda/modules/storage/nvdimm/__init__.py b/pyanaconda/modules/storage/nvdimm/__init__.py +deleted file mode 100644 +index 1efa6f4..0000000 +--- a/pyanaconda/modules/storage/nvdimm/__init__.py ++++ /dev/null +@@ -1,20 +0,0 @@ +-# +-# Copyright (C) 2019 Red Hat, Inc. +-# +-# This copyrighted material is made available to anyone wishing to use, +-# modify, copy, or redistribute it subject to the terms and conditions of +-# the GNU General Public License v.2, or (at your option) any later version. +-# This program is distributed in the hope that it will be useful, but WITHOUT +-# ANY WARRANTY expressed or implied, including the implied warranties of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +-# Public License for more details. You should have received a copy of the +-# GNU General Public License along with this program; if not, write to the +-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +-# 02110-1301, USA. Any Red Hat trademarks that are incorporated in the +-# source code or documentation are not subject to the GNU General Public +-# License and may only be used or replicated with the express permission of +-# Red Hat, Inc. +-# +-from pyanaconda.modules.storage.nvdimm.nvdimm import NVDIMMModule +- +-__all__ = ["NVDIMMModule"] +diff --git a/pyanaconda/modules/storage/nvdimm/nvdimm.py b/pyanaconda/modules/storage/nvdimm/nvdimm.py +deleted file mode 100644 +index 1aa6295..0000000 +--- a/pyanaconda/modules/storage/nvdimm/nvdimm.py ++++ /dev/null +@@ -1,256 +0,0 @@ +-# +-# NVDIMM module +-# +-# Copyright (C) 2019 Red Hat, Inc. +-# +-# This copyrighted material is made available to anyone wishing to use, +-# modify, copy, or redistribute it subject to the terms and conditions of +-# the GNU General Public License v.2, or (at your option) any later version. +-# This program is distributed in the hope that it will be useful, but WITHOUT +-# ANY WARRANTY expressed or implied, including the implied warranties of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +-# Public License for more details. You should have received a copy of the +-# GNU General Public License along with this program; if not, write to the +-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +-# 02110-1301, USA. Any Red Hat trademarks that are incorporated in the +-# source code or documentation are not subject to the GNU General Public +-# License and may only be used or replicated with the express permission of +-# Red Hat, Inc. +-# +-from blivet import udev +-from blivet.devices import NVDIMMNamespaceDevice +-from blivet.static_data import nvdimm +- +-from pykickstart.constants import NVDIMM_ACTION_RECONFIGURE, NVDIMM_ACTION_USE +- +-from pyanaconda.core.dbus import DBus +-from pyanaconda.modules.common.base import KickstartBaseModule +-from pyanaconda.modules.common.errors.storage import UnavailableStorageError +-from pyanaconda.anaconda_loggers import get_module_logger +-from pyanaconda.modules.common.constants.objects import NVDIMM +-from pyanaconda.modules.storage.nvdimm.nvdimm_interface import NVDIMMInterface +-from pyanaconda.modules.storage.nvdimm.reconfigure import NVDIMMReconfigureTask +- +-import gi +-gi.require_version("BlockDev", "3.0") +-from gi.repository import BlockDev as blockdev +- +-log = get_module_logger(__name__) +- +-__all__ = ["NVDIMMModule"] +- +- +-class NVDIMMModule(KickstartBaseModule): +- """The NVDIMM module.""" +- +- def __init__(self): +- super().__init__() +- self._storage = None +- self._actions = list() +- +- def publish(self): +- """Publish the module.""" +- DBus.publish_object(NVDIMM.object_path, NVDIMMInterface(self)) +- +- def is_supported(self): +- """Is this module supported?""" +- return True +- +- @property +- def storage(self): +- """The storage model. +- +- :return: an instance of Blivet +- :raise: UnavailableStorageError if not available +- """ +- if self._storage is None: +- raise UnavailableStorageError() +- +- return self._storage +- +- def on_storage_changed(self, storage): +- """Keep the instance of the current storage.""" +- self._storage = storage +- +- def process_kickstart(self, data): +- """Process the kickstart data.""" +- self._actions = data.nvdimm.actionList +- +- def setup_kickstart(self, data): +- """Setup the kickstart data.""" +- namespaces = self.get_used_namespaces() +- self.set_namespaces_to_use(namespaces) +- data.nvdimm.actionList = self._actions +- +- def get_namespaces_to_use(self): +- """Get namespaces to be used. +- +- FIXME: Can we return an empty string in the set? +- +- :return: a set of namespaces +- """ +- return { +- action.namespace for action in self._actions +- if action.action == NVDIMM_ACTION_RECONFIGURE +- or (action.action == NVDIMM_ACTION_USE and action.namespace) +- } +- +- def get_devices_to_use(self): +- """Get devices to be used. +- +- :return: a set to device names +- """ +- return { +- dev for action in self._actions for dev in action.blockdevs +- if action.action == NVDIMM_ACTION_USE and action.blockdevs +- } +- +- def get_devices_to_ignore(self): +- """Get devices to be ignored. +- +- By default nvdimm devices are ignored. To become available for +- installation, the device(s) must be specified by nvdimm kickstart +- command. Also, only devices in sector mode are allowed. +- +- Don't ignore devices that have an iso9660 file system. We might +- want to use them as an installation source. +- +- :return: a set of device names +- """ +- namespaces_to_use = self.get_namespaces_to_use() +- devices_to_use = self.get_devices_to_use() +- devices_to_ignore = set() +- +- for ns_name, ns_info in nvdimm.namespaces.items(): +- # this is happening when namespace is set to DEVDAX mode - block device is not present +- if ns_info.blockdev is None: +- log.debug("%s will be skipped - NVDIMM namespace block device information " +- "can't be retrieved", ns_name) +- continue +- +- info = udev.get_device(device_node="/dev/" + ns_info.blockdev) +- +- if info and udev.device_get_format(info) == "iso9660": +- log.debug("%s / %s won't be ignored - NVDIMM device has " +- "an iso9660 file system", ns_name, ns_info.blockdev) +- continue +- elif ns_info.mode != blockdev.NVDIMMNamespaceMode.SECTOR: +- log.debug("%s / %s will be ignored - NVDIMM device is not " +- "in sector mode", ns_name, ns_info.blockdev) +- elif ns_name not in namespaces_to_use and ns_info.blockdev not in devices_to_use: +- log.debug("%s / %s will be ignored - NVDIMM device has not been " +- "configured to be used", ns_name, ns_info.blockdev) +- else: +- continue +- +- devices_to_ignore.add(ns_info.blockdev) +- +- return devices_to_ignore +- +- def create_action(self): +- """Create a new action. +- +- FIXME: Don't use kickstart data. +- +- :return: an instance of an action +- """ +- from pyanaconda.core.kickstart.commands import NvdimmData +- action = NvdimmData() +- return action +- +- def find_action(self, namespace): +- """Find an action by the namespace. +- +- :param namespace: a name of the namespace +- :return: an instance of an action with the same namespace +- """ +- if not namespace: +- return None +- +- for action in self._actions: +- if action.namespace == namespace: +- return action +- +- return None +- +- def update_action(self, namespace, mode, sector_size): +- """Update an action. +- +- :param namespace: a device name of a namespace +- :param mode: a mode +- :param sector_size: a sector size +- :return: an instance of the updated action +- """ +- action = self.find_action(namespace) +- +- if not action: +- action = self.create_action() +- self._actions.append(action) +- +- action.action = NVDIMM_ACTION_RECONFIGURE +- action.namespace = namespace +- action.mode = mode +- action.sectorsize = sector_size +- return action +- +- def get_used_namespaces(self): +- """Get a list of namespaces that are used for the installation. +- +- :return: a list of namespaces +- """ +- return [ +- d.devname for d in self.storage.disks +- if isinstance(d, NVDIMMNamespaceDevice) +- ] +- +- def set_namespaces_to_use(self, namespaces): +- """Set namespaces to use. +- +- Updates "nvdimm use" commands. Doesn't add use command for devices which +- are reconfigured with "nvdimm reconfigure" because reconfigure in kickstart +- implies use. +- +- :param namespaces: a list of namespaces +- :return: a list of actions +- """ +- log.debug("Setting namespaces to use to: %s", namespaces) +- +- # Keep the reconfiguration actions. +- reconfigure_actions = [ +- action for action in self._actions +- if action.action == NVDIMM_ACTION_RECONFIGURE +- ] +- +- namespaces_to_configure = { +- action.namespace for action in reconfigure_actions +- } +- +- # Create new use actions. +- use_actions = [] +- namespaces_to_use = sorted(namespaces) +- +- for namespace in namespaces_to_use: +- # Reconfigured namespaces are used implicitly. +- if namespace in namespaces_to_configure: +- continue +- +- action = self.create_action() +- action.action = NVDIMM_ACTION_USE +- action.namespace = namespace +- use_actions.append(action) +- +- # Update the current actions. +- self._actions = reconfigure_actions + use_actions +- return self._actions +- +- def reconfigure_with_task(self, namespace, mode, sector_size): +- """Reconfigure a namespace. +- +- :param namespace: a device name of a namespace (e.g. 'namespace0.0') +- :param mode: a new mode (one of 'sector', 'memory', 'dax') +- :param sector_size: a sector size for the sector mode +- :return: a task +- """ +- task = NVDIMMReconfigureTask(namespace, mode, sector_size) +- task.succeeded_signal.connect(lambda: self.update_action(namespace, mode, sector_size)) +- return task +diff --git a/pyanaconda/modules/storage/nvdimm/nvdimm_interface.py b/pyanaconda/modules/storage/nvdimm/nvdimm_interface.py +deleted file mode 100644 +index 4709952..0000000 +--- a/pyanaconda/modules/storage/nvdimm/nvdimm_interface.py ++++ /dev/null +@@ -1,59 +0,0 @@ +-# +-# DBus interface for the NVDIMM module. +-# +-# Copyright (C) 2019 Red Hat, Inc. +-# +-# This copyrighted material is made available to anyone wishing to use, +-# modify, copy, or redistribute it subject to the terms and conditions of +-# the GNU General Public License v.2, or (at your option) any later version. +-# This program is distributed in the hope that it will be useful, but WITHOUT +-# ANY WARRANTY expressed or implied, including the implied warranties of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +-# Public License for more details. You should have received a copy of the +-# GNU General Public License along with this program; if not, write to the +-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +-# 02110-1301, USA. Any Red Hat trademarks that are incorporated in the +-# source code or documentation are not subject to the GNU General Public +-# License and may only be used or replicated with the express permission of +-# Red Hat, Inc. +-# +-from dasbus.server.interface import dbus_interface +-from dasbus.typing import * # pylint: disable=wildcard-import +-from pyanaconda.modules.common.base import KickstartModuleInterfaceTemplate +-from pyanaconda.modules.common.constants.objects import NVDIMM +-from pyanaconda.modules.common.containers import TaskContainer +- +- +-@dbus_interface(NVDIMM.interface_name) +-class NVDIMMInterface(KickstartModuleInterfaceTemplate): +- """DBus interface for the NVDIMM module.""" +- +- def IsSupported(self) -> Bool: +- """Is this module supported?""" +- return self.implementation.is_supported() +- +- def GetDevicesToIgnore(self) -> List[Str]: +- """Get devices to be ignored. +- +- :return: a list of device names +- """ +- return list(self.implementation.get_devices_to_ignore()) +- +- def SetNamespacesToUse(self, namespaces: List[Str]): +- """Set namespaces to use. +- +- :param namespaces: a list of namespaces +- """ +- self.implementation.set_namespaces_to_use(namespaces) +- +- def ReconfigureWithTask(self, namespace: Str, mode: Str, sector_size: Int) -> ObjPath: +- """Reconfigure a namespace. +- +- :param namespace: a device name of a namespace (e.g. 'namespace0.0') +- :param mode: a new mode (one of 'sector', 'memory', 'dax') +- :param sector_size: a sector size for the sector mode +- :return: a DBus path to a task +- """ +- return TaskContainer.to_object_path( +- self.implementation.reconfigure_with_task(namespace, mode, sector_size) +- ) +diff --git a/pyanaconda/modules/storage/nvdimm/reconfigure.py b/pyanaconda/modules/storage/nvdimm/reconfigure.py +deleted file mode 100644 +index 6e29ee3..0000000 +--- a/pyanaconda/modules/storage/nvdimm/reconfigure.py ++++ /dev/null +@@ -1,59 +0,0 @@ +-# +-# Reconfigure tasks +-# +-# Copyright (C) 2019 Red Hat, Inc. +-# +-# This copyrighted material is made available to anyone wishing to use, +-# modify, copy, or redistribute it subject to the terms and conditions of +-# the GNU General Public License v.2, or (at your option) any later version. +-# This program is distributed in the hope that it will be useful, but WITHOUT +-# ANY WARRANTY expressed or implied, including the implied warranties of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +-# Public License for more details. You should have received a copy of the +-# GNU General Public License along with this program; if not, write to the +-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +-# 02110-1301, USA. Any Red Hat trademarks that are incorporated in the +-# source code or documentation are not subject to the GNU General Public +-# License and may only be used or replicated with the express permission of +-# Red Hat, Inc. +-# +-from blivet.static_data import nvdimm +- +-from pyanaconda.anaconda_loggers import get_module_logger +-from pyanaconda.modules.common.errors.configuration import StorageConfigurationError +-from pyanaconda.modules.common.task import Task +- +-log = get_module_logger(__name__) +- +-__all__ = ["NVDIMMReconfigureTask"] +- +- +-class NVDIMMReconfigureTask(Task): +- """A task for reconfiguring an NVDIMM namespace""" +- +- def __init__(self, namespace, mode, sector_size): +- super().__init__() +- self._namespace = namespace +- self._mode = mode +- self._sector_size = sector_size +- +- @property +- def name(self): +- return "Reconfigure an NVDIMM namespace" +- +- def run(self): +- """Run the reconfiguration.""" +- self._reconfigure_namespace(self._namespace, self._mode, self._sector_size) +- +- def _reconfigure_namespace(self, namespace, mode, sector_size): +- """Reconfigure a namespace. +- +- :param namespace: a device name of the namespace +- :param mode: a new mode of the namespace +- :param sector_size: a size of the sector +- :raise: StorageConfigurationError in case of failure +- """ +- try: +- nvdimm.reconfigure_namespace(namespace, mode, sector_size=sector_size) +- except Exception as e: # pylint: disable=broad-except +- raise StorageConfigurationError(str(e)) from e +diff --git a/pyanaconda/modules/storage/storage.py b/pyanaconda/modules/storage/storage.py +index 6ce86df..f0376ac 100644 +--- a/pyanaconda/modules/storage/storage.py ++++ b/pyanaconda/modules/storage/storage.py +@@ -36,7 +36,6 @@ from pyanaconda.modules.storage.installation import MountFilesystemsTask, Create + WriteConfigurationTask + from pyanaconda.modules.storage.iscsi import ISCSIModule + from pyanaconda.modules.storage.kickstart import StorageKickstartSpecification +-from pyanaconda.modules.storage.nvdimm import NVDIMMModule + from pyanaconda.modules.storage.partitioning.constants import PartitioningMethod + from pyanaconda.modules.storage.partitioning.factory import PartitioningFactory + from pyanaconda.modules.storage.partitioning.validate import StorageValidateTask +@@ -97,9 +96,6 @@ class StorageService(KickstartService): + self._iscsi_module = ISCSIModule() + self._add_module(self._iscsi_module) + +- self._nvdimm_module = NVDIMMModule() +- self._add_module(self._nvdimm_module) +- + self._dasd_module = DASDModule() + self._add_module(self._dasd_module) + +@@ -122,9 +118,6 @@ class StorageService(KickstartService): + self.storage_changed.connect( + self._bootloader_module.on_storage_changed + ) +- self.storage_changed.connect( +- self._nvdimm_module.on_storage_changed +- ) + self.storage_changed.connect( + self._dasd_module.on_storage_changed + ) +diff --git a/pyanaconda/ui/gui/spokes/advanced_storage.glade b/pyanaconda/ui/gui/spokes/advanced_storage.glade +index d26300b..6c40d4e 100644 +--- a/pyanaconda/ui/gui/spokes/advanced_storage.glade ++++ b/pyanaconda/ui/gui/spokes/advanced_storage.glade +@@ -48,9 +48,6 @@ + + diskStore + +- +- diskStore +- + + diskStore + +@@ -1211,296 +1208,6 @@ + False + + +- +- +- True +- False +- 6 +- 6 +- 12 +- vertical +- 6 +- +- +- True +- False +- 6 +- +- +- True +- False +- Filter B_y: +- True +- zTypeCombo +- 0 +- +- +- False +- True +- 0 +- +- +- +- +- True +- False +- +- None +- Namespace +- Mode +- +- +- +- +- False +- True +- 1 +- +- +- +- +- True +- False +- True +- True +- False +- False +- +- +- True +- False +- True +- +- +- +- +- +- +- +- True +- False +- True +- 6 +- +- +- True +- False +- Show Only Devices in _Mode: +- True +- nvdimmModeCombo +- +- +- False +- True +- 0 +- +- +- +- +- True +- False +- True +- Sector +- +- Sector +- Memory +- +- +- +- +- True +- True +- 1 +- +- +- +- +- 1 +- +- +- +- +- +- +- +- True +- False +- 6 +- +- +- True +- False +- _Namespace: +- True +- nvdimmNamespaceEntry +- +- +- False +- True +- 0 +- +- +- +- +- True +- True +- True +- edit-clear-symbolic +- +- +- +- +- True +- True +- 1 +- +- +- +- +- 1 +- +- +- +- +- +- +- +- +- +- +- +- +- +- True +- True +- 2 +- +- +- +- +- False +- True +- 0 +- +- +- +- +- True +- True +- True +- True +- in +- +- +- True +- True +- True +- True +- nvdimmModel +- True +- False +- True +- +- +- multiple +- +- +- +- +- +- +- +- +- +- 2 +- 0 +- 1 +- +- +- +- +- +- +- Namespace +- True +- +- +- +- 2 +- 0 +- 17 +- +- +- +- +- +- +- Name +- True +- +- +- +- 2 +- 0 +- 3 +- +- +- +- +- +- +- Mode +- True +- +- +- +- 2 +- 0 +- 18 +- +- +- +- +- +- +- Capacity +- True +- +- +- +- 2 +- 0 +- 6 +- +- +- +- +- +- +- +- +- True +- True +- 1 +- +- +- +- +- 3 +- +- +- +- +- True +- False +- _NVDIMM Devices +- True +- +- +- 3 +- False +- +- + + + True +@@ -1939,21 +1646,6 @@ + 3 + + +- +- +- Reconfigure _NVDIMM... +- True +- True +- True +- True +- +- +- +- False +- True +- 4 +- +- + + + Refresh _List +diff --git a/pyanaconda/ui/gui/spokes/advanced_storage.py b/pyanaconda/ui/gui/spokes/advanced_storage.py +index 54b446d..2ab1d52 100644 +--- a/pyanaconda/ui/gui/spokes/advanced_storage.py ++++ b/pyanaconda/ui/gui/spokes/advanced_storage.py +@@ -35,7 +35,6 @@ from pyanaconda.ui.gui.spokes.advstorage.fcoe import FCoEDialog + from pyanaconda.ui.gui.spokes.advstorage.iscsi import ISCSIDialog + from pyanaconda.ui.gui.spokes.advstorage.zfcp import ZFCPDialog + from pyanaconda.ui.gui.spokes.advstorage.dasd import DASDDialog +-from pyanaconda.ui.gui.spokes.advstorage.nvdimm import NVDIMMDialog + from pyanaconda.ui.gui.spokes.lib.cart import SelectedDisksDialog + from pyanaconda.ui.categories.system import SystemCategory + +@@ -50,8 +49,7 @@ __all__ = ["FilterSpoke"] + PAGE_SEARCH = 0 + PAGE_MULTIPATH = 1 + PAGE_OTHER = 2 +-PAGE_NVDIMM = 3 +-PAGE_Z = 4 ++PAGE_Z = 3 + + DiskStoreRow = namedtuple("DiskStoreRow", [ + "visible", "selected", "mutable", +@@ -431,61 +429,6 @@ class ZPage(FilterPage): + return False + + +-class NvdimmPage(FilterPage): +- # Match these to nvdimmTypeCombo ids in glade +- SEARCH_TYPE_NAMESPACE = 'Namespace' +- SEARCH_TYPE_MODE = 'Mode' +- +- def __init__(self, builder): +- super().__init__(builder, "nvdimmModel", "nvdimmTypeCombo") +- self._tree_view = self._builder.get_object("nvdimmTreeView") +- self._mode_combo = self._builder.get_object("nvdimmModeCombo") +- self._namespace_entry = self._builder.get_object("nvdimmNamespaceEntry") +- +- def is_member(self, device_type): +- return device_type == "nvdimm" +- +- def setup(self, store, disks, selected_names, protected_names): +- modes = set() +- +- for device_data in disks: +- mode = device_data.attrs.get("mode") +- row = create_row( +- device_data, +- device_data.name in selected_names and mode == "sector", +- device_data.name not in protected_names or mode != "sector", +- ) +- +- store.append([*row]) +- modes.add(mode) +- +- self._setup_combo(self._mode_combo, modes) +- self._setup_search_type() +- +- def clear(self): +- self._mode_combo.set_active(0) +- self._namespace_entry.set_text("") +- +- def _filter_func(self, filter_by, row): +- if filter_by == self.SEARCH_TYPE_MODE: +- return self._mode_combo.get_active_text() == row.mode +- +- if filter_by == self.SEARCH_TYPE_NAMESPACE: +- return self._namespace_entry.get_text().strip() in row.namespace +- +- return False +- +- def get_selected_namespaces(self): +- namespaces = [] +- selection = self._tree_view.get_selection() +- store, path_list = selection.get_selected_rows() +- +- for path in path_list: +- store_row = DiskStoreRow(*store[store.get_iter(path)]) +- namespaces.append(store_row.namespace) +- +- return namespaces +- + + class FilterSpoke(NormalSpoke): + """ +@@ -493,7 +436,7 @@ class FilterSpoke(NormalSpoke): + :parts: 3 + """ + builderObjects = ["diskStore", "filterWindow", +- "searchModel", "multipathModel", "otherModel", "zModel", "nvdimmModel"] ++ "searchModel", "multipathModel", "otherModel", "zModel"] + mainWidgetName = "filterWindow" + uiFile = "spokes/advanced_storage.glade" + category = SystemCategory +@@ -520,7 +463,6 @@ class FilterSpoke(NormalSpoke): + + self._notebook = self.builder.get_object("advancedNotebook") + self._store = self.builder.get_object("diskStore") +- self._reconfigure_nvdimm_button = self.builder.get_object("reconfigureNVDIMMButton") + + @property + def indirect(self): +@@ -542,7 +484,6 @@ class FilterSpoke(NormalSpoke): + PAGE_SEARCH: SearchPage(self.builder), + PAGE_MULTIPATH: MultipathPage(self.builder), + PAGE_OTHER: OtherPage(self.builder), +- PAGE_NVDIMM: NvdimmPage(self.builder), + PAGE_Z: ZPage(self.builder), + } + +@@ -559,9 +500,6 @@ class FilterSpoke(NormalSpoke): + if not STORAGE.get_proxy(ISCSI).IsSupported(): + self.builder.get_object("addISCSIButton").destroy() + +- # The button is sensitive only on NVDIMM page +- self._reconfigure_nvdimm_button.set_sensitive(False) +- + # report that we are done + self.initialize_done() + +@@ -665,7 +603,6 @@ class FilterSpoke(NormalSpoke): + + # Set up the UI. + notebook.get_nth_page(new_page_num).show_all() +- self._reconfigure_nvdimm_button.set_sensitive(new_page_num == 3) + + def on_row_toggled(self, button, path): + if not path: +@@ -710,12 +647,6 @@ class FilterSpoke(NormalSpoke): + dialog = DASDDialog(self.data) + self._run_dialog_and_refresh(dialog) + +- def on_reconfigure_nvdimm_clicked(self, widget, *args): +- log.debug("Reconfigure a NVDIMM device.") +- namespaces = self._pages[PAGE_NVDIMM].get_selected_namespaces() +- dialog = NVDIMMDialog(self.data, namespaces) +- self._run_dialog_and_refresh(dialog) +- + def _run_dialog_and_refresh(self, dialog): + # Run the dialog. + with self.main_window.enlightbox(dialog.window): +@@ -742,10 +673,6 @@ class FilterSpoke(NormalSpoke): + self._set_notebook_page("otherTypeNotebook", combo.get_active()) + self._refilter_current_page() + +- def on_nvdimm_type_combo_changed(self, combo): +- self._set_notebook_page("nvdimmTypeNotebook", combo.get_active()) +- self._refilter_current_page() +- + def on_z_type_combo_changed(self, combo): + self._set_notebook_page("zTypeNotebook", combo.get_active()) + self._refilter_current_page() +diff --git a/pyanaconda/ui/gui/spokes/advstorage/nvdimm.glade b/pyanaconda/ui/gui/spokes/advstorage/nvdimm.glade +deleted file mode 100644 +index a8464f7..0000000 +--- a/pyanaconda/ui/gui/spokes/advstorage/nvdimm.glade ++++ /dev/null +@@ -1,363 +0,0 @@ +- +- +- +- +- +- False +- 6 +- False +- True +- dialog +- False +- +- +- False +- vertical +- 2 +- +- +- False +- end +- +- +- _Cancel +- True +- True +- True +- True +- +- +- False +- True +- 0 +- +- +- +- +- gtk-ok +- True +- False +- True +- True +- True +- +- +- False +- True +- 1 +- +- +- +- +- False +- True +- end +- 0 +- +- +- +- +- True +- False +- 5 +- 6 +- 6 +- +- +- True +- False +- 6 +- The following NVDIMM devices selected from the list will be reconfigured to sector mode: +- True +- 0 +- +- +- 0 +- 0 +- 2 +- +- +- +- +- True +- False +- end +- _Sector size: +- True +- sectorSizeCombo +- +- +- 0 +- 3 +- +- +- +- +- True +- False +- center +- False +- False +- +- +- Start _Reconfiguration +- True +- True +- True +- center +- center +- True +- True +- +- +- +- +- +- +- +- +- True +- False +- center +- 5 +- +- +- True +- False +- True +- +- +- False +- True +- 0 +- +- +- +- +- True +- False +- Reconfiguring NVDIMM devices. This may take a moment... +- +- +- False +- True +- 1 +- +- +- +- +- 1 +- +- +- +- +- +- +- +- True +- False +- center +- 6 +- 6 +- +- +- True +- False +- 1 +- dialog-error-symbolic +- +- +- 0 +- 0 +- +- +- +- +- True +- False +- Device reconfiguration failed. +- 0 +- +- +- +- +- +- 1 +- 0 +- +- +- +- +- True +- False +- Error message goes here. +- 0 +- +- +- 1 +- 2 +- +- +- +- +- True +- False +- The following error occurred reconfiguring NVDIMM devices: +- True +- 0 +- +- +- 1 +- 1 +- +- +- +- +- +- +- +- +- +- +- 2 +- +- +- +- +- +- +- +- True +- False +- center +- 6 +- 6 +- +- +- True +- False +- 1 +- emblem-default-symbolic +- +- +- 0 +- 0 +- +- +- +- +- True +- False +- True +- Devices reconfiguration succeeded. +- 0 +- +- +- +- +- +- 1 +- 0 +- +- +- +- +- True +- False +- True +- +- +- 0 +- 1 +- +- +- +- +- True +- False +- Rescanning disks after reconfiguration. +-This may take a moment ... +- +- +- 1 +- 1 +- +- +- +- +- 3 +- +- +- +- +- +- +- +- 0 +- 4 +- 2 +- +- +- +- +- True +- False +- start +- 12 +- end +- +- +- +- +- +- 0 +- 1 +- 2 +- +- +- +- +- True +- False +- start +- False +- +- +- 1 +- 3 +- +- +- +- +- True +- False +- Warning: Existing data on reconfigured devices will be lost. +- +- +- +- +- +- 0 +- 2 +- 2 +- +- +- +- +- False +- True +- 1 +- +- +- +- +- +- cancelButton +- okButton +- +- +- +- +- +- +- +diff --git a/pyanaconda/ui/gui/spokes/advstorage/nvdimm.py b/pyanaconda/ui/gui/spokes/advstorage/nvdimm.py +deleted file mode 100644 +index 41245a9..0000000 +--- a/pyanaconda/ui/gui/spokes/advstorage/nvdimm.py ++++ /dev/null +@@ -1,175 +0,0 @@ +-# NVDIMM configuration dialog +-# +-# Copyright (C) 2018 Red Hat, Inc. +-# +-# This copyrighted material is made available to anyone wishing to use, +-# modify, copy, or redistribute it subject to the terms and conditions of +-# the GNU General Public License v.2, or (at your option) any later version. +-# This program is distributed in the hope that it will be useful, but WITHOUT +-# ANY WARRANTY expressed or implied, including the implied warranties of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +-# Public License for more details. You should have received a copy of the +-# GNU General Public License along with this program; if not, write to the +-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +-# 02110-1301, USA. Any Red Hat trademarks that are incorporated in the +-# source code or documentation are not subject to the GNU General Public +-# License and may only be used or replicated with the express permission of +-# Red Hat, Inc. +-# +-from pykickstart.constants import NVDIMM_MODE_SECTOR +-from pyanaconda.core.i18n import _, C_ +-from pyanaconda.modules.common.task import async_run_task +-from pyanaconda.modules.common.constants.services import STORAGE +-from pyanaconda.modules.common.constants.objects import NVDIMM +-from pyanaconda.modules.common.errors.configuration import StorageConfigurationError +-from pyanaconda.ui.gui import GUIObject +- +-from pyanaconda.anaconda_loggers import get_module_logger +-log = get_module_logger(__name__) +- +-__all__ = ["NVDIMMDialog"] +- +-PAGE_ACTION = 1 +-PAGE_RESULT_ERROR = 2 +-PAGE_RESULT_SUCCESS = 3 +- +-NVDIMM_SECTOR_SIZE_OPTIONS = ['512', '4096'] +- +-class NVDIMMDialog(GUIObject): +- """ +- .. inheritance-diagram:: NVDIMMDialog +- :parts: 3 +- """ +- builderObjects = ["nvdimmDialog", "sectorSizeAdjustment"] +- mainWidgetName = "nvdimmDialog" +- uiFile = "spokes/advstorage/nvdimm.glade" +- +- def __init__(self, data, namespaces): +- GUIObject.__init__(self, data) +- self._namespaces = namespaces +- self._storage_proxy = STORAGE.get_proxy() +- self._nvdimm_proxy = STORAGE.get_proxy(NVDIMM) +- +- self._startButton = self.builder.get_object("startButton") +- self._infoLabel = self.builder.get_object("infoLabel") +- self._devicesLabel = self.builder.get_object("devicesLabel") +- self._cancelButton = self.builder.get_object("cancelButton") +- self._okButton = self.builder.get_object("okButton") +- self._reconfigureSpinner = self.builder.get_object("reconfigureSpinner") +- self._repopulateSpinner = self.builder.get_object("repopulateSpinner") +- self._repopulateLabel = self.builder.get_object("repopulateLabel") +- self._sectorSizeLabel = self.builder.get_object("sectorSizeLabel") +- self._sectorSizeCombo = self.builder.get_object("sectorSizeCombo") +- self._conditionNotebook = self.builder.get_object("conditionNotebook") +- self._deviceErrorLabel = self.builder.get_object("deviceErrorLabel") +- self._setup_size_combo() +- +- def _setup_size_combo(self): +- for size in NVDIMM_SECTOR_SIZE_OPTIONS: +- self._sectorSizeCombo.append_text(size) +- +- def refresh(self): +- self._sectorSizeCombo.set_active(0) +- +- if self._namespaces: +- self._devicesLabel.set_text("%s" % ", ".join(self._namespaces)) +- else: +- self._sectorSizeCombo.set_sensitive(False) +- self._okButton.set_sensitive(False) +- self._startButton.set_sensitive(False) +- self._sectorSizeLabel.set_sensitive(False) +- self._infoLabel.set_text( +- C_("GUI|Advanced Storage|NVDIM", "No device to be reconfigured selected.") +- ) +- +- def run(self): +- rc = self.window.run() +- self.window.destroy() +- return rc +- +- @property +- def sector_size(self): +- """Size of the sector.""" +- return int(self._sectorSizeCombo.get_active_text()) +- +- def on_start_clicked(self, *args): +- """Start to reconfigure the namespaces.""" +- if not self._namespaces: +- return +- +- namespace = self._namespaces.pop(0) +- self.reconfigure_namespace(namespace) +- +- def reconfigure_namespace(self, namespace): +- """Start the reconfiguration task.""" +- # Update the widgets. +- self._conditionNotebook.set_current_page(PAGE_ACTION) +- self._startButton.set_sensitive(False) +- self._cancelButton.set_sensitive(False) +- self._sectorSizeCombo.set_sensitive(False) +- self._okButton.set_sensitive(False) +- +- # Get the data. +- mode = NVDIMM_MODE_SECTOR +- sector_size = self.sector_size +- +- # Get the task. +- task_path = self._nvdimm_proxy.ReconfigureWithTask(namespace, mode, sector_size) +- task_proxy = STORAGE.get_proxy(task_path) +- +- # Start the reconfiguration. +- async_run_task(task_proxy, self.reconfigure_finished) +- +- self._reconfigureSpinner.start() +- +- def reconfigure_finished(self, task_proxy): +- """Callback for reconfigure_namespaces.""" +- # Stop the spinner. +- self._reconfigureSpinner.stop() +- +- try: +- # Finish the task. +- task_proxy.Finish() +- except StorageConfigurationError as e: +- # Configuration has failed, show the error. +- self._deviceErrorLabel.set_text(str(e)) +- self._conditionNotebook.set_current_page(PAGE_RESULT_ERROR) +- self._okButton.set_sensitive(True) +- else: +- # More namespaces to configure? Continue. +- if self._namespaces: +- namespace = self._namespaces.pop(0) +- self.reconfigure_namespace(namespace) +- return +- +- # Otherwise, repopulate the device tree. +- self.repopulate_storage() +- +- def repopulate_storage(self): +- """Repopulate the storage.""" +- # Update the widgets. +- self._conditionNotebook.set_current_page(PAGE_RESULT_SUCCESS) +- +- # Get the task. +- task_path = self._storage_proxy.ScanDevicesWithTask() +- task_proxy = STORAGE.get_proxy(task_path) +- +- # Start the task. +- async_run_task(task_proxy, self.repopulate_finished) +- +- self._repopulateSpinner.start() +- +- def repopulate_finished(self, task_proxy): +- """Callback for repopulate_storage. +- +- :param task_proxy: an instance of the task proxy +- """ +- # Stop the spinner. +- self._repopulateSpinner.stop() +- +- # Finish the task. The failures are fatal. +- task_proxy.Finish() +- +- # Set up the UI. +- self._repopulateLabel.set_text(_("Rescanning disks finished.")) +- self._okButton.set_sensitive(True) +diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py +index 754b33e..0eff59a 100644 +--- a/pyanaconda/ui/gui/spokes/storage.py ++++ b/pyanaconda/ui/gui/spokes/storage.py +@@ -460,10 +460,6 @@ class StorageSpoke(NormalSpoke, StorageCheckHandler): + wwpn=device_data.attrs.get("wwpn", ""), + lun=device_data.attrs.get("fcp-lun", "") + ) +- elif device_data.type == "nvdimm": +- description = _("NVDIMM device {namespace}").format( +- namespace=device_data.attrs.get("namespace", "") +- ) + else: + description = device_data.description + +diff --git a/pyanaconda/ui/lib/storage.py b/pyanaconda/ui/lib/storage.py +index 704cb6e..2cf41f7 100644 +--- a/pyanaconda/ui/lib/storage.py ++++ b/pyanaconda/ui/lib/storage.py +@@ -25,14 +25,13 @@ from dasbus.typing import unwrap_variant + from dasbus.client.proxy import get_object_path + + from pyanaconda.anaconda_loggers import get_module_logger +-from pyanaconda.core.configuration.anaconda import conf + from pyanaconda.core.constants import PARTITIONING_METHOD_AUTOMATIC, BOOTLOADER_DRIVE_UNSET, \ + PARTITIONING_METHOD_CUSTOM + from pyanaconda.core.i18n import P_, _ + from pyanaconda.errors import errorHandler as error_handler, ERROR_RAISE + from pyanaconda.flags import flags + from pyanaconda.modules.common.constants.objects import DISK_SELECTION, BOOTLOADER, DEVICE_TREE, \ +- DISK_INITIALIZATION, NVDIMM ++ DISK_INITIALIZATION + from pyanaconda.modules.common.constants.services import STORAGE + from pyanaconda.modules.common.errors.configuration import StorageConfigurationError, \ + BootloaderConfigurationError +@@ -348,7 +347,7 @@ def is_local_disk(device_type): + A local disk doesn't require any additional setup unlike + the advanced storage. + +- While technically local disks, zFCP and NVDIMM devices are ++ While technically local disks, zFCP devices are + advanced storage and should not be considered local. + + :param device_type: a device type +@@ -359,7 +358,6 @@ def is_local_disk(device_type): + "iscsi", + "fcoe", + "zfcp", +- "nvdimm" + ) + + +@@ -391,25 +389,6 @@ def size_from_input(input_str, units=None): + return size + + +-def ignore_nvdimm_blockdevs(): +- """Add nvdimm devices to be ignored to the ignored disks.""" +- if conf.target.is_directory: +- return +- +- nvdimm_proxy = STORAGE.get_proxy(NVDIMM) +- ignored_nvdimm_devs = nvdimm_proxy.GetDevicesToIgnore() +- +- if not ignored_nvdimm_devs: +- return +- +- log.debug("Adding NVDIMM devices %s to ignored disks", ",".join(ignored_nvdimm_devs)) +- +- disk_select_proxy = STORAGE.get_proxy(DISK_SELECTION) +- ignored_disks = disk_select_proxy.IgnoredDisks +- ignored_disks.extend(ignored_nvdimm_devs) +- disk_select_proxy.IgnoredDisks = ignored_disks +- +- + def ignore_oemdrv_disks(): + """Ignore disks labeled OEMDRV.""" + matched = device_matches("LABEL=OEMDRV", disks_only=True) +diff --git a/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_device_tree.py b/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_device_tree.py +index 13823eb..49c9880 100644 +--- a/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_device_tree.py ++++ b/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_device_tree.py +@@ -26,7 +26,7 @@ from unittest.mock import patch, Mock, PropertyMock + from tests.unit_tests.pyanaconda_tests import patch_dbus_publish_object, check_task_creation + + from blivet.devices import StorageDevice, DiskDevice, DASDDevice, ZFCPDiskDevice, PartitionDevice, \ +- LUKSDevice, iScsiDiskDevice, NVDIMMNamespaceDevice, FcoeDiskDevice, OpticalDevice ++ LUKSDevice, iScsiDiskDevice, FcoeDiskDevice, OpticalDevice + from blivet.errors import StorageError, FSError + from blivet.formats import get_format, device_formats, DeviceFormat + from blivet.formats.fs import FS, Iso9660FS +@@ -225,26 +225,6 @@ class DeviceTreeInterfaceTestCase(unittest.TestCase): + "path-id": "pci-0000:00:00.0-bla-1" + }) + +- def test_get_nvdimm_device_data(self): +- """Test GetDeviceData for NVDIMM.""" +- self._add_device(NVDIMMNamespaceDevice( +- "dev1", +- fmt=get_format("ext4"), +- size=Size("10 GiB"), +- mode="sector", +- devname="namespace0.0", +- sector_size=512, +- id_path="pci-0000:00:00.0-bla-1" +- )) +- +- data = self.interface.GetDeviceData("dev1") +- assert data['type'] == get_variant(Str, 'nvdimm') +- assert data['attrs'] == get_variant(Dict[Str, Str], { +- "mode": "sector", +- "namespace": "namespace0.0", +- "path-id": "pci-0000:00:00.0-bla-1" +- }) +- + def test_get_zfcp_device_data(self): + """Test GetDeviceData for zFCP.""" + self._add_device(ZFCPDiskDevice( +diff --git a/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_nvdimm.py b/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_nvdimm.py +deleted file mode 100644 +index 7d0c77a..0000000 +--- a/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_nvdimm.py ++++ /dev/null +@@ -1,484 +0,0 @@ +-# +-# Copyright (C) 2018 Red Hat, Inc. +-# +-# This copyrighted material is made available to anyone wishing to use, +-# modify, copy, or redistribute it subject to the terms and conditions of +-# the GNU General Public License v.2, or (at your option) any later version. +-# This program is distributed in the hope that it will be useful, but WITHOUT +-# ANY WARRANTY expressed or implied, including the implied warranties of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +-# Public License for more details. You should have received a copy of the +-# GNU General Public License along with this program; if not, write to the +-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +-# 02110-1301, USA. Any Red Hat trademarks that are incorporated in the +-# source code or documentation are not subject to the GNU General Public +-# License and may only be used or replicated with the express permission of +-# Red Hat, Inc. +-# +-# Red Hat Author(s): Radek Vykydal +-# +-import unittest +-import pytest +- +-from textwrap import dedent +-from unittest.mock import patch, Mock +- +-from blivet.devices import NVDIMMNamespaceDevice +-from blivet.formats import get_format +-from blivet.size import Size +- +-from tests.unit_tests.pyanaconda_tests import patch_dbus_publish_object, check_task_creation, \ +- clear_version_from_kickstart_string +- +-from pyanaconda.modules.common.errors.configuration import StorageConfigurationError +-from pyanaconda.modules.storage.devicetree.model import create_storage +-from pyanaconda.modules.storage.nvdimm import NVDIMMModule +-from pyanaconda.modules.storage.nvdimm.nvdimm_interface import NVDIMMInterface +-from pyanaconda.modules.storage.nvdimm.reconfigure import NVDIMMReconfigureTask +-from pyanaconda.modules.storage.storage import StorageService +-from pykickstart.constants import NVDIMM_MODE_SECTOR, NVDIMM_ACTION_RECONFIGURE +- +-import gi +-gi.require_version("BlockDev", "2.0") +-from gi.repository import BlockDev as blockdev +- +- +-class NVDIMMInterfaceTestCase(unittest.TestCase): +- """Test DBus interface of the NVDIMM module.""" +- +- def setUp(self): +- """Set up the module.""" +- self.nvdimm_module = NVDIMMModule() +- self.nvdimm_interface = NVDIMMInterface(self.nvdimm_module) +- +- def test_is_supported(self): +- assert self.nvdimm_interface.IsSupported() is True +- +- def test_get_devices_to_ignore(self): +- """Test GetDevicesToIgnore.""" +- assert self.nvdimm_interface.GetDevicesToIgnore() == [] +- +- def test_set_namespaces_to_use(self): +- """Test SetNamespacesToUse.""" +- self.nvdimm_interface.SetNamespacesToUse(["namespace0.0", "namespace1.0"]) +- +- @patch_dbus_publish_object +- def test_reconfigure_with_task(self, publisher): +- """Test ReconfigureWithTask.""" +- task_path = self.nvdimm_interface.ReconfigureWithTask("namespace0.0", "sector", 512) +- +- obj = check_task_creation(task_path, publisher, NVDIMMReconfigureTask) +- +- assert obj.implementation._namespace == "namespace0.0" +- assert obj.implementation._mode == "sector" +- assert obj.implementation._sector_size == 512 +- +- assert self.nvdimm_module.find_action("namespace0.0") is None +- obj.implementation.succeeded_signal.emit() +- +- action = self.nvdimm_module.find_action("namespace0.0") +- assert action.action == NVDIMM_ACTION_RECONFIGURE +- assert action.namespace == "namespace0.0" +- assert action.mode == "sector" +- assert action.sectorsize == 512 +- +- +-class NVDIMMTasksTestCase(unittest.TestCase): +- """Test NVDIMM tasks.""" +- +- def test_failed_reconfiguration(self): +- """Test the reconfiguration test.""" +- with pytest.raises(StorageConfigurationError): +- NVDIMMReconfigureTask("namespace0.0", "sector", 512).run() +- +- @patch("pyanaconda.modules.storage.nvdimm.reconfigure.nvdimm") +- def test_reconfiguration(self, nvdimm): +- """Test the reconfiguration test.""" +- NVDIMMReconfigureTask( +- "namespace0.0", "sector", sector_size=512 +- ).run() +- +- nvdimm.reconfigure_namespace.assert_called_once_with( +- "namespace0.0", "sector", sector_size=512 +- ) +- +- +-class NVDIMMKickstartTestCase(unittest.TestCase): +- """Test updating of nvdimm command from UI. +- +- The update is done: +- - always by disk selection in UI. +- - optionally by reconfiguring NVDIMM in UI. +- """ +- +- def setUp(self): +- self.maxDiff = None +- self.storage_module = StorageService() +- self.nvdimm_module = self.storage_module._nvdimm_module +- self.nvdimm_interface = NVDIMMInterface(self.nvdimm_module) +- +- def _read(self, input_ks): +- """Read the kickstart string.""" +- with patch("pyanaconda.modules.storage.kickstart.nvdimm") as nvdimm: +- # Fake the existence of the namespaces. +- nvdimm.namespaces = ["namespace0.0", "namespace1.0"] +- +- # Parse the kickstart now. +- self.storage_module.read_kickstart(input_ks) +- +- def _use(self, namespaces): +- """Represents update for NVDIMM disks selected in UI.""" +- storage = create_storage() +- self.storage_module._set_storage(storage) +- +- for number, namespace in enumerate(namespaces): +- device = NVDIMMNamespaceDevice( +- "dev{}".format(number), +- fmt=get_format("disklabel"), +- size=Size("10 GiB"), +- mode="sector", +- devname=namespace, +- sector_size=512, +- id_path="pci-0000:00:00.0-bla-1", +- exists=True +- ) +- storage.devicetree._add_device(device) +- +- def _reconfigure(self, namespace, sector_size): +- """Represents update for NVDIMM disk reconfigured in UI.""" +- self.nvdimm_module.update_action( +- namespace=namespace, +- mode=NVDIMM_MODE_SECTOR, +- sector_size=sector_size +- ) +- +- def _check(self, expected_ks): +- """Check the generated kickstart.""" +- assert clear_version_from_kickstart_string(self.storage_module.generate_kickstart()).strip() == \ +- dedent(expected_ks).strip() +- +- def _check_ignored(self, expected_devices): +- """Check the ignored devices.""" +- with patch("pyanaconda.modules.storage.nvdimm.nvdimm.nvdimm") as nvdimm: +- nvdimm.namespaces = { +- "namespace0.0": Mock(blockdev="pmem0", mode=blockdev.NVDIMMNamespaceMode.SECTOR), +- "namespace1.0": Mock(blockdev="pmem1", mode=blockdev.NVDIMMNamespaceMode.SECTOR), +- "namespace2.0": Mock(blockdev="pmem2", mode=blockdev.NVDIMMNamespaceMode.MEMORY), +- "namespace3.0": Mock(blockdev=None, mode=blockdev.NVDIMMNamespaceMode.DEVDAX), +- } +- +- ignored_devices = self.nvdimm_module.get_devices_to_ignore() +- assert sorted(ignored_devices) == expected_devices +- +- # Test setting use from UI +- +- def test_ksuse_use(self): +- """Test updating of nvdimm commands based on device selection in UI.""" +- input_ks = """ +- nvdimm use --namespace=namespace0.0 +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm use --namespace=namespace0.0 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem1", "pmem2"]) +- self._use(["namespace0.0"]) +- self._check(expected_ks) +- +- def test_ksuse_use2(self): +- """Test updating of nvdimm commands based on device selection in UI.""" +- input_ks = """ +- nvdimm use --namespace=namespace0.0 +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm use --namespace=namespace0.0 +- nvdimm use --namespace=namespace1.0 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem1", "pmem2"]) +- self._use(["namespace0.0", "namespace1.0"]) +- self._check(expected_ks) +- +- def test_ksuse_use_none(self): +- """Test updating of nvdimm commands based on device selection in UI.""" +- input_ks = """ +- nvdimm use --namespace=namespace0.0 +- """ +- expected_ks = """ +- """ +- self._read(input_ks) +- self._check_ignored(["pmem1", "pmem2"]) +- self._use([]) +- self._check(expected_ks) +- +- def test_ksnone_use2(self): +- """Test updating of nvdimm commands based on device selection in UI.""" +- input_ks = """ +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm use --namespace=namespace0.0 +- nvdimm use --namespace=namespace1.0 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem0", "pmem1", "pmem2"]) +- self._use(["namespace0.0", "namespace1.0"]) +- self._check(expected_ks) +- +- def test_ksnone_repeated_use(self): +- """Test updating of nvdimm commands based on device selection in UI.""" +- input_ks = """ +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm use --namespace=namespace0.0 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem0", "pmem1", "pmem2"]) +- self._use(["namespace0.0"]) +- self._use(["namespace0.0"]) +- self._check(expected_ks) +- +- def test_ksnone_use_none(self): +- """Test updating of nvdimm commands based on device selection in UI.""" +- input_ks = """ +- """ +- expected_ks = """ +- """ +- self._read(input_ks) +- self._check_ignored(["pmem0", "pmem1", "pmem2"]) +- self._use([]) +- self._check(expected_ks) +- +- def test_ksnone_repeated_use_2(self): +- """Test updating of nvdimm commands based on device selection in UI.""" +- input_ks = """ +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm use --namespace=namespace1.0 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem0", "pmem1", "pmem2"]) +- self._use(["namespace0.0"]) +- # Next use should override the previous +- self._use(["namespace1.0"]) +- self._check(expected_ks) +- +- def test_ksuse_another_use(self): +- """Test updating of nvdimm commands based on device selection in UI.""" +- input_ks = """ +- nvdimm use --namespace=namespace1.0 +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm use --namespace=namespace0.0 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem0", "pmem2"]) +- self._use(["namespace0.0"]) +- self._check(expected_ks) +- +- def test_ksuse_none(self): +- """Test updating of nvdimm commands based on device selection in UI.""" +- input_ks = """ +- nvdimm use --namespace=namespace1.0 +- """ +- expected_ks = """ +- """ +- self._read(input_ks) +- self._check_ignored(["pmem0", "pmem2"]) +- self._use([]) +- self._check(expected_ks) +- +- def test_ksreconfigure_use(self): +- """Test updating of nvdimm commands based on device selection in UI.""" +- input_ks = """ +- nvdimm reconfigure --namespace=namespace0.0 --mode=sector --sectorsize=512 +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm reconfigure --namespace=namespace0.0 --mode=sector --sectorsize=512 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem1", "pmem2"]) +- self._use(["namespace0.0"]) +- self._check(expected_ks) +- +- def test_ksreconfigure_use_none(self): +- """Test updating of nvdimm commands based on device selection in UI.""" +- input_ks = """ +- nvdimm reconfigure --namespace=namespace0.0 --mode=sector --sectorsize=512 +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm reconfigure --namespace=namespace0.0 --mode=sector --sectorsize=512 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem1", "pmem2"]) +- # Even when not used, the reconfiguration should go to generated kicksart +- self._use([]) +- self._check(expected_ks) +- +- def test_ksreconfigure_another_use(self): +- """Test updating of nvdimm commands based on device selection in UI.""" +- input_ks = """ +- nvdimm reconfigure --namespace=namespace0.0 --mode=sector --sectorsize=512 +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm reconfigure --namespace=namespace0.0 --mode=sector --sectorsize=512 +- nvdimm use --namespace=namespace1.0 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem1", "pmem2"]) +- self._use(["namespace1.0"]) +- self._check(expected_ks) +- +- def test_ksreconfigure_ksuse_another_use(self): +- """Test updating of nvdimm commands based on device selection in UI.""" +- input_ks = """ +- nvdimm reconfigure --namespace=namespace0.0 --mode=sector --sectorsize=512 +- nvdimm use --namespace=namespace1.0 +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm reconfigure --namespace=namespace0.0 --mode=sector --sectorsize=512 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem2"]) +- self._use(["namespace0.0"]) +- self._check(expected_ks) +- +- def test_ksreconfigure_2_use_1(self): +- """Test updating of nvdimm commands based on device selection in UI.""" +- input_ks = """ +- nvdimm reconfigure --namespace=namespace0.0 --mode=sector --sectorsize=512 +- nvdimm reconfigure --namespace=namespace1.0 --mode=sector --sectorsize=512 +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm reconfigure --namespace=namespace0.0 --mode=sector --sectorsize=512 +- nvdimm reconfigure --namespace=namespace1.0 --mode=sector --sectorsize=512 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem2"]) +- self._use(["namespace0.0"]) +- self._check(expected_ks) +- +- # Test reconfigure and use in UI +- # (if _reconfigure is done in UI, _use is always done as well) +- +- def test_ksnone_reconfigure_use(self): +- """Test updating of nvdimm commands based on device reconfiguration in UI.""" +- input_ks = """ +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm reconfigure --namespace=namespace0.0 --mode=sector --sectorsize=512 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem0", "pmem1", "pmem2"]) +- self._reconfigure("namespace0.0", 512) +- self._use(["namespace0.0"]) +- self._check(expected_ks) +- +- def test_ksnone_repeated_reconfigure_use(self): +- """Test updating of nvdimm commands based on device reconfiguration in UI.""" +- input_ks = """ +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm reconfigure --namespace=namespace0.0 --mode=sector --sectorsize=4096 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem0", "pmem1", "pmem2"]) +- self._reconfigure("namespace0.0", 512) +- self._reconfigure("namespace0.0", 4096) +- self._use(["namespace0.0"]) +- self._check(expected_ks) +- +- def test_ksnone_repeated_reconfigure_repeated_use(self): +- """Test updating of nvdimm commands based on device reconfiguration in UI.""" +- input_ks = """ +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm reconfigure --namespace=namespace0.0 --mode=sector --sectorsize=512 +- nvdimm reconfigure --namespace=namespace1.0 --mode=sector --sectorsize=512 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem0", "pmem1", "pmem2"]) +- self._reconfigure("namespace0.0", 512) +- self._use(["namespace0.0"]) +- self._reconfigure("namespace1.0", 512) +- # Even when not used, reconfiguration goes to generated ks +- self._use(["namespace1.0"]) +- self._check(expected_ks) +- +- def test_ksuse_reconfigure_other_use_other(self): +- """Test updating of nvdimm commands based on device reconfiguration in UI.""" +- input_ks = """ +- nvdimm use --namespace=namespace0.0 +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm reconfigure --namespace=namespace1.0 --mode=sector --sectorsize=512 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem1", "pmem2"]) +- self._reconfigure("namespace1.0", 512) +- self._use(["namespace1.0"]) +- self._check(expected_ks) +- +- def test_ksuse_2_reconfigure_1_use_2(self): +- """Test updating of nvdimm commands based on device reconfiguration in UI.""" +- input_ks = """ +- nvdimm use --namespace=namespace0.0 +- nvdimm use --namespace=namespace1.0 +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm reconfigure --namespace=namespace1.0 --mode=sector --sectorsize=512 +- nvdimm use --namespace=namespace0.0 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem2"]) +- self._reconfigure("namespace1.0", 512) +- self._use(["namespace0.0", "namespace1.0"]) +- self._check(expected_ks) +- +- def test_ksuse_reconfigure_other_use_none(self): +- """Test updating of nvdimm commands based on device reconfiguration in UI.""" +- input_ks = """ +- nvdimm use --namespace=namespace0.0 +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm reconfigure --namespace=namespace1.0 --mode=sector --sectorsize=512 +- """ +- self._read(input_ks) +- self._check_ignored(["pmem1", "pmem2"]) +- self._reconfigure("namespace1.0", 512) +- +- # Even when not used, the reconfiguration should go to generated kickstart. +- self._use([]) +- self._check(expected_ks) +- +- @patch("pyanaconda.modules.storage.kickstart.device_matches") +- def test_ksuse_blockdevs(self, device_matches): +- """Test using blockdevs.""" +- input_ks = """ +- nvdimm use --blockdev=pmem0,pmem2 +- """ +- expected_ks = """ +- # NVDIMM devices setup +- nvdimm use --namespace=namespace0.0 +- """ +- device_matches.return_value = ["pmem0", "pmem2"] +- self._read(input_ks) +- self._check_ignored(["pmem1", "pmem2"]) +- self._use(["namespace0.0"]) +- self._check(expected_ks) +diff --git a/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_storage.py b/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_storage.py +index 24f7077..2048035 100644 +--- a/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_storage.py ++++ b/tests/unit_tests/pyanaconda_tests/modules/storage/test_module_storage.py +@@ -25,10 +25,8 @@ import pytest + + from unittest.mock import patch, Mock, PropertyMock + +-from blivet.devices import NVDIMMNamespaceDevice +-from blivet.formats import get_format + from blivet.formats.fs import BTRFS +-from blivet.size import Size ++from dasbus.typing import * # pylint: disable=wildcard-import + + from pyanaconda.modules.storage.bootloader import BootLoaderFactory + from pyanaconda.modules.storage.bootloader.extlinux import EXTLINUX +@@ -372,7 +370,6 @@ class StorageInterfaceTestCase(unittest.TestCase): + 'iscsiname', + 'logvol', + 'mount', +- 'nvdimm', + 'part', + 'partition', + 'raid', +@@ -1272,65 +1269,6 @@ class StorageInterfaceTestCase(unittest.TestCase): + """ + self._test_kickstart(ks_in, ks_out) + +- def _add_nvdimm_device(self, name, namespace): +- """Add a fake NVDIMM device.""" +- storage = self.storage_module.storage +- device = NVDIMMNamespaceDevice( +- name, +- fmt=get_format("disklabel"), +- size=Size("10 GiB"), +- mode="sector", +- devname=namespace, +- sector_size=512, +- id_path="pci-0000:00:00.0-bla-1", +- exists=True +- ) +- storage.devicetree._add_device(device) +- +- @patch("pyanaconda.modules.storage.kickstart.nvdimm") +- def test_nvdimm_kickstart(self, nvdimm): +- """Test the nvdimm command.""" +- ks_in = """ +- nvdimm use --namespace=namespace0.0 +- nvdimm reconfigure --namespace=namespace1.0 --mode=sector --sectorsize=512 +- """ +- ks_out = """ +- # NVDIMM devices setup +- nvdimm reconfigure --namespace=namespace1.0 --mode=sector --sectorsize=512 +- nvdimm use --namespace=namespace0.0 +- """ +- +- self._add_nvdimm_device("dev1", "namespace0.0") +- self._add_nvdimm_device("dev2", "namespace1.0") +- +- nvdimm.namespaces = ["namespace0.0", "namespace1.0"] +- self._test_kickstart(ks_in, ks_out) +- +- nvdimm.namespaces = ["namespace0.0"] +- self._test_kickstart(ks_in, ks_out, ks_valid=False) +- +- nvdimm.namespaces = ["namespace1.0"] +- self._test_kickstart(ks_in, ks_out, ks_valid=False) +- +- @patch("pyanaconda.modules.storage.kickstart.device_matches") +- def test_nvdimm_blockdevs_kickstart(self, device_matches): +- """Test the nvdimm command with blockdevs.""" +- ks_in = """ +- nvdimm use --blockdevs=pmem0 +- """ +- ks_out = """ +- # NVDIMM devices setup +- nvdimm use --namespace=namespace0.0 +- """ +- +- self._add_nvdimm_device("dev1", "namespace0.0") +- +- device_matches.return_value = ["pmem0"] +- self._test_kickstart(ks_in, ks_out) +- +- device_matches.return_value = [] +- self._test_kickstart(ks_in, ks_out, ks_valid=False) +- + def test_snapshot_kickstart(self): + """Test the snapshot command.""" + ks_in = """ +-- +2.47.1 + diff --git a/1008-Do-not-use-stringize-and-unicodeize-from-Blivet.patch b/1008-Do-not-use-stringize-and-unicodeize-from-Blivet.patch new file mode 100644 index 0000000000000000000000000000000000000000..4b7f42c47f722d2cbe61e6f2a3967db365b1f627 --- /dev/null +++ b/1008-Do-not-use-stringize-and-unicodeize-from-Blivet.patch @@ -0,0 +1,36 @@ +From 8d1a659420f64e98b43077fd7e43e43c57b063e4 Mon Sep 17 00:00:00 2001 +From: gc-taifu +Date: Thu, 27 Mar 2025 20:04:38 +0800 +Subject: [PATCH] Do not use stringize and unicodeize from Blivet + +--- + pyanaconda/modules/storage/partitioning/specification.py | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/pyanaconda/modules/storage/partitioning/specification.py b/pyanaconda/modules/storage/partitioning/specification.py +index 360b1f2..37f6a16 100644 +--- a/pyanaconda/modules/storage/partitioning/specification.py ++++ b/pyanaconda/modules/storage/partitioning/specification.py +@@ -18,7 +18,6 @@ + # Red Hat Author(s): Chris Lumens + # + +-from blivet.util import stringize, unicodeize + from pykickstart.constants import AUTOPART_TYPE_PLAIN, AUTOPART_TYPE_BTRFS, AUTOPART_TYPE_LVM, \ + AUTOPART_TYPE_LVM_THINP + +@@ -136,10 +135,7 @@ class PartSpec(object): + return scheme == AUTOPART_TYPE_BTRFS and self.btr + + def __str__(self): +- return stringize(self._to_string()) +- +- def __unicode__(self): +- return unicodeize(self._to_string()) ++ return self._to_string() + + def __eq__(self, other): + return isinstance(other, PartSpec) and vars(self) == vars(other) +-- +2.47.1 + diff --git a/anaconda.spec b/anaconda.spec index 768ed3caae03723aad7cef64e48f5f14a44ecdc8..b4526d16d511d0366d12eda31b82aeed0138d10e 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -1,4 +1,4 @@ -%define anolis_release 6 +%define anolis_release 7 Summary: Graphical system installer Name: anaconda @@ -26,6 +26,12 @@ Patch1002: 1002-Set-the-default-timezone-to-Shanghai.patch Patch1003: 1003-delete-the-other-languages.patch Patch1004: 1004-add-os-repo-in-default-repo-list.patch Patch1005: 1005-add-loongarch64-support-for-anaconda-38.23.patch +# We need to change version because libblockdev upgraded to 3.0 from 2.0 +Patch1006: 1006-Reconfig-blivet-ABI-version-to-3.0.patch +# Refer to https://github.com/rhinstaller/anaconda/commit/607aebec25d87aa2e2f290f8cd80aad0e7af8a21 +Patch1007: 1007-Remove-nvdimm-support.patch +# Refer to https://github.com/rhinstaller/anaconda/commit/4d2164c19bb082dcff57df39556169ed484fa668 +Patch1008: 1008-Do-not-use-stringize-and-unicodeize-from-Blivet.patch # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -447,6 +453,11 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_d %{_prefix}/libexec/anaconda/dd_* %changelog +* Fri Dec 13 2024 Chang Gao - 38.23-6 +- Reconfig blockdev version to 3.0 +- Backport patch to remove unsupported device: nvdimm +- Backport patch to remove deprecated funcs provided by libblockdev 2.0 + * Fri Dec 13 2024 Chang Gao - 38.23-6 - add alinux configuration