From e2f1b669e3d9a1f44b42a48848c6ea481ba59e3d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 10 2019 10:39:04 +0000 Subject: import python-blivet-3.1.0-12.el8_0 --- diff --git a/SOURCES/0013-Add-flag-for-protecting-cdrom-devices-during-populate.patch b/SOURCES/0013-Add-flag-for-protecting-cdrom-devices-during-populate.patch new file mode 100644 index 0000000..652eb25 --- /dev/null +++ b/SOURCES/0013-Add-flag-for-protecting-cdrom-devices-during-populate.patch @@ -0,0 +1,54 @@ +From ac5646f8e9e59389bdc651c63b5e7dcd2d693bf4 Mon Sep 17 00:00:00 2001 +From: Radek Vykydal +Date: Wed, 22 May 2019 13:35:01 +0200 +Subject: [PATCH] Add flag for protecting cdrom devices during populate + +Resolves: rhbz#1719648 +--- + blivet/devices/optical.py | 14 ++++++++++++++ + blivet/flags.py | 3 +++ + 2 files changed, 17 insertions(+) + +diff --git a/blivet/devices/optical.py b/blivet/devices/optical.py +index b9dba1f2..122825f2 100644 +--- a/blivet/devices/optical.py ++++ b/blivet/devices/optical.py +@@ -24,6 +24,7 @@ + from .. import errors + from .. import util + from ..storage_log import log_method_call ++from ..flags import flags + + import logging + log = logging.getLogger("blivet") +@@ -81,3 +82,16 @@ def eject(self): + util.run_program(["eject", self.name]) + except OSError as e: + log.warning("error ejecting cdrom %s: %s", self.name, e) ++ ++ @property ++ def protected(self): ++ protected = super(OpticalDevice, self).protected ++ ++ if flags.protect_cdroms: ++ return True ++ else: ++ return protected ++ ++ @protected.setter ++ def protected(self, value): ++ self._protected = value +diff --git a/blivet/flags.py b/blivet/flags.py +index 6500be30..a6a78edc 100644 +--- a/blivet/flags.py ++++ b/blivet/flags.py +@@ -77,6 +77,9 @@ def __init__(self): + # (so far only for LUKS) + self.discard_new = False + ++ # whether cdroms should be protected ++ self.protect_cdroms = False ++ + self.boot_cmdline = {} + + self.update_from_boot_cmdline() diff --git a/SPECS/python-blivet.spec b/SPECS/python-blivet.spec index 7f8b96a..8b3431a 100644 --- a/SPECS/python-blivet.spec +++ b/SPECS/python-blivet.spec @@ -23,7 +23,7 @@ Version: 3.1.0 #%%global prerelease .b2 # prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 -Release: 10%{?prerelease}%{?dist} +Release: 12%{?prerelease}%{?dist} Epoch: 1 License: LGPLv2+ Group: System Environment/Libraries @@ -43,6 +43,7 @@ Patch9: 0009-Require-libfc-instead-of-fcoe-for-offloaded-FCoE.-15.patch Patch10: 0010-Use-udev-to-determine-if-disk-is-a-multipath-member.patch Patch11: 0011-Don-t-crash-if-blockdev-mpath-plugin-isn-t-available.patch Patch12: 0012-Ensure-correct-type-of-mpath-cache-member-list.patch +Patch13: 0013-Add-flag-for-protecting-cdrom-devices-during-populate.patch # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -203,6 +204,14 @@ configuration. %endif %changelog +* Wed Aug 14 2019 Vojtech Trefny - 3.1.0-12 +- Rebuild with fixed gating + Related: rhbz#1734318 + +* Wed Aug 14 2019 Vojtech Trefny - 3.1.0-11 +- Add flag for protecting cdrom devices during populate + Resolves: rhbz#1734318 + * Wed Apr 03 2019 David Lehman - 3.1.0-10 - Ensure correct type of mpath cache member list. Related: rhbz#1672971