From a13aa331b6e9a4b107b93fccf90e5dcb5f26f316 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 1 Mar 2022 08:09:51 -0800 Subject: [PATCH] Revert attempt to fix #2015490, it stopped i-s working (#2057600) --- ...te-kickstart-so-initial-setup-won-t-.patch | 51 +++++++++++++++++++ oz.spec | 10 +++- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 0001-Revert-Don-t-write-kickstart-so-initial-setup-won-t-.patch diff --git a/0001-Revert-Don-t-write-kickstart-so-initial-setup-won-t-.patch b/0001-Revert-Don-t-write-kickstart-so-initial-setup-won-t-.patch new file mode 100644 index 0000000..f6b37b2 --- /dev/null +++ b/0001-Revert-Don-t-write-kickstart-so-initial-setup-won-t-.patch @@ -0,0 +1,51 @@ +From 4477dea908ae3bae117fe3fa65d599f4ea52fd3b Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Thu, 24 Feb 2022 08:06:22 -0800 +Subject: [PATCH] Revert "Don't write kickstart so initial-setup won't think + root pw is set" + +This reverts commit ef55a6402143f810b7c221c2763b7eb52b4b8261. +It turns out to make things worse: the idea was that by not +writing the kickstart, initial-setup would correctly require +a root password to be set or admin account created, but in fact +it causes initial-setup not to run at all, because it assumes +the kickstart will always be present. See: +https://bugzilla.redhat.com/show_bug.cgi?id=2057600 +--- + oz/Fedora.py | 4 ---- + oz/RedHat.py | 4 ---- + 2 files changed, 8 deletions(-) + +diff --git a/oz/Fedora.py b/oz/Fedora.py +index 7ab800b..58557d7 100644 +--- a/oz/Fedora.py ++++ b/oz/Fedora.py +@@ -293,10 +293,6 @@ class FedoraGuest(oz.RedHat.RedHatLinuxCDYumGuest): + # out the method completely + if not self.config.brokenisomethod: + initrdline += " inst.method=cdrom:/dev/cdrom" +- # don't write the kickstart to the image, or else initial-setup +- # will think a root password has been set: +- # https://bugzilla.redhat.com/show_bug.cgi?id=2015490 +- initrdline += " inst.nosave=output_ks" + self._modify_isolinux(initrdline) + + def generate_diskimage(self, size=10, force=False): +diff --git a/oz/RedHat.py b/oz/RedHat.py +index 868b549..af00c11 100644 +--- a/oz/RedHat.py ++++ b/oz/RedHat.py +@@ -79,10 +79,6 @@ Subsystem sftp /usr/libexec/openssh/sftp-server + self.tdl.distro + self.tdl.update + self.tdl.arch + "-ramdisk") + + self.cmdline = "inst.method=" + self.url + " inst.ks=file:/ks.cfg" +- # don't write the kickstart to the image, or else initial-setup +- # will think a root password has been set: +- # https://bugzilla.redhat.com/show_bug.cgi?id=2015490 +- self.cmdline += " inst.nosave=output_ks" + if self.tdl.kernel_param: + self.cmdline += " " + self.tdl.kernel_param + +-- +2.35.1 + diff --git a/oz.spec b/oz.spec index 4007f6b..9447b7b 100644 --- a/oz.spec +++ b/oz.spec @@ -1,12 +1,17 @@ Name: oz Version: 0.18.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library and utilities for automated guest OS installs License: LGPLv2 URL: http://github.com/clalancette/oz Source0: https://github.com/clalancette/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +# Go back to writing anaconda kickstart to the image to make i-s run +# https://bugzilla.redhat.com/show_bug.cgi?id=2057600 +# https://github.com/clalancette/oz/pull/297 +Patch0: 0001-Revert-Don-t-write-kickstart-so-initial-setup-won-t-.patch + BuildArch: noarch BuildRequires: python3 @@ -84,6 +89,9 @@ fi %{python3_sitelib}/%{name}*.egg-info %changelog +* Tue Mar 01 2022 Adam Williamson - 0.18.1-2 +- Backport MR#297, revert attempt to fix #2015490, it stopped i-s working (#2057600) + * Tue Feb 22 2022 Peter Robinson - 0.18.1-1 - Update to 0.18.1