[rhel7] remove epdb SIGHUP debug handler (#1065557)
by Brian C. Lane
epdb isn't being shipped so remove the debug handler.
Related: rhbz#1065557
---
anaconda | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/anaconda b/anaconda
index f7b859e..881477b 100755
--- a/anaconda
+++ b/anaconda
@@ -416,13 +416,6 @@ def check_memory(anaconda, opts, display_mode=None):
anaconda.displayMode = 't'
time.sleep(2)
-def startDebugger(signum, frame):
- try:
- import epdb
- epdb.serve(skip=1)
- except ImportError:
- log.error("Failed to start epdb remote debugging; epdb module import failed")
-
def setupDisplay(anaconda, opts, addon_paths=None):
from pyanaconda.ui.tui.simpleline import App
from pyanaconda.ui.tui.spokes.askvnc import AskVNCSpoke
@@ -780,8 +773,6 @@ if __name__ == "__main__":
pidfile = open("/var/run/anaconda.pid", "w")
pidfile.write("%s\n" % (os.getpid(),))
del pidfile
- # add our own additional signal handlers
- signal.signal(signal.SIGHUP, startDebugger)
anaconda.opts = opts
--
1.8.5.3
10 years, 3 months
[blivet:rhel7/master] Remove sibling physical and logical volume actions (#1043763)
by Anne Mulhern
Related: rhbz#1043763
If a disk with a physical volume belonging to volume group A is hidden,
then the actions associated with the other logical volumes and physical
volumes belonging to volume group A are removed.
---
blivet/devicetree.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 8a79f14..099770a 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1803,7 +1803,9 @@ class DeviceTree(object):
device.id))
for action in reversed(self._actions):
- if not action.device.dependsOn(device) and action.device != device:
+ if not (action.device.dependsOn(device) or \
+ isinstance(device, LVMVolumeGroupDevice) and (action.device in device.pvs or action.device in device.lvs) or \
+ action.device == device):
continue
log.debug("cancelling action: %s" % action)
--
1.8.3.1
10 years, 3 months
[rhel6-branch] Skip comments in dmidecode output (#1064701)
by Brian C. Lane
On SMBIOS > 2.7 dmidecode outputs some comments before the serial
number. This ignores them and trims off any trailing spaces/newlines.
---
loader/urlinstall.c | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/loader/urlinstall.c b/loader/urlinstall.c
index 93a4360..a51ec4e 100644
--- a/loader/urlinstall.c
+++ b/loader/urlinstall.c
@@ -95,26 +95,34 @@ static char **headers() {
if (FL_KICKSTART_SEND_SERIAL(flags) && !access("/sbin/dmidecode", X_OK)) {
FILE *f;
char sn[1024];
- size_t sn_len;
+ char *p;
if ((f = popen("/sbin/dmidecode -s system-serial-number", "r")) == NULL) {
logMessage(CRITICAL, "%s: %d: %m", __func__, __LINE__);
abort();
}
- sn_len = fread(sn, sizeof(char), 1023, f);
- if (ferror(f)) {
- logMessage(CRITICAL, "%s: %d: %m", __func__, __LINE__);
- abort();
+ /* dmidecode output may be multiline and may include comments, get the
+ * first non-comment line.
+ */
+ while(!feof(f)) {
+ p = fgets(sn, sizeof(sn), f);
+ if (p == NULL || ferror(f)) {
+ logMessage(CRITICAL, "%s: %d: %m", __func__, __LINE__);
+ abort();
+ }
+ if (sn[0] != '#')
+ break;
}
-
- sn[sn_len] = '\0';
pclose(f);
- extraHeaders = realloc(extraHeaders, (len+1)*sizeof(char *));
+ /* Trim off any trailing newlines or spaces */
+ for (p=sn+strlen(sn); p != sn && !isspace(*p); p--);
+ *p = '\0';
+ logMessage(INFO, "Extra HTTP Header: X-System-Serial-Number: %s", sn);
+ extraHeaders = realloc(extraHeaders, (len+1)*sizeof(char *));
checked_asprintf(&extraHeaders[len], "X-System-Serial-Number: %s", sn);
-
len++;
}
--
1.8.5.3
10 years, 3 months
[master/rhel7] reiserfs is not supported (#1066635)
by Brian C. Lane
So don't install reiserfs-utils, even if there is an existing partition.
Resolves: rhbz#1066635
---
pyanaconda/installclasses/rhel.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/installclasses/rhel.py b/pyanaconda/installclasses/rhel.py
index 02dab71..59d7ccc 100644
--- a/pyanaconda/installclasses/rhel.py
+++ b/pyanaconda/installclasses/rhel.py
@@ -36,7 +36,7 @@ class InstallClass(BaseInstallClass):
bootloaderTimeoutDefault = 5
bootloaderExtraArgs = []
- ignoredPackages = ["ntfsprogs"]
+ ignoredPackages = ["ntfsprogs", "reiserfs-utils"]
installUpdates = False
--
1.8.5.3
10 years, 3 months
[master/rhel7-branch] Re-apply disk selection on error in TUi storage. (#1056316)
by Samantha N. Bueno
(This includes bcl's suggestion to reduce duplication of functions/logic.)
====
This copies over some more logic from the GUI storage spoke
that should make error handling a bit more sane.
Resolves: rhbz#1056316
---
pyanaconda/ui/gui/spokes/storage.py | 19 +++++--------------
pyanaconda/ui/lib/disks.py | 9 +++++++++
pyanaconda/ui/tui/spokes/storage.py | 4 +++-
3 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index bdd48ef..9c73140 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -43,7 +43,7 @@
from gi.repository import Gdk, GLib, Gtk, AnacondaWidgets
from pyanaconda.ui.communication import hubQ
-from pyanaconda.ui.lib.disks import getDisks, isLocalDisk, size_str
+from pyanaconda.ui.lib.disks import getDisks, isLocalDisk, size_str, applyDiskSelection
from pyanaconda.ui.gui import GUIObject
from pyanaconda.ui.gui.spokes import NormalSpoke
from pyanaconda.ui.gui.spokes.lib.cart import SelectedDisksDialog
@@ -304,17 +304,8 @@ class StorageSpoke(NormalSpoke, StorageChecker):
self._encrypted = self.builder.get_object("encryptionCheckbox")
self._reclaim = self.builder.get_object("reclaimCheckbox")
- def _applyDiskSelection(self, use_names):
- onlyuse = use_names[:]
- for disk in (d for d in self.storage.disks if d.name in onlyuse):
- onlyuse.extend(d.name for d in disk.ancestors
- if d.name not in onlyuse)
-
- self.data.ignoredisk.onlyuse = onlyuse
- self.data.clearpart.drives = use_names[:]
-
def apply(self):
- self._applyDiskSelection(self.selected_disks)
+ applyDiskSelection(self.selected_disks)
self.data.autopart.autopart = self.autopart
self.data.autopart.type = self.autoPartType
self.data.autopart.encrypted = self.encrypted
@@ -371,7 +362,7 @@ class StorageSpoke(NormalSpoke, StorageChecker):
self.storage.reset()
self.disks = getDisks(self.storage.devicetree)
# now set ksdata back to the user's specified config
- self._applyDiskSelection(self.selected_disks)
+ applyDiskSelection(self.selected_disks)
except BootLoaderError as e:
log.error("BootLoader setup failed: %s", e)
StorageChecker.errors = str(e).split("\n")
@@ -632,7 +623,7 @@ class StorageSpoke(NormalSpoke, StorageChecker):
# if there's only one disk, select it by default
if len(self.disks) == 1 and not self.selected_disks:
- self._applyDiskSelection([self.disks[0].name])
+ applyDiskSelection([self.disks[0].name])
self._ready = True
hubQ.send_ready(self.__class__.__name__, False)
@@ -899,7 +890,7 @@ class StorageSpoke(NormalSpoke, StorageChecker):
# However, we do want to apply current selections so the disk cart off
# the filter spoke will display the correct information.
- self._applyDiskSelection(self.selected_disks)
+ applyDiskSelection(self.selected_disks)
self.skipTo = "FilterSpoke"
NormalSpoke.on_back_clicked(self, button)
diff --git a/pyanaconda/ui/lib/disks.py b/pyanaconda/ui/lib/disks.py
index 486208b..ddfc6ea 100644
--- a/pyanaconda/ui/lib/disks.py
+++ b/pyanaconda/ui/lib/disks.py
@@ -82,3 +82,12 @@ def size_str(mb):
spec = "%f mb" % mb
return str(Size(spec=spec)).upper()
+
+def applyDiskSelection(use_names):
+ onlyuse = use_names[:]
+ for disk in (d for d in self.storage.disks if d.name in onlyuse):
+ onlyuse.extend(d.name for d in disk.ancestors
+ if d.name not in onlyuse)
+
+ self.data.ignoredisk.onlyuse = onlyuse
+ self.data.clearpart.drives = use_names[:]
diff --git a/pyanaconda/ui/tui/spokes/storage.py b/pyanaconda/ui/tui/spokes/storage.py
index b4d40f1..4dc458d 100644
--- a/pyanaconda/ui/tui/spokes/storage.py
+++ b/pyanaconda/ui/tui/spokes/storage.py
@@ -22,7 +22,7 @@
# which has the same license and authored by David Lehman <dlehman(a)redhat.com>
#
-from pyanaconda.ui.lib.disks import getDisks, size_str
+from pyanaconda.ui.lib.disks import getDisks, size_str, applyDiskSelection
from pyanaconda.ui.tui.spokes import NormalTUISpoke
from pyanaconda.ui.tui.simpleline import TextWidget, CheckboxWidget
@@ -297,6 +297,8 @@ class StorageSpoke(NormalTUISpoke):
self.storage.config.update(self.data)
self.storage.autoPartType = self.data.clearpart.type
self.storage.reset()
+ # now set ksdata back to the user's specified config
+ applyDiskSelection(self.selected_disks)
self._ready = True
except BootLoaderError as e:
log.error("BootLoader setup failed: %s", e)
--
1.8.3.1
10 years, 3 months
[blivet] Return str from Size.humanReadable (#1066721)
by David Shea
The values returned from humanReadable should behave the same as the
values returned from __str__.
---
blivet/size.py | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/blivet/size.py b/blivet/size.py
index 03bfa38..99c121d 100644
--- a/blivet/size.py
+++ b/blivet/size.py
@@ -63,9 +63,11 @@ _prefixes = _binaryPrefix + _decimalPrefix
# Translated versions of the byte and prefix arrays
# All strings are decoded as utf-8 so that locale-specific upper/lower functions work
def _xlated_bytes():
+ """Return a translated version of the bytes list as a list of unicode strings"""
return [_(b).decode("utf-8") for b in _bytes]
def _xlated_prefixes():
+ """Return translated prefixes as unicode strings"""
return [_Prefix(p.factor, _(p.prefix).decode("utf-8"), _(p.abbr).decode("utf-8")) \
for p in _prefixes]
@@ -208,7 +210,7 @@ class Size(Decimal):
def __str__(self, context=None):
# Convert the result of humanReadable from unicode to str
- return self.humanReadable().encode('utf-8')
+ return self.humanReadable()
def __repr__(self):
return "Size('%s')" % self
@@ -279,7 +281,7 @@ class Size(Decimal):
check = self._trimEnd("%d" % self)
if abs(Decimal(check)) < 1000:
- return "%s %s" % (check, _("B").decode("utf-8"))
+ return "%s %s" % (check, _("B"))
for factor, prefix, abbr in _xlated_prefixes():
newcheck = super(Size, self).__div__(Decimal(factor))
@@ -311,7 +313,10 @@ class Size(Decimal):
if radix != '.':
retval = retval.replace('.', radix)
+ # abbr and prefix are unicode objects so that lower/upper work correctly
+ # Convert them to str before concatenating so that the return type is
+ # str.
if abbr:
- return retval + " " + abbr + _("B").decode("utf-8")
+ return retval + " " + abbr.encode("utf-8") + _("B")
else:
- return retval + " " + prefix + P_("byte", "bytes", newcheck).decode("utf-8")
+ return retval + " " + prefix.encode("utf-8") + P_("byte", "bytes", newcheck)
--
1.8.5.3
10 years, 3 months
[rhel7-branch][PATCH] Disable tmpfs in the GUI for now
by Martin Kolman
Tmpfs is already disable in GUI on master and this patch
also disables it in GUI on rhel7-branch.
The main issue is, that due to the unique properties
of tmpfs, it doesn't really fit to the current
custom partitioning GUI without big changes.
Some of the issues:
* the GUI can't really handle a filesystem that does not
actually consume any harddrive space
* obviously tmpfs can't reside on RAID or LVM
* there is no way to explicitly create a partition
of a given filesystem type and creating partition with
the default filesystem and changing it to tmpfs seems
wrong
* the same thing for switching a "normal" partition
to tmpfs
So let's disable it for now in the GUI.
It can be reenabled once the GUI can handle it properly.
Martin Kolman (1):
Disable tmpfs in the GUI (#1061666)
pyanaconda/ui/gui/spokes/custom.py | 1 +
1 file changed, 1 insertion(+)
--
1.8.5.3
10 years, 3 months
[PATCH rhel7/master] Change the CSS class name of the sidebar (#1067049).
by Chris Lumens
GTK appears to use the "sidebar" class for file chooser dialogs, so we need to
not or file chooser dialogs will get a branded background.
---
data/anaconda-gtk.css | 4 ++--
widgets/src/HubWindow.c | 4 ++--
widgets/src/StandaloneWindow.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/data/anaconda-gtk.css b/data/anaconda-gtk.css
index 04e79bf..ec018a5 100644
--- a/data/anaconda-gtk.css
+++ b/data/anaconda-gtk.css
@@ -5,7 +5,7 @@
/* logo and sidebar classes for RHEL */
-.sidebar {
+.logo-sidebar {
background-image: url('/usr/share/anaconda/pixmaps/sidebar-bg.png');
background-color: @redhat;
background-repeat: no-repeat;
@@ -31,7 +31,7 @@ AnacondaSpokeWindow #layout-indicator {
/* swap these into logo & sidebar classes for Fedora */
/*
-.logo{
+.logo-sidebar {
background-image: url('/usr/share/anaconda/pixmaps/logo.png');
background-position: 50% 20px;
background-repeat: no-repeat;
diff --git a/widgets/src/HubWindow.c b/widgets/src/HubWindow.c
index 486851e..6756a31 100644
--- a/widgets/src/HubWindow.c
+++ b/widgets/src/HubWindow.c
@@ -106,9 +106,9 @@ static gboolean anaconda_hub_window_on_draw(GtkWidget *win, cairo_t *cr) {
GtkStyleContext * context = gtk_widget_get_style_context(win);
gtk_style_context_save (context);
- gtk_style_context_add_class(context, "sidebar");
+ gtk_style_context_add_class(context, "logo-sidebar");
gtk_render_background(context, cr, 0, 0, get_sidebar_width(win), get_sidebar_height(win));
- gtk_style_context_remove_class(context, "sidebar");
+ gtk_style_context_remove_class(context, "logo-sidebar");
gtk_style_context_add_class(context, "logo");
gtk_render_background(context, cr, 0, 0, get_sidebar_width(win), get_sidebar_height(win));
diff --git a/widgets/src/StandaloneWindow.c b/widgets/src/StandaloneWindow.c
index 3fe24c9..cdc77d1 100644
--- a/widgets/src/StandaloneWindow.c
+++ b/widgets/src/StandaloneWindow.c
@@ -94,9 +94,9 @@ static gboolean anaconda_standalone_window_on_draw(GtkWidget *win, cairo_t *cr)
GtkStyleContext * context = gtk_widget_get_style_context(win);
gtk_style_context_save (context);
- gtk_style_context_add_class(context, "sidebar");
+ gtk_style_context_add_class(context, "logo-sidebar");
gtk_render_background(context, cr, 0, 0, get_sidebar_width(win), get_sidebar_height(win));
- gtk_style_context_remove_class(context, "sidebar");
+ gtk_style_context_remove_class(context, "logo-sidebar");
gtk_style_context_add_class(context, "logo");
gtk_render_background(context, cr, 0, 0, get_sidebar_width(win), get_sidebar_height(win));
--
1.8.3.1
10 years, 3 months
[rhel7-branch] Another patch for swap size calculations
by Vratislav Podzimek
If this patch gets ACKed, I'm gonna switch the bug 1053462 to anaconda and will
try to get the acks. Otherwise ideas how to resolve this in a better/different
way welcome a lot!
Vratislav Podzimek (1):
Use blivet's getFreeSpace for limitting automatic swap size
pyanaconda/kickstart.py | 30 ++++++++++++++++++++++--------
pyanaconda/ui/gui/spokes/custom.py | 3 +++
pyanaconda/ui/gui/spokes/storage.py | 12 +++---------
3 files changed, 28 insertions(+), 17 deletions(-)
--
1.8.5.3
10 years, 3 months
[PATCH] Remove an unused import
by David Shea
---
dracut/driver-updates | 1 -
1 file changed, 1 deletion(-)
diff --git a/dracut/driver-updates b/dracut/driver-updates
index 0f493d2..3187c76 100755
--- a/dracut/driver-updates
+++ b/dracut/driver-updates
@@ -43,7 +43,6 @@ import os
import subprocess
import time
import glob
-import re
log = logging.getLogger("DD")
--
1.8.5.3
10 years, 3 months