Merge lp:~free.ekanayaka/fake-juju/simpler-makefile into lp:~landscape/fake-juju/trunk-old

Proposed by Free Ekanayaka
Status: Merged
Merged at revision: 59
Proposed branch: lp:~free.ekanayaka/fake-juju/simpler-makefile
Merge into: lp:~landscape/fake-juju/trunk-old
Diff against target: 378 lines (+104/-145)
9 files modified
.bzrignore (+1/-0)
1.25.6/Makefile (+1/-0)
1.25.6/juju-core.patch (+6/-6)
2.0.0/Makefile (+1/-0)
2.0.0/juju-core.patch (+16/-16)
Makefile (+19/-121)
README (+2/-2)
common/makefile.mk (+57/-0)
debian/control (+1/-0)
To merge this branch: bzr merge lp:~free.ekanayaka/fake-juju/simpler-makefile
Reviewer Review Type Date Requested Status
🤖 Landscape Builder test results Approve
Alberto Donato (community) Approve
Review via email: mp+311923@code.launchpad.net

Description of the change

Simplify the logic of the top-level Makefile by extracting to a separate common/Makefile the bits that are version-specific.

The result is that both Makefile and common/Makefile should be now easier to read, there's some ~50 lines of saving (since there's no duplication anymore between single-version and multi-version targets) and you can use completion to build specific versions, e.g.:

make -C 2.<type tab> build

or you can just:

cd 2.<tab>
make

and work locally inside a version.

Patches are also inside the version directory instead of in a the separate patches/ tree (there are some mechanical changes because the diffs are now relative to the version directory).

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: Fail
Revno: 60
Branch: lp:~free.ekanayaka/fake-juju/simpler-makefile
Jenkins: https://ci.lscape.net/job/latch-test-xenial/1023/

review: Needs Fixing (test results)
61. By Free Ekanayaka

Fix target dependency

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: 61
Branch: lp:~free.ekanayaka/fake-juju/simpler-makefile
Jenkins: https://ci.lscape.net/job/latch-test-xenial/1024/

review: Approve (test results)
62. By Free Ekanayaka

Add missing dh-python build-dependency

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: 62
Branch: lp:~free.ekanayaka/fake-juju/simpler-makefile
Jenkins: https://ci.lscape.net/job/latch-test-xenial/1025/

review: Approve (test results)
Revision history for this message
Alberto Donato (ack) wrote :

+1 looks good.

As discussed on IRC, I'd replace the Makefile symlink with an explicit import (and perhaps rename common/Makefile to something like common/makefile.mk since it's not supposed to be called from common)
If in the future we'll need to extend the makefile for a version, we don't risk editing the common one.

Also, please update the README about "adding a new version" to reflect changes.

review: Approve
63. By Free Ekanayaka

Replace symlinks with actual files

Revision history for this message
Free Ekanayaka (free.ekanayaka) :
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

> +1 looks good.
>
> As discussed on IRC, I'd replace the Makefile symlink with an explicit import
> (and perhaps rename common/Makefile to something like common/makefile.mk since
> it's not supposed to be called from common)
> If in the future we'll need to extend the makefile for a version, we don't
> risk editing the common one.
>
> Also, please update the README about "adding a new version" to reflect
> changes.

Fixed.

64. By Free Ekanayaka

Address review comments

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: Fail
Revno: 63
Branch: lp:~free.ekanayaka/fake-juju/simpler-makefile
Jenkins: https://ci.lscape.net/job/latch-test-xenial/1026/

review: Needs Fixing (test results)
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: 64
Branch: lp:~free.ekanayaka/fake-juju/simpler-makefile
Jenkins: https://ci.lscape.net/job/latch-test-xenial/1027/

review: Approve (test results)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2015-09-22 02:46:32 +0000
3+++ .bzrignore 2016-11-28 14:11:25 +0000
4@@ -1,2 +1,3 @@
5 juju-core_*.tar.gz
6 */src
7+__pycache__
8
9=== added file '1.25.6/Makefile'
10--- 1.25.6/Makefile 1970-01-01 00:00:00 +0000
11+++ 1.25.6/Makefile 2016-11-28 14:11:25 +0000
12@@ -0,0 +1,1 @@
13+include ../common/makefile.mk
14
15=== renamed file 'patches/juju-core_1.25.6.patch' => '1.25.6/juju-core.patch'
16--- patches/juju-core_1.25.6.patch 2016-07-28 14:44:34 +0000
17+++ 1.25.6/juju-core.patch 2016-11-28 14:11:25 +0000
18@@ -1,5 +1,5 @@
19---- 1.25.6/src/github.com/juju/juju/testcharms/charm.go.orig 2015-06-24 12:02:02.746416146 +0200
20-+++ 1.25.6/src/github.com/juju/juju/testcharms/charm.go 2015-06-24 12:03:49.810418650 +0200
21+--- .unpatched-clean/src/github.com/juju/juju/testcharms/charm.go.orig 2015-06-24 12:02:02.746416146 +0200
22++++ src/github.com/juju/juju/testcharms/charm.go 2015-06-24 12:03:49.810418650 +0200
23 @@ -10,4 +10,6 @@
24 )
25
26@@ -9,8 +9,8 @@
27 +//var Repo = testing.NewRepo("charm-repo", "quantal")
28 +var Repo = &testing.Repo{}
29
30---- 1.25.6/src/github.com/juju/juju/provider/dummy/environs.go.orig 2015-07-06 15:01:14.200568258 +0200
31-+++ 1.25.6/src/github.com/juju/juju/provider/dummy/environs.go 2015-07-06 15:18:32.648549661 +0200
32+--- .unpatched-clean/src/github.com/juju/juju/provider/dummy/environs.go.orig 2015-07-06 15:01:14.200568258 +0200
33++++ src/github.com/juju/juju/provider/dummy/environs.go 2015-07-06 15:18:32.648549661 +0200
34 @@ -690,9 +690,9 @@
35
36 // PrecheckInstance is specified in the state.Prechecker interface.
37@@ -24,8 +24,8 @@
38 return nil
39 }
40
41---- 1.25.6/src/github.com/juju/juju/testing/cert.go 2016-03-18 09:25:34 +0000
42-+++ 1.25.6/src/github.com/juju/juju/testing/cert.go 2016-03-18 09:26:04 +0000
43+--- .unpatched-clean/src/github.com/juju/juju/testing/cert.go 2016-03-18 09:25:34 +0000
44++++ src/github.com/juju/juju/testing/cert.go 2016-03-18 09:26:04 +0000
45 @@ -52,7 +52,7 @@
46 }
47
48
49=== added file '2.0.0/Makefile'
50--- 2.0.0/Makefile 1970-01-01 00:00:00 +0000
51+++ 2.0.0/Makefile 2016-11-28 14:11:25 +0000
52@@ -0,0 +1,1 @@
53+include ../common/makefile.mk
54
55=== renamed file 'patches/juju-core_2.0.0.patch' => '2.0.0/juju-core.patch'
56--- patches/juju-core_2.0.0.patch 2016-11-21 14:18:56 +0000
57+++ 2.0.0/juju-core.patch 2016-11-28 14:11:25 +0000
58@@ -1,6 +1,6 @@
59-diff -U 3 -r --no-dereference ./2.0.0/.unpacked-clean/src/github.com/juju/juju/apiserver/charms.go ./2.0.0/src/github.com/juju/juju/apiserver/charms.go
60---- ./2.0.0/.unpacked-clean/src/github.com/juju/juju/apiserver/charms.go 2016-10-13 14:31:49.000000000 +0000
61-+++ ./2.0.0/src/github.com/juju/juju/apiserver/charms.go 2016-11-03 15:55:24.773085965 +0000
62+diff -U 3 -r --no-dereference ./.unpacked-clean/github.com/juju/juju/apiserver/charms.go ./src/github.com/juju/juju/apiserver/charms.go
63+--- ./.unpacked-clean/github.com/juju/juju/apiserver/charms.go 2016-10-13 14:31:49.000000000 +0000
64++++ ./src/github.com/juju/juju/apiserver/charms.go 2016-11-03 15:55:24.773085965 +0000
65 @@ -284,7 +284,8 @@
66 if isImporting, err := modelIsImporting(st); err != nil {
67 return nil, errors.Trace(err)
68@@ -11,10 +11,10 @@
69 }
70
71 // If a revision argument is provided, it takes precedence
72-Only in ./2.0.0/src/github.com/juju/juju/apiserver: charms.go~
73-diff -U 3 -r --no-dereference ./2.0.0/.unpacked-clean/src/github.com/juju/juju/provider/dummy/environs.go ./2.0.0/src/github.com/juju/juju/provider/dummy/environs.go
74---- ./2.0.0/.unpacked-clean/src/github.com/juju/juju/provider/dummy/environs.go 2016-10-13 14:31:49.000000000 +0000
75-+++ ./2.0.0/src/github.com/juju/juju/provider/dummy/environs.go 2016-11-03 13:52:34.827516374 +0000
76+Only in ./src/github.com/juju/juju/apiserver: charms.go~
77+diff -U 3 -r --no-dereference ./.unpacked-clean/github.com/juju/juju/provider/dummy/environs.go ./src/github.com/juju/juju/provider/dummy/environs.go
78+--- ./.unpacked-clean/github.com/juju/juju/provider/dummy/environs.go 2016-10-13 14:31:49.000000000 +0000
79++++ ./src/github.com/juju/juju/provider/dummy/environs.go 2016-11-03 13:52:34.827516374 +0000
80 @@ -643,9 +643,9 @@
81
82 // PrecheckInstance is specified in the state.Prechecker interface.
83@@ -28,9 +28,9 @@
84 return nil
85 }
86
87-diff -U 3 -r --no-dereference ./2.0.0/.unpacked-clean/src/github.com/juju/juju/testcharms/charm.go ./2.0.0/src/github.com/juju/juju/testcharms/charm.go
88---- ./2.0.0/.unpacked-clean/src/github.com/juju/juju/testcharms/charm.go 2016-10-13 14:31:49.000000000 +0000
89-+++ ./2.0.0/src/github.com/juju/juju/testcharms/charm.go 2016-11-03 13:52:34.827516374 +0000
90+diff -U 3 -r --no-dereference ./.unpacked-clean/github.com/juju/juju/testcharms/charm.go ./src/github.com/juju/juju/testcharms/charm.go
91+--- ./.unpacked-clean/github.com/juju/juju/testcharms/charm.go 2016-10-13 14:31:49.000000000 +0000
92++++ ./src/github.com/juju/juju/testcharms/charm.go 2016-11-03 13:52:34.827516374 +0000
93 @@ -17,7 +17,9 @@
94 )
95
96@@ -42,9 +42,9 @@
97
98 // UploadCharmWithMeta pushes a new charm to the charmstore.
99 // The uploaded charm takes the supplied charmURL with metadata.yaml and metrics.yaml
100-diff -U 3 -r --no-dereference ./2.0.0/.unpacked-clean/src/github.com/juju/juju/testing/cert.go ./2.0.0/src/github.com/juju/juju/testing/cert.go
101---- ./2.0.0/.unpacked-clean/src/github.com/juju/juju/testing/cert.go 2016-10-13 14:31:49.000000000 +0000
102-+++ ./2.0.0/src/github.com/juju/juju/testing/cert.go 2016-11-03 13:52:34.827516374 +0000
103+diff -U 3 -r --no-dereference ./.unpacked-clean/github.com/juju/juju/testing/cert.go ./src/github.com/juju/juju/testing/cert.go
104+--- ./.unpacked-clean/github.com/juju/juju/testing/cert.go 2016-10-13 14:31:49.000000000 +0000
105++++ ./src/github.com/juju/juju/testing/cert.go 2016-11-03 13:52:34.827516374 +0000
106 @@ -52,7 +52,7 @@
107 }
108
109@@ -63,9 +63,9 @@
110 var hostnames []string
111 srvCert, srvKey, err := cert.NewServer(CACert, CAKey, time.Now().AddDate(10, 0, 0), hostnames)
112 if err != nil {
113-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
114---- ./2.0.0/.unpacked-clean/src/gopkg.in/mgo.v2/bson/json.go 2016-10-13 09:32:16.000000000 -0500
115-+++ ./2.0.0/src/gopkg.in/mgo.v2/bson/json.go 2016-11-21 07:55:31.696036251 -0600
116+diff -U 3 -r --no-dereference ./.unpacked-clean/gopkg.in/mgo.v2/bson/json.go ./src/gopkg.in/mgo.v2/bson/json.go
117+--- ./.unpacked-clean/gopkg.in/mgo.v2/bson/json.go 2016-10-13 09:32:16.000000000 -0500
118++++ ./src/gopkg.in/mgo.v2/bson/json.go 2016-11-21 07:55:31.696036251 -0600
119 @@ -317,7 +317,8 @@
120 func jencInt(v interface{}) ([]byte, error) {
121 n := v.(int)
122
123=== modified file 'Makefile'
124--- Makefile 2016-11-28 07:08:52 +0000
125+++ Makefile 2016-11-28 14:11:25 +0000
126@@ -1,140 +1,38 @@
127-
128-ifdef JUJU_VERSIONS
129-# If someone explicitly set JUJU_VERSIONS then we ignore JUJU_VERSION.
130-JUJU_VERSION =
131-endif
132-
133-
134-ifdef JUJU_VERSION #############################
135-# for one version
136-
137-GO_VERSION = 1.6
138-JUJU_TARBALL = juju-core_$(JUJU_VERSION).tar.gz
139-JUJU_PATCH = patches/juju-core_$(JUJU_VERSION).patch
140-GO_PATH = $(JUJU_VERSION)
141-JUJU_SRC = $(GO_PATH)/src
142-JUJU_UNPACKED_CLEAN = $(JUJU_VERSION)/.unpacked-clean
143-INSTALLDIR = $(DESTDIR)/usr/bin
144-INSTALLED = $(INSTALLDIR)/fake-juju-$(JUJU_VERSION)
145-
146-$(JUJU_VERSION)/$(JUJU_VERSION): $(JUJU_VERSION)/fake-juju.go $(JUJU_PATCH)
147- case $(JUJU_VERSION) in \
148- 1.*) $(MAKE) build-common PATH=$$PATH JUJU_VERSION=$(JUJU_VERSION) ;;\
149- 2.*) $(MAKE) build-common PATH=/usr/lib/go-$(GO_VERSION)/bin:$$PATH JUJU_VERSION=$(JUJU_VERSION) ;;\
150- esac
151-
152-juju-core_%.tar.gz:
153- case $* in \
154- 1.*) PROJECT="juju-core" ;;\
155- 2.*) PROJECT="juju" ;;\
156- esac;\
157- wget https://launchpad.net/$$PROJECT/$(shell (echo $* | cut -f 1 -d - | cut -f 1,2 -d .))/$*/+download/$@
158-
159-$(JUJU_UNPACKED_CLEAN): $(JUJU_TARBALL)
160- mkdir -p $(JUJU_UNPACKED_CLEAN)
161- tar -C $(JUJU_UNPACKED_CLEAN) --strip=1 -z -xf $(JUJU_TARBALL)
162-
163-.PHONY: update-patch
164-update-patch: $(JUJU_SRC) $(JUJU_UNPACKED_CLEAN)
165- diff -U 3 -r --no-dereference ./$(JUJU_UNPACKED_CLEAN)/src ./$(JUJU_SRC) > $(JUJU_PATCH); \
166- echo " -- diff exited with $$? --"
167- rm -rf $(JUJU_UNPACKED_CLEAN)
168-
169-.PHONY: build
170-build: $(JUJU_VERSION)/$(JUJU_VERSION)
171-
172-.PHONY: build-common
173-build-common: $(JUJU_TARBALL) $(JUJU_PATCH)
174- rm -rf $(JUJU_SRC) # Go doesn't play nice with existing files.
175- tar -C $(JUJU_VERSION) --strip=1 -z -xf $(JUJU_TARBALL)
176- patch -p0 < $(JUJU_PATCH)
177- cd $(JUJU_VERSION) && GOPATH=$(shell pwd)/$(GO_PATH) PATH=$(PATH) go build
178-
179-.PHONY: install
180-install: $(JUJU_VERSION)/$(JUJU_VERSION)
181- install -D $(JUJU_VERSION)/$(JUJU_VERSION) $(INSTALLED)
182-
183-.PHONY: install-dev
184-install-dev: $(JUJU_VERSION)/$(JUJU_VERSION)
185- mkdir -p $(INSTALLDIR)
186- ln -s --backup=existing --suffix .orig $(shell pwd)/$(JUJU_VERSION)/$(JUJU_VERSION) $(INSTALLED)
187-
188-.PHONY: clean
189-clean:
190- rm -f $(JUJU_TARBALL)
191- rm -rf $(JUJU_SRC)
192- rm -f $(JUJU_VERSION)/$(JUJU_VERSION)
193- rm -rf _trial_temp
194-
195-.PHONY: test
196-test: $(JUJU_VERSION)/$(JUJU_VERSION) py-test
197- env JUJU_VERSION=$(JUJU_VERSION) python3 -m unittest tests.test_fake
198-
199-
200-else ###########################################
201-# for all versions
202-
203-ifndef JUJU_VERSIONS
204-JUJU1_VERSIONS = 1.25.6
205-JUJU2_VERSIONS = 2.0.0
206-JUJU_VERSIONS = $(JUJU1_VERSIONS) $(JUJU2_VERSIONS)
207-endif
208-BUILT_VERSIONS = $(foreach version,$(JUJU_VERSIONS),$(version)/$(version))
209-
210-$(BUILT_VERSIONS):
211- for VERSION in $(JUJU_VERSIONS); do \
212- $(MAKE) build JUJU_VERSION=$$VERSION; \
213- done
214-
215-.PHONY: update-patch
216-update-patch:
217- for VERSION in $(JUJU_VERSIONS); do \
218- $(MAKE) update-patch JUJU_VERSION=$$VERSION; \
219- done
220-
221-.PHONY: build
222-build: $(BUILT_VERSIONS)
223+JUJU_VERSIONS = 1.25.6 2.0.0
224+
225+JUJUCLIENT_DOWNLOADS = $(shell pwd)/tests/jujuclient-archive
226+JUJUCLIENT_REQ = $(JUJUCLIENT_DOWNLOADS)/requirements
227+
228+PYTHON = python
229+
230+.PHONY: build
231+build:
232+ for VERSION in $(JUJU_VERSIONS); do \
233+ $(MAKE) -C $$VERSION build; \
234+ done
235
236 .PHONY: install
237 install:
238 for VERSION in $(JUJU_VERSIONS); do \
239- $(MAKE) install JUJU_VERSION=$$VERSION; \
240- done
241-
242-.PHONY: install-dev
243-install-dev:
244- for VERSION in $(JUJU_VERSIONS); do \
245- $(MAKE) install-dev JUJU_VERSION=$$VERSION; \
246+ $(MAKE) -C $$VERSION install; \
247 done
248
249 .PHONY: clean
250 clean:
251 for VERSION in $(JUJU_VERSIONS) ; do \
252- $(MAKE) clean JUJU_VERSION=$$VERSION; \
253+ $(MAKE) -C $$VERSION clean; \
254 done
255
256-.PHONY: test
257-# Use xargs here so that we don't throw away the return codes, and correctly fail if any of the tests fail
258-test: $(BUILT_VERSIONS)
259- #@echo -n $(JUJU_VERSIONS) | xargs -t -d' ' -I {} env JUJU_VERSION={} python3 -m unittest tests.test_fake
260- @echo -n $(JUJU_VERSIONS) | xargs -t -d' ' -I {} $(MAKE) test JUJU_VERSION={}
261-
262-
263-endif ##########################################
264-
265-PYTHON = python
266+.PHONY: test py-test
267+test: build
268+ # Use xargs here so that we don't throw away the return codes, and
269+ # correctly fail if any of the tests fail
270+ @echo -n $(JUJU_VERSIONS) | xargs -t -d' ' -I {} $(MAKE) -C {} test JUJU_VERSION={}
271
272 .PHONY: py-test
273 py-test:
274 $(PYTHON) -m unittest discover -t python -s python/fakejuju
275
276-
277-#################################################
278-# other targets
279-
280-JUJUCLIENT_DOWNLOADS = $(shell pwd)/tests/jujuclient-archive
281-JUJUCLIENT_REQ = $(JUJUCLIENT_DOWNLOADS)/requirements
282-
283 .PHONY: ci-test
284 ci-test:
285 sudo apt-get -y install --force-yes \
286
287=== modified file 'README'
288--- README 2016-11-18 12:49:28 +0000
289+++ README 2016-11-28 14:11:25 +0000
290@@ -8,8 +8,8 @@
291 ---------------------
292
293 1) Edit the Makefile and add the desired version on the very first line.
294-2) Create a new version subdirectory, copy fake_juju.go there.
295-3) Make sure there is a corresponding .patch file in the patches/ subdirectory.
296+2) Create a new version subdirectory, copy fake_juju.go and other files
297+ there (e.g. Makefile and juju-core.patch)
298
299 Dependencies
300 ------------
301
302=== added directory 'common'
303=== added file 'common/makefile.mk'
304--- common/makefile.mk 1970-01-01 00:00:00 +0000
305+++ common/makefile.mk 2016-11-28 14:11:25 +0000
306@@ -0,0 +1,57 @@
307+GO_VERSION = 1.6
308+GO_PATH = $(CURDIR)
309+
310+JUJU_VERSION = $(shell basename $(CURDIR))
311+JUJU_MAJOR = $(shell echo $(JUJU_VERSION) | cut -f1 -d.)
312+JUJU_MAJOR_MINOR = $(shell (echo $(JUJU_VERSION) | cut -f 1,2 -d .))
313+JUJU_PATCH = juju-core.patch
314+JUJU_SRC = $(GO_PATH)/src
315+JUJU_UNPACKED_CLEAN = $(GO_PATH)/.unpacked-clean
316+JUJU_INSTALLDIR = $(DESTDIR)/usr/bin
317+JUJU_INSTALLED = $(JUJU_INSTALLDIR)/fake-juju-$(JUJU_VERSION)
318+
319+ifeq (1, $(JUJU_MAJOR))
320+ JUJU_PROJECT=juju-core
321+else
322+ JUJU_PROJECT=juju
323+endif
324+
325+JUJU_TARBALL = juju-core_$(JUJU_VERSION).tar.gz
326+JUJU_TARBALL_URL=https://launchpad.net/$(JUJU_PROJECT)/$(JUJU_MAJOR_MINOR)/$(JUJU_VERSION)/+download/$(JUJU_TARBALL)
327+
328+.PHONY: build
329+build: $(JUJU_TARBALL) $(JUJU_PATCH)
330+ rm -rf $(JUJU_SRC) # Go doesn't play nice with existing files.
331+ tar --strip=1 -z -xf $(JUJU_TARBALL)
332+ patch -p0 < $(JUJU_PATCH)
333+ GOPATH=$(GO_PATH) PATH=$(PATH) go build
334+
335+.PHONY: test
336+test: $(JUJU_VERSION)
337+ cd .. && JUJU_VERSION=$(JUJU_VERSION) python3 -m unittest tests.test_fake
338+
339+.PHONY: install
340+install: $(JUJU_VERSION)
341+ install -D $(JUJU_VERSION) $(JUJU_INSTALLED)
342+
343+.PHONY: clean
344+clean:
345+ rm -f $(JUJU_TARBALL)
346+ rm -rf $(JUJU_SRC)
347+ rm -f $(JUJU_VERSION)
348+
349+.PHONY: update-patch
350+update-patch: $(JUJU_SRC) $(JUJU_UNPACKED_CLEAN)
351+ diff -U 3 -r --no-dereference $(JUJU_UNPACKED_CLEAN) $(JUJU_SRC) > $(JUJU_PATCH); \
352+ echo " -- diff exited with $$? --"
353+ rm -rf $(JUJU_UNPACKED_CLEAN)
354+
355+$(JUJU_TARBALL):
356+ wget $(JUJU_TARBALL_URL)
357+
358+$(JUJU_UNPACKED_CLEAN): $(JUJU_TARBALL)
359+ mkdir -p $(JUJU_UNPACKED_CLEAN)
360+ tar -C $(JUJU_UNPACKED_CLEAN) --strip=2 -z -xf $(JUJU_TARBALL)
361+
362+$(JUJU_VERSION):
363+ GOPATH=$(GO_PATH) PATH=$(PATH) go build
364
365=== modified file 'debian/control'
366--- debian/control 2016-10-24 20:38:25 +0000
367+++ debian/control 2016-11-28 14:11:25 +0000
368@@ -4,6 +4,7 @@
369 Priority: optional
370 Standards-Version: 3.9.2
371 Build-Depends: debhelper (>= 9),
372+ dh-python,
373 golang,
374 golang-1.6,
375 python-all (>= 2.6.6-3),
376
377=== removed directory 'patches'
378=== removed directory 'patches/src'

Subscribers

People subscribed via source and target branches

to all changes: