Merge lp:~james-page/ubuntu/wily/juju-core/mir-fixes into lp:ubuntu/wily/juju-core

Proposed by James Page
Status: Merged
Merge reported by: Robie Basak
Merged at revision: not available
Proposed branch: lp:~james-page/ubuntu/wily/juju-core/mir-fixes
Merge into: lp:ubuntu/wily/juju-core
Diff against target: 108 lines (+35/-6)
3 files modified
debian/changelog (+13/-0)
debian/control (+7/-0)
debian/rules (+15/-6)
To merge this branch: bzr merge lp:~james-page/ubuntu/wily/juju-core/mir-fixes
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+274052@code.launchpad.net

Description of the change

Updates to support MIR of juju-core in Ubuntu Wily development.

To post a comment you must log in.
53. By James Page

Comment about use of shared -dev packages

Revision history for this message
Robie Basak (racb) wrote :

Is there something here that ensures that the package build fails if upstream add embedded dependencies in the future that miss getting added to Build-Depends?

54. By James Page

Drop goyaml for now until juju transitions to yaml.v2

55. By James Page

* Updates to support MIR in Ubuntu:
  - d/control: Add BD's on go.crypto, go.net, juju-loggo,
    github-bmizerany-pat and go-dbus -dev packages.
  - d/rules: Tweak GOPATH configuration and link in any shared go
    dependencies from /usr/share/gocode to ensure that distribution
    -dev packages are preferred over embedded copies in juju source.
  - d/control,rules: Add BD on dh-golang, enable Built-Using field to
    ensure -dev dependencies can be tracked effectively.

56. By James Page

Go for it

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-09-22 15:27:01 +0000
3+++ debian/changelog 2015-10-19 21:44:19 +0000
4@@ -1,3 +1,16 @@
5+juju-core (1.24.6-0ubuntu2) wily; urgency=medium
6+
7+ * Updates to support MIR in Ubuntu:
8+ - d/control: Add BD's on go.crypto, go.net, juju-loggo,
9+ github-bmizerany-pat and go-dbus golang-*-dev packages.
10+ - d/rules: Tweak GOPATH configuration and link in any shared go
11+ dependencies from /usr/share/gocode to ensure that distribution
12+ -dev packages are preferred over embedded copies in juju source.
13+ - d/control,rules: Add BD on dh-golang, enable Built-Using field to
14+ ensure -dev dependencies can be tracked effectively.
15+
16+ -- James Page <james.page@ubuntu.com> Mon, 19 Oct 2015 22:43:27 +0100
17+
18 juju-core (1.24.6-0ubuntu1) wily; urgency=medium
19
20 * New upstream release (LP: #1481556).
21
22=== modified file 'debian/control'
23--- debian/control 2015-09-22 15:27:01 +0000
24+++ debian/control 2015-10-19 21:44:19 +0000
25@@ -3,9 +3,15 @@
26 Priority: extra
27 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
28 Build-Depends: debhelper (>= 7.0.50~),
29+ dh-golang,
30 distro-info,
31 gccgo-5 [!amd64 !i386 !armhf] | gccgo-go [!amd64 !i386 !armhf],
32+ golang-github-bmizerany-pat-dev,
33 golang-go (>= 2:1.2) [amd64 i386 armhf],
34+ golang-go-dbus-dev,
35+ golang-go.crypto-dev,
36+ golang-go.net-dev,
37+ golang-juju-loggo-dev,
38 lsb-release,
39 python
40 Standards-Version: 3.9.6
41@@ -17,6 +23,7 @@
42 Depends: distro-info, ${misc:Depends}, ${shlibs:Depends}
43 Recommends: bash-completion
44 Conflicts: juju (<< 0.7-0ubuntu1~)
45+Built-Using: ${misc:Built-Using}
46 Description: Juju is devops distilled - client
47 Through the use of charms, juju provides you with shareable, re-usable,
48 and repeatable expressions of devops best practices. You can use them
49
50=== modified file 'debian/rules'
51--- debian/rules 2014-08-20 15:00:12 +0000
52+++ debian/rules 2015-10-19 21:44:19 +0000
53@@ -3,11 +3,14 @@
54
55 # Uncomment this to turn on verbose mode.
56 #export DH_VERBOSE=1
57-export GOPATH:=$(CURDIR)
58-export PATH:=$(GOPATH)/bin:$(PATH)
59+# NOTE: debian/gocode/src will contain symlinks to system provided
60+# dev packages, which will be used over those in the upstream
61+# juju-core codebase.
62+export GOPATH:=$(CURDIR)/debian/gocode:$(CURDIR)
63+export PATH:=$(CURDIR)/bin:$(PATH)
64
65 PKGDIR:=debian/juju-core
66-VERSION:=$(shell sed -n 's/^const version = "\(.*\)"/\1/p' $(GOPATH)/src/github.com/juju/juju/version/version.go)
67+VERSION:=$(shell sed -n 's/^const version = "\(.*\)"/\1/p' $(CURDIR)/src/github.com/juju/juju/version/version.go)
68 ifeq ($(VERSION),)
69 $(error Invalid version constant in version.go)
70 endif
71@@ -19,7 +22,7 @@
72 endif
73
74 %:
75- dh $@
76+ dh $@ --with=golang
77
78 debian/juju-core.postinst: debian/juju-core.postinst.in
79 sed -e "s/__NEW_VERSION__/$(VERSION)/g" $< > $@
80@@ -39,13 +42,19 @@
81 JUJUD_FLAGS:= -gccgoflags -static-libgo
82 endif
83
84+# NOTE: ensure /usr/share/gocode is use in preference to any
85+# embedded source for dependencies.
86+override_dh_auto_configure:
87+ mkdir -p debian/gocode/src
88+ ln -s /usr/share/gocode/src/* debian/gocode/src
89+
90 override_dh_auto_install: debian/juju-core.postinst debian/juju-core.prerm debian/juju-core.lintian-overrides
91 go install $(COMMON_FLAGS) github.com/juju/juju/cmd/juju
92 go install $(COMMON_FLAGS) github.com/juju/juju/cmd/plugins/juju-metadata
93 go install $(COMMON_FLAGS) github.com/juju/juju/cmd/plugins/juju-restore
94 go install $(COMMON_FLAGS) $(JUJUD_FLAGS) github.com/juju/juju/cmd/jujud
95 mkdir -p debian/home
96- HOME=debian/home $(GOPATH)/src/github.com/juju/juju/scripts/generate-docs.py man -o juju.1
97+ HOME=debian/home $(CURDIR)/src/github.com/juju/juju/scripts/generate-docs.py man -o juju.1
98 dh_install bin/juju usr/lib/juju-$(VERSION)/bin
99 dh_install bin/juju-metadata usr/lib/juju-$(VERSION)/bin
100 dh_install bin/juju-restore usr/lib/juju-$(VERSION)/bin
101@@ -57,7 +66,7 @@
102
103 override_dh_auto_clean:
104 rm -rf debian/juju-core.prerm debian/juju-core.postinst debian/juju-core.lintian-overrides bin juju.1
105- rm -rf pkg bin /tmp/go-build* debian/home
106+ rm -rf pkg bin /tmp/go-build* debian/home debian/gocode
107 find . -name "*.pyc" -delete || :
108 dh_auto_clean
109

Subscribers

People subscribed via source and target branches

to all changes: