[blivet:rhel7/master 0/3] #1076055 related patches
by Anne Mulhern
Related anaconda patches coming up soon.
mulhern (3):
Add some comments to _resizable and resizable attributes.
Revert "Make space for LUKS metadata if creating encrypted device
(#1038847)"
Set up Blivet.resizeDevice() to handle LUKS devices (#1076055)
blivet/__init__.py | 24 ++++++++++++++++++++++++
blivet/devicefactory.py | 12 +-----------
blivet/devices.py | 41 +++++++++++++++++++++++++++++++++++++++--
3 files changed, 64 insertions(+), 13 deletions(-)
--
1.9.3
9 years, 8 months
[PATCH] Fix a bad use of WIFSIGNALED
by David Shea
Popen.returncode does not encode statuses in the same way as os.wait, so
using the os.WIF* methods on the returncodes is erroneous. Fix the
conditional in execReadlines to look for signals in the encoding used by
Popen and correct exec_readlines_test_exits.
---
pyanaconda/iutil.py | 2 +-
tests/pyanaconda_tests/iutil_test.py | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index 621ccff..bf4928d 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -366,7 +366,7 @@ def execReadlines(command, argv, stdin=None, root='/', env_prune=None):
# Output finished, check for the process dying unexpectedly
# and stop the iteration
if self._proc.poll() is not None:
- if os.WIFSIGNALED(self._proc.returncode):
+ if self._proc.returncode < 0:
raise OSError("process '%s' was killed" % self._argv)
raise StopIteration
diff --git a/tests/pyanaconda_tests/iutil_test.py b/tests/pyanaconda_tests/iutil_test.py
index a08e167..da33d8e 100644
--- a/tests/pyanaconda_tests/iutil_test.py
+++ b/tests/pyanaconda_tests/iutil_test.py
@@ -166,7 +166,8 @@ exit 0
def exec_readlines_test_exits(self):
"""Test execReadlines in different child exit situations."""
- # These tests raise OSError once output has been consumed
+ # Tests that exit on signal will raise OSError once output
+ # has been consumed, otherwise the test will exit normally.
# Test a normal, non-0 exit
with tempfile.NamedTemporaryFile() as testscript:
@@ -183,7 +184,7 @@ exit 1
self.assertEqual(rl_iterator.next(), "one")
self.assertEqual(rl_iterator.next(), "two")
self.assertEqual(rl_iterator.next(), "three")
- self.assertRaises(OSError, rl_iterator.next)
+ self.assertRaises(StopIteration, rl_iterator.next)
# Test exit on signal
with tempfile.NamedTemporaryFile() as testscript:
@@ -217,7 +218,7 @@ exit 1
self.assertEqual(rl_iterator.next(), "one")
self.assertEqual(rl_iterator.next(), "two")
self.assertEqual(rl_iterator.next(), "three")
- self.assertRaises(OSError, rl_iterator.next)
+ self.assertRaises(StopIteration, rl_iterator.next)
with tempfile.NamedTemporaryFile() as testscript:
testscript.write("""#!/bin/sh
--
2.1.0
9 years, 8 months
[PATCH rhel7-patch] Fix position of Refresh List button in filter spoke (#1065716)
by Radek Vykydal
DASD button was added before i pushed Refresh button patch so I need to adjust
it.
Related: rhbz#1065716
---
pyanaconda/ui/gui/spokes/filter.glade | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/filter.glade b/pyanaconda/ui/gui/spokes/filter.glade
index e65a2da..440213f 100644
--- a/pyanaconda/ui/gui/spokes/filter.glade
+++ b/pyanaconda/ui/gui/spokes/filter.glade
@@ -1695,7 +1695,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
</object>
--
1.9.3
9 years, 8 months
[PATCH rhel7-branch] network: handle dbus UnknownMethod exception on invalid objects (#1061796)
by Radek Vykydal
Another instance of what has been fixed by
commit 57c029ae7be92bf9d8a7e8f2ec552b4294d23f6c
This time catch it when getting properties via python-dbus api.
Resolves: rhbz#1061796
---
pyanaconda/ui/gui/spokes/network.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index 355756f..40a8cb0 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -997,7 +997,15 @@ class NetworkControlBox(GObject.GObject):
# TODO NM_GI_BUGS
ap_dbus = dbus.SystemBus().get_object(NM_SERVICE, ap.get_path())
- mode = getNMObjProperty(ap_dbus, ".AccessPoint", "Mode")
+ try:
+ mode = getNMObjProperty(ap_dbus, ".AccessPoint", "Mode")
+ except dbus.DBusException as e:
+ # object has became invalid (race)
+ if e.get_dbus_name() == "org.freedesktop.DBus.Error.UnknownMethod":
+ return
+ else:
+ raise
+
security = self._ap_security_dbus(ap)
--
1.9.3
9 years, 8 months
[PATCH] Enable MAKEDEBUG in /etc/sysconfig/kernel .
by Peter Jones
This will cause new grubby to make "debug" entries by default.
Related: rhbz#957681
Signed-off-by: Peter Jones <pjones(a)redhat.com>
---
pyanaconda/bootloader.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index c3aafef..a9456d6 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -2360,7 +2360,12 @@ def writeSysconfigKernel(storage, version):
f.write("\n")
f.write("# DEFAULTKERNEL specifies the default kernel package type\n")
f.write("DEFAULTKERNEL=%s\n" % kernel)
+ f.write("\n")
+ f.write("# MAKEDEBUG specifies if new-kernel-pkg should create non-default\n")
+ f.write("# \"debug\" entries for new kernels.\n")
+ f.write("MAKEDEBUG=yes\n")
if storage.bootloader.trusted_boot:
+ f.write("\n")
f.write("# HYPERVISOR specifies the default multiboot kernel\n")
f.write("HYPERVISOR=/boot/tboot.gz\n")
f.write("HYPERVISOR_ARGS=logging=vga,serial,memory\n")
--
1.9.3
9 years, 8 months
[PATCH rhel7-branch] Use shim on uefi now.
by Peter Jones
Related: rhbz#1100048
Signed-off-by: Peter Jones <pjones(a)redhat.com>
---
pyanaconda/bootloader.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index a9456d6..bf5cc22 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1753,15 +1753,12 @@ class EFIGRUB(GRUB2):
def check(self):
return True
-# FIXME: We need to include grubby, and omit the shim package
-# on aarch64 until we get all the EFI bits in place.
+# FIXME: We need to include grubby
class Aarch64EFIGRUB(EFIGRUB):
- packages = ["grub2-efi", "efibootmgr", "grubby"]
+ packages = ["grub2-efi", "efibootmgr", "shim", "grubby"]
_serial_consoles = ["ttyAMA", "ttyS"]
- _efi_binary = "\\grubaa64.efi"
-
class MacEFIGRUB(EFIGRUB):
def mactel_config(self):
if os.path.exists(iutil.getSysroot() + "/usr/libexec/mactel-boot-setup"):
--
1.9.3
9 years, 8 months
[PATCH lorax] Rework how including /usr/share/doc/anaconda works.
by Chris Lumens
A string passed to runcmd cannot contain a pipe character. So instead
of further find magic, I'm just going to move the directory out of the
way, take care of the deletion, and then move it back.
---
share/runtime-cleanup.tmpl | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/share/runtime-cleanup.tmpl b/share/runtime-cleanup.tmpl
index e7fdcd2..b2b05ac 100644
--- a/share/runtime-cleanup.tmpl
+++ b/share/runtime-cleanup.tmpl
@@ -330,7 +330,14 @@ removefrom ${product.name}-logos /usr/share/icons/{Bluecurve,oxygen}/*
removefrom ${product.name}-logos /usr/share/{firstboot,gnome-screensaver,kde4,pixmaps}/*
## Remove everything from /usr/share/doc except for anaconda's help files.
-runcmd find ${root}/usr/share/doc -depth -mindepth 1 -path ${root}/usr/share/doc/anaconda -prune -o -type d -print0 | xargs -0 rm -r
+%if exists(root+"/usr/share/doc/anaconda"):
+ move ${root}/usr/share/doc/anaconda ${root}/usr/
+ remove ${root}/usr/share/doc
+ mkdir ${root}/usr/share/doc
+ move ${root}/usr/anaconda ${root}/usr/share/doc/
+%else:
+ remove ${root}/usr/share/doc
+%endif
## cleanup_python_files()
runcmd find ${root} -name "*.pyo" -type f -delete
--
1.9.3
9 years, 8 months
[f21/master] Handle 0's returned by Gdk
by David Shea
Sometimes gdk doesn't know how big a monitor is. This should not make us
crash.
---
pyanaconda/ui/gui/__init__.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index 656051b..df98360 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -522,6 +522,10 @@ class GraphicalUserInterface(UserInterface):
monitor_width_mm = screen.get_monitor_width_mm(primary)
monitor_height_mm = screen.get_monitor_height_mm(primary)
+ # Sometimes gdk returns 0 for physical widths and heights
+ if monitor_height_mm == 0 or monitor_width_mm == 0:
+ return
+
# Check if this monitor is high DPI, using heuristics from gnome-settings-dpi.
# If the monitor has a height >= 1200 pixels and a resolution > 192 dpi in both
# x and y directions, apply a scaling factor of 2 so that anaconda isn't all tiny
--
2.1.0
9 years, 8 months
[PATCH blivet v2] disable LVM metadata backup during image installs (#1066004)
by Will Woods
Hello again!
This is version two of this patchset, with all Anne's changes incorporated.
It's intended for master and rhel7 (the bug in question is a RHEL7 bug).
The first patch refactors devicelibs.lvm to move _getConfigArgs into lvm(),
which now works just like its analogue in mdraid.py.
The second patch factors out LVMAsRootTestCaseBase from LVMAsRootTestCase so
I can add a new test case in patch 3. (It also fixes a buglet in tearDown.)
The third patch adds flags.lvm_metadata_backup, which (if set) directs lvm()
to disable its automatic backup/archive of metadata. It also adds a
(new, separate) test case for that functionality.
The last patch was the real goal: if *anaconda* is doing an image install,
then we disable flags.lvm_metadata_backup so we don't get LVM writing junk
all over /etc/lvm during image builds.
(This happens in update_from_anaconda_flags because I don't want to change
behavior for anything other than anaconda; all other callers get the default
behavior unless they request otherwise.)
diffstat:
blivet/devicelibs/lvm.py | 125 +++++++++++++++++++-------------------
blivet/flags.py | 9 +++
tests/devicelibs_test/lvm_test.py | 49 ++++++++++++---
3 files changed, 113 insertions(+), 70 deletions(-)
The code's a little more verbose than the first version of the patchset, but
I think it's improved by Anne's suggestions, so I'm willing to take the
minor hit to my lifetime code-contribution stats.
Thanks for your time and consideration, kind reviewers!
-w
9 years, 8 months
[PATCH] Sort the contents of the file system type combo box.
by Chris Lumens
---
pyanaconda/ui/gui/spokes/custom.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index c500a1a..859dcf5 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -279,9 +279,13 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
(isinstance(obj, FS) or
obj.type in ["biosboot", "prepboot", "swap"]))
if supported_fs:
- actions.add_action(self._fsCombo.append_text, obj.name)
self._fs_types.append(obj.name)
+ # Display the file system types in alphabetical order.
+ self._fs_types.sort()
+ for ty in self._fs_types:
+ actions.add_action(self._fsCombo.append_text, ty)
+
actions.fire()
@property
--
1.9.3
9 years, 8 months