Source: libzypp
Version: 17.31.23-1
Severity: wishlist
Tags: patch
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

The libzypp source package lacks LoongArch architecture support.
Please consider the patch I have attached.
The libzypp source package was compiled successfully on my local loong64 rootfs environment, and the test results are as follows,
```
The following tests passed:
    Capabilities_test
    Deltarpm_test
    InstanceId_test
    Resolver_test
......
    KeyRing_test
    PluginFrame_test
    ExternalProgram_test
    Fetcher_test
100% tests passed, 0 tests failed out of 86
Total Test time (real) =  17.11 sec
```
At the same time, I have submitted the patch(for loongarch64) to the upstream of libzypp software, and the submitted pull request link is https://github.com/openSUSE/libzypp/pull/504.
If you have any questions, you can contact me at any time.

thanks,
Dandan Zhang

Description: Add loongarch64 support 
Last-Update: 2023-12-18

--- libzypp-17.31.23.orig/zypp/Arch.cc
+++ libzypp-17.31.23/zypp/Arch.cc
@@ -227,6 +227,8 @@ namespace zypp
   DEF_BUILTIN( mipsel );
   DEF_BUILTIN( mips64 );
   DEF_BUILTIN( mips64el );
+
+  DEF_BUILTIN( loong64 );
 #undef DEF_BUILTIN
 
   ///////////////////////////////////////////////////////////////////
@@ -382,6 +384,8 @@ namespace zypp
         defCompatibleWith( a_mipsel(),		a_noarch() );
         defCompatibleWith( a_mips64(),		a_noarch() );
         defCompatibleWith( a_mips64el(),	a_noarch() );
+
+        defCompatibleWith( a_loong64(),		a_noarch() );
         //
         ///////////////////////////////////////////////////////////////////
         // dumpOn( USR ) << endl;
--- libzypp-17.31.23.orig/zypp/Arch.h
+++ libzypp-17.31.23/zypp/Arch.h
@@ -295,6 +295,9 @@ namespace zypp
   extern const Arch Arch_mips64;
   /** \relates Arch */
   extern const Arch Arch_mips64el;
+
+  /** \relates Arch */
+  extern const Arch Arch_loong64;
   //@}
 
   ///////////////////////////////////////////////////////////////////
--- libzypp-17.31.23.orig/zypp/parser/yum/schema/common-inc.rnc
+++ libzypp-17.31.23/zypp/parser/yum/schema/common-inc.rnc
@@ -67,6 +67,7 @@ private.archenum = "noarch"
             | "armv4l"
             | "armv3l"
             | "riscv64"
+            | "loong64"
             | "sh3"
             | "sh4"
             | "sh4a"
--- libzypp-17.31.23.orig/zypp/parser/yum/schema/common-inc.rng
+++ libzypp-17.31.23/zypp/parser/yum/schema/common-inc.rng
@@ -130,6 +130,7 @@
       <value>armv4l</value>
       <value>armv3l</value>
       <value>riscv64</value>
+      <value>loong64</value>
       <value>sh3</value>
       <value>sh4</value>
       <value>sh4a</value>

Reply via email to