control: reassign -1 src:golang-refraction-networking-utls
control: found -1 1.2.1-3
control: affects -1 riseup-vpn
control: tags -1 patch pending

Hello, I NMUed the package in sid, and I'm attaching the patch to this bug 
report.

Note: the patch only touches loong64 code, and can be dropped on next release 
since the cpu detection code
is now on a separate package.

thanks

Gianfranco

On Mon, 3 Mar 2025 16:31:35 +0800 zhangdandan <[email protected]> wrote:
Source: riseup-vpn
Version: 0.24.10+ds1-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: loong64

Dear maintainers,

Compiling the riseup-vpn failed for loong64 in the Debian Package Auto-Building environment.
The error log is as follows,
```
# github.com/refraction-networking/utls/cpu
../../../github.com/refraction-networking/utls/cpu/cpu_loong64.go:10:7: CacheLineSize redeclared in this block ../../../github.com/refraction-networking/utls/cpu/cpu.go:20:5: other declaration of CacheLineSize ../../../github.com/refraction-networking/utls/cpu/cpu.go:15:30: undefined array length CacheLinePadSize or missing type constraint ../../../github.com/refraction-networking/utls/cpu/cpu.go:20:29: undefined: CacheLinePadSize ../../../github.com/refraction-networking/utls/cpu/cpu.go:123:2: undefined: doinit
.......
```
The full build log can be found at https://buildd.debian.org/status/fetch.php?pkg=riseup-vpn&arch=loong64&ver=0.24.10%2Bds1-1&stamp=1740475439&raw=0.

After analyzing, I checked that we need to update loong64 support in golang-refraction-networking-utls-dev(build-depends). Please consider the patch I attached for golang-refraction-networking-utls source packgage.

Based on the attached patch, golang-refraction-networking-utls (1.2.1-3+loong64) was built successfully on local ENV. And then, based on golang-refraction-networking-utls-dev_1.2.1-3+loong64_all.deb, I have built riseup-vpn normally.

Please update loong64 support in the depend of golang-refraction-networking-utls(which is a build dependency of riseup-vpn).

Best regards,
Dandan Zhang
diff -Nru golang-refraction-networking-utls-1.2.1/debian/changelog 
golang-refraction-networking-utls-1.2.1/debian/changelog
--- golang-refraction-networking-utls-1.2.1/debian/changelog    2025-02-04 
19:49:43.000000000 +0100
+++ golang-refraction-networking-utls-1.2.1/debian/changelog    2025-03-11 
14:32:05.000000000 +0100
@@ -1,3 +1,13 @@
+golang-refraction-networking-utls (1.2.1-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Dandan Zhang <[email protected] ]
+  * Update loong64 patch to fix a build failure on riseup-vpn
+    (Closes: #1099405)
+
+ -- Gianfranco Costamagna <[email protected]>  Tue, 11 Mar 2025 
14:32:05 +0100
+
 golang-refraction-networking-utls (1.2.1-3) unstable; urgency=medium
 
   * Team Upload.
diff -Nru golang-refraction-networking-utls-1.2.1/debian/patches/loong64.patch 
golang-refraction-networking-utls-1.2.1/debian/patches/loong64.patch
--- golang-refraction-networking-utls-1.2.1/debian/patches/loong64.patch        
1970-01-01 01:00:00.000000000 +0100
+++ golang-refraction-networking-utls-1.2.1/debian/patches/loong64.patch        
2025-03-11 14:32:05.000000000 +0100
@@ -0,0 +1,22 @@
+Description: Update loong64 support patch for new release
+Author: Dandan Zhang <[email protected]>
+Bug-Debian: https://bugs.debian.org/1099405
+Last-Update: 2025-03-11
+
+--- golang-refraction-networking-utls-1.2.1.orig/cpu/cpu_loong64.go
++++ golang-refraction-networking-utls-1.2.1/cpu/cpu_loong64.go
+@@ -2,12 +2,9 @@
+ // Use of this source code is governed by a BSD-style
+ // license that can be found in the LICENSE file.
+ 
+-//go:build loong64
+-// +build loong64
+-
+ package cpu
+ 
+-const CacheLineSize = 64
++const CacheLinePadSize = 64
+ 
+-func initOptions() {
++func doinit() {
+ }
diff -Nru golang-refraction-networking-utls-1.2.1/debian/patches/series 
golang-refraction-networking-utls-1.2.1/debian/patches/series
--- golang-refraction-networking-utls-1.2.1/debian/patches/series       
2025-02-04 19:48:12.000000000 +0100
+++ golang-refraction-networking-utls-1.2.1/debian/patches/series       
2025-03-11 14:32:05.000000000 +0100
@@ -1,2 +1,3 @@
 0001-Skip-client-server-handshake-tests.patch
 0002-Skip-TestVerifyConnection.patch
+loong64.patch

Reply via email to