Merge lp:~sergiusens/nuntium/packaging_fixes into lp:nuntium

Proposed by Sergio Schvezov
Status: Merged
Merged at revision: 32
Proposed branch: lp:~sergiusens/nuntium/packaging_fixes
Merge into: lp:nuntium
Diff against target: 107 lines (+24/-20)
7 files modified
debian/changelog (+1/-2)
debian/control (+8/-1)
debian/nuntium-decode-cli.lintian-overrides (+0/-3)
debian/nuntium.conf (+1/-5)
debian/nuntium.lintian-overrides (+0/-3)
debian/rules (+13/-5)
storage/storage.go (+1/-1)
To merge this branch: bzr merge lp:~sergiusens/nuntium/packaging_fixes
Reviewer Review Type Date Requested Status
Matthias Klose Approve
Ubuntu Phablet Team Pending
Review via email: mp+218693@code.launchpad.net

Commit message

Packaging fixes:
- using gccgo
- removed lintian overrides
- fixed upstart script
- updating the package dependencies to reflect the latest trunk (golang-go-xdg-dev & golang-gocheck-dev)

Description of the change

Please note that I would of used dh-golang completely but the build part uses go install and that doesn't play nice with the -compiler gccgo switch

Also to take into account (I plan to test in detail later today):
go test -compiler gccgo
OK: 3 passed
PASS
ok _/home/sergiusens/source/golang/nuntium/packaging_fixes/mms 0.021s
sergiusens@rivendell:~/projects/go/src/launchpad.net/nuntium/mms$ go test
OK: 3 passed
PASS
ok _/home/sergiusens/source/golang/nuntium/packaging_fixes/mms 0.003s

I do get smaller binaries though :-)

I plan to work on dh-golang to figure out a way to use gccgo transparently as well

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

[...]
+Build-Depends:
+ debhelper (>= 9),
+ dh-golang,
+ gccgo,
+ gccgo-go,
[...]
+override_dh_auto_build:
+ cd $(BUILDDIR); \
+ export GOPATH=$(BUILDDIR); \
+ go build -compiler=gccgo -v $(DH_GOPKG); \
+ go build -compiler=gccgo -v $(DH_GOPKG)/mms/decode-cli;
+

The intention here appears to be to make sure we're using the gccgo implementation of the 'go' tool. In that case, it should be invoked explicitly as 'gccgo-go' rather than as 'go', to ensure that this is the implementation being used. If it doesn't actually matter which implementation we use, then the build-dep should be on 'gccgo-go | golang-go'.

The extensive override of dh_auto_build is interesting, I think this points to toolchain deficiencies in dh_golang that this can't be done more directly. FWIW, the dh_golang implementation of the go target does:

    $this->doit_in_builddir("go", "install", "-v", @_, "$ENV{DH_GOPKG}/...");

so this isn't even calling the same subcommand (build vs. install). You might want to at least call 'install' for consistency, if possible, even though that seems a strange thing to do in the 'build' target.

[...]
+ golang-go-xdg-dev,
[...]

Strange that changing the compiler resulted in a new build-dependency?

Revision history for this message
Steve Langasek (vorlon) wrote :

+ go test -compiler=gccgo -v $(DH_GOPKG)/...

I also get a build failure here, with the same error as when trying to use dh_auto_build:

src/launchpad.net/nuntium/storage/storage.go:30:2: no buildable Go source files in /tmp/build-area/nuntium-0.1/obj-x86_64-linux-gnu/src/launchpad.net/go-xdg

Did you actually have this working, or were you building with DEB_BUILD_OPTIONS=nocheck?

Revision history for this message
Matthias Klose (doko) wrote :

only commenting on the go changes, these look ok, although the extra added golang-go-xdg-dev b-d is not mentioned.

review: Approve
Revision history for this message
Steve Langasek (vorlon) wrote :

any which way I slice it (even if using DEB_BUILD_OPTIONS=nocheck), I can't get the dh_auto_test target to pass.

33. By Sergio Schvezov

Adding missing package dependency for testing

34. By Sergio Schvezov

Using the packaged path for go-xdg

35. By Sergio Schvezov

Reverting back to using mostly dh_golang

There are no issues in a clean environment to build the packge. Using bzr bd to build in an existing environment proved to use gc's go tool and that failed to actually build correctly

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

> [...]
> +Build-Depends:
> + debhelper (>= 9),
> + dh-golang,
> + gccgo,
> + gccgo-go,
> [...]
> +override_dh_auto_build:
> + cd $(BUILDDIR); \
> + export GOPATH=$(BUILDDIR); \
> + go build -compiler=gccgo -v $(DH_GOPKG); \
> + go build -compiler=gccgo -v $(DH_GOPKG)/mms/decode-cli;
> +
>
> The intention here appears to be to make sure we're using the gccgo
> implementation of the 'go' tool. In that case, it should be invoked
> explicitly as 'gccgo-go' rather than as 'go', to ensure that this is the
> implementation being used. If it doesn't actually matter which implementation
> we use, then the build-dep should be on 'gccgo-go | golang-go'.
>
> The extensive override of dh_auto_build is interesting, I think this points to
> toolchain deficiencies in dh_golang that this can't be done more directly.
> FWIW, the dh_golang implementation of the go target does:
>
> $this->doit_in_builddir("go", "install", "-v", @_, "$ENV{DH_GOPKG}/...");
>
> so this isn't even calling the same subcommand (build vs. install). You might
> want to at least call 'install' for consistency, if possible, even though that
> seems a strange thing to do in the 'build' target.

install just calls build as it's dependency, I guess it's just taking shortcuts

I seem to have noticed now that I have failed to see that when using bzr bd I was using gc go and when building in a clean env gcc-go is used and does the right thing

I can't call go install -compiler gccgo $(DH_GOPKG) as I get this result:

gccgo: error: $WORK/launchpad.net/go-dbus/libv1.a: No such file or directory
gccgo: error: $WORK/launchpad.net/nuntium/libudm.a: No such file or directory
gccgo: error: $WORK/launchpad.net/nuntium/libmms.a: No such file or directory
gccgo: error: $WORK/launchpad.net/nuntium/libofono.a: No such file or directory
gccgo: error: $WORK/launchpad.net/go-xdg/libv0.a: No such file or directory
gccgo: error: $WORK/launchpad.net/nuntium/libstorage.a: No such file or directory
gccgo: error: $WORK/launchpad.net/nuntium/libtelepathy.a: No such file or directory

This happens since I had my alternatives set to gc go, but setting the alternatives to gccgo-go or calling it directly actually works :-/

In theory I could use gccgo-go | golang-go, but that would need to be matched with the compiler as well.

>
> [...]
> + golang-go-xdg-dev,
> [...]
> Strange that changing the compiler resulted in a new build-dependency?

It's just because during the initial packaging and today's trunk, trunk added more so it's a packaging update (I've reflected this in the commit message now)

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

> any which way I slice it (even if using DEB_BUILD_OPTIONS=nocheck), I can't
> get the dh_auto_test target to pass.

I have no idea how it worked before, but it honestly did (even a schroot). Anyways, the fix to this was to use the correct packaged import path for the packaged go package's path

fwiw, calling bzr bd -S && sbuild -A -d utopic-amd64 ../*.dsc results in
┌──────────────────────────────────────────────────────────────────────────────┐
│ Summary │
└──────────────────────────────────────────────────────────────────────────────┘

Build Architecture: amd64
Build-Space: 7692
Build-Time: 14
Distribution: utopic-amd64
Host Architecture: amd64
Install-Time: 57
Job: ../nuntium_0.1-0ubuntu1.dsc
Machine Architecture: amd64
Package: nuntium
Package-Time: 104
Source-Version: 0.1-0ubuntu1
Space: 7692
Status: successful
Version: 0.1-0ubuntu1

36. By Sergio Schvezov

Skip the stripping phase we are using gccgo

Running dh_strip causes:
no debug info in ELF executable errno -1
fatal error: no debug info in ELF executable

runtime stack:
no debug info in ELF executable errno -1
panic during panic

37. By Sergio Schvezov

Cleaning up the changelog

The removed entry is from a changeset when trying to override the citrain's changelog generation. It shouldn't have been merged.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

As the package is I can use it; I built it in a PPA, pushed it to my device and get what I expect.

Revision history for this message
Steve Langasek (vorlon) wrote :

+1 for the latest revisions.

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 2014-04-07 22:04:28 +0000
3+++ debian/changelog 2014-05-08 10:22:12 +0000
4@@ -1,6 +1,5 @@
5-nuntium (0.1-0ubuntu1) UNRELEASED; urgency=medium
6+nuntium (0.1-0ubuntu1) UNRELEASED; urgency=low
7
8 * Initial packaging.
9- * MMS download implementation with telepathy-ofono signaling.
10
11 -- Sergio Schvezov <sergio.schvezov@canonical.com> Thu, 03 Apr 2014 15:01:24 -0300
12
13=== modified file 'debian/control'
14--- debian/control 2014-04-03 19:25:14 +0000
15+++ debian/control 2014-05-08 10:22:12 +0000
16@@ -2,7 +2,14 @@
17 Section: devel
18 Priority: optional
19 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
20-Build-Depends: debhelper (>= 9), dh-golang, golang-go, golang-go-dbus-dev
21+Build-Depends:
22+ debhelper (>= 9),
23+ dh-golang,
24+ gccgo,
25+ gccgo-go,
26+ golang-go-dbus-dev,
27+ golang-go-xdg-dev,
28+ golang-gocheck-dev,
29 Standards-Version: 3.9.5
30 Homepage: https://launchpad.net/nuntium
31 Vcs-Browser: http://bazaar.launchpad.net/~phablet-team/nuntium/trunk/files
32
33=== removed file 'debian/nuntium-decode-cli.lintian-overrides'
34--- debian/nuntium-decode-cli.lintian-overrides 2014-04-03 19:25:14 +0000
35+++ debian/nuntium-decode-cli.lintian-overrides 1970-01-01 00:00:00 +0000
36@@ -1,3 +0,0 @@
37-no-upstream-changelog
38-binary-without-manpage usr/bin/nuntium-decode-cli
39-hardening-no-relro usr/bin/nuntium-decode-cli
40
41=== modified file 'debian/nuntium.conf'
42--- debian/nuntium.conf 2014-04-15 00:23:50 +0000
43+++ debian/nuntium.conf 2014-05-08 10:22:12 +0000
44@@ -1,10 +1,6 @@
45 description "nuntium service binds ofono and telepathy-ofono for MMS"
46
47-pre-start script
48- /sbin/initctl --system status ofono|grep -q 'start/running' || exit 0
49-end script
50-
51-start on started dbus or :sys:started JOB=ofono
52+start on :sys:started JOB=ofono
53 stop on :sys:stopping JOB=ofono
54
55 exec nuntium
56
57=== removed file 'debian/nuntium.lintian-overrides'
58--- debian/nuntium.lintian-overrides 2014-04-03 19:25:14 +0000
59+++ debian/nuntium.lintian-overrides 1970-01-01 00:00:00 +0000
60@@ -1,3 +0,0 @@
61-no-upstream-changelog
62-binary-without-manpage usr/bin/nuntium
63-hardening-no-relro usr/bin/nuntium
64
65=== modified file 'debian/rules'
66--- debian/rules 2014-04-03 19:25:14 +0000
67+++ debian/rules 2014-05-08 10:22:12 +0000
68@@ -5,13 +5,21 @@
69 export DH_GOPKG := launchpad.net/nuntium
70
71 %:
72- dh $@ --buildsystem=golang --with=golang --fail-missing
73+ dh $@ \
74+ --buildsystem=golang \
75+ --with=golang \
76+ --fail-missing
77
78 override_dh_auto_install:
79 dh_auto_install -O--buildsystem=golang
80 mv ${CURDIR}/debian/tmp/usr/bin/decode-cli \
81 ${CURDIR}/debian/tmp/usr/bin/nuntium-decode-cli
82- rm -rf ${CURDIR}/debian/tmp/usr/share/gocode/src/launchpad.net/nuntium/udm
83- rm -rf ${CURDIR}/debian/tmp/usr/share/gocode/src/launchpad.net/nuntium/test
84- rm ${CURDIR}/debian/tmp/usr/bin/test
85- rm ${CURDIR}/debian/tmp/usr/share/gocode/src/launchpad.net/nuntium/*.go
86+ rm -r \
87+ ${CURDIR}/debian/tmp/usr/bin/test \
88+ ${CURDIR}/debian/tmp/usr/share/gocode/src/$(DH_GOPKG)/udm \
89+ ${CURDIR}/debian/tmp/usr/share/gocode/src/$(DH_GOPKG)/test \
90+ ${CURDIR}/debian/tmp/usr/share/gocode/src/$(DH_GOPKG)/storage \
91+ ${CURDIR}/debian/tmp/usr/share/gocode/src/$(DH_GOPKG)/*.go
92+
93+override_dh_strip:
94+ echo "Skipping strip"
95
96=== modified file 'storage/storage.go'
97--- storage/storage.go 2014-05-06 09:43:42 +0000
98+++ storage/storage.go 2014-05-08 10:22:12 +0000
99@@ -27,7 +27,7 @@
100 "os"
101 "path"
102
103- "launchpad.net/go-xdg"
104+ "launchpad.net/go-xdg/v0"
105 )
106
107 const SUBPATH = "nuntium/store"

Subscribers

People subscribed via source and target branches