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

Merge pull request #299340 from adamcstephens/incus/0.7

incus: 0.6 -> 0.7
parents 098e283b a5a4da89
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -263,6 +263,7 @@ in
        {
          INCUS_LXC_TEMPLATE_CONFIG = "${pkgs.lxcfs}/share/lxc/config";
          INCUS_OVMF_PATH = ovmf;
          INCUS_USBIDS_PATH = "${pkgs.hwdata}/share/hwdata/usb.ids";
          PATH = lib.mkForce serverBinPath;
        }
        (lib.mkIf (cfg.ui.enable) { "INCUS_UI" = cfg.ui.package; })

pkgs/by-name/in/incus/529.patch

deleted100644 → 0
+0 −29
Original line number Diff line number Diff line
From 32a4beecbf8098fdbb15ef5f36088956922630f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Fri, 23 Feb 2024 18:47:15 -0500
Subject: [PATCH] incusd/device/disk: Fix incorrect block volume usage
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
---
 internal/server/device/disk.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/internal/server/device/disk.go b/internal/server/device/disk.go
index 0d19e21139..4f9a3e7c1b 100644
--- a/internal/server/device/disk.go
+++ b/internal/server/device/disk.go
@@ -339,6 +339,11 @@ func (d *disk) validateConfig(instConf instance.ConfigReader) error {
 				var usedBy []string
 
 				err = storagePools.VolumeUsedByInstanceDevices(d.state, d.pool.Name(), storageProjectName, &dbVolume.StorageVolume, true, func(inst db.InstanceArgs, project api.Project, usedByDevices []string) error {
+					// Don't count the current instance.
+					if d.inst != nil && d.inst.Project().Name == inst.Project && d.inst.Name() == inst.Name {
+						return nil
+					}
+
 					usedBy = append(usedBy, inst.Name)
 
 					return nil
+1 −3
Original line number Diff line number Diff line
@@ -31,10 +31,8 @@ buildGoModule {
  subPackages = [ "cmd/incus" ];

  postInstall = ''
    # use custom bash completion as it has extra logic for e.g. instance names
    installShellCompletion --bash --name incus ./scripts/bash/incus

    installShellCompletion --cmd incus \
      --bash <($out/bin/incus completion bash) \
      --fish <($out/bin/incus completion fish) \
      --zsh <($out/bin/incus completion zsh)
  '';
+1 −9
Original line number Diff line number Diff line
@@ -45,12 +45,6 @@ buildGoModule rec {
    inherit hash;
  };

  # replace with env var > 0.6 https://github.com/lxc/incus/pull/610
  postPatch = ''
    substituteInPlace internal/usbid/load.go \
      --replace-fail "/usr/share/misc/usb.ids" "${hwdata}/share/hwdata/usb.ids"
  '';

  excludedPackages = [
    # statically compile these
    "cmd/incus-agent"
@@ -103,10 +97,8 @@ buildGoModule rec {
    '';

  postInstall = ''
    # use custom bash completion as it has extra logic for e.g. instance names
    installShellCompletion --bash --name incus ./scripts/bash/incus

    installShellCompletion --cmd incus \
      --bash <($out/bin/incus completion bash) \
      --fish <($out/bin/incus completion fish) \
      --zsh <($out/bin/incus completion zsh)
  '';
+4 −7
Original line number Diff line number Diff line
import ./generic.nix {
  hash = "sha256-tGuAS0lZvoYb+TvmCklQ8TADZhbm4w/lhdI0ycS4/0o=";
  version = "0.6.0";
  vendorHash = "sha256-+WmgLOEBJ/7GF596iiTgyTPxn8l+hE6RVqjLKfCi5rs=";
  patches = [
    # fix storage bug, fixed in > 0.6
    ./529.patch
  ];
  hash = "sha256-6TLoua3rooDRyPc5BPYgzU/oeVy6F8h+p3UtKGPZkAE=";
  version = "0.7.0";
  vendorHash = "sha256-Slw58pszT6sbpxK6/f+ojA+uStt0zSWxztFTm5ovZr8=";
  patches = [ ];
}
Loading