[PATCH 0/4] Peck away at some more of the C code in isys
by David Shea
This leaves in isys.c: a call to sync(), a call to settimeofday(), a function
that returns the version from some CFLAGS, and a SIGSEGV handler. The first can
be removed when we move to Python 3.
David Shea (4):
Convert isys.isIsoImage to python code
Remove isys.isPseudoTTY
Added a note about when and how to remove isys.sync
Remove a bunch of unused includes and tests for headers
configure.ac | 50 ++---------------------------
pyanaconda/isys/Makefile.am | 16 ++--------
pyanaconda/isys/__init__.py | 17 +++++++---
pyanaconda/isys/isofs.c | 57 ---------------------------------
pyanaconda/isys/isys.c | 77 +--------------------------------------------
pyanaconda/isys/isys.h | 31 ------------------
widgets/configure.ac | 2 +-
7 files changed, 20 insertions(+), 230 deletions(-)
delete mode 100644 pyanaconda/isys/isofs.c
delete mode 100644 pyanaconda/isys/isys.h
--
1.9.0
10 years, 2 months
[master/rhel7-branch] Force reboot the system on cmdline error. (#1034773)
by Samantha N. Bueno
(I'm not seeing this pop up in my mail folder, so....re-sending;
apologies if anyone sees this twice.)
A system would not reboot under all cases where a CmdlineError was
raised, so just force it this way.
Resolves: rhbz#1034773
---
pyanaconda/exception.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
index 13f5ba9..c7ab659 100644
--- a/pyanaconda/exception.py
+++ b/pyanaconda/exception.py
@@ -107,7 +107,7 @@ class AnacondaExceptionHandler(ExceptionHandler):
# for a few seconds before exiting the installer
print(cmdline_error_msg)
time.sleep(180)
- sys.exit(0)
+ os.system("reboot")
else:
try:
# pylint: disable-msg=E0611
--
1.8.3.1
10 years, 2 months
[PATCH] Focus the language search input by default (#973967)
by David Shea
---
pyanaconda/ui/gui/spokes/welcome.glade | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/welcome.glade b/pyanaconda/ui/gui/spokes/welcome.glade
index 0de940c..fbf32c0 100644
--- a/pyanaconda/ui/gui/spokes/welcome.glade
+++ b/pyanaconda/ui/gui/spokes/welcome.glade
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Thu Oct 17 10:59:43 2013 -->
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires gtk+ 3.2 -->
+ <requires lib="gtk+" version="3.2"/>
<!-- interface-requires AnacondaWidgets 1.0 -->
<object class="GtkDialog" id="betaWarnDialog">
<property name="width_request">300</property>
@@ -441,6 +441,7 @@
<object class="GtkEntry" id="languageEntry">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="has_focus">True</property>
<property name="valign">start</property>
<property name="invisible_char">●</property>
<property name="secondary_icon_name">edit-clear-symbolic</property>
--
1.8.5.3
10 years, 2 months
[blivet:rhel7/master 0/2] Fix problems with what accordion displays
by Anne Mulhern
Remove... is the same as before, but with extra parentheses.
Find more used...this was cherry-picked from master branch. It prevents the
previously observed problem (that a PartitionDevice shows up both in unused
and in new_devices, by leaving it out of unused).
But the effect of these two changes, which I think are both correct, is to
leave the accordion completely empty. Since there are no unused devices,
no Unknown OS/Unknown format page shows up. But since new_devices contains
no swaps and no mounts, the "New..." root doesn't get a page made for it,
either. And no pages in accordion leads to traceback.
So, I'm providing a new anaconda patch to go with this as well.
It's a wild guess.
David Lehman (1):
Find more used devices when calculating unused devices (#1043763)
mulhern (1):
Remove sibling physical and logical volume actions (#1043763)
blivet/__init__.py | 6 ++++--
blivet/devicetree.py | 4 +++-
2 files changed, 7 insertions(+), 3 deletions(-)
--
1.8.3.1
10 years, 2 months
[anaconda:rhel7/master] Omit a few more devices from new_devices (#1043763)
by Anne Mulhern
Resolves: rhbz#1043763
It is an error for new_devices to be non-empty, but for the swaps and mounts
arguments passed to new_root's Root constructor to be empty.
The added condition is synthesized from the calculation for mounts and swaps
to prevent this happening.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
pyanaconda/ui/gui/spokes/custom.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 61506fc..2a5393e 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -926,11 +926,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# Now it's time to populate the accordion.
# A device scheduled for formatting only belongs in the new root.
- new_devices = [d for d in self._devices if (d.isleaf or
- d.type.startswith("btrfs"))
- and
- not d.format.exists and
- not d.partitioned]
+ new_devices = [d for d in self._devices if
+ (d.isleaf or d.type.startswith("btrfs")) and
+ ((d.format.mountable and not d.format.mountpoint) or d.format.type == "swap") and
+ not d.format.exists and
+ not d.partitioned]
# If mountpoints have been assigned to any existing devices, go ahead
# and pull those in along with any existing swap devices. It doesn't
--
1.8.3.1
10 years, 2 months
A couple of simple text-mode fixes
by Samantha N. Bueno
First is a re-post of an old patch with vpodzime's suggestions; the
summary hub gets a custom prompt with a 'b' to begin installation option
so that it's much more clear to users installation will start.
Second modifies the timezone spoke prompt to include notice about the
'c' to continue option (which in this case will dump users out to the
summary hub), which has always been present.
10 years, 2 months
[PATCH rhel7/master] Handle missing environments specified through kickstart (#1067492).
by Chris Lumens
---
pyanaconda/packaging/yumpayload.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 4872484..b4ce2b8 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -1199,10 +1199,18 @@ reposdir=%s
"""
self._selectYumGroup("core")
+ env = None
+
if self.data.packages.default and self.environments:
- self.selectEnvironment(self.environments[0])
+ env = self.environments[0]
elif self.data.packages.environment:
- self.selectEnvironment(self.data.packages.environment)
+ env = self.data.packages.environment
+
+ if env:
+ try:
+ self.selectEnvironment(env)
+ except NoSuchGroup as e:
+ self._handleMissing(e)
for package in self.data.packages.packageList:
try:
--
1.8.3.1
10 years, 2 months
[PATCH 1/2] Don't traceback when no size is given in kickstart (#1067707).
by Chris Lumens
There are various circumstances where a size may not be given - recommended swap
size, grow, and the like. We need to ignore these situations and let the
methods we call deal with the default value. This bug was caused by
ea61ee97601b3aa3f49c2163d0b86c48ef6a3e31. I've added a test case for it.
---
pyanaconda/kickstart.py | 8 ++++++
tests/storage/cases/__init__.py | 2 +-
tests/storage/cases/bz1067707.py | 51 ++++++++++++++++++++++++++++++++++++++
tests/storage/run_storage_tests.py | 7 ++++--
4 files changed, 65 insertions(+), 3 deletions(-)
create mode 100644 tests/storage/cases/bz1067707.py
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 1c5a64a..7ab7151 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -710,6 +710,8 @@ class LogVolData(commands.logvol.F20_LogVolData):
size = Size(spec="%d MiB" % self.size)
except (ValueError, SizeParamsError):
raise KickstartValueError(formatErrorMsg(self.lineno, msg="The size %s is not valid." % self.size))
+ except TypeError:
+ pass
if self.mountpoint == "swap":
ty = "swap"
@@ -852,6 +854,8 @@ class LogVolData(commands.logvol.F20_LogVolData):
maxsize = Size(spec="%d MiB" % self.maxSizeMB)
except (ValueError, SizeParamsError):
raise KickstartValueError(formatErrorMsg(self.lineno, msg="The maximum size %s is not valid." % self.maxSizeMB))
+ except TypeError:
+ pass
else:
maxsize = None
@@ -942,6 +946,8 @@ class PartitionData(commands.partition.F18_PartData):
size = Size(spec="%d MiB" % self.size)
except (ValueError, SizeParamsError):
raise KickstartValueError(formatErrorMsg(self.lineno, msg="The size %s is not valid." % self.size))
+ except TypeError:
+ pass
if self.onbiosdisk != "":
for (disk, biosdisk) in storage.eddDict.iteritems():
@@ -1096,6 +1102,8 @@ class PartitionData(commands.partition.F18_PartData):
maxsize = Size(spec="%d MiB" % self.maxSizeMB)
except (ValueError, SizeParamsError):
raise KickstartValueError(formatErrorMsg(self.lineno, msg="The maximum size %s is not valid." % self.maxSizeMB))
+ except TypeError:
+ pass
else:
maxsize = None
diff --git a/tests/storage/cases/__init__.py b/tests/storage/cases/__init__.py
index 1e2fd5f..fae1f9e 100644
--- a/tests/storage/cases/__init__.py
+++ b/tests/storage/cases/__init__.py
@@ -119,7 +119,7 @@ class TestCaseComponent(object):
def __init__(self):
"""Create a new TestCaseComponent instance. This __init__ method should
typically do very little. However, subclasses must be sure to set
- self.disksToCreate. This attribute is a list of (disk name, size in MB)
+ self.disksToCreate. This attribute is a list of (disk name, blivet.Size)
tuples that will be used in this test. Disks given in this list will
be automatically created by setupDisks and destroyed by tearDownDisks.
"""
diff --git a/tests/storage/cases/bz1067707.py b/tests/storage/cases/bz1067707.py
new file mode 100644
index 0000000..b67c15d
--- /dev/null
+++ b/tests/storage/cases/bz1067707.py
@@ -0,0 +1,51 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2014 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>
+
+from . import TestCase, TestCaseComponent
+from blivet.size import Size
+
+class SwapWithRecommendedSizeComponent(TestCaseComponent):
+ name = "SwapWithRecommendedSize"
+
+ def __init__(self, *args, **kwargs):
+ TestCaseComponent.__init__(self, *args, **kwargs)
+ self.disksToCreate = [("anatest-disk1", Size(spec="1GiB"))]
+
+ @property
+ def ks(self):
+ return """
+zerombr
+clearpart --all --initlabel
+part swap --recommended
+"""
+
+class BZ1067707_TestCase(TestCase):
+ components = [SwapWithRecommendedSizeComponent]
+ name = "1067707"
+ desc = """The members of various commands must have the correct format.
+For instance, raid members must have mdmember, and volgroup members must have
+lvmpv. If they do not have this format, a KickstartValueError should be raised
+during storage execution time.
+
+Note that this is different from the error condition described in the bug.
+There, anaconda was letting the invalid format go and then hitting errors
+much further in installation - during bootloader installation. The real
+bug is that this condition should be detected when the kickstart storage
+commands are being converted to actions.
+"""
diff --git a/tests/storage/run_storage_tests.py b/tests/storage/run_storage_tests.py
index 4af47df..ef155e0 100755
--- a/tests/storage/run_storage_tests.py
+++ b/tests/storage/run_storage_tests.py
@@ -8,7 +8,10 @@ if os.geteuid() != 0:
os._exit(77)
from cases.bz1014545 import BZ1014545_TestCase
-tc = BZ1014545_TestCase()
-failures = tc.run()
+from cases.bz1067707 import BZ1067707_TestCase
+
+for tc in [BZ1014545_TestCase(),
+ BZ1067707_TestCase()]:
+ failures = tc.run()
os._exit(failures)
--
1.8.3.1
10 years, 2 months
[rhel7-branch] Remove unneeded images from the product -logos (#1068721)
by Brian C. Lane
The background images are not used during install, as well as a number
of other items from redhat-logos. There was also a bug -- product.name
did not expand to 'redhat' so it wasn't removing anything from the -logos
package.
Resolves: rhbz#1068721
---
share/runtime-cleanup.tmpl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/share/runtime-cleanup.tmpl b/share/runtime-cleanup.tmpl
index 8ff1cb2..6e0305c 100644
--- a/share/runtime-cleanup.tmpl
+++ b/share/runtime-cleanup.tmpl
@@ -17,7 +17,6 @@ removepkg libcrystalhd crystalhd-firmware ivtv-firmware cx18-firmware
## we don't create new initramfs/bootloader conf inside anaconda
## (that happens inside the target system after we install dracut/grubby)
removepkg dracut-network grubby anaconda-dracut
-removefrom ${product.name}-logos /usr/share/plymouth/*
## In order to execute the /usr move on upgrades we need convertfs from dracut
## We also need dracut-shutdown.service and dracut-initramfs-restore to reboot
removefrom dracut --allbut /usr/lib/dracut/modules.d/30convertfs/convertfs.sh \
@@ -332,9 +331,10 @@ removefrom xorg-x11-drv-wacom /usr/bin/*
removefrom xorg-x11-fonts-misc --allbut /usr/share/X11/fonts/misc/{6x13,encodings,fonts,*cursor}*
removefrom xorg-x11-server-utils --allbut /usr/bin/xrandr /usr/share/X11/rgb.txt
removefrom yum /etc/* /usr/share/locale/* /usr/share/yum-cli/*
-removefrom ${product.name}-logos /etc/*
-removefrom ${product.name}-logos /usr/share/icons/{Bluecurve,oxygen}/*
-removefrom ${product.name}-logos /usr/share/{firstboot,gnome-screensaver,kde4,pixmaps}/*
+removefrom redhat-logos /etc/*
+removefrom redhat-logos /usr/share/icons/{Bluecurve,oxygen}/*
+removefrom redhat-logos /usr/share/{firstboot,gnome-screensaver,kde4,pixmaps}/*
+removefrom redhat-logos /usr/share/{plymouth,backgrounds}*
## RHEL cleanups
removefrom subscription-manager --allbut /etc/rhsm/* /usr/share/rhsm/* /var/log/rhsm/* \
--
1.8.5.3
10 years, 2 months
[blivet][rhel7-branch/master][PATCH] Include tmpfs mounts in post-install kickstart output
by Martin Kolman
We check if a given device should be included in the post-install kickstart by comparing their
parent class to a map of supported parent classes. Turns out the ancestry of the tmpfs device
is a bit different so it was not being included. Adding tmpfs to the map of supported classes
fixed it.
Also another small change was needed - providing format to ksdata - so that the resulting
kickstart line dost not include the (in this context incorrect) --noformat option.
With these changes, tmpfs mounts created during installation are now correctly
included in the post-installation kickstart file.
Martin Kolman (1):
Include tmpfs mounts in post-install kickstart (#1061063)
blivet/__init__.py | 1 +
blivet/devices.py | 6 ++++++
2 files changed, 7 insertions(+)
--
1.8.5.3
10 years, 2 months