parent
a6176ca120
commit
15b08dd6a3
|
@ -0,0 +1,54 @@
|
|||
From 544a83ef63454e91cfea835b74bd76310d8774cc Mon Sep 17 00:00:00 2001
|
||||
From: Vendula Poncova <vponcova@redhat.com>
|
||||
Date: Fri, 9 Mar 2018 11:16:07 +0100
|
||||
Subject: [PATCH] User module should parse only rootpw for now (#1553488)
|
||||
|
||||
User module doesn't define the UserData and the GroupData in its
|
||||
specification, so Anaconda fails when the kickstart file specifies
|
||||
a user or a group. User module should parse only rootpw for now.
|
||||
|
||||
Resolves: rhbz#1553488
|
||||
---
|
||||
pyanaconda/modules/user/kickstart.py | 6 +-----
|
||||
tests/pyanaconda_tests/module_user_test.py | 2 +-
|
||||
2 files changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/pyanaconda/modules/user/kickstart.py b/pyanaconda/modules/user/kickstart.py
|
||||
index 0a6cd66c5..5a78e8cd2 100644
|
||||
--- a/pyanaconda/modules/user/kickstart.py
|
||||
+++ b/pyanaconda/modules/user/kickstart.py
|
||||
@@ -17,9 +17,7 @@
|
||||
# License and may only be used or replicated with the express permission of
|
||||
# Red Hat, Inc.
|
||||
#
|
||||
-from pykickstart.commands.user import F24_User
|
||||
from pykickstart.commands.rootpw import F18_RootPw
|
||||
-from pykickstart.commands.group import F12_Group
|
||||
from pykickstart.version import F28
|
||||
from pyanaconda.core.kickstart import KickstartSpecification
|
||||
|
||||
@@ -28,7 +26,5 @@ class UserKickstartSpecification(KickstartSpecification):
|
||||
|
||||
version = F28
|
||||
commands = {
|
||||
- "rootpw": F18_RootPw,
|
||||
- "user": F24_User,
|
||||
- "group": F12_Group,
|
||||
+ "rootpw": F18_RootPw
|
||||
}
|
||||
diff --git a/tests/pyanaconda_tests/module_user_test.py b/tests/pyanaconda_tests/module_user_test.py
|
||||
index e67cd3504..6ea81ada4 100644
|
||||
--- a/tests/pyanaconda_tests/module_user_test.py
|
||||
+++ b/tests/pyanaconda_tests/module_user_test.py
|
||||
@@ -40,7 +40,7 @@ class UserInterfaceTestCase(unittest.TestCase):
|
||||
|
||||
def kickstart_properties_test(self):
|
||||
"""Test kickstart properties."""
|
||||
- self.assertEqual(self.user_interface.KickstartCommands, ["rootpw", "user", "group"])
|
||||
+ self.assertEqual(self.user_interface.KickstartCommands, ["rootpw"])
|
||||
self.assertEqual(self.user_interface.KickstartSections, [])
|
||||
self.assertEqual(self.user_interface.KickstartAddons, [])
|
||||
self.callback.assert_not_called()
|
||||
--
|
||||
2.14.3
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
From 07471d58ff89d97ed551a5bfbcbfdfe428849464 Mon Sep 17 00:00:00 2001
|
||||
From: David Lehman <dlehman@redhat.com>
|
||||
Date: Thu, 8 Mar 2018 11:43:31 -0500
|
||||
Subject: [PATCH 1/1] Mark partition live device's disk protected. (#1524700)
|
||||
|
||||
---
|
||||
pyanaconda/storage/osinstall.py | 18 +++++++++++++-----
|
||||
1 file changed, 13 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/pyanaconda/storage/osinstall.py b/pyanaconda/storage/osinstall.py
|
||||
index 435c723d9..8f34497e6 100644
|
||||
--- a/pyanaconda/storage/osinstall.py
|
||||
+++ b/pyanaconda/storage/osinstall.py
|
||||
@@ -1701,11 +1701,19 @@ class InstallerStorage(Blivet):
|
||||
if " /run/initramfs/live " not in mnt:
|
||||
continue
|
||||
|
||||
- live_device_name = mnt.split()[0].split("/")[-1]
|
||||
- log.info("%s looks to be the live device; marking as protected",
|
||||
- live_device_name)
|
||||
- self.protected_dev_names.append(live_device_name)
|
||||
- self.live_backing_device = live_device_name
|
||||
+ live_device_path = mnt.split()[0]
|
||||
+ udev_device = udev.get_device(device_node=live_device_path)
|
||||
+ if udev_device and udev.device_is_partition(udev_device):
|
||||
+ live_device_name = udev.device_get_partition_disk(udev_device)
|
||||
+ else:
|
||||
+ live_device_name = live_device_path.split("/")[-1]
|
||||
+
|
||||
+ log.info("resolved live device to %s", live_device_name)
|
||||
+ if live_device_name:
|
||||
+ log.info("marking live device %s protected", live_device_name)
|
||||
+ self.protected_dev_names.append(live_device_name)
|
||||
+ self.live_backing_device = live_device_name
|
||||
+
|
||||
break
|
||||
|
||||
def _mark_protected_device(self, device):
|
||||
--
|
||||
2.14.3
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
Summary: Graphical system installer
|
||||
Name: anaconda
|
||||
Version: 28.22.2
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: GPLv2+ and MIT
|
||||
Group: Applications/System
|
||||
URL: http://fedoraproject.org/wiki/Anaconda
|
||||
|
@ -344,6 +344,9 @@ update-desktop-database &> /dev/null || :
|
|||
%{_prefix}/libexec/anaconda/dd_*
|
||||
|
||||
%changelog
|
||||
* Mon Mar 12 2018 Martin Kolman <mkolman@redhat.com> - 28.22.2-3
|
||||
- add missing patches (mkolman)
|
||||
|
||||
* Mon Mar 12 2018 Martin Kolman <mkolman@redhat.com> - 28.22.2-2
|
||||
- User module should parse only rootpw for now (#1553488) (vponcova)
|
||||
- Mark partition live device's disk protected. (#1524700) (dlehman)
|
||||
|
|
Loading…
Reference in New Issue