Source: qemu
Version: 1:9.2.0+ds-2
Severity: normal
Tags: patch
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainer,

We need to split out qemu-system-loongarch64 from qemu-system-misc to qemu-system-loongarch64 package.
Please consider the patch we have attached.
And the qemu 9.2.0+ds-3 source package was compiled successfully on my local loong64 rootfs environment.
```
......
dpkg-deb: building package 'qemu-system-s390x' in '../qemu-system-s390x_9.2.0+ds-3_loong64.deb'. dpkg-deb: building package 'qemu-system-loongarch64' in '../qemu-system-loongarch64_9.2.0+ds-3_loong64.deb'. dpkg-deb: building package 'qemu-system-ppc' in '../qemu-system-ppc_9.2.0+ds-3_loong64.deb'. dpkg-deb: building package 'qemu-system-x86' in '../qemu-system-x86_9.2.0+ds-3_loong64.deb'. dpkg-deb: building package 'qemu-user' in '../qemu-user_9.2.0+ds-3_loong64.deb'. dpkg-deb: building package 'qemu-user-static' in '../qemu-user-static_9.2.0+ds-3_loong64.deb'. dpkg-deb: building package 'qemu-system-riscv' in '../qemu-system-riscv_9.2.0+ds-3_loong64.deb'. dpkg-deb: building package 'qemu-system-arm' in '../qemu-system-arm_9.2.0+ds-3_loong64.deb'.
 dpkg-genbuildinfo --build=any -O../qemu_9.2.0+ds-3_loong64.buildinfo
 dpkg-genchanges --build=any -O../qemu_9.2.0+ds-3_loong64.changes

```
Would it be possible to include the attached patch in the next upload?
If you have any questions, you can contact me at any time.

thanks,
Dandan Zhang

From 788a9d42350bbc16ba967b26482edb20d555b4d8 Mon Sep 17 00:00:00 2001
From: Xianglai Li <lixiang...@loongson.cn>
Date: Sat, 21 Dec 2024 14:05:46 +0800
Subject: [PATCH] split out qemu-system-loongarch64 from qemu-system-misc to
 qemu-system-loongarch64 package

Signed-off-by: Xianglai Li <lixiang...@loongson.cn>
---
 debian/changelog                              |  7 ++++
 debian/control-in                             | 39 ++++++++++++++++++-
 debian/control.mk                             | 10 +++--
 .../qemu-system-loongarch64.lintian-overrides |  1 +
 debian/qemu-system-loongarch64.maintscript    |  1 +
 debian/qemu-system-misc.NEWS                  | 10 +++++
 6 files changed, 62 insertions(+), 6 deletions(-)
 create mode 100644 debian/qemu-system-loongarch64.lintian-overrides
 create mode 100644 debian/qemu-system-loongarch64.maintscript

diff --git a/debian/changelog b/debian/changelog
index 458c2b4a9e..5899178c28 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+qemu (1:9.2.0+ds-3) unstable; urgency=medium
+
+  * split out qemu-system-loongarch64 from qemu-system-misc to
+    qemu-system-loongarch64 package
+
+ -- Xianglai Li <lixiang...@loongson.cn>  Sat, 21 Dec 2024 11:11:36 +0800
+
 qemu (1:9.2.0+ds-2) unstable; urgency=medium
 
   * d/binfmt-install: remove forgotten cris linux-user target registration
diff --git a/debian/control-in b/debian/control-in
index caeec05f89..ae7d815626 100644
--- a/debian/control-in
+++ b/debian/control-in
@@ -197,6 +197,7 @@ Multi-Arch: foreign
 Build-Profiles: <!pkg.qemu.omit-system>
 Depends: ${misc:Depends},
  qemu-system-arm,
+ qemu-system-loongarch64,
  qemu-system-mips,
  qemu-system-ppc,
  qemu-system-riscv,
@@ -223,6 +224,7 @@ Depends: ${misc:Depends}, ${shlibs:Depends},
  qemu-system-any (= ${binary:Version}) [:system-arch:] | qemu-utils (= 
${binary:Version}),
 Enhances: qemu-utils,
  qemu-system-arm,
+ qemu-system-loongarch64,
  qemu-system-mips,
  qemu-system-ppc,
  qemu-system-riscv,
@@ -230,7 +232,7 @@ Enhances: qemu-utils,
  qemu-system-sparc,
  qemu-system-x86,
  qemu-system-misc,
-:debian:Provides: qemu-block-supplemental [amd64 arm64 ppc64el riscv64 s390x],
+:debian:Provides: qemu-block-supplemental [amd64 arm64 loong64 ppc64el riscv64 
s390x],
 Description: extra block backend modules for qemu-system and qemu-utils
  QEMU is a fast processor emulator: currently the package supports Alpha, ARM,
  CRIS, i386, LoongArch, M68k (ColdFire), MicroBlaze, MIPS, PowerPC, RISC-V,
@@ -250,6 +252,7 @@ Description: extra block backend modules for qemu-system 
and qemu-utils
 :ubuntu: qemu-system-any (= ${binary:Version}) [amd64 arm64 armhf ppc64el 
riscv64 s390x] | qemu-utils (= ${binary:Version}),
 :ubuntu:Enhances: qemu-utils,
 :ubuntu: qemu-system-arm,
+:ubuntu: qemu-system-loongarch64,
 :ubuntu: qemu-system-mips,
 :ubuntu: qemu-system-ppc,
 :ubuntu: qemu-system-riscv,
@@ -370,6 +373,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends},
 # depends on qemu-system-riscv & -s390x since 9.1.1 for now to avoid breaking
 # existing setups which used to get riscv&s390 binaries from -misc.
 # Downgrade to Recommends for one release cycle once tests are fixed
+ qemu-system-loongarch64,
  qemu-system-riscv,
 :debian: qemu-system-s390x,
 Recommends: qemu-utils,
@@ -385,7 +389,7 @@ Suggests: samba, vde2,
 Provides: ${qemu:Provides}
 Description: QEMU full system emulation binaries (miscellaneous)
  QEMU is a fast processor emulator: currently the package supports Alpha, ARM,
- CRIS, i386, LoongArch, M68k (ColdFire), MicroBlaze, MIPS, PowerPC, RISC-V,
+ CRIS, i386, M68k (ColdFire), MicroBlaze, MIPS, PowerPC, RISC-V,
  S390x, SH4, SPARC, x86-64, Xtensa and other emulations. By using dynamic
  translation it achieves reasonable speed while being easy to port on new host
  CPUs.
@@ -428,6 +432,37 @@ Description: QEMU full system emulation binaries (arm)
  code.  It can also be used to provide virtual hosting of several virtual
  machines on a single server.
 
+Package: qemu-system-loongarch64
+Architecture: :system-arch:
+Multi-Arch: foreign
+Build-Profiles: <!pkg.qemu.omit-system>
+Depends: ${shlibs:Depends}, ${misc:Depends}, qemu-system-common (= 
${binary:Version}), qemu-system-data (>> ${source:Upstream-Version}~),
+Recommends: qemu-utils,
+# loongarch64 uses vgabios-stdvga and bootroms
+ seabios,
+ ipxe-qemu,
+ qemu-efi-loongarch64,
+ qemu-system-gui (= ${binary:Version}),
+ qemu-system-modules-spice (= ${binary:Version}) [:spice-arch:],
+ qemu-system-modules-opengl (= ${binary:Version}),
+ qemu-block-extra (= ${binary:Version}),
+Breaks:   qemu-system-misc (<= 1:9.2.0+ds-2)
+Replaces: qemu-system-misc (<= 1:9.2.0+ds-2)
+Suggests: samba, vde2,
+Provides: ${qemu:Provides}
+Description: QEMU full system emulation binaries (loong64)
+ QEMU is a fast processor emulator: currently the package supports
+ LoongArch emulation. By using dynamic translation it achieves
+ reasonable speed while being easy to port on new host CPUs.
+ .
+ This package provides the full system emulation binaries to emulate
+ the following loongarch hardware: ${qemu:archlist}.
+ .
+ In system emulation mode QEMU emulates a full system, including a processor
+ and various peripherals.  It enables easier testing and debugging of system
+ code.  It can also be used to provide virtual hosting of several virtual
+ machines on a single server.
+
 Package: qemu-system-mips
 Architecture: :system-arch:
 Multi-Arch: foreign
