Fix the repeated quilt errors that occur when compiling packages that require quilt.

This commit is contained in:
jiangcuo 2024-11-21 15:11:08 +08:00
parent 469b65d0f4
commit 71063b65c9
3 changed files with 133 additions and 90 deletions

View File

@ -56,31 +56,6 @@ dockerbuild(){
fi
}
exec_build_make(){
apt update
yes |mk-build-deps --install --remove
echo "clean "
make clean || echo ok
echo "build deb in `pwd` "
if [ $dscflag == "dsc" ];then
make dsc || errlog "build dsc error"
fi
DEB_BUILD_OPTIONS=nocheck make deb || errlog "build deb error"
}
exec_build_dpkg(){
apt update
yes |mk-build-deps --install --remove
echo "clean "
make clean || echo ok
echo "build deb in `pwd` "
if [ $dscflag == "dsc" ];then
dpkg-buildpackage -us -uc -S -d || errlog "build dsc error"
fi
dpkg-buildpackage -b -us -uc || errlog "build deb error"
}
upload_pkg(){
mkdir $PKG_LOCATION_PATH/$PKGNAME -p
find "$SH_PATH/packages/$PKGNAME/$PKGNAME" -name "*.deb" -exec cp {} $PKG_LOCATION_PATH/$PKGNAME \;
@ -121,30 +96,27 @@ upload_pkg(){
}
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
rm $SH_PATH/packages/$PKGNAME/$PKGNAME/ -rf
mkdir $SH_PATH/packages/$PKGNAME/$PKGNAME/
git submodule update --init --recursive "$SH_PATH/packages/$PKGNAME/$PKGNAME"
}
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
for i in `cat $SH_PATH/packages/$PKGNAME/series`;
do patch -p1 < $SH_PATH/packages/$PKGNAME/$i
done
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
for i in `cat $SH_PATH/packages/$PKGNAME/series.$ARCH`;
do patch -p1 < $SH_PATH/packages/$PKGNAME/$i
done
fi
cd $SH_PATH

View File

