diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bab1f0c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/blivet-3.1.3.tar.gz diff --git a/.python-blivet3.metadata b/.python-blivet3.metadata new file mode 100644 index 0000000..4ff0740 --- /dev/null +++ b/.python-blivet3.metadata @@ -0,0 +1 @@ +724446d111fe537e5c4e247e373d5b26a46e0a73 SOURCES/blivet-3.1.3.tar.gz diff --git a/SOURCES/0001-Move-blivet-module-package-to-blivet3.patch b/SOURCES/0001-Move-blivet-module-package-to-blivet3.patch new file mode 100644 index 0000000..f6e62fe --- /dev/null +++ b/SOURCES/0001-Move-blivet-module-package-to-blivet3.patch @@ -0,0 +1,942 @@ +From a43bcd7f839b4cfc2a134612ff850012b22534fd Mon Sep 17 00:00:00 2001 +From: David Lehman +Date: Mon, 25 Mar 2019 14:27:45 -0400 +Subject: [PATCH 1/8] Move blivet module/package to blivet3. + +--- + {blivet => blivet3}/__init__.py | 2 +- + {blivet => blivet3}/actionlist.py | 0 + {blivet => blivet3}/arch.py | 0 + {blivet => blivet3}/blivet.py | 0 + {blivet => blivet3}/callbacks.py | 0 + {blivet => blivet3}/dbus/__init__.py | 0 + {blivet => blivet3}/dbus/action.py | 0 + {blivet => blivet3}/dbus/blivet.py | 0 + {blivet => blivet3}/dbus/constants.py | 0 + {blivet => blivet3}/dbus/device.py | 0 + {blivet => blivet3}/dbus/format.py | 0 + {blivet => blivet3}/dbus/manager.py | 0 + {blivet => blivet3}/dbus/object.py | 0 + {blivet => blivet3}/deviceaction.py | 0 + {blivet => blivet3}/devicefactory.py | 2 +- + {blivet => blivet3}/devicelibs/__init__.py | 0 + {blivet => blivet3}/devicelibs/btrfs.py | 0 + {blivet => blivet3}/devicelibs/crypto.py | 0 + {blivet => blivet3}/devicelibs/disk.py | 0 + {blivet => blivet3}/devicelibs/edd.py | 0 + {blivet => blivet3}/devicelibs/lvm.py | 0 + {blivet => blivet3}/devicelibs/mdraid.py | 0 + {blivet => blivet3}/devicelibs/raid.py | 0 + {blivet => blivet3}/devices/__init__.py | 0 + {blivet => blivet3}/devices/btrfs.py | 0 + {blivet => blivet3}/devices/cache.py | 0 + {blivet => blivet3}/devices/container.py | 0 + {blivet => blivet3}/devices/device.py | 0 + {blivet => blivet3}/devices/disk.py | 0 + {blivet => blivet3}/devices/dm.py | 0 + {blivet => blivet3}/devices/file.py | 0 + {blivet => blivet3}/devices/lib.py | 0 + {blivet => blivet3}/devices/loop.py | 0 + {blivet => blivet3}/devices/luks.py | 0 + {blivet => blivet3}/devices/lvm.py | 0 + {blivet => blivet3}/devices/md.py | 0 + {blivet => blivet3}/devices/network.py | 0 + {blivet => blivet3}/devices/nfs.py | 0 + {blivet => blivet3}/devices/nodev.py | 0 + {blivet => blivet3}/devices/optical.py | 0 + {blivet => blivet3}/devices/partition.py | 0 + {blivet => blivet3}/devices/raid.py | 0 + {blivet => blivet3}/devices/storage.py | 0 + {blivet => blivet3}/devicetree.py | 0 + {blivet => blivet3}/errors.py | 0 + {blivet => blivet3}/events/__init__.py | 0 + {blivet => blivet3}/events/changes.py | 0 + {blivet => blivet3}/events/handler.py | 0 + {blivet => blivet3}/events/manager.py | 0 + {blivet => blivet3}/fcoe.py | 0 + {blivet => blivet3}/flags.py | 0 + {blivet => blivet3}/formats/__init__.py | 0 + {blivet => blivet3}/formats/biosboot.py | 0 + {blivet => blivet3}/formats/disklabel.py | 0 + {blivet => blivet3}/formats/dmraid.py | 0 + {blivet => blivet3}/formats/fs.py | 0 + {blivet => blivet3}/formats/fslib.py | 0 + {blivet => blivet3}/formats/luks.py | 0 + {blivet => blivet3}/formats/lvmpv.py | 0 + {blivet => blivet3}/formats/mdraid.py | 0 + {blivet => blivet3}/formats/multipath.py | 0 + {blivet => blivet3}/formats/prepboot.py | 0 + {blivet => blivet3}/formats/swap.py | 0 + {blivet => blivet3}/i18n.py | 0 + {blivet => blivet3}/iscsi.py | 0 + {blivet => blivet3}/mounts.py | 0 + {blivet => blivet3}/partitioning.py | 0 + {blivet => blivet3}/populator/__init__.py | 0 + .../populator/helpers/__init__.py | 0 + {blivet => blivet3}/populator/helpers/boot.py | 0 + .../populator/helpers/btrfs.py | 0 + .../populator/helpers/devicepopulator.py | 0 + {blivet => blivet3}/populator/helpers/disk.py | 0 + .../populator/helpers/disklabel.py | 0 + {blivet => blivet3}/populator/helpers/dm.py | 0 + .../populator/helpers/dmraid.py | 0 + .../populator/helpers/formatpopulator.py | 0 + {blivet => blivet3}/populator/helpers/loop.py | 0 + {blivet => blivet3}/populator/helpers/luks.py | 0 + {blivet => blivet3}/populator/helpers/lvm.py | 0 + .../populator/helpers/mdraid.py | 0 + .../populator/helpers/multipath.py | 0 + .../populator/helpers/optical.py | 0 + .../populator/helpers/partition.py | 0 + .../populator/helpers/populatorhelper.py | 0 + {blivet => blivet3}/populator/populator.py | 0 + {blivet => blivet3}/safe_dbus.py | 0 + {blivet => blivet3}/size.py | 0 + {blivet => blivet3}/static_data/__init__.py | 0 + {blivet => blivet3}/static_data/luks_data.py | 0 + {blivet => blivet3}/static_data/lvm_info.py | 0 + {blivet => blivet3}/static_data/mpath_info.py | 0 + {blivet => blivet3}/static_data/nvdimm.py | 0 + {blivet => blivet3}/storage_log.py | 0 + {blivet => blivet3}/tasks/__init__.py | 0 + {blivet => blivet3}/tasks/availability.py | 0 + {blivet => blivet3}/tasks/dfresize.py | 0 + {blivet => blivet3}/tasks/fsck.py | 0 + {blivet => blivet3}/tasks/fsinfo.py | 0 + {blivet => blivet3}/tasks/fslabeling.py | 0 + {blivet => blivet3}/tasks/fsminsize.py | 0 + {blivet => blivet3}/tasks/fsmkfs.py | 0 + {blivet => blivet3}/tasks/fsmount.py | 0 + {blivet => blivet3}/tasks/fsreadlabel.py | 0 + {blivet => blivet3}/tasks/fsresize.py | 0 + {blivet => blivet3}/tasks/fssize.py | 0 + {blivet => blivet3}/tasks/fssync.py | 0 + {blivet => blivet3}/tasks/fstask.py | 0 + {blivet => blivet3}/tasks/fsuuid.py | 0 + {blivet => blivet3}/tasks/fswritelabel.py | 0 + {blivet => blivet3}/tasks/fswriteuuid.py | 0 + {blivet => blivet3}/tasks/lukstasks.py | 0 + {blivet => blivet3}/tasks/pvtask.py | 0 + {blivet => blivet3}/tasks/task.py | 0 + {blivet => blivet3}/threads.py | 0 + {blivet => blivet3}/tsort.py | 0 + {blivet => blivet3}/udev.py | 0 + {blivet => blivet3}/util.py | 0 + {blivet => blivet3}/zfcp.py | 0 + dbus/blivetd | 4 +- + doc/intro.rst | 10 +- + examples/factory.py | 6 +- + examples/list_devices.py | 4 +- + examples/lvm.py | 6 +- + examples/lvm_cache.py | 8 +- + examples/lvm_non_linear.py | 6 +- + examples/partitioning.py | 6 +- + examples/uevents.py | 8 +- + tests/action_test.py | 38 +- + tests/dbus_test.py | 34 +- + tests/devicefactory_test.py | 30 +- + tests/devicelibs_test/disk_test.py | 14 +- + tests/devicelibs_test/edd_test.py | 4 +- + tests/devicelibs_test/mdraid_test.py | 2 +- + tests/devicelibs_test/raid_test.py | 6 +- + tests/devices_test/dependencies_test.py | 34 +- + tests/devices_test/device_methods_test.py | 44 +-- + tests/devices_test/device_names_test.py | 10 +- + tests/devices_test/device_packages_test.py | 8 +- + tests/devices_test/device_properties_test.py | 44 +-- + tests/devices_test/disk_test.py | 10 +- + tests/devices_test/lvm_test.py | 26 +- + tests/devices_test/md_test.py | 10 +- + tests/devices_test/network_test.py | 6 +- + tests/devices_test/partition_test.py | 24 +- + tests/devices_test/size_test.py | 8 +- + tests/devices_test/tags_test.py | 8 +- + tests/devicetree_test.py | 26 +- + tests/events_test.py | 4 +- + tests/formats_test/device_test.py | 2 +- + tests/formats_test/disklabel_test.py | 14 +- + tests/formats_test/fs_test.py | 4 +- + tests/formats_test/fslabeling.py | 4 +- + tests/formats_test/fstesting.py | 6 +- + tests/formats_test/fsuuid.py | 6 +- + tests/formats_test/init_test.py | 2 +- + tests/formats_test/labeling_test.py | 6 +- + tests/formats_test/luks_test.py | 6 +- + tests/formats_test/methods_test.py | 32 +- + tests/formats_test/misc_test.py | 4 +- + tests/formats_test/selinux_test.py | 6 +- + tests/formats_test/uuid_test.py | 4 +- + tests/imagebackedtestcase.py | 6 +- + tests/integration/incomplete-lvm.sh | 4 + + tests/loopbackedtestcase.py | 2 +- + tests/parentlist_test.py | 4 +- + tests/partitioning_test.py | 50 +-- + tests/populator_test.py | 350 +++++++++--------- + tests/size_test.py | 6 +- + tests/storagetestcase.py | 8 +- + tests/tasks_test/basic_tests.py | 4 +- + tests/tsort_test.py | 2 +- + tests/udev_test.py | 10 +- + tests/unsupported_disklabel_test.py | 32 +- + tests/util_test.py | 6 +- + tests/vmtests/blivet_reset_vmtest.py | 10 +- + tests/vmtests/vmbackedtestcase.py | 2 +- + 177 files changed, 524 insertions(+), 520 deletions(-) + rename {blivet => blivet3}/__init__.py (98%) + rename {blivet => blivet3}/actionlist.py (100%) + rename {blivet => blivet3}/arch.py (100%) + rename {blivet => blivet3}/blivet.py (100%) + rename {blivet => blivet3}/callbacks.py (100%) + rename {blivet => blivet3}/dbus/__init__.py (100%) + rename {blivet => blivet3}/dbus/action.py (100%) + rename {blivet => blivet3}/dbus/blivet.py (100%) + rename {blivet => blivet3}/dbus/constants.py (100%) + rename {blivet => blivet3}/dbus/device.py (100%) + rename {blivet => blivet3}/dbus/format.py (100%) + rename {blivet => blivet3}/dbus/manager.py (100%) + rename {blivet => blivet3}/dbus/object.py (100%) + rename {blivet => blivet3}/deviceaction.py (100%) + rename {blivet => blivet3}/devicefactory.py (99%) + rename {blivet => blivet3}/devicelibs/__init__.py (100%) + rename {blivet => blivet3}/devicelibs/btrfs.py (100%) + rename {blivet => blivet3}/devicelibs/crypto.py (100%) + rename {blivet => blivet3}/devicelibs/disk.py (100%) + rename {blivet => blivet3}/devicelibs/edd.py (100%) + rename {blivet => blivet3}/devicelibs/lvm.py (100%) + rename {blivet => blivet3}/devicelibs/mdraid.py (100%) + rename {blivet => blivet3}/devicelibs/raid.py (100%) + rename {blivet => blivet3}/devices/__init__.py (100%) + rename {blivet => blivet3}/devices/btrfs.py (100%) + rename {blivet => blivet3}/devices/cache.py (100%) + rename {blivet => blivet3}/devices/container.py (100%) + rename {blivet => blivet3}/devices/device.py (100%) + rename {blivet => blivet3}/devices/disk.py (100%) + rename {blivet => blivet3}/devices/dm.py (100%) + rename {blivet => blivet3}/devices/file.py (100%) + rename {blivet => blivet3}/devices/lib.py (100%) + rename {blivet => blivet3}/devices/loop.py (100%) + rename {blivet => blivet3}/devices/luks.py (100%) + rename {blivet => blivet3}/devices/lvm.py (100%) + rename {blivet => blivet3}/devices/md.py (100%) + rename {blivet => blivet3}/devices/network.py (100%) + rename {blivet => blivet3}/devices/nfs.py (100%) + rename {blivet => blivet3}/devices/nodev.py (100%) + rename {blivet => blivet3}/devices/optical.py (100%) + rename {blivet => blivet3}/devices/partition.py (100%) + rename {blivet => blivet3}/devices/raid.py (100%) + rename {blivet => blivet3}/devices/storage.py (100%) + rename {blivet => blivet3}/devicetree.py (100%) + rename {blivet => blivet3}/errors.py (100%) + rename {blivet => blivet3}/events/__init__.py (100%) + rename {blivet => blivet3}/events/changes.py (100%) + rename {blivet => blivet3}/events/handler.py (100%) + rename {blivet => blivet3}/events/manager.py (100%) + rename {blivet => blivet3}/fcoe.py (100%) + rename {blivet => blivet3}/flags.py (100%) + rename {blivet => blivet3}/formats/__init__.py (100%) + rename {blivet => blivet3}/formats/biosboot.py (100%) + rename {blivet => blivet3}/formats/disklabel.py (100%) + rename {blivet => blivet3}/formats/dmraid.py (100%) + rename {blivet => blivet3}/formats/fs.py (100%) + rename {blivet => blivet3}/formats/fslib.py (100%) + rename {blivet => blivet3}/formats/luks.py (100%) + rename {blivet => blivet3}/formats/lvmpv.py (100%) + rename {blivet => blivet3}/formats/mdraid.py (100%) + rename {blivet => blivet3}/formats/multipath.py (100%) + rename {blivet => blivet3}/formats/prepboot.py (100%) + rename {blivet => blivet3}/formats/swap.py (100%) + rename {blivet => blivet3}/i18n.py (100%) + rename {blivet => blivet3}/iscsi.py (100%) + rename {blivet => blivet3}/mounts.py (100%) + rename {blivet => blivet3}/partitioning.py (100%) + rename {blivet => blivet3}/populator/__init__.py (100%) + rename {blivet => blivet3}/populator/helpers/__init__.py (100%) + rename {blivet => blivet3}/populator/helpers/boot.py (100%) + rename {blivet => blivet3}/populator/helpers/btrfs.py (100%) + rename {blivet => blivet3}/populator/helpers/devicepopulator.py (100%) + rename {blivet => blivet3}/populator/helpers/disk.py (100%) + rename {blivet => blivet3}/populator/helpers/disklabel.py (100%) + rename {blivet => blivet3}/populator/helpers/dm.py (100%) + rename {blivet => blivet3}/populator/helpers/dmraid.py (100%) + rename {blivet => blivet3}/populator/helpers/formatpopulator.py (100%) + rename {blivet => blivet3}/populator/helpers/loop.py (100%) + rename {blivet => blivet3}/populator/helpers/luks.py (100%) + rename {blivet => blivet3}/populator/helpers/lvm.py (100%) + rename {blivet => blivet3}/populator/helpers/mdraid.py (100%) + rename {blivet => blivet3}/populator/helpers/multipath.py (100%) + rename {blivet => blivet3}/populator/helpers/optical.py (100%) + rename {blivet => blivet3}/populator/helpers/partition.py (100%) + rename {blivet => blivet3}/populator/helpers/populatorhelper.py (100%) + rename {blivet => blivet3}/populator/populator.py (100%) + rename {blivet => blivet3}/safe_dbus.py (100%) + rename {blivet => blivet3}/size.py (100%) + rename {blivet => blivet3}/static_data/__init__.py (100%) + rename {blivet => blivet3}/static_data/luks_data.py (100%) + rename {blivet => blivet3}/static_data/lvm_info.py (100%) + rename {blivet => blivet3}/static_data/mpath_info.py (100%) + rename {blivet => blivet3}/static_data/nvdimm.py (100%) + rename {blivet => blivet3}/storage_log.py (100%) + rename {blivet => blivet3}/tasks/__init__.py (100%) + rename {blivet => blivet3}/tasks/availability.py (100%) + rename {blivet => blivet3}/tasks/dfresize.py (100%) + rename {blivet => blivet3}/tasks/fsck.py (100%) + rename {blivet => blivet3}/tasks/fsinfo.py (100%) + rename {blivet => blivet3}/tasks/fslabeling.py (100%) + rename {blivet => blivet3}/tasks/fsminsize.py (100%) + rename {blivet => blivet3}/tasks/fsmkfs.py (100%) + rename {blivet => blivet3}/tasks/fsmount.py (100%) + rename {blivet => blivet3}/tasks/fsreadlabel.py (100%) + rename {blivet => blivet3}/tasks/fsresize.py (100%) + rename {blivet => blivet3}/tasks/fssize.py (100%) + rename {blivet => blivet3}/tasks/fssync.py (100%) + rename {blivet => blivet3}/tasks/fstask.py (100%) + rename {blivet => blivet3}/tasks/fsuuid.py (100%) + rename {blivet => blivet3}/tasks/fswritelabel.py (100%) + rename {blivet => blivet3}/tasks/fswriteuuid.py (100%) + rename {blivet => blivet3}/tasks/lukstasks.py (100%) + rename {blivet => blivet3}/tasks/pvtask.py (100%) + rename {blivet => blivet3}/tasks/task.py (100%) + rename {blivet => blivet3}/threads.py (100%) + rename {blivet => blivet3}/tsort.py (100%) + rename {blivet => blivet3}/udev.py (100%) + rename {blivet => blivet3}/util.py (100%) + rename {blivet => blivet3}/zfcp.py (100%) + create mode 100644 tests/integration/incomplete-lvm.sh + +diff --git a/blivet/__init__.py b/blivet3/__init__.py +similarity index 98% +rename from blivet/__init__.py +rename to blivet3/__init__.py +index 74744e38..902d3df9 100644 +--- a/blivet/__init__.py ++++ b/blivet3/__init__.py +@@ -124,7 +124,7 @@ class _LazyImportObject(object): + return dir(val) + + +-# this way things like 'from blivet import Blivet' work without an overhead of ++# this way things like 'from blivet3 import Blivet' work without an overhead of + # importing of everything the Blivet class needs whenever anything from the + # 'blivet' package is imported (e.g. the 'arch' module) + Blivet = _LazyImportObject("Blivet", "blivet") +diff --git a/blivet/actionlist.py b/blivet3/actionlist.py +similarity index 100% +rename from blivet/actionlist.py +rename to blivet3/actionlist.py +diff --git a/blivet/arch.py b/blivet3/arch.py +similarity index 100% +rename from blivet/arch.py +rename to blivet3/arch.py +diff --git a/blivet/blivet.py b/blivet3/blivet.py +similarity index 100% +rename from blivet/blivet.py +rename to blivet3/blivet.py +diff --git a/blivet/callbacks.py b/blivet3/callbacks.py +similarity index 100% +rename from blivet/callbacks.py +rename to blivet3/callbacks.py +diff --git a/blivet/dbus/__init__.py b/blivet3/dbus/__init__.py +similarity index 100% +rename from blivet/dbus/__init__.py +rename to blivet3/dbus/__init__.py +diff --git a/blivet/dbus/action.py b/blivet3/dbus/action.py +similarity index 100% +rename from blivet/dbus/action.py +rename to blivet3/dbus/action.py +diff --git a/blivet/dbus/blivet.py b/blivet3/dbus/blivet.py +similarity index 100% +rename from blivet/dbus/blivet.py +rename to blivet3/dbus/blivet.py +diff --git a/blivet/dbus/constants.py b/blivet3/dbus/constants.py +similarity index 100% +rename from blivet/dbus/constants.py +rename to blivet3/dbus/constants.py +diff --git a/blivet/dbus/device.py b/blivet3/dbus/device.py +similarity index 100% +rename from blivet/dbus/device.py +rename to blivet3/dbus/device.py +diff --git a/blivet/dbus/format.py b/blivet3/dbus/format.py +similarity index 100% +rename from blivet/dbus/format.py +rename to blivet3/dbus/format.py +diff --git a/blivet/dbus/manager.py b/blivet3/dbus/manager.py +similarity index 100% +rename from blivet/dbus/manager.py +rename to blivet3/dbus/manager.py +diff --git a/blivet/dbus/object.py b/blivet3/dbus/object.py +similarity index 100% +rename from blivet/dbus/object.py +rename to blivet3/dbus/object.py +diff --git a/blivet/deviceaction.py b/blivet3/deviceaction.py +similarity index 100% +rename from blivet/deviceaction.py +rename to blivet3/deviceaction.py +diff --git a/blivet/devicefactory.py b/blivet3/devicefactory.py +similarity index 99% +rename from blivet/devicefactory.py +rename to blivet3/devicefactory.py +index 51595416..a15b60c9 100644 +--- a/blivet/devicefactory.py ++++ b/blivet3/devicefactory.py +@@ -182,7 +182,7 @@ class DeviceFactory(object): + group exists on disk its size will not be changed, but if it has not + been written to disk it will be adjusted to hold the new logical volume:: + +- import blivet ++ import blivet3 + + _blivet = blivet.Blivet() + _blivet.reset() +diff --git a/blivet/devicelibs/__init__.py b/blivet3/devicelibs/__init__.py +similarity index 100% +rename from blivet/devicelibs/__init__.py +rename to blivet3/devicelibs/__init__.py +diff --git a/blivet/devicelibs/btrfs.py b/blivet3/devicelibs/btrfs.py +similarity index 100% +rename from blivet/devicelibs/btrfs.py +rename to blivet3/devicelibs/btrfs.py +diff --git a/blivet/devicelibs/crypto.py b/blivet3/devicelibs/crypto.py +similarity index 100% +rename from blivet/devicelibs/crypto.py +rename to blivet3/devicelibs/crypto.py +diff --git a/blivet/devicelibs/disk.py b/blivet3/devicelibs/disk.py +similarity index 100% +rename from blivet/devicelibs/disk.py +rename to blivet3/devicelibs/disk.py +diff --git a/blivet/devicelibs/edd.py b/blivet3/devicelibs/edd.py +similarity index 100% +rename from blivet/devicelibs/edd.py +rename to blivet3/devicelibs/edd.py +diff --git a/blivet/devicelibs/lvm.py b/blivet3/devicelibs/lvm.py +similarity index 100% +rename from blivet/devicelibs/lvm.py +rename to blivet3/devicelibs/lvm.py +diff --git a/blivet/devicelibs/mdraid.py b/blivet3/devicelibs/mdraid.py +similarity index 100% +rename from blivet/devicelibs/mdraid.py +rename to blivet3/devicelibs/mdraid.py +diff --git a/blivet/devicelibs/raid.py b/blivet3/devicelibs/raid.py +similarity index 100% +rename from blivet/devicelibs/raid.py +rename to blivet3/devicelibs/raid.py +diff --git a/blivet/devices/__init__.py b/blivet3/devices/__init__.py +similarity index 100% +rename from blivet/devices/__init__.py +rename to blivet3/devices/__init__.py +diff --git a/blivet/devices/btrfs.py b/blivet3/devices/btrfs.py +similarity index 100% +rename from blivet/devices/btrfs.py +rename to blivet3/devices/btrfs.py +diff --git a/blivet/devices/cache.py b/blivet3/devices/cache.py +similarity index 100% +rename from blivet/devices/cache.py +rename to blivet3/devices/cache.py +diff --git a/blivet/devices/container.py b/blivet3/devices/container.py +similarity index 100% +rename from blivet/devices/container.py +rename to blivet3/devices/container.py +diff --git a/blivet/devices/device.py b/blivet3/devices/device.py +similarity index 100% +rename from blivet/devices/device.py +rename to blivet3/devices/device.py +diff --git a/blivet/devices/disk.py b/blivet3/devices/disk.py +similarity index 100% +rename from blivet/devices/disk.py +rename to blivet3/devices/disk.py +diff --git a/blivet/devices/dm.py b/blivet3/devices/dm.py +similarity index 100% +rename from blivet/devices/dm.py +rename to blivet3/devices/dm.py +diff --git a/blivet/devices/file.py b/blivet3/devices/file.py +similarity index 100% +rename from blivet/devices/file.py +rename to blivet3/devices/file.py +diff --git a/blivet/devices/lib.py b/blivet3/devices/lib.py +similarity index 100% +rename from blivet/devices/lib.py +rename to blivet3/devices/lib.py +diff --git a/blivet/devices/loop.py b/blivet3/devices/loop.py +similarity index 100% +rename from blivet/devices/loop.py +rename to blivet3/devices/loop.py +diff --git a/blivet/devices/luks.py b/blivet3/devices/luks.py +similarity index 100% +rename from blivet/devices/luks.py +rename to blivet3/devices/luks.py +diff --git a/blivet/devices/lvm.py b/blivet3/devices/lvm.py +similarity index 100% +rename from blivet/devices/lvm.py +rename to blivet3/devices/lvm.py +diff --git a/blivet/devices/md.py b/blivet3/devices/md.py +similarity index 100% +rename from blivet/devices/md.py +rename to blivet3/devices/md.py +diff --git a/blivet/devices/network.py b/blivet3/devices/network.py +similarity index 100% +rename from blivet/devices/network.py +rename to blivet3/devices/network.py +diff --git a/blivet/devices/nfs.py b/blivet3/devices/nfs.py +similarity index 100% +rename from blivet/devices/nfs.py +rename to blivet3/devices/nfs.py +diff --git a/blivet/devices/nodev.py b/blivet3/devices/nodev.py +similarity index 100% +rename from blivet/devices/nodev.py +rename to blivet3/devices/nodev.py +diff --git a/blivet/devices/optical.py b/blivet3/devices/optical.py +similarity index 100% +rename from blivet/devices/optical.py +rename to blivet3/devices/optical.py +diff --git a/blivet/devices/partition.py b/blivet3/devices/partition.py +similarity index 100% +rename from blivet/devices/partition.py +rename to blivet3/devices/partition.py +diff --git a/blivet/devices/raid.py b/blivet3/devices/raid.py +similarity index 100% +rename from blivet/devices/raid.py +rename to blivet3/devices/raid.py +diff --git a/blivet/devices/storage.py b/blivet3/devices/storage.py +similarity index 100% +rename from blivet/devices/storage.py +rename to blivet3/devices/storage.py +diff --git a/blivet/devicetree.py b/blivet3/devicetree.py +similarity index 100% +rename from blivet/devicetree.py +rename to blivet3/devicetree.py +diff --git a/blivet/errors.py b/blivet3/errors.py +similarity index 100% +rename from blivet/errors.py +rename to blivet3/errors.py +diff --git a/blivet/events/__init__.py b/blivet3/events/__init__.py +similarity index 100% +rename from blivet/events/__init__.py +rename to blivet3/events/__init__.py +diff --git a/blivet/events/changes.py b/blivet3/events/changes.py +similarity index 100% +rename from blivet/events/changes.py +rename to blivet3/events/changes.py +diff --git a/blivet/events/handler.py b/blivet3/events/handler.py +similarity index 100% +rename from blivet/events/handler.py +rename to blivet3/events/handler.py +diff --git a/blivet/events/manager.py b/blivet3/events/manager.py +similarity index 100% +rename from blivet/events/manager.py +rename to blivet3/events/manager.py +diff --git a/blivet/fcoe.py b/blivet3/fcoe.py +similarity index 100% +rename from blivet/fcoe.py +rename to blivet3/fcoe.py +diff --git a/blivet/flags.py b/blivet3/flags.py +similarity index 100% +rename from blivet/flags.py +rename to blivet3/flags.py +diff --git a/blivet/formats/__init__.py b/blivet3/formats/__init__.py +similarity index 100% +rename from blivet/formats/__init__.py +rename to blivet3/formats/__init__.py +diff --git a/blivet/formats/biosboot.py b/blivet3/formats/biosboot.py +similarity index 100% +rename from blivet/formats/biosboot.py +rename to blivet3/formats/biosboot.py +diff --git a/blivet/formats/disklabel.py b/blivet3/formats/disklabel.py +similarity index 100% +rename from blivet/formats/disklabel.py +rename to blivet3/formats/disklabel.py +diff --git a/blivet/formats/dmraid.py b/blivet3/formats/dmraid.py +similarity index 100% +rename from blivet/formats/dmraid.py +rename to blivet3/formats/dmraid.py +diff --git a/blivet/formats/fs.py b/blivet3/formats/fs.py +similarity index 100% +rename from blivet/formats/fs.py +rename to blivet3/formats/fs.py +diff --git a/blivet/formats/fslib.py b/blivet3/formats/fslib.py +similarity index 100% +rename from blivet/formats/fslib.py +rename to blivet3/formats/fslib.py +diff --git a/blivet/formats/luks.py b/blivet3/formats/luks.py +similarity index 100% +rename from blivet/formats/luks.py +rename to blivet3/formats/luks.py +diff --git a/blivet/formats/lvmpv.py b/blivet3/formats/lvmpv.py +similarity index 100% +rename from blivet/formats/lvmpv.py +rename to blivet3/formats/lvmpv.py +diff --git a/blivet/formats/mdraid.py b/blivet3/formats/mdraid.py +similarity index 100% +rename from blivet/formats/mdraid.py +rename to blivet3/formats/mdraid.py +diff --git a/blivet/formats/multipath.py b/blivet3/formats/multipath.py +similarity index 100% +rename from blivet/formats/multipath.py +rename to blivet3/formats/multipath.py +diff --git a/blivet/formats/prepboot.py b/blivet3/formats/prepboot.py +similarity index 100% +rename from blivet/formats/prepboot.py +rename to blivet3/formats/prepboot.py +diff --git a/blivet/formats/swap.py b/blivet3/formats/swap.py +similarity index 100% +rename from blivet/formats/swap.py +rename to blivet3/formats/swap.py +diff --git a/blivet/i18n.py b/blivet3/i18n.py +similarity index 100% +rename from blivet/i18n.py +rename to blivet3/i18n.py +diff --git a/blivet/iscsi.py b/blivet3/iscsi.py +similarity index 100% +rename from blivet/iscsi.py +rename to blivet3/iscsi.py +diff --git a/blivet/mounts.py b/blivet3/mounts.py +similarity index 100% +rename from blivet/mounts.py +rename to blivet3/mounts.py +diff --git a/blivet/partitioning.py b/blivet3/partitioning.py +similarity index 100% +rename from blivet/partitioning.py +rename to blivet3/partitioning.py +diff --git a/blivet/populator/__init__.py b/blivet3/populator/__init__.py +similarity index 100% +rename from blivet/populator/__init__.py +rename to blivet3/populator/__init__.py +diff --git a/blivet/populator/helpers/__init__.py b/blivet3/populator/helpers/__init__.py +similarity index 100% +rename from blivet/populator/helpers/__init__.py +rename to blivet3/populator/helpers/__init__.py +diff --git a/blivet/populator/helpers/boot.py b/blivet3/populator/helpers/boot.py +similarity index 100% +rename from blivet/populator/helpers/boot.py +rename to blivet3/populator/helpers/boot.py +diff --git a/blivet/populator/helpers/btrfs.py b/blivet3/populator/helpers/btrfs.py +similarity index 100% +rename from blivet/populator/helpers/btrfs.py +rename to blivet3/populator/helpers/btrfs.py +diff --git a/blivet/populator/helpers/devicepopulator.py b/blivet3/populator/helpers/devicepopulator.py +similarity index 100% +rename from blivet/populator/helpers/devicepopulator.py +rename to blivet3/populator/helpers/devicepopulator.py +diff --git a/blivet/populator/helpers/disk.py b/blivet3/populator/helpers/disk.py +similarity index 100% +rename from blivet/populator/helpers/disk.py +rename to blivet3/populator/helpers/disk.py +diff --git a/blivet/populator/helpers/disklabel.py b/blivet3/populator/helpers/disklabel.py +similarity index 100% +rename from blivet/populator/helpers/disklabel.py +rename to blivet3/populator/helpers/disklabel.py +diff --git a/blivet/populator/helpers/dm.py b/blivet3/populator/helpers/dm.py +similarity index 100% +rename from blivet/populator/helpers/dm.py +rename to blivet3/populator/helpers/dm.py +diff --git a/blivet/populator/helpers/dmraid.py b/blivet3/populator/helpers/dmraid.py +similarity index 100% +rename from blivet/populator/helpers/dmraid.py +rename to blivet3/populator/helpers/dmraid.py +diff --git a/blivet/populator/helpers/formatpopulator.py b/blivet3/populator/helpers/formatpopulator.py +similarity index 100% +rename from blivet/populator/helpers/formatpopulator.py +rename to blivet3/populator/helpers/formatpopulator.py +diff --git a/blivet/populator/helpers/loop.py b/blivet3/populator/helpers/loop.py +similarity index 100% +rename from blivet/populator/helpers/loop.py +rename to blivet3/populator/helpers/loop.py +diff --git a/blivet/populator/helpers/luks.py b/blivet3/populator/helpers/luks.py +similarity index 100% +rename from blivet/populator/helpers/luks.py +rename to blivet3/populator/helpers/luks.py +diff --git a/blivet/populator/helpers/lvm.py b/blivet3/populator/helpers/lvm.py +similarity index 100% +rename from blivet/populator/helpers/lvm.py +rename to blivet3/populator/helpers/lvm.py +diff --git a/blivet/populator/helpers/mdraid.py b/blivet3/populator/helpers/mdraid.py +similarity index 100% +rename from blivet/populator/helpers/mdraid.py +rename to blivet3/populator/helpers/mdraid.py +diff --git a/blivet/populator/helpers/multipath.py b/blivet3/populator/helpers/multipath.py +similarity index 100% +rename from blivet/populator/helpers/multipath.py +rename to blivet3/populator/helpers/multipath.py +diff --git a/blivet/populator/helpers/optical.py b/blivet3/populator/helpers/optical.py +similarity index 100% +rename from blivet/populator/helpers/optical.py +rename to blivet3/populator/helpers/optical.py +diff --git a/blivet/populator/helpers/partition.py b/blivet3/populator/helpers/partition.py +similarity index 100% +rename from blivet/populator/helpers/partition.py +rename to blivet3/populator/helpers/partition.py +diff --git a/blivet/populator/helpers/populatorhelper.py b/blivet3/populator/helpers/populatorhelper.py +similarity index 100% +rename from blivet/populator/helpers/populatorhelper.py +rename to blivet3/populator/helpers/populatorhelper.py +diff --git a/blivet/populator/populator.py b/blivet3/populator/populator.py +similarity index 100% +rename from blivet/populator/populator.py +rename to blivet3/populator/populator.py +diff --git a/blivet/safe_dbus.py b/blivet3/safe_dbus.py +similarity index 100% +rename from blivet/safe_dbus.py +rename to blivet3/safe_dbus.py +diff --git a/blivet/size.py b/blivet3/size.py +similarity index 100% +rename from blivet/size.py +rename to blivet3/size.py +diff --git a/blivet/static_data/__init__.py b/blivet3/static_data/__init__.py +similarity index 100% +rename from blivet/static_data/__init__.py +rename to blivet3/static_data/__init__.py +diff --git a/blivet/static_data/luks_data.py b/blivet3/static_data/luks_data.py +similarity index 100% +rename from blivet/static_data/luks_data.py +rename to blivet3/static_data/luks_data.py +diff --git a/blivet/static_data/lvm_info.py b/blivet3/static_data/lvm_info.py +similarity index 100% +rename from blivet/static_data/lvm_info.py +rename to blivet3/static_data/lvm_info.py +diff --git a/blivet/static_data/mpath_info.py b/blivet3/static_data/mpath_info.py +similarity index 100% +rename from blivet/static_data/mpath_info.py +rename to blivet3/static_data/mpath_info.py +diff --git a/blivet/static_data/nvdimm.py b/blivet3/static_data/nvdimm.py +similarity index 100% +rename from blivet/static_data/nvdimm.py +rename to blivet3/static_data/nvdimm.py +diff --git a/blivet/storage_log.py b/blivet3/storage_log.py +similarity index 100% +rename from blivet/storage_log.py +rename to blivet3/storage_log.py +diff --git a/blivet/tasks/__init__.py b/blivet3/tasks/__init__.py +similarity index 100% +rename from blivet/tasks/__init__.py +rename to blivet3/tasks/__init__.py +diff --git a/blivet/tasks/availability.py b/blivet3/tasks/availability.py +similarity index 100% +rename from blivet/tasks/availability.py +rename to blivet3/tasks/availability.py +diff --git a/blivet/tasks/dfresize.py b/blivet3/tasks/dfresize.py +similarity index 100% +rename from blivet/tasks/dfresize.py +rename to blivet3/tasks/dfresize.py +diff --git a/blivet/tasks/fsck.py b/blivet3/tasks/fsck.py +similarity index 100% +rename from blivet/tasks/fsck.py +rename to blivet3/tasks/fsck.py +diff --git a/blivet/tasks/fsinfo.py b/blivet3/tasks/fsinfo.py +similarity index 100% +rename from blivet/tasks/fsinfo.py +rename to blivet3/tasks/fsinfo.py +diff --git a/blivet/tasks/fslabeling.py b/blivet3/tasks/fslabeling.py +similarity index 100% +rename from blivet/tasks/fslabeling.py +rename to blivet3/tasks/fslabeling.py +diff --git a/blivet/tasks/fsminsize.py b/blivet3/tasks/fsminsize.py +similarity index 100% +rename from blivet/tasks/fsminsize.py +rename to blivet3/tasks/fsminsize.py +diff --git a/blivet/tasks/fsmkfs.py b/blivet3/tasks/fsmkfs.py +similarity index 100% +rename from blivet/tasks/fsmkfs.py +rename to blivet3/tasks/fsmkfs.py +diff --git a/blivet/tasks/fsmount.py b/blivet3/tasks/fsmount.py +similarity index 100% +rename from blivet/tasks/fsmount.py +rename to blivet3/tasks/fsmount.py +diff --git a/blivet/tasks/fsreadlabel.py b/blivet3/tasks/fsreadlabel.py +similarity index 100% +rename from blivet/tasks/fsreadlabel.py +rename to blivet3/tasks/fsreadlabel.py +diff --git a/blivet/tasks/fsresize.py b/blivet3/tasks/fsresize.py +similarity index 100% +rename from blivet/tasks/fsresize.py +rename to blivet3/tasks/fsresize.py +diff --git a/blivet/tasks/fssize.py b/blivet3/tasks/fssize.py +similarity index 100% +rename from blivet/tasks/fssize.py +rename to blivet3/tasks/fssize.py +diff --git a/blivet/tasks/fssync.py b/blivet3/tasks/fssync.py +similarity index 100% +rename from blivet/tasks/fssync.py +rename to blivet3/tasks/fssync.py +diff --git a/blivet/tasks/fstask.py b/blivet3/tasks/fstask.py +similarity index 100% +rename from blivet/tasks/fstask.py +rename to blivet3/tasks/fstask.py +diff --git a/blivet/tasks/fsuuid.py b/blivet3/tasks/fsuuid.py +similarity index 100% +rename from blivet/tasks/fsuuid.py +rename to blivet3/tasks/fsuuid.py +diff --git a/blivet/tasks/fswritelabel.py b/blivet3/tasks/fswritelabel.py +similarity index 100% +rename from blivet/tasks/fswritelabel.py +rename to blivet3/tasks/fswritelabel.py +diff --git a/blivet/tasks/fswriteuuid.py b/blivet3/tasks/fswriteuuid.py +similarity index 100% +rename from blivet/tasks/fswriteuuid.py +rename to blivet3/tasks/fswriteuuid.py +diff --git a/blivet/tasks/lukstasks.py b/blivet3/tasks/lukstasks.py +similarity index 100% +rename from blivet/tasks/lukstasks.py +rename to blivet3/tasks/lukstasks.py +diff --git a/blivet/tasks/pvtask.py b/blivet3/tasks/pvtask.py +similarity index 100% +rename from blivet/tasks/pvtask.py +rename to blivet3/tasks/pvtask.py +diff --git a/blivet/tasks/task.py b/blivet3/tasks/task.py +similarity index 100% +rename from blivet/tasks/task.py +rename to blivet3/tasks/task.py +diff --git a/blivet/threads.py b/blivet3/threads.py +similarity index 100% +rename from blivet/threads.py +rename to blivet3/threads.py +diff --git a/blivet/tsort.py b/blivet3/tsort.py +similarity index 100% +rename from blivet/tsort.py +rename to blivet3/tsort.py +diff --git a/blivet/udev.py b/blivet3/udev.py +similarity index 100% +rename from blivet/udev.py +rename to blivet3/udev.py +diff --git a/blivet/util.py b/blivet3/util.py +similarity index 100% +rename from blivet/util.py +rename to blivet3/util.py +diff --git a/blivet/zfcp.py b/blivet3/zfcp.py +similarity index 100% +rename from blivet/zfcp.py +rename to blivet3/zfcp.py +diff --git a/dbus/blivetd b/dbus/blivetd +index 6505a805..d9abbcd5 100755 +--- a/dbus/blivetd ++++ b/dbus/blivetd +@@ -3,8 +3,8 @@ import dbus + import dbus.mainloop.glib + from gi.repository import GLib + +-from blivet.dbus.blivet import DBusBlivet +-from blivet.dbus.manager import ObjectManager ++from blivet3.dbus.blivet import DBusBlivet ++from blivet3.dbus.manager import ObjectManager + + dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) + system_bus = dbus.SystemBus() +diff --git a/examples/factory.py b/examples/factory.py +index 7c477468..e54c1bea 100644 +--- a/examples/factory.py ++++ b/examples/factory.py +@@ -1,8 +1,8 @@ + import os + +-import blivet +-from blivet.size import Size +-from blivet.util import set_up_logging, create_sparse_tempfile ++import blivet3 ++from blivet3.size import Size ++from blivet3.util import set_up_logging, create_sparse_tempfile + + set_up_logging() + b = blivet.Blivet() # create an instance of Blivet (don't add system devices) +diff --git a/examples/list_devices.py b/examples/list_devices.py +index 384fd5ee..2415ae85 100644 +--- a/examples/list_devices.py ++++ b/examples/list_devices.py +@@ -1,5 +1,5 @@ +-import blivet +-from blivet.util import set_up_logging ++import blivet3 ++from blivet3.util import set_up_logging + + set_up_logging() + b = blivet.Blivet() # create an instance of Blivet +diff --git a/examples/lvm.py b/examples/lvm.py +index ac1f561c..6f736a44 100644 +--- a/examples/lvm.py ++++ b/examples/lvm.py +@@ -1,8 +1,8 @@ + import os + +-import blivet +-from blivet.size import Size +-from blivet.util import set_up_logging, create_sparse_tempfile ++import blivet3 ++from blivet3.size import Size ++from blivet3.util import set_up_logging, create_sparse_tempfile + + set_up_logging() + b = blivet.Blivet() # create an instance of Blivet (don't add system devices) +diff --git a/examples/lvm_cache.py b/examples/lvm_cache.py +index e8dd0623..5f1d71ea 100644 +--- a/examples/lvm_cache.py ++++ b/examples/lvm_cache.py +@@ -1,9 +1,9 @@ + import os + +-import blivet +-from blivet.size import Size +-from blivet.util import set_up_logging, create_sparse_tempfile +-from blivet.devices.lvm import LVMCacheRequest ++import blivet3 ++from blivet3.size import Size ++from blivet3.util import set_up_logging, create_sparse_tempfile ++from blivet3.devices.lvm import LVMCacheRequest + + set_up_logging() + b = blivet.Blivet() # create an instance of Blivet (don't add system devices) +diff --git a/examples/lvm_non_linear.py b/examples/lvm_non_linear.py +index 08a484ce..72aa8a09 100644 +--- a/examples/lvm_non_linear.py ++++ b/examples/lvm_non_linear.py +@@ -1,8 +1,8 @@ + import os + +-import blivet +-from blivet.size import Size +-from blivet.util import set_up_logging, create_sparse_tempfile ++import blivet3 ++from blivet3.size import Size ++from blivet3.util import set_up_logging, create_sparse_tempfile + + set_up_logging() + b = blivet.Blivet() # create an instance of Blivet (don't add system devices) +diff --git a/examples/partitioning.py b/examples/partitioning.py +index ee53fa83..4174b2ea 100644 +--- a/examples/partitioning.py ++++ b/examples/partitioning.py +@@ -1,8 +1,8 @@ + import os + +-import blivet +-from blivet.size import Size +-from blivet.util import set_up_logging, create_sparse_tempfile ++import blivet3 ++from blivet3.size import Size ++from blivet3.util import set_up_logging, create_sparse_tempfile + + set_up_logging() + b = blivet.Blivet() # create an instance of Blivet (don't add system devices) +diff --git a/examples/uevents.py b/examples/uevents.py +index f9f4f668..31edea8e 100644 +--- a/examples/uevents.py ++++ b/examples/uevents.py +@@ -1,8 +1,8 @@ + import time + +-import blivet +-from blivet.events.manager import event_manager +-from blivet.util import set_up_logging ++import blivet3 ++from blivet3.events.manager import event_manager ++from blivet3.util import set_up_logging + + + def print_changes(event, changes): +@@ -13,7 +13,7 @@ def print_changes(event, changes): + print() + + +-set_up_logging(console_logs=["blivet.event"]) ++set_up_logging(console_logs=["blivet3.event"]) + b = blivet.Blivet() # create an instance of Blivet + b.reset() # detect system storage configuration + print(b.devicetree) +-- +2.17.2 + diff --git a/SOURCES/0002-Adjust-rpm-spec-file-to-new-blivet3-name.patch b/SOURCES/0002-Adjust-rpm-spec-file-to-new-blivet3-name.patch new file mode 100644 index 0000000..be25241 --- /dev/null +++ b/SOURCES/0002-Adjust-rpm-spec-file-to-new-blivet3-name.patch @@ -0,0 +1,95 @@ +From d05b447617084bbd9672aa60d5cba290508956b8 Mon Sep 17 00:00:00 2001 +From: David Lehman +Date: Mon, 25 Mar 2019 14:30:36 -0400 +Subject: [PATCH 2/8] Adjust rpm spec file to new blivet3 name. + +--- + python-blivet.spec | 18 +++++++----------- + 1 file changed, 7 insertions(+), 11 deletions(-) + +diff --git a/python-blivet.spec b/python-blivet.spec +index 0f20e499..883ba9b8 100644 +--- a/python-blivet.spec ++++ b/python-blivet.spec +@@ -17,7 +17,7 @@ + %endif + + Summary: A python module for system storage configuration +-Name: python-blivet ++Name: python-blivet3 + Url: https://storageapis.wordpress.com/projects/blivet + Version: 3.1.3 + +@@ -27,9 +27,9 @@ Release: 1%{?prerelease}%{?dist} + Epoch: 1 + License: LGPLv2+ + Group: System Environment/Libraries +-%global realname blivet ++%global realname blivet3 + %global realversion %{version}%{?prerelease} +-Source0: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}.tar.gz ++Source0: http://github.com/storaged-project/blivet/archive/blivet-%{realversion}.tar.gz + + # Versions of required components (done so we make sure the buildrequires + # match the requires versions of things). +@@ -51,9 +51,6 @@ Summary: Data for the %{realname} python module. + + BuildRequires: systemd + +-Conflicts: python-blivet < 1:2.0.0 +-Conflicts: python3-blivet < 1:2.0.0 +- + %description -n %{realname}-data + The %{realname}-data package provides data files required by the %{realname} + python module. +@@ -75,19 +72,19 @@ Requires: parted >= %{partedver} + Requires: python3-pyparted >= %{pypartedver} + Requires: libselinux-python3 + Requires: python3-blockdev >= %{libblockdevver} ++%if 0%{?rhel} > 7 || 0%{?fedora} + Recommends: libblockdev-btrfs >= %{libblockdevver} + Recommends: libblockdev-crypto >= %{libblockdevver} + Recommends: libblockdev-dm >= %{libblockdevver} +-Recommends: libblockdev-fs >= %{libblockdevver} + Recommends: libblockdev-kbd >= %{libblockdevver} + Recommends: libblockdev-loop >= %{libblockdevver} + Recommends: libblockdev-lvm >= %{libblockdevver} + Recommends: libblockdev-mdraid >= %{libblockdevver} + Recommends: libblockdev-mpath >= %{libblockdevver} + Recommends: libblockdev-nvdimm >= %{libblockdevver} +-Recommends: libblockdev-part >= %{libblockdevver} + Recommends: libblockdev-swap >= %{libblockdevver} + Recommends: libblockdev-s390 >= %{libblockdevver} ++%endif + Requires: python3-bytesize >= %{libbytesizever} + Requires: util-linux >= %{utillinuxver} + Requires: lsof +@@ -126,6 +123,7 @@ Requires: parted >= %{partedver} + Requires: python2-pyparted >= %{pypartedver} + Requires: python2-libselinux + Requires: python2-blockdev >= %{libblockdevver} ++%if 0%{?rhel} > 7 || 0%{?fedora} + Recommends: libblockdev-btrfs >= %{libblockdevver} + Recommends: libblockdev-crypto >= %{libblockdevver} + Recommends: libblockdev-dm >= %{libblockdevver} +@@ -139,6 +137,7 @@ Recommends: libblockdev-nvdimm >= %{libblockdevver} + Recommends: libblockdev-part >= %{libblockdevver} + Recommends: libblockdev-swap >= %{libblockdevver} + Recommends: libblockdev-s390 >= %{libblockdevver} ++%endif + Requires: python2-bytesize >= %{libbytesizever} + Requires: util-linux >= %{utillinuxver} + Requires: lsof +@@ -148,9 +147,6 @@ Requires: %{realname}-data = %{epoch}:%{version}-%{release} + Requires: systemd-udev + Requires: python2-gobject-base + +-Obsoletes: blivet-data < 1:2.0.0 +-Obsoletes: python-blivet < 1:2.0.0 +- + %description -n python2-%{realname} + The python2-%{realname} is a python2 package for examining and modifying storage + configuration. +-- +2.17.2 + diff --git a/SOURCES/0003-Rename-rpm-spec-file-according-to-new-name.patch b/SOURCES/0003-Rename-rpm-spec-file-according-to-new-name.patch new file mode 100644 index 0000000..79cf5eb --- /dev/null +++ b/SOURCES/0003-Rename-rpm-spec-file-according-to-new-name.patch @@ -0,0 +1,17 @@ +From a31c7b8cddbe13ade0e7cb7dba6f21248e5a5e2d Mon Sep 17 00:00:00 2001 +From: David Lehman +Date: Mon, 25 Mar 2019 14:31:12 -0400 +Subject: [PATCH 3/8] Rename rpm spec file according to new name. + +--- + python-blivet.spec => python-blivet3.spec | 0 + 1 file changed, 0 insertions(+), 0 deletions(-) + rename python-blivet.spec => python-blivet3.spec (100%) + +diff --git a/python-blivet.spec b/python-blivet3.spec +similarity index 100% +rename from python-blivet.spec +rename to python-blivet3.spec +-- +2.17.2 + diff --git a/SOURCES/0004-Adjust-Makefile-et-al-to-renamed-package.patch b/SOURCES/0004-Adjust-Makefile-et-al-to-renamed-package.patch new file mode 100644 index 0000000..88a4c39 --- /dev/null +++ b/SOURCES/0004-Adjust-Makefile-et-al-to-renamed-package.patch @@ -0,0 +1,102 @@ +From cb6de5392b6b9123c39b08cc067dd824eb77bd31 Mon Sep 17 00:00:00 2001 +From: David Lehman +Date: Mon, 25 Mar 2019 14:33:56 -0400 +Subject: [PATCH 4/8] Adjust Makefile et al to renamed package. + +--- + MANIFEST.in | 2 +- + Makefile | 12 ++++++------ + po/Makefile | 2 +- + scripts/makeupdates | 4 ++-- + setup.py | 8 ++++---- + 5 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/Makefile b/Makefile +index 76817278..328e17c8 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,8 @@ + PYTHON?=python3 + PKG_INSTALL?=dnf + +-PKGNAME=blivet +-SPECFILE=python-blivet.spec ++PKGNAME=blivet3 ++SPECFILE=python-blivet3.spec + VERSION=$(shell $(PYTHON) setup.py --version) + RPMVERSION=$(shell rpmspec -q --queryformat "%{version}\n" $(SPECFILE) | head -1) + RPMRELEASE=$(shell rpmspec --undefine '%dist' -q --queryformat "%{release}\n" $(SPECFILE) | head -1) +@@ -51,8 +51,8 @@ test: + coverage: + @echo "*** Running unittests with $(COVERAGE) for $(PYTHON) ***" + PYTHONPATH=.:tests/ $(COVERAGE) run --branch -m unittest discover -v -s tests/ -p '*_test.py' +- $(COVERAGE) report --include="blivet/*" --show-missing +- $(COVERAGE) report --include="blivet/*" > coverage-report.log ++ $(COVERAGE) report --include="blivet3/*" --show-missing ++ $(COVERAGE) report --include="blivet3/*" > coverage-report.log + + pylint: + @echo "*** Running pylint ***" +@@ -69,7 +69,7 @@ pep8: + else \ + echo "You need to install pycodestyle/pep8 to run this check."; exit 1; \ + fi ; \ +- $$pep8 --ignore=E501,E402,E731,W504 blivet/ tests/ examples/ ++ $$pep8 --ignore=E501,E402,E731,W504 blivet3/ tests/ examples/ + + canary: po-fallback + @echo "*** Running translation-canary tests ***" +@@ -83,7 +83,7 @@ check: + exit $$status + + clean: +- -rm *.tar.gz blivet/*.pyc blivet/*/*.pyc ChangeLog ++ -rm *.tar.gz blivet3/*.pyc blivet3/*/*.pyc ChangeLog + $(MAKE) -C po clean + $(PYTHON) setup.py -q clean --all + +diff --git a/po/Makefile b/po/Makefile +index bbc6b5e8..2d521b0d 100644 +--- a/po/Makefile ++++ b/po/Makefile +@@ -24,7 +24,7 @@ MSGFMT = msgfmt --statistics --verbose + # What do we need to do + POFILES = $(wildcard *.po) + MOFILES = $(patsubst %.po,%.mo,$(POFILES)) +-PYSRC = $(wildcard ../blivet/*.py ../blivet/*/*.py) ++PYSRC = $(wildcard ../blivet3/*.py ../blivet3/*/*.py) + SRCFILES = $(PYSRC) + + all:: refresh-po $(MOFILES) +diff --git a/setup.py b/setup.py +index 418055bd..5b8f4cf6 100644 +--- a/setup.py ++++ b/setup.py +@@ -42,7 +42,7 @@ def findall(dirname=os.curdir): + filelist.findall = findall + + # Extend the sdist command +-class blivet_sdist(sdist): ++class blivet3_sdist(sdist): + def run(self): + # Build the .mo files + subprocess.check_call(['make', '-C', 'po']) +@@ -68,12 +68,12 @@ data_files = [ + ] + + +-setup(name='blivet', ++setup(name='blivet3', + version='3.1.3', +- cmdclass={"sdist": blivet_sdist}, ++ cmdclass={"sdist": blivet3_sdist}, + description='Python module for system storage configuration', + author='David Lehman', author_email='dlehman@redhat.com', + url='http://github.com/storaged-project/blivet', + data_files=data_files, +- packages=['blivet', 'blivet.dbus', 'blivet.devices', 'blivet.devicelibs', 'blivet.events', 'blivet.formats', 'blivet.populator', 'blivet.static_data', 'blivet.tasks', 'blivet.populator.helpers'] ++ packages=['blivet3', 'blivet3.dbus', 'blivet3.devices', 'blivet3.devicelibs', 'blivet3.events', 'blivet3.formats', 'blivet3.populator', 'blivet3.static_data', 'blivet3.tasks', 'blivet3.populator.helpers'] + ) +-- +2.17.2 + diff --git a/SOURCES/0005-Adjust-translation-domain-to-match-new-package-name.patch b/SOURCES/0005-Adjust-translation-domain-to-match-new-package-name.patch new file mode 100644 index 0000000..d930ef0 --- /dev/null +++ b/SOURCES/0005-Adjust-translation-domain-to-match-new-package-name.patch @@ -0,0 +1,496 @@ +From 96ee8710a962d9e427f3bf2ab6b53d0aff8d5c43 Mon Sep 17 00:00:00 2001 +From: David Lehman +Date: Mon, 25 Mar 2019 14:38:24 -0400 +Subject: [PATCH 5/8] Adjust translation domain to match new package name. + +--- + blivet3/i18n.py | 2 +- + po/Makefile | 2 +- + po/{blivet.pot => blivet3.pot} | 208 +++++++++++++++++++-------------- + 3 files changed, 122 insertions(+), 90 deletions(-) + rename po/{blivet.pot => blivet3.pot} (70%) + +diff --git a/blivet3/i18n.py b/blivet3/i18n.py +index 0a1c94ec..d9a2e624 100644 +--- a/blivet3/i18n.py ++++ b/blivet3/i18n.py +@@ -37,7 +37,7 @@ def _get_translations(): + # on the other hand no one uses $LANGUAGE. + lc_messages = locale.setlocale(locale.LC_MESSAGES, None) + if lc_messages not in _cached_translations: +- _cached_translations[lc_messages] = gettext.translation("blivet", fallback=True) ++ _cached_translations[lc_messages] = gettext.translation("blivet3", fallback=True) + return _cached_translations[lc_messages] + + +diff --git a/po/Makefile b/po/Makefile +index 2d521b0d..f533d30a 100644 +--- a/po/Makefile ++++ b/po/Makefile +@@ -6,7 +6,7 @@ + TOP = .. + + # What is this package? +-NLSPACKAGE = blivet ++NLSPACKAGE = blivet3 + POTFILE = $(NLSPACKAGE).pot + INSTALL = /usr/bin/install -c + INSTALL_DATA = $(INSTALL) -m 644 +diff --git a/po/blivet.pot b/po/blivet3.pot +similarity index 70% +rename from po/blivet.pot +rename to po/blivet3.pot +index 5283c7d4..343a4fa9 100644 +--- a/po/blivet.pot ++++ b/po/blivet3.pot +@@ -18,64 +18,89 @@ msgstr "" + "Content-Transfer-Encoding: 8bit\n" + "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +-#: ../blivet/partitioning.py:450 ++#: ../blivet3/fcoe.py:121 ++msgid "FCoE not available" ++msgstr "" ++ ++#: ../blivet3/errors.py:210 ++msgid "" ++"For some reason we were unable to locate a disklabel on a disk that the " ++"kernel is reporting partitions on. It is unclear what the exact problem is. " ++"Please file a bug at http://bugzilla.redhat.com" ++msgstr "" ++ ++#: ../blivet3/errors.py:217 ++msgid "" ++"Either restore the disklabel to a completely working state or remove it " ++"completely.\n" ++"Hint: parted can restore it or wipefs can remove it." ++msgstr "" ++ ++#: ../blivet3/errors.py:223 ++msgid "" ++"Rename one of the volume groups so the names are distinct.\n" ++"Hint 1: vgrename accepts UUID in place of the old name.\n" ++"Hint 2: You can get the VG UUIDs by running 'pvs -o +vg_uuid'." ++msgstr "" ++ ++#: ../blivet3/partitioning.py:450 + msgid "unable to allocate aligned partition" + msgstr "" + +-#: ../blivet/partitioning.py:458 ++#: ../blivet3/partitioning.py:458 + msgid "requested size exceeds maximum allowed" + msgstr "" + +-#: ../blivet/partitioning.py:576 ++#: ../blivet3/partitioning.py:576 + #, python-format + msgid "disk %s inaccessible" + msgstr "" + +-#: ../blivet/partitioning.py:637 ++#: ../blivet3/partitioning.py:637 + #, python-format + msgid "" + "partition is too small for %(format)s formatting (allowable size is " + "%(min_size)s to %(max_size)s)" + msgstr "" + +-#: ../blivet/partitioning.py:642 ++#: ../blivet3/partitioning.py:642 + #, python-format + msgid "" + "partition is too large for %(format)s formatting (allowable size is " + "%(min_size)s to %(max_size)s)" + msgstr "" + +-#: ../blivet/partitioning.py:950 ++#: ../blivet3/partitioning.py:950 + msgid "Unable to allocate requested partition scheme." + msgstr "" + +-#: ../blivet/partitioning.py:985 ++#: ../blivet3/partitioning.py:985 + msgid "not enough free space after creating extended partition" + msgstr "" + +-#: ../blivet/partitioning.py:992 ++#: ../blivet3/partitioning.py:992 + msgid "failed to allocate aligned partition" + msgstr "" + +-#: ../blivet/partitioning.py:1193 ++#: ../blivet3/partitioning.py:1193 + msgid "cannot reclaim more than request has grown" + msgstr "" + +-#: ../blivet/partitioning.py:1407 ++#: ../blivet3/partitioning.py:1407 + msgid "DiskChunk requests must be of type PartitionRequest" + msgstr "" + +-#: ../blivet/partitioning.py:1420 ++#: ../blivet3/partitioning.py:1420 + msgid "partitions allocated outside disklabel limits" + msgstr "" + +-#: ../blivet/partitioning.py:1505 ++#: ../blivet3/partitioning.py:1505 + msgid "VGChunk requests must be of type LVRequest" + msgstr "" + + #. by now we have allocated the PVs so if there isn't enough + #. space in the VG we have a real problem +-#: ../blivet/partitioning.py:2013 ++#: ../blivet3/partitioning.py:2013 + msgid "not enough space for LVM requests" + msgstr "" + +@@ -87,105 +112,112 @@ msgstr "" + msgid "You have not specified a device number or the number is invalid" + msgstr "" + +-#: ../blivet/zfcp.py:64 ++#: ../blivet3/zfcp.py:64 + msgid "You have not specified a worldwide port name or the name is invalid." + msgstr "" + +-#: ../blivet/zfcp.py:66 ++#: ../blivet3/zfcp.py:66 + msgid "You have not specified a FCP LUN or the number is invalid." + msgstr "" + +-#: ../blivet/zfcp.py:91 ++#: ../blivet3/zfcp.py:91 + #, python-format + msgid "zFCP device %s not found, not even in device ignore list." + msgstr "" + +-#: ../blivet/zfcp.py:101 ++#: ../blivet3/zfcp.py:101 + #, python-format + msgid "Could not set zFCP device %(devnum)s online (%(e)s)." + msgstr "" + +-#: ../blivet/zfcp.py:112 ++#: ../blivet3/zfcp.py:112 + #, python-format + msgid "Could not add WWPN %(wwpn)s to zFCP device %(devnum)s (%(e)s)." + msgstr "" + + #. newer zfcp sysfs interface with auto port scan +-#: ../blivet/zfcp.py:119 ++#: ../blivet3/zfcp.py:119 + #, python-format + msgid "WWPN %(wwpn)s not found at zFCP device %(devnum)s." + msgstr "" + +-#: ../blivet/zfcp.py:134 ++#: ../blivet3/zfcp.py:134 + #, python-format + msgid "" + "Could not add LUN %(fcplun)s to WWPN %(wwpn)s on zFCP device %(devnum)s " + "(%(e)s)." + msgstr "" + +-#: ../blivet/zfcp.py:140 ++#: ../blivet3/zfcp.py:140 + #, python-format + msgid "" + "LUN %(fcplun)s at WWPN %(wwpn)s on zFCP device %(devnum)s already configured." + msgstr "" + +-#: ../blivet/zfcp.py:152 ++#: ../blivet3/zfcp.py:152 + #, python-format + msgid "" + "Could not read failed attribute of LUN %(fcplun)s at WWPN %(wwpn)s on zFCP " + "device %(devnum)s (%(e)s)." + msgstr "" + +-#: ../blivet/zfcp.py:161 ++#: ../blivet3/zfcp.py:161 + #, python-format + msgid "" + "Failed LUN %(fcplun)s at WWPN %(wwpn)s on zFCP device %(devnum)s removed " + "again." + msgstr "" + +-#: ../blivet/zfcp.py:218 ++#: ../blivet3/zfcp.py:218 + #, python-format + msgid "" + "Could not correctly delete SCSI device of zFCP %(devnum)s %(wwpn)s " + "%(fcplun)s (%(e)s)." + msgstr "" + +-#: ../blivet/zfcp.py:227 ++#: ../blivet3/zfcp.py:227 + #, python-format + msgid "" + "Could not remove LUN %(fcplun)s at WWPN %(wwpn)s on zFCP device %(devnum)s " + "(%(e)s)." + msgstr "" + +-#: ../blivet/zfcp.py:245 ++#: ../blivet3/zfcp.py:245 + #, python-format + msgid "Could not remove WWPN %(wwpn)s on zFCP device %(devnum)s (%(e)s)." + msgstr "" + +-#: ../blivet/zfcp.py:271 ++#: ../blivet3/zfcp.py:271 + #, python-format + msgid "Could not set zFCP device %(devnum)s offline (%(e)s)." + msgstr "" + +-#: ../blivet/errors.py:210 +-msgid "" +-"For some reason we were unable to locate a disklabel on a disk that the " +-"kernel is reporting partitions on. It is unclear what the exact problem is. " +-"Please file a bug at http://bugzilla.redhat.com" ++#: ../blivet3/iscsi.py:215 ++msgid "Unable to change iSCSI initiator name once set" + msgstr "" + +-#: ../blivet/errors.py:217 +-msgid "" +-"Either restore the disklabel to a completely working state or remove it " +-"completely.\n" +-"Hint: parted can restore it or wipefs can remove it." ++#: ../blivet3/iscsi.py:217 ++msgid "Must provide an iSCSI initiator name" + msgstr "" + +-#: ../blivet/errors.py:223 +-msgid "" +-"Rename one of the volume groups so the names are distinct.\n" +-"Hint 1: vgrename accepts UUID in place of the old name.\n" +-"Hint 2: You can get the VG UUIDs by running 'pvs -o +vg_uuid'." ++#: ../blivet3/iscsi.py:408 ++msgid "iSCSI not available" ++msgstr "" ++ ++#: ../blivet3/iscsi.py:410 ++msgid "No initiator name set" ++msgstr "" ++ ++#: ../blivet3/iscsi.py:528 ++msgid "No iSCSI nodes discovered" ++msgstr "" ++ ++#: ../blivet3/iscsi.py:548 ++msgid "No new iSCSI nodes discovered" ++msgstr "" ++ ++#: ../blivet3/iscsi.py:551 ++msgid "Could not log in to any of the discovered nodes" + msgstr "" + + #: ../blivet/iscsi.py:215 +@@ -221,80 +253,72 @@ msgstr "" + msgid "Executing %(action)s" + msgstr "" + +-#: ../blivet/deviceaction.py:322 ++#: ../blivet3/deviceaction.py:322 + msgid "create device" + msgstr "" + +-#: ../blivet/deviceaction.py:381 ++#: ../blivet3/deviceaction.py:381 + msgid "destroy device" + msgstr "" + +-#: ../blivet/deviceaction.py:465 ++#: ../blivet3/deviceaction.py:465 + msgid "resize device" + msgstr "" + +-#: ../blivet/deviceaction.py:554 ++#: ../blivet3/deviceaction.py:554 + msgid "create format" + msgstr "" + +-#: ../blivet/deviceaction.py:594 ++#: ../blivet3/deviceaction.py:594 + #, python-format + msgid "Creating %(type)s on %(device)s" + msgstr "" + +-#: ../blivet/deviceaction.py:624 ++#: ../blivet3/deviceaction.py:624 + #, python-format + msgid "Not enough entropy to create LUKS format. %d bits are needed." + msgstr "" + +-#: ../blivet/deviceaction.py:654 ++#: ../blivet3/deviceaction.py:654 + #, python-format + msgid "Created %(type)s on %(device)s" + msgstr "" + +-#: ../blivet/deviceaction.py:701 ++#: ../blivet3/deviceaction.py:701 + msgid "destroy format" + msgstr "" + +-#: ../blivet/deviceaction.py:806 ++#: ../blivet3/deviceaction.py:806 + msgid "resize format" + msgstr "" + +-#: ../blivet/deviceaction.py:842 ++#: ../blivet3/deviceaction.py:842 + #, python-format + msgid "Resizing filesystem on %(device)s" + msgstr "" + +-#: ../blivet/deviceaction.py:849 ++#: ../blivet3/deviceaction.py:849 + #, python-format + msgid "Resized filesystem on %(device)s" + msgstr "" + +-#: ../blivet/deviceaction.py:893 ++#: ../blivet3/deviceaction.py:893 + msgid "add container member" + msgstr "" + +-#: ../blivet/deviceaction.py:958 ++#: ../blivet3/deviceaction.py:958 + msgid "remove container member" + msgstr "" + +-#: ../blivet/deviceaction.py:1028 ++#: ../blivet3/deviceaction.py:1028 + msgid "configure format" + msgstr "" + +-#: ../blivet/deviceaction.py:1079 ++#: ../blivet3/deviceaction.py:1079 + msgid "configure device" + msgstr "" + +-#: ../blivet/devicelibs/lvm.py:57 +-msgid "Generic" +-msgstr "" +- +-#: ../blivet/devicelibs/lvm.py:58 +-msgid "Performance" +-msgstr "" +- +-#: ../blivet/devices/raid.py:58 ++#: ../blivet3/devices/raid.py:58 + #, python-format + msgid "" + "RAID level %(raid_level)s requires that device have at least %(min_members)d " +@@ -305,75 +329,83 @@ msgid_plural "" + msgstr[0] "" + msgstr[1] "" + +-#: ../blivet/devices/raid.py:79 ++#: ../blivet3/devices/raid.py:79 + #, python-format + msgid "" + "RAID level %(raid_level)s is an invalid value. Must be one of (%(levels)s)." + msgstr "" + +-#: ../blivet/devices/raid.py:104 ++#: ../blivet3/devices/raid.py:104 + #, python-format + msgid "Cannot remove a member from existing %s array" + msgstr "" + +-#: ../blivet/formats/fs.py:923 ++#: ../blivet3/formats/fs.py:923 + msgid "EFI System Partition" + msgstr "" + +-#: ../blivet/formats/fs.py:1127 ++#: ../blivet3/formats/fs.py:1127 + msgid "Apple Bootstrap" + msgstr "" + +-#: ../blivet/formats/fs.py:1163 ++#: ../blivet3/formats/fs.py:1163 + msgid "Linux HFS+ ESP" + msgstr "" + +-#: ../blivet/formats/prepboot.py:37 ++#: ../blivet3/formats/prepboot.py:37 + msgid "PPC PReP Boot" + msgstr "" + +-#: ../blivet/formats/luks.py:58 ++#: ../blivet3/formats/mdraid.py:43 ++msgid "software RAID" ++msgstr "" ++ ++#: ../blivet3/formats/luks.py:58 + msgid "LUKS" + msgstr "" + +-#: ../blivet/formats/luks.py:59 ++#: ../blivet3/formats/luks.py:59 + msgid "Encrypted" + msgstr "" + +-#: ../blivet/formats/luks.py:384 ++#: ../blivet3/formats/luks.py:384 + msgid "DM Integrity" + msgstr "" + +-#: ../blivet/formats/__init__.py:148 +-msgid "Unknown" +-msgstr "" +- +-#: ../blivet/formats/biosboot.py:35 ++#: ../blivet3/formats/biosboot.py:35 + msgid "BIOS Boot" + msgstr "" + +-#: ../blivet/formats/dmraid.py:37 ++#: ../blivet3/formats/dmraid.py:37 + msgid "dm-raid member device" + msgstr "" + +-#: ../blivet/formats/disklabel.py:50 ++#: ../blivet3/formats/__init__.py:148 ++msgid "Unknown" ++msgstr "" ++ ++#: ../blivet3/formats/disklabel.py:50 + msgid "partition table" + msgstr "" + + #. Translators: Name for an unsupported disklabel; e.g. "Unsupported partition table" +-#: ../blivet/formats/disklabel.py:311 ++#: ../blivet3/formats/disklabel.py:311 + #, python-format + msgid "Unsupported %(name)s" + msgstr "" + +-#: ../blivet/formats/mdraid.py:43 +-msgid "software RAID" +-msgstr "" +- +-#: ../blivet/formats/multipath.py:40 ++#: ../blivet3/formats/multipath.py:40 + msgid "multipath member device" + msgstr "" + + #: ../blivet/formats/lvmpv.py:49 + msgid "physical volume (LVM)" + msgstr "" ++ ++#: ../blivet3/devicelibs/lvm.py:57 ++msgid "Generic" ++msgstr "" ++ ++#: ../blivet3/devicelibs/lvm.py:58 ++msgid "Performance" ++msgstr "" +-- +2.17.2 + diff --git a/SOURCES/0006-Update-logging-facility-to-match-new-package-name.patch b/SOURCES/0006-Update-logging-facility-to-match-new-package-name.patch new file mode 100644 index 0000000..c6eddc7 --- /dev/null +++ b/SOURCES/0006-Update-logging-facility-to-match-new-package-name.patch @@ -0,0 +1,926 @@ +From d300f82f76f8a01a49c406b3549edbb7d799c8e2 Mon Sep 17 00:00:00 2001 +From: David Lehman +Date: Mon, 25 Mar 2019 14:42:08 -0400 +Subject: [PATCH 6/8] Update logging facility to match new package name. + +--- + blivet3/__init__.py | 2 +- + blivet3/actionlist.py | 2 +- + blivet3/arch.py | 2 +- + blivet3/blivet.py | 2 +- + blivet3/deviceaction.py | 2 +- + blivet3/devicefactory.py | 2 +- + blivet3/devicelibs/btrfs.py | 2 +- + blivet3/devicelibs/crypto.py | 2 +- + blivet3/devicelibs/edd.py | 2 +- + blivet3/devicelibs/lvm.py | 2 +- + blivet3/devicelibs/mdraid.py | 2 +- + blivet3/devices/btrfs.py | 2 +- + blivet3/devices/container.py | 2 +- + blivet3/devices/device.py | 2 +- + blivet3/devices/disk.py | 2 +- + blivet3/devices/dm.py | 2 +- + blivet3/devices/file.py | 2 +- + blivet3/devices/loop.py | 2 +- + blivet3/devices/luks.py | 2 +- + blivet3/devices/lvm.py | 2 +- + blivet3/devices/md.py | 2 +- + blivet3/devices/nfs.py | 2 +- + blivet3/devices/nodev.py | 2 +- + blivet3/devices/optical.py | 2 +- + blivet3/devices/partition.py | 2 +- + blivet3/devices/storage.py | 4 ++-- + blivet3/devicetree.py | 2 +- + blivet3/events/handler.py | 4 ++-- + blivet3/events/manager.py | 2 +- + blivet3/fcoe.py | 2 +- + blivet3/formats/__init__.py | 2 +- + blivet3/formats/disklabel.py | 2 +- + blivet3/formats/dmraid.py | 2 +- + blivet3/formats/fs.py | 2 +- + blivet3/formats/luks.py | 2 +- + blivet3/formats/lvmpv.py | 2 +- + blivet3/formats/mdraid.py | 2 +- + blivet3/formats/multipath.py | 2 +- + blivet3/formats/prepboot.py | 2 +- + blivet3/formats/swap.py | 2 +- + blivet3/iscsi.py | 2 +- + blivet3/mounts.py | 2 +- + blivet3/partitioning.py | 2 +- + blivet3/populator/helpers/btrfs.py | 2 +- + blivet3/populator/helpers/disk.py | 2 +- + blivet3/populator/helpers/disklabel.py | 2 +- + blivet3/populator/helpers/dm.py | 2 +- + blivet3/populator/helpers/dmraid.py | 2 +- + blivet3/populator/helpers/formatpopulator.py | 2 +- + blivet3/populator/helpers/luks.py | 2 +- + blivet3/populator/helpers/lvm.py | 2 +- + blivet3/populator/helpers/mdraid.py | 2 +- + blivet3/populator/helpers/multipath.py | 2 +- + blivet3/populator/helpers/partition.py | 2 +- + blivet3/populator/populator.py | 2 +- + blivet3/static_data/lvm_info.py | 2 +- + blivet3/static_data/mpath_info.py | 2 +- + blivet3/static_data/nvdimm.py | 2 +- + blivet3/storage_log.py | 2 +- + blivet3/tasks/availability.py | 2 +- + blivet3/udev.py | 2 +- + blivet3/util.py | 8 ++++---- + blivet3/zfcp.py | 2 +- + 63 files changed, 68 insertions(+), 68 deletions(-) + +diff --git a/blivet3/__init__.py b/blivet3/__init__.py +index 902d3df9..eef67eb0 100644 +--- a/blivet3/__init__.py ++++ b/blivet3/__init__.py +@@ -30,7 +30,7 @@ import syslog + from . import util, arch + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + program_log = logging.getLogger("program") + testdata_log = logging.getLogger("testdata") + +diff --git a/blivet3/actionlist.py b/blivet3/actionlist.py +index d03e32b9..89a7007e 100644 +--- a/blivet3/actionlist.py ++++ b/blivet3/actionlist.py +@@ -35,7 +35,7 @@ from . import tsort + from .threads import blivet_lock, SynchronizedMeta + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + def with_flag(flag_attr): +diff --git a/blivet3/arch.py b/blivet3/arch.py +index 55ce8108..9645ba06 100644 +--- a/blivet3/arch.py ++++ b/blivet3/arch.py +@@ -36,7 +36,7 @@ import os + from .storage_log import log_exception_info + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + # DMI information paths + DMI_CHASSIS_VENDOR = "/sys/class/dmi/id/chassis_vendor" +diff --git a/blivet3/blivet.py b/blivet3/blivet.py +index 8128347f..b1c42eff 100644 +--- a/blivet3/blivet.py ++++ b/blivet3/blivet.py +@@ -49,7 +49,7 @@ from .threads import SynchronizedMeta + from .static_data import luks_data + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + @six.add_metaclass(SynchronizedMeta) +diff --git a/blivet3/deviceaction.py b/blivet3/deviceaction.py +index 14a06ff0..0b50dfca 100644 +--- a/blivet3/deviceaction.py ++++ b/blivet3/deviceaction.py +@@ -39,7 +39,7 @@ from .threads import SynchronizedMeta + from .static_data import luks_data + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + # The values are just hints as to the ordering. + # Eg: fsmod and devmod ordering depends on the mod (shrink -v- grow) +diff --git a/blivet3/devicefactory.py b/blivet3/devicefactory.py +index a15b60c9..76a48423 100644 +--- a/blivet3/devicefactory.py ++++ b/blivet3/devicefactory.py +@@ -46,7 +46,7 @@ gi.require_version("BlockDev", "2.0") + from gi.repository import BlockDev as blockdev + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + # policy value of >0 is a fixed size request + SIZE_POLICY_MAX = -1 +diff --git a/blivet3/devicelibs/btrfs.py b/blivet3/devicelibs/btrfs.py +index b70dae28..00aa7669 100644 +--- a/blivet3/devicelibs/btrfs.py ++++ b/blivet3/devicelibs/btrfs.py +@@ -25,7 +25,7 @@ from ..size import Size + from ..tasks import availability + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + # this is the volume id btrfs always assigns to the top-level volume/tree + MAIN_VOLUME_ID = 5 +diff --git a/blivet3/devicelibs/crypto.py b/blivet3/devicelibs/crypto.py +index 897dd9a8..0156be84 100644 +--- a/blivet3/devicelibs/crypto.py ++++ b/blivet3/devicelibs/crypto.py +@@ -30,7 +30,7 @@ from ..tasks import availability + from ..util import total_memory, available_memory + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + LUKS_METADATA_SIZE = Size("2 MiB") + MIN_CREATE_ENTROPY = 256 # bits +diff --git a/blivet3/devicelibs/edd.py b/blivet3/devicelibs/edd.py +index d099b202..2bed1950 100644 +--- a/blivet3/devicelibs/edd.py ++++ b/blivet3/devicelibs/edd.py +@@ -31,7 +31,7 @@ import copy + + from .. import util + +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + testdata_log = logging.getLogger("testdata") + testdata_log.setLevel(logging.DEBUG) + +diff --git a/blivet3/devicelibs/lvm.py b/blivet3/devicelibs/lvm.py +index 0295332e..3b812edf 100644 +--- a/blivet3/devicelibs/lvm.py ++++ b/blivet3/devicelibs/lvm.py +@@ -32,7 +32,7 @@ gi.require_version("BlockDev", "2.0") + from gi.repository import BlockDev as blockdev + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from . import raid + from ..size import Size +diff --git a/blivet3/devicelibs/mdraid.py b/blivet3/devicelibs/mdraid.py +index 8b16105b..e64f8cdb 100644 +--- a/blivet3/devicelibs/mdraid.py ++++ b/blivet3/devicelibs/mdraid.py +@@ -25,7 +25,7 @@ from . import raid + from ..tasks import availability + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + # these defaults were determined empirically + MD_SUPERBLOCK_SIZE = Size("2 MiB") +diff --git a/blivet3/devices/btrfs.py b/blivet3/devices/btrfs.py +index edb82478..4182de76 100644 +--- a/blivet3/devices/btrfs.py ++++ b/blivet3/devices/btrfs.py +@@ -40,7 +40,7 @@ from ..formats import get_format, DeviceFormat + from ..size import Size + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from .storage import StorageDevice + from .container import ContainerDevice +diff --git a/blivet3/devices/container.py b/blivet3/devices/container.py +index a54d5bae..8c8106e9 100644 +--- a/blivet3/devices/container.py ++++ b/blivet3/devices/container.py +@@ -29,7 +29,7 @@ from ..formats import get_device_format_class + from ..threads import SynchronizedABCMeta + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from .storage import StorageDevice + +diff --git a/blivet3/devices/device.py b/blivet3/devices/device.py +index 392cb77c..26519c7f 100644 +--- a/blivet3/devices/device.py ++++ b/blivet3/devices/device.py +@@ -28,7 +28,7 @@ from ..storage_log import log_method_call + from ..threads import SynchronizedMeta + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from .lib import ParentList + +diff --git a/blivet3/devices/disk.py b/blivet3/devices/disk.py +index 30611195..919d207d 100644 +--- a/blivet3/devices/disk.py ++++ b/blivet3/devices/disk.py +@@ -39,7 +39,7 @@ from ..tasks import availability + from ..fcoe import fcoe + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from .lib import Tags + from .storage import StorageDevice +diff --git a/blivet3/devices/dm.py b/blivet3/devices/dm.py +index 508a6f89..45e011d6 100644 +--- a/blivet3/devices/dm.py ++++ b/blivet3/devices/dm.py +@@ -34,7 +34,7 @@ from .. import udev + from ..tasks import availability + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from .storage import StorageDevice + from .lib import LINUX_SECTOR_SIZE, get_majors_by_device_type +diff --git a/blivet3/devices/file.py b/blivet3/devices/file.py +index fa3dfb8a..b45ad0dd 100644 +--- a/blivet3/devices/file.py ++++ b/blivet3/devices/file.py +@@ -28,7 +28,7 @@ from ..storage_log import log_method_call + from ..size import Size + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from .storage import StorageDevice + +diff --git a/blivet3/devices/loop.py b/blivet3/devices/loop.py +index 78f88d7d..688856df 100644 +--- a/blivet3/devices/loop.py ++++ b/blivet3/devices/loop.py +@@ -31,7 +31,7 @@ from ..storage_log import log_method_call + from ..tasks import availability + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from .storage import StorageDevice + +diff --git a/blivet3/devices/luks.py b/blivet3/devices/luks.py +index dff12739..0a4d34ab 100644 +--- a/blivet3/devices/luks.py ++++ b/blivet3/devices/luks.py +@@ -27,7 +27,7 @@ from ..size import Size + from ..tasks import availability + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from .storage import StorageDevice + from .dm import DMCryptDevice, DMIntegrityDevice +diff --git a/blivet3/devices/lvm.py b/blivet3/devices/lvm.py +index fa537597..a92063b0 100644 +--- a/blivet3/devices/lvm.py ++++ b/blivet3/devices/lvm.py +@@ -46,7 +46,7 @@ from ..size import Size, KiB, MiB, ROUND_UP, ROUND_DOWN + from ..tasks import availability + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from .lib import LINUX_SECTOR_SIZE, ParentList + from .device import Device +diff --git a/blivet3/devices/md.py b/blivet3/devices/md.py +index 6a837df0..5ba8f972 100644 +--- a/blivet3/devices/md.py ++++ b/blivet3/devices/md.py +@@ -40,7 +40,7 @@ from ..size import Size + from ..tasks import availability + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from .storage import StorageDevice + from .container import ContainerDevice +diff --git a/blivet3/devices/nfs.py b/blivet3/devices/nfs.py +index a0142f91..81ce8739 100644 +--- a/blivet3/devices/nfs.py ++++ b/blivet3/devices/nfs.py +@@ -22,7 +22,7 @@ + from ..storage_log import log_method_call + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from .storage import StorageDevice + from .network import NetworkStorageDevice +diff --git a/blivet3/devices/nodev.py b/blivet3/devices/nodev.py +index f1b87392..0fdb5f75 100644 +--- a/blivet3/devices/nodev.py ++++ b/blivet3/devices/nodev.py +@@ -22,7 +22,7 @@ + from ..storage_log import log_method_call + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from ..size import Size + from .storage import StorageDevice +diff --git a/blivet3/devices/optical.py b/blivet3/devices/optical.py +index b9dba1f2..54d2ad97 100644 +--- a/blivet3/devices/optical.py ++++ b/blivet3/devices/optical.py +@@ -26,7 +26,7 @@ from .. import util + from ..storage_log import log_method_call + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from .storage import StorageDevice + +diff --git a/blivet3/devices/partition.py b/blivet3/devices/partition.py +index 623e1c9d..56f8f5d3 100644 +--- a/blivet3/devices/partition.py ++++ b/blivet3/devices/partition.py +@@ -38,7 +38,7 @@ from ..formats import DeviceFormat, get_format + from ..size import Size, MiB + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from .device import Device + from .storage import StorageDevice +diff --git a/blivet3/devices/storage.py b/blivet3/devices/storage.py +index 904b60df..df4e9943 100644 +--- a/blivet3/devices/storage.py ++++ b/blivet3/devices/storage.py +@@ -34,7 +34,7 @@ from ..formats import get_format, DeviceFormat + from ..size import Size + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from .device import Device + from .network import NetworkStorageDevice +@@ -54,7 +54,7 @@ class StorageDevice(Device): + _resizable = False + """Whether this type of device is inherently resizable.""" + +- _type = "blivet" ++ _type = "blivet3" + _dev_dir = "/dev" + _format_immutable = False + _partitionable = False +diff --git a/blivet3/devicetree.py b/blivet3/devicetree.py +index d8b98b3b..859ba42e 100644 +--- a/blivet3/devicetree.py ++++ b/blivet3/devicetree.py +@@ -46,7 +46,7 @@ from .storage_log import log_method_call, log_method_return + from .threads import SynchronizedMeta + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + _LVM_DEVICE_CLASSES = (LVMLogicalVolumeDevice, LVMVolumeGroupDevice) + +diff --git a/blivet3/events/handler.py b/blivet3/events/handler.py +index f839e8c3..9c98616c 100644 +--- a/blivet3/events/handler.py ++++ b/blivet3/events/handler.py +@@ -33,8 +33,8 @@ from .changes import data as event_data + from .manager import event_manager + + import logging +-log = logging.getLogger("blivet") +-event_log = logging.getLogger("blivet.event") ++log = logging.getLogger("blivet3") ++event_log = logging.getLogger("blivet3.event") + + + @add_metaclass(SynchronizedMeta) +diff --git a/blivet3/events/manager.py b/blivet3/events/manager.py +index f81efb8b..8d39abc3 100644 +--- a/blivet3/events/manager.py ++++ b/blivet3/events/manager.py +@@ -38,7 +38,7 @@ from ..flags import flags + from .changes import disable_callbacks, enable_callbacks + + import logging +-event_log = logging.getLogger("blivet.event") ++event_log = logging.getLogger("blivet3.event") + + + def validate_cb(cb, kwargs=None, arg_count=None): +diff --git a/blivet3/fcoe.py b/blivet3/fcoe.py +index 3a1887dc..d3bc4188 100644 +--- a/blivet3/fcoe.py ++++ b/blivet3/fcoe.py +@@ -24,7 +24,7 @@ import logging + import time + import shutil + from .i18n import _ +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + _fcoe_module_loaded = False + +diff --git a/blivet3/formats/__init__.py b/blivet3/formats/__init__.py +index 83ea815d..92e48452 100644 +--- a/blivet3/formats/__init__.py ++++ b/blivet3/formats/__init__.py +@@ -50,7 +50,7 @@ from ..tasks import fsck + from ..tasks import fsminsize + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + device_formats = {} + +diff --git a/blivet3/formats/disklabel.py b/blivet3/formats/disklabel.py +index 75867d6a..faaf80a2 100644 +--- a/blivet3/formats/disklabel.py ++++ b/blivet3/formats/disklabel.py +@@ -40,7 +40,7 @@ from . import DeviceFormat, register_device_format + from ..size import Size + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class DiskLabel(DeviceFormat): +diff --git a/blivet3/formats/dmraid.py b/blivet3/formats/dmraid.py +index 2ba9dcfe..5a49c990 100644 +--- a/blivet3/formats/dmraid.py ++++ b/blivet3/formats/dmraid.py +@@ -27,7 +27,7 @@ from ..i18n import N_ + from . import DeviceFormat, register_device_format + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class DMRaidMember(DeviceFormat): +diff --git a/blivet3/formats/fs.py b/blivet3/formats/fs.py +index d59afabc..085b9e78 100644 +--- a/blivet3/formats/fs.py ++++ b/blivet3/formats/fs.py +@@ -58,7 +58,7 @@ from ..mounts import mounts_cache + from .fslib import kernel_filesystems, update_kernel_filesystems + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class FS(DeviceFormat): +diff --git a/blivet3/formats/luks.py b/blivet3/formats/luks.py +index e80fd27f..a632bdc5 100644 +--- a/blivet3/formats/luks.py ++++ b/blivet3/formats/luks.py +@@ -38,7 +38,7 @@ from ..size import Size, KiB + from ..static_data import luks_data + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class LUKS2PBKDFArgs(object): +diff --git a/blivet3/formats/lvmpv.py b/blivet3/formats/lvmpv.py +index e2e8428b..712d6d79 100644 +--- a/blivet3/formats/lvmpv.py ++++ b/blivet3/formats/lvmpv.py +@@ -39,7 +39,7 @@ from .. import udev + from ..static_data.lvm_info import pvs_info + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class LVMPhysicalVolume(DeviceFormat): +diff --git a/blivet3/formats/mdraid.py b/blivet3/formats/mdraid.py +index 41ddef81..1d7b7a31 100644 +--- a/blivet3/formats/mdraid.py ++++ b/blivet3/formats/mdraid.py +@@ -33,7 +33,7 @@ from ..i18n import N_ + from ..tasks import availability + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class MDRaidMember(DeviceFormat): +diff --git a/blivet3/formats/multipath.py b/blivet3/formats/multipath.py +index 473208f0..4ff5cc4e 100644 +--- a/blivet3/formats/multipath.py ++++ b/blivet3/formats/multipath.py +@@ -30,7 +30,7 @@ from ..i18n import N_ + from . import DeviceFormat, register_device_format + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class MultipathMember(DeviceFormat): +diff --git a/blivet3/formats/prepboot.py b/blivet3/formats/prepboot.py +index 3ba24a77..c37f75e0 100644 +--- a/blivet3/formats/prepboot.py ++++ b/blivet3/formats/prepboot.py +@@ -27,7 +27,7 @@ from . import DeviceFormat, register_device_format + from parted import PARTITION_PREP + import os + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class PPCPRePBoot(DeviceFormat): +diff --git a/blivet3/formats/swap.py b/blivet3/formats/swap.py +index 36b50cb6..980beb62 100644 +--- a/blivet3/formats/swap.py ++++ b/blivet3/formats/swap.py +@@ -34,7 +34,7 @@ gi.require_version("BlockDev", "2.0") + from gi.repository import BlockDev as blockdev + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class SwapSpace(DeviceFormat): +diff --git a/blivet3/iscsi.py b/blivet3/iscsi.py +index 74432505..53ed457e 100644 +--- a/blivet3/iscsi.py ++++ b/blivet3/iscsi.py +@@ -37,7 +37,7 @@ gi.require_version("GLib", "2.0") + from gi.repository import GLib + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + # Note that stage2 copies all files under /sbin to /usr/sbin + ISCSID = "" +diff --git a/blivet3/mounts.py b/blivet3/mounts.py +index 015a4fa0..1450c5e7 100644 +--- a/blivet3/mounts.py ++++ b/blivet3/mounts.py +@@ -25,7 +25,7 @@ from . import util + from .devicelibs import btrfs + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class _MountinfoCache(object): +diff --git a/blivet3/partitioning.py b/blivet3/partitioning.py +index 42817072..d0f4f6e7 100644 +--- a/blivet3/partitioning.py ++++ b/blivet3/partitioning.py +@@ -37,7 +37,7 @@ from .i18n import _ + from .util import stringize, unicodeize, compare + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + def partition_compare(part1, part2): +diff --git a/blivet3/populator/helpers/btrfs.py b/blivet3/populator/helpers/btrfs.py +index 787363d4..23dcf114 100644 +--- a/blivet3/populator/helpers/btrfs.py ++++ b/blivet3/populator/helpers/btrfs.py +@@ -27,7 +27,7 @@ from ...errors import DeviceTreeError + from .formatpopulator import FormatPopulator + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class BTRFSFormatPopulator(FormatPopulator): +diff --git a/blivet3/populator/helpers/disk.py b/blivet3/populator/helpers/disk.py +index 776a7d05..197ab83b 100644 +--- a/blivet3/populator/helpers/disk.py ++++ b/blivet3/populator/helpers/disk.py +@@ -34,7 +34,7 @@ from ...storage_log import log_method_call + from .devicepopulator import DevicePopulator + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class DiskDevicePopulator(DevicePopulator): +diff --git a/blivet3/populator/helpers/disklabel.py b/blivet3/populator/helpers/disklabel.py +index db10638e..9bc3a9c6 100644 +--- a/blivet3/populator/helpers/disklabel.py ++++ b/blivet3/populator/helpers/disklabel.py +@@ -30,7 +30,7 @@ from ...storage_log import log_exception_info, log_method_call + from .formatpopulator import FormatPopulator + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class DiskLabelFormatPopulator(FormatPopulator): +diff --git a/blivet3/populator/helpers/dm.py b/blivet3/populator/helpers/dm.py +index 6de8ee81..478510fe 100644 +--- a/blivet3/populator/helpers/dm.py ++++ b/blivet3/populator/helpers/dm.py +@@ -27,7 +27,7 @@ from ...storage_log import log_method_call + from .devicepopulator import DevicePopulator + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class DMDevicePopulator(DevicePopulator): +diff --git a/blivet3/populator/helpers/dmraid.py b/blivet3/populator/helpers/dmraid.py +index c8cc3a8e..e201af86 100644 +--- a/blivet3/populator/helpers/dmraid.py ++++ b/blivet3/populator/helpers/dmraid.py +@@ -32,7 +32,7 @@ from ...storage_log import log_method_call + from .formatpopulator import FormatPopulator + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class DMRaidFormatPopulator(FormatPopulator): +diff --git a/blivet3/populator/helpers/formatpopulator.py b/blivet3/populator/helpers/formatpopulator.py +index e9f71650..c86d3ebf 100644 +--- a/blivet3/populator/helpers/formatpopulator.py ++++ b/blivet3/populator/helpers/formatpopulator.py +@@ -28,7 +28,7 @@ from ...errors import FSError + from .populatorhelper import PopulatorHelper + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class FormatPopulator(PopulatorHelper): +diff --git a/blivet3/populator/helpers/luks.py b/blivet3/populator/helpers/luks.py +index 58106f9e..3cf34778 100644 +--- a/blivet3/populator/helpers/luks.py ++++ b/blivet3/populator/helpers/luks.py +@@ -34,7 +34,7 @@ from .formatpopulator import FormatPopulator + from ...static_data import luks_data + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class LUKSDevicePopulator(DevicePopulator): +diff --git a/blivet3/populator/helpers/lvm.py b/blivet3/populator/helpers/lvm.py +index 9e79bbc0..4eb95157 100644 +--- a/blivet3/populator/helpers/lvm.py ++++ b/blivet3/populator/helpers/lvm.py +@@ -39,7 +39,7 @@ from .formatpopulator import FormatPopulator + from ...static_data import lvs_info, pvs_info, vgs_info + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class LVMDevicePopulator(DevicePopulator): +diff --git a/blivet3/populator/helpers/mdraid.py b/blivet3/populator/helpers/mdraid.py +index 76aebf25..ec6b5b20 100644 +--- a/blivet3/populator/helpers/mdraid.py ++++ b/blivet3/populator/helpers/mdraid.py +@@ -38,7 +38,7 @@ from .devicepopulator import DevicePopulator + from .formatpopulator import FormatPopulator + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class MDDevicePopulator(DevicePopulator): +diff --git a/blivet3/populator/helpers/multipath.py b/blivet3/populator/helpers/multipath.py +index 10c745bf..c1e11606 100644 +--- a/blivet3/populator/helpers/multipath.py ++++ b/blivet3/populator/helpers/multipath.py +@@ -27,7 +27,7 @@ from .devicepopulator import DevicePopulator + from .formatpopulator import FormatPopulator + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class MultipathDevicePopulator(DevicePopulator): +diff --git a/blivet3/populator/helpers/partition.py b/blivet3/populator/helpers/partition.py +index f00323d1..7c7fe29b 100644 +--- a/blivet3/populator/helpers/partition.py ++++ b/blivet3/populator/helpers/partition.py +@@ -32,7 +32,7 @@ from ...storage_log import log_method_call + from .devicepopulator import DevicePopulator + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class PartitionDevicePopulator(DevicePopulator): +diff --git a/blivet3/populator/populator.py b/blivet3/populator/populator.py +index cdb5b79f..8fd50e9c 100644 +--- a/blivet3/populator/populator.py ++++ b/blivet3/populator/populator.py +@@ -50,7 +50,7 @@ from ..static_data import lvs_info, pvs_info, vgs_info, luks_data, mpath_members + from ..callbacks import callbacks + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + def parted_exn_handler(exn_type, exn_options, exn_msg): +diff --git a/blivet3/static_data/lvm_info.py b/blivet3/static_data/lvm_info.py +index 42261f9b..1cad7aaa 100644 +--- a/blivet3/static_data/lvm_info.py ++++ b/blivet3/static_data/lvm_info.py +@@ -26,7 +26,7 @@ gi.require_version("BlockDev", "2.0") + from gi.repository import BlockDev as blockdev + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class LVsInfo(object): +diff --git a/blivet3/static_data/mpath_info.py b/blivet3/static_data/mpath_info.py +index 49ba4709..092e033e 100644 +--- a/blivet3/static_data/mpath_info.py ++++ b/blivet3/static_data/mpath_info.py +@@ -25,7 +25,7 @@ gi.require_version("BlockDev", "2.0") + from gi.repository import BlockDev as blockdev + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + from ..tasks import availability + +diff --git a/blivet3/static_data/nvdimm.py b/blivet3/static_data/nvdimm.py +index e0a24bf8..c7a315f6 100644 +--- a/blivet3/static_data/nvdimm.py ++++ b/blivet3/static_data/nvdimm.py +@@ -26,7 +26,7 @@ from gi.repository import GLib + from .. import util + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + class NVDIMMDependencyGuard(util.DependencyGuard): +diff --git a/blivet3/storage_log.py b/blivet3/storage_log.py +index 9e363f1c..bc2e3dc0 100644 +--- a/blivet3/storage_log.py ++++ b/blivet3/storage_log.py +@@ -5,7 +5,7 @@ import traceback + + from .flags import flags + +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + log.addHandler(logging.NullHandler()) + + +diff --git a/blivet3/tasks/availability.py b/blivet3/tasks/availability.py +index b6b5955a..8ad51a12 100644 +--- a/blivet3/tasks/availability.py ++++ b/blivet3/tasks/availability.py +@@ -32,7 +32,7 @@ from gi.repository import BlockDev as blockdev + from gi.repository import GLib + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + CACHE_AVAILABILITY = True + +diff --git a/blivet3/udev.py b/blivet3/udev.py +index 51b69b76..96a199d8 100644 +--- a/blivet3/udev.py ++++ b/blivet3/udev.py +@@ -37,7 +37,7 @@ gi.require_version("BlockDev", "2.0") + from gi.repository import BlockDev as blockdev + + global_udev = pyudev.Context() +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + device_name_blacklist = [] + """ device name regexes to ignore; this should be empty by default """ +diff --git a/blivet3/util.py b/blivet3/util.py +index 542bc93f..77dc528e 100644 +--- a/blivet3/util.py ++++ b/blivet3/util.py +@@ -28,10 +28,10 @@ from gi.repository import BlockDev as blockdev + import six + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + program_log = logging.getLogger("program") + testdata_log = logging.getLogger("testdata") +-console_log = logging.getLogger("blivet.console") ++console_log = logging.getLogger("blivet3.console") + + from threading import Lock + # this will get set to anaconda's program_log_lock in enable_installer_mode +@@ -706,7 +706,7 @@ def dedup_list(alist): + ## + + +-def set_up_logging(log_dir="/tmp", log_prefix="blivet", console_logs=None): ++def set_up_logging(log_dir="/tmp", log_prefix="blivet3", console_logs=None): + """ Configure the blivet logger to write out a log file. + + :keyword str log_dir: path to directory where log files are +@@ -763,7 +763,7 @@ def create_sparse_tempfile(name, size): + :param :class:`~.size.Size` size: the file size + :returns: the path to the newly created file + """ +- (fd, path) = tempfile.mkstemp(prefix="blivet.", suffix="-%s" % name) ++ (fd, path) = tempfile.mkstemp(prefix="blivet3.", suffix="-%s" % name) + os.close(fd) + create_sparse_file(path, size) + return path +diff --git a/blivet3/zfcp.py b/blivet3/zfcp.py +index 4e9bbac9..6a6c9736 100644 +--- a/blivet3/zfcp.py ++++ b/blivet3/zfcp.py +@@ -31,7 +31,7 @@ gi.require_version("BlockDev", "2.0") + from gi.repository import BlockDev as blockdev + + import logging +-log = logging.getLogger("blivet") ++log = logging.getLogger("blivet3") + + + def logged_write_line_to_file(fn, value): +-- +2.17.2 + diff --git a/SOURCES/0007-Regenerate-translations.patch b/SOURCES/0007-Regenerate-translations.patch new file mode 100644 index 0000000..b1e9842 --- /dev/null +++ b/SOURCES/0007-Regenerate-translations.patch @@ -0,0 +1,125 @@ +From 06ccb45d03d3d76e4b862682cdc8007ef8c40424 Mon Sep 17 00:00:00 2001 +From: David Lehman +Date: Mon, 25 Mar 2019 14:53:13 -0400 +Subject: [PATCH 7/8] Regenerate translations. + +--- + po/blivet3.pot | 56 +++++++++++--------------------------------------- + 1 file changed, 12 insertions(+), 44 deletions(-) + +diff --git a/po/blivet3.pot b/po/blivet3.pot +index 343a4fa9..1d54d1fd 100644 +--- a/po/blivet3.pot ++++ b/po/blivet3.pot +@@ -8,7 +8,7 @@ msgid "" + msgstr "" + "Project-Id-Version: PACKAGE VERSION\n" + "Report-Msgid-Bugs-To: \n" +-"POT-Creation-Date: 2019-02-27 08:57+0100\n" ++"POT-Creation-Date: 2019-03-25 14:52-0400\n" + "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" + "Last-Translator: FULL NAME \n" + "Language-Team: LANGUAGE \n" +@@ -104,11 +104,7 @@ msgstr "" + msgid "not enough space for LVM requests" + msgstr "" + +-#: ../blivet/fcoe.py:121 +-msgid "FCoE not available" +-msgstr "" +- +-#: ../blivet/zfcp.py:62 ++#: ../blivet3/zfcp.py:62 + msgid "You have not specified a device number or the number is invalid" + msgstr "" + +@@ -220,35 +216,7 @@ msgstr "" + msgid "Could not log in to any of the discovered nodes" + msgstr "" + +-#: ../blivet/iscsi.py:215 +-msgid "Unable to change iSCSI initiator name once set" +-msgstr "" +- +-#: ../blivet/iscsi.py:217 +-msgid "Must provide an iSCSI initiator name" +-msgstr "" +- +-#: ../blivet/iscsi.py:408 +-msgid "iSCSI not available" +-msgstr "" +- +-#: ../blivet/iscsi.py:410 +-msgid "No initiator name set" +-msgstr "" +- +-#: ../blivet/iscsi.py:528 +-msgid "No iSCSI nodes discovered" +-msgstr "" +- +-#: ../blivet/iscsi.py:548 +-msgid "No new iSCSI nodes discovered" +-msgstr "" +- +-#: ../blivet/iscsi.py:551 +-msgid "Could not log in to any of the discovered nodes" +-msgstr "" +- +-#: ../blivet/deviceaction.py:194 ++#: ../blivet3/deviceaction.py:194 + #, python-format + msgid "Executing %(action)s" + msgstr "" +@@ -356,10 +324,6 @@ msgstr "" + msgid "PPC PReP Boot" + msgstr "" + +-#: ../blivet3/formats/mdraid.py:43 +-msgid "software RAID" +-msgstr "" +- + #: ../blivet3/formats/luks.py:58 + msgid "LUKS" + msgstr "" +@@ -372,6 +336,10 @@ msgstr "" + msgid "DM Integrity" + msgstr "" + ++#: ../blivet3/formats/__init__.py:148 ++msgid "Unknown" ++msgstr "" ++ + #: ../blivet3/formats/biosboot.py:35 + msgid "BIOS Boot" + msgstr "" +@@ -380,10 +348,6 @@ msgstr "" + msgid "dm-raid member device" + msgstr "" + +-#: ../blivet3/formats/__init__.py:148 +-msgid "Unknown" +-msgstr "" +- + #: ../blivet3/formats/disklabel.py:50 + msgid "partition table" + msgstr "" +@@ -394,11 +358,15 @@ msgstr "" + msgid "Unsupported %(name)s" + msgstr "" + ++#: ../blivet3/formats/mdraid.py:43 ++msgid "software RAID" ++msgstr "" ++ + #: ../blivet3/formats/multipath.py:40 + msgid "multipath member device" + msgstr "" + +-#: ../blivet/formats/lvmpv.py:49 ++#: ../blivet3/formats/lvmpv.py:49 + msgid "physical volume (LVM)" + msgstr "" + +-- +2.17.2 + diff --git a/SOURCES/0008-Remove-Obsoletes-for-compat-package.patch b/SOURCES/0008-Remove-Obsoletes-for-compat-package.patch new file mode 100644 index 0000000..e49e9c3 --- /dev/null +++ b/SOURCES/0008-Remove-Obsoletes-for-compat-package.patch @@ -0,0 +1,32 @@ +From 639583b86750c3e17e68be781315ee262fd293d5 Mon Sep 17 00:00:00 2001 +From: David Lehman +Date: Mon, 25 Mar 2019 15:26:25 -0400 +Subject: [PATCH 8/8] Remove Obsoletes for compat package. + +--- + python-blivet3.spec | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/python-blivet3.spec b/python-blivet3.spec +index 883ba9b8..cb54a4cd 100644 +--- a/python-blivet3.spec ++++ b/python-blivet3.spec +@@ -92,15 +92,6 @@ Requires: python3-gobject-base + Requires: systemd-udev + Requires: %{realname}-data = %{epoch}:%{version}-%{release} + +-Obsoletes: blivet-data < 1:2.0.0 +- +-%if %{without python2} +-Obsoletes: python2-blivet < 1:2.0.2-2 +-Obsoletes: python-blivet < 1:2.0.2-2 +-%else +-Obsoletes: python-blivet < 1:2.0.0 +-%endif +- + %description -n python3-%{realname} + The python3-%{realname} is a python3 package for examining and modifying storage + configuration. +-- +2.17.2 + diff --git a/SOURCES/0009-Dont-require-python3-for-the-dbus-service.patch b/SOURCES/0009-Dont-require-python3-for-the-dbus-service.patch new file mode 100644 index 0000000..9b7753a --- /dev/null +++ b/SOURCES/0009-Dont-require-python3-for-the-dbus-service.patch @@ -0,0 +1,22 @@ +From 0e9403bbbe045e02890f516102b0b8d94dd4d122 Mon Sep 17 00:00:00 2001 +From: David Lehman +Date: Mon, 25 Mar 2019 17:49:59 -0400 +Subject: [PATCH] Don't require python3 for the dbus service. + +--- + dbus/blivetd | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dbus/blivetd b/dbus/blivetd +index d9abbcd5..f85099f9 100755 +--- a/dbus/blivetd ++++ b/dbus/blivetd +@@ -1,4 +1,4 @@ +-#!/usr/bin/python3 ++#!/usr/bin/python + import dbus + import dbus.mainloop.glib + from gi.repository import GLib +-- +2.17.2 + diff --git a/SOURCES/0010-Handle-older-pyudev-w-o-Device.properties.patch b/SOURCES/0010-Handle-older-pyudev-w-o-Device.properties.patch new file mode 100644 index 0000000..2387b48 --- /dev/null +++ b/SOURCES/0010-Handle-older-pyudev-w-o-Device.properties.patch @@ -0,0 +1,29 @@ +From 027f143e2b40b76e5c6e4515c16f1134999196b2 Mon Sep 17 00:00:00 2001 +From: David Lehman +Date: Thu, 28 Mar 2019 17:24:33 -0400 +Subject: [PATCH 12/20] Handle older pyudev w/o Device.properties + +--- + blivet3/udev.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/blivet3/udev.py b/blivet3/udev.py +index 96a199d8..227399bc 100644 +--- a/blivet3/udev.py ++++ b/blivet3/udev.py +@@ -50,7 +50,11 @@ def device_to_dict(device): + # Sice blivet uses Device.properties only (with couple of exceptions) + # this is a functional workaround. (japokorn May 2017) + +- result = dict(device.properties) ++ try: ++ result = dict(device.properties) ++ except AttributeError: ++ result = dict(device) ++ + result["SYS_NAME"] = device.sys_name + result["SYS_PATH"] = device.sys_path + return result +-- +2.20.1 + diff --git a/SOURCES/0011-Adapt-to-older-pyudev-API-for-instantiating-Device.patch b/SOURCES/0011-Adapt-to-older-pyudev-API-for-instantiating-Device.patch new file mode 100644 index 0000000..db5dc9c --- /dev/null +++ b/SOURCES/0011-Adapt-to-older-pyudev-API-for-instantiating-Device.patch @@ -0,0 +1,42 @@ +From 4ae6552726c2ee7a28ae97db0d3e84b6ec26a594 Mon Sep 17 00:00:00 2001 +From: David Lehman +Date: Fri, 29 Mar 2019 15:38:12 -0400 +Subject: [PATCH 13/20] Adapt to older pyudev API for instantiating Device. + +--- + blivet3/devices/storage.py | 2 +- + blivet3/udev.py | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/blivet3/devices/storage.py b/blivet3/devices/storage.py +index df4e9943..c2ec20fe 100644 +--- a/blivet3/devices/storage.py ++++ b/blivet3/devices/storage.py +@@ -294,7 +294,7 @@ class StorageDevice(Device): + raise errors.DeviceError("device has not been created", self.name) + + try: +- udev_device = pyudev.Devices.from_device_file(udev.global_udev, ++ udev_device = pyudev.device.Device.from_device_file(udev.global_udev, + self.path) + + # from_device_file() does not process exceptions but just propagates +diff --git a/blivet3/udev.py b/blivet3/udev.py +index 227399bc..7c7e8f32 100644 +--- a/blivet3/udev.py ++++ b/blivet3/udev.py +@@ -63,9 +63,9 @@ def device_to_dict(device): + def get_device(sysfs_path=None, device_node=None): + try: + if sysfs_path is not None: +- device = pyudev.Devices.from_sys_path(global_udev, sysfs_path) ++ device = pyudev.device.Device.from_sys_path(global_udev, sysfs_path) + elif device_node is not None: +- device = pyudev.Devices.from_device_file(global_udev, device_node) ++ device = pyudev.device.Device.from_device_file(global_udev, device_node) + except pyudev.DeviceNotFoundError as e: + log.error(e) + result = None +-- +2.20.1 + diff --git a/SOURCES/0012-Adapt-device-tags-to-absence-of-enum-in-python2.patch b/SOURCES/0012-Adapt-device-tags-to-absence-of-enum-in-python2.patch new file mode 100644 index 0000000..5dcfa4e --- /dev/null +++ b/SOURCES/0012-Adapt-device-tags-to-absence-of-enum-in-python2.patch @@ -0,0 +1,71 @@ +From ce9c1b55465b261e668951f82532a3bab4077727 Mon Sep 17 00:00:00 2001 +From: David Lehman +Date: Thu, 28 Mar 2019 17:25:00 -0400 +Subject: [PATCH 14/20] Adapt device tags to absence of enum in python2. + +--- + blivet3/devices/lib.py | 19 +++++++++++++++++-- + blivet3/devicetree.py | 2 +- + 2 files changed, 18 insertions(+), 3 deletions(-) + +diff --git a/blivet3/devices/lib.py b/blivet3/devices/lib.py +index 11126349..d32c6be2 100644 +--- a/blivet3/devices/lib.py ++++ b/blivet3/devices/lib.py +@@ -18,8 +18,13 @@ + # + # Red Hat Author(s): David Lehman + # +-from enum import Enum ++try: ++ from enum import Enum ++except ImportError: ++ Enum = None ++ + import os ++import six + + from .. import errors + from .. import udev +@@ -27,7 +32,6 @@ from ..size import Size + + LINUX_SECTOR_SIZE = Size(512) + +- + class Tags(str, Enum): + """Tags that describe various classes of disk.""" + local = 'local' +@@ -37,6 +41,17 @@ class Tags(str, Enum): + ssd = 'ssd' + usb = 'usb' + ++class Py2Tags(object): ++ __members__ = ('local', 'nvdimm', 'remote', 'removable', 'ssd', 'usb') ++ ++ def __getattribute__(self, attr): ++ if attr in Py2Tags.__members__: ++ return attr ++ else: ++ return super(Py2Tags, self).__getattribute__(attr) ++ ++if six.PY2: ++ Tags = Py2Tags() + + def _collect_device_major_data(): + by_major = {} +diff --git a/blivet3/devicetree.py b/blivet3/devicetree.py +index 859ba42e..8790d2e5 100644 +--- a/blivet3/devicetree.py ++++ b/blivet3/devicetree.py +@@ -910,7 +910,7 @@ class DeviceTreeBase(object): + for tag in tags: + if tag not in Tags.__members__: + raise ValueError("unknown ignoredisk tag '@%s' encountered" % tag) +- if Tags(tag) in disk.tags: ++ if tag in disk.tags: + return True + return False + +-- +2.20.1 + diff --git a/SOURCES/0013-Update-factory-example-to-work-w-latest-API.patch b/SOURCES/0013-Update-factory-example-to-work-w-latest-API.patch new file mode 100644 index 0000000..bc5e5b4 --- /dev/null +++ b/SOURCES/0013-Update-factory-example-to-work-w-latest-API.patch @@ -0,0 +1,32 @@ +From 4150b7c1f586280bc76b5372334f4fb299c58f1b Mon Sep 17 00:00:00 2001 +From: David Lehman +Date: Fri, 29 Mar 2019 16:59:22 -0400 +Subject: [PATCH 19/20] Update factory example to work w/ latest API. + +--- + examples/factory.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/examples/factory.py b/examples/factory.py +index e54c1bea..471ad30f 100644 +--- a/examples/factory.py ++++ b/examples/factory.py +@@ -23,13 +23,13 @@ try: + + # create an lv named data in a vg named testvg + device = b.factory_device(blivet.devicefactory.DEVICE_TYPE_LVM, +- Size("50GiB"), disks=[disk1, disk2], ++ size=Size("50GiB"), disks=[disk1, disk2], + fstype="xfs", mountpoint="/data") + print(b.devicetree) + + # change testvg to have an md RAID1 pv instead of partition pvs + device = b.factory_device(blivet.devicefactory.DEVICE_TYPE_LVM, +- Size("50GiB"), disks=[disk1, disk2], ++ size=Size("50GiB"), disks=[disk1, disk2], + fstype="xfs", mountpoint="/data", + container_raid_level="raid1", + device=device) +-- +2.20.1 + diff --git a/SOURCES/0014-Fix-bare-blivet-imports-in-the-examples.patch b/SOURCES/0014-Fix-bare-blivet-imports-in-the-examples.patch new file mode 100644 index 0000000..c42c99d --- /dev/null +++ b/SOURCES/0014-Fix-bare-blivet-imports-in-the-examples.patch @@ -0,0 +1,89 @@ +From e8a5a6ac10922bfe0243877357641629c2d8360f Mon Sep 17 00:00:00 2001 +From: David Lehman +Date: Fri, 29 Mar 2019 17:02:51 -0400 +Subject: [PATCH 20/20] Fix bare blivet imports in the examples. + +--- + examples/factory.py | 2 +- + examples/lvm.py | 2 +- + examples/lvm_cache.py | 2 +- + examples/lvm_non_linear.py | 2 +- + examples/partitioning.py | 2 +- + examples/uevents.py | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/examples/factory.py b/examples/factory.py +index 471ad30f..4ecd83c7 100644 +--- a/examples/factory.py ++++ b/examples/factory.py +@@ -1,6 +1,6 @@ + import os + +-import blivet3 ++import blivet3 as blivet + from blivet3.size import Size + from blivet3.util import set_up_logging, create_sparse_tempfile + +diff --git a/examples/lvm.py b/examples/lvm.py +index 6f736a44..c2a195b6 100644 +--- a/examples/lvm.py ++++ b/examples/lvm.py +@@ -1,6 +1,6 @@ + import os + +-import blivet3 ++import blivet3 as blivet + from blivet3.size import Size + from blivet3.util import set_up_logging, create_sparse_tempfile + +diff --git a/examples/lvm_cache.py b/examples/lvm_cache.py +index 5f1d71ea..33dbd148 100644 +--- a/examples/lvm_cache.py ++++ b/examples/lvm_cache.py +@@ -1,6 +1,6 @@ + import os + +-import blivet3 ++import blivet3 as blivet + from blivet3.size import Size + from blivet3.util import set_up_logging, create_sparse_tempfile + from blivet3.devices.lvm import LVMCacheRequest +diff --git a/examples/lvm_non_linear.py b/examples/lvm_non_linear.py +index 72aa8a09..cd20ca78 100644 +--- a/examples/lvm_non_linear.py ++++ b/examples/lvm_non_linear.py +@@ -1,6 +1,6 @@ + import os + +-import blivet3 ++import blivet3 as blivet + from blivet3.size import Size + from blivet3.util import set_up_logging, create_sparse_tempfile + +diff --git a/examples/partitioning.py b/examples/partitioning.py +index 4174b2ea..00a7f6f8 100644 +--- a/examples/partitioning.py ++++ b/examples/partitioning.py +@@ -1,6 +1,6 @@ + import os + +-import blivet3 ++import blivet3 as blivet + from blivet3.size import Size + from blivet3.util import set_up_logging, create_sparse_tempfile + +diff --git a/examples/uevents.py b/examples/uevents.py +index 31edea8e..b1595dbf 100644 +--- a/examples/uevents.py ++++ b/examples/uevents.py +@@ -1,6 +1,6 @@ + import time + +-import blivet3 ++import blivet3 as blivet + from blivet3.events.manager import event_manager + from blivet3.util import set_up_logging + +-- +2.20.1 + diff --git a/SPECS/python-blivet3.spec b/SPECS/python-blivet3.spec new file mode 100644 index 0000000..2be6543 --- /dev/null +++ b/SPECS/python-blivet3.spec @@ -0,0 +1,223 @@ +%define is_rhel 0%{?rhel} != 0 + +# python3 is not available on RHEL <=7 +%if %{is_rhel} && 0%{?rhel} <= 7 +# disable python3 by default +%bcond_with python3 +%else +%bcond_without python3 +%endif + +# python2 is not available on RHEL > 7 and not needed on Fedora > 28 +%if 0%{?rhel} > 7 || 0%{?fedora} > 28 +# disable python2 by default +%bcond_with python2 +%else +%bcond_without python2 +%endif + +Summary: A python module for system storage configuration +Name: python-blivet3 +Url: https://storageapis.wordpress.com/projects/blivet +Version: 3.1.3 + +#%%global prerelease .b2 +# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 +Release: 3%{?prerelease}%{?dist} +Epoch: 1 +License: LGPLv2+ +Group: System Environment/Libraries +%global realname blivet3 +%global realversion %{version}%{?prerelease} +Source0: http://github.com/storaged-project/blivet/archive/blivet-%{realversion}.tar.gz +Patch0: 0001-Move-blivet-module-package-to-blivet3.patch +Patch1: 0002-Adjust-rpm-spec-file-to-new-blivet3-name.patch +Patch2: 0003-Rename-rpm-spec-file-according-to-new-name.patch +Patch3: 0004-Adjust-Makefile-et-al-to-renamed-package.patch +Patch4: 0005-Adjust-translation-domain-to-match-new-package-name.patch +Patch5: 0006-Update-logging-facility-to-match-new-package-name.patch +Patch6: 0007-Regenerate-translations.patch +Patch7: 0008-Remove-Obsoletes-for-compat-package.patch +Patch8: 0009-Dont-require-python3-for-the-dbus-service.patch +Patch9: 0010-Handle-older-pyudev-w-o-Device.properties.patch +Patch10: 0011-Adapt-to-older-pyudev-API-for-instantiating-Device.patch +Patch11: 0012-Adapt-device-tags-to-absence-of-enum-in-python2.patch +Patch12: 0013-Update-factory-example-to-work-w-latest-API.patch +Patch13: 0014-Fix-bare-blivet-imports-in-the-examples.patch + + +# Versions of required components (done so we make sure the buildrequires +# match the requires versions of things). +%global partedver 1.8.1 +%global pypartedver 3.9 +%global utillinuxver 2.15.1 +%global libblockdevver 2.17 +%global libbytesizever 0.3 +%global pyudevver 0.15 + +BuildArch: noarch + +%description +The python-blivet package is a python module for examining and modifying +storage configuration. + +%package -n %{realname}-data +Summary: Data for the %{realname} python module. + +BuildRequires: systemd + +%description -n %{realname}-data +The %{realname}-data package provides data files required by the %{realname} +python module. + +%if %{with python3} +%package -n python3-%{realname} +Summary: A python3 package for examining and modifying storage configuration. + +%{?python_provide:%python_provide python3-%{realname}} + +BuildRequires: gettext +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +Requires: python3 +Requires: python3-six +Requires: python3-pyudev >= %{pyudevver} +Requires: parted >= %{partedver} +Requires: python3-pyparted >= %{pypartedver} +Requires: libselinux-python3 +Requires: python3-blockdev >= %{libblockdevver} +%if 0%{?rhel} > 7 || 0%{?fedora} +Recommends: libblockdev-btrfs >= %{libblockdevver} +Recommends: libblockdev-crypto >= %{libblockdevver} +Recommends: libblockdev-dm >= %{libblockdevver} +Recommends: libblockdev-kbd >= %{libblockdevver} +Recommends: libblockdev-loop >= %{libblockdevver} +Recommends: libblockdev-lvm >= %{libblockdevver} +Recommends: libblockdev-mdraid >= %{libblockdevver} +Recommends: libblockdev-mpath >= %{libblockdevver} +Recommends: libblockdev-nvdimm >= %{libblockdevver} +Recommends: libblockdev-swap >= %{libblockdevver} +Recommends: libblockdev-s390 >= %{libblockdevver} +%endif +Requires: python3-bytesize >= %{libbytesizever} +Requires: util-linux >= %{utillinuxver} +Requires: lsof +Requires: python3-gobject-base +Requires: systemd-udev +Requires: %{realname}-data = %{epoch}:%{version}-%{release} + +%description -n python3-%{realname} +The python3-%{realname} is a python3 package for examining and modifying storage +configuration. +%endif + +%if %{with python2} +%package -n python2-%{realname} +Summary: A python2 package for examining and modifying storage configuration. + +%{?python_provide:%python_provide python2-%{realname}} + +BuildRequires: gettext +BuildRequires: python2-devel +BuildRequires: python2-setuptools + +Requires: python2 +Requires: python-six +Requires: python-pyudev >= %{pyudevver} +Requires: parted >= %{partedver} +# XXX pyparted can mean both python2 and python3 +Requires: pyparted >= %{pypartedver} +Requires: libselinux-python +Requires: python2-blockdev >= %{libblockdevver} +%if 0%{?rhel} > 7 || 0%{?fedora} +Recommends: libblockdev-btrfs >= %{libblockdevver} +Recommends: libblockdev-crypto >= %{libblockdevver} +Recommends: libblockdev-dm >= %{libblockdevver} +Recommends: libblockdev-fs >= %{libblockdevver} +Recommends: libblockdev-kbd >= %{libblockdevver} +Recommends: libblockdev-loop >= %{libblockdevver} +Recommends: libblockdev-lvm >= %{libblockdevver} +Recommends: libblockdev-mdraid >= %{libblockdevver} +Recommends: libblockdev-mpath >= %{libblockdevver} +Recommends: libblockdev-nvdimm >= %{libblockdevver} +Recommends: libblockdev-part >= %{libblockdevver} +Recommends: libblockdev-swap >= %{libblockdevver} +Recommends: libblockdev-s390 >= %{libblockdevver} +%endif +Requires: python2-bytesize >= %{libbytesizever} +Requires: util-linux >= %{utillinuxver} +Requires: lsof +Requires: python2-hawkey +Requires: %{realname}-data = %{epoch}:%{version}-%{release} + +Requires: udev +Requires: python-gobject-base + +%description -n python2-%{realname} +The python2-%{realname} is a python2 package for examining and modifying storage +configuration. +%endif + +%prep +%autosetup -n blivet-%{realversion} -p1 + +%build +%{?with_python2:make PYTHON=%{__python2}} +%{?with_python3:make PYTHON=%{__python3}} + +%install +%{?with_python2:make PYTHON=%{__python2} DESTDIR=%{buildroot} install} +%{?with_python3:make PYTHON=%{__python3} DESTDIR=%{buildroot} install} + +%find_lang %{realname} + +%files -n %{realname}-data -f %{realname}.lang +%{_sysconfdir}/dbus-1/system.d/* +%{_datadir}/dbus-1/system-services/* +%{_libexecdir}/* +%{_unitdir}/* + +%if %{with python2} +%files -n python2-%{realname} +%license COPYING +%doc README ChangeLog examples +%{python2_sitelib}/* +%endif + +%if %{with python3} +%files -n python3-%{realname} +%license COPYING +%doc README ChangeLog examples +%{python3_sitelib}/* +%endif + +%changelog +* Fri Mar 29 2019 David Lehman - 3.1.3-3 +- spec file requires fixes from pcahyna +- adjust to older pyudev API +- adjust tags implementation to absence of enum in python-2.7 +- fix bare imports in example scripts +- update factory example to match latest API + +* Mon Mar 25 2019 Pavel Cahyna - 3.1.3-2 +- Initial import of python-blivet3 by David Lehman + derived from python-blivet-3.1.2-1 +- clear the old python-blivet %%changelog except the most recent entry. + +* Wed Feb 27 2019 Vojtech Trefny - 3.1.3-1 +- Don't crash if blockdev mpath plugin isn't available. (#1672971) (dlehman) +- iscsi: Add default value to unused 'storage' argument in 'write' (vtrefny) +- Add exported property to LVMVolumeGroupDevice (vtrefny) +- Add VG data to static_data (vtrefny) +- Do not try to get format free space for non-existing formats (vtrefny) +- Do not raise exception if can't get PV free space (vtrefny) +- Fix undefined attribute in LVM info cache (vtrefny) +- Use raw_device to get thinpool device in LVMThinPFactory (#1490174) (vtrefny) +- Do not crash if DM RAID activation fails (#1661712) (vtrefny) +- Remove the unused sysroot property (vponcova) +- Remove unused attributes from the Blivet class (vponcova) +- Remove the unused gpt flag (vponcova) +- Copy the iSCSI initiator name file to the installed system (vtrefny) +- Use udev to determine if disk is a multipath member. (dlehman) +- Require libfc instead of fcoe for offloaded FCoE. (#1575953) (dlehman)