[PATCH 1/2] Remove the last references to isysLoadKeymap.
by Chris Lumens
---
pyanaconda/isys/isys.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/pyanaconda/isys/isys.c b/pyanaconda/isys/isys.c
index 35b2f33..9b9046a 100644
--- a/pyanaconda/isys/isys.c
+++ b/pyanaconda/isys/isys.c
@@ -92,7 +92,6 @@ static PyObject * doWipeRaidSuperblock(PyObject * s, PyObject * args);
static PyObject * doGetRaidChunkSize(PyObject * s, PyObject * args);
static PyObject * doDevSpaceFree(PyObject * s, PyObject * args);
static PyObject * doResetResolv(PyObject * s, PyObject * args);
-static PyObject * doLoadKeymap(PyObject * s, PyObject * args);
static PyObject * doExt2Dirty(PyObject * s, PyObject * args);
static PyObject * doExt2HasJournal(PyObject * s, PyObject * args);
static PyObject * doEjectCdrom(PyObject * s, PyObject * args);
@@ -384,23 +383,6 @@ static PyObject * doDevSpaceFree(PyObject * s, PyObject * args) {
return PyLong_FromUnsignedLongLong(size>>20);
}
-static PyObject * doLoadKeymap (PyObject * s, PyObject * args) {
- char * keymap;
- int ret;
-
- if (!PyArg_ParseTuple(args, "s", &keymap)) return NULL;
-
- ret = isysLoadKeymap (keymap);
- if (ret) {
- errno = -ret;
- PyErr_SetFromErrno(PyExc_SystemError);
- return NULL;
- }
-
- Py_INCREF(Py_None);
- return Py_None;
-}
-
static PyObject * doExt2Dirty(PyObject * s, PyObject * args) {
char * device;
ext2_filsys fsys;
--
1.7.11.2
11 years, 9 months
[PATCH 0/5] replace lokkit for selinux
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
Well, it does a bit more than that :) I decided it was better to make
SimpleConfigFile more generally useful, so I did that first. This also removes
a whole file, so that's a bonus. I added tests to the simpleconfig tests to
cover the new features as well.
I've tested this on pre-merge newui and it works. All the simpleconfig tests
also pass.
Brian C. Lane (5):
simpleconfig: rewrite to better support commented config files
tests: cleanup whitespace in simpleconfig_test.py
tests: Add tests for new SimpleConfigFile features
replace lokkit for selinux settings (#815540)
remove Security class
pyanaconda/__init__.py | 4 +-
pyanaconda/install.py | 1 +
pyanaconda/kickstart.py | 20 +++
pyanaconda/security.py | 63 --------
pyanaconda/simpleconfig.py | 222 ++++++++++++++++++----------
tests/pyanaconda_test/simpleconfig_test.py | 90 ++++++++----
6 files changed, 227 insertions(+), 173 deletions(-)
delete mode 100644 pyanaconda/security.py
--
1.7.7.6
11 years, 9 months
[PATCH] Use the UEFI shim to load grub.
by Peter Jones
For UEFI Secure Boot support, we need to install the shim pre-boot
loader, and use it to load grub2.
---
pyanaconda/bootloader.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index ea4de5e..fc01558 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1749,7 +1749,7 @@ class GRUB2(GRUB):
self.stage2_device.format.sync(root=ROOT_PATH)
class EFIGRUB(GRUB2):
- packages = ["grub2-efi", "efibootmgr"]
+ packages = ["grub2-efi", "efibootmgr", "shim"]
can_dual_boot = False
@property
@@ -1809,7 +1809,7 @@ class EFIGRUB(GRUB2):
rc = self.efibootmgr("-c", "-w", "-L", productName,
"-d", boot_disk.path, "-p", boot_part_num,
"-l",
- self.efi_dir_as_efifs_dir + "\\grubx64.efi",
+ self.efi_dir_as_efifs_dir + "\\bootx64.efi",
root=ROOT_PATH,
stdout="/dev/tty5", stderr="/dev/tty5")
if rc:
--
1.7.11.2
11 years, 9 months
[PATCH master] A little fix of newui -> master merge (iscsi offload devices)
by Radek Vykydal
---
pyanaconda/network.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 22025ff..0f38b5e 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -477,7 +477,7 @@ def waitForConnection():
# get a kernel cmdline string for dracut needed for access to storage host
def dracutSetupArgs(networkStorageDevice):
- if networkStorageDevice.nic == "default":
+ if networkStorageDevice.nic == "default" or ":" in networkStorageDevice.nic:
nic = ifaceForHostIP(networkStorageDevice.host_address)
if not nic:
return ""
@@ -885,7 +885,7 @@ def usedByRootOnISCSI(iface, storage):
for d in storage.devices:
if (isinstance(d, iScsiDiskDevice) and
rootdev.dependsOn(d)):
- if d.nic == "default":
+ if d.nic == "default" or ":" in d.nic:
if iface == ifaceForHostIP(d.host_address):
return True
elif d.nic == iface:
--
1.7.4
11 years, 9 months
[PATCH 1/2] add command line option to set the arm platform.
by Dennis Gilmore
Use case is to create images using livemedia-creator where we wont be
running on the target platform.
Signed-off-by: Dennis Gilmore <dennis(a)ausil.us>
---
anaconda | 4 ++++
pyanaconda/flags.py | 1 +
pyanaconda/iutil.py | 3 +++
3 files changed, 8 insertions(+)
diff --git a/anaconda b/anaconda
index fc679c9..4bb2399 100755
--- a/anaconda
+++ b/anaconda
@@ -222,6 +222,7 @@ def parseOptions(argv=None, cmdline=None):
op.add_option("--kickstart", dest="ksfile")
op.add_option("--rescue", dest="rescue", action="store_true", default=False)
op.add_option("--targetarch", "rpmarch", dest="targetArch", type="string")
+ op.add_option("--armplatform", "armplatform", dest="armPlatform", type="string")
op.add_option("-m", "--method", dest="method", default=None)
op.add_option("--repo", dest="method", default=None)
@@ -803,6 +804,9 @@ if __name__ == "__main__":
if opts.targetArch:
flags.targetarch = opts.targetArch
+ if opts.armPlatform:
+ flags.armPlatform = opts.armPlatform
+
# set flags
flags.dmraid = opts.dmraid
flags.mpath = opts.mpath
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index 92584fd..db5c5ef 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -58,6 +58,7 @@ class Flags(object):
self.targetarch = None
self.useIPv4 = True
self.useIPv6 = True
+ self.armPlatform = None
self.preexisting_x11 = False
self.noverifyssl = False
self.imageInstall = False
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index ed6d098..a57b643 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -627,6 +627,9 @@ def getARMMachine():
if not isARM():
return 0
+ if flags.armPlatform:
+ return flags.armPlatform
+
armMachine = os.uname()[2].rpartition('.' )[2]
if armMachine.startswith('arm'):
--
1.7.11.2
11 years, 9 months
[PATCH anaconda/master] Modify kernelPackages to select the right kernel for ARM systems.
by d.marlin
From: "d.marlin" <dmarlin(a)redhat.com>
Signed-off-by: David A. Marlin <dmarlin(a)redhat.com>
---
pyanaconda/packaging/__init__.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index 8c5a560..0a47ff6 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -600,6 +600,12 @@ class PackagePayload(Payload):
def kernelPackages(self):
from pyanaconda.isys import isPaeAvailable
kernels = ["kernel"]
+
+ # most ARM systems use platform-specific kernels
+ if iutil.isARM():
+ if anaconda.platform.armMachine is not None:
+ kernels = ["kernel-%s" % anaconda.platform.armMachine]
+
if isPaeAvailable():
kernels.insert(0, "kernel-PAE")
--
1.7.6.5
11 years, 9 months
[PATCH] Require new version of python-meh
by Vratislav Podzimek
---
anaconda.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 86fc57e..bcc59f4 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -40,7 +40,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%define yumutilsver 1.1.11-3
%define iscsiver 6.2.0.870-3
%define pythoncryptsetupver 0.1.1
-%define mehver 0.13-1
+%define mehver 0.14-1
%define sckeyboardver 1.3.1
%define libblkidver 2.17.1-1
%define fcoeutilsver 1.0.12-3.20100323git
--
1.7.11.2
11 years, 9 months
[PATCH] ARM: add command line option to set the platform.
by Dennis Gilmore
Use case is to create images using livemedia-creator where we wont be
running on the target platform
Signed-off-by: Dennis Gilmore <dennis(a)ausil.us>
---
anaconda | 4 ++++
pyanaconda/iutil.py | 3 +++
2 files changed, 7 insertions(+)
diff --git a/anaconda b/anaconda
index fc679c9..c37dd72 100755
--- a/anaconda
+++ b/anaconda
@@ -222,6 +222,7 @@ def parseOptions(argv=None, cmdline=None):
op.add_option("--kickstart", dest="ksfile")
op.add_option("--rescue", dest="rescue", action="store_true", default=False)
op.add_option("--targetarch", "rpmarch", dest="targetArch", type="string")
+ op.add_option("--targetplatform", "platform", dest="targetPlatform", type="string")
op.add_option("-m", "--method", dest="method", default=None)
op.add_option("--repo", dest="method", default=None)
@@ -803,6 +804,9 @@ if __name__ == "__main__":
if opts.targetArch:
flags.targetarch = opts.targetArch
+ if opts.targetPlatform:
+ flags.platform = opts.targetPlatform
+
# set flags
flags.dmraid = opts.dmraid
flags.mpath = opts.mpath
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index ed6d098..aef4cc6 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -627,6 +627,9 @@ def getARMMachine():
if not isARM():
return 0
+ if flags.platform:
+ return flags.platform
+
armMachine = os.uname()[2].rpartition('.' )[2]
if armMachine.startswith('arm'):
--
1.7.10.4
11 years, 9 months
[PATCH 1/2] ARM: break out the setup of OMAP systems as they need to have a vfat partition at the start of the disk in order for the SOC to load u-boot from. Signed-off-by: Dennis Gilmore <dennis@ausil.us>
by Dennis Gilmore
---
pyanaconda/platform.py | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/platform.py b/pyanaconda/platform.py
index 1611797..05a496f 100644
--- a/pyanaconda/platform.py
+++ b/pyanaconda/platform.py
@@ -348,6 +348,32 @@ class ARM(Platform):
def armMachine(self):
return self._armMachine
+class omapARM(ARM):
+ _bootloaderClass = bootloader.UBOOTuEnv
+ _boot_stage1_format_types = ["vfat"]
+ _boot_stage1_device_types = ["partition"]
+ _boot_stage1_mountpoints = ["/boot/uboot"]
+ _boot_mbr_description = N_("Master Boot Record")
+ _boot_descriptions = {"disk": _boot_mbr_description,
+ "partition": Platform._boot_partition_description}
+
+ def setDefaultPartitioning(self):
+ from storage.partspec import PartSpec
+ ret = Platform.setDefaultPartitioning(self)
+ ret.append(PartSpec(mountpoint="/boot/uboot", fstype="vfat", size=20,
+ maxSize=20,
+ grow=True, weight=self.weight(fstype="vfat")))
+ return ret
+
+ def weight(self, fstype=None, mountpoint=None):
+ score = Platform.weight(self, fstype=fstype, mountpoint=mountpoint)
+ if score:
+ return score
+ elif fstype == "vfat" and mountpoint == "/boot/uboot":
+ return 6000
+ else:
+ return 0
+
def getPlatform(anaconda):
"""Check the architecture of the system and return an instance of a
Platform subclass to match. If the architecture could not be determined,
@@ -375,6 +401,11 @@ def getPlatform(anaconda):
elif iutil.isX86():
return X86(anaconda)
elif iutil.isARM():
- return ARM(anaconda)
+ armMachine = iutil.getARMMachine()
+
+ if (armMachine == "omap" ):
+ return omapARM(anaconda)
+ else:
+ return ARM(anaconda)
else:
raise SystemError, "Could not determine system architecture."
--
1.7.10.4
11 years, 9 months
[PATCH] Do not run Gtk.main() from a separate thread in exception handling
by Vratislav Podzimek
Multiple threads drawing in a Gtk.main loop cause Gtk crash. To prevent such
crashes, we need to run exception handling dialogs in the same thread as the
main loop (if running).
---
pyanaconda/exception.py | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
index 96c2c1a..70deed5 100644
--- a/pyanaconda/exception.py
+++ b/pyanaconda/exception.py
@@ -31,6 +31,7 @@ from flags import flags
import kickstart
import storage.errors
from pyanaconda.constants import ROOT_PATH
+from gi.repository import GLib
import logging
log = logging.getLogger("anaconda")
@@ -41,6 +42,22 @@ _ = lambda x: gettext.ldgettext("anaconda", x)
class AnacondaExceptionHandler(ExceptionHandler):
def handleException(self, (ty, value, tb), obj):
+
+ def run_handleException_on_idle(args_tuple):
+ """
+ Helper function with one argument only so that it can be registered
+ with GLib.idle_add() to run on idle.
+
+ @param args_tuple: ((ty, value, tb), obj)
+
+ """
+
+ trace, obj = args_tuple
+ ty, value, tb = trace
+
+ super(AnacondaExceptionHandler, self).handleException((ty, value, tb),
+ obj)
+
if issubclass(ty, storage.errors.StorageError) and value.hardware_fault:
hw_error_msg = _("The installation was stopped due to what "
"seems to be a problem with your hardware. "
@@ -49,8 +66,14 @@ class AnacondaExceptionHandler(ExceptionHandler):
self.intf.showError(hw_error_msg)
sys.exit(0)
else:
- super(AnacondaExceptionHandler, self).handleException((ty, value, tb),
- obj)
+ if GLib.main_depth() > 0:
+ # main loop is running, don't crash it by running another one
+ # potentially from a different thread
+ GLib.idle_add(run_handleException_on_idle,
+ ((ty, value, tb), obj))
+ else:
+ super(AnacondaExceptionHandler, self).handleException(
+ (ty, value, tb), obj)
def postWriteHook(self, (ty, value, tb), anaconda):
# See if /mnt/sysimage is present and put exception there as well
--
1.7.10.4
11 years, 9 months