From d608962bacad845f2786b8ea86ba136e9ab3468a Mon Sep 17 00:00:00 2001 From: Martin Kolman Date: Mar 19 2018 18:02:16 +0000 Subject: New version 28.22.2-5 - Write rootpw command to kickstart (#1557529) (mkolman) --- diff --git a/0003-Write-rootpw-command-to-kickstart-1557529.patch b/0003-Write-rootpw-command-to-kickstart-1557529.patch new file mode 100644 index 0000000..2e2bc22 --- /dev/null +++ b/0003-Write-rootpw-command-to-kickstart-1557529.patch @@ -0,0 +1,46 @@ +From 830a0076e33cf97235ee7a6d366c0fd061c36894 Mon Sep 17 00:00:00 2001 +From: Martin Kolman +Date: Mon, 19 Mar 2018 18:20:31 +0100 +Subject: [PATCH 3/3] Write rootpw command to kickstart (#1557529) + +During the switch to handle the rootpw command by a kickstart module +the __str__() method of the Kickstart command object has not been +overridden, resulting in the command missing from the output kickstart +Anaconda saves after the installation into /root. + +This had the unintended consequence of making Initial Setup lock the +root account during it's run after the installation. Initial Setup +read the kickstart file in /root created by Anaconda and noticed +the rootpw command is missing, which it equaled to root password not +being set. There is logic in place preventing Anaconda/IS from creating +root accounts with empty root password, which triggered and locked +the root account. + +So make sure the rootpw command is present in the output kickstart +by adding the overlooked __str__() method override as with all other +kickstart commands handled by DBUS modules. + +Resolves: rhbz#1557529 +--- + pyanaconda/kickstart.py | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py +index 488f3222e..78fa21345 100644 +--- a/pyanaconda/kickstart.py ++++ b/pyanaconda/kickstart.py +@@ -1834,6 +1834,11 @@ class ReqPart(commands.reqpart.F23_ReqPart): + autopart.do_reqpart(storage, reqs) + + class RootPw(RemovedCommand): ++ ++ def __str__(self): ++ user_proxy = DBus.get_proxy(MODULE_USER_NAME, MODULE_USER_PATH) ++ return user_proxy.GenerateKickstart() ++ + def execute(self, storage, ksdata, instClass, users): + + user_proxy = DBus.get_proxy(MODULE_USER_NAME, MODULE_USER_PATH) +-- +2.14.3 + diff --git a/anaconda.spec b/anaconda.spec index c0fbc40..4fb227b 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -7,7 +7,7 @@ Summary: Graphical system installer Name: anaconda Version: 28.22.2 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ and MIT Group: Applications/System URL: http://fedoraproject.org/wiki/Anaconda @@ -30,6 +30,9 @@ Patch1: 0001-Mark-partition-live-device-s-disk-protected.-1524700.patch # Bug 1553935 - Installer auto-quits after Workstation live install (as no spokes are on the install hub) Patch2: 0002-Don-t-autoquit-by-default-if-the-last-hub-is-empty-1.patch +# Bug 1557529 - Setting root password on live images fails since anaconda-28.22.2-3.fc28 +Patch3: 0003-Write-rootpw-command-to-kickstart-1557529.patch + # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -254,6 +257,7 @@ runtime on NFS/HTTP/FTP servers or local disks. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build # use actual build-time release number, not tarball creation time release number @@ -347,7 +351,9 @@ update-desktop-database &> /dev/null || : %{_prefix}/lib/dracut/modules.d/80%{name}/* %{_prefix}/libexec/anaconda/dd_* -%changelog +* Mon Mar 19 2018 Martin Kolman - 28.22.2-5 +- Write rootpw command to kickstart (#1557529) (mkolman) + * Thu Mar 15 2018 Martin Kolman - 28.22.2-4 - Don't autoquit by default if the last hub is empty (#1553935) (mkolman)