[blivet:rhel7/master 0/2] #1019685 patches (v2)
by Anne Mulhern
The only difference is that the second patch has an alternative to the
# pylint: disable=attribute-defined-outside-init.
directive, which might be slightly better.
Turns out that the fix in
https://bitbucket.org/logilab/pylint/issue/192/w0201-message-may-be-a-lit...
does not cover this case anyway.
mulhern (2):
Add BTRFSValueError error and use in btrfs related code (#1019685)
Check if device has enough members when setting RAID level (#1019685)
blivet/devicelibs/btrfs.py | 20 ++++++------
blivet/devices.py | 78 ++++++++++++++++++++++++++++++++++++----------
blivet/errors.py | 3 ++
3 files changed, 74 insertions(+), 27 deletions(-)
--
1.9.3
9 years, 9 months
[PATCH 0/2] Fix SIGSEGV handler and other synchronous signals
by David Shea
Ever noticed that the SIGSEGV handler never actually gets called? It's
because python doesn't support that, at least not when threads are in use.
signalmodule.c has this big comment up near the top:
NOTES ON THE INTERACTION BETWEEN SIGNALS AND THREADS
When threads are supported, we want the following semantics:
- only the main thread can set a signal handler
- any thread can get a signal handler
- signals are only delivered to the main thread
I.e. we don't support "synchronous signals" like SIGFPE (catching
this doesn't make much sense in Python anyway) nor do we support
signals as a means of inter-thread communication, since not all
thread implementations support that (at least our thread library
doesn't).
but that's ok. We can work around that.
David Shea (2):
Remove argument handling from methods without arguments
Fix the SIGSEGV handler
anaconda | 6 +++++-
pyanaconda/isys/__init__.py | 2 +-
pyanaconda/isys/isys.c | 39 +++++++++++++++++++++++++++++----------
3 files changed, 35 insertions(+), 12 deletions(-)
--
2.1.0
9 years, 9 months
[lorax] add fedora-repos-anaconda to runtime environment
by Adam Williamson
It is needed for Product-ized installs to find the correct frozen install
repositories. See RHBZ #1134524
---
share/runtime-install.tmpl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/share/runtime-install.tmpl b/share/runtime-install.tmpl
index f0a1e32..61b1d80 100644
--- a/share/runtime-install.tmpl
+++ b/share/runtime-install.tmpl
@@ -7,6 +7,8 @@ installpkg kexec-tools-anaconda-addon
## anaconda deps that aren't in the RPM
installpkg tmux
installpkg iscsi-initiator-utils
+## needed for product-ized installs to find correct frozen repos
+installpkg fedora-repos-anaconda
## Other available payloads
installpkg dnf
installpkg rpm-ostree
--
2.1.0
9 years, 9 months
[master/rhel7-branch] On the way to checking and forcing minimum entropy
by Vratislav Podzimek
These two patches (anaconda and blivet) implement something I've proposed more
than a year ago as part of my school project for requiring minimum entropy when
creating new LUKS. The other part of the patchset that implements the actual
entropy checking and forcing is on the way, but I'd like to make the entropy
limit set outside of blivet (i.e. in anaconda) which I think is the rigth way to
go, but in the same time it complicates the patch quite a lot. I'm sending these
two patches in advance so that we can agree on the way how to implement this.
In contrast to the very first version of the patch for using callbacks in blivet
instead of forcing it to import and use our progress reporting code these
patches try to make the callbacks framework much more robust. With the main
focus on the callbacks being "extensible" -- i.e. new data can be passed to
existing callbacks and new callbacks can be added without breaking the old code.
Namedtuples are great for passing data to callbacks because we can add some more
fields to them without breaking callbacks using just the old fields. The
namedtuple holding the callbacks and a function to instantiate it may be a bit
controversial, but let me explain the points behind this implementation:
1) as in case of callbacks' data it is easy to add new callbacks
2) the object holding the references to callbacks is opaque and read-only so if
we decide to change its implementation (dict, class,...) we wouldn't have to
care about any code relying on the old implementation
3) adding new callbacks is not an issue because with the function because there
are default values for non-specified callbacks (namedtuple requires all fileds
to be specified)
Another solution would be a simple CallbacksRegister class with the default
parameter values in __init__ which would store the parameters values (callbacks)
as instance attributes, but these would be read-write and the by providing the
class as a public API we would be forced to keep the implemenation as a class.
Attempts to make it more restricted would lead to something definitely more
complicated than a private namedtuple and a "factory function".
Vratislav Podzimek (1):
Give blivet callbacks for reporting partitioning progress
pyanaconda/install.py | 24 ++++++++++++++++--------
pyanaconda/progress.py | 15 ++++++++++++++-
2 files changed, 30 insertions(+), 9 deletions(-)
--
1.9.3
9 years, 9 months
[master/rhel7-branch] Take 02: Warn if software selection size exceeds available space (#1010070)
by Samantha N. Bueno
Show a warning message to users if their software selection exceeds the
amount of space they have allocated for installation.
Resolves: rhbz#1010070
---
pyanaconda/ui/tui/hubs/summary.py | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/tui/hubs/summary.py b/pyanaconda/ui/tui/hubs/summary.py
index 5302b86..c1b0dcf 100644
--- a/pyanaconda/ui/tui/hubs/summary.py
+++ b/pyanaconda/ui/tui/hubs/summary.py
@@ -20,6 +20,7 @@
# Jesse Keating <jkeating(a)redhat.com>
#
+from pyanaconda.ui.lib.space import FileSystemSpaceChecker, DirInstallSpaceChecker
from pyanaconda.ui.tui.hubs import TUIHub
from pyanaconda.flags import flags
from pyanaconda.errors import CmdlineError
@@ -35,6 +36,14 @@ class SummaryHub(TUIHub):
## FIXME: this should be pulling data from somewhere, not just a static list
categories = ["localization", "software", "system", "password"]
+ def __init__(self, app, data, storage, payload, instclass):
+ super(SummaryHub, self).__init__(app, data, storage, payload, instclass)
+
+ if not flags.dirInstall:
+ self._checker = FileSystemSpaceChecker(storage, payload)
+ else:
+ self._checker = DirInstallSpaceChecker(storage, payload)
+
def setup(self, environment="anaconda"):
TUIHub.setup(self, environment=environment)
@@ -58,9 +67,14 @@ class SummaryHub(TUIHub):
incompleteSpokes = [spoke for spoke in self._keys.values()
if spoke.mandatory and not spoke.completed]
- if flags.automatedInstall and not incompleteSpokes:
- self.close()
- return None
+ # do a bit of final sanity checking, make sure pkg selection
+ # size < available fs space
+ if flags.automatedInstall:
+ if self._checker and not self._checker.check():
+ print(self._checker.error_message)
+ if not incompleteSpokes:
+ self.close()
+ return None
if not flags.ksprompt:
errtxt = _("The following mandatory spokes are not completed:") + \
@@ -95,6 +109,11 @@ class SummaryHub(TUIHub):
if not spoke.completed and spoke.mandatory:
print(_("Please complete all spokes before continuing"))
return False
+ # do a bit of final sanity checking, making sure pkg selection
+ # size < available fs space
+ if self._checker and not self._checker.check():
+ print(self._checker.error_message)
+ return False
if self.app._screens:
self.app.close_screen()
return True
--
1.9.3
9 years, 9 months
[master/rhel7-branch] Warn if software selection size exceeds available space (#1010070)
by Samantha N. Bueno
Show a warning message to users if their software selection exceeds the
amount of space they have allocated for installation.
Resolves: rhbz#1010070
---
pyanaconda/ui/tui/hubs/summary.py | 59 +++++++++++++++++++++++++++++++++++++--
1 file changed, 56 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/tui/hubs/summary.py b/pyanaconda/ui/tui/hubs/summary.py
index 5302b86..6e144bf 100644
--- a/pyanaconda/ui/tui/hubs/summary.py
+++ b/pyanaconda/ui/tui/hubs/summary.py
@@ -20,6 +20,7 @@
# Jesse Keating <jkeating(a)redhat.com>
#
+from pyanaconda.ui.lib.space import FileSystemSpaceChecker
from pyanaconda.ui.tui.hubs import TUIHub
from pyanaconda.flags import flags
from pyanaconda.errors import CmdlineError
@@ -35,6 +36,11 @@ class SummaryHub(TUIHub):
## FIXME: this should be pulling data from somewhere, not just a static list
categories = ["localization", "software", "system", "password"]
+ def __init__(self, app, data, storage, payload, instclass):
+ super(SummaryHub, self).__init__(app, data, storage, payload, instclass)
+
+ self._checker = FileSystemSpaceChecker(storage, payload)
+
def setup(self, environment="anaconda"):
TUIHub.setup(self, environment=environment)
@@ -58,9 +64,14 @@ class SummaryHub(TUIHub):
incompleteSpokes = [spoke for spoke in self._keys.values()
if spoke.mandatory and not spoke.completed]
- if flags.automatedInstall and not incompleteSpokes:
- self.close()
- return None
+ # do a bit of final sanity checking, make sure pkg selection
+ # size < available fs space
+ if flags.automatedInstall:
+ if self._checker and not self._checker.check():
+ print(self._checker.error_message)
+ if not incompleteSpokes:
+ self.close()
+ return None
if not flags.ksprompt:
errtxt = _("The following mandatory spokes are not completed:") + \
@@ -78,6 +89,43 @@ class SummaryHub(TUIHub):
# installation option here
return _(" Please make your choice from above ['q' to quit | 'b' to begin installation |\n 'r' to refresh]: ")
+ def refresh(self, args=None):
+ TUIHub.refresh(self, args)
+ cats_and_spokes = self._collectCategoriesAndSpokes()
+ categories = cats_and_spokes.keys()
+
+ for c in sorted(categories, key=lambda c: c.title):
+ obj = c()
+
+ selectors = []
+ for spokeClass in sorted(cats_and_spokes[c], key=lambda s: s.title):
+ # Check if this spoke is to be shown in the supported environment
+ if not any(spokeClass.should_run(environ, self.data) for environ in self._environs):
+ continue
+
+ # Create the new spokes and populate its UI with whatever data.
+ # From here on, this Spoke will always exist.
+ spoke = spokeClass(self.app, self.data, self.storage, self.payload, self.instclass)
+
+ # If a spoke is not showable, it is unreachable in the UI, so
+ # just get rid of it
+ if not spoke.showable:
+ del(spoke)
+ continue
+
+ # If a spoke is indirect, it is reachable but not directly from
+ # the hub.
+ if spoke.indirect:
+ spoke.initialize()
+ continue
+
+ spoke.initialize()
+
+ # If this is a ks install, attempt to execute any provided
+ # ksdata now
+ if flags.automatedInstall and spoke.ready and spoke.changed:
+ spoke.execute()
+
def input(self, args, key):
"""Handle user input. Numbers are used to show a spoke, the rest is passed
to the higher level for processing."""
@@ -95,6 +143,11 @@ class SummaryHub(TUIHub):
if not spoke.completed and spoke.mandatory:
print(_("Please complete all spokes before continuing"))
return False
+ # do a bit of final sanity checking, making sure pkg selection
+ # size < available fs space
+ if self._checker and not self._checker.check():
+ print(self._checker.error_message)
+ return False
if self.app._screens:
self.app.close_screen()
return True
--
1.9.3
9 years, 9 months
[master][PATCH] Respect both ways how to disable bootloader installation
by Vratislav Podzimek
There are two ways how to disable bootloader installation in kickstart, by
'bootloader --disabled' and 'bootloader --location=none'. Both should result in
the same packageset installed and the same number of steps in our progress bar.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/install.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/install.py b/pyanaconda/install.py
index b9d4ef9..9344ac0 100644
--- a/pyanaconda/install.py
+++ b/pyanaconda/install.py
@@ -134,7 +134,8 @@ def doInstall(storage, payload, ksdata, instClass):
installing packages onto those filesystems.
"""
willRunRealmd = ksdata.realm.join_realm
- willInstallBootloader = not flags.flags.dirInstall and not ksdata.bootloader.disabled
+ willInstallBootloader = not flags.flags.dirInstall and (not ksdata.bootloader.disabled
+ and ksdata.bootloader != "none")
# First save system time to HW clock.
if flags.can_touch_runtime_system("save system time to HW clock"):
@@ -199,7 +200,7 @@ def doInstall(storage, payload, ksdata, instClass):
# system is bootable and configurable, and some other packages in order
# to finish setting up the system.
packages = storage.packages + ksdata.realm.packages
- if not ksdata.bootloader.disabled:
+ if willInstallBootloader:
packages += storage.bootloader.packages
# don't try to install packages from the install class' ignored list and the
--
1.9.3
9 years, 9 months
[master/rhel7-branch] Make the Find button easy to find
by Vratislav Podzimek
The following patch replaces the grids for search details and results in
advanced/filter storage with vertical and horizontal boxes making the alignment
of rows mutually independent and it also tweaks some expand properties. The
result is that the Find button that is used to trigger search/filter operations
is not rightmost aligned and thus not moved away from the visible area when
search results are wider than screen space and horizontal scroll bar gets in the
game.
Vratislav Podzimek (1):
Make the Find button not jump out of the visible area (#1074183)
pyanaconda/ui/gui/spokes/filter.glade | 1540 ++++++++++++++++-----------------
1 file changed, 767 insertions(+), 773 deletions(-)
--
1.9.3
9 years, 9 months
[PATCH 0/9] v2.3: btrfs and LVMlv support in grubby
by Gene Czarcinski
The version of anaconda installer in development (both rawhide and 21) have
been updated to support /boot on both btrfs and an LVMlv.
The primary objective of this update is to add support for /boot on
btrfs. However, it also includes some related updates with respect to
LVMlv support and the basic operation of grubby. Rather than having one
giant update, this has been broken up into 9 patch files which (hopefully)
will be easier to understand.
1. Add code to limit the scan of a grub2 configuration file for a valid
template to that to the main menu section.
2. Add support for /boot on btrfs subvol or <dir> under rootrf on btrfs subvol.
3. Add compile-time enabled debugging for btrfs support
4. Add tests for btrfs support
5. Add new run-time option to disable output from compile-time enabling of
DEBUG.
6. Enable DEBUG (for now a good idea but can be disabled once there is
confidence in new updates) ... perhaps DEBUG should always be enabled
and a new runtime parameter enables output. For now it is what it is.
7. Similar to the regression tests for BTRFS support, add regression tests
for /boot on LVMlv support.
8. The test files to support #7.
9. When an rpm is built under mock-chroot, DEBUG is enabled, andthe regression
tests are run, some btrfs tests will fail. The problem is that
findBootPrefi() does not work correctly under mock.
Gene Czarcinski (9):
v2 add code to validate a grub2 entry
v2.2 add support for btrfs when grub2 is bootloader
v2.1 add compile-time enabled debugging code for btrfs
v2.1 add tests for btrfs support
add disable-debug runtime option
Enable DEBUG
regression test to verify that boot on LVMlv supported
files for LVMlv regressions tests
bugfix findBootPrefix so it works under mock
grubby.c | 319 +++++++++++++++++++++++++++++++++++++++++++----
test.sh | 78 +++++++++++-
test/grub2.15 | 126 +++++++++++++++++++
test/grub2.16 | 140 +++++++++++++++++++++
test/grub2.17 | 128 +++++++++++++++++++
test/grub2.18 | 143 +++++++++++++++++++++
test/grub2.19 | 126 +++++++++++++++++++
test/grub2.20 | 128 +++++++++++++++++++
test/grub2.21 | 128 +++++++++++++++++++
test/grub2.22 | 143 +++++++++++++++++++++
test/grub2.23 | 128 +++++++++++++++++++
test/grub2.24 | 143 +++++++++++++++++++++
test/grub2.25 | 128 +++++++++++++++++++
test/grub2.26 | 128 +++++++++++++++++++
test/results/add/g2-1.15 | 140 +++++++++++++++++++++
test/results/add/g2-1.16 | 141 +++++++++++++++++++++
test/results/add/g2-1.17 | 143 +++++++++++++++++++++
test/results/add/g2-1.18 | 144 +++++++++++++++++++++
test/results/add/g2-1.19 | 141 +++++++++++++++++++++
test/results/add/g2-1.20 | 144 +++++++++++++++++++++
test/results/add/g2-1.21 | 143 +++++++++++++++++++++
test/results/add/g2-1.22 | 144 +++++++++++++++++++++
test/results/add/g2-1.23 | 143 +++++++++++++++++++++
test/results/add/g2-1.24 | 144 +++++++++++++++++++++
test/results/add/g2-1.25 | 144 +++++++++++++++++++++
test/results/add/g2-1.26 | 144 +++++++++++++++++++++
test/results/debug/g2.1 | 2 +-
27 files changed, 3675 insertions(+), 28 deletions(-)
create mode 100644 test/grub2.15
create mode 100644 test/grub2.16
create mode 100644 test/grub2.17
create mode 100644 test/grub2.18
create mode 100644 test/grub2.19
create mode 100644 test/grub2.20
create mode 100644 test/grub2.21
create mode 100644 test/grub2.22
create mode 100644 test/grub2.23
create mode 100644 test/grub2.24
create mode 100644 test/grub2.25
create mode 100644 test/grub2.26
create mode 100644 test/results/add/g2-1.15
create mode 100644 test/results/add/g2-1.16
create mode 100644 test/results/add/g2-1.17
create mode 100644 test/results/add/g2-1.18
create mode 100644 test/results/add/g2-1.19
create mode 100644 test/results/add/g2-1.20
create mode 100644 test/results/add/g2-1.21
create mode 100644 test/results/add/g2-1.22
create mode 100644 test/results/add/g2-1.23
create mode 100644 test/results/add/g2-1.24
create mode 100644 test/results/add/g2-1.25
create mode 100644 test/results/add/g2-1.26
--
1.9.3
9 years, 9 months