[pkg-go] Bug#887983: [patch] fix usage on powerpc
Michael Vogt
mvo at debian.org
Mon Jan 22 10:50:46 UTC 2018
package: golang-github-boltdb-bolt
version: 1.3.1-1
Dear golang-github-boltdb-bolt maintainers,
attached is a debdiff with a fix to make packages that use boltdb work
on powerpc. The build currently fails because the "brokenUnaligned" is
not defined on powerpc.
I submited this fix upstream to
https://github.com/boltdb/bolt/pull/740 however upstream does not
accept PRs anymore (even for trivial fixes like this :(
I also send the fix to the coreos fork of bolt
(https://github.com/coreos/bbolt/pull/73) where it was accepted right
away.
Cheers,
Michael
diff -Nru golang-github-boltdb-bolt-1.3.1/debian/patches/fix-powerpc-build.patch golang-github-boltdb-bolt-1.3.1/debian/patches/fix-powerpc-build.patch
--- golang-github-boltdb-bolt-1.3.1/debian/patches/fix-powerpc-build.patch 1970-01-01 01:00:00.000000000 +0100
+++ golang-github-boltdb-bolt-1.3.1/debian/patches/fix-powerpc-build.patch 2018-01-22 11:26:44.000000000 +0100
@@ -0,0 +1,22 @@
+Description: This fixes a built failure on powerpc (ppc in golang speak).
+ It was submited to bolt https://github.com/boltdb/bolt/pull/740 and
+ it was accepted in https://github.com/coreos/bbolt/pull/73
+Author: Michael Vogt <mvo at ubuntu.com>
+Origin: vendor
+Bug: https://github.com/boltdb/bolt/pull/740
+Last-Update: 2018-01-22
+---
+ bolt_ppc.go | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/bolt_ppc.go b/bolt_ppc.go
+index 645ddc3..55cb8a7 100644
+--- a/bolt_ppc.go
++++ b/bolt_ppc.go
+@@ -7,3 +7,6 @@ const maxMapSize = 0x7FFFFFFF // 2GB
+
+ // maxAllocSize is the size used when creating array pointers.
+ const maxAllocSize = 0xFFFFFFF
++
++// Are unaligned load/stores broken on this arch?
++var brokenUnaligned = false
diff -Nru golang-github-boltdb-bolt-1.3.1/debian/patches/series golang-github-boltdb-bolt-1.3.1/debian/patches/series
--- golang-github-boltdb-bolt-1.3.1/debian/patches/series 2017-07-19 21:11:48.000000000 +0200
+++ golang-github-boltdb-bolt-1.3.1/debian/patches/series 2018-01-22 11:26:59.000000000 +0100
@@ -1 +1,2 @@
Bug#849663_Fix_32bit_failures.patch
+fix-powerpc-build.patch
----- End forwarded message -----
More information about the Pkg-go-maintainers
mailing list