Bug#1010361: netw-ib-ox-ag: FTBFS on riscv64: Could not guess NETWIBDEF_SYSARCH

2022-06-28 Thread Bastian Germann

I am sponsoring Xiao's NMU.



Bug#1010361: netw-ib-ox-ag: FTBFS on riscv64: Could not guess NETWIBDEF_SYSARCH

2022-06-28 Thread 肖盛文
Source: netw-ib-ox-ag
Version: 5.39.0-1.4
Followup-For: Bug #1010361
X-Debbugs-Cc: atzli...@sina.com,debian-ri...@lists.debian.org
Control: tags 1010361 + pending

Dear maintainer,

I've prepared an NMU for netw-ib-ox-ag (versioned as 5.39.0-1.5) and
uploaded it to DELAYED/00. Please feel free to tell me if I
should delay it longer.

The package is upload to mentors.d.n now:
https://mentors.debian.net/package/netw-ib-ox-ag/

dget -x 
https://mentors.debian.net/debian/pool/main/n/netw-ib-ox-ag/netw-ib-ox-ag_5.39.0-1.5.dsc

Regards.


-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: riscv64

Kernel: Linux 5.16.0-5-riscv64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=zh_CN.UTF-8, LC_CTYPE=zh_CN.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru netw-ib-ox-ag-5.39.0/debian/changelog 
netw-ib-ox-ag-5.39.0/debian/changelog
--- netw-ib-ox-ag-5.39.0/debian/changelog   2021-01-03 19:59:57.0 
+0800
+++ netw-ib-ox-ag-5.39.0/debian/changelog   2022-06-28 18:00:01.0 
+0800
@@ -1,3 +1,13 @@
+netw-ib-ox-ag (5.39.0-1.5) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [Bo YU]
+  * Fix "FTBFS on riscv64:  Could not guess NETWIBDEF_SYSARCH"
+(Closes: #1010361)
+
+ -- xiao sheng wen   Tue, 28 Jun 2022 18:00:01 +0800
+
 netw-ib-ox-ag (5.39.0-1.4) unstable; urgency=medium
 
   * Non maintainer upload by the Reproducible Builds team.
diff -Nru netw-ib-ox-ag-5.39.0/debian/patches/08-add-riscv64-support 
netw-ib-ox-ag-5.39.0/debian/patches/08-add-riscv64-support
--- netw-ib-ox-ag-5.39.0/debian/patches/08-add-riscv64-support  1970-01-01 
08:00:00.0 +0800
+++ netw-ib-ox-ag-5.39.0/debian/patches/08-add-riscv64-support  2022-06-28 
18:00:01.0 +0800
@@ -0,0 +1,24 @@
+Description: Add platform detection support for riscv64 arch
+ This patch adds platform detection support for the riscv64 architecture.
+ .
+ This patch orig come from:
+ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1010361#5
+Author: Bo YU 
+Reviewed-by: xiao sheng wen 
+Forwarded: not-needed
+
+---
+Last-Update: 2022-06-28
+
+--- a/src/netwib-src/src/genemake
 b/src/netwib-src/src/genemake
+@@ -127,6 +127,9 @@
+   sh* )
+ NETWIBDEF_SYSARCH="sh"
+ ;;
++  "riscv64" )
++NETWIBDEF_SYSARCH="riscv64"
++;;
+   * )
+ echo "Error: Could not guess NETWIBDEF_SYSARCH.";
+ echo "Edit genemake to set NETWIBDEF_SYSARCH, and rerun genemake.";
diff -Nru netw-ib-ox-ag-5.39.0/debian/patches/series 
netw-ib-ox-ag-5.39.0/debian/patches/series
--- netw-ib-ox-ag-5.39.0/debian/patches/series  2018-01-20 03:45:18.0 
+0800
+++ netw-ib-ox-ag-5.39.0/debian/patches/series  2022-06-28 18:00:01.0 
+0800
@@ -5,3 +5,4 @@
 05-add-arm64-support
 06-add-kfreebsd-support
 07-tcltk
+08-add-riscv64-support


Bug#1010361: netw-ib-ox-ag: FTBFS on riscv64: Could not guess NETWIBDEF_SYSARCH

2022-04-29 Thread Bo YU
Source: netw-ib-ox-ag
Version: 5.39.0-1.4
Severity: normal
Tags: patch, ftbfs
User: debian-ri...@lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-ri...@lists.debian.org

Dear Maintainer,

net-ib-ox-ag has ftbfs on riscv64:

```
...
-e 's|NETWIBDEF_INSTPREFIX=.*$|NETWIBDEF_INSTPREFIX=/usr|g' \
src/netwib-src/src/config.dat
cd src/netwib-src/src && ./genemake && cd ../../..
Netwib version 5.39.0 (5 39 0)
Loading config.dat
System name selection
NETWIBDEF_SYSNAME=Linux
System architecture selection
Error: Could not guess NETWIBDEF_SYSARCH.
Edit genemake to set NETWIBDEF_SYSARCH, and rerun genemake.
Please contact Laurent to permanently solve this problem.
make: *** [debian/rules:30: build-stamp] Error 1
dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit 
status 2
...
```

The full buildd log is:
https://buildd.debian.org/status/fetch.php?pkg=netw-ib-ox-ag=riscv64=5.39.0-1.4=1651106576=0

The patch that i have build on riscv64 successfully locally. if you need me to
do test about it, please tell me. I have riscv64 real hardware by hand.

BR,
Bo
add support for riscv64 arch
--- a/src/netwib-src/src/genemake
+++ b/src/netwib-src/src/genemake
@@ -127,6 +127,9 @@
   sh* )
 NETWIBDEF_SYSARCH="sh"
 ;;
+  "riscv64" )
+NETWIBDEF_SYSARCH="riscv64"
+;;
   * )
 echo "Error: Could not guess NETWIBDEF_SYSARCH.";
 echo "Edit genemake to set NETWIBDEF_SYSARCH, and rerun genemake.";
@@ -2090,7 +2093,7 @@
   errorcode=\$2
 
   cat <