[anaconda][rhel7-branch/master][PATCH] Don't crash if escrow certificate is requested without network access (#1085265)
by Martin Kolman
Turn the KickstartError to KickstartValueError. The KickstartValueError
is caught when the Storage spoke executes kickstart storage and user
can inspect the error in the Storage spoke info bar and fix it.
Also improve the error message a bit.
Resolves: rhbz#1085265
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
pyanaconda/kickstart.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 7d25840..9f93ce9 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -153,8 +153,8 @@ def getEscrowCertificate(escrowCerts, url):
needs_net = not url.startswith("/") and not url.startswith("file:")
if needs_net and not nm.nm_is_connected():
- msg = _("Escrow certificate %s requires the network.") % url
- raise KickstartError(msg)
+ msg = _("Escrow certificate %s requires network access.") % url
+ raise KickstartValueError(msg)
log.info("escrow: downloading %s", url)
--
1.9.3
9 years, 7 months
[firstboot][PATCH] Handle single multi-page module correctly
by Martin Kolman
When testing a scratchbuild for the upcoming Firstboot build,
I've noticed that Firstboot can find yet another way to break the button
naming - if there is just a single multi page module (Subscription Manager) and not
one single-page (Kdump) followed by a multi-page one (Subscription Manager) as before.
The attached patch fixes this.
(I think this also nicely demonstrates the robustness of the Firstboot codebase. :))
Martin Kolman (1):
Handle next button naming also if there is only one module (#1107887)
firstboot/interface.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--
1.9.3
9 years, 7 months
[PATCH rhel7-branch] network: add support for bridge (#1075195)
by Radek Vykydal
Related: rhbz#1075195
---
share/runtime-cleanup.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/share/runtime-cleanup.tmpl b/share/runtime-cleanup.tmpl
index 1bd5968..cb0ccdd 100644
--- a/share/runtime-cleanup.tmpl
+++ b/share/runtime-cleanup.tmpl
@@ -77,7 +77,7 @@ remove /usr/share/icons/*/icon-theme.cache
<%
removekmods = """
sound drivers/media drivers/hwmon drivers/video
-net/atm net/bluetooth net/sched net/sctp net/bridge
+net/atm net/bluetooth net/sched net/sctp
net/rds net/l2tp net/decnet net/netfilter net/ipv4 net/ipv6
drivers/watchdog drivers/target drivers/rtc drivers/input/joystick
drivers/bluetooth drivers/hid drivers/edac drivers/staging
--
1.9.3
9 years, 7 months
[rhel7-branch][master] storage errors in kickstart (#1072285)
by David Lehman
The first patch cleans up error detection for new btrfs devices so it uses
the existing framework in pyanaconda.kickstart. The second catches errors
encountered when instantiating other devices and formats in kickstart to
improve error handling in those cases..
9 years, 7 months
[anaconda][rhel7-branch/master][PATCH] Fix Welcome spoke not showing up during kickstart installation
by Martin Kolman
The data.lang.lang variable is set to the default language value
early in Anaconda startup, so it is ever equal to "" in the Welcome
spoke.
So check also the seen property of data.lang to discern the default value from
value set by the current kickstart.
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
pyanaconda/ui/gui/spokes/welcome.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py
index 5ffe84c..548dd02 100644
--- a/pyanaconda/ui/gui/spokes/welcome.py
+++ b/pyanaconda/ui/gui/spokes/welcome.py
@@ -136,7 +136,7 @@ class WelcomeLanguageSpoke(LangLocaleHandler, StandaloneSpoke):
@property
def completed(self):
- if flags.flags.automatedInstall:
+ if flags.flags.automatedInstall and self.data.lang.seen:
return self.data.lang.lang and self.data.lang.lang != ""
else:
return False
--
1.9.3
9 years, 7 months
[rhel7/master] Protect protected devices in custom spoke (#1052883)
by Brian C. Lane
A protected partition may be shown in custom, but it should not be
possible to remove it. This makes sure that the remove button is set to
the mountpoint's state when the page header is clicked.
Make sure the 'delete all' on other partitions of the disk don't delete
the protected partition by checking in _destroy_device, also exit early
if there was a failure, it doesn't seem like a good idea to continue
with the rest of the method if there was an error.
Also make sure the protected device cannot be resized by making the
_sizeEntry insensitive.
Resolves: rhbz#1052883
---
pyanaconda/packaging/yumpayload.py | 3 +++
pyanaconda/ui/gui/spokes/custom.py | 8 +++++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 1516cbb..8efbc50 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -826,6 +826,9 @@ reposdir=%s
if not method.method:
method.method = "cdrom"
self._setUpMedia(self.install_device)
+
+ # Make sure Blivet doesn't unmount it
+ self.install_device.protected = True
url = "file://" + INSTALL_TREE
elif method.method == "cdrom":
raise PayloadSetupError("no usable optical media found")
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index e0566ef..60a1cff 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -2091,7 +2091,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# new devices that are not btrfs subvolumes.
# Do this after the device type combo is set since
# on_device_type_changed doesn't account for device existence.
- fancy_set_sensitive(self._sizeEntry, device.resizable or (not device.exists and device.format.type != "btrfs"))
+ fancy_set_sensitive(self._sizeEntry, (device.resizable and not device.protected) \
+ or (not device.exists and device.format.type != "btrfs"))
if self._sizeEntry.get_sensitive():
self._sizeEntry.props.has_tooltip = False
@@ -2359,6 +2360,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
with ui_storage_logger():
is_logical_partition = getattr(device, "isLogical", False)
try:
+ if device.protected:
+ raise StorageError("Device %s is protected" % device.name)
if device.isDisk:
self.__storage.initializeDisk(device)
elif device.direct and not device.isleaf:
@@ -2375,6 +2378,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self.set_warning(_("Device removal request failed. Click "
"for details."))
self.window.show_all()
+ return
else:
if is_logical_partition:
self.__storage.removeEmptyExtendedPartitions()
@@ -2842,8 +2846,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# instead of device/mountpoint details.
self._partitionsNotebook.set_current_page(NOTEBOOK_LABEL_PAGE)
self._removeButton.set_sensitive(False)
- else:
- self._removeButton.set_sensitive(True)
def _do_autopart(self):
"""Helper function for on_create_clicked.
--
1.9.3
9 years, 7 months
[PATCH] Fix pylint problem for #1066988.
by Samantha N. Bueno
Related: rhbz#1066988
---
pyanaconda/ui/tui/spokes/__init__.py | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py
index 76bed4b..1a6b718 100644
--- a/pyanaconda/ui/tui/spokes/__init__.py
+++ b/pyanaconda/ui/tui/spokes/__init__.py
@@ -127,14 +127,13 @@ class EditTUIDialog(NormalTUISpoke):
error = _("The password you have provided is weak")
except PWQError as e:
error = e[1]
- finally:
- if error:
- error = _("You have provided a weak password: %s. ") % error
- error += _("\nWould you like to use it anyway?")
- question_window = YesNoDialog(self._app, error)
- self._app.switch_screen_modal(question_window)
- if not question_window.answer:
- return None
+ if error:
+ error = _("You have provided a weak password: %s. ") % error
+ error += _("\nWould you like to use it anyway?")
+ question_window = YesNoDialog(self._app, error)
+ self._app.switch_screen_modal(question_window)
+ if not question_window.answer:
+ return None
self.value = cryptPassword(pw)
return None
--
1.9.3
9 years, 7 months
[PATCH rhel7-branch] network: display only actual fqdn of ip we offer for vnc connection (#1089429)
by Radek Vykydal
Not just current hostname of the host (which can be eg bound to ip of
another active interface, as in the bz).
Resolves: rhbz#1089429
---
pyanaconda/vnc.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/vnc.py b/pyanaconda/vnc.py
index 787a211..2b21fa4 100644
--- a/pyanaconda/vnc.py
+++ b/pyanaconda/vnc.py
@@ -120,7 +120,9 @@ class VncServer:
if self.ip.find(':') != -1:
ipstr = "[%s]" % (self.ip,)
- if (self.name is not None) and (not self.name.startswith('localhost')) and (ipstr is not None):
+ name_ips = [i[4][0] for i in socket.getaddrinfo(self.name, 0)]
+ if (self.name is not None) and (not self.name.startswith('localhost')) \
+ and (ipstr is not None) and self.ip in name_ips:
self.connxinfo = "%s:%s (%s:%s)" % (socket.getfqdn(name=self.name), self.display, ipstr, self.display)
elif ipstr is not None:
self.connxinfo = "%s:%s" % (ipstr, self.display,)
--
1.9.3
9 years, 7 months
[master/rhel7-branch] Fix PWQError issue when checking TUI passwords. (#1066988)
by Samantha N. Bueno
PWQErrors are tuples, so when we raise PWQError, we should also treat
it as a tuple, or else incur a traceback when trying to fetch/display
an error message.
Related: rhbz#1066988
---
pyanaconda/ui/tui/spokes/__init__.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py
index 3b48a2a..b40b08f 100644
--- a/pyanaconda/ui/tui/spokes/__init__.py
+++ b/pyanaconda/ui/tui/spokes/__init__.py
@@ -124,7 +124,8 @@ class EditTUIDialog(NormalTUISpoke):
return None
strength = checkPassword(pw)
if strength < 50:
- raise PWQError("The password you have provided is weak.")
+ # this is so stupid
+ raise PWQError(-1, "The password you have provided is weak.")
except PWQError as e:
error = _("You have provided a weak password: %s. ") % e[1]
error += _("\nWould you like to use it anyway?")
--
1.9.3
9 years, 7 months