Unverified Commit a8432151 authored by Adam C. Stephens's avatar Adam C. Stephens Committed by GitHub
Browse files

incus: patch lxc/rootfs directory to fix tmpfs-overlay (#477631)

parents 7e52cf3f 1af136f7
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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