[master][PATCH] Use vc_keymap as X layout only if we get nothing from localed (#1048592)
by Vratislav Podzimek
systemd-localed's suggestion should be better than trying to use VConsole keymap
as X layout so we should use it if available and just fall back to VConsole
keymap if nothing is suggested.
---
pyanaconda/keyboard.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
index 21505a2..6a2035c 100644
--- a/pyanaconda/keyboard.py
+++ b/pyanaconda/keyboard.py
@@ -327,7 +327,7 @@ def activate_keyboard(keyboard):
if c_lay_var:
# suggested by systemd-localed for a requested VConsole keymap
keyboard.x_layouts.append(c_lay_var)
- if keyboard.vc_keymap:
+ elif keyboard.vc_keymap:
# nothing suggested by systemd-localed, but we may try to use the
# same string for both VConsole keymap and X layout (will fail
# safely if it doesn't work)
--
1.8.4.2
10 years, 4 months
[blivet:rhel7/master 0/5] Changes to the handling of filesystem labeling
by Anne Mulhern
The first three patches listed have all been reviewed and I've made all the
suggested changes, so I'm not including them with the email.
The fourth is probably non-controversial, but should be checked.
The fifth is possibly controversial, but short.
mulhern (5):
Changes to the handling of filesystem labeling (#1038590)
Remove fsConfigFromFile (#1038590)
More tests to check writing and reading labels (#1038590)
Restore ability to write an empty label where possible (#1038590)
Only allow label to be set if there is a labelling application
(#1038590)
blivet/formats/fs.py | 185 ++++++++++++++++------------
blivet/formats/fslabel.py | 264 ++++++++++++++++++++++++++++++++++++++++
tests/formats_test/misc_test.py | 189 +++++++++++++++++++++++++---
3 files changed, 541 insertions(+), 97 deletions(-)
create mode 100644 blivet/formats/fslabel.py
--
1.8.3.1
10 years, 4 months
[master][PATCH] Warn user if entering LUKS password with non-ASCII characters (#1039168)
by Vratislav Podzimek
Non-ASCII characters are likely to cause issues on boot where a VConsole keymap
is active instead of the X layout that was active during installation.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/constants.py | 4 ++++
pyanaconda/ui/gui/spokes/lib/passphrase.py | 15 +++++++++++++--
pyanaconda/users.py | 5 ++---
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/constants.py b/pyanaconda/constants.py
index 8e3111d..3df73ee 100644
--- a/pyanaconda/constants.py
+++ b/pyanaconda/constants.py
@@ -19,6 +19,7 @@
# Author(s): Erik Troan <ewt(a)redhat.com>
#
+import string
from pyanaconda.i18n import N_
SELINUX_DEFAULT = 1
@@ -147,3 +148,6 @@ PASSWORD_STRENGTH_DESC = [N_("Empty"), N_("Weak"), N_("Fair"), N_("Good"), N_("S
# the number of seconds we consider a noticeable freeze of the UI
NOTICEABLE_FREEZE = 0.1
+
+# all ASCII characters
+PW_ASCII_CHARS = string.digits + string.ascii_letters + string.punctuation + " "
diff --git a/pyanaconda/ui/gui/spokes/lib/passphrase.py b/pyanaconda/ui/gui/spokes/lib/passphrase.py
index c3cc119..dcd61c5 100644
--- a/pyanaconda/ui/gui/spokes/lib/passphrase.py
+++ b/pyanaconda/ui/gui/spokes/lib/passphrase.py
@@ -24,7 +24,7 @@ from gi.repository import Gtk, Gdk
import pwquality
from pyanaconda.ui.gui import GUIObject
-
+from pyanaconda.constants import PW_ASCII_CHARS
from pyanaconda.i18n import _, N_
__all__ = ["PassphraseDialog"]
@@ -131,7 +131,8 @@ class PassphraseDialog(GUIObject):
def on_passphrase_changed(self, entry):
self._update_passphrase_strength()
- if entry.get_text() and entry.get_text() == self._confirm_entry.get_text():
+ passphrase = entry.get_text()
+ if passphrase and passphrase == self._confirm_entry.get_text():
self._set_entry_icon(self._confirm_entry, "", "")
self._save_button.set_sensitive(True)
else:
@@ -140,6 +141,16 @@ class PassphraseDialog(GUIObject):
if not self._pwq_error:
self._set_entry_icon(entry, "", "")
+ can_override_icon = entry.get_icon_name(Gtk.EntryIconPosition.SECONDARY)\
+ in ["gtk-dialog-warning", "", None]
+ if can_override_icon:
+ # no other icon set, make non-ASCII warning (lowest priority) effective
+ if passphrase and any(char not in PW_ASCII_CHARS for char in passphrase):
+ self._set_entry_icon(entry, "gtk-dialog-warning",
+ _("contains non-ASCII characters"))
+ else:
+ self._set_entry_icon(entry, "", "")
+
def on_passphrase_editing_done(self, entry, *args):
if self._pwq_error:
icon = "gtk-dialog-error"
diff --git a/pyanaconda/users.py b/pyanaconda/users.py
index e61a787..0988c11 100644
--- a/pyanaconda/users.py
+++ b/pyanaconda/users.py
@@ -30,7 +30,7 @@ from pyanaconda import iutil
import pwquality
from pyanaconda.iutil import strip_accents
from pyanaconda.i18n import _
-from pyanaconda.constants import PASSWORD_MIN_LEN
+from pyanaconda.constants import PASSWORD_MIN_LEN, PW_ASCII_CHARS
import logging
log = logging.getLogger("anaconda")
@@ -154,9 +154,8 @@ def validatePassword(pw, user="root", settings=None):
validatePassword.pwqsettings.minlen = PASSWORD_MIN_LEN
settings = validatePassword.pwqsettings
- legal = string.digits + string.ascii_letters + string.punctuation + " "
for letter in pw:
- if letter not in legal:
+ if letter not in PW_ASCII_CHARS:
message = _("Requested password contains "
"non-ASCII characters, which are "
"not allowed.")
--
1.8.4.2
10 years, 4 months
[PATCH] Only show the "DATA" heading if there are data mount points under it.
by Chris Lumens
---
pyanaconda/ui/gui/spokes/lib/accordion.py | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/accordion.py b/pyanaconda/ui/gui/spokes/lib/accordion.py
index af185b7..15a0e83 100644
--- a/pyanaconda/ui/gui/spokes/lib/accordion.py
+++ b/pyanaconda/ui/gui/spokes/lib/accordion.py
@@ -1,7 +1,7 @@
# vim: set fileencoding=utf-8
# Mountpoint selector accordion and page classes
#
-# Copyright (C) 2012 Red Hat, Inc.
+# Copyright (C) 2012-2014 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
@@ -24,7 +24,7 @@ from blivet.size import Size
from pyanaconda.i18n import _
from pyanaconda.product import productName, productVersion
-from pyanaconda.ui.gui.utils import escape_markup
+from pyanaconda.ui.gui.utils import escape_markup, really_hide, really_show
from gi.repository.AnacondaWidgets import MountpointSelector
from gi.repository import Gtk
@@ -156,7 +156,11 @@ class Page(Gtk.Box):
# Create the Data label and a box to store all its members in.
self._dataBox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
- self._dataBox.add(self._make_category_label(_("DATA")))
+ self._dataLabel = self._make_category_label(_("DATA"))
+ really_hide(self._dataLabel)
+ self._dataBox.add(self._dataLabel)
+ self._dataBox.connect("add", self._onDataAdded)
+ self._dataBox.connect("remove", self._onDataRemoved)
self.add(self._dataBox)
# Create the System label and a box to store all its members in.
@@ -224,6 +228,15 @@ class Page(Gtk.Box):
# _onSelectorClicked
cb(selector)
+ def _onDataAdded(self, container, widget):
+ really_show(self._dataLabel)
+
+ def _onDataRemoved(self, container, widget):
+ # This runs before widget is removed from container, so if it's the last
+ # item then the container will still not be empty.
+ if len(container.get_children()) == 1:
+ really_hide(self._dataLabel)
+
class UnknownPage(Page):
def __init__(self, title):
# For this type of page, there's only one place to store members.
--
1.8.3.1
10 years, 4 months
[master/rhel7-branch] Error gracefully if we have a question in cmdline mode. (#869731)
by Samantha N. Bueno
Show a nice error message before bailing instead of just crashing.
Resolves: rhbz#869731
---
pyanaconda/exception.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
index a32f318..59ebbb6 100644
--- a/pyanaconda/exception.py
+++ b/pyanaconda/exception.py
@@ -90,6 +90,19 @@ class AnacondaExceptionHandler(ExceptionHandler):
"The installer will now terminate.") % str(value)
self.intf.messageWindow(_("Hardware error occured"), hw_error_msg)
sys.exit(0)
+ elif (issubclass (ty, RuntimeError) and not flags.flags.ksprompt):
+
+ cmdline_error_msg = _("\nThe installation was stopped due to "
+ "incomplete spokes detected while running "
+ "in non-interactive cmdline mode. Since there "
+ "can not be any questions in cmdline mode, "
+ "edit your kickstart file and retry "
+ "installation.\nThe exact error message is: "
+ "\n\n%s.\n\nThe installer will now terminate.") % str(value)
+ print cmdline_error_msg
+ # sleep for a bit so the error message has a chance of being seen
+ time.sleep(10)
+ sys.exit(0)
else:
try:
# pylint: disable-msg=E0611
--
1.8.3.1
10 years, 4 months
[PATCH] Fix bool parsing of boot options with inst. prefix (#1044391)
by Martin Kolman
Previously when calling flags.cmdline.getbool("geoloc, True),
False was correctly returned for "geoloc=0", but True was returned
if inst.geoloc=0 was used, as "inst.geoloc" was considered a separate
option from "geoloc". This should be now fixed.
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
pyanaconda/flags.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index f9d6de9..52f62d1 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -150,7 +150,18 @@ class BootArgs(OrderedDict):
lst = shlex.split(cmdline)
+ # options might have the inst. prefix
+ # (used to differentiate boot options for the
+ # installer from other boot options)
+ inst_prefix = "inst."
+
for i in lst:
+ # drop the inst. prefix (if found),
+ # so that getbool() works consistently
+ # for both "foo=0" and "inst.foo=0"
+ if i.startswith(inst_prefix):
+ i = i[len(inst_prefix):]
+
if "=" in i:
(key, val) = i.split("=", 1)
else:
--
1.8.4.2
10 years, 4 months
[PATCH blivet rhel7-branch] iscsi: in installer automatically log into firmware iscsi targets (#1034291)
by Radek Vykydal
Not all iSCSI offload solutions use iBFT or need network interfaces configured
by the OS to function.
I wanted to propagate anaconda ibft flag in update_from_anaconda_flags
but it happens too late (storageInitialize) so I hope we can se the flag
right in blivet.
---
blivet/flags.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/blivet/flags.py b/blivet/flags.py
index b10f725..ebf504b 100644
--- a/blivet/flags.py
+++ b/blivet/flags.py
@@ -43,7 +43,7 @@ class Flags(object):
self.selinux = selinux.is_selinux_enabled()
self.multipath = True
self.dmraid = True
- self.ibft = False
+ self.ibft = True
self.noiswmd = False
self.gfs2 = True
@@ -79,9 +79,6 @@ class Flags(object):
if "nodmraid" in self.boot_cmdline:
self.dmraid = False
- if self.boot_cmdline.get("ip") == "ibft":
- self.ibft = True
-
if "noiswmd" in self.boot_cmdline:
self.noiswmd = True
--
1.7.11.7
10 years, 4 months
[blivet][PATCH] Leave enough space for 10MB PReP boot partition (#1029893)
by Vratislav Podzimek
Default alignment is 1 MB so the 10MB PReP boot partition ends with the 11th
MB sector.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
blivet/platform.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blivet/platform.py b/blivet/platform.py
index 2b21d73..6df9207 100644
--- a/blivet/platform.py
+++ b/blivet/platform.py
@@ -233,7 +233,7 @@ class PPC(Platform):
class IPSeriesPPC(PPC):
_boot_stage1_format_types = ["prepboot"]
- _boot_stage1_max_end_mb = 10
+ _boot_stage1_max_end_mb = 11
_boot_prep_description = N_("PReP Boot Partition")
_boot_descriptions = {"partition": _boot_prep_description}
_disklabel_types = ["msdos"]
--
1.8.4.2
10 years, 4 months
[PATCH] Remove the UID and GID maximums.
by David Shea
UIDs and GIDs can be greater than 32535, which seems like kind of a weird limit
anyway, and libuser doesn't configure or enforce any kind of maximum, so
just remove the upper limits. If a user or group is created with a
UID or GID that doesn't fit in uid_t or gid_t, libuser will fail and
anaconda will log a message.
---
pyanaconda/ui/gui/spokes/advanced_user.glade | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/advanced_user.glade b/pyanaconda/ui/gui/spokes/advanced_user.glade
index 87445d4..8dc1d31 100644
--- a/pyanaconda/ui/gui/spokes/advanced_user.glade
+++ b/pyanaconda/ui/gui/spokes/advanced_user.glade
@@ -1,17 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Thu Oct 17 10:49:40 2013 -->
+<!-- Generated with glade 3.16.0 on Tue Jan 7 16:14:53 2014 -->
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkAdjustment" id="gid">
<property name="lower">1000</property>
- <property name="upper">32535</property>
<property name="value">1000</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="uid">
<property name="lower">1000</property>
- <property name="upper">32535</property>
<property name="value">1000</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
--
1.8.5.2
10 years, 4 months