From 139d6d68c24dcc4b410451f4c7c52590098d46ff Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Thu, 7 Nov 2024 09:42:44 +0000 Subject: [PATCH] snapcraft: edk2: Use more of snapcraft's default pull mechanisms - Switch to source-commit and empty source-submodules. - Reduce customisations to override-pull stage. - Move downloading submodules into override-pull stage. - edk2: remove unnecessary fix subhook submodule url Signed-off-by: Thomas Parrott --- snapcraft.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 0a030da3..f9ddd06e 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -277,7 +277,8 @@ parts: - nasm source: https://github.com/tianocore/edk2 source-depth: 1 - source-tag: IRRELEVANT + source-commit: ba0e0e4c6a174b71b18ccd6e47319cc45878893c # edk2-stable202208 + source-submodules: [] source-type: git plugin: nil build-packages: @@ -294,9 +295,12 @@ parts: craftctl default override-pull: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 + craftctl default + set -ex - git config --global transfer.fsckobjects true - git clone https://github.com/tianocore/edk2 . -b edk2-stable202208 + + # Pull submodules after switching to source-commit + git submodule update --init --recursive override-build: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 set -ex @@ -305,10 +309,6 @@ parts: git config user.email "noreply@lists.canonical.com" git config user.name "LXD snap builder" - # Fix submodules - sed -i "s#https://git.cryptomilk.org/projects/cmocka#https://gitlab.com/cmocka/cmocka#g" .gitmodules - git submodule update --init --recursive - # Apply patches patch -p1 < "${CRAFT_PROJECT_DIR}/patches/edk2-0001-force-DUID-LLT.patch" cp "${CRAFT_PROJECT_DIR}/patches/edk2-0002-logo.bmp" MdeModulePkg/Logo/Logo.bmp