[blivet:master 0/2] Remove test which needs updating on btrfs-progs version change. (v2)
by Anne Mulhern
This patch set supercedes the previous one of that name, but does not actually
remove the aforementioned test.
mulhern (2):
Further abstract loopbackedtestcase on block_size.
Check the minimum member size for BtrfsVolumeDevices.
blivet/devicelibs/btrfs.py | 4 ++++
blivet/devices.py | 10 +++++++++
tests/devicelibs_test/btrfs_test.py | 21 +++++++++++++++++-
tests/devicelibs_test/mdraid_interrogate_test.py | 5 +++--
tests/devicelibs_test/mdraid_test.py | 6 +++---
tests/devices_test.py | 17 +++++++++------
tests/formats_test/fslabeling.py | 3 ++-
tests/formats_test/selinux_test.py | 3 ++-
tests/loopbackedtestcase.py | 27 +++++++++++++++---------
9 files changed, 71 insertions(+), 25 deletions(-)
--
1.9.3
9 years, 9 months
[rhel7-branch] Custom spoke's right side redesign
by Vratislav Podzimek
The bug #1094856 pointed out at the fact that many widgets in the Custom spoke's
right side have a lot of space they don't need leaving too little space for
anything that need to be added or moved. Thus this change.
The mizmo's layout we discussed on the anaconda-devel list looks like this:
http://linuxgrrl.com/fedora-ux/Projects/Anaconda/Sketches/Move-Device-Sel...
and the implementation in this patch looks like this:
https://vpodzime.fedorapeople.org/new_custom_spoke.webm
The only change is that the "Modify" button next to VG info was moved below the
combobox, because it didn't fit otherwise (the combobox has to be that big and
there was no space for the button). But this way it has the same layout as the
devices' Modify button.
Don't be scared by the amount of lines changed, its just that I've moved widgets
to other places in the spoke which causes the glade file to be basically
overwritten.
Vratislav Podzimek (1):
Reorganize the right side of the Custom spoke (#1094856)
pyanaconda/ui/gui/spokes/custom.glade | 2692 ++++++++++++++++++---------------
pyanaconda/ui/gui/spokes/custom.py | 26 +
2 files changed, 1491 insertions(+), 1227 deletions(-)
--
1.9.3
9 years, 9 months
[PATCH] When running on HiDPI monitors, scale anaconda by a factor of 2
by David Shea
This way anaconda is more or less readable on a retina display. Don't do
anything if GNOME is already handling scaling, or if scaling has already
been set via environment variables.
---
data/liveinst/console.apps/liveinst | 3 ++-
pyanaconda/ui/gui/__init__.py | 42 ++++++++++++++++++++++++++++++++++++-
2 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/data/liveinst/console.apps/liveinst b/data/liveinst/console.apps/liveinst
index 073b39c..e9067fb 100644
--- a/data/liveinst/console.apps/liveinst
+++ b/data/liveinst/console.apps/liveinst
@@ -5,4 +5,5 @@ SESSION=true
STARTUP_NOTIFICATION_NAME="Starting Install to Hard Drive"
DOMAIN=anaconda
# DBus session connections fail when running setuid unless we pass DBUS_SESSION_BUS_ADDRESS through
-KEEP_ENV_VARS=DBUS_SESSION_BUS_ADDRESS,LIVECMD
+# Keep the Gdk scale settings from the user environment
+KEEP_ENV_VARS=DBUS_SESSION_BUS_ADDRESS,LIVECMD,GDK_SCALE,GDK_DPI_SCALE
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index e88dfad..995cb53 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -23,7 +23,7 @@ import meh.ui.gui
from contextlib import contextmanager
-from gi.repository import Gdk, Gtk, AnacondaWidgets, Keybinder, GdkPixbuf, GLib
+from gi.repository import Gdk, Gtk, AnacondaWidgets, Keybinder, GdkPixbuf, GLib, GObject
from pyanaconda.i18n import _
from pyanaconda.constants import IPMI_ABORTED
@@ -480,6 +480,43 @@ class GraphicalUserInterface(UserInterface):
else:
log.warning("logo image is missing")
+ def _widgetScale(self):
+ # First, check if the GDK_SCALE environment variable is already set. If so,
+ # leave it alone.
+ if "GDK_SCALE" in os.environ:
+ log.debug("GDK_SCALE already set to %s, not scaling", os.environ["GDK_SCALE"])
+ return
+
+ # Next, check if a scaling factor is already being applied via XSETTINGS,
+ # such as by gnome-settings-daemon
+ display = Gdk.Display.get_default()
+ screen = display.get_default_screen()
+ val = GObject.Value()
+ val.init(GObject.TYPE_INT)
+ if screen.get_setting("gdk-window-scaling-factor", val):
+ log.debug("Window scale set to %s by XSETTINGS, not scaling", val.get_int())
+ return
+
+ # Get the primary monitor dimensions in pixels and mm from Gdk
+ primary = screen.get_primary_monitor()
+ monitor_geometry = screen.get_monitor_geometry(primary)
+ monitor_scale = screen.get_monitor_scale_factor(primary)
+ monitor_width_mm = screen.get_monitor_width_mm(primary)
+ monitor_height_mm = screen.get_monitor_height_mm(primary)
+
+ # Check if this monitor is high DPI, using heuristics from gnome-settings-dpi.
+ # If the monitor has a height >= 1200 pixels and a resolution > 192 dpi in both
+ # x and y directions, apply a scaling factor of 2 so that anaconda isn't all tiny
+ monitor_width_px = monitor_geometry.width * monitor_scale
+ monitor_height_px = monitor_geometry.height * monitor_scale
+ monitor_dpi_x = monitor_width_px / (monitor_width_mm / 25.4)
+ monitor_dpi_y = monitor_height_px / (monitor_height_mm / 25.4)
+
+ log.debug("Detected primary monitor: %dx%d %ddpix %ddpiy", monitor_width_px,
+ monitor_height_px, monitor_dpi_x, monitor_dpi_y)
+ if monitor_height_px >= 1200 and monitor_dpi_x > 192 and monitor_dpi_y > 192:
+ display.set_window_scale(2)
+
@property
def tty_num(self):
return 6
@@ -558,6 +595,9 @@ class GraphicalUserInterface(UserInterface):
sys.exit(0)
+ # Apply a widget-scale to hidpi monitors
+ self._widgetScale()
+
while not self._currentAction:
self._currentAction = self._instantiateAction(self._actions[0])
if not self._currentAction:
--
2.1.0
9 years, 9 months
[firstboot][PATCH] Fix exception handling (#952633)
by Martin Kolman
Provide python-meh and libreport with correctly formated data
and dump broken interactive console error reporting.
Resolves: rhbz#952633
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
progs/firstboot | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/progs/firstboot b/progs/firstboot
index ba57ca6..f690a86 100755
--- a/progs/firstboot
+++ b/progs/firstboot
@@ -53,7 +53,11 @@ def exception_handler(type, value, tb, obj):
meh_conf = meh.Config(programName='firstboot',
programVersion='@VERSION@')
- dump_obj = meh.dump.ExceptionDump((type, value, tb), meh_conf)
+ # python-meh expects the exception data in a named tuple
+ ExcInfo = namedtuple("ExcInfo", ["type", "value", "stack"])
+ exc_info = ExcInfo(type, value, tb)
+
+ dump_obj = meh.dump.ReverseExceptionDump(exc_info, meh_conf)
exn_dump = dump_obj.traceback_and_object_dump(obj)
fd, path = tempfile.mkstemp(prefix='firstboot-tb-')
@@ -66,6 +70,17 @@ def exception_handler(type, value, tb, obj):
params = dict()
params.update(dump_obj.environment_info)
+ # turn the python-meh package info to a key/value pairs
+ pkg_info = params.pop("pkg_info", None)
+ if pkg_info:
+ params["pkg_name"] = pkg_info.name
+ params["pkg_version"] = pkg_info.version
+ params["pkg_release"] = pkg_info.release
+ params["pkg_epoch"] = pkg_info.epoch
+ params["pkg_arch"] = pkg_info.arch
+ params["package"] = "%s-%s-%s.%s" % (pkg_info.name, pkg_info.version,
+ pkg_info.release, pkg_info.arch)
+
params.setdefault('component', 'firstboot')
params.setdefault('package', 'firstboot-@VERSION@')
@@ -80,15 +95,6 @@ def exception_handler(type, value, tb, obj):
problem_data.create_dump_dir(ABRT_DIR)
- print _('Unhandled exception in firstboot occured.')
- print _('Bugreport directory was created and once you login, ABRT should\n'
- 'let you file a bug. (Don\'t forget to check "Show all problems")')
- answer = raw_input (_('Do you want to start /usr/bin/setup so that you can\n'
- 'create your user account? [Y/n] '))
-
- if not answer.lower() in [_('n'), _('no')]:
- os.system('/usr/bin/setup')
-
if __name__ == '__main__':
# set up exception handling first
--
1.9.3
9 years, 9 months
[anaconda][master/f21-branch][v3][PATCH 0/2] Help for every screen
by Martin Kolman
Based on your feedback, tweaked and meticulously tested, Help patch V3 is here!
Changes from V2:
* unified function for grabbing the best help file
- gets a folder and help file name
- lists all folders that have the requested help file and
returns the best match for current $LANG with fallback
to DEFAULT_LANGUAGE
- if a localized Installation Guide is missing a file,
the path to the English version of the file will be returned
* the same function is now used for grabbing both localized
installation guide files and placeholders
* failure to find the help files is now logged for easier
debugging of missing help content
* there are now also RHEL7 placeholders
* the placeholders are now translatable
- I hope I got the Autotools magic for placing the placeholders right :P
- they share the same folder with the installation guide
(/user/share/doc/anaconda/<lang code>/
- if any translated placeholders in the given language are found,
they will be used
- for now there is just the en-US variant, which should be usable
as a translation "master"
- the actual Transifex bits & makefile support for including the translated
placeholders in the release archive are not part of this patch set
Martin Kolman (2):
Add a help button to every Anaconda screen
Specify help file names for hubs and spokes
anaconda.spec.in | 1 +
data/help/Makefile.am | 20 ++++
data/help/en-US/FedoraPlaceholder.html | 5 +
data/help/en-US/FedoraPlaceholderWithLinks.html | 13 +++
data/help/en-US/Makefile.am | 23 ++++
data/help/en-US/RHEL7Placeholder.html | 5 +
data/help/en-US/RHEL7PlaceholderWithLinks.html | 11 ++
pyanaconda/ihelp.py | 143 ++++++++++++++++++++++++
pyanaconda/installclass.py | 6 +
pyanaconda/installclasses/fedora.py | 3 +
pyanaconda/installclasses/rhel.py | 3 +
pyanaconda/ui/gui/__init__.py | 12 ++
pyanaconda/ui/gui/hubs/progress.py | 1 +
pyanaconda/ui/gui/hubs/summary.py | 1 +
pyanaconda/ui/gui/spokes/__init__.py | 9 ++
pyanaconda/ui/gui/spokes/custom.py | 1 +
pyanaconda/ui/gui/spokes/datetime_spoke.py | 1 +
pyanaconda/ui/gui/spokes/filter.py | 1 +
pyanaconda/ui/gui/spokes/keyboard.py | 1 +
pyanaconda/ui/gui/spokes/langsupport.py | 1 +
pyanaconda/ui/gui/spokes/network.py | 1 +
pyanaconda/ui/gui/spokes/password.py | 1 +
pyanaconda/ui/gui/spokes/software.py | 1 +
pyanaconda/ui/gui/spokes/source.py | 1 +
pyanaconda/ui/gui/spokes/storage.py | 1 +
pyanaconda/ui/gui/spokes/user.py | 1 +
pyanaconda/ui/gui/spokes/welcome.py | 1 +
widgets/configure.ac | 2 +-
widgets/glade/AnacondaWidgets.xml | 9 +-
widgets/src/BaseWindow.c | 48 ++++++++
widgets/src/BaseWindow.h | 3 +
widgets/src/Makefile.am | 2 +-
32 files changed, 328 insertions(+), 4 deletions(-)
create mode 100644 data/help/Makefile.am
create mode 100644 data/help/en-US/FedoraPlaceholder.html
create mode 100644 data/help/en-US/FedoraPlaceholderWithLinks.html
create mode 100644 data/help/en-US/Makefile.am
create mode 100644 data/help/en-US/RHEL7Placeholder.html
create mode 100644 data/help/en-US/RHEL7PlaceholderWithLinks.html
create mode 100644 pyanaconda/ihelp.py
--
1.9.3
9 years, 9 months
[blivet][master/rhel7-branch] Fixes for the bug #978266
by Vratislav Podzimek
When doing BTRFS autopart on many small disks (hate you DASDs!) we may get into
a situation that the implicitly scheduled partitions for the BTRFS scheduled one
on each disk with size request of 500 MiB don't leave any big enough free space
to fit in swap and /boot which cannot be on BTRFS. The result is autopart
failing on a machine with e.g. >18 GiB (8 x 2.34 GiB) because of not enough free
space.
Patches 1/3 and 2/3 build the base for the PATCH 3/3 which fixes the issue by
making the smallest one implicitly scheduled partition smaller to make enough
space for the autopart-requested partitions.
Vratislav Podzimek (3):
Work with free region sizes instead of parted.Geometry objects
Move implicit partition creation into a separate function
Make sure autopart requests fit in somewhere (#978266)
blivet/partitioning.py | 86 ++++++++++++++++++++++++++++++++++----------------
1 file changed, 59 insertions(+), 27 deletions(-)
--
1.9.3
9 years, 9 months
[blivet][master/f21-branch] Add an epoch to blivet.
by Samantha N. Bueno
Because of an error made during branching, the first build of f21 blivet
incremented y-stream to 0.62 instead of z-stream to 0.61.1 and was
distributed to fedora users testing f21 alpha composes. This can't
easily be worked around any other way than by incrementing epoch,
otherwise 0.62 will always be seen as the "newer" version of blivet in
f21.
Also, because this change is going into f21, it must also go into master
branch.
---
python-blivet.spec | 1 +
1 file changed, 1 insertion(+)
diff --git a/python-blivet.spec b/python-blivet.spec
index 48d06a1..bdd7c3e 100644
--- a/python-blivet.spec
+++ b/python-blivet.spec
@@ -3,6 +3,7 @@ Name: python-blivet
Url: http://fedoraproject.org/wiki/blivet
Version: 0.61.1
Release: 1%{?dist}
+Epoch: 1
License: LGPLv2+
Group: System Environment/Libraries
%define realname blivet
--
1.8.3.1
9 years, 9 months
[blivet][master/rhel7-branch] clean up hiding/unhiding of disks
by David Lehman
The first patch is mostly unrelated, but here it is anyway. It is not
intended for rhel7-branch at this time, but the others are.
The other four are all related to hide/unhide as used by anaconda for
disk selection. They tighten up management of relationships between
devices and the devices that contain them when adding and removing
devices from the tree, whether it be part of registering an action or
hiding a disk. The biggest piece is patch 3, which restores relationships
between lv and vg, or partition and disk, when canceling actions that
removed the lv or partition. Patch 5 is especially nice now that we are
hiding zram devices on every entry to the custom spoke -- without these
patches your previous custom layout would be wiped out upon entry to the
custom spoke since hiding the zram device would cancel all registered
actions.
David Lehman (5):
Do not allow modification or removal of protected devices.
The first format destroy action should obsolete any others.
Improve handling of device removals/additions from the devicetree.
Cancel actions before hiding descendent devices.
Only cancel actions on disks related to the one we are hiding.
blivet/__init__.py | 11 ++++-
blivet/deviceaction.py | 27 +++++++++----
blivet/devices.py | 108 +++++++++++++++++++++++++++++++++++++++++++++++++
blivet/devicetree.py | 70 ++++++++++++++------------------
blivet/partitioning.py | 6 +--
tests/action_test.py | 6 ++-
6 files changed, 176 insertions(+), 52 deletions(-)
--
1.9.3
9 years, 9 months
[blivet:master] Remove test which needs updating on btrfs-progs version change.
by Anne Mulhern
mkfs.btrfs v3.16 calls any device smaller than 16 GiB too small, previously
the device had to be smaller than 8 GiB to be "too small".
This test is too brittle to keep around and it does not test any fact that
is relied on by our code, so it should go.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
tests/devicelibs_test/btrfs_test.py | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/tests/devicelibs_test/btrfs_test.py b/tests/devicelibs_test/btrfs_test.py
index dcf1bcd..dae3f07 100755
--- a/tests/devicelibs_test/btrfs_test.py
+++ b/tests/devicelibs_test/btrfs_test.py
@@ -161,19 +161,5 @@ class BTRFSAsRootTestCase2(BTRFSMountDevice):
subvolumes = btrfs.list_subvolumes(self.mountpoint)
self.assertEqual(len([v for v in subvolumes if v['path'].find("SV1.1") != -1]), 1)
-class BTRFSAsRootTestCase3(loopbackedtestcase.LoopBackedTestCase):
-
- def __init__(self, methodName='runTest'):
- super(BTRFSAsRootTestCase3, self).__init__(methodName=methodName, deviceSpec=[8192])
-
- def testSmallDevice(self):
- """ Creation of a smallish device will result in an error if the
- data and metadata levels are specified differently, but not if
- they are unspecified.
- """
- with self.assertRaises(BTRFSError):
- btrfs.create_volume(self.loopDevices, data="single", metadata="dup")
- self.assertEqual(btrfs.create_volume(self.loopDevices), 0)
-
if __name__ == "__main__":
unittest.main()
--
1.9.3
9 years, 9 months
[PATCH rhel7-branch] Fix accelerator collision of Refresh button (#1065716)
by Radek Vykydal
All letters from "Refresh" are used, so how about
"Refresh Device _List".
Or "Update"?
Related: rhbz#1065716
---
pyanaconda/ui/gui/spokes/filter.glade | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/filter.glade b/pyanaconda/ui/gui/spokes/filter.glade
index 4b4ccfc..eca50d5 100644
--- a/pyanaconda/ui/gui/spokes/filter.glade
+++ b/pyanaconda/ui/gui/spokes/filter.glade
@@ -1685,7 +1685,7 @@
</child>
<child>
<object class="GtkButton" id="refresh">
- <property name="label" translatable="yes">Refres_h</property>
+ <property name="label" translatable="yes">Refresh Device _List</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
--
1.9.3
9 years, 9 months