[lxc-users] lxd in Debian

Fajar A. Nugraha list at fajar.net
Tue Aug 23 11:06:42 UTC 2016


On Tue, Aug 23, 2016 at 4:59 PM, Micky Del Favero <micky at mesina.net> wrote:
> "Fajar A. Nugraha" <list at fajar.net> writes:
>
>> I'm confused.
>>
>> How did you managed to get it build, when the source from
>> http://packages.ubuntu.com/xenial-updates/lxd has
>>
>> Build-Depends: debhelper (>= 9),
> ...
>>                golang-petname-dev,
> ...
>> and https://packages.debian.org/petname returns zero result?
>
> I didn't use xenial sources, I've taken them from
> https://linuxcontainers.org/downloads/lxd/lxd-2.0.3.tar.gz (but I think
> there's no difference), in my debian/control (that I've took from an old
> ubuntu package) I've listed only few dependencies:
>
>   Build-Depends: debhelper (>= 9),
>                  dh-golang,
>                  dh-systemd,
>                  golang-go [i386 amd64 armhf],
>                  help2man,
>                  pkg-config,
>                  protobuf-compiler
>
> In LXD's Makefile (the one that coming with sources) there's:
>
>   GOPATH=$(shell pwd)/lxd-$(VERSION)/dist go get -t -v -d ./...
>
> so all golang dependencies needed to compile LXD will be downloaded and
> installed in dist directory, there's no need to install them system
> wide, so there's no need to put them in package dependencies.

Ah, thanks. That's what was missing.

Manually adding "go get -t -v -d ./..." in my spec file allows go to
download dependency. But now my build process takes forever as "git
clone https://gopkg.in/yaml.v2" takes forever (while github-based
packages, like github.com/gorilla/websocket, finish quickly). That's
probably one of the reasons why ubuntu and altlinux made their
control/spec require preinstalled go dependency: to greatly speed up
the build process.

Good to know that building lxd package for debian is a lot easier than
I originally thought.

-- 
Fajar


More information about the lxc-users mailing list