[PATCH] network configuration fixes
by Radek Vykydal
The patchset contains fixes for network configuration:
Move from modifying ifcfg files to using NM dbus api (settings objects) where possible. [1/8, 2/8, 8/8]
Stop writing /etc/sysconfig/network.[3/8]
Fix disabling of ipv6. [4/8, 5/8]
Don't crash on invalid network --device specification. [6/8]
Make modifying ifcfg files more robust (don't crash on missing file, eg for WWAN devices). [7/8, 1/8]
11 years, 3 months
[RHEL6-branch] Add rpm contents to updates.img
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
This adds the -a <rpmfile> command to makeupdates. The only limitation
is that a binary cannot be named the same as a python module that
anaconda uses: block, yum, rpmUtils, urlgrabber, pykickstart, parted, meh
In the future this should be fixed by putting binaries in
/tmp/updates/bin and libraries into /tmp/updates/lib but for
compatiblity with previous RHEL releases they need to be at the top
level of /tmp/updates/
---
scripts/makeupdates | 43 +++++++++++++++++++++++++++++++++++++++++--
1 file changed, 41 insertions(+), 2 deletions(-)
diff --git a/scripts/makeupdates b/scripts/makeupdates
index 8cb252c..af36a75 100755
--- a/scripts/makeupdates
+++ b/scripts/makeupdates
@@ -186,6 +186,38 @@ def copyUpdatedIsys(updates, cwd):
if os.path.isfile(isysmodule):
shutil.copy2(isysmodule, updates)
+def addRpms(updates, add_rpms):
+ """Add the files from an rpm to the update
+
+ This installs the files from any of the standard bin/, sbin/, lib/ and
+ /lib64/ paths into the top of the updates directory tree so that they
+ will be picked up by the installer. Other files are left in place.
+ """
+ # Because of how anaconda extends pythonpath we cannot have any binaries
+ # with these names in the top of the updates.img
+ # TODO: Fix this by adding /tmp/updates/bin to PATH in loader and putting
+ # all the binaries in there instead.
+ PKGNAMES=("block", "yum", "rpmUtils", "urlgrabber", "pykickstart", "parted", "meh")
+
+ if not updates:
+ return
+
+ for rpm in add_rpms:
+ cmd = "cd %s && rpm2cpio %s | cpio -dium" % (updates, rpm)
+ sys.stdout.write(cmd+"\n")
+ os.system(cmd)
+
+ # At this point the rpm contents are all in their own paths. We need the
+ # libraries and binaries to be at the top of the updates image tree.
+ for d in [a+b for a in ("/", "/usr/", "/usr/local/")
+ for b in ("bin/", "sbin/", "lib/", "/lib64/")]:
+ if not os.path.isdir(updates+d):
+ continue
+
+ for f in os.listdir(updates+d):
+ if f not in PKGNAMES:
+ shutil.move(updates+d+"/"+f, updates)
+
def createUpdatesImage(cwd, updates):
os.chdir(updates)
os.system("find . | cpio -c -o | gzip -9cv > %s/updates.img" % (cwd,))
@@ -199,6 +231,7 @@ def usage(cmd):
sys.stdout.write(" -h, --help Display this help and exit.\n")
sys.stdout.write(" -t, --tag Make image from TAG to HEAD.\n")
sys.stdout.write(" -o, --offset Make image from (latest_tag - OFFSET) to HEAD.\n")
+ sys.stdout.write(" -a, --add Add contents of rpm to the update\n")
def main(argv):
prog = os.path.basename(sys.argv[0])
@@ -210,10 +243,11 @@ def main(argv):
tag = None
opts = []
offset = 0
+ add_rpms = []
try:
- opts, args = getopt.getopt(sys.argv[1:], 't:o:kc?',
- ['tag=', 'offset=',
+ opts, args = getopt.getopt(sys.argv[1:], 't:o:a:kc?',
+ ['tag=', 'offset=', "add=",
'keep', 'compile', 'help'])
except getopt.GetoptError:
help = True
@@ -229,6 +263,8 @@ def main(argv):
tag = a
elif o in ('-o', '--offset'):
offset = int(a)
+ elif o in ('-a', '--add'):
+ add_rpms.append(os.path.abspath(a))
else:
unknown = True
@@ -260,6 +296,9 @@ def main(argv):
if isysChanged(tag):
copyUpdatedIsys(updates, cwd)
+ if add_rpms:
+ addRpms(updates, add_rpms)
+
createUpdatesImage(cwd, updates)
if not keep:
--
1.8.0.2
11 years, 3 months
[PATCH 0/2] Exception reporting from threads
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
I have tested this against 18.37.11 and it works in that it will raise (and
display) an exception from within a thread. It depends on something calling
.wait() though, so it won't catch exceptions in threads that are
fire-and-forget.
Brian C. Lane (2):
Add error reporting to threadMgr
Use threadMgr.wait to check threads
pyanaconda/packaging/__init__.py | 8 ++------
pyanaconda/packaging/livepayload.py | 4 +---
pyanaconda/threads.py | 29 +++++++++++++++++++++++++++++
pyanaconda/ui/gui/spokes/custom.py | 4 +---
pyanaconda/ui/gui/spokes/network.py | 4 +---
pyanaconda/ui/gui/spokes/software.py | 12 +++---------
pyanaconda/ui/gui/spokes/source.py | 8 ++------
pyanaconda/ui/gui/spokes/storage.py | 4 +---
pyanaconda/ui/tui/spokes/storage.py | 12 ++++--------
9 files changed, 44 insertions(+), 41 deletions(-)
--
1.8.0.2
11 years, 3 months
[PATCH] LORAX: Make boot configs consistent.
by Daniel Mach
Changes:
Make kernel args the same in every config.
Put 'quiet' at the end of the line - it's usually the first thing a user
removes when debugging.
Fill missing product versions in.
Distinguish between 'install' (installation media) and 'start' (live media).
--
Daniel Mach <dmach(a)redhat.com>
Release Engineering, Red Hat
11 years, 3 months
[PATCH] Add selinux to the list of parameters we pass on (#895860).
by Chris Lumens
---
pyanaconda/bootloader.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 20f7b3b..3ecadcb 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -245,7 +245,8 @@ class BootLoader(object):
# this is so stupid...
global_preserve_args = ["speakup_synth", "apic", "noapic", "apm", "ide",
"noht", "acpi", "video", "pci", "nodmraid",
- "nompath", "nomodeset", "noiswmd", "fips"]
+ "nompath", "nomodeset", "noiswmd", "fips",
+ "selinux"]
preserve_args = []
_trusted_boot = False
--
1.7.11.2
11 years, 3 months
[PATCH] Display error status messages in a darker red color.
by Chris Lumens
This is to draw the user's attention to them a little better. It also allows
me to kill all that CSS provider crud, which it turns out isn't even needed.
This probably changed when I started using the PangoAttrList.
---
widgets/src/SpokeSelector.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/widgets/src/SpokeSelector.c b/widgets/src/SpokeSelector.c
index 25d7cd9..55412f6 100644
--- a/widgets/src/SpokeSelector.c
+++ b/widgets/src/SpokeSelector.c
@@ -61,8 +61,6 @@ struct _AnacondaSpokeSelectorPrivate {
GtkWidget *title_label;
GtkWidget *status_label;
GdkCursor *cursor;
-
- GtkCssProvider *status_provider;
};
G_DEFINE_TYPE(AnacondaSpokeSelector, anaconda_spoke_selector, GTK_TYPE_EVENT_BOX)
@@ -157,6 +155,11 @@ static void format_status_label(AnacondaSpokeSelector *spoke, const char *markup
pango_attr_list_insert(attrs, pango_attr_style_new(PANGO_STYLE_ITALIC));
pango_attr_list_insert(attrs, pango_attr_scale_new(PANGO_SCALE_LARGE));
+ if (anaconda_spoke_selector_get_incomplete(spoke) &&
+ gtk_widget_get_sensitive(GTK_WIDGET(spoke))) {
+ pango_attr_list_insert(attrs, pango_attr_foreground_new(0xcccc, 0x1a1a, 0x1a1a));
+ }
+
/* Ampersands (and maybe other characters) in status text need to be escaped. */
escaped = g_markup_escape_text(markup, -1);
@@ -225,9 +228,6 @@ static void anaconda_spoke_selector_init(AnacondaSpokeSelector *spoke) {
gtk_label_set_max_width_chars(GTK_LABEL(spoke->priv->status_label), 45);
gtk_widget_set_hexpand(GTK_WIDGET(spoke->priv->status_label), FALSE);
- spoke->priv->status_provider = gtk_css_provider_new();
- gtk_css_provider_load_from_data(spoke->priv->status_provider, "GtkLabel { color: @text_color }", -1, NULL);
-
/* Add everything to the grid, add the grid to the widget. */
gtk_grid_attach(GTK_GRID(spoke->priv->grid), spoke->priv->icon, 0, 0, 1, 2);
gtk_grid_attach(GTK_GRID(spoke->priv->grid), spoke->priv->title_label, 1, 0, 1, 1);
@@ -272,14 +272,7 @@ static void anaconda_spoke_selector_set_property(GObject *object, guint prop_id,
break;
case PROP_STATUS: {
- GtkStyleContext *context = gtk_widget_get_style_context(GTK_WIDGET(priv->status_label));
format_status_label(widget, g_value_get_string(value));
-
- if (gtk_widget_get_sensitive(GTK_WIDGET(widget)))
- gtk_style_context_add_provider(context, GTK_STYLE_PROVIDER(priv->status_provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- else
- gtk_style_context_remove_provider(context, GTK_STYLE_PROVIDER(priv->status_provider));
-
break;
}
@@ -321,6 +314,11 @@ gboolean anaconda_spoke_selector_get_incomplete(AnacondaSpokeSelector *spoke) {
void anaconda_spoke_selector_set_incomplete(AnacondaSpokeSelector *spoke, gboolean is_incomplete) {
spoke->priv->is_incomplete = is_incomplete;
gtk_widget_set_visible(GTK_WIDGET(spoke->priv->incomplete_icon), is_incomplete);
+
+ /* We need to update the status label's color, in case this spoke was
+ * previously incomplete but now is not (or the other way around).
+ */
+ format_status_label(spoke, gtk_label_get_text(GTK_LABEL(spoke->priv->status_label)));
}
static gboolean anaconda_spoke_selector_focus_changed(GtkWidget *widget, GdkEventFocus *event, gpointer user_data) {
--
1.7.11.2
11 years, 3 months
[PATCH lorax/F18 and master] Dynamically generate the list of installed platforms for .treeinfo
by d.marlin
From: "d.marlin" <dmarlin(a)redhat.com>
The list of ARM platforms was represented as a static list to be
installed in .treeinfo for Beaker support, but as ARM moves to use
the multiplatform kernel the platform specific kernel images will
no longer be needed. This process is beginning in F18 (3.7 kernel)
with HighBank being the first to use the baseline kernel. Due to
this change, there will be no 'highbank' platform images, but Beaker
tries to import all platforms listed in .treeinfo. To avoid errors,
we should dynamically create the list of ARM plaforms, including
only those that are actually provided.
Signed-off-by: David A. Marlin <dmarlin(a)redhat.com>
---
share/arm.tmpl | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/share/arm.tmpl b/share/arm.tmpl
index fdf5326..a343359 100644
--- a/share/arm.tmpl
+++ b/share/arm.tmpl
@@ -16,21 +16,26 @@ kernelAddress = { 'baseline' : '0x00008000',
'omap' : '0x80008000',
'tegra' : '0x00008000',
}
+
+# keep a comma-delimited list of platforms installed to add to .treeinfo
+platforms = ""
+delimiter = ''
%>
mkdir ${LIVEDIR}
install ${runtime_img} ${LIVEDIR}/squashfs.img
treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img
-# Add platforms to treeinfo for Beaker support.
-treeinfo ${basearch} platforms highbank,imx,mvebu,omap,tegra
-
## install kernels
mkdir ${KERNELDIR}
%for kernel in kernels:
%if kernel.flavor:
installkernel images-${kernel.flavor}-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
installinitrd images-${kernel.flavor}-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
+<%
+ platforms = platforms + delimiter + kernel.flavor
+ delimiter = ','
+%>
%if doupgrade:
## install upgrade image
@@ -87,6 +92,9 @@ mkdir ${KERNELDIR}
%endif
%endfor
+# add platform to treeinfo for Beaker support
+treeinfo ${basearch} platforms ${platforms}
+
## FIXME: ARM may need some extra boot config
--
1.7.10.2
11 years, 3 months
[PATCH lorax/F18 and master] Add a U-Boot wrapped image of 'upgrade.img'.
by d.marlin
From: "d.marlin" <dmarlin(a)redhat.com>
For ARM systems that require U-Boot wrapped images,
perform mkimage to create one for 'upgrade.img'.
Signed-off-by: David A. Marlin <dmarlin(a)redhat.com>
---
share/arm.tmpl | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/share/arm.tmpl b/share/arm.tmpl
index fdf5326..bdad59a 100644
--- a/share/arm.tmpl
+++ b/share/arm.tmpl
@@ -35,6 +35,16 @@ mkdir ${KERNELDIR}
%if doupgrade:
## install upgrade image
installupgradeinitrd images-${kernel.flavor}-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
+
+ runcmd mkimage \
+ -A arm -O linux -T ramdisk -C none \
+ -a 0 -e 0 \
+ -n "${product.name} ${product.version} ${kernel.flavor} ${kernel.arch}" \
+ -d ${outroot}/${KERNELDIR}/upgrade-${kernel.flavor}.img \
+ ${outroot}/${KERNELDIR}/uUpgrade-${kernel.flavor}
+
+ treeinfo images-${kernel.flavor}-${basearch} uupgrade ${KERNELDIR}/uUpgrade-${kernel.flavor}
+
%endif
## create U-Boot wrapped images
@@ -63,6 +73,16 @@ mkdir ${KERNELDIR}
%if doupgrade:
## install upgrade image
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
+
+ runcmd mkimage \
+ -A arm -O linux -T ramdisk -C none \
+ -a 0 -e 0 \
+ -n "${product.name} ${product.version} ${kernel.flavor} ${kernel.arch}" \
+ -d ${outroot}/${KERNELDIR}/upgrade.img \
+ ${outroot}/${KERNELDIR}/uUpgrade
+
+ treeinfo images-${basearch} uupgrade ${KERNELDIR}/uUpgrade
+
%endif
## create U-Boot wrapped images
--
1.7.10.2
11 years, 3 months
[PATCH] Split pyanaconda.storage out into new package python-blivet
by David Lehman
Here's a URL for the patches:
http://dlehman.fedorapeople.org/20130125-storage-split.2/
For those who made it through the previous version of this set, here's a
summary of the changes:
- Use a threading.Lock to serialize program.log output so that the
"Running ...", actual program output, and exit code are always grouped
and ordered correctly.
- Log a string representing the program being run -- not a list of
strings.
- Don't make a new anaconda-installer subpackage.
- Remove a whole bunch more unneeded Requires from anaconda.spec and a
couple more from configure.ac.
- Move get_mount_device and get_mount_paths into blivet.util as a
follow-up patch/commit.
There will also be a small lorax patch specifying install of syslinux
and mactel-boot on appropriate platforms since I've removed them as
dependencies of the anaconda package. The idea is to put all of the
compose-time requirements into lorax templates and keep anaconda's
package requires to what it actually needs to run.
And, finally, here's the lame fedora wiki page for blivet (the rpm will
be called python-blivet), which includes a link to the git repository:
http://fedoraproject.org/wiki/Blivet
I'd like to get these pushed ASAP so I can stop rebasing them.
11 years, 3 months
[master] Exception handling pieces refactorization
by Vratislav Podzimek
All the work lies in PATCH 1/2 and the comment is in its commit message.
Vratislav Podzimek (2):
Refactor and cleanup exception handling pieces
Cleanup some trailing whitespace on otherwise empty lines
pyanaconda/exception.py | 24 ++++++++---
pyanaconda/ui/__init__.py | 30 ++++++-------
pyanaconda/ui/gui/__init__.py | 97 ++++++++++++++++++++++++++++---------------
pyanaconda/ui/tui/__init__.py | 23 +++++-----
4 files changed, 110 insertions(+), 64 deletions(-)
--
1.7.11.7
11 years, 3 months