forked from canonical/lxd-pkg-snap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
snapcraft: edk2: Use more of snapcraft's default pull mechanisms (5.2…
…1-candidate) (canonical#617)
- Loading branch information
Showing
1 changed file
with
11 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -327,7 +327,8 @@ parts: | |
- nasm | ||
source: https://github.com/tianocore/edk2 | ||
source-depth: 1 | ||
source-tag: IRRELEVANT | ||
source-commit: 8736b8fdca85e02933cdb0a13309de14c9799ece # edk2-stable202311 | ||
source-submodules: [] | ||
source-type: git | ||
plugin: nil | ||
build-packages: | ||
|
@@ -344,9 +345,16 @@ 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-stable202311 | ||
# Fix submodule sources | ||
# see https://github.com/tianocore/edk2/commit/95d8a1c255cfb8e063d679930d08ca6426eb5701 | ||
sed -i "s#https://github.com/Zeex/subhook.git#https://github.com/tianocore/edk2-subhook.git#g" .gitmodules | ||
# 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 | ||
|
@@ -355,10 +363,6 @@ parts: | |
git config user.email "[email protected]" | ||
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 | ||
|