[rhel6-branch] include .ssh.hmac in image (#886479)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
Resolves: rhbz#886479
---
scripts/upd-instroot | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index 742c76c..04f71de 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -923,6 +923,7 @@ usr/bin/scp
usr/bin/sftp
usr/bin/shred
usr/bin/ssh
+usr/bin/.ssh.hmac
usr/bin/termidx
usr/bin/volume_key
usr/bin/xargs
--
1.8.0.2
11 years, 4 months
[PATCH] Move info about possible actions below the free space info
by Vratislav Podzimek
The heading label ends with "the following amounts of free space:", but what
follows is "You don't have enough space..." and below this second label there
is the info about free space. This patch reorders free space info and hint
label.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/gui/spokes/storage.glade | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.glade b/pyanaconda/ui/gui/spokes/storage.glade
index 8d7c470..27f5e61 100644
--- a/pyanaconda/ui/gui/spokes/storage.glade
+++ b/pyanaconda/ui/gui/spokes/storage.glade
@@ -320,23 +320,6 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="options2_label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Here we'll describe what your options are.</property>
- <property name="wrap">True</property>
- <attributes>
- <attribute name="font-desc" value="Cantarell 11"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -457,6 +440,23 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="options2_label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Here we'll describe what your options are.</property>
+ <property name="wrap">True</property>
+ <attributes>
+ <attribute name="font-desc" value="Cantarell 11"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
--
1.7.11.7
11 years, 4 months
[python-meh] Nasty-hack-class resolving some problems
by Vratislav Podzimek
The following patch adds a safe_string module and SafeStr class that should (and
from the test seems to) resolve problems with unicode strings in all forms,
binary data and whatever can come up to python-meh's processing.
I know it is a hack, but I'm really tired from adding 'if type(obj) ==
types.UnicodeType:" and adding a check for binary data to all these places would
drive me crazy.
Vratislav Podzimek (1):
Add safe_string module and tests
meh/dump.py | 13 ++++------
meh/safe_string.py | 60 +++++++++++++++++++++++++++++++++++++++++++++++
tests/handle_binary.py | 24 +++++++++++++++++++
tests/safe_string_test.py | 38 ++++++++++++++++++++++++++++++
4 files changed, 126 insertions(+), 9 deletions(-)
create mode 100644 meh/safe_string.py
create mode 100644 tests/handle_binary.py
create mode 100755 tests/safe_string_test.py
--
1.7.11.7
11 years, 4 months
[F19] Support code and API changes needed for the new firstboot
by Martin Sivak
Hi,
this patchset does quite a lot of generalization changes, which are needed for my new firstboot code. I cleaned it quite a bit, but some patches document the way I was thinking about the problem so I kept them for documentation purposes.
I successfully installed smoke4 with this code applied.
Summary of the changes:
- support for loading the UI glade files also from the directory the source file is specified
- support for loading Spokes and Categories from multiple directories
- better loading of python "extensions", no __init__.py necessary in their directories
- new feature for kickstart - %addon section
- path system that stores all the paths needed
- a bit more general arguments for some classes for better reusability of our code
- much better hack to load AnacondaWidgets, that also loads GI stuff along with the .so library
- spokes have separate mandatory and completed methods (not used atm, but I will need it to save the list of configured spokes for Firstboot and GIE)
If you want to see this as a GIT repo instead, go to http://fedorapeople.org/cgit/msivak/public_git/anaconda.git/log/?h=firstb... or do `git remote add msivak git://fedorapeople.org/home/fedora/msivak/public_git/anaconda.git`
I am using this external repo because it allows me to do rebases. Fedora Hosted has (or at least used to have) them disabled for security reasons.
Martin
11 years, 4 months
[master][PATCH] Activate default layout when it is changed (#882440)
by Vratislav Podzimek
Users expect to have the layout they marked as the default one (by moving
it to the top of the list) activated for the installation. This patch
adds such activation.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/keyboard.py | 8 ++++++++
pyanaconda/ui/gui/spokes/keyboard.py | 16 ++++++++++++++--
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
index b720dd5..4df52e5 100755
--- a/pyanaconda/keyboard.py
+++ b/pyanaconda/keyboard.py
@@ -459,6 +459,14 @@ class XklWrapper(object):
return groups_names[state.group]
+ def activate_default_layout(self):
+ """
+ Activates default layout (the first one in the list of configured layouts.
+
+ """
+
+ self._engine.lock_group(0)
+
def is_valid_layout(self, layout):
"""Return if given layout is valid layout or not"""
diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py
index 81d59e2..97d965f 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.py
+++ b/pyanaconda/ui/gui/spokes/keyboard.py
@@ -433,14 +433,18 @@ class KeyboardSpoke(NormalSpoke):
return
(store, cur) = selection.get_selected()
- prev = cur.copy()
- prev = store.iter_previous(prev)
+ prev = store.iter_previous(cur)
if not prev:
return
store.swap(cur, prev)
if flags.can_touch_runtime_system("reorder runtime X layouts"):
self._flush_layouts_to_X()
+
+ if not store.iter_previous(cur):
+ #layout is first in the list (set as default), activate it
+ self._xkl_wrapper.activate_default_layout()
+
selection.emit("changed")
def on_down_clicked(self, button):
@@ -449,6 +453,10 @@ class KeyboardSpoke(NormalSpoke):
return
(store, cur) = selection.get_selected()
+
+ #if default layout (first in the list) changes we need to activate it
+ activate_default = not store.iter_previous(cur)
+
nxt = store.iter_next(cur)
if not nxt:
return
@@ -456,6 +464,10 @@ class KeyboardSpoke(NormalSpoke):
store.swap(cur, nxt)
if flags.can_touch_runtime_system("reorder runtime X layouts"):
self._flush_layouts_to_X()
+
+ if activate_default:
+ self._xkl_wrapper.activate_default_layout()
+
selection.emit("changed")
def on_preview_clicked(self, button):
--
1.7.11.7
11 years, 4 months
[f18-branch/master] recheck software when source changes (#875599)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
Refresh the environments and groups when the source changes, and allow
the software spoke's apply() method to run when the source is different
than the last time the spoke was visited.
---
pyanaconda/ui/gui/spokes/software.py | 5 ++++-
pyanaconda/ui/gui/spokes/source.py | 16 ++++++++++++++--
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index 8fd4c59..64f0587 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -81,7 +81,7 @@ class SoftwareSelectionSpoke(NormalSpoke):
# Don't redo dep solving if nothing's changed.
if row[2] == self._origEnvironment and set(addons) == set(self._origAddons) and \
- not self._clickedRemove:
+ not self._clickedRemove and self._tx_id == self.payload.txID:
return
self._selectFlag = False
@@ -153,6 +153,9 @@ class SoftwareSelectionSpoke(NormalSpoke):
if not self.ready:
return _("Installation source not set up")
+ if self._tx_id != self.payload.txID:
+ return _("Source Changed")
+
row = self._get_selected_environment()
if not row:
# Kickstart installs with %packages will have a row selected, unless
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index 9892fff..c60d965 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -41,7 +41,7 @@ from pyanaconda.ui.gui.utils import enlightbox, gtk_thread_wait
from pyanaconda.iutil import ProxyString, ProxyStringError
from pyanaconda.ui.gui.utils import gtk_call_once
from pyanaconda.threads import threadMgr, AnacondaThread
-from pyanaconda.packaging import PayloadError, get_mount_paths
+from pyanaconda.packaging import PayloadError, get_mount_paths, MetadataError
from pyanaconda.constants import DRACUT_ISODIR, ISO_DIR
__all__ = ["SourceSpoke"]
@@ -576,7 +576,19 @@ class SourceSpoke(NormalSpoke):
self._error = True
gtk_call_once(self.set_warning, _("Failed to set up install source, check the repo url"))
else:
- communication.send_ready("SoftwareSelectionSpoke")
+ try:
+ # Grabbing the list of groups could potentially take a long time the
+ # first time (yum does a lot of magic property stuff, some of which
+ # involves side effects like network access) so go ahead and grab
+ # them now. These are properties with side-effects, just accessing
+ # them will trigger yum.
+ e = self.payload.environments
+ g = self.payload.groups
+ except MetadataError:
+ communication.send_message("SoftwareSelectionSpoke",
+ _("No installation source available"))
+ else:
+ communication.send_ready("SoftwareSelectionSpoke")
finally:
communication.send_ready(self.__class__.__name__)
--
1.8.0
11 years, 4 months
[master] [PATCH] Add keyboard dracut setup args (#875567)
by Vratislav Podzimek
Without vconsole.keymap on kernel command line, dracut/plymouth
uses 'us' as keymap in LUKS password prompt.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/bootloader.py | 5 +++--
pyanaconda/install.py | 2 +-
pyanaconda/keyboard.py | 52 ++++++++++++++++++++++++++++++++++++------------
pyanaconda/kickstart.py | 3 +++
4 files changed, 46 insertions(+), 16 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index fd68571..1c3bdbc 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -2238,7 +2238,7 @@ def writeSysconfigKernel(storage, version):
f.write("HYPERVISOR_ARGS=logging=vga,serial,memory\n")
f.close()
-def writeBootLoader(storage, payload, instClass):
+def writeBootLoader(storage, payload, instClass, ksdata):
""" Write bootloader configuration to disk.
When we get here, the bootloader will already have a default linux
@@ -2304,7 +2304,8 @@ def writeBootLoader(storage, payload, instClass):
# language=anaconda.instLanguage,
# network=anaconda.network)
storage.bootloader.set_boot_args(storage=storage,
- payload=payload)
+ payload=payload,
+ keyboard=ksdata.keyboard)
try:
storage.bootloader.write()
diff --git a/pyanaconda/install.py b/pyanaconda/install.py
index 1282d74..c652e88 100644
--- a/pyanaconda/install.py
+++ b/pyanaconda/install.py
@@ -133,6 +133,6 @@ def doInstall(storage, payload, ksdata, instClass):
# Do bootloader.
with progress_report(_("Installing bootloader")):
- writeBootLoader(storage, payload, instClass)
+ writeBootLoader(storage, payload, instClass, ksdata)
progress.send_complete()
diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
index 828c709..23c6e64 100755
--- a/pyanaconda/keyboard.py
+++ b/pyanaconda/keyboard.py
@@ -130,6 +130,28 @@ def get_layouts_xorg_conf(keyboard):
return ret
+def populate_missing_items(keyboard):
+ """
+ Function that populates keyboard.vc_keymap and keyboard.x_layouts if
+ they are missing. By invoking LocaledWrapper's methods this function
+ MODIFIES CONFIGURATION FILES.
+
+ @type keyboard: ksdata.keyboard object
+
+ """
+
+ localed = LocaledWrapper()
+
+ if keyboard.x_layouts and not keyboard.vc_keymap:
+ keyboard.vc_keymap = localed.set_and_convert_layout(keyboard.x_layouts[0])
+
+ if not keyboard.vc_keymap:
+ keyboard.vc_keymap = "us"
+
+ if not keyboard.x_layouts:
+ c_lay_var = localed.set_and_convert_keymap(keyboard.vc_keymap)
+ keyboard.x_layouts.append(c_lay_var)
+
def write_keyboard_config(keyboard, root, convert=True, weight=0):
"""
Function that writes files with layouts configuration to
@@ -144,20 +166,8 @@ def write_keyboard_config(keyboard, root, convert=True, weight=0):
"""
- localed = LocaledWrapper()
-
if convert:
- # populate vc_keymap and x_layouts if they are missing
- if keyboard.x_layouts and not keyboard.vc_keymap:
- keyboard.vc_keymap = \
- localed.set_and_convert_layout(keyboard.x_layouts[0])
-
- if not keyboard.vc_keymap:
- keyboard.vc_keymap = "us"
-
- if not keyboard.x_layouts:
- c_lay_var = localed.set_and_convert_keymap(keyboard.vc_keymap)
- keyboard.x_layouts.append(c_lay_var)
+ populate_missing_items(keyboard)
xconf_dir = os.path.normpath(root + "/etc/X11/xorg.conf.d")
xconf_file = "%0.2d-anaconda-keyboard.conf" % weight
@@ -191,6 +201,22 @@ def write_keyboard_config(keyboard, root, convert=True, weight=0):
if errors:
raise KeyboardConfigError("\n".join(errors))
+def dracut_setup_args(keyboard):
+ """
+ Function returning dracut setup args for the given keyboard configuration.
+
+ @type keyboard: ksdata.keyboard object
+
+ """
+
+ if not keyboard.vc_keymap:
+ populate_missing_items(keyboard)
+
+ args = set()
+ args.add("vconsole.keymap=%s" % keyboard.vc_keymap)
+
+ return args
+
def _try_to_load_keymap(keymap):
"""
Method that tries to load keymap and returns boolean indicating if it was
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 827ef30..789997b 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -1420,6 +1420,9 @@ class Keyboard(commands.keyboard.F18_Keyboard):
def execute(self, *args):
keyboard.write_keyboard_config(self, ROOT_PATH)
+ def dracutSetupArgs(self, *args):
+ return keyboard.dracut_setup_args(self)
+
###
### HANDLERS
###
--
1.7.11.7
11 years, 4 months
[PATCH] Include the new lib directory in the package (#886319, #886470).
by Chris Lumens
---
configure.ac | 1 +
po/POTFILES.in | 3 +++
pyanaconda/ui/Makefile.am | 4 ++--
pyanaconda/ui/lib/Makefile.am | 22 ++++++++++++++++++++++
4 files changed, 28 insertions(+), 2 deletions(-)
create mode 100644 pyanaconda/ui/lib/Makefile.am
diff --git a/configure.ac b/configure.ac
index 27e7cc1..85bca0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -271,6 +271,7 @@ AC_CONFIG_FILES([Makefile
pyanaconda/storage/devicelibs/Makefile
pyanaconda/storage/formats/Makefile
pyanaconda/ui/Makefile
+ pyanaconda/ui/lib/Makefile
pyanaconda/ui/gui/categories/Makefile
pyanaconda/ui/gui/hubs/Makefile
pyanaconda/ui/gui/spokes/Makefile
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e58edf5..bf5b640 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -58,6 +58,9 @@ pyanaconda/storage/zfcp.py
pyanaconda/ui/common.py
pyanaconda/ui/__init__.py
+# Common stuff
+pyanaconda/ui/lib/space.py
+
# Text interface
pyanaconda/ui/tui/hubs/progress.py
pyanaconda/ui/tui/hubs/summary.py
diff --git a/pyanaconda/ui/Makefile.am b/pyanaconda/ui/Makefile.am
index cff34cc..69051fa 100644
--- a/pyanaconda/ui/Makefile.am
+++ b/pyanaconda/ui/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright (C) 2011 Red Hat, Inc.
+# Copyright (C) 2011, 2012 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
@@ -15,7 +15,7 @@
#
# Author: Chris Lumens <clumens(a)redhat.com>
-SUBDIRS = gui tui
+SUBDIRS = gui lib tui
MAINTAINERCLEANFILES = Makefile.in
diff --git a/pyanaconda/ui/lib/Makefile.am b/pyanaconda/ui/lib/Makefile.am
new file mode 100644
index 0000000..5098c96
--- /dev/null
+++ b/pyanaconda/ui/lib/Makefile.am
@@ -0,0 +1,22 @@
+# Copyright (C) 2012 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Chris Lumens <clumens(a)redhat.com>
+
+MAINTAINERCLEANFILES = Makefile.in
+
+pkgpyexecdir = $(pyexecdir)/py$(PACKAGE_NAME)
+commondir = $(pkgpyexecdir)/ui/lib
+common_PYTHON = *.py
--
1.7.11.2
11 years, 4 months