[blivet:rhel7/master 0/2] #1076055 patches
by Anne Mulhern
The idea here is to handle the complexities of changing the size of a LUKS
device in blivet rather than in anaconda. In anaconda it requires a lot of
judicious deciding when to use use_dev or device in _save_right_side
starting around line 1614 and ending around 1674. If the problem is
approached in that way, however, reasonable actions outside anaconda, like:
dev = b.devicetree.getDeviceByName("rhel-root")
fmt = blivet.formats.getFormat("luks", device=dev.path, passphrase="redhat")
b.formatDevice(dev, fmt)
luks = blivet.devices.LUKSDevice("luks-" + dev.name, parents=[dev])
b.createDevice(luks)
b.resizeDevice(luks, Size("11 GiB"))
still fail.
Handle the problem in blivet instead, and this reasonable action will succeed.
Resizing the device in anaconda will succeed as well.
Testing with the above reproducer shows everything going just as it should,
i.e., devices are resized exactly as requested, except that lvm.lvresize()
reports that it is "Rounding size to boundary between physical extents.",
so that the logical volume device ends up exactly 11 GiB (rather than
11 GiB + crypto.LUKS_METADATA_SIZE). However, I think that solving that
problem is beyond the scope of this bug.
There is an accompanying anaconda patch, coming soon.
mulhern (2):
Handle size related attributes of LUKSDevice in blivet (#1076055)
Revert "Make space for LUKS metadata if creating encrypted device
(#1038847)"
blivet/devicefactory.py | 12 +-----------
blivet/devices.py | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 11 deletions(-)
--
1.9.3
9 years, 9 months
[rhel7-branch] Actually show an error message for bad passwords in TUI. (#1066988)
by Samantha N. Bueno
Resolves: rhbz#1066988
---
pyanaconda/ui/tui/spokes/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py
index 39b47b9..ef9132d 100644
--- a/pyanaconda/ui/tui/spokes/__init__.py
+++ b/pyanaconda/ui/tui/spokes/__init__.py
@@ -121,7 +121,7 @@ class EditTUIDialog(NormalTUISpoke):
if strength < 50:
raise PWQError("The password you have provided is weak.")
except PWQError as e:
- error = _("You have provided a weak password: %s. " % e.message)
+ error = _("You have provided a weak password: %s. " % e[1])
error += _("\nWould you like to use it anyway?")
question_window = YesNoDialog(self._app, error)
self._app.switch_screen_modal(question_window)
--
1.9.3
9 years, 9 months
[rhel7/master] Fix SELINUX_DEFAULT import (#1137049)
by Brian C. Lane
When anaconda is run with --help or --version it won't have constants.*
available, so just import what we need in parseArguments. Also change
the other use to use constants.SELINUX_DEFAULT since it has already been
imported at that point.
Resolves: rhbz#1137049
---
anaconda | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/anaconda b/anaconda
index 608176a..9b9a453 100755
--- a/anaconda
+++ b/anaconda
@@ -302,8 +302,9 @@ def parseArguments(argv=None, boot_cmdline=None):
ap.add_argument("--syslog", metavar="HOST[:PORT]", help=help_parser.help_text("syslog"))
from pykickstart.constants import SELINUX_DISABLED, SELINUX_ENFORCING
+ from pyanaconda.constants import SELINUX_DEFAULT
ap.add_argument("--noselinux", dest="selinux", action="store_const",
- const=SELINUX_DISABLED, default=constants.SELINUX_DEFAULT,
+ const=SELINUX_DISABLED, default=SELINUX_DEFAULT,
help=help_parser.help_text("noselinux"))
ap.add_argument("--selinux", action="store_const",
const=SELINUX_ENFORCING, help=help_parser.help_text("selinux"))
@@ -1019,8 +1020,7 @@ if __name__ == "__main__":
log.error("Unknown method: %s", (anaconda.methodstr,))
# Override the selinux state from kickstart if set on the command line
- from pyanaconda.constants import SELINUX_DEFAULT
- if flags.selinux != SELINUX_DEFAULT:
+ if flags.selinux != constants.SELINUX_DEFAULT:
ksdata.selinux.selinux = flags.selinux
from pyanaconda import localization
--
1.9.3
9 years, 9 months
[master/f21-branch] cmdline 'rescue' must set flags.rescue_mode (fixes rescue mode access)
by Adam Williamson
Commit 6187aa0d07 made rescue mode into part of flags, so anaconda
looks for 'flags.rescue_mode' when deciding whether to enter
rescue mode, but missed changing the cmdline parser to set
flags.rescue_mode not anaconda.rescue when it sees 'rescue' in the
parameters.
---
anaconda | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/anaconda b/anaconda
index 4d4676e..1705e90 100755
--- a/anaconda
+++ b/anaconda
@@ -1022,7 +1022,7 @@ if __name__ == "__main__":
anaconda.updateSrc = opts.updateSrc
anaconda.methodstr = opts.method
anaconda.stage2 = opts.stage2
- anaconda.rescue = opts.rescue
+ flags.rescue_mode = opts.rescue
if opts.liveinst:
from pyanaconda.screensaver import inhibit_screensaver
--
2.1.0
9 years, 9 months
(take 3) gui: add Refresh button to network storage
by Radek Vykydal
Compared to take 2 I am only reorganizing the patches a bit. First port
timed_action (1/4,2/4,3/4), then use it in the add Refresh button patch
(4/4).
In previous take 2 the first patch [1/4] was the add Refresh button
patch and timed_action decorator was applied to it in patch porting
timed_action [2/4].
9 years, 9 months
[master/rhel7-branch] Fixes inspired by bug 1085201
by Vratislav Podzimek
These patches come from my attempts to fix bug 1085201. It turned out there are
more issues that need fixing to make disk selection changes work, but these
are steps forward. The rest depends on the changes dlehman is working on for
cancelling actions in blivet.
Vratislav Podzimek (3):
Do not directly remove devices from previous autopart
Apply changes in disk selection even if not reclaiming space
Short-circuit Storage spoke leaving when no changes were done
pyanaconda/ui/gui/spokes/storage.py | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
--
1.9.3
9 years, 9 months
[rhel7-branch][PATCH] Split localed's converted layouts and variants (#1073825)
by Vratislav Podzimek
systemd-localed may give use multiple layouts+variants when asked to convert VC
keymap. Try to split it and use the resulting list.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/keyboard.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
index 9c02a1d..27d9510 100755
--- a/pyanaconda/keyboard.py
+++ b/pyanaconda/keyboard.py
@@ -290,7 +290,7 @@ def activate_keyboard(keyboard):
"""
localed = LocaledWrapper()
- c_lay_var = ""
+ c_lays_vars = []
c_keymap = ""
if keyboard._keyboard and not (keyboard.vc_keymap or keyboard.x_layouts):
@@ -311,12 +311,15 @@ def activate_keyboard(keyboard):
keyboard.vc_keymap = None
else:
# activate VConsole keymap and get converted layout and variant
- c_lay_var = localed.set_and_convert_keymap(keyboard.vc_keymap)
+ converted = localed.set_and_convert_keymap(keyboard.vc_keymap)
+
+ # localed may give us multiple comma-separated layouts+variants
+ c_lays_vars = converted.split(",")
if not keyboard.x_layouts:
- if c_lay_var:
+ if c_lays_vars:
# suggested by systemd-localed for a requested VConsole keymap
- keyboard.x_layouts.append(c_lay_var)
+ keyboard.x_layouts += c_lays_vars
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
--
1.9.3
9 years, 9 months
[PATCH rhel7-branch/master] Apply a better check for whether to fail if authconfig is missing.
by Chris Lumens
The previous check is incorrect for one big reason: I only tested it on
kickstart installs, where I had control over everything and left out the
authconfig command. Interactive installs, however, have their defaults
set by a kickstart file that includes authconfig. So all interactive
installs always have ksdata.auth.seen set which then causes the traceback
to be raised.
Resolves: rhbz#1140640
---
pyanaconda/kickstart.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 9898135..d427b04 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -242,7 +242,7 @@ class Authconfig(commands.authconfig.FC3_Authconfig):
def execute(self, *args):
cmd = "/usr/sbin/authconfig"
if not os.path.lexists(iutil.getSysroot()+cmd):
- if self.seen:
+ if flags.automatedInstall and self.seen:
msg = _("%s is missing. Cannot setup authentication.") % cmd
raise KickstartError(msg)
else:
--
1.9.3
9 years, 9 months
[master/rhel7-branch] Re-order the tz's in text mode to mirror the graphical order. (#1032560)
by Samantha N. Bueno
I don't know why these were ever not in the same order. Anyway now
they are.
Resolves: rhbz#1032560
---
pyanaconda/ui/tui/spokes/time.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/tui/spokes/time.py b/pyanaconda/ui/tui/spokes/time.py
index 403d962..da4cec0 100644
--- a/pyanaconda/ui/tui/spokes/time.py
+++ b/pyanaconda/ui/tui/spokes/time.py
@@ -33,8 +33,12 @@ class TimeZoneSpoke(FirstbootSpokeMixIn, NormalTUISpoke):
NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)
def initialize(self):
- self._timezones = dict((k, sorted(v)) for k,v in timezone.get_all_regions_and_timezones().iteritems())
- self._regions = [r for r in self._timezones]
+ # it's stupid to call get_all_regions_and_timezones twice, but regions
+ # needs to be unsorted in order to display in the same order as the GUI
+ # so whatever
+ self._regions = timezone.get_all_regions_and_timezones().keys()
+ self._timezones = dict((k, sorted(v)) for k,v in timezone.get_all_regions_and_timezones
+().iteritems())
self._lower_regions = [r.lower() for r in self._timezones]
self._zones = ["%s/%s" % (region, z) for region in self._timezones for z in self._timezones[region]]
--
1.9.3
9 years, 9 months