[PATCH] ntfs _getSize needs to use Decimal (#1063077)
by Brian C. Lane
---
blivet/formats/fs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 4072870..2e2faeb 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -1393,7 +1393,7 @@ class NTFS(FS):
log.warning("Unable to discover minimum size of filesystem "
"on %s" %(self.device,))
else:
- size = min(minSize * 1.1, minSize + 500, self.currentSize)
+ size = min(minSize * Decimal('1.1'), minSize + 500, self.currentSize)
if minSize < size:
log.debug("padding min size from %d up to %d" % (minSize, size))
else:
--
1.8.5.3
10 years, 3 months
[master/rhel7-branch] Automatically reboot after successful cmdline installation. (#1056507)
by Samantha N. Bueno
This prevents a traceback from occurring if installing in cmdline
mode since, at the end of installation, users are prompted for
input to agree to the EULA.
Resolves: rhbz#1056507
---
pyanaconda/ui/tui/hubs/progress.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pyanaconda/ui/tui/hubs/progress.py b/pyanaconda/ui/tui/hubs/progress.py
index 032ebd9..2edb497 100644
--- a/pyanaconda/ui/tui/hubs/progress.py
+++ b/pyanaconda/ui/tui/hubs/progress.py
@@ -121,6 +121,10 @@ class ProgressHub(TUIHub):
# Just pretend like we got input, and our input doesn't care
# what it gets, it just quits.
self.input(None, None)
+ # cmdline mode, continue automatically
+ if flags.automatedInstall and "RUNKS" in flags.cmdline:
+ # As above, pretend like we got input and just quit
+ self.input(None, None)
return True
--
1.8.3.1
10 years, 3 months
[rhel7-branch/master][PATCH] Proper package download retry handling
by Martin Kolman
As you can see from the commit message, our current retry handing is not that optimal
and the patch tries to fix it.
In short, it sets an upper limit for the number of retries (3) and waits some time
between retries (3 seconds). These are the same constants that are used for retry handling in RHEL6.
Martin Kolman (1):
Properly retry package downloads (#924860)
scripts/anaconda-yum | 63 ++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 51 insertions(+), 12 deletions(-)
--
1.8.5.3
10 years, 3 months
[lorax/rhel7-branch] Remove floppy and scsi_debug from initrd (#1060691)
by Brian C. Lane
ppc64 can't PXE boot a initrd that is > 32M. This removes 2 drivers from
initrd creation to reduce the size.
---
src/pylorax/__init__.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py
index 285448a..894e15b 100644
--- a/src/pylorax/__init__.py
+++ b/src/pylorax/__init__.py
@@ -292,7 +292,8 @@ class Lorax(BaseLoraxClass):
templatedir=templatedir)
logger.info("rebuilding initramfs images")
- dracut_args = ["--xz", "--install", "/.buildstamp"]
+ dracut_args = ["--xz", "--install", "/.buildstamp",
+ "--omit-drivers", "floppy scsi_debug"]
anaconda_args = dracut_args + ["--add", "anaconda pollcdrom"]
treebuilder.rebuild_initrds(add_args=anaconda_args)
--
1.8.4.2
10 years, 3 months
[PATCH rhel7-branch] Provide syntax for specifying environments (#1061296).
by Chris Lumens
---
pykickstart/parser.py | 14 ++++++++++--
tests/parser/packages.py | 56 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 68 insertions(+), 2 deletions(-)
diff --git a/pykickstart/parser.py b/pykickstart/parser.py
index 170894d..d778eeb 100644
--- a/pykickstart/parser.py
+++ b/pykickstart/parser.py
@@ -263,6 +263,8 @@ class Packages(KickstartObject):
addBase -- Should the Base group be installed even if it is
not specified?
default -- Should the default package set be selected?
+ environment -- What base environment should be selected? Only one
+ may be chosen at a time.
excludedList -- A list of all the packages marked for exclusion in
the %packages section, without the leading minus
symbol.
@@ -289,6 +291,7 @@ class Packages(KickstartObject):
self.addBase = True
self.default = False
+ self.environment = None
self.excludedList = []
self.excludedGroupList = []
self.excludeDocs = False
@@ -304,6 +307,9 @@ class Packages(KickstartObject):
pkgs = ""
if not self.default:
+ if self.environment:
+ pkgs += "@^%s" % self.environment
+
grps = self.groupList
grps.sort()
for grp in grps:
@@ -382,10 +388,14 @@ class Packages(KickstartObject):
for pkg in pkgList:
stripped = pkg.strip()
- if stripped[0] == "@":
+ if stripped[0:2] == "@^":
+ self.environment = stripped[2:]
+ elif stripped[0] == "@":
self._processGroup(stripped[1:])
elif stripped[0] == "-":
- if stripped[1] == "@":
+ if stripped[1:3] == "@^" and self.environment == stripped[3:]:
+ self.environment = None
+ elif stripped[1] == "@":
excludedGroupList.append(Group(name=stripped[2:]))
else:
newExcludedSet.add(stripped[1:])
diff --git a/tests/parser/packages.py b/tests/parser/packages.py
index be1d249..560a59f 100644
--- a/tests/parser/packages.py
+++ b/tests/parser/packages.py
@@ -51,5 +51,61 @@ bash
self.parser.readKickstartFromString(self.ks)
self.assertEqual(len(w), 0)
+class Packages_Contains_Environment_1_TestCase(ParserTest):
+ ks = """
+%packages
+@^whatever-environment
+%end
+"""
+
+ def runTest(self):
+ with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter("always")
+ self.parser.readKickstartFromString(self.ks)
+ self.assertEqual(self.handler.packages.environment, "whatever-environment")
+
+class Packages_Contains_Environment_2_TestCase(ParserTest):
+ ks = """
+%packages
+@^whatever-environment
+@^another-environment
+%end
+"""
+
+ def runTest(self):
+ with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter("always")
+ self.parser.readKickstartFromString(self.ks)
+ self.assertEqual(self.handler.packages.environment, "another-environment")
+
+class Packages_Contains_Environment_3_TestCase(ParserTest):
+ ks = """
+%packages
+@^whatever-environment
+-@^another-environment
+%end
+"""
+
+ def runTest(self):
+ with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter("always")
+ self.parser.readKickstartFromString(self.ks)
+ self.assertEqual(self.handler.packages.environment, "whatever-environment")
+
+class Packages_Contains_Environment_4_TestCase(ParserTest):
+ ks = """
+%packages
+@^whatever-environment
+-@^whatever-environment
+@^another-environment
+%end
+"""
+
+ def runTest(self):
+ with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter("always")
+ self.parser.readKickstartFromString(self.ks)
+ self.assertEqual(self.handler.packages.environment, "another-environment")
+
if __name__ == "__main__":
unittest.main()
--
1.8.3.1
10 years, 3 months
[anaconda:rhel7/master 0/8] Don't rebuke user for not having set a password until we actually give them a chance to (v2)
by Anne Mulhern
Compared to v1 the most significant change is dealing with a sanityCheck that
returns a single list instead of a pair of lists.
The other change is trying to avoid prompting the user for a passphrase the
second time they click Done.
There was a previous bug, where kickstart install didn't stop to prompt for a
LUKS password because sanityCheck didn't check if one was there. Unfortunately,
in GUI there are places where sanityCheck is called before user has a chance
to set a password and sometimes before there is any reason even to give them
a chance without making them extremely busy knocking down password dialogs.
I admit I'm still deeply in favor of making prompting for LUKS password have
nothing to do with flow through custom and storage screens. A separate hardware
security hub is still an exciting idea to me. Alternatively, if they check
encrypt checkbox, enable a button "Set LUKS Password" which they can click at
any time, but must have clicked before leaving storage spoke.
Requires some blivet changes, will bump version as appropriate.
The breakdown is:
Removed unused...trivial.
Add sanityCheck...pretty mechanical.
Adapt StorageChecker class...pretty mechanical.
Adapt to new blivet.sanityCheck()...pretty mechanical.
Do not consider no available...a real change, here.
Remove some unnecessary resets...a simple change, but I may be wrong.
Handle LUKS passphrase...pretty important, but fairly obvious, I think. The
important addition is actually setting the passphrase on the format object
where necessary.
Make sure LUKS devices can...this is important, because not only must we
prompt for a passphrase before sanity checking, but also we must actually
set the value for the luks format device.
mulhern (8):
Removed unused ErrorRecoveryFailure import (#1060255)
Add sanityCheck functionality back into AutoPart.execute() (#1060255)
Adapt StorageChecker class for changed return type of sanityCheck
(#1060255)
Adapt to new blivet.sanityCheck() return type (#1060255)
Do not consider no available LUKS passphrase an error in do_autopart
(#1060255)
Remove some unnecessary resets (#1060255)
Handle LUKS passphrase before doing sanity check (#1060255)
Make sure LUKS devices can say they have a key (#1060255)
pyanaconda/kickstart.py | 2 ++
pyanaconda/ui/gui/spokes/custom.py | 62 +++++++++++++++++++++++++++----------
pyanaconda/ui/gui/spokes/storage.py | 24 ++++++++++----
pyanaconda/ui/tui/spokes/storage.py | 13 +++++---
4 files changed, 75 insertions(+), 26 deletions(-)
--
1.8.3.1
10 years, 3 months
[blivet:rhel7/master 0/4] Change sanity checking to handle more diverse calling contexts (v2)
by Anne Mulhern
This is a setup in blivet for an anaconda bug fix. The really significant
changes are:
1) sanityCheck now returns a list of SanityExceptions instead of strings
2) sanityCheck is no longer called from doAutoPartition
Except for the first patch, the changes from v1 are fairly significant.
They all spring from using types of exceptions instead of separate lists
to distinguish warnings from errors.
mulhern (4):
Remove unused exception class (#1060255)
Make a small SanityException hierarchy (#1060255)
Change messages to SanityExceptions objects (#1060255)
Separate sanityCheck-ing from doAutoPartition (#1060255)
blivet/__init__.py | 122 +++++++++++++++++++++----------------------------
blivet/errors.py | 16 +++++--
blivet/partitioning.py | 23 ++++++++--
3 files changed, 84 insertions(+), 77 deletions(-)
--
1.8.3.1
10 years, 3 months
[PATCH] Mark language search string translatable. (#955229)
by Samantha N. Bueno
---
pyanaconda/ui/gui/spokes/welcome.glade | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/welcome.glade b/pyanaconda/ui/gui/spokes/welcome.glade
index f0a4602..4f79b7c 100644
--- a/pyanaconda/ui/gui/spokes/welcome.glade
+++ b/pyanaconda/ui/gui/spokes/welcome.glade
@@ -367,7 +367,7 @@
<property name="invisible_char">●</property>
<property name="invisible_char_set">True</property>
<property name="secondary_icon_name">edit-clear-symbolic</property>
- <property name="placeholder_text">Type here to search.</property>
+ <property name="placeholder_text" translatable="yes">Type here to search.</property>
<signal name="changed" handler="on_entry_changed" swapped="no"/>
<signal name="icon-release" handler="on_clear_icon_clicked" swapped="no"/>
</object>
--
1.7.11.7
10 years, 3 months
[PATCH rhel7-branch] network: adapt to changed handling of devices without carrier in NM (#1062417)
by Radek Vykydal
Resolves: rhbz#1062417
NM changed handling of devices without carrier in
commit 9d0022944730b6f97ab27c18895502346e2c2245
Basically they are in DISCONNECTED state instead of UNAVAILABLE now.
---
pyanaconda/nm.py | 9 +++++++++
pyanaconda/ui/gui/spokes/network.py | 11 ++++++-----
pyanaconda/ui/tui/spokes/network.py | 4 ++--
3 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py
index ceeb8fb..3bfbaa9 100644
--- a/pyanaconda/nm.py
+++ b/pyanaconda/nm.py
@@ -68,6 +68,12 @@ class UnknownMethodGetError(Exception):
def __str__(self):
return self.__repr__()
+# bug #1062417 e.g. for ethernet device without link
+class UnknownConnectionError(Exception):
+ """Connection is not available for the device"""
+ def __str__(self):
+ return self.__repr__()
+
def _get_proxy(bus_type=Gio.BusType.SYSTEM,
flags=Gio.DBusProxyFlags.NONE,
info=None,
@@ -653,6 +659,7 @@ def nm_activate_device_connection(dev_name, con_uuid):
:raise UnmanagedDeviceError: if device is not managed by NM
or unavailable
:raise SettingsNotFoundError: if conneciton with given uuid was not found
+ :raise UnknownConnectionError: if connection is not available for the device
"""
if dev_name is None:
@@ -677,6 +684,8 @@ def nm_activate_device_connection(dev_name, con_uuid):
except GLib.GError as e:
if "org.freedesktop.NetworkManager.UnmanagedDevice" in e.message:
raise UnmanagedDeviceError(dev_name, e)
+ elif "org.freedesktop.NetworkManager.UnknownConnection" in e.message:
+ raise UnknownConnectionError(dev_name, e)
raise
def nm_add_connection(values):
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index 96a1bc5..c7c6ce1 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -97,13 +97,14 @@ def localized_string_of_device_state(device, state):
str = _("Unavailable")
elif device.get_firmware_missing():
str = _("Firmware missing")
- elif (device.get_device_type() == NetworkManager.DeviceType.ETHERNET
- and not device.get_carrier()):
- str = _("Cable unplugged")
else:
str = _("Unavailable")
elif state == NetworkManager.DeviceState.DISCONNECTED:
- str = _("Disconnected")
+ if (device.get_device_type() == NetworkManager.DeviceType.ETHERNET
+ and not device.get_carrier()):
+ str = _("Cable unplugged")
+ else:
+ str = _("Disconnected")
elif state in (NetworkManager.DeviceState.PREPARE,
NetworkManager.DeviceState.CONFIG,
NetworkManager.DeviceState.IP_CONFIG,
@@ -591,7 +592,7 @@ class NetworkControlBox(GObject.GObject):
return
try:
nm.nm_activate_device_connection(dev_name, dev_cfg.con_uuid)
- except (nm.UnmanagedDeviceError, nm.UnknownDeviceError) as e:
+ except (nm.UnmanagedDeviceError, nm.UnknownDeviceError, nm.UnknownConnectionError) as e:
log.debug("network: on_device_off_toggled: %s" % e)
else:
try:
diff --git a/pyanaconda/ui/tui/spokes/network.py b/pyanaconda/ui/tui/spokes/network.py
index 20ad2af..c0d11ab 100644
--- a/pyanaconda/ui/tui/spokes/network.py
+++ b/pyanaconda/ui/tui/spokes/network.py
@@ -27,7 +27,7 @@ from pyanaconda.ui.tui.spokes import EditTUISpokeEntry as Entry
from pyanaconda.ui.tui.simpleline import TextWidget, ColumnWidget
from pyanaconda.i18n import N_, _
from pyanaconda import network
-from pyanaconda.nm import nm_activated_devices, nm_state, nm_devices, nm_device_type_is_ethernet, nm_device_ip_config, nm_activate_device_connection, nm_device_setting_value, UnmanagedDeviceError
+from pyanaconda.nm import nm_activated_devices, nm_state, nm_devices, nm_device_type_is_ethernet, nm_device_ip_config, nm_activate_device_connection, nm_device_setting_value, UnmanagedDeviceError, UnknownConnectionError
# pylint: disable-msg=E0611
from gi.repository import NetworkManager
@@ -195,7 +195,7 @@ class NetworkSpoke(EditTUISpoke):
uuid = nm_device_setting_value(devname, "connection", "uuid")
try:
nm_activate_device_connection(devname, uuid)
- except UnmanagedDeviceError:
+ except (UnmanagedDeviceError, UnknownConnectionError):
self.errors.append(_("Can't apply configuration, device activation failed."))
self.apply()
--
1.7.11.7
10 years, 3 months
[PATCH] blivet no longer has a protectedDevices property.
by Chris Lumens
---
pyanaconda/ui/gui/spokes/lib/refresh.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/refresh.py b/pyanaconda/ui/gui/spokes/lib/refresh.py
index 2b61cf7..396c38f 100644
--- a/pyanaconda/ui/gui/spokes/lib/refresh.py
+++ b/pyanaconda/ui/gui/spokes/lib/refresh.py
@@ -89,9 +89,8 @@ class RefreshDialog(GUIObject):
self._notebook.set_current_page(1)
# And now to fire up the storage reinitialization.
- protectedNames = map(lambda d: d.name, self.storage.protectedDevices)
threadMgr.add(AnacondaThread(name=constants.THREAD_STORAGE, target=storageInitialize,
- args=(self.storage, self.data, protectedNames)))
+ args=(self.storage, self.data, self.storage.devicetree.protectedDevNames)))
self._elapsed = 0
--
1.8.3.1
10 years, 3 months