[PATCH master] network: update required NetworkManager version (team support)
by Radek Vykydal
---
anaconda.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index ff3d397..de50aa7 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -29,7 +29,7 @@ Source0: %{name}-%{version}.tar.bz2
%define partedver 1.8.1
%define pypartedver 2.5-2
%define pythonpyblockver 0.45
-%define nmver 1:0.7.1-3.git20090414
+%define nmver 0.9.9.0-10.git20130906
%define dbusver 1.2.3
%define yumutilsver 1.1.11-3
%define mehver 0.23-1
--
1.7.11.7
10 years, 6 months
[blivet] Tidy up tests in devicelibs_test directory.
by Anne Mulhern
The main change is a refactoring that moves any test that does
not currently require the setup and teardown methods in
devicelibs_test.baseclass.DevicelibsTestCase into a separate class that
just extends unittest.TestCase instead of extending DevicelibsTestCase.
This way, these tests can be run w/out the root privileges that
are required by DevicelibsTestCase.
There are also some small import changes.
Some tests that previously checked for a generic ValueError now check for
MDRaidError.
__init__.py files have been added to encourage unittest discovery to
examine subdirectories.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
tests/__init__.py | 0
tests/devicelibs_test/__init__.py | 0
tests/devicelibs_test/crypto_test.py | 2 +-
tests/devicelibs_test/lvm_test.py | 59 +++++++++++++++++-------------------
tests/devicelibs_test/mdraid_test.py | 24 +++++++--------
tests/devicelibs_test/swap_test.py | 3 +-
6 files changed, 42 insertions(+), 46 deletions(-)
create mode 100644 tests/__init__.py
create mode 100644 tests/devicelibs_test/__init__.py
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/devicelibs_test/__init__.py b/tests/devicelibs_test/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/devicelibs_test/crypto_test.py b/tests/devicelibs_test/crypto_test.py
index 0e1422c..7ef49fe 100755
--- a/tests/devicelibs_test/crypto_test.py
+++ b/tests/devicelibs_test/crypto_test.py
@@ -7,7 +7,7 @@ import os
class CryptoTestCase(baseclass.DevicelibsTestCase):
- @skipUnless(os.geteuid() == 0, "requires root privileges")
+ @unittest.skipUnless(os.geteuid() == 0, "requires root privileges")
def testCrypto(self):
_LOOP_DEV0 = self._loopMap[self._LOOP_DEVICES[0]]
_LOOP_DEV1 = self._loopMap[self._LOOP_DEVICES[1]]
diff --git a/tests/devicelibs_test/lvm_test.py b/tests/devicelibs_test/lvm_test.py
index 8690ee2..5679118 100755
--- a/tests/devicelibs_test/lvm_test.py
+++ b/tests/devicelibs_test/lvm_test.py
@@ -1,16 +1,40 @@
#!/usr/bin/python
import baseclass
+import os
import unittest
-class LVMTestCase(baseclass.DevicelibsTestCase):
+import blivet.devicelibs.lvm as lvm
- @skipUnless(os.geteuid() == 0, "requires root privileges")
+class LVMTestCase(unittest.TestCase):
+
+ def testGetPossiblePhysicalExtents(self):
+ # pass
+ self.assertEqual(lvm.getPossiblePhysicalExtents(4),
+ filter(lambda pe: pe > 4, map(lambda power: 2**power, xrange(3, 25))))
+ self.assertEqual(lvm.getPossiblePhysicalExtents(100000),
+ filter(lambda pe: pe > 100000, map(lambda power: 2**power, xrange(3, 25))))
+
+ def testClampSize(self):
+ # pass
+ self.assertEqual(lvm.clampSize(10, 4), 8L)
+ self.assertEqual(lvm.clampSize(10, 4, True), 12L)
+
+ #def testVGUsedSpace(self):
+ # TODO
+ pass
+
+ #def testVGFreeSpace(self):
+ # TODO
+ pass
+
+
+class LVMAsRootTestCase(baseclass.DevicelibsTestCase):
+
+ @unittest.skipUnless(os.geteuid() == 0, "requires root privileges")
def testLVM(self):
_LOOP_DEV0 = self._loopMap[self._LOOP_DEVICES[0]]
_LOOP_DEV1 = self._loopMap[self._LOOP_DEVICES[1]]
- import storage.devicelibs.lvm as lvm
-
##
## pvcreate
##
@@ -199,33 +223,6 @@ class LVMTestCase(baseclass.DevicelibsTestCase):
# pv already removed
self.assertRaises(lvm.LVMError, lvm.pvremove, _LOOP_DEV0)
- def testGetPossiblePhysicalExtents(self):
- # pass
- self.assertEqual(lvm.getPossiblePhysicalExtents(4),
- filter(lambda pe: pe > 4, map(lambda power: 2**power, xrange(3, 25))))
- self.assertEqual(lvm.getPossiblePhysicalExtents(100000),
- filter(lambda pe: pe > 100000, map(lambda power: 2**power, xrange(3, 25))))
-
- def testGetMaxLVSize(self):
- # pass
- self.assertEqual(lvm.getMaxLVSize(), 16*1024**2)
-
- def testSafeLVMName(self):
- # pass
- self.assertEqual(lvm.safeLvmName("/strange/lv*name5"), "strange_lvname5")
-
- def testClampSize(self):
- # pass
- self.assertEqual(lvm.clampSize(10, 4), 8L)
- self.assertEqual(lvm.clampSize(10, 4, True), 12L)
-
- #def testVGUsedSpace(self):
- # TODO
- pass
-
- #def testVGFreeSpace(self):
- # TODO
- pass
def suite():
diff --git a/tests/devicelibs_test/mdraid_test.py b/tests/devicelibs_test/mdraid_test.py
index 2c2fc0d..bc47b76 100755
--- a/tests/devicelibs_test/mdraid_test.py
+++ b/tests/devicelibs_test/mdraid_test.py
@@ -1,18 +1,15 @@
#!/usr/bin/python
import baseclass
+import os
import unittest
import time
-class MDRaidTestCase(baseclass.DevicelibsTestCase):
+import blivet.devicelibs.mdraid as mdraid
+import blivet.errors as errors
- def testMDRaid(self):
- import blivet.devicelibs.mdraid as mdraid
+class MDRaidTestCase(unittest.TestCase):
- ##
- ## getRaidLevels
- ##
- # pass
- self.assertEqual(mdraid.getRaidLevels(), mdraid.getRaidLevels())
+ def testMDRaid(self):
##
## get_raid_min_members
@@ -26,7 +23,7 @@ class MDRaidTestCase(baseclass.DevicelibsTestCase):
# fail
# unsupported raid
- self.assertRaises(ValueError, mdraid.get_raid_min_members, 8)
+ self.assertRaises(errors.MDRaidError, mdraid.get_raid_min_members, 8)
##
## get_raid_max_spares
@@ -40,15 +37,16 @@ class MDRaidTestCase(baseclass.DevicelibsTestCase):
# fail
# unsupported raid
- self.assertRaises(ValueError, mdraid.get_raid_max_spares, 8, 5)
+ self.assertRaises(errors.MDRaidError, mdraid.get_raid_max_spares, 8, 5)
+
- @skipUnless(os.geteuid() == 0, "requires root privileges")
+class MDRaidAsRootTestCase(baseclass.DevicelibsTestCase):
+
+ @unittest.skipUnless(os.geteuid() == 0, "requires root privileges")
def testMDRaidAsRoot(self):
_LOOP_DEV0 = self._loopMap[self._LOOP_DEVICES[0]]
_LOOP_DEV1 = self._loopMap[self._LOOP_DEVICES[1]]
- import blivet.devicelibs.mdraid as mdraid
-
##
## mdcreate
##
diff --git a/tests/devicelibs_test/swap_test.py b/tests/devicelibs_test/swap_test.py
index 1f319d5..a71c1af 100755
--- a/tests/devicelibs_test/swap_test.py
+++ b/tests/devicelibs_test/swap_test.py
@@ -1,10 +1,11 @@
#!/usr/bin/python
import baseclass
+import os
import unittest
class SwapTestCase(baseclass.DevicelibsTestCase):
- @skipUnless(os.geteuid() == 0, "requires root privileges")
+ @unittest.skipUnless(os.geteuid() == 0, "requires root privileges")
def testSwap(self):
_LOOP_DEV0 = self._loopMap[self._LOOP_DEVICES[0]]
_LOOP_DEV1 = self._loopMap[self._LOOP_DEVICES[1]]
--
1.8.3.1
10 years, 6 months
[lorax/master/rhel7] Include partx (#1022899)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
Used by lvm on multipath.
Resolves: rhbz#1022899
---
share/runtime-cleanup.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/share/runtime-cleanup.tmpl b/share/runtime-cleanup.tmpl
index 1063c3b..eba813d 100644
--- a/share/runtime-cleanup.tmpl
+++ b/share/runtime-cleanup.tmpl
@@ -322,7 +322,7 @@ removefrom util-linux --allbut \
/usr/bin/{dmesg,getopt,kill,login,lsblk,more,mount,umount,mountpoint} \
/etc/mtab /etc/pam.d/login /etc/pam.d/remote \
/usr/sbin/{agetty,blkid,blockdev,clock,fdisk,fsck,fstrim,hwclock,losetup} \
- /usr/sbin/{mkswap,nologin,sfdisk,swapoff,swapon,wipefs} \
+ /usr/sbin/{mkswap,nologin,sfdisk,swapoff,swapon,wipefs,partx} \
/usr/bin/logger
removefrom volume_key-libs /usr/share/locale/*
removefrom wget /etc/* /usr/share/locale/*
--
1.8.3.1
10 years, 6 months
[master][v2] Speed up the AddLayouts dialog
by Vratislav Podzimek
Vratislav Podzimek (3):
Allow having unique thread names with given prefix
Add function to map functions on items in the main thread
Initialize the AddLayouts dialog in advance in the KeyboardSpoke
pyanaconda/constants.py | 5 ++
pyanaconda/threads.py | 19 +++++++
pyanaconda/ui/gui/spokes/datetime_spoke.py | 7 +--
pyanaconda/ui/gui/spokes/keyboard.py | 50 ++++++++++++-----
pyanaconda/ui/gui/utils.py | 88 +++++++++++++++++++++++++++++-
pyanaconda/ui/tui/simpleline/base.py | 8 +--
6 files changed, 150 insertions(+), 27 deletions(-)
--
1.8.4.2
10 years, 6 months
[PATCH] Fix some pylint problems in network.py.
by Chris Lumens
---
pyanaconda/network.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 41b4a28..2e353c5 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -506,14 +506,14 @@ def add_connection_for_ksdata(networkdata, devname):
values.append(['connection', 'id', devname, 's'])
values.append(['team', 'interface-name', devname, 's'])
values.append(['team', 'config', networkdata.teamconfig, 's'])
- for i, (slave, cfg) in enumerate(networkdata.teamslaves):
+ for _i, (slave, cfg) in enumerate(networkdata.teamslaves):
# assume ethernet, TODO: infiniband, wifi, vlan
#slave_name = "%s slave %d" % (devname, i)
slave_name = slave
svalues = []
- suuid = str(uuid.uuid4())
+ suuid = str(uuid4())
svalues.append(['connection', 'uuid', suuid, 's'])
svalues.append(['connection', 'id', slave_name, 's'])
svalues.append(['connection', 'slave-type', 'team', 's'])
@@ -819,14 +819,14 @@ def get_team_slaves(master_specs):
for settings in slave_settings:
try:
cfg = settings["team-port"]["config"]
- except KeyError as e:
+ except KeyError:
cfg = ""
devname = settings["connection"].get("interface-name")
#nm-c-e doesn't save device name
# TODO: wifi, infiniband
if not devname:
- type = settings["connection"]["type"]
- if type == "802-3-ethernet":
+ ty = settings["connection"]["type"]
+ if ty == "802-3-ethernet":
hwaddr = settings["802-3-ethernet"]["mac-address"]
hwaddr = ":".join("%02X" % b for b in hwaddr)
devname = nm.nm_hwaddr_to_device_name(hwaddr)
--
1.8.3.1
10 years, 6 months
[master/f20-branch][v2] Nice decorator and little tweaks
by Vratislav Podzimek
The following videos show the difference in the AddLayout dialog (no, the first
one doesn't stuck in the middle that's how it really "works"):
http://vpodzime.fedorapeople.org/magical_decorator_without.webm
http://vpodzime.fedorapeople.org/magical_decorator_with.webm
Vratislav Podzimek (4):
A nice decorator making Anaconda's GUI more responsive
Short-circuit layouts matching
Add test for the have_word_match function
Use timing decorator for more actions
pyanaconda/iutil.py | 20 +++++
pyanaconda/ui/gui/__init__.py | 12 +--
pyanaconda/ui/gui/spokes/keyboard.py | 25 ++----
.../ui/gui/spokes/lib/lang_locale_handler.py | 3 +-
pyanaconda/ui/gui/spokes/lib/resize.py | 3 +-
pyanaconda/ui/gui/utils.py | 90 +++++++++++++++++++++-
tests/pyanaconda_tests/iutil_test.py | 22 ++++++
7 files changed, 144 insertions(+), 31 deletions(-)
--
1.8.4.2
10 years, 6 months
[PATCH master] network: call GDBus proxy methods like python
by Radek Vykydal
---
pyanaconda/nm.py | 136 +++++++++----------------------------------------------
1 file changed, 22 insertions(+), 114 deletions(-)
diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py
index b039211..4daaa49 100644
--- a/pyanaconda/nm.py
+++ b/pyanaconda/nm.py
@@ -82,13 +82,8 @@ def _get_proxy(bus_type=Gio.BusType.SYSTEM,
def _get_property(object_path, prop, interface_name_suffix=""):
interface_name = "org.freedesktop.NetworkManager" + interface_name_suffix
proxy = _get_proxy(object_path=object_path, interface_name="org.freedesktop.DBus.Properties")
- args = GLib.Variant('(ss)', (interface_name, prop))
try:
- prop = proxy.call_sync("Get",
- args,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
+ prop = proxy.Get('(ss)', interface_name, prop)
except GLib.GError as e:
if "org.freedesktop.DBus.Error.AccessDenied" in e.message:
return None
@@ -97,7 +92,7 @@ def _get_property(object_path, prop, interface_name_suffix=""):
else:
raise
- return prop.unpack()[0]
+ return prop
def nm_state():
"""Return state of NetworkManager
@@ -139,14 +134,7 @@ def nm_devices():
interfaces = []
proxy = _get_proxy()
- args = None
- devices = proxy.call_sync("GetDevices",
- args,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
-
- devices = devices.unpack()[0]
+ devices = proxy.GetDevices()
for device in devices:
device_type = _get_property(device, "DeviceType", ".Device")
if device_type not in supported_device_types:
@@ -214,20 +202,13 @@ def nm_device_property(name, prop):
retval = None
proxy = _get_proxy()
- args = GLib.Variant('(s)', (name,))
try:
- device = proxy.call_sync("GetDeviceByIpIface",
- args,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
+ device = proxy.GetDeviceByIpIface('(s)', name)
except GLib.GError as e:
if "org.freedesktop.NetworkManager.UnknownDevice" in e.message:
raise UnknownDeviceError(name, e)
raise
- device = device.unpack()[0]
-
retval = _get_property(device, prop, ".Device")
if not retval:
# Look in device type based interface
@@ -602,22 +583,10 @@ def _find_settings(value, key1, key2, format_value=lambda x:x):
proxy = _get_proxy(object_path="/org/freedesktop/NetworkManager/Settings", interface_name="org.freedesktop.NetworkManager.Settings")
- args = None
- connections = proxy.call_sync("ListConnections",
- args,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
-
- for con in connections.unpack()[0]:
+ connections = proxy.ListConnections()
+ for con in connections:
proxy = _get_proxy(object_path=con, interface_name="org.freedesktop.NetworkManager.Settings.Connection")
- args = None
- settings = proxy.call_sync("GetSettings",
- args,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
- settings = settings.unpack()[0]
+ settings = proxy.GetSettings()
try:
v = settings[key1][key2]
except KeyError:
@@ -636,13 +605,7 @@ def nm_get_settings(value, key1, key2, format_value=lambda x:x):
settings_paths = _find_settings(value, key1, key2, format_value)
for settings_path in settings_paths:
proxy = _get_proxy(object_path=settings_path, interface_name="org.freedesktop.NetworkManager.Settings.Connection")
- args = None
- settings = proxy.call_sync("GetSettings",
- args,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
- settings = settings.unpack()[0]
+ settings = proxy.GetSettings()
retval.append(settings)
return retval
@@ -653,21 +616,10 @@ def nm_get_all_settings():
proxy = _get_proxy(object_path="/org/freedesktop/NetworkManager/Settings", interface_name="org.freedesktop.NetworkManager.Settings")
- args = None
- connections = proxy.call_sync("ListConnections",
- args,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
-
- for con in connections.unpack()[0]:
+ connections = proxy.ListConnections()
+ for con in connections:
proxy = _get_proxy(object_path=con, interface_name="org.freedesktop.NetworkManager.Settings.Connection")
- args = None
- settings = proxy.call_sync("GetSettings",
- args,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
+ settings = proxy.GetSettings()
retval.append(settings)
return retval
@@ -695,13 +647,7 @@ def nm_device_setting_value(name, key1, key2):
else:
settings_path = settings_paths[0]
proxy = _get_proxy(object_path=settings_path, interface_name="org.freedesktop.NetworkManager.Settings.Connection")
- args = None
- settings = proxy.call_sync("GetSettings",
- args,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
- settings = settings.unpack()[0]
+ settings = proxy.GetSettings()
try:
value = settings[key1][key2]
except KeyError:
@@ -730,13 +676,7 @@ def nm_ap_setting_value(ssid, key1, key2):
else:
settings_path = settings_paths[0]
proxy = _get_proxy(object_path=settings_path, interface_name="org.freedesktop.NetworkManager.Settings.Connection")
- args = None
- settings = proxy.call_sync("GetSettings",
- args,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
- settings = settings.unpack()[0]
+ settings = proxy.GetSettings()
try:
value = settings[key1][key2]
except KeyError:
@@ -749,26 +689,15 @@ def nm_disconnect_device(name):
:raise UnknownDeviceError: if device is not found
"""
proxy = _get_proxy()
- args = GLib.Variant('(s)', (name,))
try:
- device = proxy.call_sync("GetDeviceByIpIface",
- args,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
+ device = proxy.GetDeviceByIpIface('(s)', name)
except GLib.GError as e:
if "org.freedesktop.NetworkManager.UnknownDevice" in e.message:
raise UnknownDeviceError(name, e)
raise
- device = device.unpack()[0]
device_proxy = _get_proxy(object_path=device, interface_name="org.freedesktop.NetworkManager.Device")
- args = None
- device_proxy.call_sync("Disconnect",
- args,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
+ device_proxy.Disconnect()
def nm_activate_device_connection(dev_name, con_uuid):
"""Activate device with specified connection.
@@ -788,32 +717,20 @@ def nm_activate_device_connection(dev_name, con_uuid):
device_path = "/"
else:
proxy = _get_proxy()
- args = GLib.Variant('(s)', (dev_name,))
try:
- device = proxy.call_sync("GetDeviceByIpIface",
- args,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
+ device_path = proxy.GetDeviceByIpIface('(s)', dev_name)
except Exception as e:
if "org.freedesktop.NetworkManager.UnknownDevice" in e.message:
raise UnknownDeviceError(dev_name, e)
raise
- device_path = device.unpack()[0]
-
con_paths = _find_settings(con_uuid, 'connection', 'uuid')
if not con_paths:
raise SettingsNotFoundError(con_uuid)
- args = GLib.Variant('(ooo)', (con_paths[0], device_path, "/"))
nm_proxy = _get_proxy()
try:
- nm_proxy.call_sync("ActivateConnection",
- args,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
+ nm_proxy.ActivateConnection('(ooo)', con_paths[0], device_path, "/")
except GLib.GError as e:
if "org.freedesktop.NetworkManager.UnmanagedDevice" in e.message:
raise UnmanagedDeviceError(dev_name, e)
@@ -841,16 +758,11 @@ def nm_add_connection(values):
if key1 not in settings:
settings[key1] = {}
settings[key1][key2] = gvalue
- gsettings = GLib.Variant("(a{sa{sv}})", (settings,))
proxy = _get_proxy(object_path="/org/freedesktop/NetworkManager/Settings",
interface_name="org.freedesktop.NetworkManager.Settings")
- connection = proxy.call_sync("AddConnection",
- gsettings,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
- return connection.unpack()
+ connection = proxy.AddConnection('(a{sa{sv}})', settings)
+ return connection
def nm_update_settings_of_device(name, new_values):
"""Update setting of device.
@@ -918,13 +830,9 @@ def _update_settings(settings_path, new_values):
DEFAULT_DBUS_TIMEOUT,
None)
for key1, key2, value, default_type_str in new_values:
- settings = _gvariant_settings(settings, key1, key2, value, default_type_str)
+ new_settings = _gvariant_settings(settings, key1, key2, value, default_type_str)
- proxy.call_sync("Update",
- settings,
- Gio.DBusCallFlags.NONE,
- DEFAULT_DBUS_TIMEOUT,
- None)
+ proxy.Update(settings.get_type_string(), new_settings)
def _gvariant_settings(settings, updated_key1, updated_key2, value, default_type_str=None):
"""Update setting of updated_key1, updated_key2 of settings object with value.
@@ -974,7 +882,7 @@ def _gvariant_settings(settings, updated_key1, updated_key2, value, default_type
new_settings[updated_key1] = {}
new_settings[updated_key1][updated_key2] = GLib.Variant(type_str, value)
- return GLib.Variant(settings.get_type_string(), (new_settings,))
+ return new_settings
def nm_ipv6_to_dbus_ay(address):
"""Convert ipv6 address from string to list of bytes 'ay' for dbus
--
1.7.11.7
10 years, 6 months
[PATCH] Add an updates location for the AnacondaWidgets overrides
by David Shea
---
scripts/makeupdates | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/makeupdates b/scripts/makeupdates
index ac741df..dbb86c5 100755
--- a/scripts/makeupdates
+++ b/scripts/makeupdates
@@ -273,6 +273,9 @@ def copyUpdatedFiles(tag, updates, cwd):
install_to_dir(gitfile, "usr/share/anaconda/post-scripts")
elif gitfile.endswith("anaconda-yum"):
install_to_dir(gitfile, "usr/libexec/anaconda")
+ elif gitfile.endswith("AnacondaWidgets.py"):
+ import gi
+ install_to_dir(gitfile, gi._overridesdir[1:])
elif gitfile.find('/') != -1:
fields = gitfile.split('/')
subdir = fields[0]
--
1.8.4.2
10 years, 6 months
network team support
by Radek Vykydal
A tricky thing here is that json is used for configuration (--teamconfig
and --teamslaves options). The teamslaves needs to be able also to hold
configuration for slaves, it is quite structured option so I added tests
for it.
This is for rhel7 post Beta. I'd like to have it also in F20 post Beta.
If not, I'll have to modify version classes structure in pykickstart
somehow (probably having classes F21 and RHEL7 inheriting from F19, with
the same content at this moment?)
The patches I'm sending are for rhel7-branch (not for master) because NM
packages with team support were present in rhel first. Port to master
should be straightforward, mainly removing % from log messages.
10 years, 6 months
[master/rhel7] warn if vnc passwd is longer than 8 chars (#1026879)
by Mark Hamzy
VNC passwords can be no longer than 8 characters. If more than 8 characters are
used then only the first 8 will match which will cause a security issue.
---
pyanaconda/ui/tui/spokes/askvnc.py | 4 ++++
pyanaconda/vnc.py | 10 +++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/ui/tui/spokes/askvnc.py b/pyanaconda/ui/tui/spokes/askvnc.py
index d97763e..181778d 100644
--- a/pyanaconda/ui/tui/spokes/askvnc.py
+++ b/pyanaconda/ui/tui/spokes/askvnc.py
@@ -146,6 +146,10 @@ class VNCPassSpoke(NormalTUISpoke):
print _("The password must be at least "
"six characters long.")
return None
+ elif len(p1) > 8:
+ print _("The password cannot be more than "
+ "eight characters long.")
+ return None
else:
self._password = p1
self.apply()
diff --git a/pyanaconda/vnc.py b/pyanaconda/vnc.py
index 85b729b..1528468 100644
--- a/pyanaconda/vnc.py
+++ b/pyanaconda/vnc.py
@@ -199,7 +199,7 @@ class VncServer:
stdoutLog.critical("Could not initialize the VNC server: %s", e)
sys.exit(1)
- if self.password and len(self.password) < 6:
+ if self.password and (len(self.password) < 6 or len(self.password) > 8):
self.changeVNCPasswdWindow()
if not self.password:
@@ -262,12 +262,12 @@ class VncServer:
def changeVNCPasswdWindow(self):
""" Change the password to a sane parameter.
- We ask user to input a password that len(password) > 6
- or password == ''.
+ We ask user to input a password that (len(password) > 6
+ and len(password) <= 8) or password == ''.
"""
- message = _("VNC password provided was not at least 6 characters long.\n"
- "Please enter a new one. Leave blank for no password.")
+ message = _("VNC password must be six to eight characters long.\n"
+ "Please enter a new one, or leave blank for no password.")
app = App("VNC PASSWORD")
spoke = VNCPassSpoke(app, self.anaconda.ksdata, None, None, None,
message)
--
1.8.1.4
10 years, 6 months