[blivet] My school project -- random data entropy in installation
by Vratislav Podzimek
These are patches I've come up with as part of my school project focused on
random data entropy in the installation process. The critical part that needs
high-quality random data is disk encryption. Patches 1/3 and 2/3 are, I believe,
useful in either case, patch 3/3 adds the entropy check and wait before the LUKS
format is created. Related Anaconda patches add a GUI dialog to inform user what
is going on and how they could help.
The right value of the minimal entropy level is something experts in that area
should tell us. I'll work on that and change it before pushing if these patches
get approved.
Vratislav Podzimek (3):
Add a way to pass callbacks to storage processing
Add callbacks for format creation and resizing
Wait for enough entropy when creating LUKS format
blivet/__init__.py | 35 +++++++++++++---
blivet/deviceaction.py | 112 +++++++++++++++++++++++++++++--------------------
blivet/devicetree.py | 6 +--
blivet/formats/luks.py | 1 +
blivet/util.py | 4 ++
5 files changed, 105 insertions(+), 53 deletions(-)
--
1.7.11.7
10 years, 11 months
[master] Hopefully simple fix
by Vratislav Podzimek
Fix for a bug that was rejected as beta blocker, but may be accepted as final
blocker. If it does, I will cherry-pick it.
There is one more way to prevent the traceback from the back, but I think this
is the right place and right one.
Vratislav Podzimek (1):
Filter out also protected disks in doKickstartStorage (#959677)
pyanaconda/kickstart.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
1.7.11.7
10 years, 11 months
[PATCH] Bump image size up to 2G (#967556)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
src/pylorax/treebuilder.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py
index 136aa20..2e7c43e 100644
--- a/src/pylorax/treebuilder.py
+++ b/src/pylorax/treebuilder.py
@@ -144,7 +144,7 @@ class RuntimeBuilder(object):
runcmd(["depmod", "-a", "-F", ksyms, "-b", root, kver])
generate_module_info(moddir+kver, outfile=moddir+"module-info")
- def create_runtime(self, outfile="/var/tmp/squashfs.img", compression="xz", compressargs=[], size=1):
+ def create_runtime(self, outfile="/var/tmp/squashfs.img", compression="xz", compressargs=[], size=2):
# make live rootfs image - must be named "LiveOS/rootfs.img" for dracut
workdir = joinpaths(os.path.dirname(outfile), "runtime-workdir")
if size:
--
1.8.1.4
10 years, 11 months
[PATCH] Add support for the Interlingua language (#872423).
by Chris Lumens
Note the hack warning. This cannot be added to mangleMap (where it should go)
because python-babel does not understand that setting and anaconda will not
run in the correct language.
---
po/LINGUAS | 2 +-
pyanaconda/localization.py | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/po/LINGUAS b/po/LINGUAS
index 63f8e7c..0984c61 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1,2 +1,2 @@
# Set of available languages.
-af am ar as ast bal be bg bn bn_IN bs ca cs cy da de de_CH el en@quot en@boldquot en_GB es et eu eu_ES fa fi fr gl gu he hi hr hu hy id ilo is it ja ka kk kn ko lt lv mai mk ml mr ms nb nds ne nl nn nso or pa pl pt pt_BR ro ru si sk sl sq sr sr@latin sv ta te tg th tr uk ur vi zh_CN zh_TW zu
+af am ar as ast bal be bg bn bn_IN bs ca cs cy da de de_CH el en@quot en@boldquot en_GB es et eu eu_ES fa fi fr gl gu he hi hr hu hy ia id ilo is it ja ka kk kn ko lt lv mai mk ml mr ms nb nds ne nl nn nso or pa pl pt pt_BR ro ru si sk sl sq sr sr@latin sv ta te tg th tr uk ur vi zh_CN zh_TW zu
diff --git a/pyanaconda/localization.py b/pyanaconda/localization.py
index e036d2e..84cfbb3 100644
--- a/pyanaconda/localization.py
+++ b/pyanaconda/localization.py
@@ -300,7 +300,12 @@ def write_language_configuration(lang, root):
try:
fpath = os.path.normpath(root + LOCALE_CONF_FILE_PATH)
with open(fpath, "w") as fobj:
- fobj.write('LANG="%s"\n' % lang.lang)
+ # FIXME: Remove this annoying hack once python-babel includes the
+ # right information.
+ if lang.lang == "ia":
+ fobj.write('LANG="ia_FR"\n')
+ else:
+ fobj.write('LANG="%s"\n' % lang.lang)
except IOError as ioerr:
msg = "Cannot write language configuration file: %s" % ioerr.strerror
--
1.8.1.2
10 years, 11 months
[PATCH] Show all devices on the filter screens, even hidden ones (#955664).
by Chris Lumens
---
pyanaconda/ui/gui/spokes/filter.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/filter.py b/pyanaconda/ui/gui/spokes/filter.py
index 808e67f..308f4b3 100644
--- a/pyanaconda/ui/gui/spokes/filter.py
+++ b/pyanaconda/ui/gui/spokes/filter.py
@@ -203,7 +203,7 @@ class SearchPage(FilterPage):
def visible_func(self, model, itr, *args):
obj = DiskStoreRow._make(model[itr])
- device = self.storage.devicetree.getDeviceByName(obj.name)
+ device = self.storage.devicetree.getDeviceByName(obj.name, hidden=True)
return self._filter_func(device)
class MultipathPage(FilterPage):
@@ -270,7 +270,7 @@ class MultipathPage(FilterPage):
return False
obj = DiskStoreRow._make(model[itr])
- device = self.storage.devicetree.getDeviceByName(obj.name)
+ device = self.storage.devicetree.getDeviceByName(obj.name, hidden=True)
return self.ismember(device) and self._filter_func(device)
class OtherPage(FilterPage):
@@ -357,7 +357,7 @@ class OtherPage(FilterPage):
def visible_func(self, model, itr, *args):
obj = DiskStoreRow._make(model[itr])
- device = self.storage.devicetree.getDeviceByName(obj.name)
+ device = self.storage.devicetree.getDeviceByName(obj.name, hidden=True)
return self.ismember(device) and self._filter_func(device)
class RaidPage(FilterPage):
@@ -374,7 +374,7 @@ class RaidPage(FilterPage):
return False
obj = DiskStoreRow._make(model[itr])
- device = self.storage.devicetree.getDeviceByName(obj.name)
+ device = self.storage.devicetree.getDeviceByName(obj.name, hidden=True)
return self.ismember(device)
class ZPage(FilterPage):
@@ -394,7 +394,7 @@ class ZPage(FilterPage):
def visible_func(self, model, itr, *args):
obj = DiskStoreRow._make(model[itr])
- device = self.storage.devicetree.getDeviceByName(obj.name)
+ device = self.storage.devicetree.getDeviceByName(obj.name, hidden=True)
return self.ismember(device)
class FilterSpoke(NormalSpoke):
--
1.8.1.2
10 years, 11 months
[PATCH] First check connecting, then connected state (#952801)
by Radek Vykydal
Prevent a race when NM becomes connected between the two checks.
---
anaconda | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/anaconda b/anaconda
index ac90d72..6d5c3f6 100755
--- a/anaconda
+++ b/anaconda
@@ -480,7 +480,7 @@ def setupDisplay(anaconda, opts, addon_paths=None):
flags.vncquestion = False
# disable VNC question if we don't have network
- if not nm_is_connected() and not nm_is_connecting():
+ if not nm_is_connecting() and not nm_is_connected():
stdoutLog.warning("Not asking for VNC because we don't have a network")
flags.vncquestion = False
--
1.7.11.7
10 years, 11 months
[PATCH] Add \n when writing to stdout in _run_program (#957383)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
pyanaconda/iutil.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index 7020da5..79ed122 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -85,6 +85,7 @@ def _run_program(argv, root='/', stdin=None, stdout=None, env_prune=None):
program_log.info(line)
if stdout:
stdout.write(line)
+ stdout.write("\n")
except OSError as e:
program_log.error("Error running %s: %s" % (argv[0], e.strerror))
--
1.8.1.4
10 years, 11 months
[blivet] Re-initialize platform in storageInitialize (#962104)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
blivet/__init__.py | 4 ++++
blivet/platform.py | 7 +++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/blivet/__init__.py b/blivet/__init__.py
index 2d69eb1..7de454f 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -125,6 +125,10 @@ def storageInitialize(storage, ksdata, protected):
from pyanaconda.flags import flags as anaconda_flags
flags.update_from_anaconda_flags(anaconda_flags)
+ # Platform class setup depends on flags, re-initialize it.
+ import platform
+ platform.reset_platform()
+
storage.shutdown()
# Before we set up the storage system, we need to know which disks to
diff --git a/blivet/platform.py b/blivet/platform.py
index 3f7a00c..69005d9 100644
--- a/blivet/platform.py
+++ b/blivet/platform.py
@@ -405,5 +405,8 @@ def getPlatform():
else:
raise SystemError, "Could not determine system architecture."
-global platform
-platform = getPlatform()
+def reset_platform():
+ global platform
+ platform = getPlatform()
+
+reset_platform()
--
1.8.1.4
10 years, 11 months
[master] School project -- random data entropy
by Vratislav Podzimek
These are the patches related to my school project focusing on random data
entropy in the installation process. The make use of the related blivet patches.
PATCH 1/2 tells blivet which callbacks should be used instead of it directly
using and understanding our progress handling.
PATCH 2/2 adds callback for the case where there is not enough entropy in the
kernel pool. The user may help by moving mouse or typing on keyboard. The
functionality is shown in this video preview:
http://vpodzime.fedorapeople.org/ensure_entropy.webm
Just please note that I used 1500 bits of entropy as the minimal level, which is
much higher than what is actually needed. I believe that using a reasonable
value (like 256 bits in the blivet patches) would mean this dialog will hardly
ever appear. Another note -- unfortunately, the dialog cannot be lightboxed,
because the place where the callbacks are passed to blivet has no reference to
the UI and bypassing that would mean a lot of hacks and changes.
Vratislav Podzimek (2):
Use callbacks for blivet
Inform user we are waiting for random data entropy
anaconda.spec.in | 2 +-
po/POTFILES.in | 3 +
pyanaconda/install.py | 14 ++++-
pyanaconda/progress.py | 8 +++
pyanaconda/ui/gui/spokes/lib/entropy_dialog.glade | 61 +++++++++++++++++++++
pyanaconda/ui/gui/spokes/lib/entropy_dialog.py | 57 +++++++++++++++++++
pyanaconda/ui/lib/entropy.py | 67 +++++++++++++++++++++++
7 files changed, 209 insertions(+), 3 deletions(-)
create mode 100644 pyanaconda/ui/gui/spokes/lib/entropy_dialog.glade
create mode 100644 pyanaconda/ui/gui/spokes/lib/entropy_dialog.py
create mode 100644 pyanaconda/ui/lib/entropy.py
--
1.7.11.7
10 years, 11 months
unrelated patches
by Chris Lumens
Here's two for UI problems. The first doesn't have appropriate blockerness,
really ought to be fixed on f19-branch. The second is already approved, I
believe.
- Chris
10 years, 11 months