[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1109827: marked as done (unblock: ciborium/1.0.2-2)



Your message dated Thu, 24 Jul 2025 14:29:39 +0000
with message-id <E1uewx1-00DesO-0g@respighi.debian.org>
and subject line unblock ciborium
has caused the Debian Bug report #1109827,
regarding unblock: ciborium/1.0.2-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1109827: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1109827
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
X-Debbugs-Cc: ciborium@packages.debian.org
Control: affects -1 + src:ciborium
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package ciborium

ciborium is the external block device (flash drive, SD cards, etc.)
handler in Lomiri (background daemon written in Go + a small QML app).

Recently, new FTBFS issues occurred (during a binNMU afaict) in ciborium
on non-common architectures, such as ppc64el, loong64, etc.

[ Reason ]

+  * debian/patches:
+    + Add 0001_remove-leftover-testing-code.patch, drop 1001_loong64.patch
+      instead. (Closes: #1109714). (Also relates already closed to #1095740).
+

Basically, instead of fixing some hacky code fragment that needed
arch-specific adjustments for every arch, upstream's approach is now to
omit that part of the code entirely. The code can be dropped, because
the related QML unit tests had been dropped beforehand, as well. So,
none of the trouble-causing code portions are needed anymore. This
removal is done via this upload. (Which fixes FTBFS on several
architectures).

[ Impact ]
ciborium not building on many archs other than x86 and a few others.

[ Tests ]
Rebuild via buildd.debian.org in unstable. Nearly all builds succeed,
all release-archs built successfully.

[ Risks ]
None.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

[ Other info ]
Relevant for Lomiri in Debian.

unblock ciborium/1.0.2-2
diff -Nru ciborium-1.0.2/debian/changelog ciborium-1.0.2/debian/changelog
--- ciborium-1.0.2/debian/changelog	2025-05-05 22:35:25.000000000 +0200
+++ ciborium-1.0.2/debian/changelog	2025-07-24 13:20:09.000000000 +0200
@@ -1,3 +1,11 @@
+ciborium (1.0.2-2) unstable; urgency=medium
+
+  * debian/patches:
+    + Add 0001_remove-leftover-testing-code.patch, drop 1001_loong64.patch
+      instead. (Closes: #1109714). (Also relates already closed to #1095740).
+
+ -- Mike Gabriel <sunweaver@debian.org>  Thu, 24 Jul 2025 13:20:09 +0200
+
 ciborium (1.0.2-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru ciborium-1.0.2/debian/patches/0001_remove-leftover-testing-code.patch ciborium-1.0.2/debian/patches/0001_remove-leftover-testing-code.patch
--- ciborium-1.0.2/debian/patches/0001_remove-leftover-testing-code.patch	1970-01-01 01:00:00.000000000 +0100
+++ ciborium-1.0.2/debian/patches/0001_remove-leftover-testing-code.patch	2025-07-24 13:19:34.000000000 +0200
@@ -0,0 +1,166 @@
+From d2af048099b2e53d9db01237d38271a837c48ed4 Mon Sep 17 00:00:00 2001
+From: Guido Berhoerster <guido+ubports@berhoerster.name>
+Date: Thu, 24 Jul 2025 09:00:03 +0200
+Subject: [PATCH] Remove leftover testing code
+
+The tests in qml_test.go were removed in c2a3c1da and the remaining
+architecture-specific hacks were causing build failures on
+non-arm(64)/x86(_64). They will likely not work on newer Go versions anyway.
+---
+ qml.v1/cdata/cdata.go        |  4 ---
+ qml.v1/cdata/cdata14_386.s   |  8 -----
+ qml.v1/cdata/cdata14_amd64.s |  8 -----
+ qml.v1/cdata/cdata14_arm.s   |  8 -----
+ qml.v1/cdata/cdata14_arm64.s |  8 -----
+ qml.v1/testing.go            | 69 ------------------------------------
+ 6 files changed, 105 deletions(-)
+ delete mode 100644 qml.v1/cdata/cdata.go
+ delete mode 100644 qml.v1/cdata/cdata14_386.s
+ delete mode 100644 qml.v1/cdata/cdata14_amd64.s
+ delete mode 100644 qml.v1/cdata/cdata14_arm.s
+ delete mode 100644 qml.v1/cdata/cdata14_arm64.s
+ delete mode 100644 qml.v1/testing.go
+
+diff --git a/qml.v1/cdata/cdata.go b/qml.v1/cdata/cdata.go
+deleted file mode 100644
+index f66d0d3..0000000
+--- a/qml.v1/cdata/cdata.go
++++ /dev/null
+@@ -1,4 +0,0 @@
+-// Package cdata supports the implementation of the qml package.
+-package cdata
+-
+-func Addrs() (uintptr, uintptr)
+diff --git a/qml.v1/cdata/cdata14_386.s b/qml.v1/cdata/cdata14_386.s
+deleted file mode 100644
+index b42f01b..0000000
+--- a/qml.v1/cdata/cdata14_386.s
++++ /dev/null
+@@ -1,8 +0,0 @@
+-#include "textflag.h"
+-
+-TEXT ·Addrs(SB),NOSPLIT,$0-8
+-	MOVL	$runtime·main(SB), AX
+-	MOVL	AX, ret+0(FP)
+-	MOVL	$runtime·main_main(SB), AX
+-	MOVL	AX, ret+8(FP)
+-	RET
+diff --git a/qml.v1/cdata/cdata14_amd64.s b/qml.v1/cdata/cdata14_amd64.s
+deleted file mode 100644
+index 7fe0022..0000000
+--- a/qml.v1/cdata/cdata14_amd64.s
++++ /dev/null
+@@ -1,8 +0,0 @@
+-#include "textflag.h"
+-
+-TEXT ·Addrs(SB),NOSPLIT,$0-16
+-	MOVQ	$runtime·main(SB), AX
+-	MOVQ	AX, ret+0(FP)
+-	MOVQ	$runtime·main_main(SB), AX
+-	MOVQ	AX, ret+8(FP)
+-	RET
+diff --git a/qml.v1/cdata/cdata14_arm.s b/qml.v1/cdata/cdata14_arm.s
+deleted file mode 100644
+index 4ba88c6..0000000
+--- a/qml.v1/cdata/cdata14_arm.s
++++ /dev/null
+@@ -1,8 +0,0 @@
+-#include "textflag.h"
+-
+-TEXT ·Addrs(SB),NOSPLIT,$0-8
+-	MOVW	$runtime·main(SB), R0
+-	MOVW	R0, ret+0(FP)
+-	MOVW	$runtime·main_main(SB), R0
+-	MOVW	R0, ret+4(FP)
+-	RET
+diff --git a/qml.v1/cdata/cdata14_arm64.s b/qml.v1/cdata/cdata14_arm64.s
+deleted file mode 100644
+index 09ccf78..0000000
+--- a/qml.v1/cdata/cdata14_arm64.s
++++ /dev/null
+@@ -1,8 +0,0 @@
+-#include "textflag.h"
+-
+-TEXT ·Addrs(SB),NOSPLIT,$0-16
+-	MOVD	$runtime·main(SB), R0
+-	MOVD	R0, ret+0(FP)
+-	MOVD	$runtime·main_main(SB), R0
+-	MOVD	R0, ret+8(FP)
+-	RET
+diff --git a/qml.v1/testing.go b/qml.v1/testing.go
+deleted file mode 100644
+index ae9d6d3..0000000
+--- a/qml.v1/testing.go
++++ /dev/null
+@@ -1,69 +0,0 @@
+-package qml
+-
+-// #include <stdlib.h>
+-// int mprotect(void *addr, size_t len, int prot);
+-import "C"
+-
+-import (
+-	"bytes"
+-	"encoding/binary"
+-	"gitlab.com/ubports/development/core/ciborium/qml.v1/cdata"
+-	"reflect"
+-	"unsafe"
+-)
+-
+-const pageSize = 4096
+-
+-func qmain() {
+-	Run(func() error { tmain(); return nil })
+-}
+-
+-func tmain() { tstub() }
+-func tstub() { tstub() }
+-
+-func SetupTesting() {
+-	ptr := func(f func()) uintptr { return reflect.ValueOf(f).Pointer() }
+-	rmain, mmain := cdata.Addrs()
+-	fset(rmain, mmain, ptr(qmain))
+-	fset(ptr(tmain), ptr(tstub), mmain)
+-}
+-
+-const (
+-	protREAD  = 1
+-	protWRITE = 2
+-	protEXEC  = 4
+-)
+-
+-func fset(target, old, new uintptr) {
+-	pageOffset := target % pageSize
+-	pageAddr := target - pageOffset
+-
+-	var mem []byte
+-	memh := (*reflect.SliceHeader)(unsafe.Pointer(&mem))
+-	memh.Data = pageAddr
+-	memh.Len = pageSize * 2
+-	memh.Cap = pageSize * 2
+-
+-	oldAddr := make([]byte, 8)
+-	newAddr := make([]byte, 8)
+-
+-	binary.LittleEndian.PutUint64(oldAddr, uint64(old))
+-	binary.LittleEndian.PutUint64(newAddr, uint64(new))
+-
+-	// BSD's syscall package misses Mprotect. Use cgo instead.
+-	C.mprotect(unsafe.Pointer(pageAddr), C.size_t(len(mem)), protEXEC|protREAD|protWRITE)
+-	defer C.mprotect(unsafe.Pointer(pageAddr), C.size_t(len(mem)), protEXEC|protREAD)
+-
+-	delta := make([]byte, 4)
+-	for i, c := range mem[pageOffset:] {
+-		if c == 0xe8 && int(pageOffset)+i+5 < len(mem) {
+-			instrAddr := pageAddr + pageOffset + uintptr(i)
+-			binary.LittleEndian.PutUint32(delta, uint32(old-instrAddr-5))
+-			if bytes.Equal(mem[int(pageOffset)+i+1:int(pageOffset)+i+5], delta) {
+-				binary.LittleEndian.PutUint32(mem[int(pageOffset)+i+1:], uint32(new-instrAddr-5))
+-				return
+-			}
+-		}
+-	}
+-	panic("cannot setup qml package for testing")
+-}
+-- 
+GitLab
diff -Nru ciborium-1.0.2/debian/patches/1001_loong64.patch ciborium-1.0.2/debian/patches/1001_loong64.patch
--- ciborium-1.0.2/debian/patches/1001_loong64.patch	2025-05-05 22:32:52.000000000 +0200
+++ ciborium-1.0.2/debian/patches/1001_loong64.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-Description: Add loong64 architecture support.
-Author: wuruilong <wuruilong@loongson.cn>
-Forwarded: https://gitlab.com/ubports/development/core/ciborium/-/merge_requests/18
-
---- /dev/null
-+++ ciborium-1.0.1/qml.v1/cdata/cdata14_loong64.s
-@@ -0,0 +1,8 @@
-+#include "textflag.h"
-+
-+TEXT ·Addrs(SB),NOSPLIT,$0-16
-+        MOVW        $runtime·main(SB), R0
-+        MOVW        R0, ret+0(FP)
-+        MOVW        $runtime·main_main(SB), R0
-+        MOVW        R0, ret+8(FP)
-+        RET
diff -Nru ciborium-1.0.2/debian/patches/series ciborium-1.0.2/debian/patches/series
--- ciborium-1.0.2/debian/patches/series	2025-05-05 22:33:39.000000000 +0200
+++ ciborium-1.0.2/debian/patches/series	2025-07-24 13:19:34.000000000 +0200
@@ -1,4 +1,4 @@
 2000-Remove-lomiri-push-service.patch
 2001_only-launch-with-lomiri-service.patch
-1001_loong64.patch
 2002_hide-app-if-not-in-lomiri.patch
+0001_remove-leftover-testing-code.patch

--- End Message ---
--- Begin Message ---
Unblocked ciborium.

--- End Message ---

Reply to: