diff --git a/srcpkgs/lxd-lts/INSTALL.msg b/srcpkgs/lxd-lts/INSTALL.msg index 966174f8132..5958c900881 100755 --- a/srcpkgs/lxd-lts/INSTALL.msg +++ b/srcpkgs/lxd-lts/INSTALL.msg @@ -1,6 +1,6 @@ Start lxd service: - $ sudo ln -s /etc/sv/lxd /var/service + $ sudo ln -s /etc/sv/lxd /var/service/ Run LXD initialization: diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run index 147eb64e74d..a32a2438937 100755 --- a/srcpkgs/lxd-lts/files/lxd/run +++ b/srcpkgs/lxd-lts/files/lxd/run @@ -6,4 +6,6 @@ fi if ! mountpoint -q "${_systemd_cgrp}"; then mount -t cgroup -o none,name=systemd cgroup ${_systemd_cgrp} fi -exec lxd --group lxd 2>&1 + +[ -r conf ] && . ./conf +exec lxd --group lxd ${OPTS:- --verbose} diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template index 42e8a958093..5f0f450e5c3 100644 --- a/srcpkgs/lxd-lts/template +++ b/srcpkgs/lxd-lts/template @@ -1,36 +1,38 @@ # Template file for 'lxd-lts' pkgname=lxd-lts -version=4.0.4 +version=5.0.0 revision=1 wrksrc="lxd-$version" build_style=go -go_import_path="github.com/lxc/lxd" -go_build_tags="libsqlite3" -go_package="${go_import_path}/lxd ${go_import_path}/lxc - ${go_import_path}/lxd-p2c ${go_import_path}/fuidshift" -hostmakedepends="pkg-config" +go_import_path=github.com/lxc/lxd +go_build_tags=libsqlite3 +go_package="${go_import_path}/lxd + ${go_import_path}/lxc + ${go_import_path}/lxc-to-lxd + ${go_import_path}/fuidshift + ${go_import_path}/lxd-benchmark + ${go_import_path}/lxd-user" +hostmakedepends="pkg-config git" makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel" -depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables" +depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs" short_desc="Next generation system container manager (long term support channel)" maintainer="Cameron Nemo " license="Apache-2.0" homepage="https://linuxcontainers.org/lxd" -distfiles="https://linuxcontainers.org/downloads/lxd/${wrksrc}.tar.gz" -checksum=372a666b84c7cbcb7ccbffbf4aa04a05b2fe22e5e0aafa022b700bbf211557f6 +changelog="https://github.com/lxc/lxd/releases" +distfiles="https://linuxcontainers.org/downloads/lxd/lxd-${version}.tar.gz" +checksum=a99b7edfb52c8195b2de4988844d32d73be6426f6cff28408250517b238fdef9 conflicts="lxd" provides="lxd-${version}_${revision}" system_groups="lxd" -do_configure() { - # the LXD tarball packages up the required dependencies - ln -s "$wrksrc/_dist" "$GOPATH" -} +# whitelist dqlite LDFLAGS +export CGO_LDFLAGS_ALLOW='-Wl,-z,now' -do_build() { - # don't go-get the dependencies, just install with what's there - cd "$GOSRCPATH" - go_package=${go_package:-$go_import_path} - go install -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package} +post_build() { + # these need special tags and/or LDFLAGS + CGO_LDFLAGS="$CGO_LDFLAGS -static" go install -p "$XBPS_MAKEJOBS" -mod=vendor -x -tags "agent" -ldflags "${go_ldflags}" "${go_import_path}/lxd-agent" + go install -p "$XBPS_MAKEJOBS" -mod=vendor -x -tags "netgo" -ldflags "${go_ldflags}" "${go_import_path}/lxd-migrate" } post_install() {