From ad2b110937944db19b52dc1530f3d464bea683ee Mon Sep 17 00:00:00 2001 From: dkwo Date: Wed, 8 May 2024 15:20:25 -0400 Subject: [PATCH 1/2] incus: update to 6.2 --- srcpkgs/incus/files/README.voidlinux | 11 +++++++++++ srcpkgs/incus/template | 21 ++++++++++++++++----- 2 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/incus/files/README.voidlinux diff --git a/srcpkgs/incus/files/README.voidlinux b/srcpkgs/incus/files/README.voidlinux new file mode 100644 index 00000000000000..3a4a5b356f49a9 --- /dev/null +++ b/srcpkgs/incus/files/README.voidlinux @@ -0,0 +1,11 @@ +Users wishing to interact with incus system daemons should belong to +the `_incus-admin` and `_incus` groups. The root user should also be +assigned a range of subordinate user and group IDs to be mapped in +containers. For example, the command + + usermod --add-subuids 1000000-1065535 \ + --add-subgids 1000000-1065535 root + +will assign a range of 65,536 IDs for users and groups. +Some container configurations may require that the `CGROUP_MODE` +variable in `/etc/rc.conf` be set to `unified`. diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template index 7ff722c779c059..ee696e1557ae5d 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.2.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=3593bd8ffd18d347615f451fddcc9658a65e47d4812461cceb9f61c49f568231 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 + local 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 } } From e0bb85dec8975373fd587abef3d3477b9e72a3b0 Mon Sep 17 00:00:00 2001 From: dkwo Date: Wed, 5 Jun 2024 13:17:11 -0400 Subject: [PATCH 2/2] incus: patch for 32bit --- srcpkgs/incus/patches/32bit.patch | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 srcpkgs/incus/patches/32bit.patch diff --git a/srcpkgs/incus/patches/32bit.patch b/srcpkgs/incus/patches/32bit.patch new file mode 100644 index 00000000000000..533729d06820b4 --- /dev/null +++ b/srcpkgs/incus/patches/32bit.patch @@ -0,0 +1,40 @@ +From f11c0b04f2e90a19e900ca077e21edf02c589db2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?St=C3=A9phane=20Graber?= +Date: Wed, 5 Jun 2024 11:35:50 -0400 +Subject: [PATCH] incusd/seccomp: Fix sysinfo logic on 32bit platforms +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Closes #918 + +Signed-off-by: Stéphane Graber +--- + internal/server/seccomp/sysinfo_32.go | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/internal/server/seccomp/sysinfo_32.go b/internal/server/seccomp/sysinfo_32.go +index 56bcd23ace..0445473147 100644 +--- a/internal/server/seccomp/sysinfo_32.go ++++ b/internal/server/seccomp/sysinfo_32.go +@@ -8,13 +8,13 @@ import ( + + // ToNative fills fields from s into native fields. + func (s *Sysinfo) ToNative(n *unix.Sysinfo_t) { +- n.Bufferram = uint32(s.Bufferram / s.Unit) +- n.Freeram = uint32(s.Freeram / s.Unit) +- n.Freeswap = uint32(s.Freeswap / s.Unit) ++ n.Bufferram = uint32(s.Bufferram) / s.Unit ++ n.Freeram = uint32(s.Freeram) / s.Unit ++ n.Freeswap = uint32(s.Freeswap) / s.Unit + n.Procs = s.Procs +- n.Sharedram = uint32(s.Sharedram / s.Unit) +- n.Totalram = uint32(s.Totalram / s.Unit) +- n.Totalswap = uint32(s.Totalswap / s.Unit) ++ n.Sharedram = uint32(s.Sharedram) / s.Unit ++ n.Totalram = uint32(s.Totalram) / s.Unit ++ n.Totalswap = uint32(s.Totalswap) / s.Unit + n.Uptime = int32(s.Uptime) + n.Unit = uint32(s.Unit) + } +