[rhel7-branch/master] Attempt to fix traceback with unset NFS server
by Vratislav Podzimek
If user enters the NFS repo TUI screen and enters 'c' to continue, there
shouldn't be a traceback. However, I'm not sure about removing that return
statement from the code because I don't understand its purpose.
Vratislav Podzimek (1):
Do not try to setup None NFS repository (#1028699)
pyanaconda/packaging/yumpayload.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
1.8.4.2
10 years, 7 months
[PATCH] warn if vnc passwd is longer than 8 chars
by Mark Hamzy
VNC passwords can be no longer than 8 characters. If more than 8 characters are
used then only the first 8 will match which will cause a security issue.
---
pyanaconda/ui/tui/spokes/askvnc.py | 4 ++++
pyanaconda/vnc.py | 9 +++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/tui/spokes/askvnc.py b/pyanaconda/ui/tui/spokes/askvnc.py
index d97763e..181778d 100644
--- a/pyanaconda/ui/tui/spokes/askvnc.py
+++ b/pyanaconda/ui/tui/spokes/askvnc.py
@@ -146,6 +146,10 @@ class VNCPassSpoke(NormalTUISpoke):
print _("The password must be at least "
"six characters long.")
return None
+ elif len(p1) > 8:
+ print _("The password cannot be more than "
+ "eight characters long.")
+ return None
else:
self._password = p1
self.apply()
diff --git a/pyanaconda/vnc.py b/pyanaconda/vnc.py
index 85b729b..55c7055 100644
--- a/pyanaconda/vnc.py
+++ b/pyanaconda/vnc.py
@@ -199,7 +199,7 @@ class VncServer:
stdoutLog.critical("Could not initialize the VNC server: %s", e)
sys.exit(1)
- if self.password and len(self.password) < 6:
+ if self.password and (len(self.password) < 6 or len(self.password) > 8):
self.changeVNCPasswdWindow()
if not self.password:
@@ -262,11 +262,12 @@ class VncServer:
def changeVNCPasswdWindow(self):
""" Change the password to a sane parameter.
- We ask user to input a password that len(password) > 6
- or password == ''.
+ We ask user to input a password that (len(password) > 6
+ and len(password) <= 8) or password == ''.
"""
- message = _("VNC password provided was not at least 6 characters long.\n"
+ message = _("VNC password provided was not at least 6 characters long. "
+ "or more than 8 characters long.\n"
"Please enter a new one. Leave blank for no password.")
app = App("VNC PASSWORD")
spoke = VNCPassSpoke(app, self.anaconda.ksdata, None, None, None,
--
1.8.1.4
10 years, 7 months
[rhel7-branch][PATCH] Network protocols don't list Closest mirror first (#1028697)
by Vratislav Podzimek
On rhel7-branch, the Closest mirror option is listed last (if listed), so
protocol numbers start from 1.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/tui/spokes/source.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/tui/spokes/source.py b/pyanaconda/ui/tui/spokes/source.py
index fcec1d7..7167361 100644
--- a/pyanaconda/ui/tui/spokes/source.py
+++ b/pyanaconda/ui/tui/spokes/source.py
@@ -371,11 +371,11 @@ class SpecifyRepoSpoke(SourceSwitchHandler, EditTUISpoke):
def apply(self):
""" Apply all of our changes. """
url = None
- if self.selection == 2 and not self.args.url.startswith("http://"):
+ if self.selection == 1 and not self.args.url.startswith("http://"):
url = "http://" + self.args.url
- elif self.selection == 3 and not self.args.url.startswith("https://"):
+ elif self.selection == 2 and not self.args.url.startswith("https://"):
url = "https://" + self.args.url
- elif self.selection == 4 and not self.args.url.startswith("ftp://"):
+ elif self.selection == 3 and not self.args.url.startswith("ftp://"):
url = "ftp://" + self.args.url
else:
# protocol either unknown or entry already starts with a protocol
--
1.8.4.2
10 years, 7 months
[master/f20/rhel7] use deepcopy on ksdata method (#1028243)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
Once the method was changed it was blowing up while trying to clean up
the iso usage. This also resets the iso state and button when switching
to another method.
---
pyanaconda/ui/gui/spokes/source.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index e93e313..3ffa7ee 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -313,7 +313,7 @@ class SourceSpoke(NormalSpoke):
"""
import copy
- old_source = copy.copy(self.data.method)
+ old_source = copy.deepcopy(self.data.method)
if self._autodetectButton.get_active():
if not self._cdrom:
@@ -414,6 +414,10 @@ class SourceSpoke(NormalSpoke):
# If the user moved from an HDISO method to some other, we need to
# clear the protected bit on that device.
if old_source.method == "harddrive" and old_source.partition:
+ self._currentIsoFile = None
+ self._isoChooserButton.set_label(self._origIsoChooserButton)
+ self._isoChooserButton.set_use_underline(True)
+
if old_source.partition in self.storage.config.protectedDevSpecs:
self.storage.config.protectedDevSpecs.remove(old_source.partition)
@@ -536,6 +540,7 @@ class SourceSpoke(NormalSpoke):
self._urlEntry = self.builder.get_object("urlEntry")
self._protocolComboBox = self.builder.get_object("protocolComboBox")
self._isoChooserButton = self.builder.get_object("isoChooserButton")
+ self._origIsoChooserButton = self._isoChooserButton.get_label()
self._mirrorlistCheckbox = self.builder.get_object("mirrorlistCheckbox")
--
1.8.3.1
10 years, 7 months
[master/f20/rhel7] Change source spoke proxy handling to use local copy (#967805)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
The ProxyDialog was using self.data.method.proxy, but if the method has
been changed that will be the wrong one to use.
Instead use a source spoke variable to keep track of the proxy url, pass
this to the dialog for editing (or creation) and set it on the correct
methods in _method_changed.
---
pyanaconda/ui/gui/spokes/source.py | 33 ++++++++++++++++++---------------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index e93e313..4ff558a 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -70,8 +70,9 @@ class ProxyDialog(GUIObject):
mainWidgetName = "proxyDialog"
uiFile = "spokes/source.glade"
- def __init__(self, data):
+ def __init__(self, data, proxy_url):
GUIObject.__init__(self, data)
+ self.proxyUrl = proxy_url
self._proxyCheck = self.builder.get_object("enableProxyCheck")
self._proxyInfoBox = self.builder.get_object("proxyInfoBox")
@@ -89,7 +90,7 @@ class ProxyDialog(GUIObject):
# If the user unchecked the proxy entirely, that means they want it
# disabled.
if not self._proxyCheck.get_active():
- self.data.method.proxy = ""
+ self.proxyUrl = ""
self.window.destroy()
return
@@ -103,11 +104,11 @@ class ProxyDialog(GUIObject):
try:
proxy = ProxyString(url=url, username=username, password=password)
- self.data.method.proxy = proxy.url
+ self.proxyUrl = proxy.url
except ProxyStringError as e:
log.error("Failed to parse proxy for ProxyDialog Add - %s:%s@%s: %s", username, password, url, e)
# TODO - tell the user they entered an invalid proxy and let them retry
- self.data.method.proxy = ""
+ self.proxyUrl = ""
self.window.destroy()
@@ -120,8 +121,7 @@ class ProxyDialog(GUIObject):
def refresh(self):
GUIObject.refresh(self)
-
- if not (hasattr(self.data.method, "proxy") and self.data.method.proxy):
+ if not self.proxyUrl:
self._proxyCheck.set_active(False)
self.on_proxy_enable_toggled(self._proxyCheck)
self._authCheck.set_active(False)
@@ -129,14 +129,14 @@ class ProxyDialog(GUIObject):
return
try:
- proxy = ProxyString(self.data.method.proxy)
+ proxy = ProxyString(self.proxyUrl)
if proxy.username:
self._proxyUsernameEntry.set_text(proxy.username)
if proxy.password:
self._proxyPasswordEntry.set_text(proxy.password)
self._proxyURLEntry.set_text(proxy.noauth_url)
except ProxyStringError as e:
- log.error("Failed to parse proxy for ProxyDialog.refresh %s: %s", self.data.method.proxy, e)
+ log.error("Failed to parse proxy for ProxyDialog.refresh %s: %s", self.proxyUrl, e)
return
self._proxyCheck.set_active(True)
@@ -293,6 +293,7 @@ class SourceSpoke(NormalSpoke):
self._currentIsoFile = None
self._ready = False
self._error = False
+ self._proxyUrl = ""
self._proxyChange = False
self._cdrom = None
@@ -348,6 +349,7 @@ class SourceSpoke(NormalSpoke):
elif self._mirror_active():
# this preserves the url for later editing
self.data.method.method = None
+ self.data.method.proxy = self._proxyUrl
if not old_source.method and self.payload.getBaseRepo(wait=True) and \
not self._proxyChange:
return False
@@ -379,6 +381,7 @@ class SourceSpoke(NormalSpoke):
return False
self.data.method.method = "url"
+ self.data.method.proxy = self._proxyUrl
if mirrorlist:
self.data.method.mirrorlist = url
self.data.method.url = ""
@@ -703,6 +706,7 @@ class SourceSpoke(NormalSpoke):
self._urlEntry.set_sensitive(True)
self._urlEntry.set_text(proto[l:])
self._mirrorlistCheckbox.set_active(bool(self.data.method.mirrorlist))
+ self._proxyUrl = self.data.method.proxy
elif self.data.method.method == "nfs":
self._networkButton.set_active(True)
self._protocolComboBox.set_active(PROTOCOL_NFS)
@@ -730,6 +734,7 @@ class SourceSpoke(NormalSpoke):
else:
self._networkButton.set_active(True)
self.data.method.method = None
+ self._proxyUrl = self.data.method.proxy
self._setup_no_updates()
@@ -820,16 +825,14 @@ class SourceSpoke(NormalSpoke):
self._verifyIsoButton.set_sensitive(True)
def on_proxy_clicked(self, button):
- if not hasattr(self.data.method, "proxy"):
- old_proxy = None
- else:
- old_proxy = self.data.method.proxy
-
- dialog = ProxyDialog(self.data)
+ dialog = ProxyDialog(self.data, self._proxyUrl)
with enlightbox(self.window, dialog.window):
dialog.refresh()
dialog.run()
- self._proxyChange = old_proxy != self.data.method.proxy
+
+ if self._proxyUrl != dialog.proxyUrl:
+ self._proxyChange = True
+ self._proxyUrl = dialog.proxyUrl
def on_verify_iso_clicked(self, button):
p = self._get_selected_partition()
--
1.8.3.1
10 years, 7 months
[master/f20/rhel7] Change XFS maximum to 1000T (#1016035)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
Resolves: rhbz#1016035
---
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 a360858..addb16a 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -1189,7 +1189,7 @@ class XFS(FS):
_defaultFormatOptions = ["-f"]
_defaultLabelOptions = ["-L"]
_maxLabelChars = 16
- _maxSize = 100 * 1024 * 1024
+ _maxSize = 1000 * 1024 * 1024
_formattable = True
_linuxNative = True
_supported = True
--
1.8.3.1
10 years, 7 months
[PATCH 0/2] v2 of getBaseRepo/preconf patches
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
Patch 1 is slightly different from the original in that it reverts to current
behavior in the software spoke init and only checks payload md thread if
kickstarted. Patch #2 takes care of potential preconf collisions. I'm pretty sure.
I have tested these against DVD and netinst with and without askmethod cmdline arg.
There are some other bugs that may show up but are pre-existing:
* in GUI switching from DVD to network and back again results in a attribute traceback
* in text entering source too soon can result in a urlgrabber error (because it is busy getting metadata)
* in text an error isn't cleared on the source spoke, preventing install from continuing.
software spoke still works, asks to confirm changes and shows GNOME selected.
(I still need to search for and file bugs for these if they don't already exist).
Brian C. Lane (2):
Remove threading from getBaseRepo handling (#1011555)
Make _yum.preconf setup atomic (#1028245)
pyanaconda/packaging/__init__.py | 18 +---
pyanaconda/packaging/dnfpayload.py | 4 +-
pyanaconda/packaging/yumpayload.py | 194 ++++++++++++++---------------------
pyanaconda/ui/gui/spokes/source.py | 12 +--
pyanaconda/ui/tui/spokes/software.py | 9 +-
pyanaconda/ui/tui/spokes/source.py | 8 +-
6 files changed, 98 insertions(+), 147 deletions(-)
--
1.8.3.1
10 years, 7 months
[master/rhel7-branch] Don't try to unicode unicode strings (#1023052)
by Vratislav Podzimek
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/tui/simpleline/base.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/ui/tui/simpleline/base.py
b/pyanaconda/ui/tui/simpleline/base.py
index a2b9c4e..0801b7a 100644
--- a/pyanaconda/ui/tui/simpleline/base.py
+++ b/pyanaconda/ui/tui/simpleline/base.py
@@ -773,11 +773,12 @@ class Widget(object):
if not text:
return
·
- try:
- text = text.decode("utf-8")
- except UnicodeDecodeError as e:
- raise ValueError("Unable to decode string %s" %
- str(e.object).decode("utf-8", "replace"))
+ if isinstance(text, str):
+ try:
+ text = text.decode("utf-8")
+ except UnicodeDecodeError as e:
+ raise ValueError("Unable to decode string %s" %
+ str(e.object).decode("utf-8",
"replace"))
·
if row is None:
row = self._cursor[0]
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
10 years, 7 months