Conversation
19913d7 to
e3bba0c
Compare
e3bba0c to
d6cc4bc
Compare
d6cc4bc to
63a6539
Compare
42e25b3 to
3c633cc
Compare
3c633cc to
37cf6cc
Compare
|
@fricklerhandwerk - as you worked on the docs for some time iirc:
The build indeed works locally, but I can't quite understand this notice. I'd understand it if there'd be sections that the remote state doesn't see, but that should not be the case here. Onto what should one rebase here to have the manual build succeed in CI? |
|
@msanft you may need to rebase on top of |
37cf6cc to
0913f76
Compare
Hmm. I think I should be. |
|
@GetPsyched do you have a clue what's going on here? This should actually be green from what I can see. |
|
I should have time to review this soon. Could you rebase and move the release notes to the next version of NixOS, @msanft? Thanks. |
2227aea to
3a858b3
Compare
Thanks - unfortunately only came to this now. Should be rebased now and ready for another round of review :) |
|
fyi, streamlayeredimage works in combination with skopeo, you dont need to write the tar to the store: |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
3a858b3 to
06834ca
Compare
This aligns `ociTools` with `dockerTools` (and all other language-specific build support tools) in the nixpkgs tree by moving it from the `oci-tools` subdirectory to an `oci` subdirectory.
This introduces a generic `toOCIImage` conversion function that converts Docker-style tarballs to OCI directories or tarballs using `skopeo`. This allows for building OCI [v1.2](https://opencontainers.org/posts/blog/2024-02-18-oci-runtime-spec-v1-2/) images with in-tree nixpkgs tools. This introduces a separate derivation for OCI images, which - obviously - comes at a cost. However, I deemed that to be worth it here, due to the sheer complexity an OCI builder would have to implement to keep up with `dockerTools` otherwise.
This aligns the ociTools documentation with the refactoring to the Docker-based conversion builds.
06834ca to
23e6ff2
Compare
pkgs/build-support/oci/default.nix
Outdated
| nixosTests, | ||
| }: | ||
|
|
||
| rec { |
There was a problem hiding this comment.
What would it take to get rid of this rec?
There was a problem hiding this comment.
I stuffed toOCIImage and mkDockerToolsDropin in a let-binding now. Is that preferrable?
This adds a NixOS test that exercises the reworked OCI functionality by executing OCI images via Docker.
23e6ff2 to
69308a8
Compare
| skopeoOutputFormats."${outputFormat}" | ||
| or (throw "`outputFormat` must be one of: ${lib.concatStringsSep ", " (lib.attrNames skopeoOutputFormats)}"); | ||
| in | ||
| stdenvNoCC.mkDerivation { |
There was a problem hiding this comment.
Shouldn't put that function call here. The constructDrv attribute set above does this for you in a proper fixed-point way.
| stdenvNoCC.mkDerivation { | |
| { |
| constructDrv = stdenvNoCC.mkDerivation; | ||
| excludeDrvArgNames = [ | ||
| "docker-tarball" | ||
| "name" |
There was a problem hiding this comment.
Once you do the other change this may need to be removed. This is because the name attribute probably does need to be passed down to the next drv constructor.
| "name" |
OCI support in nixpkgs has been lacking, with only the long-obsolete v1 runtime specification, dated 2017, being supported.
This PR changes the OCI interface in nixpkgs completely, introducing 100%-
pkgs.dockerTools-compatiblebuildImageandbuildLayeredImagefunctions to build OCI directories or tarballs by transforming Docker images viaskopeointo OCI images that conform to the v1.2 runtime specification.It might not be the most efficient implementation (see commit descriptions for further rationale behind this), but the sheer complexity of
dockerToolshas lead me to believe that this is the best solution to get some kind of OCI image building support into nixpkgs in the short to mid term, and it removes the ugly footguns and incompatibilities ofociTools.buildContainer(the symptoms of which can be seen in the linked issues) in favor of a more coherent interface.Closes #290879
Closes #290881
Closes #290882
Closes #293849
Closes #316652
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.