[f21] Support high contrast mode in fedora-welcome (#1160499)
by David Shea
(pushing this needs to be coordinated with a path change in fedora-logos)
Thanks to Matthias Clasen for this patch. Remove the hardcoded text
color from the icon labels and use a named icon for "Install to Hard
Drive" instead of a full path.
---
data/liveinst/gnome/fedora-welcome | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/data/liveinst/gnome/fedora-welcome b/data/liveinst/gnome/fedora-welcome
index 973a3ab..10da12e 100755
--- a/data/liveinst/gnome/fedora-welcome
+++ b/data/liveinst/gnome/fedora-welcome
@@ -40,14 +40,14 @@ function makeLabel(label, button) {
let widget = new Gtk.Label();
if (button)
- widget.set_markup('<b><span size="x-large" color="white">' + label + '</span></b>');
+ widget.set_markup('<b><span size="x-large">' + label + '</span></b>');
else {
widget.set_line_wrap(true);
widget.set_justify(Gtk.Justification.CENTER);
widget.set_margin_top(32);
widget.set_margin_bottom(32);
- widget.set_markup('<span size="large" color="white">' + label + '</span>');
+ widget.set_markup('<span size="large">' + label + '</span>');
}
return widget;
@@ -99,10 +99,8 @@ const WelcomeWindow = new Lang.Class({
spacing: 16 });
// provided by the 'fedora-logos' package
- let pix = GdkPixbuf.Pixbuf.new_from_file_at_size(
- '/usr/share/icons/Fedora/scalable/apps/anaconda.svg',
- 256, 256);
- installContent.add(new Gtk.Image({ pixbuf: pix }));
+ installContent.add(new Gtk.Image({ icon_name: 'anaconda',
+ pixel_size: 256 }));
installContent.add(makeLabel(anacondaApp.get_name(), true));
let installButton = new Gtk.Button({ child: installContent });
--
2.1.0
9 years, 5 months
[rhel7/master/f21 1/2 V2] Create missing parent directories for user's home directory (#1163775)
by Brian C. Lane
libuser doesn't create parent directories. This simplifies the homedir
creation slightly and adds a utility function, with a test, that returns
the home directories parents, suitable for passing to mkdirChain.
Resolves: rhbz#1163775
---
pyanaconda/iutil.py | 4 ++++
pyanaconda/ui/gui/spokes/user.py | 2 ++
pyanaconda/users.py | 13 ++++++++-----
tests/pyanaconda_tests/iutil_test.py | 9 +++++++++
4 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index ad09850..7e3dde3 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -883,3 +883,7 @@ def save_screenshots():
except OSError:
log.exception("saving screenshots to installed system failed")
+
+def parent_dir(directory):
+ """Return the parent directories"""
+ return "/".join(os.path.normpath(directory).split("/")[:-1])
diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
index e40b413..206a8ce 100644
--- a/pyanaconda/ui/gui/spokes/user.py
+++ b/pyanaconda/ui/gui/spokes/user.py
@@ -107,6 +107,8 @@ class AdvancedUserDialog(GUIObject):
if rc == 1:
if self.builder.get_object("c_home").get_active():
self._user.homedir = self.builder.get_object("t_home").get_text()
+ if not self._user.homedir.startswith("/"):
+ self._user.homedir = "/" + self._user.homedir
else:
self._user.homedir = None
diff --git a/pyanaconda/users.py b/pyanaconda/users.py
index 0eb7435..18021ea 100644
--- a/pyanaconda/users.py
+++ b/pyanaconda/users.py
@@ -287,11 +287,14 @@ class Users:
userEnt.set(libuser.GIDNUMBER, [groupEnt.get(libuser.GIDNUMBER)[0]] +
map(lambda grp: grp.get(libuser.GIDNUMBER)[0], grpLst))
- if kwargs.get("homedir", False):
- userEnt.set(libuser.HOMEDIRECTORY, kwargs["homedir"])
- else:
- iutil.mkdirChain('/home')
- userEnt.set(libuser.HOMEDIRECTORY, "/home/" + user_name)
+ homedir = kwargs.get("homedir", None)
+ if not homedir:
+ homedir = "/home/" + user_name
+ # libuser expects the parent directory tree to exist.
+ parent_dir = iutil.parent_dir(homedir)
+ if parent_dir:
+ iutil.mkdirChain(parent_dir)
+ userEnt.set(libuser.HOMEDIRECTORY, homedir)
if kwargs.get("shell", False):
userEnt.set(libuser.LOGINSHELL, kwargs["shell"])
diff --git a/tests/pyanaconda_tests/iutil_test.py b/tests/pyanaconda_tests/iutil_test.py
index bd7aced..06e8433 100644
--- a/tests/pyanaconda_tests/iutil_test.py
+++ b/tests/pyanaconda_tests/iutil_test.py
@@ -363,3 +363,12 @@ class RunProgramTests(unittest.TestCase):
self.assertFalse(iutil.cmp_obj_attrs(a, b, ["b", "c"]))
self.assertFalse(iutil.cmp_obj_attrs(b, a, ["b", "c"]))
self.assertFalse(iutil.cmp_obj_attrs(b, a, ["c", "b"]))
+
+ def parent_dir_test(self):
+ """Test the parent_dir function"""
+ dirs = [("", ""), ("/", ""), ("/home/", ""), ("/home/bcl", "/home"), ("home/bcl", "home"),
+ ("/home/bcl/", "/home"), ("/home/extra/bcl", "/home/extra"),
+ ("/home/extra/bcl/", "/home/extra"), ("/home/extra/../bcl/", "/home")]
+
+ for d, r in dirs:
+ self.assertEquals(iutil.parent_dir(d), r)
--
1.9.3
9 years, 5 months
[anaconda][master/f21-branch/rhel7-branch][v2][PATCH] Use TTY1 for useful hints
by Martin Kolman
Changes from v1:
* the hints are not translatable
* don't needlessly tell people in text mode that we have a textmode
* don't tell people on s390 to switch to TTY2
* but tell them they can switch to second pane in tmux
(YES, TMUX RUNS ON S390! It runs in the manual installation mode,
just not in kickstart mode or command line mode.
Thanks to jstodola for discovering this! :) )
Martin Kolman (1):
Provide useful hints on TTY1 during the installation
anaconda | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
--
1.9.3
9 years, 5 months
[blivet][all] tighten up filesystem resize calculations
by David Lehman
Patch 1 is a new requirement as of (recent?) f21. It was not needed
in f20.
Patch 2 is a safety measure related to patch 1. Is it misleading to say
the FS isn't resizable because the method to gather needed info hasn't
been called?
Patch 3 fixes a stupid omission from the big Size conversion. In effect
that typo disables the padding we try to apply to reported min size.
Patches 4 and 5 fix the rounding of filesystem target sizes. We round
the reported min size up, and then we round the target size in the
appropriate direction at the last moment before performing the resize.
On master I'd like to remove the padding completely, but I'll do that
separately.
David Lehman (5):
Run fsck before obtaining minimum filesystem size. (#1162215)
Disable resize operations on filesystems whose current size is
unknown.
Fix units for fs min size padding.
New method to round a Size to a whole number of a specified unit.
Round filesystem target size to whole resize tool units. (#1163410)
blivet/formats/fs.py | 94 ++++++++++++++++++++++++++++++++++++++++++++--------
blivet/size.py | 17 +++++++++-
tests/size_test.py | 40 ++++++++++++++++++++++
3 files changed, 136 insertions(+), 15 deletions(-)
--
1.9.3
9 years, 5 months
[PATCH] Related bug can have different fixed-in and state
by Brian C. Lane
If a related bug is the same as the bug listed in the summary it
overrides the need for a matching fixed-in or state. eg. a fix to a
patch previously pushed that is already ON_QA or has an older fixed-in
version.
If the bug in the summary is different from the related bug that implies
Resolved and it must have correct state, fixed-in and acks.
---
scripts/makebumpver | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/makebumpver b/scripts/makebumpver
index 941b509..fa2df04 100755
--- a/scripts/makebumpver
+++ b/scripts/makebumpver
@@ -356,8 +356,12 @@ class MakeBumpVer:
not self._isRHELBugAcked(ckbug, commit, summary)):
bad = True
elif valid and action == 'Related':
+ # A related bug needs to have acks, and if it is the same as the summary
+ # It overrides the summary having different fixed-in or state
if self._isRHELBugAcked(ckbug, commit, summary):
print "*** Bug %s Related commit %s is allowed\n" % (bug, commit)
+ if ckbug == summary_bug:
+ bad = False
else:
bad = True
--
1.9.3
9 years, 5 months
[PATCH] Fix setupDiskImages when the devices are already in the tree.
by David Lehman
---
blivet/devicetree.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 7f3f73a..719fcf8 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1975,6 +1975,13 @@ class DeviceTree(object):
""" Set up devices to represent the disk image files. """
for (name, path) in self.diskImages.items():
log.info("setting up disk image file '%s' as '%s'", path, name)
+ dmdev = self.getDeviceByName(name)
+ if dmdev and isinstance(dmdev, DMLinearDevice) and \
+ path in (d.path for d in dmdev.ancestors):
+ log.debug("using %s", dmdev)
+ dmdev.setup()
+ continue
+
try:
filedev = FileDevice(path, exists=True)
filedev.setup()
--
1.9.3
9 years, 5 months
[PATCH 1/4] Add a test case where it's impossible to reclaim.
by Chris Lumens
Basically, the provided disk is too small so anaconda can't fit an entire
live installation onto it. Test that we have no option but to quit.
---
tests/gui/inside/storage.py | 42 +++++++++++++++++----------------------
tests/gui/outside/test_reclaim.py | 15 +++++++++++++-
2 files changed, 32 insertions(+), 25 deletions(-)
diff --git a/tests/gui/inside/storage.py b/tests/gui/inside/storage.py
index 374f802..ef6e4c1 100644
--- a/tests/gui/inside/storage.py
+++ b/tests/gui/inside/storage.py
@@ -72,7 +72,7 @@ class BasicStorageTestCase(UITestCase):
self.assertIsNotNone(button, msg="Encrypt button not found")
self.assertFalse(button.checked, msg="Encrypt button should not be selected")
- def _run(self):
+ def _common_run(self):
# First, we need to click on the storage spoke selector.
self.enter_spoke("INSTALLATION DESTINATION")
@@ -96,6 +96,10 @@ class BasicStorageTestCase(UITestCase):
self.check_shopping_cart(w)
self.check_storage_options(w)
+ return w
+
+ def _run(self):
+ w = self._common_run()
# And then we click the Done button which should take the user right back to
# the hub. There's no need to display any other dialogs given that this is
@@ -178,29 +182,7 @@ class BasicReclaimTestCase(BasicStorageTestCase):
self.check_window_displayed("INSTALLATION SUMMARY")
def _run(self):
- # First, we need to click on the storage spoke selector.
- self.enter_spoke("INSTALLATION DESTINATION")
-
- # Now verify we are on the right screen.
- w = self.check_window_displayed("INSTALLATION DESTINATION")
- self.check_help_button(w)
-
- # Given that we attach a second disk to the system (for storing the test
- # suite and results), anaconda will not select disks by default. Thus,
- # the storage options panel should currently be insensitive.
- area = self.find("Storage Options", node=w)
- self.assertIsNotNone(area, "Storage Options not found")
- self.assertFalse(area.sensitive, msg="Storage options should be insensitive")
-
- # Select disk overviews. In the basic case, this means uninitialized
- # disks that we're going to do autopart on.
- self.check_select_disks(w)
-
- # And now with disks selected, the storage options should be sensitive.
- self.assertTrue(area.sensitive, msg="Storage options should be sensitive")
-
- self.check_shopping_cart(w)
- self.check_storage_options(w)
+ w = self._common_run()
# Clicking the Done button should bring up the installation options dialog
# indicating there's not currently enough space to install, but more space
@@ -208,3 +190,15 @@ class BasicReclaimTestCase(BasicStorageTestCase):
self.click_button("_Done", node=w)
optionsDlg = self.check_dialog_displayed("Need Space")
self.check_reclaim(optionsDlg)
+
+class CantReclaimTestCase(BasicStorageTestCase):
+ def _run(self):
+ w = self._common_run()
+
+ # Clicking the Done button should bring up the installation options dialog
+ # indicating there's never going to be enough space to install. There's nothing
+ # to do now but quit.
+ self.click_button("_Done", node=w)
+ doDelay(5)
+ optionsDlg = self.check_dialog_displayed("No Space")
+ self.click_button("Quit installer", node=optionsDlg)
diff --git a/tests/gui/outside/test_reclaim.py b/tests/gui/outside/test_reclaim.py
index ebcaacf..53661da 100644
--- a/tests/gui/outside/test_reclaim.py
+++ b/tests/gui/outside/test_reclaim.py
@@ -17,7 +17,8 @@
#
# Author: Chris Lumens <clumens(a)redhat.com>
-__all__ = ["BasicReclaimLiveCDCreator", "BasicReclaimLiveCD_OutsideTest"]
+__all__ = ["BasicReclaimLiveCDCreator", "BasicReclaimLiveCD_OutsideTest",
+ "CantReclaimLiveCDCreator", "CantReclaimLiveCD_OutsideTest"]
from . import Creator, OutsideMixin
import subprocess
@@ -56,3 +57,15 @@ class BasicReclaimLiveCDCreator(Creator):
class BasicReclaimLiveCD_OutsideTest(OutsideMixin, unittest.TestCase):
creatorClass = BasicReclaimLiveCDCreator
+
+class CantReclaimLiveCDCreator(BasicReclaimLiveCDCreator):
+ drives = [("one", Size("2 GB"))]
+ name = "cantreclaimlivecd"
+
+ # We don't get to test much here, since the reclaim test shuts down anaconda.
+ tests = [("welcome", "BasicWelcomeTestCase"),
+ ("summary", "LiveCDSummaryTestCase"),
+ ("storage", "CantReclaimTestCase")]
+
+class CantReclaimLiveCD_OutsideTest(OutsideMixin, unittest.TestCase):
+ creatorClass = CantReclaimLiveCDCreator
--
1.9.3
9 years, 5 months
[PATCH] update saved_entry only if --make-default specified
by Gene Czarcinski
This is part 4 of a 4 part update to change what saved_entry in
/boot/grub2/grubenv means and how it gets updated.
The objective is to have things work as most, if not all, individuals
would expect them to work. That is, boot the most recently installed kernel
unless I (the user) specify otherwise.
It is assumed that the menuentry definitions for new kernel installs will
continue to be added to the head (front) of the list in the 10_linux section
of /boot/grub/grub.cfg
1. Rather than trying to create some title for saved_entry, simply set
saved_entry=0 so that the most recently installed kernel is booted.
This patch to anaconda was submitted and accepted:
https://lists.fedorahosted.org/pipermail/anaconda-patches/2014-May/011336...
https://lists.fedorahosted.org/pipermail/anaconda-patches/2014-June/01136...
2. While the above patch is necessary, it is not sufficient and anaconda
needs to be changed so that /etc/sysconfig/kernel has UPDATEDEFAULT=no which
means not to updated saved_entry. The patch has been submitted:
https://lists.fedorahosted.org/pipermail/anaconda-patches/2014-October/01...
3. The third patch is to new-kernel-pkg (grubby package) and was incorporated
into grubby-8.35-8 with commit 7d162cd9e524d4d1acb2002d4e8a6027e471269e.
This patch only sets --make-default if UPDATEDEFAULT-yes.
4. This update provides the forth part which updates grubby.c so that it will
only update saved_entry if --make-default is specified.
With UPDATEDEFAULT=no and saved_entry=0, kernel at the head of the list will
be booted. And if the user sets saved_entry="<some_title_from_40_custom>" then
the menmuentry in 40_custom will be booted.
Gene Czarcinski (1):
v3.1 update saved_entry only if --make-default specified
grubby.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
--
1.9.3
9 years, 5 months
[rhel7/master/f21] Create missing parent directories for user's home directory (#1163775)
by Brian C. Lane
libuser doesn't create parent directories. This simplifies the homedir
creation slightly and adds a utility function, with a test, that returns
the home directories parents, suitable for passing to mkdirChain.
Resolves: rhbz#1163775
---
pyanaconda/iutil.py | 4 ++++
pyanaconda/users.py | 11 ++++++-----
tests/pyanaconda_tests/iutil_test.py | 9 +++++++++
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index ad09850..2de3e68 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -883,3 +883,7 @@ def save_screenshots():
except OSError:
log.exception("saving screenshots to installed system failed")
+
+def parent_dirs(directory):
+ """Return the parent directories"""
+ return "/".join(os.path.join(os.path.normpath(directory).split("/"))[:-1])
diff --git a/pyanaconda/users.py b/pyanaconda/users.py
index 0eb7435..849329c 100644
--- a/pyanaconda/users.py
+++ b/pyanaconda/users.py
@@ -287,11 +287,12 @@ class Users:
userEnt.set(libuser.GIDNUMBER, [groupEnt.get(libuser.GIDNUMBER)[0]] +
map(lambda grp: grp.get(libuser.GIDNUMBER)[0], grpLst))
- if kwargs.get("homedir", False):
- userEnt.set(libuser.HOMEDIRECTORY, kwargs["homedir"])
- else:
- iutil.mkdirChain('/home')
- userEnt.set(libuser.HOMEDIRECTORY, "/home/" + user_name)
+ homedir = kwargs.get("homedir", "/home/" + user_name)
+ # libuser expects the parent directory tree to exist.
+ parent_dirs = iutil.parent_dirs(homedir)
+ if parent_dirs:
+ iutil.mkdirChain(parent_dirs)
+ userEnt.set(libuser.HOMEDIRECTORY, homedir)
if kwargs.get("shell", False):
userEnt.set(libuser.LOGINSHELL, kwargs["shell"])
diff --git a/tests/pyanaconda_tests/iutil_test.py b/tests/pyanaconda_tests/iutil_test.py
index bd7aced..6bd28d9 100644
--- a/tests/pyanaconda_tests/iutil_test.py
+++ b/tests/pyanaconda_tests/iutil_test.py
@@ -363,3 +363,12 @@ class RunProgramTests(unittest.TestCase):
self.assertFalse(iutil.cmp_obj_attrs(a, b, ["b", "c"]))
self.assertFalse(iutil.cmp_obj_attrs(b, a, ["b", "c"]))
self.assertFalse(iutil.cmp_obj_attrs(b, a, ["c", "b"]))
+
+ def parent_dirs_test(self):
+ """Test the parent_dirs function"""
+ dirs = [("", ""), ("/", ""), ("/home/", ""), ("/home/bcl", "/home"),
+ ("/home/bcl/", "/home"), ("/home/extra/bcl", "/home/extra"),
+ ("/home/extra/bcl/", "/home/extra"), ("/home/extra/../bcl/", "/home")]
+
+ for d, r in dirs:
+ self.assertEquals(iutil.parent_dirs(d), r)
--
1.9.3
9 years, 5 months
[anaconda][master/f21-branch][PATCH] Remove old help dialog in custom spoke
by Martin Kolman
The new help system is up and running and we have content covering the custom spoke,
so the time has come to say goodbye to the old help dialog in custom spoke.
May it live forever in our Git history! ;-)
Martin Kolman (1):
Remove the old custom partitioning help dialog
pyanaconda/ui/gui/spokes/custom.glade | 16 -----
pyanaconda/ui/gui/spokes/custom.py | 7 +-
.../ui/gui/spokes/lib/custom_storage_helpers.glade | 71 --------------------
.../ui/gui/spokes/lib/custom_storage_helpers.py | 75 ----------------------
4 files changed, 1 insertion(+), 168 deletions(-)
--
1.9.3
9 years, 5 months