Skip to content

Commit 4bb252d

Browse files
committed
fix pve-qemu build
1 parent 22ec89c commit 4bb252d

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

‎build.sh‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ dockerbuild(){
5959
if [ -n "$BUILDERNAME" ];then
6060
docker run -e DEB_BUILD_OPTIONS=$DEB_OPT -e PKGDIR=$SH_PATH/packages/$PKGNAME/$PKGNAME -v $SH_PATH/:$SH_PATH --name $PKGNAME --rm $BUILDERNAME || errlog "builderror"
6161
else
62-
docker run -e DEB_BUILD_OPTIONS=$DEB_OPT -e PKGDIR=$SH_PATH/packages/$PKGNAME/$PKGNAME -v $SH_PATH/:$SH_PATH --name $PKGNAME --rm pvebuilder|| errlog "builderror"
62+
docker run -it -e DEB_BUILD_OPTIONS=$DEB_OPT -e PKGDIR=$SH_PATH/packages/$PKGNAME/$PKGNAME -v $SH_PATH/:$SH_PATH --name $PKGNAME --rm pvebuilder bash|| errlog "builderror"
6363
fi
6464
}
6565

@@ -105,7 +105,15 @@ upload_pkg(){
105105
update_submodues(){
106106
rm $SH_PATH/packages/$PKGNAME/$PKGNAME/ -rf
107107
mkdir $SH_PATH/packages/$PKGNAME/$PKGNAME/
108-
git submodule update --init --recursive "$SH_PATH/packages/$PKGNAME/$PKGNAME"
108+
# qemu is currently using Zeex/subhook, but Zeex/subhook is corrupted
109+
if [ "$PKGNAME" == "pve-qemu" ];then
110+
SKIP_SUBMODULE=1
111+
fi
112+
if [ -n "$SKIP_SUBMODULE" ];then
113+
git submodule update --init "$SH_PATH/packages/$PKGNAME/$PKGNAME"
114+
else
115+
git submodule update --init --recursive "$SH_PATH/packages/$PKGNAME/$PKGNAME"
116+
fi
109117
}
110118

111119
update_submodues || errlog "Failed to update submodule"

‎packages/pve-qemu/autobuild.sh‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ errlog(){
77

88
}
99

10+
update_submodule(){
11+
cd $SH_DIR/$PKGNAME
12+
echo "init submodule"
13+
git submodule update --init --depth=1
14+
# replace Zeex/subhook
15+
echo "set submodule url"
16+
cd qemu/roms/edk2/
17+
git submodule set-url UnitTestFrameworkPkg/Library/SubhookLib/subhook https://github.com/tianocore/edk2-subhook
18+
git submodule update --init --recursive --depth=1
19+
}
20+
1021
exec_build(){
1122
apt update
1223
apt install libpve-access-control librados2 librados-dev -y
@@ -27,5 +38,6 @@ echo "This is $PKGNAME build scripts"
2738
SH_PATH=$(realpath "$0")
2839
SH_DIR=$(dirname $SH_PATH)
2940

41+
update_submodule
3042
cd $SH_DIR/$PKGNAME
3143
exec_build

0 commit comments

Comments
 (0)