[PATCH 1/4] Fix marking the "Modify Software Selection" button as sensitive in one case.
by Chris Lumens
When the custom checkbox is selected, we need to make sure the software spoke
is ready when deciding whether the Modify button is sensitive or not.
---
pyanaconda/ui/gui/spokes/storage.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 3498517..537781a 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -246,7 +246,7 @@ class InstallOptions2Dialog(InstallOptions1Dialog):
def on_custom_toggled(self, checkbutton):
super(InstallOptions2Dialog, self).on_custom_toggled(checkbutton)
self.builder.get_object("options2_cancel_button").set_sensitive(not self.custom)
- self.builder.get_object("options2_modify_sw_button").set_sensitive(not self.custom)
+ self.builder.get_object("options2_modify_sw_button").set_sensitive(not self.custom and self._software_is_ready())
class InstallOptions3Dialog(InstallOptions1Dialog):
builderObjects = ["options3_dialog"]
--
1.7.11.2
11 years, 8 months
[PATCH] Require root password spoke be visited (#859069)
by Jesse Keating
Give up on getting cute with payload data to set required or not, just
always make the user visit it. Also don't default the kickstart data to
locked, that can confuse the UI
---
data/interactive-defaults.ks | 1 -
pyanaconda/ui/gui/spokes/password.py | 12 ++++--------
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/data/interactive-defaults.ks b/data/interactive-defaults.ks
index 0046cc3..f692ccd 100644
--- a/data/interactive-defaults.ks
+++ b/data/interactive-defaults.ks
@@ -2,4 +2,3 @@
# This is not loaded if a kickstart file is provided on the command line.
auth --enableshadow --passalgo=sha512
firstboot --enable
-rootpw --lock
diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py
index 9f5d4d9..74acd4e 100644
--- a/pyanaconda/ui/gui/spokes/password.py
+++ b/pyanaconda/ui/gui/spokes/password.py
@@ -55,8 +55,6 @@ class PasswordSpoke(NormalSpoke):
def initialize(self):
NormalSpoke.initialize(self)
- # Set the rootpw to locked by default, setting a password is optional
- self.data.rootpw.lock = True
# place holders for the text boxes
self.pw = self.builder.get_object("pw")
self.confirm = self.builder.get_object("confirm")
@@ -77,10 +75,12 @@ class PasswordSpoke(NormalSpoke):
def status(self):
if self._error:
return _("Error setting root password")
+ if self.data.rootpw.password:
+ return _("Root password is set")
elif self.data.rootpw.lock:
return _("Root account is disabled")
else:
- return _("Root password is set")
+ return _("Root password is not set")
def apply(self):
if self._password:
@@ -95,11 +95,7 @@ class PasswordSpoke(NormalSpoke):
@property
def completed(self):
- # FUTURE -- update completed to false if package payload doesn't
- # include firstboot and some environment to run it in
- # We are by default complete, but locked. If a user attempts to set
- # a password but fails, then we are no longer complete.
- return not self._error
+ return bool(self.data.rootpw.password or self.data.rootpw.lock)
def _validatePassword(self):
# Do various steps to validate the password
--
1.7.11.4
11 years, 8 months
[PATCH] add some thread logging
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
* log when threads are started and are finished
* log progress messages
* log all the running threads and their stack frame when USR2 is
received.
---
pyanaconda/__init__.py | 9 +++++++++
pyanaconda/progress.py | 4 ++++
pyanaconda/threads.py | 5 +++++
3 files changed, 18 insertions(+)
diff --git a/pyanaconda/__init__.py b/pyanaconda/__init__.py
index 5154e44..c46d20c 100644
--- a/pyanaconda/__init__.py
+++ b/pyanaconda/__init__.py
@@ -29,6 +29,7 @@
#
import os, time, string
+import sys
import iutil
import isys
from constants import ROOT_PATH
@@ -179,15 +180,23 @@ class Anaconda(object):
def dumpState(self):
from meh.dump import ReverseExceptionDump
from inspect import stack as _stack
+ from traceback import format_stack
# Skip the frames for dumpState and the signal handler.
stack = _stack()[2:]
stack.reverse()
exn = ReverseExceptionDump((None, None, stack), self.mehConfig)
+ # gather up info on the running threads
+ threads = "\nThreads\n-------\n"
+ for thread_id, frame in sys._current_frames().iteritems():
+ threads += "\nThread %s\n" % (thread_id,)
+ threads += "".join(format_stack(frame))
+
# dump to a unique file
(fd, filename) = mkstemp(prefix="anaconda-tb-", dir="/tmp")
dump_text = exn.traceback_and_object_dump(self)
+ dump_text += threads
dump_text = dump_text.encode("utf-8")
os.write(fd, dump_text)
os.close(fd)
diff --git a/pyanaconda/progress.py b/pyanaconda/progress.py
index a671fad..433d205 100644
--- a/pyanaconda/progress.py
+++ b/pyanaconda/progress.py
@@ -18,6 +18,9 @@
#
# Author(s): Chris Lumens <clumens(a)redhat.com>
+import logging
+log = logging.getLogger("anaconda")
+
from contextlib import contextmanager
import Queue
@@ -66,5 +69,6 @@ def send_quit(code):
@contextmanager
def progress_report(message):
send_message(message)
+ log.info(message)
yield
send_step()
diff --git a/pyanaconda/threads.py b/pyanaconda/threads.py
index 2119a7f..55fe141 100644
--- a/pyanaconda/threads.py
+++ b/pyanaconda/threads.py
@@ -19,6 +19,9 @@
#
# Author(s): Chris Lumens <clumens(a)redhat.com>
#
+import logging
+log = logging.getLogger("anaconda")
+
import threading
class ThreadManager(object):
@@ -83,6 +86,7 @@ class AnacondaThread(threading.Thread):
# http://bugs.python.org/issue1230540#msg25696
import sys
+ log.info("Running Thread: %s (%s)" % (self.name, self.ident))
try:
threading.Thread.run(self, *args, **kwargs)
except KeyboardInterrupt:
@@ -91,6 +95,7 @@ class AnacondaThread(threading.Thread):
sys.excepthook(*sys.exc_info())
finally:
threadMgr.remove(self.name)
+ log.info("Thread Done: %s (%s)" % (self.name, self.ident))
def initThreading():
"""Set up threading for anaconda's use. This method must be called before
--
1.7.11.4
11 years, 8 months
[PATCH] Disable a whole bunch more keyboard shortcuts (#863823).
by Chris Lumens
---
.../org.gnome.desktop.wm.keybindings.gschema.override | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/share/config_files/common/org.gnome.desktop.wm.keybindings.gschema.override b/share/config_files/common/org.gnome.desktop.wm.keybindings.gschema.override
index 3b08904..f0965a9 100644
--- a/share/config_files/common/org.gnome.desktop.wm.keybindings.gschema.override
+++ b/share/config_files/common/org.gnome.desktop.wm.keybindings.gschema.override
@@ -1,4 +1,21 @@
[org.gnome.desktop.wm.keybindings]
+ switch-to-workspace-left=[]
+ switch-to-workspace-right=[]
+ switch-to-workspace-up=[]
+ switch-to-workspace-down=[]
+ switch-group=[]
+ switch-windows=[]
+ switch-panels=[]
+ cycle-group=[]
+ cycle-windows=[]
+ cycle-panels=[]
+ activate-window-menu=[]
+ toggle-maximized=[]
maximize=[]
unmaximize=[]
- toggle-maximized=[]
+ begin-move=[]
+ begin-resize=[]
+ move-to-workspace-left=[]
+ move-to-workspace-right=[]
+ move-to-workspace-up=[]
+ move-to-workspace-down=[]
--
1.7.11.2
11 years, 8 months
[PATCH 1/4] Pass disks into the SelectedDisksDialog (#863588).
by Chris Lumens
---
pyanaconda/ui/gui/spokes/lib/cart.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/cart.py b/pyanaconda/ui/gui/spokes/lib/cart.py
index bcb9cfa..2162412 100644
--- a/pyanaconda/ui/gui/spokes/lib/cart.py
+++ b/pyanaconda/ui/gui/spokes/lib/cart.py
@@ -81,7 +81,7 @@ class SelectedDisksDialog(GUIObject):
row[IS_BOOT_COL] = True
break
- def refresh(self, free, showRemove=True):
+ def refresh(self, disks, free, showRemove=True):
super(SelectedDisksDialog, self).refresh()
self._view = self.builder.get_object("disk_view")
--
1.7.11.2
11 years, 8 months
UI support for encrypted block devices
by David Lehman
Just look at all those + lines:
pyanaconda/storage/__init__.py | 24 +++-
pyanaconda/storage/devicetree.py | 18 ++-
pyanaconda/ui/gui/spokes/custom.glade | 130 ++++++++++++++-
pyanaconda/ui/gui/spokes/custom.py | 230 +++++++++++++++++++++----
pyanaconda/ui/gui/spokes/lib/accordion.py | 4 +
pyanaconda/ui/gui/spokes/lib/passphrase.glade | 230 +++++++++++++++++++++++++
pyanaconda/ui/gui/spokes/lib/passphrase.py | 177 +++++++++++++++++++
pyanaconda/ui/gui/spokes/storage.glade | 30 +++-
pyanaconda/ui/gui/spokes/storage.py | 24 +++-
9 files changed, 818 insertions(+), 49 deletions(-)
11 years, 8 months
[lorax] Set permissions on the initrd (#863018)
by Martin Gracik
Dracut now makes the initrd with 600 permissions
for security reasons. These reasons do not apply
to install images, and we want the other tools
that use lorax to be able to read the initrd file.
---
src/pylorax/ltmpl.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/pylorax/ltmpl.py b/src/pylorax/ltmpl.py
index a391a90..3dda557 100644
--- a/src/pylorax/ltmpl.py
+++ b/src/pylorax/ltmpl.py
@@ -302,6 +302,7 @@ class LoraxTemplateRunner(object):
Same as installkernel, but for "initrd".
'''
self.install(src, dest)
+ self.chmod(dest, '644')
self.treeinfo(section, "initrd", dest)
def hardlink(self, src, dest):
--
1.7.9.5
11 years, 8 months
[PATCH] Make sure packages anaconda requires are installed.
by Chris Lumens
Our forced packages should be marked for installation after all removals
have taken place.
---
pyanaconda/packaging/__init__.py | 6 ------
pyanaconda/packaging/yumpayload.py | 16 +++++++++++++++-
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index c41d06a..65e3776 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -521,12 +521,6 @@ class Payload(object):
""" Perform pre-installation tasks. """
iutil.mkdirChain(ROOT_PATH + "/root")
- if packages:
- map(self.selectPackage, packages)
-
- if groups:
- map(self.selectGroup, groups)
-
def install(self):
""" Install the payload. """
raise NotImplementedError()
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index ab88d90..6f3160d 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -109,6 +109,9 @@ class YumPayload(PackagePayload):
self._yum = None
self._setup = False
+ self._requiredPackages = []
+ self._requiredGroups = []
+
self.reset()
def reset(self, root=None):
@@ -1070,6 +1073,7 @@ reposdir=%s
self._handleMissing(e)
self.selectKernelPackage()
+ self.selectRequiredPackages()
def checkSoftwareSelection(self):
log.info("checking software selection")
@@ -1138,11 +1142,21 @@ reposdir=%s
if not selected:
log.error("failed to select a kernel from %s" % kernels)
+ def selectRequiredPackages(self):
+ if self._requiredPackages:
+ map(self._selectYumPackage, self._requiredPackages)
+
+ if self._requiredGroups:
+ map(self._selectYumGroup, self._requiredGroups)
+
def preInstall(self, packages=None, groups=None):
""" Perform pre-installation tasks. """
- super(YumPayload, self).preInstall(packages=packages, groups=groups)
+ super(YumPayload, self).preInstall()
progress.send_message(_("Starting package installation process"))
+ self._requiredPackages = packages
+ self._requiredGroups = groups
+
if self.install_device:
self._setUpMedia(self.install_device)
--
1.7.11.2
11 years, 8 months
[master] Process X layouts and VConsole keymap separately
by Vratislav Podzimek
This set of patches introduce separate handling of X layouts and VConsole
keymaps. It is supposed to work, but for some reason, systemd-localed is not
doing what it is supposed to do in the installation environment and also X
server does not load our configuration file correctly. I'll further investigate
these issues. For now, I'm sending this patches for a review of the idea and
way of implementation.
Most of the work is done in PATCH 3/3.
Vratislav Podzimek (3):
Add comment to the begining of generated xorg.conf file
Add class wrapping systemd-localed functionality
Work with VConsole keymap and X layouts separately
anaconda | 16 +--
anaconda.spec.in | 2 +-
pyanaconda/keyboard.py | 260 +++++++++++++++++++++++++++++------
pyanaconda/kickstart.py | 3 +-
pyanaconda/ui/gui/spokes/keyboard.py | 8 +-
pyanaconda/ui/gui/spokes/welcome.py | 6 +-
6 files changed, 230 insertions(+), 65 deletions(-)
--
1.7.11.4
11 years, 8 months
[PATCH] Fix a deadlock when trying to add a keyboard layout (#862612).
by Chris Lumens
This was introduced by 576349d2, which fixed a similar deadlock but accidentally
introduced this one. Tweak that patch just a little to make sure the
gdk_threaded only gets applied when needed.
---
pyanaconda/ui/gui/spokes/keyboard.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py
index c2e9b86..a64a63c 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.py
+++ b/pyanaconda/ui/gui/spokes/keyboard.py
@@ -264,9 +264,8 @@ class KeyboardSpoke(NormalSpoke):
dialog.refresh()
dialog.initialize()
- with gdk_threaded():
- with enlightbox(self.window, dialog.window):
- response = dialog.run()
+ with enlightbox(self.window, dialog.window):
+ response = dialog.run()
if response == 1:
duplicates = set()
@@ -284,6 +283,13 @@ class KeyboardSpoke(NormalSpoke):
self._removeLayout(self._store, itr)
self._remove_last_attempt = False
+ def _run_add_from_removed(self, button):
+ # Only call gdk_threaded when necessary (when we need to run the add
+ # dialog from the on_remove_clicked path) or we'll introduce a different
+ # deadlock.
+ with gdk_threaded():
+ self.on_add_clicked(button)
+
def on_remove_clicked(self, button):
selection = self.builder.get_object("layoutSelection")
if not selection.count_selected_rows():
@@ -304,7 +310,7 @@ class KeyboardSpoke(NormalSpoke):
#redrawn
self._remove_last_attempt = True
add_button = self.builder.get_object("addLayoutButton")
- GLib.idle_add(self.on_add_clicked, add_button)
+ GLib.idle_add(self._run_add_from_removed, add_button)
return
#the selected item is not the first, select the previous one
--
1.7.11.2
11 years, 8 months