Skip to content

Commit fc4e69a

Browse files
committed
Add debbuild env check and add dsc build
1 parent d369624 commit fc4e69a

13 files changed

Lines changed: 83 additions & 26 deletions

File tree

‎build.sh‎

Lines changed: 68 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22
PKGNAME=$1
33
SH_PATH=$(readlink -f `dirname "$0"`)
4+
PKG_LOCATION_PATH="/tmp/2022"
5+
DEB_OPT="dd"
46

57
errlog(){
68
echo $1;
@@ -15,56 +17,99 @@ if [ ! -d "$SH_PATH/packages/$PKGNAME" ];then
1517
errlog "$PKGNAME is not exsited!"
1618
fi
1719

20+
if [ -n "$PKG_DIR" ];then
21+
PKG_LOCATION_PATH=$PKG_DIR
22+
fi
23+
24+
if [ -n "$DEB_BUILD_OPTIONS" ];then
25+
DEB_OPT=$DEB_BUILD_OPTIONS
26+
fi
27+
28+
29+
30+
echo "--------------info------------------"
31+
echo "This is Proxmox-Port package build scripts"
32+
echo "Package is $PKGNAME"
33+
echo "Docker build is $BUILDERNAME"
34+
echo "Package dir is $PKG_LOCATION_PATH/$PKGNAME"
35+
if [ -n "$DEB_BUILD_OPTIONS" ];
36+
then
37+
echo "DEB_BUILD_OPTIONS = $DEB_BUILD_OPTIONS"
38+
fi
39+
echo "--------------start-----------------"
40+
1841
dockerbuild(){
1942
rm $SH_PATH/packages/$PKGNAME/$PKGNAME/pvebuild -rf
20-
if [ -n "$BUILDERNAME" ];then
21-
docker run -it -e PKGDIR=$SH_PATH/packages/$PKGNAME/$PKGNAME -v $SH_PATH/:$SH_PATH --name $PKGNAME --rm $BUILDERNAME || errlog "builderror"
43+
if [ -n "$BUILDERNAME" ];then
44+
docker run -it -e DEB_BUILD_OPTIONS=$DEB_OPT -e PKGDIR=$SH_PATH/packages/$PKGNAME/$PKGNAME -v $SH_PATH/:$SH_PATH --name $PKGNAME --rm $BUILDERNAME || errlog "builderror"
2245
else
23-
docker run -it -e PKGDIR=$SH_PATH/packages/$PKGNAME/$PKGNAME -v $SH_PATH/:$SH_PATH --name $PKGNAME --rm pvebuilder || errlog "builderror"
46+
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 || errlog "builderror"
2447
fi
2548
}
2649

2750
upload_pkg(){
28-
mkdir /tmp/$PKGNAME -p
29-
find "$SH_PATH/packages/$PKGNAME/$PKGNAME" -name "*.deb" -exec cp {} /tmp/$PKGNAME \;
30-
for i in `ls /tmp/$PKGNAME/*.deb`;
51+
mkdir $PKG_LOCATION_PATH/$PKGNAME -p
52+
find "$SH_PATH/packages/$PKGNAME/$PKGNAME" -name "*.deb" -exec cp {} $PKG_LOCATION_PATH/$PKGNAME \;
53+
find "$SH_PATH/packages/$PKGNAME/$PKGNAME" -name "*.buildinfo" -exec cp {} $PKG_LOCATION_PATH/$PKGNAME \;
54+
find "$SH_PATH/packages/$PKGNAME/$PKGNAME" -name "*.changes" -exec cp {} $PKG_LOCATION_PATH/$PKGNAME \;
55+
find "$SH_PATH/packages/$PKGNAME/$PKGNAME" -name "*.dsc" -exec cp {} $PKG_LOCATION_PATH/$PKGNAME \;
56+
find "$SH_PATH/packages/$PKGNAME/$PKGNAME" -name "*.tar*" -exec cp {} $PKG_LOCATION_PATH/$PKGNAME \;
57+
for i in `ls $PKG_LOCATION_PATH/$PKGNAME/*.deb`;
3158
do
3259
md5sum $i > $i.md5
3360
cat $i.md5
3461
done
35-
find "$SH_PATH/packages/$PKGNAME/$PKGNAME" -name "*.deb.md5" -exec cp {} /tmp/$PKGNAME \;
36-
find "$SH_PATH/packages/$PKGNAME/$PKGNAME" -name "*.buildinfo" -exec cp {} /tmp/$PKGNAME \;
37-
find "$SH_PATH/packages/$PKGNAME/$PKGNAME" -name "*.changes" -exec cp {} /tmp/$PKGNAME \;
62+
for i in `ls $PKG_LOCATION_PATH/$PKGNAME/*.buildinfo`;
63+
do
64+
md5sum $i > $i.md5
65+
cat $i.md5
66+
done
67+
68+
for i in `ls $PKG_LOCATION_PATH/$PKGNAME/*.changes`;
69+
do
70+
md5sum $i > $i.md5
71+
cat $i.md5
72+
done
73+
74+
for i in `ls $PKG_LOCATION_PATH/$PKGNAME/*.dsc`;
75+
do
76+
md5sum $i > $i.md5
77+
cat $i.md5
78+
done
79+
80+
for i in `ls $PKG_LOCATION_PATH/$PKGNAME/*.tar*`;
81+
do
82+
md5sum $i > $i.md5
83+
cat $i.md5
84+
done
85+
3886
}
3987

4088
update_submodues(){
4189
if [ -d "$SH_PATH/packages/$PKGNAME/$PKGNAME/.git/" ]; then
4290
echo "skip submodule"
4391
else
4492
cd $SH_PATH/packages/$PKGNAME/
45-
git submodule update --init --recursive "$PKGNAME"
93+
# git submodule update --init --recursive "$PKGNAME"
4694
fi
4795
}
4896

4997
update_submodues || errlog "Failed to update submodule"
5098

51-
52-
ARCH=$(arch)
53-
5499
if [ -f "$SH_PATH/packages/$PKGNAME/series" ];then
55-
cat $SH_PATH/packages/$PKGNAME/series > $SH_PATH/packages/$PKGNAME/series.all
100+
cd "$SH_PATH/packages/$PKGNAME/$PKGNAME"
101+
QUILT_PATCHES=../ \
102+
QUILT_SERIES=../series \
103+
quilt --quiltrc /dev/null --color=always push -a || test $$? = 2
56104
fi
57105

58-
if [ -f "$SH_PATH/packages/$PKGNAME/series.$ARCH" ];then
59-
cat $SH_PATH/packages/$PKGNAME/series.$ARCH >> $SH_PATH/packages/$PKGNAME/series.all
60-
fi
106+
ARCH=$(arch)
61107

62-
if [ -f "$SH_PATH/packages/$PKGNAME/series.all" ];then
63-
echo "apply patches for series.all"
64-
cd "$SH_PATH/packages/$PKGNAME/$PKGNAME"
65-
QUILT_PATCHES=../ \
66-
QUILT_SERIES=../series.all \
67-
quilt --quiltrc /dev/null --color=always push -a || test $$? = 2
108+
if [ -f "$SH_PATH/packages/$PKGNAME/series.$ARCH" ];then
109+
cd "$SH_PATH/packages/$PKGNAME/$PKGNAME"
110+
QUILT_PATCHES=../ \
111+
QUILT_SERIES=../series.$ARCH \
112+
quilt --quiltrc /dev/null --color=always push -a || test $$? = 2
68113
fi
69114

70115
cd $SH_PATH

‎docker/dockerfile.arm64‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:12
1+
FROM dockerpull.com/debian:12
22
ARG DEBIAN_APT=http://mirrors.ustc.edu.cn
33
ARG PVE_APT=https://mirrors.lierfang.com
44
ARG ARCH=

‎docker/start.sh‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ exec_build(){
1414
make clean || echo ok
1515
echo "build deb in `pwd` "
1616
make deb
17+
make dsc
1718
else
1819
dpkg-buildpackage -b -us -uc ||errlog "build error"
19-
cp ../*.deb ../*.buildinfo ../*.changes $PKGDIR
20+
dpkg-buildpackage -b -us -uc -S -d ||errlog "build des error"
21+
cp ../*.deb ../*.buildinfo ../*.changes ../*.dsc ../*.tar.* $PKGDIR
2022
fi
2123
}
2224

‎packages/librados2-perl/autobuild.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ exec_build(){
1515
make clean || echo ok
1616
echo "build deb in `pwd` "
1717
make deb
18+
make dsc
1819
}
1920

2021
echo "This is $PKGNAME build scripts"

‎packages/libtpms/autobuild.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ exec_build(){
1414
make clean || echo ok
1515
echo "build deb in `pwd` "
1616
dpkg-buildpackage -b -us -uc
17+
dpkg-buildpackage -b -us -uc -S -d
1718
}
1819

1920
copy_dir(){

‎packages/proxmox-backup-qemu/autobuild.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ exec_build(){
1414
make clean || echo ok
1515
echo "build deb in `pwd` "
1616
make deb
17+
make dsc
1718
}
1819

1920
echo "This is $PKGNAME build scripts"

‎packages/proxmox-offline-mirror/autobuild.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ exec_build(){
1515
make clean || echo ok
1616
echo "build deb in `pwd` "
1717
make deb
18+
make dsc
1819
}
1920

2021
echo "This is $PKGNAME build scripts"

‎packages/proxmox-perl-rs/autobuild.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ exec_build(){
1414
make clean || echo ok
1515
echo "build deb in `pwd` "
1616
make deb
17+
make dsc
1718
}
1819

1920
echo "This is $PKGNAME build scripts"

‎packages/pve-container/autobuild.sh‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ exec_build(){
1313
echo "clean "
1414
make clean || echo ok
1515
echo "build deb in `pwd` "
16-
DEB_BUILD_OPTIONS=nocheck make deb
16+
make deb
17+
make dsc
1718
}
1819

1920
echo "This is $PKGNAME build scripts"

‎packages/pve-qemu/autobuild.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ exec_build(){
1818
meson subprojects download
1919
cd $SH_DIR/$PKGNAME
2020
make deb
21+
make dsc
2122
}
2223

2324
echo "This is $PKGNAME build scripts"

0 commit comments

Comments
 (0)