Could switch to bbolt from bolt?

Bug #2051854 reported by bo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
New
Undecided
Unassigned

Bug Description

hi,

I am trying to fix the ftbfs issue on Debian riscv64.
https://buildd.debian.org/status/logs.php?pkg=snapd&arch=riscv64

The issue was due to lack of riscv64 support on bolt from its build log:

```

# github.com/boltdb/bolt
src/github.com/boltdb/bolt/db.go:101:13: undefined array length maxMapSize or missing type constraint
src/github.com/boltdb/bolt/db.go:317:12: undefined: maxMapSize
src/github.com/boltdb/bolt/db.go:335:10: undefined: maxMapSize
src/github.com/boltdb/bolt/db.go:336:8: undefined: maxMapSize
src/github.com/boltdb/bolt/bolt_unix.go:62:15: undefined array length maxMapSize or missing type constraint
src/github.com/boltdb/bolt/bucket.go:135:15: undefined: brokenUnaligned
src/github.com/boltdb/bolt/freelist.go:166:2: idx declared and not used
src/github.com/boltdb/bolt/freelist.go:169:19: undefined array length maxAllocSize or missing type constraint
src/github.com/boltdb/bolt/freelist.go:176:14: undefined array length maxAllocSize or missing type constraint
src/github.com/boltdb/bolt/freelist.go:204:17: undefined array length maxAllocSize or missing type constraint
src/github.com/boltdb/bolt/freelist.go:204:17: too many errors
```

See the buildd log:
https://buildd.debian.org/status/fetch.php?pkg=snapd&arch=riscv64&ver=2.61.1-1&stamp=1706526162&raw=0

But from snapd upstream side, we have supported riscv64 for a long time:
https://github.com/snapcore/snapd/pull/8801

But unfortunately, the Debian snapd maintainer uses boltdb/bolt instead of vendor bolt which supports riscv64. The boltdb/bolt has been archived for a long time.

To fix the issue, we have below solutions:
1. On Debian to package snapcore/bolt, but it's hard to let Debian accept one vendor go modules which for some years does not update.
2. To backport riscv64 support on boltdb/bolt on Debian, but from my knowledge on debian-go team, they will reduce to support on golang-github-boltdb-bolt until remove it, see: https://tracker.debian.org/pkg/golang-github-boltdb-bolt (from here we know there is no value to package snapcore/bolt on Debian again)
3. We switch to bbolt(https://tracker.debian.org/pkg/golang-github-coreos-bbolt or https://github.com/etcd-io/bbolt) from bolt, this will become easy to maintain from every aspect. But I am not sure how many work need to be finished here.

More background to see:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1010686

bo (vimerbf)
summary: - Could switch to bbolt from bolt
+ Could switch to bbolt from bolt?
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.