From 1536552792b4a057100c168869ab35d5c3607177 Mon Sep 17 00:00:00 2001 From: Cameron Nemo Date: Fri, 22 Apr 2022 19:43:31 -0700 Subject: [PATCH] lxd: update to 5.2 --- srcpkgs/lxd/files/lxd/run | 4 ---- srcpkgs/lxd/template | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run index 8b02dadb07b..a32a2438937 100644 --- a/srcpkgs/lxd/files/lxd/run +++ b/srcpkgs/lxd/files/lxd/run @@ -6,10 +6,6 @@ fi if ! mountpoint -q "${_systemd_cgrp}"; then mount -t cgroup -o none,name=systemd cgroup ${_systemd_cgrp} fi -# workaround lxc bug -- next release of lxc should obsolete this -if [ -e /sys/fs/cgroup/cpuset/cgroup.clone_children ]; then - echo 1 > /sys/fs/cgroup/cpuset/cgroup.clone_children 2>/dev/null || : -fi [ -r conf ] && . ./conf exec lxd --group lxd ${OPTS:- --verbose} diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template index d216d7bb7f7..26f69a8b286 100644 --- a/srcpkgs/lxd/template +++ b/srcpkgs/lxd/template @@ -1,12 +1,16 @@ # Template file for 'lxd' pkgname=lxd -version=4.19 +version=5.2 revision=1 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" +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 attr-progs" @@ -16,12 +20,18 @@ license="Apache-2.0" homepage="https://linuxcontainers.org/lxd" changelog="https://github.com/lxc/lxd/releases" distfiles="https://linuxcontainers.org/downloads/lxd/lxd-${version}.tar.gz" -checksum=6e4cf6cb1549e1b56802d64ad24d812914e0c0102bfcf146bb18a8dcd1fbab57 +checksum=e22d2b34a1848d33b2080b2b1c82355afb6d36fdfe49e67f44b3749edbc02e4c system_groups="lxd" # whitelist dqlite LDFLAGS export CGO_LDFLAGS_ALLOW='-Wl,-z,now' +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() { vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd vsv lxd