[blivet][rhel7-branch]
by David Lehman
blivet/devices.py | 14 ++++++++++++++
blivet/formats/luks.py | 5 ++++-
blivet/partitioning.py | 3 ---
3 files changed, 18 insertions(+), 4 deletions(-)
10 years, 8 months
[rhel7-branch][PATCH] Don't enable chronyd if disabled in kickstart (#1002583)
by Martin Kolman
If the chronyd service is disabled in kickstart, it should not be
automatically enabled.
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
pyanaconda/kickstart.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 031a6f1..3993fd3 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -1301,7 +1301,8 @@ class Timezone(commands.timezone.F18_Timezone):
ksdata.packages.packageList.append(NTP_PACKAGE)
self._added_chrony = True
- if not NTP_SERVICE in ksdata.services.enabled:
+ if not NTP_SERVICE in ksdata.services.enabled and \
+ not NTP_SERVICE in ksdata.services.disabled:
ksdata.services.enabled.append(NTP_SERVICE)
self._enabled_chrony = True
--
1.8.3.1
10 years, 8 months
[master][PATCH] Don't try to parse langcode if none given
by Vratislav Podzimek
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/localization.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pyanaconda/localization.py b/pyanaconda/localization.py
index cf47a43..f9469d8 100644
--- a/pyanaconda/localization.py
+++ b/pyanaconda/localization.py
@@ -82,6 +82,9 @@ def parse_langcode(langcode):
"""
+ if not langcode:
+ return None
+
match = LANGCODE_RE.match(langcode)
if match:
return match.groupdict()
--
1.7.11.7
10 years, 8 months
[initial-setup] EULA agreement spoke for the I-S
by Vratislav Podzimek
Patches 1/3 and 2/3 fix things that are needed for the EULA spoke to be
collected and shown by the hub. PATCH 2/3 requires the changes made in the
related anaconda patches. PATCH 3/3 adds the EULA spoke. The screenshots of the
spoke can be found at:
http://vpodzime.fedorapeople.org/eula_i-s/
I don't know into which category the spoke should be put, but I don't want to
add another category just for this one. Any suggestions? Shall we merge it into
one of the existing categories and rename it? Or can EULA agreement be
considered part of User Settings?
Vratislav Podzimek (3):
Fix the base mask of initial_setup gui submodules
Specify and use environment of the main hub
EULA agreement spoke (#1000409)
initial_setup/gui/gui.py | 2 +-
initial_setup/gui/hubs/initial_setup_hub.py | 7 +-
initial_setup/gui/spokes/eula.glade | 113 ++++++++++++++++++++++++++++
initial_setup/gui/spokes/eula.py | 74 ++++++++++++++++++
initial_setup/product.py | 56 ++++++++++++++
5 files changed, 250 insertions(+), 2 deletions(-)
create mode 100644 initial_setup/gui/spokes/eula.glade
create mode 100644 initial_setup/gui/spokes/eula.py
--
1.7.11.7
10 years, 8 months
[master/rhel7 1/2] Fix fastestmirror plugin check (#876135)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
It ends up enabledPlugins is just the list we gave yum to load, it
doesn't reflect success or failure. If a plugin is actually loaded it is
added to the internal dict plugins._plugins
Related: rhbz#876135
---
pyanaconda/packaging/yumpayload.py | 2 +-
pyanaconda/ui/gui/spokes/source.py | 11 +++++++----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 3ce95d1..4926e96 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -420,7 +420,7 @@ reposdir=%s
@property
def mirrorEnabled(self):
with _yum_lock:
- return "fastestmirror" in self._yum.plugins.enabledPlugins
+ return "fastestmirror" in self._yum.plugins._plugins
def getRepo(self, repo_id):
""" Return the yum repo object. """
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index e49f163..8dd8ba2 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -641,10 +641,13 @@ class SourceSpoke(NormalSpoke):
combo = self.builder.get_object("isoPartitionCombo")
combo.set_active(active)
- # We default to the mirror list, and then if the method tells us
- # something different later, we can change it.
- self._protocolComboBox.set_active(PROTOCOL_MIRROR)
- self._urlEntry.set_sensitive(False)
+ # We default to the mirror list if available. http otherwise
+ if self.payload.mirrorEnabled:
+ self._protocolComboBox.set_active(PROTOCOL_MIRROR)
+ self._urlEntry.set_sensitive(False)
+ else:
+ self._protocolComboBox.set_active(PROTOCOL_HTTP)
+ self._urlEntry.set_sensitive(True)
# Set up the default state of UI elements.
if self.data.method.method == "url":
--
1.8.3.1
10 years, 8 months
[master/rhel7-branch] Don't mark spoke as completed if no repo is set. (#1001538)
by Samantha N. Bueno
Even though the status text notifies users there is a problem
setting up the install repo, the spoke should not be getting
detected as 'complete'.
In the GUI, this now marks the spoke with the error icon so it's
more visibly obvious to users the spoke needs attention.
In the TUI, the '!' (for 'not complete') is shown next to the spoke
instead of 'x' ('complete').
Resolves: rhbz#1001538
---
pyanaconda/ui/gui/spokes/source.py | 2 +-
pyanaconda/ui/tui/spokes/source.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index e49f163..e6489ef 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -463,7 +463,7 @@ class SourceSpoke(NormalSpoke):
if flags.automatedInstall and (not self.data.method.method or not self.payload.baseRepo):
return False
else:
- return not self._error and self.status and self.status != _("Nothing selected")
+ return not self._error and self.status and (self.data.method.method or self.payload.baseRepo)
@property
def mandatory(self):
diff --git a/pyanaconda/ui/tui/spokes/source.py b/pyanaconda/ui/tui/spokes/source.py
index 020e392..566edf0 100644
--- a/pyanaconda/ui/tui/spokes/source.py
+++ b/pyanaconda/ui/tui/spokes/source.py
@@ -112,7 +112,7 @@ class SourceSpoke(EditTUISpoke):
if flags.automatedInstall and (not self.data.method.method or not self.payload.baseRepo):
return False
else:
- return not self.errors and self.ready
+ return not self.errors and self.ready and (self.data.method.method or self.payload.baseRepo)
def refresh(self, args=None):
EditTUISpoke.refresh(self, args)
--
1.7.11.7
10 years, 8 months
[PATCH] Don't mount cdroms that contain no mountable media. (#1000889)
by David Lehman
---
pyanaconda/image.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pyanaconda/image.py b/pyanaconda/image.py
index adc0660..86e7937 100644
--- a/pyanaconda/image.py
+++ b/pyanaconda/image.py
@@ -190,6 +190,10 @@ def opticalInstallMedia(devicetree, mountpoint=INSTALL_TREE):
for dev in devicetree.getDevicesByType("cdrom"):
devicetree.updateDeviceFormat(dev)
+ if not hasattr(dev.format, "mount"):
+ # no mountable media
+ continue
+
try:
dev.format.mount(mountpoint=mountpoint)
except FSError:
--
1.8.1.4
10 years, 8 months
[master/rhel7-branch] Warn user if they enter a weak password in TUI. (#1001039)
by Samantha N. Bueno
This is in keeping some consistency with GUI behavior, check a user's
pw quality score and warn/prompt them to confirm whether they are ok
with using a weak pw.
Resolves: rhbz#1001039
---
pyanaconda/ui/tui/spokes/__init__.py | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py
index 2f92126..fc904b3 100644
--- a/pyanaconda/ui/tui/spokes/__init__.py
+++ b/pyanaconda/ui/tui/spokes/__init__.py
@@ -22,7 +22,7 @@ from pyanaconda.ui.tui import simpleline as tui
from pyanaconda.ui.tui.tuiobject import TUIObject, YesNoDialog
from pyanaconda.ui.common import Spoke, StandaloneSpoke, NormalSpoke, PersonalizationSpoke, collect
from pyanaconda.users import validatePassword
-from pwquality import PWQError
+import pwquality
import re
from collections import namedtuple
from pyanaconda.iutil import setdeepattr, getdeepattr
@@ -104,6 +104,25 @@ class EditTUIDialog(NormalTUISpoke):
return True
def prompt(self, entry = None):
+ def _validatePassword(pw, confirm):
+ """ Better password checking. This sets up a quality checker
+ to score password attempts. This is similar to the pw quality
+ check done in the GUI, except this only raises an error if a
+ password is weak.
+ """
+ # set up quality checker
+ _pwq = pwquality.PWQSettings()
+ _pwq.read_config()
+
+ error = validatePassword(pw, confirm)
+ if error:
+ return error
+ strength = _pwq.check(pw, None, None)
+ if strength < 50:
+ raise pwquality.PWQError
+ else:
+ return None
+
if not entry:
return None
@@ -114,11 +133,11 @@ class EditTUIDialog(NormalTUISpoke):
# just returning an error is either blank or mismatched
# passwords. Raising is because of poor quality.
try:
- error = validatePassword(pw, confirm)
+ error = _validatePassword(pw, confirm)
if error:
print(error)
return None
- except PWQError as e:
+ except pwquality.PWQError as e:
error = _("You have provided a weak password: %s. " % e.message)
error += _("\nWould you like to use it anyway?")
question_window = YesNoDialog(self._app, error)
--
1.7.11.7
10 years, 8 months