diff --git a/SOURCES/20001-Revert-Remove-kickstart-btrfs-support.patch b/SOURCES/20001-Revert-Remove-kickstart-btrfs-support.patch new file mode 100644 index 0000000..b4273fd --- /dev/null +++ b/SOURCES/20001-Revert-Remove-kickstart-btrfs-support.patch @@ -0,0 +1,67 @@ +From d67e3423cf96e4b02ea54fcd2158edd210b36857 Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Mon, 28 Jun 2021 23:18:46 -0400 +Subject: [PATCH 20001/20004] Revert "Remove kickstart btrfs support" + +Restore Btrfs support for Kickstart so system installations can +use Btrfs and images can be built using Lorax with Btrfs as the +filesystem. + +This reverts commit 7e1667fbdc289d62f1dc92411a1d263c22e4be52. +--- + pyanaconda/core/kickstart/commands.py | 10 +++++----- + pyanaconda/modules/storage/kickstart.py | 1 - + 2 files changed, 5 insertions(+), 6 deletions(-) + +diff --git a/pyanaconda/core/kickstart/commands.py b/pyanaconda/core/kickstart/commands.py +index a6964de8b7..bc52a285c8 100644 +--- a/pyanaconda/core/kickstart/commands.py ++++ b/pyanaconda/core/kickstart/commands.py +@@ -24,10 +24,10 @@ + # Supported kickstart commands. + from pykickstart.commands.authconfig import F28_Authconfig as Authconfig + from pykickstart.commands.authselect import F28_Authselect as Authselect +-from pykickstart.commands.autopart import RHEL9_AutoPart as AutoPart ++from pykickstart.commands.autopart import F29_AutoPart as AutoPart + from pykickstart.commands.autostep import F34_AutoStep as AutoStep + from pykickstart.commands.bootloader import RHEL9_Bootloader as Bootloader +-from pykickstart.commands.btrfs import RHEL9_BTRFS as BTRFS ++from pykickstart.commands.btrfs import F23_BTRFS as BTRFS + from pykickstart.commands.cdrom import FC3_Cdrom as Cdrom + from pykickstart.commands.clearpart import F28_ClearPart as ClearPart + from pykickstart.commands.displaymode import F26_DisplayMode as DisplayMode +@@ -47,7 +47,7 @@ from pykickstart.commands.keyboard import F18_Keyboard as Keyboard + from pykickstart.commands.lang import F19_Lang as Lang + from pykickstart.commands.liveimg import F19_Liveimg as Liveimg + from pykickstart.commands.logging import F34_Logging as Logging +-from pykickstart.commands.logvol import RHEL9_LogVol as LogVol ++from pykickstart.commands.logvol import F29_LogVol as LogVol + from pykickstart.commands.mediacheck import FC4_MediaCheck as MediaCheck + from pykickstart.commands.method import F34_Method as Method + from pykickstart.commands.mount import F27_Mount as Mount +@@ -55,8 +55,8 @@ from pykickstart.commands.network import F27_Network as Network + from pykickstart.commands.nfs import FC6_NFS as NFS + from pykickstart.commands.nvdimm import F28_Nvdimm as Nvdimm + from pykickstart.commands.ostreesetup import RHEL9_OSTreeSetup as OSTreeSetup +-from pykickstart.commands.partition import RHEL9_Partition as Partition +-from pykickstart.commands.raid import RHEL9_Raid as Raid ++from pykickstart.commands.partition import F34_Partition as Partition ++from pykickstart.commands.raid import F29_Raid as Raid + from pykickstart.commands.realm import F19_Realm as Realm + from pykickstart.commands.reboot import F23_Reboot as Reboot + from pykickstart.commands.repo import F33_Repo as Repo +diff --git a/pyanaconda/modules/storage/kickstart.py b/pyanaconda/modules/storage/kickstart.py +index 6386c38cac..0e4dddaf5b 100644 +--- a/pyanaconda/modules/storage/kickstart.py ++++ b/pyanaconda/modules/storage/kickstart.py +@@ -72,7 +72,6 @@ class BTRFS(COMMANDS.BTRFS): + + def parse(self, args): + """Parse the command.""" +- # pylint: disable=assignment-from-no-return + retval = super().parse(args) + + # Check the file system type. +-- +2.31.1 + diff --git a/SOURCES/20002-Add-product-configuration-for-CentOS-Stream-Hypersc.patch b/SOURCES/20002-Add-product-configuration-for-CentOS-Stream-Hypersc.patch new file mode 100644 index 0000000..cc7a049 --- /dev/null +++ b/SOURCES/20002-Add-product-configuration-for-CentOS-Stream-Hypersc.patch @@ -0,0 +1,52 @@ +From c0441afd407a1be5d20a5f02236fcea94efc3e4f Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Sat, 26 Jun 2021 08:21:49 -0400 +Subject: [PATCH 20002/20004] Add product configuration for CentOS Stream + Hyperscale variant + +This is a minimal product configuration layered on top of the +CentOS Stream Hyperscale product configuration that configures +Anaconda to use Btrfs by default. +--- + data/product.d/centos-stream-hyperscale.conf | 29 ++++++++++++++++++++ + 1 file changed, 29 insertions(+) + create mode 100644 data/product.d/centos-stream-hyperscale.conf + +diff --git a/data/product.d/centos-stream-hyperscale.conf b/data/product.d/centos-stream-hyperscale.conf +new file mode 100644 +index 0000000000..88979adb55 +--- /dev/null ++++ b/data/product.d/centos-stream-hyperscale.conf +@@ -0,0 +1,29 @@ ++# Anaconda configuration file for CentOS Stream Hyperscale ++ ++[Product] ++product_name = CentOS Stream ++variant_name = Hyperscale ++ ++[Base Product] ++product_name = CentOS Stream ++ ++[Storage] ++default_scheme = BTRFS ++ ++[Payload] ++# RHEL removes btrfs-progs, but we want it back ++ignored_packages = ++ ntfsprogs ++ dmraid ++ ++default_rpm_gpg_keys = ++ /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial ++ /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-HyperScale ++ /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever ++ ++updates_repositories = ++ centos-hyperscale ++ centos-hyperscale-spin ++ epel ++ epel-next ++ powertools +-- +2.31.1 + diff --git a/SOURCES/20003-Add-support-for-detecting-the-Hyperscale-variant-in.patch b/SOURCES/20003-Add-support-for-detecting-the-Hyperscale-variant-in.patch new file mode 100644 index 0000000..877b730 --- /dev/null +++ b/SOURCES/20003-Add-support-for-detecting-the-Hyperscale-variant-in.patch @@ -0,0 +1,39 @@ +From d7f5ce82a98b66831edaf6afd194ea43ce107c84 Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Sun, 27 Jun 2021 21:01:07 -0400 +Subject: [PATCH 20003/20004] Add support for detecting the Hyperscale variant + in liveinst + +Anaconda does not rely on os-release(5) data directly to determine +which product data to load, but instead needs either a /.buildstamp +file or logic to populate environment variables to have Anaconda +select the right configuration. + +This change adds logic to set the ANACONDA_PRODUCTVARIANT variable +when the Hyperscale variant is detected on the system. +--- + data/liveinst/liveinst | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/data/liveinst/liveinst b/data/liveinst/liveinst +index 5cf32ecccf..cc5872c0ff 100755 +--- a/data/liveinst/liveinst ++++ b/data/liveinst/liveinst +@@ -46,6 +46,14 @@ if [ -f /etc/system-release ]; then + export ANACONDA_PRODUCTVERSION=$( cat /etc/system-release | sed -r -e 's/^.* ([0-9\.]+).*$/\1/' ) + fi + ++# set PRODUCTVARIANT if this is a CentOS Stream Hyperscale live image ++if [ -f /etc/os-release ]; then ++ variantid=$( grep VARIANT_ID /etc/os-release | tail -1 | cut -d= -f2) ++ if [ "$variantid" = "hyperscale" ]; then ++ export ANACONDA_PRODUCTVARIANT="Hyperscale" ++ fi ++fi ++ + # set PRODUCTVARIANT if this is a Fedora Workstation live image + # FIXME really, livemedia-creator should include .buildstamp in live + # images, if it did, we could remove this: +-- +2.31.1 + diff --git a/SOURCES/20004-Change-fedora-welcome-to-centos-welcome.patch b/SOURCES/20004-Change-fedora-welcome-to-centos-welcome.patch new file mode 100644 index 0000000..2539224 --- /dev/null +++ b/SOURCES/20004-Change-fedora-welcome-to-centos-welcome.patch @@ -0,0 +1,132 @@ +From fbecf007a3285c46852762dfeed0376c95ca6a91 Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Mon, 28 Jun 2021 23:26:59 -0400 +Subject: [PATCH 20004/20004] Change fedora-welcome to centos-welcome + +This is being used for CentOS Stream rather than Fedora Linux, +so adjust accordingly. +--- + data/liveinst/gnome/Makefile.am | 16 ++++++++-------- + ...ra-welcome.desktop => centos-welcome.desktop} | 4 ++-- + .../{fedora-welcome.js => centos-welcome.js} | 12 ++++++------ + 3 files changed, 16 insertions(+), 16 deletions(-) + rename data/liveinst/gnome/{fedora-welcome.desktop => centos-welcome.desktop} (59%) + rename data/liveinst/gnome/{fedora-welcome.js => centos-welcome.js} (93%) + +diff --git a/data/liveinst/gnome/Makefile.am b/data/liveinst/gnome/Makefile.am +index 4f2f90b78d..f7bd07a526 100644 +--- a/data/liveinst/gnome/Makefile.am ++++ b/data/liveinst/gnome/Makefile.am +@@ -16,24 +16,24 @@ + # along with this program. If not, see . + + welcomedir = $(datadir)/$(PACKAGE_NAME)/gnome +-dist_welcome_DATA = fedora-welcome.desktop +-dist_welcome_SCRIPTS = fedora-welcome.js ++dist_welcome_DATA = centos-welcome.desktop ++dist_welcome_SCRIPTS = centos-welcome.js + + MAINTAINERCLEANFILES = Makefile.in + + # Merge the translations into the desktop file + # Use the merged translations in $(builddir). If no merged translations exist, + # just exit. +-# Rename fedora-welcome.js to just fedora-welcome ++# Rename centos-welcome.js to just centos-welcome + install-data-hook: + for p in $(top_builddir)/po/*.mpo ; do \ + [ -e $$p ] || exit 0 ; \ +- $(MSGFMT) --desktop --template=$(DESTDIR)$(welcomedir)/fedora-welcome.desktop \ ++ $(MSGFMT) --desktop --template=$(DESTDIR)$(welcomedir)/centos-welcome.desktop \ + --locale=$$(basename $$p .mpo) \ +- -o $(DESTDIR)$(welcomedir)/fedora-welcome.desktop.new $$p || exit 1 ; \ +- mv $(DESTDIR)$(welcomedir)/fedora-welcome.desktop.new $(DESTDIR)$(welcomedir)/fedora-welcome.desktop || exit 1 ; \ ++ -o $(DESTDIR)$(welcomedir)/centos-welcome.desktop.new $$p || exit 1 ; \ ++ mv $(DESTDIR)$(welcomedir)/centos-welcome.desktop.new $(DESTDIR)$(welcomedir)/centos-welcome.desktop || exit 1 ; \ + done +- cd $(DESTDIR)$(welcomedir) && mv fedora-welcome.js fedora-welcome ++ cd $(DESTDIR)$(welcomedir) && mv centos-welcome.js centos-welcome + + uninstall-hook: +- -cd $(DESTDIR)$(welcomedir) && rm -f fedora-welcome ++ -cd $(DESTDIR)$(welcomedir) && rm -f centos-welcome +diff --git a/data/liveinst/gnome/fedora-welcome.desktop b/data/liveinst/gnome/centos-welcome.desktop +similarity index 59% +rename from data/liveinst/gnome/fedora-welcome.desktop +rename to data/liveinst/gnome/centos-welcome.desktop +index 60e5c385d1..ce68d92641 100644 +--- a/data/liveinst/gnome/fedora-welcome.desktop ++++ b/data/liveinst/gnome/centos-welcome.desktop +@@ -1,6 +1,6 @@ + [Desktop Entry] +-Name=Welcome to Fedora +-Exec=/usr/share/anaconda/gnome/fedora-welcome ++Name=Welcome to CentOS Stream ++Exec=/usr/share/anaconda/gnome/centos-welcome + Terminal=false + Type=Application + StartupNotify=true +diff --git a/data/liveinst/gnome/fedora-welcome.js b/data/liveinst/gnome/centos-welcome.js +similarity index 93% +rename from data/liveinst/gnome/fedora-welcome.js +rename to data/liveinst/gnome/centos-welcome.js +index 0520557afc..6b04106ac1 100755 +--- a/data/liveinst/gnome/fedora-welcome.js ++++ b/data/liveinst/gnome/centos-welcome.js +@@ -62,7 +62,7 @@ const WelcomeWindow = new Lang.Class({ + default_width: 600, + default_height: 550, + skip_taskbar_hint: true, +- title: _("Welcome to Fedora"), ++ title: _("Welcome to CentOS Stream"), + window_position: Gtk.WindowPosition.CENTER }); + this.window.connect('key-press-event', Lang.bind(this, + function(w, event) { +@@ -91,7 +91,7 @@ const WelcomeWindow = new Lang.Class({ + spacing: 16 }); + tryContent.add(new Gtk.Image({ icon_name: 'media-optical', + pixel_size: 256 })); +- tryContent.add(makeLabel(_("Try Fedora"), true)); ++ tryContent.add(makeLabel(_("Try CentOS"), true)); + + let tryButton = new Gtk.Button({ child: tryContent }); + buttonBox.add(tryButton); +@@ -99,7 +99,7 @@ const WelcomeWindow = new Lang.Class({ + let installContent = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL, + spacing: 16 }); + +- // provided by the 'fedora-logos' package ++ // provided by the 'centos-logos' package + installContent.add(new Gtk.Image({ icon_name: 'org.fedoraproject.AnacondaInstaller', + pixel_size: 256 })); + installContent.add(makeLabel(anacondaApp.get_name(), true)); +@@ -107,7 +107,7 @@ const WelcomeWindow = new Lang.Class({ + let installButton = new Gtk.Button({ child: installContent }); + buttonBox.add(installButton); + +- this._label = makeLabel(_("You are currently running Fedora from live media.\nYou can install Fedora now, or choose \"Install to Hard Drive\" in the Activities Overview at any later time."), false); ++ this._label = makeLabel(_("You are currently running CentOS Stream from live media.\nYou can install CentOS Stream now, or choose \"Install to Hard Drive\" in the Activities Overview at any later time."), false); + mainGrid.add(this._label); + + installButton.connect('clicked', Lang.bind(this, +@@ -121,7 +121,7 @@ const WelcomeWindow = new Lang.Class({ + buttonBox.destroy(); + this._label.destroy(); + +- // provided by the 'fedora-logos' package ++ // provided by the 'centos-logos' package + let image = new Gtk.Image({ icon_name: 'org.fedoraproject.AnacondaInstaller', + pixel_size: 256, + halign: Gtk.Align.CENTER }); +@@ -148,7 +148,7 @@ const WelcomeWindow = new Lang.Class({ + Gettext.bindtextdomain('anaconda', LOCALE_DIR); + Gettext.textdomain('anaconda'); + +-GLib.set_prgname('fedora-welcome'); ++GLib.set_prgname('centos-welcome'); + Gtk.init(null, null); + Gtk.Settings.get_default().gtk_application_prefer_dark_theme = true; + +-- +2.31.1 + diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec index b77454f..f9ab1cb 100644 --- a/SPECS/anaconda.spec +++ b/SPECS/anaconda.spec @@ -1,7 +1,7 @@ Summary: Graphical system installer Name: anaconda Version: 34.25.0.24 -Release: 1%{?dist} +Release: 1.1%{?dist} License: GPLv2+ and MIT URL: http://fedoraproject.org/wiki/Anaconda @@ -12,6 +12,13 @@ URL: http://fedoraproject.org/wiki/Anaconda # make dist Source0: %{name}-%{version}.tar.bz2 +## Hyperscale changes +### Cf. https://pagure.io/centos-sig-hyperscale/anaconda/commits/c9s-hs-v34.25.0.24 +Patch20001: 20001-Revert-Remove-kickstart-btrfs-support.patch +Patch20002: 20002-Add-product-configuration-for-CentOS-Stream-Hypersc.patch +Patch20003: 20003-Add-support-for-detecting-the-Hyperscale-variant-in.patch +Patch20004: 20004-Change-fedora-welcome-to-centos-welcome.patch + # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -37,12 +44,18 @@ Source0: %{name}-%{version}.tar.bz2 %define nmver 1.0 %define pykickstartver 3.32.2-1 %define pypartedver 2.5-2 -%define pythonblivetver 1:3.4.0-10 +%define pythonblivetver 1:3.4.0-11.1 %define rpmver 4.10.0 %define simplelinever 1.1-1 %define subscriptionmanagerver 1.26 %define utillinuxver 2.15.1 +# Because of Patch20004, we need to regenerate autofoo +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: git-core +BuildRequires: libtool + BuildRequires: audit-libs-devel BuildRequires: libtool BuildRequires: gettext-devel >= %{gettextver} @@ -297,7 +310,13 @@ options. This includes driver disks, kickstarts, and finding the anaconda runtime on NFS/HTTP/FTP servers or local disks. %prep -%autosetup -p 1 +%autosetup -S git_am + +# Regenerate autofoo +autoreconf -fiv +pushd widgets +autoreconf -fiv +popd %build # use actual build-time release number, not tarball creation time release number @@ -407,6 +426,13 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_d %{_prefix}/libexec/anaconda/dd_* %changelog +* Mon Jan 17 2022 Neal Gompa - 34.25.0.24-1.1 +- Add changes for CentOS Hyperscale spin + + Re-enable Btrfs support + + Add CentOS Stream Hyperscale config + + Debrand the liveinst welcome widget + + Add support for Hyperscale variant in liveinst + * Tue Jan 11 2022 Vladimir Slavik - 34.25.0.24-1 - Create the LVM devices file (vslavik) Resolves: rhbz#2011329