From a73fe9974c1230c34b053666452cd2486e20fba7 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Tue, 12 Nov 2024 14:28:40 +0000 Subject: [PATCH 1/2] snapcraft: nvidia-container: Enable shallow clone To reduce the size of the git repo clone (~2GB) which is causing failures on riscv64. Signed-off-by: Thomas Parrott (cherry picked from commit 4503d12af52741f3bf73317314de4044925cf9a7) Signed-off-by: Thomas Parrott --- snapcraft.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index f7b35073..6cad9999 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -494,10 +494,12 @@ parts: after: - libseccomp source: https://github.com/NVIDIA/libnvidia-container - source-type: git - source-tag: v1.11.0 + source-commit: c8f267be0bac1c654d59ad4ea5df907141149977 # v1.11.0 source-depth: 1 + source-type: git plugin: make + build-environment: + - GIT_TAG: "1.11.0" # Enables source-depth: 1, should match git tag without "v" prefix. build-packages: - bmake - curl From 86c7759dbace0d00c666e7428702773740920fd9 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Thu, 7 Nov 2024 12:40:01 +0000 Subject: [PATCH 2/2] snapcraft: edk2 submodules fixes - Move downloading submodules into override-pull stage. - edk2: remove unnecessary fix subhook submodule url Signed-off-by: Thomas Parrott (cherry picked from commit b34e5738e8b0afc8a1776d20364ff6add0f85b1d) --- snapcraft.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 6cad9999..f36f72eb 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -251,15 +251,14 @@ parts: set -ex git clone https://github.com/tianocore/edk2 . -b edk2-stable202208 + # Pull submodules after switching to source-commit + git submodule update --init --recursive + git config user.email "noreply@lists.canonical.com" git config user.name "LXD snap builder" override-build: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 - # 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 < "${SNAPCRAFT_PROJECT_DIR}/patches/edk2-0001-force-DUID-LLT.patch" cp "${SNAPCRAFT_PROJECT_DIR}/patches/edk2-0002-logo.bmp" MdeModulePkg/Logo/Logo.bmp