diff --git a/SOURCES/anaconda-centos-add-centos-install-class.patch b/SOURCES/anaconda-centos-add-centos-install-class.patch
new file mode 100644
index 0000000..89d64b5
--- /dev/null
+++ b/SOURCES/anaconda-centos-add-centos-install-class.patch
@@ -0,0 +1,104 @@
+diff -uNr anaconda-19.31.79__orig/pyanaconda/installclasses/centos.py anaconda-19.31.79/pyanaconda/installclasses/centos.py
+--- anaconda-19.31.79__orig/pyanaconda/installclasses/centos.py 1970-01-01 01:00:00.000000000 +0100
++++ anaconda-19.31.79/pyanaconda/installclasses/centos.py 2014-06-16 22:47:16.033891088 +0100
+@@ -0,0 +1,88 @@
++#
++# rhel.py
++#
++# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program. If not, see .
++#
++
++from pyanaconda.installclass import BaseInstallClass
++from pyanaconda.constants import *
++from pyanaconda.product import *
++from pyanaconda import network
++from pyanaconda import nm
++import types
++
++class InstallClass(BaseInstallClass):
++ # name has underscore used for mnemonics, strip if you dont need it
++ id = "centos"
++ name = N_("CentOS Linux")
++ sortPriority = 25000
++ if productName.startswith("Red Hat ") or productName.startswith("Fedora "):
++ hidden = 1
++
++ defaultFS = "xfs"
++
++ bootloaderTimeoutDefault = 5
++ bootloaderExtraArgs = []
++
++ ignoredPackages = ["ntfsprogs", "reiserfs-utils"]
++
++ installUpdates = False
++
++ _l10n_domain = "comps"
++
++ efi_dir = "redhat"
++
++ def configure(self, anaconda):
++ BaseInstallClass.configure(self, anaconda)
++ BaseInstallClass.setDefaultPartitioning(self, anaconda.storage)
++
++ # Set first boot policy regarding ONBOOT value
++ # (i.e. which network devices should be activated automatically after reboot)
++ # After switch root we set ONBOOT=no as default for all devices not activated
++ # in initramfs. Here, at the end of installation, we check and modify it eventually.
++ def setNetworkOnbootDefault(self, ksdata):
++ # if there is no device to be autoactivated after reboot
++ for devName in nm.nm_devices():
++ if nm.nm_device_type_is_wifi(devName):
++ continue
++ try:
++ onboot = nm.nm_device_setting_value(devName, "connection", "autoconnect")
++ except nm.SettingsNotFoundError:
++ continue
++ if not onboot == False:
++ return
++
++ # set ONBOOT=yes for the device used during installation
++ # (ie for majority of cases the one having the default route)
++ devName = network.default_route_device()
++ if not devName:
++ return
++ if nm.nm_device_type_is_wifi(devName):
++ return
++ ifcfg_path = network.find_ifcfg_file_of_device(devName, root_path=ROOT_PATH)
++ if not ifcfg_path:
++ return
++ ifcfg = network.IfcfgFile(ifcfg_path)
++ ifcfg.read()
++ ifcfg.set(('ONBOOT', 'yes'))
++ ifcfg.write()
++ for nd in ksdata.network.network:
++ if nd.device == devName:
++ nd.onboot = True
++ break
++
++ def __init__(self):
++ BaseInstallClass.__init__(self)
+diff -uNr anaconda-19.31.79__orig/pyanaconda/installclasses/fedora.py anaconda-19.31.79/pyanaconda/installclasses/fedora.py
+--- anaconda-19.31.79__orig/pyanaconda/installclasses/fedora.py 2014-04-29 01:45:59.000000000 +0100
++++ anaconda-19.31.79/pyanaconda/installclasses/fedora.py 2014-06-16 22:57:40.525890315 +0100
+@@ -31,7 +31,7 @@
+ id = "fedora"
+ name = N_("_Fedora")
+ sortPriority = 10000
+- if productName.startswith("Red Hat "):
++ if productName.startswith("Red Hat ") or productName.startswith("CentOS"):
+ hidden = 1
+
+ _l10n_domain = "anaconda"
diff --git a/SOURCES/anaconda-centos-bootfs-default-to-xfs.patch b/SOURCES/anaconda-centos-bootfs-default-to-xfs.patch
new file mode 100644
index 0000000..31432af
--- /dev/null
+++ b/SOURCES/anaconda-centos-bootfs-default-to-xfs.patch
@@ -0,0 +1,21 @@
+diff -uNr anaconda-19.31.79__orig/pyanaconda/bootloader.py anaconda-19.31.79/pyanaconda/bootloader.py
+--- anaconda-19.31.79__orig/pyanaconda/bootloader.py 2014-04-29 01:45:59.000000000 +0100
++++ anaconda-19.31.79/pyanaconda/bootloader.py 2014-06-30 17:19:19.197386280 +0100
+@@ -1404,7 +1404,7 @@
+
+ @property
+ def stage2_format_types(self):
+- if productName.startswith("Red Hat "):
++ if productName.startswith("Red Hat ") or productName.startswith("CentOS"):
+ return ["xfs", "ext4", "ext3", "ext2", "btrfs"]
+ else:
+ return ["ext4", "ext3", "ext2", "btrfs", "xfs"]
+@@ -2063,7 +2063,7 @@
+
+ @property
+ def stage2_format_types(self):
+- if productName.startswith("Red Hat "):
++ if productName.startswith("Red Hat ") or productName.startswith("CentOS"):
+ return ["xfs", "ext4", "ext3", "ext2"]
+ else:
+ return ["ext4", "ext3", "ext2", "xfs"]
diff --git a/SOURCES/anaconda-centos-disable-mirrors.patch b/SOURCES/anaconda-centos-disable-mirrors.patch
new file mode 100644
index 0000000..fb5b2eb
--- /dev/null
+++ b/SOURCES/anaconda-centos-disable-mirrors.patch
@@ -0,0 +1,15 @@
+diff -uNr anaconda-19.31.79__orig/pyanaconda/packaging/yumpayload.py anaconda-19.31.79/pyanaconda/packaging/yumpayload.py
+--- anaconda-19.31.79__orig/pyanaconda/packaging/yumpayload.py 2014-04-29 01:45:59.000000000 +0100
++++ anaconda-19.31.79/pyanaconda/packaging/yumpayload.py 2014-07-02 14:36:15.360488588 +0100
+@@ -428,7 +428,10 @@
+ @property
+ def mirrorEnabled(self):
+ with _yum_lock:
+- return "fastestmirror" in self._yum.plugins._plugins
++ if productName.startswith("CentOS"):
++ return 0
++ else:
++ return "fastestmirror" in self._yum.plugins._plugins
+
+ def getRepo(self, repo_id):
+ """ Return the yum repo object. """
diff --git a/SOURCES/anaconda-centos-efidir-centos.patch b/SOURCES/anaconda-centos-efidir-centos.patch
new file mode 100644
index 0000000..79d58f7
--- /dev/null
+++ b/SOURCES/anaconda-centos-efidir-centos.patch
@@ -0,0 +1,12 @@
+diff -uNr anaconda-19.31.79__orig/pyanaconda/installclasses/centos.py anaconda-19.31.79/pyanaconda/installclasses/centos.py
+--- anaconda-19.31.79__orig/pyanaconda/installclasses/centos.py 2014-06-30 17:13:18.111386761 +0100
++++ anaconda-19.31.79/pyanaconda/installclasses/centos.py 2014-06-30 17:13:43.071386726 +0100
+@@ -43,7 +43,7 @@
+
+ _l10n_domain = "comps"
+
+- efi_dir = "redhat"
++ efi_dir = "centos"
+
+ def configure(self, anaconda):
+ BaseInstallClass.configure(self, anaconda)
diff --git a/SOURCES/anaconda-centos-set-right-eula-location.patch b/SOURCES/anaconda-centos-set-right-eula-location.patch
new file mode 100644
index 0000000..e33eb4e
--- /dev/null
+++ b/SOURCES/anaconda-centos-set-right-eula-location.patch
@@ -0,0 +1,12 @@
+diff -uNr anaconda-19.31.79__orig/pyanaconda/constants.py anaconda-19.31.79/pyanaconda/constants.py
+--- anaconda-19.31.79__orig/pyanaconda/constants.py 2014-04-29 01:45:59.000000000 +0100
++++ anaconda-19.31.79/pyanaconda/constants.py 2014-06-18 23:42:35.944668381 +0100
+@@ -50,7 +50,7 @@
+ productArch = product.productArch
+ bugzillaUrl = product.bugUrl
+ isFinal = product.isFinal
+-eulaLocation = "/usr/share/redhat-release/EULA"
++eulaLocation = "/usr/share/centos-release/EULA"
+
+ # for use in device names, eg: "fedora", "rhel"
+ shortProductName = productName.lower()
diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec
index 1011e93..902ce35 100644
--- a/SPECS/anaconda.spec
+++ b/SPECS/anaconda.spec
@@ -14,6 +14,11 @@ URL: http://fedoraproject.org/wiki/Anaconda
# ./autogen.sh
# make dist
Source0: %{name}-%{version}.tar.bz2
+Patch1: anaconda-centos-add-centos-install-class.patch
+Patch2: anaconda-centos-set-right-eula-location.patch
+Patch3: anaconda-centos-efidir-centos.patch
+Patch4: anaconda-centos-disable-mirrors.patch
+Patch5: anaconda-centos-bootfs-default-to-xfs.patch
# Versions of required components (done so we make sure the buildrequires
# match the requires versions of things).
@@ -229,6 +234,11 @@ runtime on NFS/HTTP/FTP servers or local disks.
%prep
%setup -q
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
%build
%configure --disable-static \
@@ -321,6 +331,13 @@ update-desktop-database &> /dev/null || :
%{_prefix}/libexec/anaconda/dd_*
%changelog
+* Tue Sep 29 2020 CentOS Sources - 21.48.22.159-1.el7.centos
+- Add CentOS install class as default
+- use the right path for the EULA string (issue 7165, bstinson)
+- use efi_dir = centos
+- disable the mirrorlist options
+- make boot part fs default to xfs
+
* Wed Apr 15 2020 Radek Vykydal - 21.48.22.159-1
- Do not run hwclock when using image install mode (bcl)
Resolves: rhbz#1766785