From edb1c5ff59ecdff8448996d6465402d9ef006202 Mon Sep 17 00:00:00 2001 From: Cameron Nemo Date: Thu, 13 Dec 2018 09:32:25 -0800 Subject: [PATCH] lxd: update to 3.8. --- srcpkgs/lxd/files/lxd/run | 4 +++- srcpkgs/lxd/template | 35 ++++++++++++++++++++++++----------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run index 6419fa0375a..147eb64e74d 100755 --- a/srcpkgs/lxd/files/lxd/run +++ b/srcpkgs/lxd/files/lxd/run @@ -3,5 +3,7 @@ _systemd_cgrp="/sys/fs/cgroup/systemd" if [ ! -d ${_systemd_cgrp} ]; then mkdir ${_systemd_cgrp} fi -mount -t cgroup -o none,name=systemd cgroup ${_systemd_cgrp} +if ! mountpoint -q "${_systemd_cgrp}"; then + mount -t cgroup -o none,name=systemd cgroup ${_systemd_cgrp} +fi exec lxd --group lxd 2>&1 diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template index 6afc9d33db3..11fe5d16202 100644 --- a/srcpkgs/lxd/template +++ b/srcpkgs/lxd/template @@ -1,22 +1,35 @@ -broken="failing to compile with go-1.11" # Template file for 'lxd' pkgname=lxd -version=3.2 -revision=2 +version=3.8 +revision=1 build_style=go -go_import_path=github.com/lxc/lxd -go_package="${go_import_path}/lxd ${go_import_path}/lxc" -hostmakedepends="git bzr pkg-config" -makedepends="lxc-devel acl-devel" +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" +makedepends="lxc-devel acl-devel dqlite-devel" depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables" -short_desc="LXD is a next generation system container manager" -maintainer="iaroki " +short_desc="Next generation system container manager" +maintainer="Cameron Nemo " license="Apache-2.0" homepage="https://linuxcontainers.org/lxd" -distfiles="https://github.com/lxc/lxd/releases/download/lxd-${version}/lxd-${version}.tar.gz" -checksum=6a388e1e5ad26adf32fbe1abb2f6e35a3307fa8c48e924ee0ed802e246c63da1 +distfiles="https://linuxcontainers.org/downloads/lxd/${pkgname}-${version}.tar.gz" +checksum=71dd5368a684c7b69699814f2c35c69ace6dd6eebd95fce39c13e44d9d827ea5 system_groups="lxd" +do_configure() { + # the LXD tarball packages up the required dependencies + ln -s "$wrksrc/dist" "$GOPATH" +} + +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_install() { vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd vlicense COPYING LICENSE