From c0a0bbde460d163bf00bd30666e12786df5d480d Mon Sep 17 00:00:00 2001 From: Carl George Date: Feb 03 2021 21:17:27 +0000 Subject: CentOS debranding Includes upstream pull requests: - https://github.com/rhinstaller/anaconda/pull/2689 - https://github.com/rhinstaller/anaconda/pull/3020 --- diff --git a/SOURCES/0001-Add-product-data-for-CentOS-Stream.patch b/SOURCES/0001-Add-product-data-for-CentOS-Stream.patch new file mode 100644 index 0000000..5c7ead4 --- /dev/null +++ b/SOURCES/0001-Add-product-data-for-CentOS-Stream.patch @@ -0,0 +1,43 @@ +From 646ea4b2d75712f83086b9ca7b06bf543158c169 Mon Sep 17 00:00:00 2001 +From: Brian Stinson +Date: Thu, 25 Jun 2020 18:10:13 -0500 +Subject: [PATCH] Add product data for CentOS Stream + +--- + data/product.d/centos-stream.conf | 7 +++++++ + tests/nosetests/pyanaconda_tests/product_test.py | 5 +++++ + 2 files changed, 12 insertions(+) + create mode 100644 data/product.d/centos-stream.conf + +diff --git a/data/product.d/centos-stream.conf b/data/product.d/centos-stream.conf +new file mode 100644 +index 0000000000..c65fcbbdf8 +--- /dev/null ++++ b/data/product.d/centos-stream.conf +@@ -0,0 +1,7 @@ ++# Anaconda configuration file for CentOS Stream. ++ ++[Product] ++product_name = CentOS Stream ++ ++[Base Product] ++product_name = CentOS Linux +diff --git a/tests/nosetests/pyanaconda_tests/product_test.py b/tests/nosetests/pyanaconda_tests/product_test.py +index 55f3e0dde7..d0c3adb849 100644 +--- a/tests/nosetests/pyanaconda_tests/product_test.py ++++ b/tests/nosetests/pyanaconda_tests/product_test.py +@@ -244,6 +244,11 @@ class ProductConfigurationTestCase(unittest.TestCase): + ["rhel.conf", "centos.conf"], + WORKSTATION_PARTITIONING + ) ++ self._check_default_product( ++ "CentOS Stream", "", ++ ["rhel.conf", "centos.conf", "centos-stream.conf"], ++ WORKSTATION_PARTITIONING ++ ) + self._check_default_product( + "Red Hat Virtualization", "", + ["rhel.conf", "rhev.conf"], +-- +2.29.2 + diff --git a/SOURCES/0001-Fix-CDN-button-visibility.patch b/SOURCES/0001-Fix-CDN-button-visibility.patch new file mode 100644 index 0000000..6c9e3cb --- /dev/null +++ b/SOURCES/0001-Fix-CDN-button-visibility.patch @@ -0,0 +1,53 @@ +From c29802a2be591a4cdcc91ba86b74fc4d01087b72 Mon Sep 17 00:00:00 2001 +From: Martin Kolman +Date: Fri, 11 Sep 2020 15:27:59 +0200 +Subject: [PATCH] Fix CDN button visibility + +Only show the Red Hat CDN button if the Subscription +module appears to be running. To achieve that, we do +the same thing as with the HMC button - the CDN +button invisible by default. And enable it only if it +looks like the Subscription module is running. + +(cherry picked from commit: aca297587ab8bdd7342fa056273bfff379bc0a0b) + +Resolves: rhbz#1903178 +--- + pyanaconda/ui/gui/spokes/installation_source.glade | 2 +- + pyanaconda/ui/gui/spokes/installation_source.py | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/pyanaconda/ui/gui/spokes/installation_source.glade b/pyanaconda/ui/gui/spokes/installation_source.glade +index a23f8be714..e53fa230ca 100644 +--- a/pyanaconda/ui/gui/spokes/installation_source.glade ++++ b/pyanaconda/ui/gui/spokes/installation_source.glade +@@ -633,9 +633,9 @@ + + + Red Hat _CDN +- True + True + False ++ True + 12 + True + 0 +diff --git a/pyanaconda/ui/gui/spokes/installation_source.py b/pyanaconda/ui/gui/spokes/installation_source.py +index 6aab9b387a..d0d4da72b9 100644 +--- a/pyanaconda/ui/gui/spokes/installation_source.py ++++ b/pyanaconda/ui/gui/spokes/installation_source.py +@@ -854,9 +854,9 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler, SourceSwitchHandler): + def _initialize(self): + threadMgr.wait(constants.THREAD_PAYLOAD) + +- # If there is no Subscriptiopn DBus module, disable the CDN radio button ++ # If there is the Subscriptiopn DBus module, make the CDN radio button visible + if is_module_available(SUBSCRIPTION): +- gtk_call_once(self._cdn_button.set_no_show_all, True) ++ gtk_call_once(self._cdn_button.set_no_show_all, False) + + # Get the current source. + source_proxy = self.payload.get_source_proxy() +-- +2.29.2 + diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec index 7bea199..93be275 100644 --- a/SPECS/anaconda.spec +++ b/SPECS/anaconda.spec @@ -12,6 +12,12 @@ URL: http://fedoraproject.org/wiki/Anaconda # make dist Source0: %{name}-%{version}.tar.bz2 +# https://github.com/rhinstaller/anaconda/pull/2689 +Patch104: 0001-Add-product-data-for-CentOS-Stream.patch + +# https://github.com/rhinstaller/anaconda/pull/3020 +Patch105: 0001-Fix-CDN-button-visibility.patch + # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -265,6 +271,9 @@ runtime on NFS/HTTP/FTP servers or local disks. %prep %autosetup -p 1 +# debranding +sed -e 's/RHEL/CentOS/' -i po/*.po + %build # use actual build-time release number, not tarball creation time release number %configure ANACONDA_RELEASE=%{release}