Package Details: lxd 2.18-1

Git Clone URL: https://aur.archlinux.org/lxd.git (read-only)
Package Base: lxd
Description: REST API, command line tool and OpenStack integration plugin for LXC.
Upstream URL: https://github.com/lxc/lxd
Keywords: containers lxc lxd
Licenses: Apache
Conflicts: lxd-lts
Submitter: maikoool
Maintainer: maikoool
Last Packager: maikoool
Votes: 29
Popularity: 0.872021
First Submitted: 2016-02-29 11:23
Last Updated: 2017-10-16 16:44

Dependencies (10)

Required by (1)

Sources (7)

Pinned Comments

maikoool commented on 2016-09-01 14:08

If you encounter issues building the package, please ensure you are using the default go compiler from the Arch repositories.

Also ensure the GOPATH environment variable is not set before running makepkg.

Latest Comments

pancakes commented on 2017-10-19 11:31

Package lxd 2.18-1 fails to install with the error:

lxd: /usr/share/bash-completion/completions/lxc exists in filesystem

since https://git.archlinux.org/svntogit/community.git/commit/trunk?h=packages/lxc&id=5acfe0b83efbf2dcd8fe28880301aa2a96697de5

maikoool commented on 2017-10-16 16:44

@ronalde applied your fix, thx.

Also updated to 2.18

ronalde commented on 2017-10-16 06:46

This PKGBUILD builds 2.18 (but 2.17 as well by modifying pkgver and the checksum of the tarball).

Please update.
-------------------------------------------------------------------------------------------------

# Maintainer: Maikel Wever <maikelwever@gmail.com>
# Contributor: Benjamin Asbach <archlinux-aur.lxd@impl.it>

pkgname=lxd
pkgver=2.18
pkgrel=1
pkgdesc="REST API, command line tool and OpenStack integration plugin for LXC."
arch=('x86_64')
url="https://github.com/lxc/lxd"
license=('APACHE')
conflicts=('lxd-lts')
depends=('lxc' 'squashfs-tools' 'dnsmasq')
makedepends=('go' 'git')
options=('!strip' '!emptydirs')
optdepends=(
'lvm2: for lvm2 support'
'thin-provisioning-tools: for thin provisioning support'
'btrfs-progs: for btrfs support'
'linux-userns: kernel with CONFIG_USER_NS enabled'
'linux-lts-userns: LTS kernel with CONFIG_USER_NS enabled'
)
source=(
"https://github.com/lxc/$pkgname/archive/$pkgname-$pkgver.tar.gz"
"lxd.service"
"dnsmasq-lxd.conf"
"dnsmasq@lxd.service"
"lxd.netctl"
"dbus-dnsmasq-lxd.conf"
"networkmanager-dnsmasq-lxd.conf"
)

md5sums=(
'16ed2f943abe313eb315ecd4b3993220'
'5dde136f2fbcdf5773a011a39c82cfc6'
'b1fd16933c1b24aaa9ccc8f5a0e6478c'
'15ae1bc51684d611bded2839ca55a37b'
'52c641ea0ba5477f5c1a1b857c03dda9'
'c86b8c441ab014340186acc7799096f2'
'427926fddb1537f7a65d0a7274106df5'
)

build() {
export GOPATH="${srcdir}/go"
go_base=github.com/lxc/lxd
mkdir -p "${GOPATH}"
GOPATH="${GOPATH}" go get "${go_base}" || echo "(ignoring go error)"
cd "${GOPATH}/src/${go_base}"
make
}

