[PATCH 0/2] A couple of changes for language selection
by David Shea
David Shea (2):
Lessen the visible resize when entering the welcome and lang spokes
Determine the lang selected arrow direction at render time
pyanaconda/ui/gui/spokes/langsupport.glade | 9 +++++----
pyanaconda/ui/gui/spokes/lib/lang_locale_handler.py | 13 ++++++++-----
pyanaconda/ui/gui/spokes/welcome.glade | 7 ++++---
3 files changed, 17 insertions(+), 12 deletions(-)
--
2.0.0
9 years, 9 months
[master] Fix memory checking
by Vratislav Podzimek
These three patches fix the memory checking code that was surprisingly buggy.
Vratislav Podzimek (3):
Check graphical RAM requirements if running graphical installation
Fix crash caused by passing kwargs to log functions
Reset the want_x flag after the memory check
anaconda | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
--
1.9.3
9 years, 9 months
[master] zRAM follow-up
by Vratislav Podzimek
PATCH 1/3 adds a script that can be used to investigate the zRAM stats, mainly
the compression ratio*. I'm not sure we really want it in every media as it will
be useless for vast majority of users, maybe we should only have it in the
repository wired up to the makeupdates script?
Patches 2/3 and 3/3 are trivial, I'd say.
*) I've played with that script today and it reveals the fact that with yum the
compression ratio is 48 % (nice, hm?), with dnf it is 64 % (really nice).
Vratislav Podzimek (3):
Add a script for showing stats about zRAM
Remove an unused MEM-related constant and use the other one
Adapt the memory requirements to zRAM swap usage
anaconda | 2 +-
pyanaconda/isys/__init__.py | 5 ++--
scripts/Makefile.am | 2 +-
scripts/makeupdates | 3 ++-
scripts/zram-stats | 64 +++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 70 insertions(+), 6 deletions(-)
create mode 100755 scripts/zram-stats
--
1.9.3
9 years, 9 months
[blivet 1/3] Write a fs label for HFS+ ESP
by Brian C. Lane
Now that we have the ability to set the filesystem label, take advantage
of it to set the HFS+ ESP label to "Linux HFS+ ESP" so that it matches
the partition name and will show up in the OSX file browser.
---
blivet/formats/fs.py | 7 +++++++
blivet/formats/fslabeling.py | 11 +++++++++++
2 files changed, 18 insertions(+)
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 06d12d5..78566f2 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -1293,6 +1293,7 @@ class HFSPlus(FS):
_mkfs = "mkfs.hfsplus"
_fsck = "fsck.hfsplus"
_packages = ["hfsplus-tools"]
+ _labelfs = fslabeling.HFSPlusLabeling()
_formattable = True
_mountType = "hfsplus"
_minSize = Size("1 MiB")
@@ -1306,6 +1307,7 @@ register_device_format(HFSPlus)
class MacEFIFS(HFSPlus):
_type = "macefi"
_name = N_("Linux HFS+ ESP")
+ _labelfs = fslabeling.HFSPlusLabeling()
_udevTypes = []
_minSize = 50
@@ -1314,6 +1316,11 @@ class MacEFIFS(HFSPlus):
return (isinstance(platform.platform, platform.MacEFI) and
self.utilsAvailable)
+ def __init__(self, **kwargs):
+ if "label" not in kwargs:
+ kwargs["label"] = self._name
+ super(MacEFIFS, self).__init__(**kwargs)
+
register_device_format(MacEFIFS)
diff --git a/blivet/formats/fslabeling.py b/blivet/formats/fslabeling.py
index f8d7b42..ef5b4ae 100644
--- a/blivet/formats/fslabeling.py
+++ b/blivet/formats/fslabeling.py
@@ -125,6 +125,17 @@ class HFSLabeling(FSLabeling):
def labelingArgs(self, label):
return ["-l", label]
+class HFSPlusLabeling(FSLabeling):
+
+ default_label = property(lambda s: "Untitled")
+ label_app = property(lambda s: None)
+
+ def labelFormatOK(self, label):
+ return ':' not in label and 0 < len(label) < 129
+
+ def labelingArgs(self, label):
+ return ["-v", label]
+
class NTFSLabeling(FSLabeling):
default_label = property(lambda s: "")
--
1.9.3
9 years, 9 months
[f21/master] Set widgets to be focused when entering a spoke. (#1121285)
by David Shea
Defining the spokes and hubs in glade files without toplevels and then
putting them into a container breaks gtk's usual default focus behavior
along with the explicit has_focus that we had defined in the welcome
spoke. To work around gtk having 17 words for "focus" and yet not having
a way to say that the default thing in a container's child should grab
the focus, define in python which widgets to focus and grab the focus
for them during the GtkStack transitions.
---
pyanaconda/ui/gui/__init__.py | 11 +++++++++++
pyanaconda/ui/gui/spokes/langsupport.py | 1 +
pyanaconda/ui/gui/spokes/password.py | 1 +
pyanaconda/ui/gui/spokes/user.py | 1 +
pyanaconda/ui/gui/spokes/welcome.glade | 1 -
pyanaconda/ui/gui/spokes/welcome.py | 1 +
6 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index ecc12d5..6364f54 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -68,6 +68,8 @@ class GUIObject(common.UIObject):
mainWidgetName -- The name of the top-level widget this object
object implements. This will be the widget searched
for in uiFile by the window property.
+ focusWidgetName -- The name of the widget to focus when the object is entered,
+ or None.
uiFile -- The location of an XML file that describes the layout
of widgets shown by this object. UI files are
searched for relative to the same directory as this
@@ -81,6 +83,12 @@ class GUIObject(common.UIObject):
"""
builderObjects = []
mainWidgetName = None
+
+ # Since many of the builder files do not define top-level widgets, the usual
+ # {get,can,is,has}_{focus,default} properties don't work real good. Define the
+ # widget to be focused in python, instead.
+ focusWidgetName = None
+
uiFile = ""
translationDomain = "anaconda"
@@ -344,6 +352,9 @@ class MainWindow(Gtk.Window):
self._stack.set_visible_child(child.window)
+ if child.focusWidgetName:
+ child.builder.get_object(child.focusWidgetName).grab_focus()
+
def setCurrentAction(self, standalone):
"""Set the current standalone widget.
diff --git a/pyanaconda/ui/gui/spokes/langsupport.py b/pyanaconda/ui/gui/spokes/langsupport.py
index 00f6451..218a734 100644
--- a/pyanaconda/ui/gui/spokes/langsupport.py
+++ b/pyanaconda/ui/gui/spokes/langsupport.py
@@ -39,6 +39,7 @@ __all__ = ["LangsupportSpoke"]
class LangsupportSpoke(LangLocaleHandler, NormalSpoke):
builderObjects = ["languageStore", "languageStoreFilter", "localeStore", "langsupportWindow"]
mainWidgetName = "langsupportWindow"
+ focusWidgetName = "languageEntry"
uiFile = "spokes/langsupport.glade"
category = LocalizationCategory
diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py
index fb88b5b..ee2da7d 100644
--- a/pyanaconda/ui/gui/spokes/password.py
+++ b/pyanaconda/ui/gui/spokes/password.py
@@ -41,6 +41,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler)
builderObjects = ["passwordWindow"]
mainWidgetName = "passwordWindow"
+ focusWidgetName = "pw"
uiFile = "spokes/password.glade"
category = UserSettingsCategory
diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
index 654a647..a9fbe6a 100644
--- a/pyanaconda/ui/gui/spokes/user.py
+++ b/pyanaconda/ui/gui/spokes/user.py
@@ -202,6 +202,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler):
builderObjects = ["userCreationWindow"]
mainWidgetName = "userCreationWindow"
+ focusWidgetName = "t_fullname"
uiFile = "spokes/user.glade"
category = UserSettingsCategory
diff --git a/pyanaconda/ui/gui/spokes/welcome.glade b/pyanaconda/ui/gui/spokes/welcome.glade
index 7bfb673..0516496 100644
--- a/pyanaconda/ui/gui/spokes/welcome.glade
+++ b/pyanaconda/ui/gui/spokes/welcome.glade
@@ -319,7 +319,6 @@
<object class="GtkEntry" id="languageEntry">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="has_focus">True</property>
<property name="valign">start</property>
<property name="invisible_char">●</property>
<property name="secondary_icon_name">edit-clear-symbolic</property>
diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py
index 5995bbd..c04865a 100644
--- a/pyanaconda/ui/gui/spokes/welcome.py
+++ b/pyanaconda/ui/gui/spokes/welcome.py
@@ -46,6 +46,7 @@ __all__ = ["WelcomeLanguageSpoke"]
class WelcomeLanguageSpoke(LangLocaleHandler, StandaloneSpoke):
mainWidgetName = "welcomeWindow"
+ focusWidgetName = "languageEntry"
uiFile = "spokes/welcome.glade"
builderObjects = ["languageStore", "languageStoreFilter", "localeStore",
"welcomeWindow", "betaWarnDialog", "unsupportedHardwareDialog"]
--
2.0.0
9 years, 9 months
[lorax] Disable dnf-makecache.timer (#1120368)
by Brian C. Lane
We don't want to update the dnf cache in the installation image. The
metadata will be downloaded when it is needed.
---
share/runtime-postinstall.tmpl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/share/runtime-postinstall.tmpl b/share/runtime-postinstall.tmpl
index a56af6b..17d8c14 100644
--- a/share/runtime-postinstall.tmpl
+++ b/share/runtime-postinstall.tmpl
@@ -31,7 +31,8 @@ systemctl disable systemd-readahead-collect.service \
systemd-readahead-replay.service \
mdmonitor.service \
mdmonitor-takeover.service \
- lvm2-monitor.service
+ lvm2-monitor.service \
+ dnf-makecache.timer
## These services can't be disabled normally (they're linked into place in
## /usr/lib/systemd rather than /etc/systemd), so we have to mask them.
systemctl mask fedora-configure.service fedora-loadmodules.service \
--
1.9.3
9 years, 9 months
[blivet/f21/master] Write a fs label for HFS+ ESP
by Brian C. Lane
Now that we have the ability to set the filesystem label, take advantage
of it to set the HFS+ ESP label to "Linux HFS+ ESP" so that it matches
the partition name and will show up in the OSX file browser.
---
blivet/formats/fs.py | 8 ++++++++
blivet/formats/fslabeling.py | 11 +++++++++++
2 files changed, 19 insertions(+)
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 06d12d5..8724334 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -1293,6 +1293,8 @@ class HFSPlus(FS):
_mkfs = "mkfs.hfsplus"
_fsck = "fsck.hfsplus"
_packages = ["hfsplus-tools"]
+ _labelfs = fslabeling.HFSLabeling()
+ _maxLabelChars = 128
_formattable = True
_mountType = "hfsplus"
_minSize = Size("1 MiB")
@@ -1306,6 +1308,7 @@ register_device_format(HFSPlus)
class MacEFIFS(HFSPlus):
_type = "macefi"
_name = N_("Linux HFS+ ESP")
+ _labelfs = fslabeling.HFSPlusLabeling()
_udevTypes = []
_minSize = 50
@@ -1314,6 +1317,11 @@ class MacEFIFS(HFSPlus):
return (isinstance(platform.platform, platform.MacEFI) and
self.utilsAvailable)
+ def __init__(self, **kwargs):
+ if "label" not in kwargs:
+ kwargs["label"] = self._name
+ super(MacEFIFS, self).__init__(**kwargs)
+
register_device_format(MacEFIFS)
diff --git a/blivet/formats/fslabeling.py b/blivet/formats/fslabeling.py
index f8d7b42..ea9ab48 100644
--- a/blivet/formats/fslabeling.py
+++ b/blivet/formats/fslabeling.py
@@ -125,6 +125,17 @@ class HFSLabeling(FSLabeling):
def labelingArgs(self, label):
return ["-l", label]
+class HFSPlusLabeling(FSLabeling):
+
+ default_label = property(lambda s: "Untitled")
+ label_app = property(lambda s: None)
+
+ def labelFormatOK(self, label):
+ return ':' not in label and len(label) < 129 and len(label) > 0
+
+ def labelingArgs(self, label):
+ return ["-v", label]
+
class NTFSLabeling(FSLabeling):
default_label = property(lambda s: "")
--
1.9.3
9 years, 9 months
[PATCH] Allow a wider variety of dumb mountpoints (#1109143)
by David Shea
It's possible for a mountpoint to start with /sys or /dev without
actually interfering with /sys or /dev. Added /run to the list of
mountpoints to reject while I was at it.
---
pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
index 6b46011..6cb7340 100644
--- a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
+++ b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
@@ -72,6 +72,9 @@ CONTAINER_TYPE_NAMES = {DEVICE_TYPE_LVM: N_("Volume Group"),
DEVICE_TYPE_LVM_THINP: N_("Volume Group"),
DEVICE_TYPE_BTRFS: N_("Volume")}
+# These cannot be specified as mountpoints
+system_mountpoints = ["/dev", "/proc", "/run", "/sys"]
+
def size_from_entry(entry):
size_text = entry.get_text().decode("utf-8").strip()
return size_from_input(size_text)
@@ -127,8 +130,7 @@ def validate_mountpoint(mountpoint, used_mountpoints, strict=True):
return _("That mount point is already in use. Try something else?")
elif not mountpoint:
return _("Please enter a valid mountpoint.")
- elif mountpoint.startswith("/dev") or mountpoint.startswith("/proc") or \
- mountpoint.startswith("/sys"):
+ elif mountpoint in system_mountpoints:
return _("That mount point is invalid. Try something else?")
elif (lowerASCII(mountpoint) not in fake_mountpoints and
((len(mountpoint) > 1 and mountpoint.endswith("/")) or
--
2.0.0
9 years, 9 months
[master/rhel7-branch] Don't skip cpfmtxa formatted dasds if zerombr specified in ks. (#1073982)
by Samantha N. Bueno
Resolves: rhbz#1073982
---
pyanaconda/ui/gui/spokes/storage.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index d597173..2870dfc 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -695,7 +695,7 @@ class StorageSpoke(NormalSpoke, StorageChecker):
# actions on storage devices
threadMgr.wait(constants.THREAD_STORAGE)
- to_format = make_unformatted_dasd_list(self.selected_disks)
+ to_format = make_unformatted_dasd_list(d.name for d in getDisks(self.storage.devicetree))
if not to_format:
# nothing to do here; bail
return
--
1.9.3
9 years, 9 months
[master/rhel7-branch] Fix TUI error message regarding username creation. (#1058637)
by Samantha N. Bueno
Information displayed was not correct. Just show the same messge as is
displayed in the GUI.
Resolves: rhbz#1058637
---
pyanaconda/ui/tui/spokes/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py
index 4c4d4d8..878ff3d 100644
--- a/pyanaconda/ui/tui/spokes/__init__.py
+++ b/pyanaconda/ui/tui/spokes/__init__.py
@@ -164,7 +164,7 @@ class EditTUIDialog(NormalTUISpoke):
return True
else:
print(_("You have provided an invalid username: %s\n"
- "Do not use spaces or capital letters.\n") % key)
+ "Tip: Keep your username shorter than 32 characters and do not use spaces.\n") % key)
return NormalTUISpoke.input(self, entry, key)
class OneShotEditTUIDialog(EditTUIDialog):
--
1.9.3
9 years, 9 months