diff --git a/README.md b/README.md index a0724ec..dba914a 100755 --- a/README.md +++ b/README.md @@ -26,3 +26,10 @@ The built package will be under /tmp/pve-common ```bash BUILDERNAME=dockerpull.com/pvebuilder:20241101 bash build.sh pve-common ``` + + +### proxmox-backup-restore-images + +This package will pull in the kernel and ZFS packages, which can cause failures if the network is slow, so an additional `submodule.list` check has been added. + +If the file exists, it will use the submodules listed in the file, with the file format referencing the `packages/proxmox-backup-restore-image/autobuild.sh` file. diff --git a/packages/proxmox-backup-restore-image/autobuild.sh b/packages/proxmox-backup-restore-image/autobuild.sh index 39a5508..ed4ba8d 100644 --- a/packages/proxmox-backup-restore-image/autobuild.sh +++ b/packages/proxmox-backup-restore-image/autobuild.sh @@ -6,28 +6,23 @@ PKGNAME=$(basename $SH_DIR) # zfsurl="https://gitea.lierfang.com/proxmox-mirrors/mirror_zfs" # ubuntukernelurl="https://gitea.lierfang.com/Proxmox-Port/linux-openeuler" -errlog(){ - echo $1 - exit 1 - -} update_submodule(){ cd $SH_DIR/$PKGNAME echo "init submodule" if [ -f "$SH_DIR/submodule.list" ];then source $SH_DIR/submodule.list - git submodule set-url src/submodules/ubuntu-kernel "$zfsurl" - git submodule set-url src/submodules/zfsonlinux "$ubuntukernelurl" + git submodule set-url src/submodules/ubuntu-kernel "$ubuntukernelurl" || errlog "failed to update kernel" + git submodule set-url submodules/zfsonlinux "$zfsurl" || errlog "failed to update zfs" fi git submodule update --init --recursive --depth=1 } echo "This is $PKGNAME build scripts" -update_submodule - . $SH_DIR/../common.sh +update_submodule + cd $SH_DIR/$PKGNAME -exec_build_dpkg +exec_build_make