package() {
go_bin_dir="${GOPATH}/bin"
install=lxd.install
mkdir -p "${pkgdir}/usr/bin"
mkdir -p "${pkgdir}/usr/lib/lxd"
mkdir -p "${pkgdir}/usr/share/bash-completion/completions"
install -p -m755 "${go_bin_dir}/"* "${pkgdir}/usr/bin"
# Package license (if available)
for f in LICENSE COPYING LICENSE.* COPYING.*; do
if [ -e "${go_bin_dir}/$f" ]; then
install -Dm644 "${go_bin_dir}/$f" \
"${pkgdir}/usr/share/licenses/${pkgname}/$f"
fi
done
install -D -m644 "${srcdir}/lxd.service" \
"${pkgdir}/usr/lib/systemd/system/lxd.service"
# Bash completions
install -p -m755 "${srcdir}/${pkgname}-${pkgname}-${pkgver}/config/bash/lxd-client" \
"${pkgdir}/usr/share/bash-completion/completions/lxc"
# Example configuration files
mkdir -p "${pkgdir}/usr/share/lxd/"
mkdir -p "${pkgdir}/usr/share/lxd/systemd/system/"
mkdir -p "${pkgdir}/usr/share/lxd/netctl/"
mkdir -p "${pkgdir}/usr/share/lxd/dbus-1/system.d/"
mkdir -p "${pkgdir}/usr/share/lxd/NetworkManager/dnsmasq.d/"
install -Dm644 "${srcdir}/dnsmasq-lxd.conf" \
"${pkgdir}/usr/share/lxd/dnsmasq-lxd.conf"
install -Dm644 "${srcdir}/dnsmasq@lxd.service" \
"${pkgdir}/usr/share/lxd/systemd/system/dnsmasq@lxd.service"
install -Dm644 "${srcdir}/lxd.netctl" \
"${pkgdir}/usr/share/lxd/netctl/lxd"
install -Dm644 "${srcdir}/dbus-dnsmasq-lxd.conf" \
"${pkgdir}/usr/share/lxd/dbus-1/system.d/dnsmasq-lxd.conf"
install -Dm644 "${srcdir}/networkmanager-dnsmasq-lxd.conf" \
"${pkgdir}/usr/share/lxd/NetworkManager/dnsmasq.d/lxd.conf"
}

# vim:set ts=2 sw=2 et:

Philzli commented on 2017-10-12 12:19

