add lxcfs patch and build.sh
This commit is contained in:
parent
dd2c2db0d5
commit
f469ecc6dd
71
build.sh
Executable file
71
build.sh
Executable file
@ -0,0 +1,71 @@
|
||||
#!/bin/bash
|
||||
PKGNAME=$1
|
||||
SH_PATH=$(readlink -f `dirname "$0"`)
|
||||
|
||||
errlog(){
|
||||
echo $1;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if [ ! -n "$PKGNAME" ];then
|
||||
errlog "Useage: ./build.sh pve-common"
|
||||
fi
|
||||
|
||||
if [ ! -d "$SH_PATH/packages/$PKGNAME" ];then
|
||||
errlog "$PKGNAME is not exsited!"
|
||||
fi
|
||||
|
||||
dockerbuild(){
|
||||
rm $SH_PATH/packages/$PKGNAME/$PKGNAME/pvebuild -rf
|
||||
if [ -n "$BUILDERNAME" ];then
|
||||
docker run -it -e PKGDIR=$SH_PATH/packages/$PKGNAME/$PKGNAME -v $SH_PATH/:$SH_PATH --name $PKGNAME --rm $BUILDERNAME || errlog "builderror"
|
||||
else
|
||||
docker run -it -e PKGDIR=$SH_PATH/packages/$PKGNAME/$PKGNAME -v $SH_PATH/:$SH_PATH --name $PKGNAME --rm pvebuilder|| errlog "builderror"
|
||||
fi
|
||||
}
|
||||
|
||||
upload_pkg(){
|
||||
mkdir /tmp/$PKGNAME -p
|
||||
for i in `ls $SH_PATH/packages/$PKGNAME/$PKGNAME/*.deb`;
|
||||
do
|
||||
md5sum $i > $i.md5
|
||||
cat $i.md5
|
||||
done
|
||||
find "$SH_PATH/packages/$PKGNAME/$PKGNAME" -name "*.deb" -exec cp {} /tmp/$PKGNAME \;
|
||||
find "$SH_PATH/packages/$PKGNAME/$PKGNAME" -name "*.deb.md5" -exec cp {} /tmp/$PKGNAME \;
|
||||
find "$SH_PATH/packages/$PKGNAME/$PKGNAME" -name "*.buildinfo" -exec cp {} /tmp/$PKGNAME \;
|
||||
find "$SH_PATH/packages/$PKGNAME/$PKGNAME" -name "*.changes" -exec cp {} /tmp/$PKGNAME \;
|
||||
}
|
||||
|
||||
update_submodues(){
|
||||
if [ -d "$SH_PATH/packages/$PKGNAME/$PKGNAME/.git/" ]; then
|
||||
echo "skip submodule"
|
||||
else
|
||||
cd $SH_PATH/packages/$PKGNAME/
|
||||
git submodule update --init --recursive "$PKGNAME"
|
||||
fi
|
||||
}
|
||||
|
||||
update_submodues || errlog "Failed to update submodule"
|
||||
|
||||
if [ -f "$SH_PATH/packages/$PKGNAME/series" ];then
|
||||
cd "$SH_PATH/packages/$PKGNAME/$PKGNAME"
|
||||
QUILT_PATCHES=../ \
|
||||
QUILT_SERIES=../series \
|
||||
quilt --quiltrc /dev/null --color=always push -a || test $$? = 2
|
||||
fi
|
||||
|
||||
ARCH=$(arch)
|
||||
|
||||
if [ -f "$SH_PATH/packages/$PKGNAME/series.$ARCH" ];then
|
||||
cd "$SH_PATH/packages/$PKGNAME/$PKGNAME"
|
||||
QUILT_PATCHES=../ \
|
||||
QUILT_SERIES=../series.$ARCH \
|
||||
quilt --quiltrc /dev/null --color=always push -a || test $$? = 2
|
||||
fi
|
||||
|
||||
cd $SH_PATH
|
||||
|
||||
dockerbuild
|
||||
upload_pkg || errlog "upload pkg failed"
|
||||
|
||||
16
packages/lxcfs/patches/001-fix-aarch64-lib-path.patch
Normal file
16
packages/lxcfs/patches/001-fix-aarch64-lib-path.patch
Normal file
@ -0,0 +1,16 @@
|
||||
From 1590a0be2c1b7b238f4962d4f28ec36af91f10f4 Mon Sep 17 00:00:00 2001
|
||||
From: jiangcuo <49061187+jiangcuo@users.noreply.github.com>
|
||||
Date: Wed, 30 Oct 2024 21:11:26 +0800
|
||||
Subject: [PATCH] fix lib patch
|
||||
|
||||
---
|
||||
debian/lxcfs.links | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/debian/lxcfs.links b/debian/lxcfs.links
|
||||
index 36e0af9..78a35d3 100644
|
||||
--- a/debian/lxcfs.links
|
||||
+++ b/debian/lxcfs.links
|
||||
@@ -1 +1 @@
|
||||
-usr/lib/x86_64-linux-gnu/lxcfs/liblxcfs.so usr/lib/x86_64-linux-gnu/liblxcfs.so
|
||||
+usr/lib/aarch64-linux-gnu/lxcfs/liblxcfs.so usr/lib/aarch64-linux-gnu/liblxcfs.so
|
||||
@ -0,0 +1,16 @@
|
||||
From 1590a0be2c1b7b238f4962d4f28ec36af91f10f4 Mon Sep 17 00:00:00 2001
|
||||
From: jiangcuo <49061187+jiangcuo@users.noreply.github.com>
|
||||
Date: Wed, 30 Oct 2024 21:11:26 +0800
|
||||
Subject: [PATCH] fix lib patch
|
||||
|
||||
---
|
||||
debian/lxcfs.links | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/debian/lxcfs.links b/debian/lxcfs.links
|
||||
index 36e0af9..78a35d3 100644
|
||||
--- a/debian/lxcfs.links
|
||||
+++ b/debian/lxcfs.links
|
||||
@@ -1 +1 @@
|
||||
-usr/lib/x86_64-linux-gnu/lxcfs/liblxcfs.so usr/lib/x86_64-linux-gnu/liblxcfs.so
|
||||
+usr/lib/loongarch64-linux-gnu/lxcfs/liblxcfs.so usr/lib/loongarch64-linux-gnu/liblxcfs.so
|
||||
16
packages/lxcfs/patches/other/001-fix-riscv64-lib-path.patch
Normal file
16
packages/lxcfs/patches/other/001-fix-riscv64-lib-path.patch
Normal file
@ -0,0 +1,16 @@
|
||||
From 1590a0be2c1b7b238f4962d4f28ec36af91f10f4 Mon Sep 17 00:00:00 2001
|
||||
From: jiangcuo <49061187+jiangcuo@users.noreply.github.com>
|
||||
Date: Wed, 30 Oct 2024 21:11:26 +0800
|
||||
Subject: [PATCH] fix lib patch
|
||||
|
||||
---
|
||||
debian/lxcfs.links | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/debian/lxcfs.links b/debian/lxcfs.links
|
||||
index 36e0af9..78a35d3 100644
|
||||
--- a/debian/lxcfs.links
|
||||
+++ b/debian/lxcfs.links
|
||||
@@ -1 +1 @@
|
||||
-usr/lib/x86_64-linux-gnu/lxcfs/liblxcfs.so usr/lib/x86_64-linux-gnu/liblxcfs.so
|
||||
+usr/lib/riscv64-linux-gnu/lxcfs/liblxcfs.so usr/lib/riscv64-linux-gnu/liblxcfs.so
|
||||
1
packages/lxcfs/series.aarch64
Normal file
1
packages/lxcfs/series.aarch64
Normal file
@ -0,0 +1 @@
|
||||
patches/001-fix-aarch64-lib-path.patch
|
||||
1
packages/lxcfs/series.loongarch64
Normal file
1
packages/lxcfs/series.loongarch64
Normal file
@ -0,0 +1 @@
|
||||
patches/other/001-fix-loongarch64-lib-path.patch
|
||||
1
packages/lxcfs/series.riscv64
Normal file
1
packages/lxcfs/series.riscv64
Normal file
@ -0,0 +1 @@
|
||||
patches/other/001-fix-riscv64-lib-path.patch
|
||||
Loading…
Reference in New Issue
Block a user