pdtpartners / nix-snapshotter

Brings native understanding of Nix packages to containerd
MIT License
532 stars 15 forks source link

Swiching to the latest release of nixpkgs 23.11 from unstable. #105

Closed RobbieBuxton closed 8 months ago

RobbieBuxton commented 9 months ago

What is it

With the new release of NixOS 23.11 "Tapir" we now have a sufficient version of containerd (>= 1.73) to pin nix-snapshotter back to a stable branch.

Change 1

There has been a change in NixOS user-groups that causes the current version of the vm demo not to work.

Steps to reproduce

output log

[robbieb@nixos:~/PDT/nix-snapshotter]$ nix run .#vm --recreate-lock-file
       error:
       Failed assertions:
       - The following users have a primary group that is undefined: rootless
       Hint: Add this to your NixOS configuration:
         users.groups.rootless = {};

Fix

Added the suggested line to vm.nix. Open to suggestions if there is a cleaner way of fixing this.

Change 2

vendorSha256 has been deprecated and replaced with vendorHash

Problems

Currently there is a broken dependency, certmgr-selfsigned in nix-snapshotter causing the build to fail.

Steps to reproduce

output log

[robbieb@nixos:~]$ nix run .#vm 
error: hash mismatch in fixed-output derivation '/nix/store/chw7m5ssvzqgzasd6nvyfik79z4plm43-cloudflare-certmgr-pull-51.patch.drv':
         specified: sha256-OmOz6CeO1GTZ5NIVqhhnJWNP5K7X2LX28q+KlkrgGko=
            got:    sha256-0TEvUWH+ybtLiNxJAcpq7mThQzU6iQ1ykYVcikAyhVI=
error: 1 dependencies of derivation '/nix/store/38zbnb57frmlxvxwr67d7qi40755flyv-certmgr-1.6.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ppj512ljfi97fljrdxblz2q5r78a47c2-unit-certmgr.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/si880vj0j5dk3p8m6lx7zh4s76lp086a-system-units.drv' failed to build
error: 1 dependencies of derivation '/nix/store/n7wb45awad18zv8ppa3rpyqr5781bymm-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/fir2l21shn1shjhdpi0fjdympc0yvkhg-nixos-system-nixos-23.11.20231129.50aa30a.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dcn4g8s2hi63gw3k0309knbihh27zvkp-nixos-vm.drv' failed to build

Cause

This is caused by an upstream bug in nixpkgs which I have raised an issue to fix, hopefully once this is merged this PR should be ready to merge.

RobbieBuxton commented 9 months ago

The issue has been fixed and merged into nixos-master but has yet to be merged into nixos-unstable. The progress can be tracked here: https://nixpk.gs/pr-tracker.html?pr=271299

RobbieBuxton commented 9 months ago

The fix is now in nixos-unstable.

RobbieBuxton commented 8 months ago

The fix was successfully backported into 23.11 and is ready for review/testing @elpdt852 @gbpdt

RobbieBuxton commented 8 months ago

@elpdt852 Thanks for the review! I don't think I have permission to merge so I think you might need to do it.