[blivet:rhel7/master] SELinux follow up patch
by Anne Mulhern
Just trying to avoid any SELinux stuff except when in installer mode.
mulhern (1):
Only do SELinux context resets if in installer mode (#1038146)
blivet/formats/fs.py | 2 +-
tests/formats_test/selinux_test.py | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 1 deletion(-)
--
1.8.3.1
10 years, 4 months
[blivet:rhel7/master 0/3] SELinux file contexts patch
by Anne Mulhern
Blivet needs to patch up some SELinux file contexts when it mounts a filesystem.
This problem surfaced in 2007 but things seem to be just the same now.
mulhern (3):
Test setting selinux context on lost+found (#1038146)
Don't reset the SELinux context before the filesystem is mounted
(#1038146)
Look up SELinux context for lost+found where it is needed (#1038146)
blivet/formats/fs.py | 19 ++++-------
tests/formats_test/selinux_test.py | 68 ++++++++++++++++++++++++++++++++++++++
2 files changed, 74 insertions(+), 13 deletions(-)
create mode 100755 tests/formats_test/selinux_test.py
--
1.8.3.1
10 years, 4 months
[master/rhel7-branch][PATCH] Give users hint about VNC password restrictions (#1053546)
by Vratislav Podzimek
We should inform users in advance about the VNC password restrictions instead of
just reporting errors if they don't follow them.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/tui/spokes/askvnc.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/tui/spokes/askvnc.py b/pyanaconda/ui/tui/spokes/askvnc.py
index 6382aa2..031034b 100644
--- a/pyanaconda/ui/tui/spokes/askvnc.py
+++ b/pyanaconda/ui/tui/spokes/askvnc.py
@@ -98,8 +98,8 @@ class VNCPassSpoke(NormalTUISpoke):
if message:
self._message = message
else:
- self._message = _("Please provide VNC password. You will have to type it twice. \n"
- "Leave blank for no password")
+ self._message = _("Please provide VNC password (must be six to eight characters long).\n"
+ "You will have to type it twice. Leave blank for no password")
@property
def indirect(self):
--
1.8.4.2
10 years, 4 months
[blivet:rhel7/master 00/16] More filesystem labeling
by Anne Mulhern
Sorry about the number of patches. I worked hard to reduce them from 19 to 16.
Some are really simple.
The interesting ones are:
* Return None... I changed my mind later, but couldn't squash this patch. You
should probably ignore it.
* Make name an abstract...only interesting part is language semantics.
* Make an additional class ... ditto.
* Use filesytem creation app...in theory this decision should allow to set
more labels as some filesystems may not have a distinct labeling app.
* Add filesystem tool dependencies...I thought this was right but I don't
know enough about the build system to know what this does.
* Change the meaning of label field values...this one might be controversial.
But it is true that there is a difference between accept the filesystem default
and empty label since the filesystem default may not be an empty label.
mulhern (16):
Have writeLabel throw a more informative exception (#1038590)
Removed redundant check for existance of filesystem (#1038590)
Return None if the filesystem has no label (#1038590)
Remove code about unsetting a label (#1038590)
Remove redundant _defaultFormatOptions field.
Fix copyright date (#1038590)
Make name an abstract property (#1038590)
Make an additional class for labeling abstractions (#1038590)
Remove BTRFS._getFormatOptions (#1038590)
Import errors so FSError name is resolved (#1038590)
Use filesystem creation app to set filesystem label (#1038590)
Add a method that indicates ability to relabel (#1038590)
Enable labeling on HFS filesystem (#1038590)
Enable labeling on NTFS filesystem (#1038590)
Add filesystem tool dependencies (#1038590)
Change the meaning of label field values (#1038590)
blivet/devicelibs/swap.py | 2 +-
blivet/formats/__init__.py | 19 ++--
blivet/formats/fs.py | 90 +++++++++--------
blivet/formats/fslabel.py | 136 ++++++++++----------------
blivet/formats/fslabeling.py | 185 +++++++++++++++++++++++++++++++++++
python-blivet.spec | 7 ++
tests/formats_test/misc_test.py | 211 +++++++++++++++++++++++++++++++++++++---
7 files changed, 505 insertions(+), 145 deletions(-)
create mode 100644 blivet/formats/fslabeling.py
--
1.8.3.1
10 years, 4 months
[rhel7-branch][PATCH] Unlock encrypted partitions before finding installations (#1043783)
by Vratislav Podzimek
Before trying to find existing installations, we should prompt user for
passphrase to unlock encrypted paritions and try to unlock them.
(port of 4f7b135ade6ad4df40541050ddc9d3379d343f09 from master)
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/constants_text.py | 4 ++++
pyanaconda/rescue.py | 53 +++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/constants_text.py b/pyanaconda/constants_text.py
index b4b4861..cad7216 100644
--- a/pyanaconda/constants_text.py
+++ b/pyanaconda/constants_text.py
@@ -40,6 +40,10 @@ TEXT_OK_STR = N_("OK")
TEXT_OK_CHECK = "ok"
TEXT_OK_BUTTON = Translator(TEXT_OK_STR, TEXT_OK_CHECK)
+TEXT_CANCEL_STR = N_("Cancel")
+TEXT_CANCEL_CHECK = "cancel"
+TEXT_CANCEL_BUTTON = Translator(TEXT_CANCEL_STR, TEXT_CANCEL_CHECK)
+
TEXT_YES_STR = N_("Yes")
TEXT_YES_CHECK = "yes"
TEXT_YES_BUTTON = Translator(TEXT_YES_STR, TEXT_YES_CHECK)
diff --git a/pyanaconda/rescue.py b/pyanaconda/rescue.py
index 788eb25..ff74f6b 100644
--- a/pyanaconda/rescue.py
+++ b/pyanaconda/rescue.py
@@ -37,7 +37,23 @@ import time
import re
import network
import subprocess
-from pykickstart.constants import *
+
+from snack import ButtonChoiceWindow, ListboxChoiceWindow,SnackScreen
+
+from constants import ANACONDA_CLEANUP, ROOT_PATH
+from constants_text import TEXT_OK_BUTTON, TEXT_NO_BUTTON, TEXT_YES_BUTTON
+from text import WaitWindow, OkCancelWindow, ProgressWindow, PassphraseEntryWindow
+from flags import flags
+from installinterfacebase import InstallInterfaceBase
+from i18n import _
+from kickstart import runPostScripts
+
+from blivet import mountExistingSystem
+from blivet.errors import StorageError
+from blivet.devices import LUKSDevice
+
+from pykickstart.constants import KS_REBOOT, KS_SHUTDOWN
+
import meh.ui.text
from pyanaconda.i18n import _
@@ -214,6 +230,40 @@ def _exception_handler_wrapper(orig_except_handler, screen, *args):
screen.finish()
return orig_except_handler(*args)
+def _unlock_devices(intf, storage):
+ try_passphrase = None
+ for device in storage.devices:
+ if device.format.type == "luks":
+ skip = False
+ unlocked = False
+ while not (skip or unlocked):
+ if try_passphrase is None:
+ passphrase = intf.passphraseEntryWindow(device.name)
+ else:
+ passphrase = try_passphrase
+
+ if passphrase is None:
+ # canceled
+ skip = True
+ else:
+ device.format.passphrase = passphrase
+ try:
+ device.setup()
+ device.format.setup()
+ luks_dev = LUKSDevice(device.format.mapName,
+ parents=[device],
+ exists=True)
+ storage.devicetree._addDevice(luks_dev)
+ storage.devicetree.populate()
+ unlocked = True
+ # try to use the same passhprase for other devices
+ try_passphrase = passphrase
+ except StorageError as serr:
+ log.error("Failed to unlock %s: %s", device.name, serr)
+ device.teardown(recursive=True)
+ device.format.passphrase = None
+ try_passphrase = None
+
def doRescue(intf, rescue_mount, ksdata):
import blivet
@@ -271,6 +321,7 @@ def doRescue(intf, rescue_mount, ksdata):
sto = blivet.Blivet(ksdata=ksdata)
blivet.storageInitialize(sto, ksdata, [])
+ _unlock_devices(intf, sto)
roots = blivet.findExistingInstallations(sto.devicetree)
if not roots:
--
1.8.4.2
10 years, 4 months
[PATCH] Change the product name we key off (#1055019).
by Chris Lumens
We're getting used in RHEL-like products that are not named "Red Hat Enterprise
Linux". In those products, the Fedora codepaths are getting used by mistake.
---
pyanaconda/bootloader.py | 4 ++--
pyanaconda/installclasses/fedora.py | 2 +-
pyanaconda/installclasses/rhel.py | 2 +-
pyanaconda/ui/gui/spokes/welcome.py | 2 +-
pyanaconda/ui/tui/spokes/warnings.py | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 251275b..8b258d2 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1370,7 +1370,7 @@ class GRUB2(GRUB):
@property
def stage2_format_types(self):
- if productName.startswith("Red Hat Enterprise Linux"):
+ if productName.startswith("Red Hat "):
return ["xfs", "ext4", "ext3", "ext2", "btrfs"]
else:
return ["ext4", "ext3", "ext2", "btrfs", "xfs"]
@@ -2035,7 +2035,7 @@ class ZIPL(BootLoader):
@property
def stage2_format_types(self):
- if productName.startswith("Red Hat Enterprise Linux"):
+ if productName.startswith("Red Hat "):
return ["xfs", "ext4", "ext3", "ext2"]
else:
return ["ext4", "ext3", "ext2", "xfs"]
diff --git a/pyanaconda/installclasses/fedora.py b/pyanaconda/installclasses/fedora.py
index 79c1a9b..f42e73d 100644
--- a/pyanaconda/installclasses/fedora.py
+++ b/pyanaconda/installclasses/fedora.py
@@ -29,7 +29,7 @@ class InstallClass(BaseInstallClass):
id = "fedora"
name = N_("_Fedora")
sortPriority = 10000
- if productName.startswith("Red Hat Enterprise"):
+ if productName.startswith("Red Hat "):
hidden = 1
_l10n_domain = "anaconda"
diff --git a/pyanaconda/installclasses/rhel.py b/pyanaconda/installclasses/rhel.py
index 4283337..d3feed3 100644
--- a/pyanaconda/installclasses/rhel.py
+++ b/pyanaconda/installclasses/rhel.py
@@ -26,7 +26,7 @@ class InstallClass(BaseInstallClass):
id = "rhel"
name = N_("Red Hat Enterprise Linux")
sortPriority = 10000
- if not productName.startswith("Red Hat Enterprise"):
+ if not productName.startswith("Red Hat "):
hidden = 1
defaultFS = "xfs"
diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py
index 64f6adb..5f2ca5e 100644
--- a/pyanaconda/ui/gui/spokes/welcome.py
+++ b/pyanaconda/ui/gui/spokes/welcome.py
@@ -308,7 +308,7 @@ class WelcomeLanguageSpoke(LangLocaleHandler, StandaloneSpoke):
if rc != 1:
sys.exit(0)
- if productName.startswith("Red Hat Enterprise Linux") and \
+ if productName.startswith("Red Hat ") and \
is_unsupported_hw() and not self.data.unsupportedhardware.unsupported_hardware:
dlg = self.builder.get_object("unsupportedHardwareDialog")
with enlightbox(self.window, dlg):
diff --git a/pyanaconda/ui/tui/spokes/warnings.py b/pyanaconda/ui/tui/spokes/warnings.py
index 6736117..b98882b 100644
--- a/pyanaconda/ui/tui/spokes/warnings.py
+++ b/pyanaconda/ui/tui/spokes/warnings.py
@@ -46,7 +46,7 @@ class WarningsSpoke(StandaloneTUISpoke):
"supported hardware, please refer to "
"http://www.redhat.com/hardware." )
# Does anything need to be displayed?
- self._unsupported = productName.startswith("Red Hat Enterprise Linux") and \
+ self._unsupported = productName.startswith("Red Hat ") and \
is_unsupported_hw() and \
not self.data.unsupportedhardware.unsupported_hardware
--
1.8.3.1
10 years, 4 months
[PATCH] minor GUI tweaks
by Chris Lumens
These are all patches against master, though they fix bugs from RHEL7 and would
need to be ported. The last one fixes a problem I created with the patches
for 1014671.
- Chris
10 years, 4 months
[anaconda:rhel7/master] More filesystem labeling
by Anne Mulhern
I will bump the blivet required version appropriately.
These changes cope with the fact that the default label for a given filesystem
is not necessarily the empty label by making anaconda specify its own default,
the empty label. This means that the user may occasionally be irritated by not
having the label default to their expected default for the given filesystem.
The user may also, occasionally, be surprised by a default
label showing up when they specified an empty string.
This could happen where a filesystem has a default label but no mechanism
for labeling. Both behaviors were
already occurring w/ previous code, so this doesn't change any behavior.
There was also a bug in my previous patch having to do with setting the label
back to "" which is now fixed.
mulhern (1):
Various changes to handling of filesystem label setting (#1038590)
pyanaconda/ui/gui/spokes/custom.py | 36 ++++++++++++++----------------------
1 file changed, 14 insertions(+), 22 deletions(-)
--
1.8.3.1
10 years, 4 months