incus: patch lxc/rootfs directory to fix tmpfs-overlay

This commit is contained in:
Adam C. Stephens
2026-01-07 10:47:13 -05:00
parent 9e5f9ca29f
commit 1af136f785
+11
View File
@@ -108,6 +108,17 @@ buildGoModule (finalAttrs: {
# required for go-cowsql.
CGO_LDFLAGS_ALLOW = "(-Wl,-wrap,pthread_create)|(-Wl,-z,now)";
# add our lxc location to incus's acceptable rootFsPaths
# this is necessary for tmpfs/tmpfs-overlay to work
postPatch =
if (lib.versionAtLeast finalAttrs.version "6.16") then
''
substituteInPlace internal/server/device/disk.go \
--replace-fail '"/opt/incus/lib/lxc/rootfs/"' '"${lxc}/lib/lxc/rootfs/"'
''
else
null;
postBuild = ''
# build docs
mkdir -p .sphinx/deps