Browse Source

anaconda package update

Signed-off-by: basebuilder_pel7x64builder0 <basebuilder@powerel.org>
master
basebuilder_pel7x64builder0 6 years ago
parent
commit
eb2a868161
  1. 5
      SOURCES/PowerEL7Placeholder.html
  2. 11
      SOURCES/PowerEL7PlaceholderWithLinks.html
  3. 20
      SOURCES/anaconda-powerel-bootloader.patch
  4. 125
      SOURCES/anaconda-powerel-installpath.py
  5. 1445
      SOURCES/anaconda-powerel-remove-visible-rh-references.patch
  6. 2
      SPECS/anaconda.spec

5
SOURCES/PowerEL7Placeholder.html

@ -0,0 +1,5 @@
<body>
<h1>The Anaconda built-in help</h1>
<p>...is not yet available for this screen.</p>
<p>You can check out the PowerEL 7 Installation Guide or other online help resources instead.</p>
</body>

11
SOURCES/PowerEL7PlaceholderWithLinks.html

@ -0,0 +1,11 @@
<body>
<h1>The Anaconda built-in help</h1>
<p>...is not yet available for this screen.</p>
<p>You can check the Red Hat Enterprise Linux 7 Installation Guide or Red Hat Customer Portal resources instead:</p>
<p>
<ul>
<li><a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/index.html">Red Hat Enterprise Linux 7 Installation Guide</a></li>
<li><a href="https://access.redhat.com">Red Hat Customer Portal</a></li>
</ul>
</p>
</body>

20
SOURCES/anaconda-powerel-bootloader.patch

@ -1,20 +1,24 @@
--- anaconda-21.48.22.56/pyanaconda/bootloader.py 2016-01-04 18:57:47.074249397 +0100 --- anaconda-21.48.22.134/pyanaconda/bootloader.py 2018-08-06 10:13:51.430000000 +0200
+++ anaconda-21.48.22.56/pyanaconda/bootloader.py 2016-01-04 18:58:51.104255800 +0100 +++ anaconda-21.48.22.134/pyanaconda/bootloader.py 2018-08-06 10:15:02.690000000 +0200
@@ -1411,7 +1411,7 @@ @@ -1406,8 +1406,8 @@
@property @property
def stage2_format_types(self): def stage2_format_types(self):
- if productName.startswith("Red Hat "): - if productName.startswith("Red Hat "):
+ if productName.startswith("PowerEL"): - return ["xfs", "ext4", "ext3", "ext2", "btrfs"]
return ["xfs", "ext4", "ext3", "ext2", "btrfs"] + if productName.startswith("PowerEL "):
+ return ["xfs", "ext4", "btrfs"]
else: else:
return ["ext4", "ext3", "ext2", "btrfs", "xfs"] return ["ext4", "ext3", "ext2", "btrfs", "xfs"]
@@ -2105,7 +2105,7 @@
@@ -2126,8 +2126,8 @@
@property @property
def stage2_format_types(self): def stage2_format_types(self):
- if productName.startswith("Red Hat "): - if productName.startswith("Red Hat "):
+ if productName.startswith("PowerEL"): - return ["xfs", "ext4", "ext3", "ext2"]
return ["xfs", "ext4", "ext3", "ext2"] + if productName.startswith("PowerEL "):
+ return ["xfs", "ext4"]
else: else:
return ["ext4", "ext3", "ext2", "xfs"] return ["ext4", "ext3", "ext2", "xfs"]

125
SOURCES/anaconda-powerel-installpath.py

@ -1,9 +1,7 @@
# #
# powerel.py # rhel.py
# #
# (c) copyright 2016, VanTosh, All rights reserved. # Copyright (C) 2010 Red Hat, Inc. All rights reserved.
# Author: Toshaan Bharvani <toshaan@vantosh.com>
# License: GNU General Public License v2
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@ -19,36 +17,34 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #


import os
import logging
log = logging.getLogger("anaconda")


