From 5cc28148c29e20986e3a6393fb5a23dc27a0c820 Mon Sep 17 00:00:00 2001 From: AtomicFS Date: Mon, 18 Nov 2024 11:11:48 +0100 Subject: [PATCH] feat(docker): apply patches to edk2 containers Signed-off-by: AtomicFS --- docker/edk2/Dockerfile | 15 +++- .../edk2-stable202302-zeex-subhook.patch | 64 ++++++++++++++ .../edk2-stable202305-zeex-subhook.patch | 84 ++++++++++++++++++ .../edk2-stable202308-zeex-subhook.patch | 84 ++++++++++++++++++ .../edk2-stable202311-zeex-subhook.patch | 84 ++++++++++++++++++ .../edk2-stable202402-zeex-subhook.patch | 84 ++++++++++++++++++ .../edk2-stable202405-zeex-subhook.patch | 87 +++++++++++++++++++ 7 files changed, 501 insertions(+), 1 deletion(-) create mode 100644 docker/edk2/patches/edk2-stable202302-zeex-subhook.patch create mode 100644 docker/edk2/patches/edk2-stable202305-zeex-subhook.patch create mode 100644 docker/edk2/patches/edk2-stable202308-zeex-subhook.patch create mode 100644 docker/edk2/patches/edk2-stable202311-zeex-subhook.patch create mode 100644 docker/edk2/patches/edk2-stable202402-zeex-subhook.patch create mode 100644 docker/edk2/patches/edk2-stable202405-zeex-subhook.patch diff --git a/docker/edk2/Dockerfile b/docker/edk2/Dockerfile index 06e35edc..f82cb9ab 100644 --- a/docker/edk2/Dockerfile +++ b/docker/edk2/Dockerfile @@ -146,7 +146,16 @@ RUN mkdir Edk2 && \ git init && \ git remote add origin https://github.com/tianocore/edk2.git && \ git fetch --depth 1 origin "${EDK2_VERSION_COMMIT}" && \ - git checkout "${EDK2_VERSION_COMMIT}" && \ + git checkout "${EDK2_VERSION_COMMIT}" + +# Back-porting patch 4dfdca63a9 which fixed submodules +COPY patches $TOOLSDIR/Edk2/.firmware-action-patches +ENV PATCH_FILE=.firmware-action-patches/${EDK2_VERSION}-zeex-subhook.patch +ENV CACHEBUSTER=18:24 +RUN cd Edk2 && \ + if [ -f "${PATCH_FILE}" ]; then \ + git apply "${PATCH_FILE}"; \ + fi && \ if [ "${EDK2_VERSION}" = 'edk2-stable202008' ]; then \ git submodule update --init --recursive; \ else \ @@ -156,6 +165,10 @@ RUN mkdir Edk2 && \ make -C BaseTools/ -j "$(nproc)"; \ fi; +# For some reason edk2-stable202008 fails to clone all of the git submodules when shallow recursive init is used +# So to fix this we need to add IF ELSE statement to not use shallow clone on git submodules for edk2-stable202008 +# Shame on you ekd2, shame on you + #============= # "final" stage is the actual product with everything included diff --git a/docker/edk2/patches/edk2-stable202302-zeex-subhook.patch b/docker/edk2/patches/edk2-stable202302-zeex-subhook.patch new file mode 100644 index 00000000..e750967a --- /dev/null +++ b/docker/edk2/patches/edk2-stable202302-zeex-subhook.patch @@ -0,0 +1,64 @@ +From 172e9c284c05b7af34075b690b46b2ff87dd59c9 Mon Sep 17 00:00:00 2001 +From: Michael D Kinney +Date: Mon, 4 Nov 2024 10:02:59 -0800 +Subject: [PATCH] UnitTestFrameworkPkg: Use TianoCore mirror of subhook + submodule + +Change subhook url from https://github.com/Zeex/subhook to +https://github.com/tianocore/edk2-subhook because old url is +no longer available. + +Also align .gitmodules file to use consistent LF line endings. + +Signed-off-by: Michael D Kinney +--- + .gitmodules | 17 ++++++++++++++++- + ReadMe.rst | 1 + + 2 files changed, 17 insertions(+), 1 deletion(-) + +diff --git a/.gitmodules b/.gitmodules +index 8011a88d9d..6d29190a14 100644 +--- a/.gitmodules ++++ b/.gitmodules +@@ -16,10 +16,25 @@ + [submodule "BaseTools/Source/C/BrotliCompress/brotli"] + path = BaseTools/Source/C/BrotliCompress/brotli + url = https://github.com/google/brotli +- ignore = untracked ++ ignore = untracked + [submodule "RedfishPkg/Library/JsonLib/jansson"] + path = RedfishPkg/Library/JsonLib/jansson + url = https://github.com/akheron/jansson + [submodule "UnitTestFrameworkPkg/Library/GoogleTestLib/googletest"] + path = UnitTestFrameworkPkg/Library/GoogleTestLib/googletest + url = https://github.com/google/googletest.git ++[submodule "UnitTestFrameworkPkg/Library/SubhookLib/subhook"] ++ path = UnitTestFrameworkPkg/Library/SubhookLib/subhook ++ url = https://github.com/tianocore/edk2-subhook.git ++[submodule "MdePkg/Library/BaseFdtLib/libfdt"] ++ path = MdePkg/Library/BaseFdtLib/libfdt ++ url = https://github.com/devicetree-org/pylibfdt.git ++[submodule "MdePkg/Library/MipiSysTLib/mipisyst"] ++ path = MdePkg/Library/MipiSysTLib/mipisyst ++ url = https://github.com/MIPI-Alliance/public-mipi-sys-t.git ++[submodule "CryptoPkg/Library/MbedTlsLib/mbedtls"] ++ path = CryptoPkg/Library/MbedTlsLib/mbedtls ++ url = https://github.com/ARMmbed/mbedtls ++[submodule "SecurityPkg/DeviceSecurity/SpdmLib/libspdm"] ++ path = SecurityPkg/DeviceSecurity/SpdmLib/libspdm ++ url = https://github.com/DMTF/libspdm.git +diff --git a/ReadMe.rst b/ReadMe.rst +index 497d963559..31dc684c72 100644 +--- a/ReadMe.rst ++++ b/ReadMe.rst +@@ -94,6 +94,7 @@ that are covered by additional licenses. + - `MdeModulePkg/Universal/RegularExpressionDxe/oniguruma `__ + - `UnitTestFrameworkPkg/Library/CmockaLib/cmocka `__ + - `UnitTestFrameworkPkg/Library/GoogleTestLib/googletest `__ ++- `UnitTestFrameworkPkg/Library/SubhookLib/subhook `__ + - `RedfishPkg/Library/JsonLib/jansson `__ + + The EDK II Project is composed of packages. The maintainers for each package +-- +2.47.0 + diff --git a/docker/edk2/patches/edk2-stable202305-zeex-subhook.patch b/docker/edk2/patches/edk2-stable202305-zeex-subhook.patch new file mode 100644 index 00000000..09a934f4 --- /dev/null +++ b/docker/edk2/patches/edk2-stable202305-zeex-subhook.patch @@ -0,0 +1,84 @@ +From e436e471c5a4091139f8842e081c3707c3011237 Mon Sep 17 00:00:00 2001 +From: Michael D Kinney +Date: Mon, 4 Nov 2024 10:02:59 -0800 +Subject: [PATCH] UnitTestFrameworkPkg: Use TianoCore mirror of subhook + submodule + +Change subhook url from https://github.com/Zeex/subhook to +https://github.com/tianocore/edk2-subhook because old url is +no longer available. + +Also align .gitmodules file to use consistent LF line endings. + +Signed-off-by: Michael D Kinney +--- + .gitmodules | 16 +++++++++++----- + ReadMe.rst | 2 +- + UnitTestFrameworkPkg/ReadMe.md | 4 ++-- + 3 files changed, 14 insertions(+), 8 deletions(-) + +diff --git a/.gitmodules b/.gitmodules +index 387794f05e..6d29190a14 100644 +--- a/.gitmodules ++++ b/.gitmodules +@@ -16,7 +16,7 @@ + [submodule "BaseTools/Source/C/BrotliCompress/brotli"] + path = BaseTools/Source/C/BrotliCompress/brotli + url = https://github.com/google/brotli +- ignore = untracked ++ ignore = untracked + [submodule "RedfishPkg/Library/JsonLib/jansson"] + path = RedfishPkg/Library/JsonLib/jansson + url = https://github.com/akheron/jansson +@@ -25,10 +25,16 @@ + url = https://github.com/google/googletest.git + [submodule "UnitTestFrameworkPkg/Library/SubhookLib/subhook"] + path = UnitTestFrameworkPkg/Library/SubhookLib/subhook +- url = https://github.com/Zeex/subhook.git +-[submodule "MdePkg/Library/BaseFdtLib/libfdt"] +- path = MdePkg/Library/BaseFdtLib/libfdt +- url = https://github.com/devicetree-org/pylibfdt.git ++ url = https://github.com/tianocore/edk2-subhook.git ++[submodule "MdePkg/Library/BaseFdtLib/libfdt"] ++ path = MdePkg/Library/BaseFdtLib/libfdt ++ url = https://github.com/devicetree-org/pylibfdt.git + [submodule "MdePkg/Library/MipiSysTLib/mipisyst"] + path = MdePkg/Library/MipiSysTLib/mipisyst + url = https://github.com/MIPI-Alliance/public-mipi-sys-t.git ++[submodule "CryptoPkg/Library/MbedTlsLib/mbedtls"] ++ path = CryptoPkg/Library/MbedTlsLib/mbedtls ++ url = https://github.com/ARMmbed/mbedtls ++[submodule "SecurityPkg/DeviceSecurity/SpdmLib/libspdm"] ++ path = SecurityPkg/DeviceSecurity/SpdmLib/libspdm ++ url = https://github.com/DMTF/libspdm.git +diff --git a/ReadMe.rst b/ReadMe.rst +index ed1d482245..f1f286ab5f 100644 +--- a/ReadMe.rst ++++ b/ReadMe.rst +@@ -94,7 +94,7 @@ that are covered by additional licenses. + - `MdeModulePkg/Universal/RegularExpressionDxe/oniguruma `__ + - `UnitTestFrameworkPkg/Library/CmockaLib/cmocka `__ + - `UnitTestFrameworkPkg/Library/GoogleTestLib/googletest `__ +-- `UnitTestFrameworkPkg/Library/SubhookLib/subhook `__ ++- `UnitTestFrameworkPkg/Library/SubhookLib/subhook `__ + - `RedfishPkg/Library/JsonLib/jansson `__ + - `MdePkg/Library/BaseFdtLib/libfdt `__ + - `MdePkg/Library/MipiSysTLib/mipisyst `__ +diff --git a/UnitTestFrameworkPkg/ReadMe.md b/UnitTestFrameworkPkg/ReadMe.md +index 7da6a320a7..61025fd075 100644 +--- a/UnitTestFrameworkPkg/ReadMe.md ++++ b/UnitTestFrameworkPkg/ReadMe.md +@@ -485,8 +485,8 @@ function to be compiled into the test application and then hooked to during a + test. + + This library is mainly a wrapper around the +-[subhook](https://github.com/Zeex/subhook) header and source files. It is +-important to note that the use of the mock function macros and the creation ++[subhook](https://github.com/tianocore/edk2-subhook) header and source files. It ++is important to note that the use of the mock function macros and the creation + of mock functions requires no knowledge about the SubhookLib. The SubhookLib + library is entirely hidden and encapsulated within FunctionMockLib, and it + is only mentioned here to provide a complete explanation on all the libraries +-- +2.47.0 + diff --git a/docker/edk2/patches/edk2-stable202308-zeex-subhook.patch b/docker/edk2/patches/edk2-stable202308-zeex-subhook.patch new file mode 100644 index 00000000..05434f88 --- /dev/null +++ b/docker/edk2/patches/edk2-stable202308-zeex-subhook.patch @@ -0,0 +1,84 @@ +From 96265555e6402b881b5d73be1d8b8edef98b7600 Mon Sep 17 00:00:00 2001 +From: Michael D Kinney +Date: Mon, 4 Nov 2024 10:02:59 -0800 +Subject: [PATCH] UnitTestFrameworkPkg: Use TianoCore mirror of subhook + submodule + +Change subhook url from https://github.com/Zeex/subhook to +https://github.com/tianocore/edk2-subhook because old url is +no longer available. + +Also align .gitmodules file to use consistent LF line endings. + +Signed-off-by: Michael D Kinney +--- + .gitmodules | 16 +++++++++++----- + ReadMe.rst | 2 +- + UnitTestFrameworkPkg/ReadMe.md | 4 ++-- + 3 files changed, 14 insertions(+), 8 deletions(-) + +diff --git a/.gitmodules b/.gitmodules +index 387794f05e..6d29190a14 100644 +--- a/.gitmodules ++++ b/.gitmodules +@@ -16,7 +16,7 @@ + [submodule "BaseTools/Source/C/BrotliCompress/brotli"] + path = BaseTools/Source/C/BrotliCompress/brotli + url = https://github.com/google/brotli +- ignore = untracked ++ ignore = untracked + [submodule "RedfishPkg/Library/JsonLib/jansson"] + path = RedfishPkg/Library/JsonLib/jansson + url = https://github.com/akheron/jansson +@@ -25,10 +25,16 @@ + url = https://github.com/google/googletest.git + [submodule "UnitTestFrameworkPkg/Library/SubhookLib/subhook"] + path = UnitTestFrameworkPkg/Library/SubhookLib/subhook +- url = https://github.com/Zeex/subhook.git +-[submodule "MdePkg/Library/BaseFdtLib/libfdt"] +- path = MdePkg/Library/BaseFdtLib/libfdt +- url = https://github.com/devicetree-org/pylibfdt.git ++ url = https://github.com/tianocore/edk2-subhook.git ++[submodule "MdePkg/Library/BaseFdtLib/libfdt"] ++ path = MdePkg/Library/BaseFdtLib/libfdt ++ url = https://github.com/devicetree-org/pylibfdt.git + [submodule "MdePkg/Library/MipiSysTLib/mipisyst"] + path = MdePkg/Library/MipiSysTLib/mipisyst + url = https://github.com/MIPI-Alliance/public-mipi-sys-t.git ++[submodule "CryptoPkg/Library/MbedTlsLib/mbedtls"] ++ path = CryptoPkg/Library/MbedTlsLib/mbedtls ++ url = https://github.com/ARMmbed/mbedtls ++[submodule "SecurityPkg/DeviceSecurity/SpdmLib/libspdm"] ++ path = SecurityPkg/DeviceSecurity/SpdmLib/libspdm ++ url = https://github.com/DMTF/libspdm.git +diff --git a/ReadMe.rst b/ReadMe.rst +index ed1d482245..f1f286ab5f 100644 +--- a/ReadMe.rst ++++ b/ReadMe.rst +@@ -94,7 +94,7 @@ that are covered by additional licenses. + - `MdeModulePkg/Universal/RegularExpressionDxe/oniguruma `__ + - `UnitTestFrameworkPkg/Library/CmockaLib/cmocka `__ + - `UnitTestFrameworkPkg/Library/GoogleTestLib/googletest `__ +-- `UnitTestFrameworkPkg/Library/SubhookLib/subhook `__ ++- `UnitTestFrameworkPkg/Library/SubhookLib/subhook `__ + - `RedfishPkg/Library/JsonLib/jansson `__ + - `MdePkg/Library/BaseFdtLib/libfdt `__ + - `MdePkg/Library/MipiSysTLib/mipisyst `__ +diff --git a/UnitTestFrameworkPkg/ReadMe.md b/UnitTestFrameworkPkg/ReadMe.md +index 7da6a320a7..61025fd075 100644 +--- a/UnitTestFrameworkPkg/ReadMe.md ++++ b/UnitTestFrameworkPkg/ReadMe.md +@@ -485,8 +485,8 @@ function to be compiled into the test application and then hooked to during a + test. + + This library is mainly a wrapper around the +-[subhook](https://github.com/Zeex/subhook) header and source files. It is +-important to note that the use of the mock function macros and the creation ++[subhook](https://github.com/tianocore/edk2-subhook) header and source files. It ++is important to note that the use of the mock function macros and the creation + of mock functions requires no knowledge about the SubhookLib. The SubhookLib + library is entirely hidden and encapsulated within FunctionMockLib, and it + is only mentioned here to provide a complete explanation on all the libraries +-- +2.47.0 + diff --git a/docker/edk2/patches/edk2-stable202311-zeex-subhook.patch b/docker/edk2/patches/edk2-stable202311-zeex-subhook.patch new file mode 100644 index 00000000..fad5d845 --- /dev/null +++ b/docker/edk2/patches/edk2-stable202311-zeex-subhook.patch @@ -0,0 +1,84 @@ +From 727defb518310ef5e9d03a1db7e76334632aafd1 Mon Sep 17 00:00:00 2001 +From: Michael D Kinney +Date: Mon, 4 Nov 2024 10:02:59 -0800 +Subject: [PATCH] UnitTestFrameworkPkg: Use TianoCore mirror of subhook + submodule + +Change subhook url from https://github.com/Zeex/subhook to +https://github.com/tianocore/edk2-subhook because old url is +no longer available. + +Also align .gitmodules file to use consistent LF line endings. + +Signed-off-by: Michael D Kinney +--- + .gitmodules | 13 ++++++++----- + ReadMe.rst | 2 +- + UnitTestFrameworkPkg/ReadMe.md | 4 ++-- + 3 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/.gitmodules b/.gitmodules +index 60d54b45eb..6d29190a14 100644 +--- a/.gitmodules ++++ b/.gitmodules +@@ -16,7 +16,7 @@ + [submodule "BaseTools/Source/C/BrotliCompress/brotli"] + path = BaseTools/Source/C/BrotliCompress/brotli + url = https://github.com/google/brotli +- ignore = untracked ++ ignore = untracked + [submodule "RedfishPkg/Library/JsonLib/jansson"] + path = RedfishPkg/Library/JsonLib/jansson + url = https://github.com/akheron/jansson +@@ -25,13 +25,16 @@ + url = https://github.com/google/googletest.git + [submodule "UnitTestFrameworkPkg/Library/SubhookLib/subhook"] + path = UnitTestFrameworkPkg/Library/SubhookLib/subhook +- url = https://github.com/Zeex/subhook.git +-[submodule "MdePkg/Library/BaseFdtLib/libfdt"] +- path = MdePkg/Library/BaseFdtLib/libfdt +- url = https://github.com/devicetree-org/pylibfdt.git ++ url = https://github.com/tianocore/edk2-subhook.git ++[submodule "MdePkg/Library/BaseFdtLib/libfdt"] ++ path = MdePkg/Library/BaseFdtLib/libfdt ++ url = https://github.com/devicetree-org/pylibfdt.git + [submodule "MdePkg/Library/MipiSysTLib/mipisyst"] + path = MdePkg/Library/MipiSysTLib/mipisyst + url = https://github.com/MIPI-Alliance/public-mipi-sys-t.git + [submodule "CryptoPkg/Library/MbedTlsLib/mbedtls"] + path = CryptoPkg/Library/MbedTlsLib/mbedtls + url = https://github.com/ARMmbed/mbedtls ++[submodule "SecurityPkg/DeviceSecurity/SpdmLib/libspdm"] ++ path = SecurityPkg/DeviceSecurity/SpdmLib/libspdm ++ url = https://github.com/DMTF/libspdm.git +diff --git a/ReadMe.rst b/ReadMe.rst +index 808ccd37af..f14e271eaa 100644 +--- a/ReadMe.rst ++++ b/ReadMe.rst +@@ -95,7 +95,7 @@ that are covered by additional licenses. + - `MdeModulePkg/Universal/RegularExpressionDxe/oniguruma `__ + - `UnitTestFrameworkPkg/Library/CmockaLib/cmocka `__ + - `UnitTestFrameworkPkg/Library/GoogleTestLib/googletest `__ +-- `UnitTestFrameworkPkg/Library/SubhookLib/subhook `__ ++- `UnitTestFrameworkPkg/Library/SubhookLib/subhook `__ + - `RedfishPkg/Library/JsonLib/jansson `__ + - `MdePkg/Library/BaseFdtLib/libfdt `__ + - `MdePkg/Library/MipiSysTLib/mipisyst `__ +diff --git a/UnitTestFrameworkPkg/ReadMe.md b/UnitTestFrameworkPkg/ReadMe.md +index 7da6a320a7..61025fd075 100644 +--- a/UnitTestFrameworkPkg/ReadMe.md ++++ b/UnitTestFrameworkPkg/ReadMe.md +@@ -485,8 +485,8 @@ function to be compiled into the test application and then hooked to during a + test. + + This library is mainly a wrapper around the +-[subhook](https://github.com/Zeex/subhook) header and source files. It is +-important to note that the use of the mock function macros and the creation ++[subhook](https://github.com/tianocore/edk2-subhook) header and source files. It ++is important to note that the use of the mock function macros and the creation + of mock functions requires no knowledge about the SubhookLib. The SubhookLib + library is entirely hidden and encapsulated within FunctionMockLib, and it + is only mentioned here to provide a complete explanation on all the libraries +-- +2.47.0 + diff --git a/docker/edk2/patches/edk2-stable202402-zeex-subhook.patch b/docker/edk2/patches/edk2-stable202402-zeex-subhook.patch new file mode 100644 index 00000000..1eb65e40 --- /dev/null +++ b/docker/edk2/patches/edk2-stable202402-zeex-subhook.patch @@ -0,0 +1,84 @@ +From 19bdaf01335b8e68fdf162e4dd217a6ce4edced1 Mon Sep 17 00:00:00 2001 +From: Michael D Kinney +Date: Mon, 4 Nov 2024 10:02:59 -0800 +Subject: [PATCH] UnitTestFrameworkPkg: Use TianoCore mirror of subhook + submodule + +Change subhook url from https://github.com/Zeex/subhook to +https://github.com/tianocore/edk2-subhook because old url is +no longer available. + +Also align .gitmodules file to use consistent LF line endings. + +Signed-off-by: Michael D Kinney +--- + .gitmodules | 13 ++++++++----- + ReadMe.rst | 2 +- + UnitTestFrameworkPkg/ReadMe.md | 4 ++-- + 3 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/.gitmodules b/.gitmodules +index 60d54b45eb..6d29190a14 100644 +--- a/.gitmodules ++++ b/.gitmodules +@@ -16,7 +16,7 @@ + [submodule "BaseTools/Source/C/BrotliCompress/brotli"] + path = BaseTools/Source/C/BrotliCompress/brotli + url = https://github.com/google/brotli +- ignore = untracked ++ ignore = untracked + [submodule "RedfishPkg/Library/JsonLib/jansson"] + path = RedfishPkg/Library/JsonLib/jansson + url = https://github.com/akheron/jansson +@@ -25,13 +25,16 @@ + url = https://github.com/google/googletest.git + [submodule "UnitTestFrameworkPkg/Library/SubhookLib/subhook"] + path = UnitTestFrameworkPkg/Library/SubhookLib/subhook +- url = https://github.com/Zeex/subhook.git +-[submodule "MdePkg/Library/BaseFdtLib/libfdt"] +- path = MdePkg/Library/BaseFdtLib/libfdt +- url = https://github.com/devicetree-org/pylibfdt.git ++ url = https://github.com/tianocore/edk2-subhook.git ++[submodule "MdePkg/Library/BaseFdtLib/libfdt"] ++ path = MdePkg/Library/BaseFdtLib/libfdt ++ url = https://github.com/devicetree-org/pylibfdt.git + [submodule "MdePkg/Library/MipiSysTLib/mipisyst"] + path = MdePkg/Library/MipiSysTLib/mipisyst + url = https://github.com/MIPI-Alliance/public-mipi-sys-t.git + [submodule "CryptoPkg/Library/MbedTlsLib/mbedtls"] + path = CryptoPkg/Library/MbedTlsLib/mbedtls + url = https://github.com/ARMmbed/mbedtls ++[submodule "SecurityPkg/DeviceSecurity/SpdmLib/libspdm"] ++ path = SecurityPkg/DeviceSecurity/SpdmLib/libspdm ++ url = https://github.com/DMTF/libspdm.git +diff --git a/ReadMe.rst b/ReadMe.rst +index 808ccd37af..f14e271eaa 100644 +--- a/ReadMe.rst ++++ b/ReadMe.rst +@@ -95,7 +95,7 @@ that are covered by additional licenses. + - `MdeModulePkg/Universal/RegularExpressionDxe/oniguruma `__ + - `UnitTestFrameworkPkg/Library/CmockaLib/cmocka `__ + - `UnitTestFrameworkPkg/Library/GoogleTestLib/googletest `__ +-- `UnitTestFrameworkPkg/Library/SubhookLib/subhook `__ ++- `UnitTestFrameworkPkg/Library/SubhookLib/subhook `__ + - `RedfishPkg/Library/JsonLib/jansson `__ + - `MdePkg/Library/BaseFdtLib/libfdt `__ + - `MdePkg/Library/MipiSysTLib/mipisyst `__ +diff --git a/UnitTestFrameworkPkg/ReadMe.md b/UnitTestFrameworkPkg/ReadMe.md +index d28cb5cb0a..6a67ca23a1 100644 +--- a/UnitTestFrameworkPkg/ReadMe.md ++++ b/UnitTestFrameworkPkg/ReadMe.md +@@ -485,8 +485,8 @@ function to be compiled into the test application and then hooked to during a + test. + + This library is mainly a wrapper around the +-[subhook](https://github.com/Zeex/subhook) header and source files. It is +-important to note that the use of the mock function macros and the creation ++[subhook](https://github.com/tianocore/edk2-subhook) header and source files. It ++is important to note that the use of the mock function macros and the creation + of mock functions requires no knowledge about the SubhookLib. The SubhookLib + library is entirely hidden and encapsulated within FunctionMockLib, and it + is only mentioned here to provide a complete explanation on all the libraries +-- +2.47.0 + diff --git a/docker/edk2/patches/edk2-stable202405-zeex-subhook.patch b/docker/edk2/patches/edk2-stable202405-zeex-subhook.patch new file mode 100644 index 00000000..95f919fb --- /dev/null +++ b/docker/edk2/patches/edk2-stable202405-zeex-subhook.patch @@ -0,0 +1,87 @@ +From 6407da5921136c3795f309756d9553c08191c53e Mon Sep 17 00:00:00 2001 +From: Michael D Kinney +Date: Mon, 4 Nov 2024 10:02:59 -0800 +Subject: [PATCH] UnitTestFrameworkPkg: Use TianoCore mirror of subhook + submodule + +Change subhook url from https://github.com/Zeex/subhook to +https://github.com/tianocore/edk2-subhook because old url is +no longer available. + +Also align .gitmodules file to use consistent LF line endings. + +Signed-off-by: Michael D Kinney +--- + .gitmodules | 16 ++++++++-------- + ReadMe.rst | 2 +- + UnitTestFrameworkPkg/ReadMe.md | 4 ++-- + 3 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/.gitmodules b/.gitmodules +index 6f4b19310f..6d29190a14 100644 +--- a/.gitmodules ++++ b/.gitmodules +@@ -16,7 +16,7 @@ + [submodule "BaseTools/Source/C/BrotliCompress/brotli"] + path = BaseTools/Source/C/BrotliCompress/brotli + url = https://github.com/google/brotli +- ignore = untracked ++ ignore = untracked + [submodule "RedfishPkg/Library/JsonLib/jansson"] + path = RedfishPkg/Library/JsonLib/jansson + url = https://github.com/akheron/jansson +@@ -25,16 +25,16 @@ + url = https://github.com/google/googletest.git + [submodule "UnitTestFrameworkPkg/Library/SubhookLib/subhook"] + path = UnitTestFrameworkPkg/Library/SubhookLib/subhook +- url = https://github.com/Zeex/subhook.git +-[submodule "MdePkg/Library/BaseFdtLib/libfdt"] +- path = MdePkg/Library/BaseFdtLib/libfdt +- url = https://github.com/devicetree-org/pylibfdt.git ++ url = https://github.com/tianocore/edk2-subhook.git ++[submodule "MdePkg/Library/BaseFdtLib/libfdt"] ++ path = MdePkg/Library/BaseFdtLib/libfdt ++ url = https://github.com/devicetree-org/pylibfdt.git + [submodule "MdePkg/Library/MipiSysTLib/mipisyst"] + path = MdePkg/Library/MipiSysTLib/mipisyst + url = https://github.com/MIPI-Alliance/public-mipi-sys-t.git + [submodule "CryptoPkg/Library/MbedTlsLib/mbedtls"] + path = CryptoPkg/Library/MbedTlsLib/mbedtls + url = https://github.com/ARMmbed/mbedtls +-[submodule "SecurityPkg/DeviceSecurity/SpdmLib/libspdm"] +- path = SecurityPkg/DeviceSecurity/SpdmLib/libspdm +- url = https://github.com/DMTF/libspdm.git ++[submodule "SecurityPkg/DeviceSecurity/SpdmLib/libspdm"] ++ path = SecurityPkg/DeviceSecurity/SpdmLib/libspdm ++ url = https://github.com/DMTF/libspdm.git +diff --git a/ReadMe.rst b/ReadMe.rst +index cfd522fdbd..eb08baa017 100644 +--- a/ReadMe.rst ++++ b/ReadMe.rst +@@ -95,7 +95,7 @@ that are covered by additional licenses. + - `MdeModulePkg/Universal/RegularExpressionDxe/oniguruma `__ + - `UnitTestFrameworkPkg/Library/CmockaLib/cmocka `__ + - `UnitTestFrameworkPkg/Library/GoogleTestLib/googletest `__ +-- `UnitTestFrameworkPkg/Library/SubhookLib/subhook `__ ++- `UnitTestFrameworkPkg/Library/SubhookLib/subhook `__ + - `RedfishPkg/Library/JsonLib/jansson `__ + - `MdePkg/Library/BaseFdtLib/libfdt `__ + - `MdePkg/Library/MipiSysTLib/mipisyst `__ +diff --git a/UnitTestFrameworkPkg/ReadMe.md b/UnitTestFrameworkPkg/ReadMe.md +index d28cb5cb0a..6a67ca23a1 100644 +--- a/UnitTestFrameworkPkg/ReadMe.md ++++ b/UnitTestFrameworkPkg/ReadMe.md +@@ -485,8 +485,8 @@ function to be compiled into the test application and then hooked to during a + test. + + This library is mainly a wrapper around the +-[subhook](https://github.com/Zeex/subhook) header and source files. It is +-important to note that the use of the mock function macros and the creation ++[subhook](https://github.com/tianocore/edk2-subhook) header and source files. It ++is important to note that the use of the mock function macros and the creation + of mock functions requires no knowledge about the SubhookLib. The SubhookLib + library is entirely hidden and encapsulated within FunctionMockLib, and it + is only mentioned here to provide a complete explanation on all the libraries +-- +2.47.0 +