Skip to content

Commit

Permalink
snapcraft: nvidia-container: Enable shallow clone and fix edk2 submod…
Browse files Browse the repository at this point in the history
…ules (4.0-candidate) (#615)

To reduce the size of the git repo clone (~2GB) which is causing
failures on riscv64.

Signed-off-by: Thomas Parrott <[email protected]>
(cherry picked from commit 4503d12)
Signed-off-by: Thomas Parrott <[email protected]>
(cherry picked from commit a73fe99)
  • Loading branch information
tomponline authored Nov 13, 2024
2 parents e664786 + 7e6ab2f commit c437b0b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,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 "[email protected]"
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
Expand Down Expand Up @@ -492,10 +491,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
Expand Down

0 comments on commit c437b0b

Please sign in to comment.