from pyanaconda.installclass import BaseInstallClass from pyanaconda.installclass import BaseInstallClass
from pyanaconda.constants import * from pyanaconda.product import productName
from pyanaconda.product import *
from pyanaconda.kickstart import getAvailableDiskSpace
from pyanaconda import network from pyanaconda import network
from pyanaconda import nm from pyanaconda import nm
from pyanaconda import iutil
from pyanaconda.kickstart import getAvailableDiskSpace
from blivet.partspec import PartSpec from blivet.partspec import PartSpec
from blivet.platform import platform from blivet.platform import platform
from blivet.devicelibs import swap from blivet.devicelibs import swap
from blivet.size import Size from blivet.size import Size
import types


__all__ = ["PELBaseInstallClass", "PELAtomicInstallClass"]


class InstallClass(BaseInstallClass):


id = "powerel" class PELBaseInstallClass(BaseInstallClass):
name = "PowerEL" name = "PowerEL"
sortPriority = 20000 sortPriority = 20000

if not productName.startswith("PowerEL"): if not productName.startswith("PowerEL"):
hidden = True hidden = True

defaultFS = "xfs" defaultFS = "xfs"


bootloaderTimeoutDefault = 5 bootloaderTimeoutDefault = 5
# where did this come from ?
#bootloaderExtraArgs = []


ignoredPackages = [ ] ignoredPackages = [ "reiserfs-utils" ]


installUpdates = False installUpdates = False


@ -56,41 +52,41 @@ class InstallClass(BaseInstallClass):


efi_dir = "powerel" efi_dir = "powerel"


help_placeholder = "PowerELPlaceholder.html" help_placeholder = "PowerEL7Placeholder.html"
help_placeholder_with_links = "PowerELPlaceholderWithLinks.html" help_placeholder_with_links = "PowerEL7PlaceholderWithLinks.html"


def configure(self, anaconda): def configure(self, anaconda):
BaseInstallClass.configure(self, anaconda) BaseInstallClass.configure(self, anaconda)
BaseInstallClass.setDefaultPartitioning(self, anaconda.storage)


def setNetworkOnbootDefault(self, ksdata): def setNetworkOnbootDefault(self, ksdata):
if ksdata.method.method not in ("url", "nfs"): if any(nd.onboot for nd in ksdata.network.network if nd.device):
return
if network.has_some_wired_autoconnect_device():
return return
# choose the device used during installation # choose the device used during installation
# (ie for majority of cases the one having the default route) # (ie for majority of cases the one having the default route)
dev = network.default_route_device() or network.default_route_device(family="inet6") dev = network.default_route_device() \
or network.default_route_device(family="inet6")
if not dev: if not dev:
return return
# ignore wireless (its ifcfgs would need to be handled differently) # ignore wireless (its ifcfgs would need to be handled differently)
if nm.nm_device_type_is_wifi(dev): if nm.nm_device_type_is_wifi(dev):
return return
network.update_onboot_value(dev, "yes", ksdata) network.update_onboot_value(dev, True, ksdata=ksdata)


def __init__(self): def __init__(self):
BaseInstallClass.__init__(self) BaseInstallClass.__init__(self)



class PELAtomicInstallClass(RHELBaseInstallClass):
class AtomicInstallClass(BaseInstallClass):

id = "powerelatomic"
name = "PowerEL Atomic Host" name = "PowerEL Atomic Host"
sortPriority=21001 sortPriority=21000
hidden = not productName.startswith(("PowerEL Atomic Host", "PowerEL Atomic")) hidden = not productName.startswith(("PowerEL Atomic Host", "PEL Atomic"))

def __init__(self):
self.localemap = {} # loaded lazily
RHELBaseInstallClass.__init__(self)


def setDefaultPartitioning(self, storage): def setDefaultPartitioning(self, storage):
autorequests = [PartSpec(mountpoint="/", fstype=storage.defaultFSType, size=Size("1GiB"), maxSize=Size("3GiB"), grow=True, lv=True)] autorequests = [PartSpec(mountpoint="/", fstype=storage.defaultFSType,
size=Size("3GiB"), maxSize=Size("15GiB"), grow=True, lv=True)]