replace the log_posix.go file with [this](https://github.com/lxc/lxd/blob/201b2cd733263539c5c6db71887bfea936e15a44/shared/logging/log_posix.go) one if you're having issues.

bjornaru commented on 2017-10-12 08:46

Fails to build:

==> Making package: lxd 2.17-1 (Thu Oct 12 10:45:10 CEST 2017)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
go get -t -v -d ./...
github.com/gorilla/websocket (download)
Fetching https://gopkg.in/yaml.v2?go-get=1
Parsing meta tags from https://gopkg.in/yaml.v2?go-get=1 (status code 200)
get "gopkg.in/yaml.v2": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at https://gopkg.in/yaml.v2?go-get=1
gopkg.in/yaml.v2 (download)
github.com/gosexy/gettext (download)
Fetching https://gopkg.in/inconshreveable/log15.v2?go-get=1
Parsing meta tags from https://gopkg.in/inconshreveable/log15.v2?go-get=1 (status code 200)
get "gopkg.in/inconshreveable/log15.v2": found meta tag get.metaImport{Prefix:"gopkg.in/inconshreveable/log15.v2", VCS:"git", RepoRoot:"https://gopkg.in/inconshreveable/log15.v2"} at https://gopkg.in/inconshreveable/log15.v2?go-get=1
gopkg.in/inconshreveable/log15.v2 (download)
github.com/go-stack/stack (download)
github.com/inconshreveable/log15 (download)
github.com/mattn/go-colorable (download)
github.com/mattn/go-isatty (download)
Fetching https://gopkg.in/inconshreveable/log15.v2/term?go-get=1
Parsing meta tags from https://gopkg.in/inconshreveable/log15.v2/term?go-get=1 (status code 200)
get "gopkg.in/inconshreveable/log15.v2/term": found meta tag get.metaImport{Prefix:"gopkg.in/inconshreveable/log15.v2", VCS:"git", RepoRoot:"https://gopkg.in/inconshreveable/log15.v2"} at https://gopkg.in/inconshreveable/log15.v2/term?go-get=1
get "gopkg.in/inconshreveable/log15.v2/term": verifying non-authoritative meta tag
Fetching https://gopkg.in/inconshreveable/log15.v2?go-get=1
Parsing meta tags from https://gopkg.in/inconshreveable/log15.v2?go-get=1 (status code 200)
github.com/olekukonko/tablewriter (download)
github.com/mattn/go-runewidth (download)
Fetching https://golang.org/x/crypto/ssh/terminal?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ssh/terminal?go-get=1 (status code 200)
get "golang.org/x/crypto/ssh/terminal": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/ssh/terminal?go-get=1
get "golang.org/x/crypto/ssh/terminal": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
golang.org/x/crypto (download)
Fetching https://golang.org/x/sys/unix?go-get=1
Parsing meta tags from https://golang.org/x/sys/unix?go-get=1 (status code 200)
get "golang.org/x/sys/unix": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.org/x/sys/unix?go-get=1
get "golang.org/x/sys/unix": verifying non-authoritative meta tag
Fetching https://golang.org/x/sys?go-get=1
Parsing meta tags from https://golang.org/x/sys?go-get=1 (status code 200)
golang.org/x/sys (download)
github.com/stretchr/testify (download)
github.com/dustinkirkland/golang-petname (download)
github.com/golang/protobuf (download)
github.com/gorilla/mux (download)
github.com/mattn/go-sqlite3 (download)
Fetching https://golang.org/x/net/context?go-get=1
Parsing meta tags from https://golang.org/x/net/context?go-get=1 (status code 200)
get "golang.org/x/net/context": found meta tag get.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at https://golang.org/x/net/context?go-get=1
get "golang.org/x/net/context": verifying non-authoritative meta tag
Fetching https://golang.org/x/net?go-get=1
Parsing meta tags from https://golang.org/x/net?go-get=1 (status code 200)
golang.org/x/net (download)
github.com/pborman/uuid (download)
github.com/syndtr/gocapability (download)
Fetching https://gopkg.in/flosch/pongo2.v3?go-get=1
Parsing meta tags from https://gopkg.in/flosch/pongo2.v3?go-get=1 (status code 200)
get "gopkg.in/flosch/pongo2.v3": found meta tag get.metaImport{Prefix:"gopkg.in/flosch/pongo2.v3", VCS:"git", RepoRoot:"https://gopkg.in/flosch/pongo2.v3"} at https://gopkg.in/flosch/pongo2.v3?go-get=1
gopkg.in/flosch/pongo2.v3 (download)
Fetching https://gopkg.in/lxc/go-lxc.v2?go-get=1
Parsing meta tags from https://gopkg.in/lxc/go-lxc.v2?go-get=1 (status code 200)
get "gopkg.in/lxc/go-lxc.v2": found meta tag get.metaImport{Prefix:"gopkg.in/lxc/go-lxc.v2", VCS:"git", RepoRoot:"https://gopkg.in/lxc/go-lxc.v2"} at https://gopkg.in/lxc/go-lxc.v2?go-get=1
gopkg.in/lxc/go-lxc.v2 (download)
Fetching https://gopkg.in/tomb.v2?go-get=1
Parsing meta tags from https://gopkg.in/tomb.v2?go-get=1 (status code 200)
get "gopkg.in/tomb.v2": found meta tag get.metaImport{Prefix:"gopkg.in/tomb.v2", VCS:"git", RepoRoot:"https://gopkg.in/tomb.v2"} at https://gopkg.in/tomb.v2?go-get=1
gopkg.in/tomb.v2 (download)
go install -v -tags libsqlite3 ./...
github.com/lxc/lxd/shared/logger
github.com/lxc/lxd/shared/api
github.com/lxc/lxd/shared/ioprogress
github.com/lxc/lxd/shared/osarch
gopkg.in/yaml.v2
github.com/gorilla/websocket
github.com/lxc/lxd/shared/cancel
github.com/lxc/lxd/shared/gnuflag
github.com/gosexy/gettext
github.com/go-stack/stack
github.com/inconshreveable/log15/term
github.com/mattn/go-isatty
gopkg.in/inconshreveable/log15.v2/term
github.com/mattn/go-colorable
github.com/lxc/lxd/shared/version
github.com/mattn/go-runewidth
golang.org/x/sys/unix
gopkg.in/inconshreveable/log15.v2
github.com/dustinkirkland/golang-petname
github.com/golang/protobuf/proto
github.com/olekukonko/tablewriter
github.com/gorilla/mux
github.com/lxc/lxd/shared/logging
github.com/lxc/lxd/shared
# github.com/lxc/lxd/shared/logging
shared/logging/log_posix.go:16:27: not enough arguments in call to log15.Must.SyslogHandler
have (string, log15.Format)
want (syslog.Priority, string, log15.Format)
shared/logging/log_posix.go:20:32: not enough arguments in call to log15.Must.SyslogHandler
have (string, log15.Format)
want (syslog.Priority, string, log15.Format)
golang.org/x/net/context
github.com/mattn/go-sqlite3
golang.org/x/crypto/pbkdf2
golang.org/x/crypto/scrypt
github.com/pborman/uuid
github.com/syndtr/gocapability/capability
golang.org/x/crypto/ssh/terminal
gopkg.in/flosch/pongo2.v3
gopkg.in/lxc/go-lxc.v2
github.com/lxc/lxd/shared/i18n
gopkg.in/tomb.v2
github.com/lxc/lxd/test/deps
github.com/lxc/lxd/shared/simplestreams
github.com/lxc/lxd/shared/termios
github.com/lxc/lxd/fuidshift
github.com/lxc/lxd/lxd/types
github.com/lxc/lxd/lxd/util
github.com/lxc/lxd/shared/cmd
github.com/lxc/lxd/lxd/sys
github.com/lxc/lxd/client
github.com/lxc/lxd/lxd/state
github.com/lxc/lxd/lxc/config
github.com/lxc/lxd/test/lxd-benchmark
github.com/lxc/lxd/lxd/db
make: *** [Makefile:17: default] Error 2
==> ERROR: A failure occurred in build().
Aborting...
:: failed to build lxd package(s)


Ideas?

asbachb commented on 2017-09-05 09:49

I just wanted to mention that with "lxc network" there should be no need for manually managing the dnsmasq stuff since a dnsmasq process is started by lxd itself.
So this fix won't be needed for someone who is doing a new setup using lxd.

maikoool commented on 2017-09-04 14:11

Package has been updated.

Fix by @xphoenix has been applied. Thx @xphoenix!

xphoenix commented on 2017-08-29 12:05

> saknussemm commented on 2016-08-04 05:03
Its enable ability for systemd to udnerstand service is up by the fact someone start reply on the given dbus channel (Type=dbus in systemd unit). By turn it off service now is not activate

Current config doesn't work:
- systemd unit expect dnsmasq to appear on dbus line 'Type=dbus'
- however dnsmasq starts without knowledge about which dbus channel should be used
- current channel name can't be used as dnsmasq dbus client somehow doesn't like '-lxd' part of the name.

Fix:
- /usr/share/lxd/dbus-1/system.d/dnsmasq-lxd.conf:
%s#uk.org.thekelleys.dnsmasq-lxd#uk.org.thekelleys.dnsmasq.lxd#
- /usr/share/lxd/systemd/system/dnsmasq@lxd.service:
BusName=uk.org.thekelleys.dnsmasq.lxd
ExecStart=/usr/bin/dnsmasq -k -C /etc/dnsmasq-lxd.conf --user=dnsmasq --enable-dbus=uk.org.thekelleys.dnsmasq.lxd --pid-file

maikoool commented on 2017-04-14 11:28

@pulser done and updated to 2.12.

Thanks for the suggestion

pulser commented on 2017-04-14 10:08

The most recent version of Go appears to require the GOBIN env variable to be defined as well as GOPATH.

Replacing:

GOPATH="$srcdir" make

with

GOPATH="$srcdir" GOBIN="$srcdir"/bin make

within the PKGBUILD resolves this and builds the package successfully.

All comments