diff --git a/debian/control.mk b/debian/control.mk
index acc29f9c1e..ebaeb3b152 100755
--- a/debian/control.mk
+++ b/debian/control.mk
@@ -75,7 +75,7 @@ user-targets := \
 # For each of ${system-kvmcpus-*}, mandatory:
 #  system-kvmlink-$dcpu - where to point kvm link for this ${DEB_HOST_ARCH_CPU}
 
-system-packages := arm mips ppc riscv s390x sparc x86 misc
+system-packages := arm loongarch64 mips ppc riscv s390x sparc x86 misc
 
 system-archlist-arm := aarch64 arm
 system-alias-aarch64 := arm64
@@ -84,6 +84,9 @@ system-kvmcpus-arm := arm64 arm
 system-kvmlink-arm64 := aarch64
 system-kvmlink-arm := arm
 
+system-archlist-loongarch64 := loongarch64
+system-alias-loongarch64 := loong64
+
 system-archlist-mips := mips mipsel mips64 mips64el
 
 system-archlist-ppc := ppc ppc64
@@ -108,10 +111,9 @@ system-kvmcpus-x86 := amd64 i386
 system-kvmlink-amd64 := x86_64
 system-kvmlink-i386 := x86_64
 
-system-archlist-misc := alpha avr hppa m68k loongarch64 \
+system-archlist-misc := alpha avr hppa m68k \
                 microblaze microblazeel or1k rx sh4 sh4eb \
                 tricore xtensa xtensaeb
-system-alias-loongarch64 := loong64
 
 ifneq (${checked-version},${DEB_VERSION_UPSTREAM})
 $(warning Debian packaging is set up for version ${checked-version} while 
actual version is ${DEB_VERSION_UPSTREAM})
@@ -161,7 +163,7 @@ system-arch = ${system-arch-linux}
 user-arch = ${system-arch-linux}
 utils-arch = $(sort ${system-arch} alpha hppa m68k sh4 x32)
 # subset of system-arch
-spice-arch = amd64 i386 arm64 armel armhf mips64el mipsel ppc64el
+spice-arch = amd64 i386 arm64 armel armhf loong64 mips64el mipsel ppc64el
 
 substvars = system-arch-linux-64 system-arch-linux system-arch spice-arch 
user-arch utils-arch \
        vdso-version
diff --git a/debian/qemu-system-loongarch64.lintian-overrides 
b/debian/qemu-system-loongarch64.lintian-overrides
new file mode 100644
index 0000000000..32a27ec130
--- /dev/null
+++ b/debian/qemu-system-loongarch64.lintian-overrides
@@ -0,0 +1 @@
+qemu-system-loongarch64: spelling-error-in-binary addd add *usr/bin/qemu-*
diff --git a/debian/qemu-system-loongarch64.maintscript 
b/debian/qemu-system-loongarch64.maintscript
new file mode 100644
index 0000000000..fc6f55beff
--- /dev/null
+++ b/debian/qemu-system-loongarch64.maintscript
@@ -0,0 +1 @@
+dir_to_symlink /usr/share/doc/qemu-system-loongarch64 qemu-system-common 
1:9.2.0+ds-3 qemu-system-loongarch64
diff --git a/debian/qemu-system-misc.NEWS b/debian/qemu-system-misc.NEWS
index 2155d8b430..ffe6d8e6ce 100644
--- a/debian/qemu-system-misc.NEWS
+++ b/debian/qemu-system-misc.NEWS
@@ -1,3 +1,13 @@
+qemu (1:9.2.0+ds-3) unstable; urgency=medium
+
+  In this version of qemu in Debian, qemu-system-loongarch64 binary has been 
split
+  from qemu-system-misc to its own separate package.
+
+  If you had installed qemu-system-misc package to have system emulators for
+  loongarch64, please install qemu-system-loongarch64 package instead.
+
+ -- Xianglai Li <lixiang...@loogson.cn>  Thu, 19 Dec 2024 17:33:24 +0800
+
 qemu (1:9.1.1+ds-1) unstable; urgency=medium
 
   In this version of qemu in Debian, qemu-system-s390x binary has been split
-- 
2.39.1

Reply via email to