Bug 1817035 (edk2-rebase-rhel-8.3)

Summary: rebase edk2 to upstream tag edk2-stable202005 for RHEL-8.3
Product: Red Hat Enterprise Linux 8 Reporter: Laszlo Ersek <lersek>
Component: edk2Assignee: Laszlo Ersek <lersek>
Status: CLOSED ERRATA QA Contact: leidwang <leidwang>
Severity: unspecified Docs Contact:
Priority: high    
Version: 8.3CC: berrange, coli, jinzhao, juzhang, kraxel, lersek, mrezanin, pbonzini, philmd, tmraz, virt-maint, xuwei
Target Milestone: rcKeywords: Rebase, Triaged
Target Release: 8.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: edk2-20200602gitca407c7246bf-1.el8 Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 04:01:20 UTC Type: Component Upgrade
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1454803, 1747935, 1758153, 1801276, 1808845, 1818752, 1825061, 1837452, 1844653, 1844682, 1844698, 1846481    

Description Laszlo Ersek 2020-03-25 13:03:04 UTC
In RHEL-8.2, edk2 is based on edk2-stable201908 (according to bug
1748180).

There are (and/or soon will be) a number of upstream features / bugfixes
that we should inherit by rebasing to the (upcoming) edk2-stable202005
release.

* Upstream releases we'd incorporate:

- https://github.com/tianocore/edk2/releases/tag/edk2-stable201911

- https://github.com/tianocore/edk2/releases/tag/edk2-stable202002

- https://github.com/tianocore/edk2/releases/tag/edk2-stable202005
  (note: this link will start working later; at the time of writing,
  refer to
  <https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Release-Planning#edk2-stable202005-tag-planning>)

* Upstream changes we want:

- BZ#1808845

  (Upstream commit range 3b9cd714542a..7288ff4095cf.)

- BZ#1801276

  (Depends on the TianoCore#2550 upstream tracker bug, which in turn
  depends on TianoCore#1610, TianoCore#2031, TianoCore#2032,
  TianoCore#2174. From those, the first two have been fixed (upstream
  commit 578bcdc2605e, upstream commit 1d3215fd24f4), and the last two
  have patches pending review on the list.)

- BZ#1747935

  (Upstream commit range 578bcdc2605e..c230c002accc.)

- BZ#1454803

  (Upstream commit range 61d3b2d4279e..1158fc8e2c7b.)

- BZ#1758153

  (Upstream commit range ecb30848fdc9..61d3b2d4279e.)

* Upstream additions we should disable (via build flag updates in the
  spec file), until/unless we get specific customer requests for
  enabling them:

- Fusion-MPT SCSI driver (TianoCore#2390)

- VMware PVSCSI driver (TianoCore#2567)

- (TPM2 in ArmVirtQemu (TianoCore#2560) -- disabled by default anyway)

* Virt-QE should please pay special attention to regression-testing
  cases that load the kernel & initrd via fw_cfg, in both edk2-ovmf and
  edk2-aarch64. For example, network URL installs done with
  "virt-install --location" do that ("virt-install will download
  kernel/initrd to the local machine [...]").

  This request is due to TianoCore#2566 ("use loadimage/startimage for
  loading the kernel passed via the QEMU command line").

Comment 2 Laszlo Ersek 2020-04-16 19:12:27 UTC
Since the last (= BZ#1748180), upstream edk2 has introduced four new
submodules:

- TianoCore#2505 [0eb522987fcd8] ->
  UnitTestFrameworkPkg/Library/CmockaLib/cmocka

- TianoCore#2073 [48b6c60cc6a23] ->
  MdeModulePkg/Universal/RegularExpressionDxe/oniguruma

- TianoCore#2558 [06033f5abad38] ->
  BaseTools/Source/C/BrotliCompress/brotli

- TianoCore#2559 [58802e02c41bd] ->
  MdeModulePkg/Library/BrotliCustomDecompressLib/brotli

None of these are necessary for building edk2-ovmf and edk2-aarch64.

Brotli *seems* necessary, but that's an accidental dependency, not an
inherent one.

While RHEL8 provides a brotli package, bundling the source code of that
with edk2 -- similarly to how we handle OpenSSL -- is not welcome: it's
useless complexity. Instead:

(1) The BaseTools dependency on the submodule (from TianoCore#2558) can
be eliminated like this:

> diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile
> index df4eb64ea95e..52777eaff160 100644
> --- a/BaseTools/Source/C/GNUmakefile
> +++ b/BaseTools/Source/C/GNUmakefile
> @@ -45,7 +45,6 @@ all: makerootdir subdirs
>  LIBRARIES = Common
>  VFRAUTOGEN = VfrCompile/VfrLexer.h
>  APPLICATIONS = \
> -  BrotliCompress \
>    VfrCompile \
>    EfiRom \
>    GenFfs \

(Note that, accordingly, the "Brotli" utility can be dropped from the
edk2-tools package, as edk2-tools is not shipped in AppStream.)

(2) The MdeModulePkg dependency on the submodule (from TianoCore#2559)
can be eliminated like this (as neither the ArmVirtQemu platform nor the
OVMF platform consumes BrotliCustomDecompressLib):

> diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
> index 42ad21cf244d..568d024e5e52 100644
> --- a/MdeModulePkg/MdeModulePkg.dec
> +++ b/MdeModulePkg/MdeModulePkg.dec
> @@ -25,7 +25,6 @@ [Includes]
>    Include
>
>  [Includes.Common.Private]
> -  Library/BrotliCustomDecompressLib/brotli/c/include
>
>  [LibraryClasses]
>    ##  @libraryclass  Defines a set of methods to reset whole system.

(Tested the above as of upstream commit 06033f5abad3 ("BaseTools: Make
brotli a submodule", 2020-04-16).)

Comment 3 Laszlo Ersek 2020-05-19 16:30:49 UTC
(In reply to Laszlo Ersek from comment #0)

> * Upstream additions we should disable (via build flag updates in the
>   spec file), until/unless we get specific customer requests for
>   enabling them:
> 
> [...]
> 
> - (TPM2 in ArmVirtQemu (TianoCore#2560) -- disabled by default anyway)

See bug 1837452 though.

Comment 14 leidwang@redhat.com 2020-06-28 01:16:07 UTC
edk2 tests passed.

host info(slow tarin):

kernel-4.18.0-213.el8.x86_64
edk2-ovmf-20200602gitca407c7246bf-1.el8.noarch
qemu-kvm-4.2.0-25.module+el8.3.0+6986+29a4dcd7

host info(fast tarin)

kernel-4.18.0-216.el8.x86_64
qemu-kvm-5.0.0-0.module+el8.3.0+6620+5d5e1420.x86_64
edk2-ovmf-20200602gitca407c7246bf-1.el8.noarch

Move this bug to VERIFIED

Thanks!

Comment 17 errata-xmlrpc 2020-11-04 04:01:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: edk2 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4805