From f43fc634c975a84c2e218102574907b4ae7db2a8 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 05 2015 13:08:45 +0000 Subject: debrand anaconda-19.31.123-1.el7 --- 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..242ff46 --- /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-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 d4c5508..503c222 100644 --- a/SPECS/anaconda.spec +++ b/SPECS/anaconda.spec @@ -2,6 +2,8 @@ Summary: Graphical system installer Name: anaconda +Patch1: anaconda-centos-add-centos-install-class.patch +Patch2: anaconda-centos-set-right-eula-location.patch Version: 19.31.123 Release: 1%{?dist} License: GPLv2+ @@ -229,6 +231,8 @@ This package hold the content for the Anaconda built-in help system. %prep %setup -q +%patch1 -p1 +%patch2 -p1 %setup -a 1 %build @@ -327,6 +331,10 @@ update-desktop-database &> /dev/null || : %{_datadir}/anaconda/help/* %changelog +* Thu Mar 05 2015 CentOS Sources - 19.31.123-1.el7.centos +- Add CentOS install class as default +- use the right path for the EULA string (issue 7165, bstinson) + * Mon Feb 16 2015 Brian C. Lane - 19.31.123-1 - iscsi: pass rd.* options of devices to be mouted in dracut (rvykydal) Resolves: rhbz#1192398