bootreqs = platform.setDefaultPartitioning() bootreqs = platform.setDefaultPartitioning()
if bootreqs: if bootreqs:
@ -98,14 +94,79 @@ class AtomicInstallClass(BaseInstallClass):


disk_space = getAvailableDiskSpace(storage) disk_space = getAvailableDiskSpace(storage)
swp = swap.swapSuggestion(disk_space=disk_space) swp = swap.swapSuggestion(disk_space=disk_space)
autorequests.append(PartSpec(fstype="swap", size=swp, grow=False, lv=True, encrypted=True)) autorequests.append(PartSpec(fstype="swap", size=swp, grow=False,
lv=True, encrypted=True))


for autoreq in autorequests: for autoreq in autorequests:
if autoreq.fstype is None: if autoreq.fstype is None:
if autoreq.mountpoint == "/boot": if autoreq.mountpoint == "/boot":
autoreq.fstype = storage.defaultBootFSType autoreq.fstype = storage.defaultBootFSType
autoreq.size = Size("300MiB") autoreq.size = Size("256MiB")
else: else:
autoreq.fstype = storage.defaultFSType autoreq.fstype = storage.defaultFSType


storage.autoPartitionRequests = autorequests storage.autoPartitionRequests = autorequests

def filterSupportedLangs(self, ksdata, langs):
self._initialize_localemap(ksdata.ostreesetup.ref,
ksdata.ostreesetup.url)
for lang in langs:
if lang in self.localemap:
yield lang

def filterSupportedLocales(self, ksdata, lang, locales):
self._initialize_localemap(ksdata.ostreesetup.ref,
ksdata.ostreesetup.url)
supported = []
if lang in self.localemap:
for locale in locales:
stripped = self._strip_codeset_and_modifier(locale)
if stripped in self.localemap[lang]:
supported.append(locale)
return supported

def _initialize_localemap(self, ref, repo):

if self.localemap:
return

# fallback to just en_US in case of errors
self.localemap = { "en": ["en_US"] }

# Let's only handle local embedded repos for now. Anyway, it'd probably
# not be very common to only override ostreesetup through kickstart and
# still want the interactive installer. Though to be nice, let's handle
# that case.
if not repo.startswith("file://"):
log.info("ostree repo is not local; defaulting to en_US")
return

# convert to regular UNIX path
repo = repo[len("file://"):]

iutil.mkdirChain(os.path.join(repo, "tmp/usr/lib"))
rc = iutil.execWithRedirect("/usr/bin/ostree",
["checkout", "--repo", repo, ref,
"--subpath", "/usr/lib/locale/locale-archive",
"install/ostree/tmp/usr/lib/locale"])
if rc != 0:
log.error("failed to check out locale-archive; check program.log")
return

for line in iutil.execReadlines("/usr/bin/localedef",
["--prefix", os.path.join(repo, "tmp"),
"--list-archive"]):
line = self._strip_codeset_and_modifier(line)
(lang, _) = line.split('_')
if lang not in self.localemap:
self.localemap[lang] = [line]
else:
self.localemap[lang].append(line)

@staticmethod
def _strip_codeset_and_modifier(locale):
if '@' in locale:
locale = locale[:locale.find('@')]
if '.' in locale:
locale = locale[:locale.find('.')]
return locale

1445
SOURCES/anaconda-powerel-remove-visible-rh-references.patch

File diff suppressed because it is too large Load Diff

2
SPECS/anaconda.spec

@ -248,7 +248,7 @@ runtime on NFS/HTTP/FTP servers or local disks.
%{__rm} data/help/en-US/RHEL7PlaceholderWithLinks.html %{__rm} data/help/en-US/RHEL7PlaceholderWithLinks.html
%{__cp} %{SOURCE102} data/help/en-US/ %{__cp} %{SOURCE102} data/help/en-US/


# PowerEl patches # PowerEL patches
%patch100 -p1 %patch100 -p1
%patch101 -p1 %patch101 -p1
%patch102 -p1 %patch102 -p1

Loading…
Cancel
Save