[PATCH] Tweak spacing in the other storage options grid.
by Chris Lumens
---
pyanaconda/ui/gui/spokes/storage.glade | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.glade b/pyanaconda/ui/gui/spokes/storage.glade
index 7cd2825..011ccdc 100644
--- a/pyanaconda/ui/gui/spokes/storage.glade
+++ b/pyanaconda/ui/gui/spokes/storage.glade
@@ -767,7 +767,8 @@
<property name="margin_left">18</property>
<property name="margin_right">18</property>
<property name="vexpand">False</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">3</property>
<child>
<object class="GtkLabel" id="label10">
<property name="visible">True</property>
--
1.9.0
9 years, 11 months
[blivet:master] RAID patches addendum 1
by Anne Mulhern
Getting the unencrypted backing device
is an action that happens over and over in blivet
DeviceFactory and in anaconda custom spoke as well. I'ld like to make this
a Device property and be consistant in always checking isinstance instead
of some times checking the type string. Right now, checking either amounts
to the same, because nothing extends LUKSDevice, but that could change.
mulhern (1):
Make a StorageDevice.raw_device property and use it where appropriate
blivet/devicefactory.py | 16 +++-------------
blivet/devices.py | 9 +++++++++
tests/devices_test.py | 1 +
3 files changed, 13 insertions(+), 13 deletions(-)
--
1.8.3.1
9 years, 11 months
[PATCH] change default for grub2 save_entry to 0
by Gene Czarcinski
The value that anaconda sets save_entry in /boot/grub2/grubenv is
not valid as there is no corresponding menuentry with that title. The
only reason things work now is that if grub2 finds no match, it boots
the kernel specified in the first (top) menuentry.
grub2-set-default --help results in:
MENU_ENTRY is a number, a menu item title or a menu item identifier
This patch changes the default to be "0".
This results in the value now being correct, produces an expected
result (booting the first kernel), and not requiring any changes
to grubby.
The user will still be able to use grub2-set-default to change the
default value to other settings.
---
pyanaconda/bootloader.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 96c98b4..116c2b9 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1561,8 +1561,7 @@ class GRUB2(GRUB):
log.error("bootloader password setup failed: %s", e)
# make sure the default entry is the OS we are installing
- entry_title = "%s Linux, with Linux %s" % (productName,
- self.default.version)
+ entry_title = "0"
rc = iutil.execInSysroot("grub2-set-default", [entry_title])
if rc:
log.error("failed to set default menu entry to %s", productName)
--
1.9.3
9 years, 11 months
[blivet:master] IPSeriesPPC now supports GPT in Open Firmware
by Mark Hamzy
IBM PowerPC's Open Firmware now supports GPT partitioning.
---
blivet/platform.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/blivet/platform.py b/blivet/platform.py
index 600d66b..498d08c 100644
--- a/blivet/platform.py
+++ b/blivet/platform.py
@@ -246,10 +246,10 @@ class IPSeriesPPC(PPC):
_boot_stage1_max_end = Size("4 GiB")
_boot_prep_description = N_("PReP Boot Partition")
_boot_descriptions = {"partition": _boot_prep_description}
- _disklabel_types = ["msdos"]
+ _disklabel_types = ["msdos", "gpt"]
_boot_stage1_missing_error = N_("You must include a PReP Boot Partition "
- "within the first 4GiB of an MBR-formatted "
- "disk.")
+ "within the first 4GiB of an MBR- "
+ "or GPT-formatted disk.")
def setDefaultPartitioning(self):
ret = PPC.setDefaultPartitioning(self)
--
1.9.0
9 years, 11 months
[PATCH] Work around a parsing bug in GtkBuilder
by David Shea
Add a check for a condition that was broken by gtk+ commit
49fa04212b644f19ce576a8011e3f4fcda6a0806 and garbage up the glade files
to work around it.
---
pyanaconda/ui/gui/spokes/advstorage/iscsi.glade | 1 +
pyanaconda/ui/gui/spokes/datetime_spoke.glade | 1 +
pyanaconda/ui/gui/spokes/filter.glade | 4 ++
pyanaconda/ui/gui/spokes/keyboard.glade | 2 +
pyanaconda/ui/gui/spokes/langsupport.glade | 2 +
pyanaconda/ui/gui/spokes/lib/cart.glade | 1 +
pyanaconda/ui/gui/spokes/lib/resize.glade | 1 +
pyanaconda/ui/gui/spokes/source.glade | 2 +
pyanaconda/ui/gui/spokes/welcome.glade | 2 +
tests/glade/bz1102793/check_bz1102793.py | 64 +++++++++++++++++++++++++
10 files changed, 80 insertions(+)
create mode 100755 tests/glade/bz1102793/check_bz1102793.py
diff --git a/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade b/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
index 1c9b9ea..9b5c6f0 100644
--- a/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
+++ b/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
@@ -728,6 +728,7 @@
<object class="GtkTreeViewColumn" id="nodeSelectedColumn">
<child>
<object class="GtkCellRendererToggle" id="nodeSelectedRenderer">
+ <property name="activatable">True</property>
<signal name="toggled" handler="on_row_toggled" swapped="no"/>
</object>
<attributes>
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.glade b/pyanaconda/ui/gui/spokes/datetime_spoke.glade
index d58e2e7..c9bc520 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.glade
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.glade
@@ -204,6 +204,7 @@
<property name="title" translatable="yes">Use</property>
<child>
<object class="GtkCellRendererToggle" id="removeRenderer">
+ <property name="activatable">True</property>
<signal name="toggled" handler="on_use_server_toggled" swapped="no"/>
</object>
<attributes>
diff --git a/pyanaconda/ui/gui/spokes/filter.glade b/pyanaconda/ui/gui/spokes/filter.glade
index 36bc432..f8163c0 100644
--- a/pyanaconda/ui/gui/spokes/filter.glade
+++ b/pyanaconda/ui/gui/spokes/filter.glade
@@ -345,6 +345,7 @@
<object class="GtkTreeViewColumn" id="searchSelectedCol">
<child>
<object class="GtkCellRendererToggle" id="searchSelectedRenderer">
+ <property name="activatable">True</property>
<signal name="toggled" handler="on_row_toggled" swapped="no"/>
</object>
<attributes>
@@ -726,6 +727,7 @@
<object class="GtkTreeViewColumn" id="multipathSelectedCol">
<child>
<object class="GtkCellRendererToggle" id="multipathSelectedRenderer">
+ <property name="activatable">True</property>
<signal name="toggled" handler="on_row_toggled" swapped="no"/>
</object>
<attributes>
@@ -1072,6 +1074,7 @@
<object class="GtkTreeViewColumn" id="otherSelectedCol">
<child>
<object class="GtkCellRendererToggle" id="otherSelectedRenderer">
+ <property name="activatable">True</property>
<signal name="toggled" handler="on_row_toggled" swapped="no"/>
</object>
<attributes>
@@ -1308,6 +1311,7 @@
<object class="GtkTreeViewColumn" id="zSelectedCol">
<child>
<object class="GtkCellRendererToggle" id="zSelectedRenderer">
+ <property name="activatable">True</property>
<signal name="toggled" handler="on_row_toggled" swapped="no"/>
</object>
<attributes>
diff --git a/pyanaconda/ui/gui/spokes/keyboard.glade b/pyanaconda/ui/gui/spokes/keyboard.glade
index 69c8bfc..edaa247 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.glade
+++ b/pyanaconda/ui/gui/spokes/keyboard.glade
@@ -145,6 +145,7 @@
<property name="search_column">0</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="layoutSelection">
+ <property name="mode">single</property>
<signal name="changed" handler="on_selection_changed" swapped="no"/>
</object>
</child>
@@ -707,6 +708,7 @@
<property name="title" translatable="yes">use</property>
<child>
<object class="GtkCellRendererToggle" id="useRenderer">
+ <property name="activatable">True</property>
<signal name="toggled" handler="on_use_option_toggled" swapped="no"/>
</object>
<attributes>
diff --git a/pyanaconda/ui/gui/spokes/langsupport.glade b/pyanaconda/ui/gui/spokes/langsupport.glade
index 5cf9cad..b595e44 100644
--- a/pyanaconda/ui/gui/spokes/langsupport.glade
+++ b/pyanaconda/ui/gui/spokes/langsupport.glade
@@ -117,6 +117,7 @@
<property name="search_column">0</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="languageViewSelection">
+ <property name="mode">single</property>
<signal name="changed" handler="on_lang_selection_changed" swapped="no"/>
</object>
</child>
@@ -215,6 +216,7 @@
<property name="title" translatable="yes">checked</property>
<child>
<object class="GtkCellRendererToggle" id="checkedRenderer">
+ <property name="activatable">True</property>
<signal name="toggled" handler="on_locale_toggled" swapped="no"/>
</object>
<attributes>
diff --git a/pyanaconda/ui/gui/spokes/lib/cart.glade b/pyanaconda/ui/gui/spokes/lib/cart.glade
index 9e9af05..cd3ff24 100644
--- a/pyanaconda/ui/gui/spokes/lib/cart.glade
+++ b/pyanaconda/ui/gui/spokes/lib/cart.glade
@@ -98,6 +98,7 @@
<property name="model">disk_store</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="disk_selection">
+ <property name="mode">single</property>
<signal name="changed" handler="on_selection_changed" swapped="no"/>
</object>
</child>
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.glade b/pyanaconda/ui/gui/spokes/lib/resize.glade
index 147f22e..3413f5e 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.glade
+++ b/pyanaconda/ui/gui/spokes/lib/resize.glade
@@ -144,6 +144,7 @@
<signal name="row-activated" handler="on_row_clicked" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection" id="diskView-selection">
+ <property name="mode">single</property>
<signal name="changed" handler="on_selection_changed" swapped="no"/>
</object>
</child>
diff --git a/pyanaconda/ui/gui/spokes/source.glade b/pyanaconda/ui/gui/spokes/source.glade
index 38e4d16..2f672b2 100644
--- a/pyanaconda/ui/gui/spokes/source.glade
+++ b/pyanaconda/ui/gui/spokes/source.glade
@@ -960,6 +960,7 @@
<property name="enable_search">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="repoSelection">
+ <property name="mode">single</property>
<signal name="changed" handler="on_repoSelection_changed" swapped="no"/>
</object>
</child>
@@ -968,6 +969,7 @@
<property name="title" translatable="yes">Enabled</property>
<child>
<object class="GtkCellRendererToggle" id="repoEnableRenderer">
+ <property name="activatable">True</property>
<signal name="toggled" handler="on_repoEnable_toggled" swapped="no"/>
</object>
<attributes>
diff --git a/pyanaconda/ui/gui/spokes/welcome.glade b/pyanaconda/ui/gui/spokes/welcome.glade
index ac73bb8..63b59a5 100644
--- a/pyanaconda/ui/gui/spokes/welcome.glade
+++ b/pyanaconda/ui/gui/spokes/welcome.glade
@@ -256,6 +256,7 @@
<property name="search_column">0</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="languageViewSelection">
+ <property name="mode">single</property>
<signal name="changed" handler="on_lang_selection_changed" swapped="no"/>
</object>
</child>
@@ -354,6 +355,7 @@
<property name="search_column">0</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="localeViewSelection">
+ <property name="mode">single</property>
<signal name="changed" handler="on_locale_selection_changed" swapped="no"/>
</object>
</child>
diff --git a/tests/glade/bz1102793/check_bz1102793.py b/tests/glade/bz1102793/check_bz1102793.py
new file mode 100755
index 0000000..54526c6
--- /dev/null
+++ b/tests/glade/bz1102793/check_bz1102793.py
@@ -0,0 +1,64 @@
+#!/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: David Shea <dshea(a)redhat.com>
+
+# Check for objects that contain only a signal element, because GtkBuilder
+# screws these up. This check and its associated changes can be reverted as
+# soon as gtk gets its shit together.
+
+import sys
+import argparse
+
+try:
+ from lxml import etree
+except ImportError:
+ print("You need to install the python-lxml package to run the glade checks")
+ sys.exit(99)
+
+success = True
+
+def main(argv):
+ global success
+
+ for glade_file in argv:
+ # Look for object elements that contain a single signal child and no other children
+ glade_tree = etree.parse(glade_file)
+
+ for problem in glade_tree.xpath("//object[count(child::*) = 1 and local-name(./*) = 'signal']"):
+ print("Problematic signal found at %s:%d" % (glade_file, problem.sourceline))
+ success = False
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser("Check for glade files affected by bug 1102793")
+
+ # Ignore translation arguments
+ parser.add_argument("-t", "--translate", action='store_true',
+ help=argparse.SUPPRESS)
+ parser.add_argument("-p", "--podir", action='store', type=str,
+ metavar='PODIR', help=argparse.SUPPRESS, default='./po')
+
+ parser.add_argument("glade_files", nargs="+", metavar="GLADE-FILE",
+ help='The glade file to check')
+ args = parser.parse_args(args=sys.argv[1:])
+
+ main(args.glade_files)
+
+ if success:
+ sys.exit(0)
+ else:
+ sys.exit(1)
--
1.9.0
9 years, 11 months
[blivet] Allow / in StorageDevice names (#1103751)
by David Shea
---
blivet/devices.py | 11 ++---------
tests/devices_test.py | 4 ++--
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/blivet/devices.py b/blivet/devices.py
index cdd0642..24610aa 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -1118,10 +1118,8 @@ class StorageDevice(Device):
@classmethod
def isNameValid(cls, name):
- # This device corresponds to a file in /dev, so no /'s or nulls,
- # and the name cannot be . or ..
- badchars = any(c in ('\x00', '/') for c in name)
- return not(badchars or name == '.' or name == '..')
+ # Allow any character except NUL, disallow . and ..
+ return not('\x00' in name or name == '.' or name == '..')
class DiskDevice(StorageDevice):
""" A local/generic disk.
@@ -4143,11 +4141,6 @@ class FileDevice(StorageDevice):
log_method_call(self, self.name, status=self.status)
os.unlink(self.path)
- @classmethod
- def isNameValid(cls, name):
- # Override StorageDevice.isNameValid to allow /
- return not('\x00' in name or name == '.' or name == '..')
-
class SparseFileDevice(FileDevice):
"""A sparse file on a filesystem.
This exists for sparse disk images."""
diff --git a/tests/devices_test.py b/tests/devices_test.py
index 6598eba..6f6f547 100644
--- a/tests/devices_test.py
+++ b/tests/devices_test.py
@@ -508,8 +508,8 @@ class DeviceNameTestCase(unittest.TestCase):
def testStorageDefvice(self):
# Check that / and NUL are rejected along with . and ..
- good_names = ['sda1', '1sda', 'good-name']
- bad_names = ['sda/1', 'sda\x00', '.', '..']
+ good_names = ['sda1', '1sda', 'good-name', 'sda/1']
+ bad_names = ['sda\x00', '.', '..']
for name in good_names:
self.assertTrue(StorageDevice.isNameValid(name))
--
1.9.0
9 years, 11 months
[PATCH] network: generate dracut arguments also for IPADDRn ifcfg values (#1103571)
by Radek Vykydal
Resolves: rhbz#1103571
IPADDRn (and GATEWAYn, PREFIXn) would be created in ifcfg files when
configuring network in GUI (using NM Connection Editor) or in kickstart.
Dracut's write-ifcfg.sh still generates IPADDR without the suffix.
---
pyanaconda/network.py | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 75d2711..d0deb89 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -354,18 +354,20 @@ def dracutBootArguments(devname, ifcfg, storage_ipaddr, hostname=None):
if ifcfg.get('bootproto').lower() == 'dhcp':
netargs.add("ip=%s:dhcp" % devname)
else:
- if ifcfg.get('GATEWAY'):
- gateway = ifcfg.get('GATEWAY')
+ cfgidx = ''
+ if ifcfg.get('IPADDR0'):
+ cfgidx = '0'
+ if ifcfg.get('GATEWAY%s' % cfgidx):
+ gateway = ifcfg.get('GATEWAY%s' % cfgidx)
else:
gateway = ""
-
- netmask = ifcfg.get('netmask')
- prefix = ifcfg.get('prefix')
+ netmask = ifcfg.get('NETMASK%s' % cfgidx)
+ prefix = ifcfg.get('PREFIX%s' % cfgidx)
if not netmask and prefix:
netmask = prefix2netmask(int(prefix))
-
- netargs.add("ip=%s::%s:%s:%s:%s:none" % (ifcfg.get('ipaddr'),
- gateway, netmask, hostname, devname))
+ ipaddr = ifcfg.get('IPADDR%s' % cfgidx)
+ netargs.add("ip=%s::%s:%s:%s:%s:none" %
+ (ipaddr, gateway, netmask, hostname, devname))
hwaddr = ifcfg.get("HWADDR")
if hwaddr:
--
1.9.0
9 years, 11 months
[anaconda][master][PATCH] Fix a typo in one of the bootloader installation warning messages (#1103410)
by Martin Kolman
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
pyanaconda/bootloader.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index ce383e5..3781574 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1359,7 +1359,7 @@ class GRUB(BootLoader):
self.stage2_device.level == raid.RAID1 and \
self.stage1_device.type != "mdarray":
if not self.stage1_device.isDisk:
- msg = _("bootloader stage2 device %(stage2dev)s in on a multi-disk array, but bootloader stage1 device %(stage1dev)s is not. " \
+ msg = _("bootloader stage2 device %(stage2dev)s is on a multi-disk array, but bootloader stage1 device %(stage1dev)s is not. " \
"A drive failure in %(stage2dev)s could render the system unbootable.") % \
{"stage1dev" : self.stage1_device.name,
"stage2dev" : self.stage2_device.name}
--
1.9.3
9 years, 11 months