Skip to content

Commit 77a5da7

Browse files
committed
enable set submodule url for proxmox-backup-restore-image
1 parent 82b3c28 commit 77a5da7

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

‎README.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,10 @@ The built package will be under /tmp/pve-common
2626
```bash
2727
BUILDERNAME=dockerpull.com/pvebuilder:20241101 bash build.sh pve-common
2828
```
29+
30+
31+
### proxmox-backup-restore-images
32+
33+
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.
34+
35+
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.

‎packages/proxmox-backup-restore-image/autobuild.sh‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,23 @@ PKGNAME=$(basename $SH_DIR)
66
# zfsurl="https://gitea.lierfang.com/proxmox-mirrors/mirror_zfs"
77
# ubuntukernelurl="https://gitea.lierfang.com/Proxmox-Port/linux-openeuler"
88

9-
errlog(){
10-
echo $1
11-
exit 1
12-
13-
}
149

1510
update_submodule(){
1611
cd $SH_DIR/$PKGNAME
1712
echo "init submodule"
1813
if [ -f "$SH_DIR/submodule.list" ];then
1914
source $SH_DIR/submodule.list
20-
git submodule set-url src/submodules/ubuntu-kernel "$zfsurl"
21-
git submodule set-url src/submodules/zfsonlinux "$ubuntukernelurl"
15+
git submodule set-url src/submodules/ubuntu-kernel "$ubuntukernelurl" || errlog "failed to update kernel"
16+
git submodule set-url submodules/zfsonlinux "$zfsurl" || errlog "failed to update zfs"
2217
fi
2318
git submodule update --init --recursive --depth=1
2419
}
2520

2621
echo "This is $PKGNAME build scripts"
2722

28-
update_submodule
29-
3023
. $SH_DIR/../common.sh
3124

25+
update_submodule
26+
3227
cd $SH_DIR/$PKGNAME
33-
exec_build_dpkg
28+
exec_build_make

0 commit comments

Comments
 (0)