lxd: update to 3.19.

This commit is contained in:
Cameron Nemo 2019-09-12 22:57:04 -07:00 committed by Juan RP
parent cf9ac5264d
commit 613c9ca95b
3 changed files with 12 additions and 57 deletions

View file

@ -6,4 +6,8 @@ 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
exec lxd --group lxd 2>&1

View file

@ -1,41 +0,0 @@
lxc/lxd@a181ed4 [PATCH] seccomp: define __NR_mknod if missing
lxc/lxd@c655ed5 [PATCH] seccomp: rework missing syscall number definitions
---
lxd/seccomp.go | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lxd/seccomp.go b/lxd/seccomp.go
index 0afad7cacc..32397b9729 100644
--- lxd/seccomp.go
+++ lxd/seccomp.go
@@ -109,6 +109,14 @@
return -EPERM;
}
+#ifndef __NR_mknodat
+ #error missing kernel headers
+#else
+ #ifdef __NR_mknod
+ #define LXD_MUST_CHECK_MKNOD
+ #endif
+#endif
+
static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_proxy_msg *msg,
char *buf, size_t size,
mode_t *mode, dev_t *dev,
@@ -124,6 +132,7 @@ static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_p
resp->val = 0;
switch (req->data.nr) {
+#ifdef LXD_MUST_CHECK_MKNOD
case __NR_mknod:
resp->error = device_allowed(req->data.args[2], req->data.args[1]);
if (resp->error) {
@@ -143,6 +149,7 @@ static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_p
*pid = req->pid;
break;
+#endif
case __NR_mknodat:
if (req->data.args[0] != AT_FDCWD) {
errno = EINVAL;

View file

@ -1,37 +1,29 @@
# Template file for 'lxd'
pkgname=lxd
version=3.14
version=3.19
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"
hostmakedepends="pkg-config"
hostmakedepends="pkg-config git"
makedepends="lxc-devel acl-devel dqlite-devel"
depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables"
short_desc="Next generation system container manager"
maintainer="Cameron Nemo <camerontnorman@gmail.com>"
maintainer="Cameron Nemo <cnemo@tutanota.com>"
license="Apache-2.0"
homepage="https://linuxcontainers.org/lxd"
distfiles="https://linuxcontainers.org/downloads/lxd/lxd-${version}.tar.gz"
checksum=409e4758cbeb43b098d0265c4ce05aeeac5ae73f8914ceb1006e6a6d89fe1fe5
checksum=afc0b0912e5fa977007cfd97805849a3a47564eaaaa1638948081665ad7224c8
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}
}
_libdir="/usr/lib/sqlite-replication"
LDFLAGS="-L${XBPS_CROSS_BASE}${_libdir} -Wl,-R${_libdir}"
# whitelist libcap LDFLAGS (see: https://github.com/lxc/lxd/issues/6727)
export CGO_LDFLAGS_ALLOW='-Wl,-wrap,pthread_create'
post_install() {
vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
vlicense COPYING LICENSE
vsv lxd
}