Merge lp:~fginther/fake-juju/fix-i386-builds into lp:~landscape/fake-juju/trunk-old

Proposed by Francis Ginther
Status: Merged
Approved by: Francis Ginther
Approved revision: 58
Merged at revision: 57
Proposed branch: lp:~fginther/fake-juju/fix-i386-builds
Merge into: lp:~landscape/fake-juju/trunk-old
Diff against target: 20 lines (+13/-0)
1 file modified
patches/juju-core_2.0.0.patch (+13/-0)
To merge this branch: bzr merge lp:~fginther/fake-juju/fix-i386-builds
Reviewer Review Type Date Requested Status
Eric Snow (community) Approve
🤖 Landscape Builder test results Approve
Review via email: mp+311398@code.launchpad.net

Commit message

Add a 2.0.0 patch for integer overflow error, https://github.com/go-mgo/mgo/pull/311.

Description of the change

Add a 2.0.0 patch for integer overflow error, https://github.com/go-mgo/mgo/pull/311.

i386 builds are failing on launchpad [1]. Googling uncovered the problem [2] and fix [3] which has been added to the juju 2.0.0 patch.

Testing instructions:
 - Build amd64 and i386 packages for xenial
   $ sbuild --arch i386 -d xenial-i386
   $ sbuild -d xenial-amd64

[1] - https://i294040893.restricted.launchpadlibrarian.net/294040893/buildlog_ubuntu-xenial-i386.fake-juju_0.18-0~56~ubuntu16.04.1_BUILDING.txt.gz?token=WDsSvGF8mmMKMsvbm4HTq5KB3ZdRt7Fp
[2] - https://github.com/go-mgo/mgo/issues/310
[3] - https://github.com/go-mgo/mgo/pull/311

To post a comment you must log in.
Revision history for this message
🤖 Landscape Builder (landscape-builder) :
review: Abstain (executing tests)
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :

Command: make ci-test
Result: Success
Revno: 58
Branch: lp:~fginther/fake-juju/fix-i386-builds
Jenkins: https://ci.lscape.net/job/latch-test-xenial/975/

review: Approve (test results)
Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'patches/juju-core_2.0.0.patch'
2--- patches/juju-core_2.0.0.patch 2016-11-03 15:58:55 +0000
3+++ patches/juju-core_2.0.0.patch 2016-11-21 14:39:24 +0000
4@@ -63,3 +63,16 @@
5 var hostnames []string
6 srvCert, srvKey, err := cert.NewServer(CACert, CAKey, time.Now().AddDate(10, 0, 0), hostnames)
7 if err != nil {
8+diff -U 3 -r --no-dereference ./2.0.0/.unpacked-clean/src/gopkg.in/mgo.v2/bson/json.go ./2.0.0/src/gopkg.in/mgo.v2/bson/json.go
9+--- ./2.0.0/.unpacked-clean/src/gopkg.in/mgo.v2/bson/json.go 2016-10-13 09:32:16.000000000 -0500
10++++ ./2.0.0/src/gopkg.in/mgo.v2/bson/json.go 2016-11-21 07:55:31.696036251 -0600
11+@@ -317,7 +317,8 @@
12+ func jencInt(v interface{}) ([]byte, error) {
13+ n := v.(int)
14+ f := `{"$numberLong":"%d"}`
15+- if n <= 1<<53 {
16++ // fake-juju apply https://github.com/go-mgo/mgo/pull/311
17++ if int64(n) <= 1<<53 {
18+ f = `%d`
19+ }
20+ return fbytes(f, n), nil

Subscribers

People subscribed via source and target branches