From 2f9abdb743f4353e0cd19f339f62790cebd04b16 Mon Sep 17 00:00:00 2001 From: dkwo Date: Wed, 8 May 2024 15:20:25 -0400 Subject: [PATCH] incus: update to 6.1, include readme.void and upstream patch for 32bit --- srcpkgs/incus/files/README.voidlinux | 11 +++++++++++ srcpkgs/incus/patches/32bit.patch | 27 +++++++++++++++++++++++++++ srcpkgs/incus/template | 21 ++++++++++++++++----- 3 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/incus/files/README.voidlinux create mode 100644 srcpkgs/incus/patches/32bit.patch diff --git a/srcpkgs/incus/files/README.voidlinux b/srcpkgs/incus/files/README.voidlinux new file mode 100644 index 00000000000000..4e82bff81af9c2 --- /dev/null +++ b/srcpkgs/incus/files/README.voidlinux @@ -0,0 +1,11 @@ +Besides the incus package, at least the incus-client one is needed, +and possibly the incus-tools one. +Membership in the _incus-admin and _incus groups is also needed to +interact with the corresponding services, which need to be started. + +Similar to lxc/lxd, something like + +echo "root:1000000:1000000000" | doas tee -a /etc/subuid /etc/subgid + +should be setup. One may also want to set CGROUP_MODE in rc.conf to +unified instead of hybrid. diff --git a/srcpkgs/incus/patches/32bit.patch b/srcpkgs/incus/patches/32bit.patch new file mode 100644 index 00000000000000..68805609506be4 --- /dev/null +++ b/srcpkgs/incus/patches/32bit.patch @@ -0,0 +1,27 @@ +From 9c733bccf04e717b6497534d616e83f5e947304a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?St=C3=A9phane=20Graber?= +Date: Thu, 9 May 2024 10:11:39 -0400 +Subject: [PATCH] incusd/instance: Fix building on 32bit architectures +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Closes #861 + +Signed-off-by: Stéphane Graber +--- + internal/server/instance/drivers/driver_common.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/internal/server/instance/drivers/driver_common.go b/internal/server/instance/drivers/driver_common.go +index 352555400f..faef632ccc 100644 +--- a/internal/server/instance/drivers/driver_common.go ++++ b/internal/server/instance/drivers/driver_common.go +@@ -1536,5 +1536,5 @@ func (d *common) processStartedAt(pid int) (time.Time, error) { + return time.Time{}, fmt.Errorf("Bad stat type") + } + +- return time.Unix(linuxInfo.Ctim.Sec, linuxInfo.Ctim.Nsec), nil ++ return time.Unix(int64(linuxInfo.Ctim.Sec), int64(linuxInfo.Ctim.Nsec)), nil + } + diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template index 7ff722c779c059..2bfb41239ab7fd 100644 --- a/srcpkgs/incus/template +++ b/srcpkgs/incus/template @@ -1,9 +1,10 @@ # Template file for 'incus' pkgname=incus -version=0.6.0 -revision=2 +version=6.1.0 +revision=1 build_style=go -go_import_path=github.com/lxc/incus +build_helper=qemu +go_import_path=github.com/lxc/incus/v6 go_build_tags="libsqlite3" go_package="${go_import_path}/cmd/incus ${go_import_path}/cmd/incus-benchmark @@ -20,7 +21,7 @@ maintainer="dkwo " license="Apache-2.0" homepage="https://linuxcontainers.org/incus" distfiles="https://github.com/lxc/incus/archive/refs/tags/v${version}.tar.gz" -checksum=9bbce9ae95b40be4bd11116a97f422ecd2adf2915a2c0b6828fa34435de756d2 +checksum=c8a492b7927f92bb2c3c7c372b8ac06d4b68fd761c9b9a4da9f853a031742ca4 system_groups="_incus-admin _incus" make_dirs=" /var/lib/incus 0755 root root @@ -47,6 +48,14 @@ post_install() { vsv incus # avoid conflict with lxd, lxd-lts mv ${DESTDIR}/usr/bin/{fuidshift,fuidshift-incus} + + # generate shell completions + INCUS=${DESTDIR}/usr/bin/incus + for shell in bash fish zsh; do + vtargetrun ${INCUS} completion ${shell} > scripts/${shell}-completion + done + + vdoc "${FILESDIR}/README.voidlinux" } incus-client_package() { @@ -55,7 +64,9 @@ incus-client_package() { pkg_install() { vmove usr/bin/incus vsv incus-user - vcompletion scripts/bash/incus bash incus + for shell in bash fish zsh; do + vcompletion scripts/${shell}-completion ${shell} incus + done } }