mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
incus-lts: 6.0.5-unstable-2026-01-23 -> 6.0.6
Changelog: https://github.com/lxc/incus/releases/tag/v6.0.6
This commit is contained in:
parent
c3070a298a
commit
5793a2e22d
3 changed files with 30 additions and 55 deletions
|
|
@ -201,33 +201,28 @@ in
|
|||
server.succeed("systemctl --no-pager -l status apparmor.service")
|
||||
server.wait_for_unit("apparmor.service")
|
||||
''
|
||||
+ lib.optionalString cfg.feature.user (
|
||||
# python
|
||||
''
|
||||
with subtest("incus-user allows restricted access for users"):
|
||||
server.fail("incus project show user-1000")
|
||||
server.succeed("su - testuser bash -c 'incus list'")
|
||||
# a project is created dynamically for the user
|
||||
server.succeed("incus project show user-1000")
|
||||
# user can create an instance
|
||||
server.succeed("su - testuser bash -c 'incus create --empty'")
|
||||
''
|
||||
+ lib.optionalString (lib.versionOlder cfg.package.version "6.21") ''
|
||||
# users shouldn't be able to list storage pools
|
||||
server.fail("su - testuser bash -c 'incus storage list'")
|
||||
''
|
||||
+ lib.optionalString (lib.versionAtLeast cfg.package.version "6.21") ''
|
||||
# users shouldn't be able to read storage pools
|
||||
server.succeed("su - testuser bash -c 'incus storage list'")
|
||||
+
|
||||
lib.optionalString cfg.feature.user
|
||||
# python
|
||||
''
|
||||
with subtest("incus-user allows restricted access for users"):
|
||||
server.fail("incus project show user-1000")
|
||||
server.succeed("su - testuser bash -c 'incus list'")
|
||||
# a project is created dynamically for the user
|
||||
server.succeed("incus project show user-1000")
|
||||
# user can create an instance
|
||||
server.succeed("su - testuser bash -c 'incus create --empty'")
|
||||
|
||||
# pre-check that there is a pool source
|
||||
pool_source = server.succeed("incus storage get default source").strip()
|
||||
assert pool_source == "/var/lib/incus/storage-pools/default", f"Expected pool source /var/lib/incus/storage-pools/default, got {pool_source}"
|
||||
# users should be able to read storage pools
|
||||
server.succeed("su - testuser bash -c 'incus storage list'")
|
||||
|
||||
# users shouldn't be able to read storage pool config
|
||||
code, pool_source = server.execute("su - testuser bash -c 'incus storage get default source'")
|
||||
assert pool_source.strip() == "", f"Expected empty string, got {pool_source}"
|
||||
''
|
||||
)
|
||||
# pre-check that there is a pool source
|
||||
pool_source = server.succeed("incus storage get default source").strip()
|
||||
assert pool_source == "/var/lib/incus/storage-pools/default", f"Expected pool source /var/lib/incus/storage-pools/default, got {pool_source}"
|
||||
|
||||
# users shouldn't be able to read storage pool config
|
||||
code, pool_source = server.execute("su - testuser bash -c 'incus storage get default source'")
|
||||
assert pool_source.strip() == "", f"Expected empty string, got {pool_source}"
|
||||
''
|
||||
+ instanceScript;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,14 +113,10 @@ buildGoModule (finalAttrs: {
|
|||
|
||||
# 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;
|
||||
postPatch = ''
|
||||
substituteInPlace internal/server/device/disk.go \
|
||||
--replace-fail '"/opt/incus/lib/lxc/rootfs/"' '"${lxc}/lib/lxc/rootfs/"'
|
||||
'';
|
||||
|
||||
postBuild = ''
|
||||
# build docs
|
||||
|
|
@ -172,16 +168,9 @@ buildGoModule (finalAttrs: {
|
|||
--zsh <($out/bin/incus completion zsh)
|
||||
|
||||
mkdir -p $agent_loader/bin $agent_loader/etc/systemd/system $agent_loader/lib/udev/rules.d
|
||||
''
|
||||
+ lib.optionalString (lib.versionOlder finalAttrs.version "6.18") ''
|
||||
cp internal/server/instance/drivers/agent-loader/incus-agent{,-setup} $agent_loader/bin/
|
||||
''
|
||||
+ lib.optionalString (lib.versionAtLeast finalAttrs.version "6.18") ''
|
||||
# the agent_loader output is used by virtualisation.incus.agent
|
||||
cp internal/server/instance/drivers/agent-loader/incus-agent-linux $agent_loader/bin/incus-agent
|
||||
cp internal/server/instance/drivers/agent-loader/incus-agent-setup-linux $agent_loader/bin/incus-agent-setup
|
||||
''
|
||||
+ ''
|
||||
chmod +x $agent_loader/bin/incus-agent{,-setup}
|
||||
patchShebangs $agent_loader/bin/incus-agent{,-setup}
|
||||
cp internal/server/instance/drivers/agent-loader/systemd/incus-agent.service $agent_loader/etc/systemd/system/
|
||||
|
|
|
|||
|
|
@ -1,20 +1,11 @@
|
|||
import ./generic.nix {
|
||||
hash = "sha256-Sg3+399EgwEcZ8fp9cb2KEWQtBpYr5PkwTdnGl/AdfA";
|
||||
version = "6.0.5-unstable-2026-01-23";
|
||||
rev = "f8da60633e493bb5c0521981fa031bc909988c95";
|
||||
vendorHash = "sha256-KOJqPvp+w7G505ZMJ1weRD2SATmfq1aeyCqmbJ6WMAY=";
|
||||
hash = "sha256-DgPSH5t1Zx2X9T8dbpz54M5nXNcCJbdfcq9AEd8kmYo=";
|
||||
version = "6.0.6";
|
||||
vendorHash = "sha256-bVJwg9VaiSgfpKo+e2oMsYgmaKk42dktq0pahcfbjp0=";
|
||||
patches = [
|
||||
# qemu 9.1 compat, remove when added to LTS
|
||||
./572afb06f66f83ca95efa1b9386fceeaa1c9e11b.patch
|
||||
./0c37b7e3ec65b4d0e166e2127d9f1835320165b8.patch
|
||||
# post 6.0.5 patches, remove >= 6.0.6
|
||||
# ./c5359c809836c0f3b1e6022bf0528bb90ce06ad7.patch
|
||||
# ./57096066959c843e1c413c4a97f64077b95cb397.patch
|
||||
# ./f3dc9c0e6b77bb8765b347564702e026c2a8f9c6.patch
|
||||
# ./d6a1ea3912938dae740cf821cd070e66e7a623ff.patch
|
||||
# ./d6f0a77dd26df4c1ced80ffa63848279fd4330cc.patch
|
||||
# ./92ac6ac999a4928cfdb92c485a048e4d51f471d0.patch
|
||||
# ./f8da60633e493bb5c0521981fa031bc909988c95,patch
|
||||
];
|
||||
lts = true;
|
||||
nixUpdateExtraArgs = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue