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
=== modified file 'debian/changelog'
--- debian/changelog 2014-04-07 22:04:28 +0000
+++ debian/changelog 2014-05-08 10:22:12 +0000
@@ -1,6 +1,5 @@
1nuntium (0.1-0ubuntu1) UNRELEASED; urgency=medium1nuntium (0.1-0ubuntu1) UNRELEASED; urgency=low
22
3 * Initial packaging. 3 * Initial packaging.
4 * MMS download implementation with telepathy-ofono signaling.
54
6 -- Sergio Schvezov <sergio.schvezov@canonical.com> Thu, 03 Apr 2014 15:01:24 -03005 -- Sergio Schvezov <sergio.schvezov@canonical.com> Thu, 03 Apr 2014 15:01:24 -0300
76
=== modified file 'debian/control'
--- debian/control 2014-04-03 19:25:14 +0000
+++ debian/control 2014-05-08 10:22:12 +0000
@@ -2,7 +2,14 @@
2Section: devel2Section: devel
3Priority: optional3Priority: optional
4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5Build-Depends: debhelper (>= 9), dh-golang, golang-go, golang-go-dbus-dev5Build-Depends:
6 debhelper (>= 9),
7 dh-golang,
8 gccgo,
9 gccgo-go,
10 golang-go-dbus-dev,
11 golang-go-xdg-dev,
12 golang-gocheck-dev,
6Standards-Version: 3.9.513Standards-Version: 3.9.5
7Homepage: https://launchpad.net/nuntium14Homepage: https://launchpad.net/nuntium
8Vcs-Browser: http://bazaar.launchpad.net/~phablet-team/nuntium/trunk/files15Vcs-Browser: http://bazaar.launchpad.net/~phablet-team/nuntium/trunk/files
916
=== removed file 'debian/nuntium-decode-cli.lintian-overrides'
--- debian/nuntium-decode-cli.lintian-overrides 2014-04-03 19:25:14 +0000
+++ debian/nuntium-decode-cli.lintian-overrides 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
1no-upstream-changelog
2binary-without-manpage usr/bin/nuntium-decode-cli
3hardening-no-relro usr/bin/nuntium-decode-cli
40
=== modified file 'debian/nuntium.conf'
--- debian/nuntium.conf 2014-04-15 00:23:50 +0000
+++ debian/nuntium.conf 2014-05-08 10:22:12 +0000
@@ -1,10 +1,6 @@
1description "nuntium service binds ofono and telepathy-ofono for MMS"1description "nuntium service binds ofono and telepathy-ofono for MMS"
22
3pre-start script3start on :sys:started JOB=ofono
4 /sbin/initctl --system status ofono|grep -q 'start/running' || exit 0
5end script
6
7start on started dbus or :sys:started JOB=ofono
8stop on :sys:stopping JOB=ofono4stop on :sys:stopping JOB=ofono
95
10exec nuntium6exec nuntium
117
=== removed file 'debian/nuntium.lintian-overrides'
--- debian/nuntium.lintian-overrides 2014-04-03 19:25:14 +0000
+++ debian/nuntium.lintian-overrides 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
1no-upstream-changelog
2binary-without-manpage usr/bin/nuntium
3hardening-no-relro usr/bin/nuntium
40
=== modified file 'debian/rules'
--- debian/rules 2014-04-03 19:25:14 +0000
+++ debian/rules 2014-05-08 10:22:12 +0000
@@ -5,13 +5,21 @@
5export DH_GOPKG := launchpad.net/nuntium5export DH_GOPKG := launchpad.net/nuntium
66
7%:7%:
8 dh $@ --buildsystem=golang --with=golang --fail-missing8 dh $@ \
9 --buildsystem=golang \
10 --with=golang \
11 --fail-missing
912
10override_dh_auto_install:13override_dh_auto_install:
11 dh_auto_install -O--buildsystem=golang14 dh_auto_install -O--buildsystem=golang
12 mv ${CURDIR}/debian/tmp/usr/bin/decode-cli \15 mv ${CURDIR}/debian/tmp/usr/bin/decode-cli \
13 ${CURDIR}/debian/tmp/usr/bin/nuntium-decode-cli 16 ${CURDIR}/debian/tmp/usr/bin/nuntium-decode-cli
14 rm -rf ${CURDIR}/debian/tmp/usr/share/gocode/src/launchpad.net/nuntium/udm17 rm -r \
15 rm -rf ${CURDIR}/debian/tmp/usr/share/gocode/src/launchpad.net/nuntium/test18 ${CURDIR}/debian/tmp/usr/bin/test \
16 rm ${CURDIR}/debian/tmp/usr/bin/test19 ${CURDIR}/debian/tmp/usr/share/gocode/src/$(DH_GOPKG)/udm \
17 rm ${CURDIR}/debian/tmp/usr/share/gocode/src/launchpad.net/nuntium/*.go20 ${CURDIR}/debian/tmp/usr/share/gocode/src/$(DH_GOPKG)/test \
21 ${CURDIR}/debian/tmp/usr/share/gocode/src/$(DH_GOPKG)/storage \
22 ${CURDIR}/debian/tmp/usr/share/gocode/src/$(DH_GOPKG)/*.go
23
24override_dh_strip:
25 echo "Skipping strip"
1826
=== modified file 'storage/storage.go'
--- storage/storage.go 2014-05-06 09:43:42 +0000
+++ storage/storage.go 2014-05-08 10:22:12 +0000
@@ -27,7 +27,7 @@
27 "os"27 "os"
28 "path"28 "path"
2929
30 "launchpad.net/go-xdg"30 "launchpad.net/go-xdg/v0"
31)31)
3232
33const SUBPATH = "nuntium/store"33const SUBPATH = "nuntium/store"

Subscribers

People subscribed via source and target branches