Skip to content

Commit

Permalink
Merge pull request NixOS#333948 from SigmaSquadron/xen-drop-figs
Browse files Browse the repository at this point in the history
xen: code quality updates and generic patch deduplication
  • Loading branch information
emilazy authored Aug 21, 2024
2 parents c79da50 + 70ff32c commit 42afc9d
Show file tree
Hide file tree
Showing 18 changed files with 184 additions and 300 deletions.

This file was deleted.

23 changes: 12 additions & 11 deletions pkgs/applications/virtualization/xen/4.16/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,31 @@
}@genericDefinition:

let
upstreamPatches = import ../patches.nix {
upstreamPatches = import ../generic/patches.nix {
inherit lib;
inherit fetchpatch;
};

upstreamPatchList = lib.lists.flatten [
upstreamPatches.XSA_458
upstreamPatches.XSA_460
upstreamPatches.XSA_461
];
upstreamPatchList = lib.lists.flatten (
with upstreamPatches;
[
XSA_458
XSA_460
XSA_461
]
);
in

callPackage (import ../generic.nix {
callPackage (import ../generic/default.nix {
pname = "xen";
branch = "4.16";
version = "4.16.6";
latest = false;
pkg = {
xen = {
rev = "4b33780de790bd438dd7cbb6143b410d94f0f049";
hash = "sha256-2kcmfKwBo3w1U5CSxLSYSteqvzcJaB+cA7keVb3amyA=";
patches = [
./0000-xen-ipxe-src-4.16.patch
./0001-xen-fig-geneneration-4.16.patch
] ++ upstreamPatchList;
patches = [ ] ++ upstreamPatchList;
};
qemu = {
rev = "c02cb236b5e4a76cf74e641cc35a0e3ebd3e52f3";
Expand Down

This file was deleted.

This file was deleted.

25 changes: 13 additions & 12 deletions pkgs/applications/virtualization/xen/4.17/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,32 @@
}@genericDefinition:

let
upstreamPatches = import ../patches.nix {
upstreamPatches = import ../generic/patches.nix {
inherit lib;
inherit fetchpatch;
};

upstreamPatchList = lib.lists.flatten [
upstreamPatches.QUBES_REPRODUCIBLE_BUILDS
upstreamPatches.XSA_458
upstreamPatches.XSA_460
upstreamPatches.XSA_461
];
upstreamPatchList = lib.lists.flatten (
with upstreamPatches;
[
QUBES_REPRODUCIBLE_BUILDS
XSA_458
XSA_460
XSA_461
]
);
in

callPackage (import ../generic.nix {
callPackage (import ../generic/default.nix {
pname = "xen";
branch = "4.17";
version = "4.17.4";
latest = false;
pkg = {
xen = {
rev = "d530627aaa9b6e03c7f911434bb342fca3d13300";
hash = "sha256-4ltQUzo4XPzGT/7fGt1hnNMqBQBVF7VP+WXD9ZaJcGo=";
patches = [
./0000-xen-ipxe-src-4.17.patch
./0001-xen-fig-geneneration-4.17.patch
] ++ upstreamPatchList;
patches = [ ] ++ upstreamPatchList;
};
qemu = {
rev = "ffb451126550b22b43b62fb8731a0d78e3376c03";
Expand Down

This file was deleted.

This file was deleted.

25 changes: 13 additions & 12 deletions pkgs/applications/virtualization/xen/4.18/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,32 @@
}@genericDefinition:

let
upstreamPatches = import ../patches.nix {
upstreamPatches = import ../generic/patches.nix {
inherit lib;
inherit fetchpatch;
};

upstreamPatchList = lib.lists.flatten [
upstreamPatches.QUBES_REPRODUCIBLE_BUILDS
upstreamPatches.XSA_458
upstreamPatches.XSA_460
upstreamPatches.XSA_461
];
upstreamPatchList = lib.lists.flatten (
with upstreamPatches;
[
QUBES_REPRODUCIBLE_BUILDS
XSA_458
XSA_460
XSA_461
]
);
in

callPackage (import ../generic.nix {
callPackage (import ../generic/default.nix {
pname = "xen";
branch = "4.18";
version = "4.18.2";
latest = false;
pkg = {
xen = {
rev = "d152a0424677d8b78e00ed1270a583c5dafff16f";
hash = "sha256-pHCjj+Bcy4xQfB9xHU9fccFwVdP2DXrUhdszwGvrdmY=";
patches = [
./0000-xen-ipxe-src-4.18.patch
./0001-xen-fig-geneneration-4.18.patch
] ++ upstreamPatchList;
patches = [ ] ++ upstreamPatchList;
};
qemu = {
rev = "0df9387c8983e1b1e72d8c574356f572342c03e6";
Expand Down

This file was deleted.

This file was deleted.

23 changes: 12 additions & 11 deletions pkgs/applications/virtualization/xen/4.19/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,31 @@
}@genericDefinition:

let
upstreamPatches = import ../patches.nix {
upstreamPatches = import ../generic/patches.nix {
inherit lib;
inherit fetchpatch;
};

upstreamPatchList = lib.lists.flatten [
upstreamPatches.QUBES_REPRODUCIBLE_BUILDS
upstreamPatches.XSA_460
upstreamPatches.XSA_461
];
upstreamPatchList = lib.lists.flatten (
with upstreamPatches;
[
QUBES_REPRODUCIBLE_BUILDS
XSA_460
XSA_461
]
);
in

callPackage (import ../generic.nix {
callPackage (import ../generic/default.nix {
pname = "xen";
branch = "4.19";
version = "4.19.0";
latest = true;
pkg = {
xen = {
rev = "026c9fa29716b0ff0f8b7c687908e71ba29cf239";
hash = "sha256-Q6x+2fZ4ITBz6sKICI0NHGx773Rc919cl+wzI89UY+Q=";
patches = [
./0000-xen-ipxe-src-4.19.patch
./0001-xen-fig-geneneration-4.19.patch
] ++ upstreamPatchList;
patches = [ ] ++ upstreamPatchList;
};
qemu = {
rev = "0df9387c8983e1b1e72d8c574356f572342c03e6";
Expand Down
7 changes: 4 additions & 3 deletions pkgs/applications/virtualization/xen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ open a PR fixing the script, and update Xen manually:

### For Both Update Methods

1. Update `packages.nix` with the new versions. Don't forget the `slim` packages!
1. Update `packages.nix` and `../../../top-level/all-packages.nix` with the new
versions. Don't forget the `slim` packages!
1. Make sure all branches build. (Both the `standard` and `slim` versions)
1. Use the NixOS module to test if dom0 boots successfully on all new versions.
1. Make sure the `meta` attributes evaluate to something that makes sense. The
following one-line command is useful for testing this:

```console
xenToEvaluate=xen; echo -e "\033[1m$(nix eval .#"$xenToEvaluate".meta.description 2> /dev/null | tail -c +2 | head -c -2)\033[0m\n\n$(nix eval .#"$xenToEvaluate".meta.longDescription 2> /dev/null | tail -c +2 | head -c -2)"
xenToEvaluate=xen; echo -e "\033[1m$(nix eval .#"$xenToEvaluate".meta.description --raw 2> /dev/null)\033[0m\n\n$(nix eval .#"$xenToEvaluate".meta.longDescription --raw 2> /dev/null)"
```

Change the value of `xenToEvaluate` to evaluate all relevant Xen packages.
Expand All @@ -118,7 +119,7 @@ are requested by the main Xen build.
Building `xen.efi` requires an `ld` with PE support.[^2]

We use a `makeFlag` to override the `$LD` environment variable to point to our
patched `efiBinutils`. For more information, see the comment in `./generic.nix`.
patched `efiBinutils`. For more information, see the comment in `./generic/default.nix`.

> [!TIP]
> If you are certain you will not be running Xen in an x86 EFI environment, disable
Expand Down
Loading

0 comments on commit 42afc9d

Please sign in to comment.