diff --git a/snapcraft.yaml b/snapcraft.yaml index 0a030da3..b49cda5d 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 @@ -750,8 +750,10 @@ parts: - libusb - spice-protocol - spice-server - source: https://github.com/qemu/qemu + source: https://gitlab.com/qemu-project/qemu + source-commit: 6bbce8b464206e6622216b62841cb3e953d56eb8 # v8.0.5 source-depth: 1 + source-submodules: [] source-type: git plugin: autotools autotools-configure-parameters: @@ -816,25 +818,11 @@ parts: craftctl default override-pull: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && [ "$(uname -m)" != "ppc64le" ] && [ "$(uname -m)" != "s390x" ] && exit 0 - set -ex - - # We have to do this manual git clone because of edk2/subhook submodule URL has changed. - # See https://github.com/tianocore/edk2/commit/95d8a1c255cfb8e063d679930d08ca6426eb5701 - # What is interesting is that we don't even need to do: - # git config --global url.https://github.com/tianocore/edk2-subhook.git.insteadOf https://github.com/Zeex/subhook.git - # because QEMU version which we checkout points to that version of edk2 which does not depends on subhook submodule. - # And as we do `git submodule update --init --recursive` *after* `git checkout ..` we have no problems. - # While if we do the same with built-in functionality in snapcraft it fails, because snapcraft does - # `git clone --recurse-submodules ...` and pulls master branch and fails on edk2/subhook before snapcraft does - # `git checkout ...` to the specified commit. - - git config --global transfer.fsckobjects true - - git clone https://github.com/qemu/qemu . + craftctl default - # FIXME: check if we can get rid of override-pull after the next QEMU version bump - git checkout 6bbce8b464206e6622216b62841cb3e953d56eb8 # v8.0.5 + set -ex + # Pull submodules after switching to source-commit git submodule update --init --recursive override-build: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && [ "$(uname -m)" != "ppc64le" ] && [ "$(uname -m)" != "s390x" ] && exit 0