@ -37,3 +37,17 @@ index 6bd3cc24..0dc76470 100644
/* map twice the size we want to make sure we have already mapped
the second memory location behind it too. Otherwise the Linux
kernel may map it in the upper memory so that we can't map
diff --git a/debian/changelog b/debian/changelog
index 5f009af..e53f81c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libqb (2.0.8-2+port) unstable; urgency=medium
+
+ * Add loongarch64 support
+
+ -- Jiangcuo <jiangcuo@lierfang.com> Thu, 21 Nov 2024 13:59:33 +0800
+
libqb (2.0.8-2) unstable; urgency=medium
* [ca9bf88] Add procps build dependency for resources.test

View File

@ -1,44 +1,17 @@
diff --git a/Makefile b/Makefile
index f23b041..8a5d68d 100644
index f23b041..f79ce78 100644
--- a/Makefile
+++ b/Makefile
@@ -22,25 +22,6 @@ ifeq ($(shell test -f "$(SRCDIR)/configure" && echo 1 || echo 0), 0)
cd $(SRCDIR); meson subprojects download
endif
-PC_BIOS_FW_PURGE_LIST_IN = \
- hppa-firmware.img \
- hppa-firmware64.img \
- openbios-ppc \
- openbios-sparc32 \
- openbios-sparc64 \
- palcode-clipper \
- s390-ccw.img \
- s390-netboot.img \
- u-boot.e500 \
- .*[a-zA-Z0-9]\.dtb \
- .*[a-zA-Z0-9]\.dts \
- qemu_vga.ndrv \
- slof.bin \
@@ -36,7 +36,6 @@ PC_BIOS_FW_PURGE_LIST_IN = \
.*[a-zA-Z0-9]\.dts \
qemu_vga.ndrv \
slof.bin \
- opensbi-riscv.*-generic-fw_dynamic.bin \
-
-BLOB_PURGE_SED_CMDS = $(foreach FILE,$(PC_BIOS_FW_PURGE_LIST_IN),-e "/$(FILE)/d")
-BLOB_PURGE_FILTER = $(foreach FILE,$(PC_BIOS_FW_PURGE_LIST_IN),-e "$(FILE)")
-
$(BUILDDIR): submodule
# check if qemu/ was used for a build
# if so, please run 'make distclean' in the submodule and try again
@@ -49,8 +30,6 @@ $(BUILDDIR): submodule
cp -a $(SRCDIR) $@.tmp
cp -a debian $@.tmp/debian
rm -rf $@.tmp/roms/edk2 # packaged separately
- find $@.tmp/pc-bios -type f | grep $(BLOB_PURGE_FILTER) | xargs rm -f
- sed -i $(BLOB_PURGE_SED_CMDS) $@.tmp/pc-bios/meson.build
echo "git clone git://git.proxmox.com/git/pve-qemu.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
mv $@.tmp $@
BLOB_PURGE_SED_CMDS = $(foreach FILE,$(PC_BIOS_FW_PURGE_LIST_IN),-e "/$(FILE)/d")
BLOB_PURGE_FILTER = $(foreach FILE,$(PC_BIOS_FW_PURGE_LIST_IN),-e "$(FILE)")
diff --git a/debian/control b/debian/control
index b228c00..01c6621 100644
index b228c00..4a6b057 100644
--- a/debian/control
+++ b/debian/control
@@ -13,6 +13,7 @@ Build-Depends: debhelper-compat (= 13),
@ -49,25 +22,109 @@ index b228c00..01c6621 100644
libgnutls28-dev,
libiscsi-dev (>= 1.12.0),
libjpeg-dev,
diff --git a/debian/parse-machines.pl b/debian/parse-machines.pl
index a0f449c..e179f9b 100755
--- a/debian/parse-machines.pl
+++ b/debian/parse-machines.pl
@@ -14,11 +14,11 @@ while (<STDIN>) {
@@ -45,7 +46,7 @@ Standards-Version: 3.7.2
s/^\s+//;
my @machine = split(/\s+/);
- next if $machine[0] !~ m/^pc-(i440fx|q35)-(.+)$/;
Package: pve-qemu-kvm
Architecture: any
-Depends: ceph-common (>= 0.48),
+Depends: ceph-common [amd64 arm64],
iproute2,
libgfapi0 | glusterfs-common (>= 5.6),
libgfchangelog0 | glusterfs-common (>= 5.6),
@@ -54,7 +55,7 @@ Depends: ceph-common (>= 0.48),
libgfxdr0 | glusterfs-common (>= 5.6),
libglusterfs-dev | glusterfs-common (>= 5.6),
libglusterfs0 | glusterfs-common (>= 5.6),
- libiscsi4 (>= 1.12.0) | libiscsi7,
+ libiscsi7 | libiscsi10,
libjpeg62-turbo,
libspice-server1 (>= 0.14.0~),
libusb-1.0-0 (>= 1.0.17-1),
diff --git a/debian/parse-machines-aarch64.pl b/debian/parse-machines-aarch64.pl
new file mode 100755
index 0000000..e179f9b
--- /dev/null
+++ b/debian/parse-machines-aarch64.pl
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+use JSON;
+
+my $machines = [];
+
+while (<STDIN>) {
+ if (/^\s*Supported machines are:/) {
+ next;
+ }
+
+ s/^\s+//;
+ my @machine = split(/\s+/);
+ next if $machine[0] !~ m/^virt-(.+)$/;
push @$machines, {
'id' => $machine[0],
- 'type' => $1,
- 'version' => $2,
+ push @$machines, {
+ 'id' => $machine[0],
+ 'type' => 'virt',
+ 'version' => $1,
};
}
+ };
+}
+
+die "no QEMU machine types detected from STDIN input" if scalar (@$machines) <= 0;
+
+print to_json($machines, { utf8 => 1, canonical => 1 })
+ or die "failed to encode detected machines as JSON - $!\n";
diff --git a/debian/parse-machines-loongarch64.pl b/debian/parse-machines-loongarch64.pl
new file mode 100755
index 0000000..e19fa71
--- /dev/null
+++ b/debian/parse-machines-loongarch64.pl
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+use JSON;
+
+my $machines = [];
+
+print to_json($machines, { utf8 => 1, canonical => 1 })
+ or die "failed to encode detected machines as JSON - $!\n";
diff --git a/debian/parse-machines-x86_64.pl b/debian/parse-machines-x86_64.pl
new file mode 100755
index 0000000..e179f9b
--- /dev/null
+++ b/debian/parse-machines-x86_64.pl
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+use JSON;
+
+my $machines = [];
+
+while (<STDIN>) {
+ if (/^\s*Supported machines are:/) {
+ next;
+ }
+
+ s/^\s+//;
+ my @machine = split(/\s+/);
+ next if $machine[0] !~ m/^virt-(.+)$/;
+ push @$machines, {
+ 'id' => $machine[0],
+ 'type' => 'virt',
+ 'version' => $1,
+ };
+}
+
+die "no QEMU machine types detected from STDIN input" if scalar (@$machines) <= 0;
+
+print to_json($machines, { utf8 => 1, canonical => 1 })
+ or die "failed to encode detected machines as JSON - $!\n";
diff --git a/debian/pve-qemu-kvm.links b/debian/pve-qemu-kvm.links
index 7314aa4..2c4b8e1 100644
--- a/debian/pve-qemu-kvm.links
@ -80,7 +137,7 @@ index 7314aa4..2c4b8e1 100644
usr/bin/qemu-system-x86_64 usr/bin/qemu-system-i386
# upstream provides a qemu man page,
diff --git a/debian/rules b/debian/rules
index 51f56c5..2988432 100755
index 51f56c5..024e5ba 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,7 @@ PACKAGE=pve-qemu-kvm
@ -88,7 +145,7 @@ index 51f56c5..2988432 100755
flagfile := $(destdir)/usr/share/kvm/recognized-CPUID-flags-x86_64
-machinefile := $(destdir)/usr/share/kvm/machine-versions-x86_64.json
+machinefile := $(destdir)/usr/share/kvm/machine-versions-aarch64.json
+machinefile := $(destdir)/usr/share/kvm/machine-versions-${HOST_CPU}.json
# default QEMU out-of-tree build directory is ./build
BUILDDIR=build
@ -122,7 +179,7 @@ index 51f56c5..2988432 100755
# CPU flags are static for QEMU version, allows avoiding more costly checks
$(destdir)/usr/bin/qemu-system-x86_64 -cpu help | ./debian/parse-cpu-flags.pl > $(flagfile)
- $(destdir)/usr/bin/qemu-system-x86_64 -machine help | ./debian/parse-machines.pl > $(machinefile)
+ $(destdir)/usr/bin/qemu-system-aarch64 -machine help | ./debian/parse-machines.pl > $(machinefile)
+ $(destdir)/usr/bin/qemu-system-${HOST_CPU} -machine help | ./debian/parse-machines-${HOST_CPU}.pl > $(machinefile)
# Build architecture-independent files here.
binary-indep: build install