[Pkg-libvirt-maintainers] Bug#1075750: libguestfs: please add support for loong64
wuruilong
wuruilong at loongson.cn
Thu Jul 4 10:42:19 BST 2024
Source: libguestfs
Version: 1:1.52.0-6.1
Severity: normal
Tags: patch
X-Debbugs-Cc: wuruilong at loongson.cn
User: debian-loongarch at lists.debian.org
Usertags: loong64
Dear Maintainer,
libguestfs compiles incorrectly on loongarch, the attached patch resolves the above error.
Please merge the attached patch to the repository and place the two binaries in the test-data/binaries/bin-loongarch64-dynamic, test-data/binaries/lib-loongarch64.so directories.
wuruilong
-- System Information:
Debian Release: trixie/sid
APT prefers unreleased
APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: loong64 (loongarch64)
Kernel: Linux 5.10.0-60.96.0.126.oe2203.loongarch64 (SMP w/32 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect
-------------- next part --------------
Description: <short summary of the patch>
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.
.
libguestfs (1:1.52.0-6.1) unstable; urgency=medium
.
* Non-maintainer upload.
* Install 99-guestfs-serial.rules into /usr/lib/udev/rules.d (Closes:
#1057804)
Author: Chris Hofstaedtler <zeha at debian.org>
Bug-Debian: https://bugs.debian.org/1057804
---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:
Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2024-07-04
--- libguestfs-1.52.0.orig/generator/actions_core.ml
+++ libguestfs-1.52.0/generator/actions_core.ml
@@ -9375,6 +9375,8 @@ with large files, such as the resulting
InitISOFS, Always, TestResultString (
[["file_architecture"; "/bin-ppc64le-dynamic"]], "ppc64le"), [];
InitISOFS, Always, TestResultString (
+ [["file_architecture"; "/bin-loongarch64-dynamic"]], "loongarch64"), [];
+ InitISOFS, Always, TestResultString (
[["file_architecture"; "/bin-riscv64-dynamic"]], "riscv64"), [];
InitISOFS, Always, TestResultString (
[["file_architecture"; "/bin-s390x-dynamic"]], "s390x"), [];
@@ -9397,6 +9399,8 @@ with large files, such as the resulting
InitISOFS, Always, TestResultString (
[["file_architecture"; "/lib-ppc64le.so"]], "ppc64le"), [];
InitISOFS, Always, TestResultString (
+ [["file_architecture"; "/lib-loongarch64.so"]], "loongarch64"), [];
+ InitISOFS, Always, TestResultString (
[["file_architecture"; "/lib-riscv64.so"]], "riscv64"), [];
InitISOFS, Always, TestResultString (
[["file_architecture"; "/lib-s390x.so"]], "s390x"), [];
@@ -9457,6 +9461,10 @@ Intel Itanium.
64 bit Power PC (little endian).
+=item \"loongarch64\"
+
+64 bit LoongArch64 (little endian).
+
=item \"riscv32\"
=item \"riscv64\"
--- libguestfs-1.52.0.orig/lib/appliance-cpu.c
+++ libguestfs-1.52.0/lib/appliance-cpu.c
@@ -87,6 +87,9 @@ guestfs_int_get_cpu_model (int kvm)
#elif defined(__riscv)
/* qemu-system-riscv64 (7.0) doesn't yet support -cpu max */
return NULL;
+#elif defined(__loongarch64)
+ /* qemu-system-loongarch64 doesn't yet support -cpu max */
+ return NULL;
#elif defined(__mips64)
/* Taken from https://gist.github.com/bradfa/46ceff759a0cf9f392cc069c4f0f095a */
return "5KEc";
--- libguestfs-1.52.0.orig/test-data/Makefile.am
+++ libguestfs-1.52.0/test-data/Makefile.am
@@ -38,6 +38,7 @@ image_files = \
$(srcdir)/binaries/bin-ppc64-dynamic \
$(srcdir)/binaries/bin-ppc64le-dynamic \
$(srcdir)/binaries/bin-riscv64-dynamic \
+ $(srcdir)/binaries/bin-loongarch64-dynamic \
$(srcdir)/binaries/bin-s390x-dynamic \
$(srcdir)/binaries/bin-sparc-dynamic \
$(srcdir)/binaries/bin-win32.exe \
@@ -50,6 +51,7 @@ image_files = \
$(srcdir)/binaries/lib-mipsel.so \
$(srcdir)/binaries/lib-ppc64.so \
$(srcdir)/binaries/lib-ppc64le.so \
+ $(srcdir)/binaries/lib-loongarch64.so \
$(srcdir)/binaries/lib-riscv64.so \
$(srcdir)/binaries/lib-s390x.so \
$(srcdir)/binaries/lib-sparc.so \
--- libguestfs-1.52.0.orig/test-data/binaries/Makefile.am
+++ libguestfs-1.52.0/test-data/binaries/Makefile.am
@@ -27,6 +27,7 @@ EXTRA_DIST = \
bin-ppc64-dynamic \
bin-ppc64le-dynamic \
bin-riscv64-dynamic \
+ bin-loongarch64-dynamic \
bin-s390x-dynamic \
bin-sparc-dynamic \
bin-win32.exe \
@@ -39,6 +40,7 @@ EXTRA_DIST = \
lib-ppc64.so \
lib-ppc64le.so \
lib-mipsel.so \
+ lib-loongarch64.so \
lib-riscv64.so \
lib-s390x.so \
lib-sparc.so \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin-loongarch64-dynamic
Type: application/x-pie-executable
Size: 20272 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-maintainers/attachments/20240704/e4f6903b/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lib-loongarch64.so
Type: application/x-sharedlib
Size: 19272 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-maintainers/attachments/20240704/e4f6903b/attachment-0003.bin>
More information about the Pkg-libvirt-maintainers
mailing list