Merge lp://staging/~mwhudson/ubuntu/xenial/juju/use-dh-golang-proper into lp://staging/~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta6

Proposed by Michael Hudson-Doyle
Status: Merged
Approved by: Martin Packman
Approved revision: 129
Merged at revision: 121
Proposed branch: lp://staging/~mwhudson/ubuntu/xenial/juju/use-dh-golang-proper
Merge into: lp://staging/~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta6
Diff against target: 141 lines (+67/-23)
3 files modified
debian/control (+1/-0)
debian/helpers/setup-build-directory.py (+42/-0)
debian/rules (+24/-23)
To merge this branch: bzr merge lp://staging/~mwhudson/ubuntu/xenial/juju/use-dh-golang-proper
Reviewer Review Type Date Requested Status
Martin Packman (community) Approve
Review via email: mp+293966@code.staging.launchpad.net

Commit message

Convert to using dh-golang more conventionally.

Description of the change

As observed in https://bugs.launchpad.net/ubuntu/+source/juju-core/+bug/1578550 juju-core ftbfs in yakkety due to assumptions in dh_golang. This branch, therefore, arranges that the build tree looks much more like what dh_golang expects, via a terrifying perl script.

To post a comment you must log in.
121. By Michael Hudson-Doyle

Use dh_golang to build the package.

This fixes the ftbfs on yakkety.

dh_golang's "configure" step is replaced by a completely out of control perl script.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

One last comment for now: I could rewrite the perl script in python. I'm not sure how to do the Dpkg::Deps stuff in Python, I could always shell out to a perl one-liner from Python :-)

Revision history for this message
Martin Packman (gz) wrote :

Thanks Michael!

Some specific questions as inline comments, but the big thing to answer is do we want a juju-specific answer here or something generic that this distro can use for other go projects?

The current script is more terrifying than I imagined when we talked about the solution, but does seem to cover the edge cases well enough to be nearly reusable elsewhere. I think we could simplify it a fair by using dependencies.tsv from the github.com/juju/juju tree if we decide this is going to remain a juju-only packaging solution.

I think deb822 in python-debian does the dependency parsing bits we'd need, but I can live with perl.

Anyway, I'm down with trying this approach for juju out in yakkety, but think we need to point in out and ask for feedback from a wider audience of people who may care about how we do golang packaging.

review: Needs Information
122. By Michael Hudson-Doyle

use dependencies.tsv instead

123. By Michael Hudson-Doyle

review comments

124. By Michael Hudson-Doyle

kill the perl

125. By Michael Hudson-Doyle

fix so it actually works

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

> Thanks Michael!
>
> Some specific questions as inline comments, but the big thing to answer is do
> we want a juju-specific answer here or something generic that this distro can
> use for other go projects?
>
> The current script is more terrifying than I imagined when we talked about the
> solution,

:-)

> but does seem to cover the edge cases well enough to be nearly
> reusable elsewhere. I think we could simplify it a fair by using
> dependencies.tsv from the github.com/juju/juju tree if we decide this is going
> to remain a juju-only packaging solution.

Oh man, I forgot about that. That makes things so much easier that I've replaced that perl script with a simple Python script instead. (I can always get the perl out of branch history if I want it again).

My new Python has the issue that having extra packages installed might affect the build, but that's not new.

> I think deb822 in python-debian does the dependency parsing bits we'd need,
> but I can live with perl.
>
> Anyway, I'm down with trying this approach for juju out in yakkety, but think
> we need to point in out and ask for feedback from a wider audience of people
> who may care about how we do golang packaging.

I'll ask in Debian what they think about the general problem (although they'll probably just say "don't bundle dependencies"...)

Revision history for this message
Michael Hudson-Doyle (mwhudson) :
126. By Michael Hudson-Doyle

add comment

127. By Michael Hudson-Doyle

edit comment

128. By Michael Hudson-Doyle

finally tidying of comment

129. By Michael Hudson-Doyle

revert changelog, set DH_GOPKG as well for easier backporting to trusty

Revision history for this message
Martin Packman (gz) wrote :

Thanks for addressing all the comments! Lets go with this and do a new upload for yakkety.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches