xen: move generic files to generic/ directory

Most patches used in the Xen build are generic, so let's keep everything
that applies to all versions in one folder.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
This commit is contained in:
Fernando Rodrigues 2024-08-11 16:25:58 +00:00
parent ed11cfc1fb
commit a52df9cf48
No known key found for this signature in database
GPG Key ID: CC3AE2EA00000000
8 changed files with 14 additions and 14 deletions

View File

@ -7,7 +7,7 @@
}@genericDefinition:
let
upstreamPatches = import ../patches.nix {
upstreamPatches = import ../generic/patches.nix {
inherit lib;
inherit fetchpatch;
};
@ -19,7 +19,7 @@ let
];
in
callPackage (import ../generic.nix {
callPackage (import ../generic/default.nix {
branch = "4.16";
version = "4.16.6";
latest = false;

View File

@ -7,7 +7,7 @@
}@genericDefinition:
let
upstreamPatches = import ../patches.nix {
upstreamPatches = import ../generic/patches.nix {
inherit lib;
inherit fetchpatch;
};
@ -20,7 +20,7 @@ let
];
in
callPackage (import ../generic.nix {
callPackage (import ../generic/default.nix {
branch = "4.17";
version = "4.17.4";
latest = false;

View File

@ -7,7 +7,7 @@
}@genericDefinition:
let
upstreamPatches = import ../patches.nix {
upstreamPatches = import ../generic/patches.nix {
inherit lib;
inherit fetchpatch;
};
@ -20,7 +20,7 @@ let
];
in
callPackage (import ../generic.nix {
callPackage (import ../generic/default.nix {
branch = "4.18";
version = "4.18.2";
latest = false;

View File

@ -7,7 +7,7 @@
}@genericDefinition:
let
upstreamPatches = import ../patches.nix {
upstreamPatches = import ../generic/patches.nix {
inherit lib;
inherit fetchpatch;
};
@ -19,7 +19,7 @@ let
];
in
callPackage (import ../generic.nix {
callPackage (import ../generic/default.nix {
branch = "4.19";
version = "4.19.0";
latest = true;

View File

@ -118,7 +118,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

View File

@ -175,7 +175,7 @@ let
if builtins.isPath patch then
{ type = "path"; }
else
throw "xen/generic.nix: normalisedPatchList attempted to normalise something that is not a Path or an Attribute Set."
throw "xen/generic/default.nix: normalisedPatchList attempted to normalise something that is not a Path or an Attribute Set."
else
patch
) pkg.xen.patches;
@ -632,7 +632,7 @@ stdenv.mkDerivation (finalAttrs: {
# Starts with the longDescription from ./packages.nix.
(packageDefinition.meta.longDescription or "")
+ lib.strings.optionalString (!withInternalQEMU) (
"\nUse with `qemu_xen_${lib.stringAsChars (x: if x == "." then "_" else x) branch}`"
"\nUse with `qemu_xen_${lib.strings.stringAsChars (x: if x == "." then "_" else x) branch}`"
+ lib.strings.optionalString latest " or `qemu_xen`"
+ ".\n"
)

View File

@ -32,7 +32,7 @@ latestVersion=$(echo "$versionList" | tr ' ' '\n' | tail --lines=1)
branchList=($(echo "$versionList" | tr ' ' '\n' | sed s/\.[0-9]*$//g | awk '!seen[$0]++'))
# Figure out which versions we're actually going to install.
minSupportedBranch="$(grep " knownVulnerabilities = lib.lists.optionals (lib.strings.versionOlder version " "$xenPath"/generic.nix | sed s/' knownVulnerabilities = lib.lists.optionals (lib.strings.versionOlder version "'//g | sed s/'") \['//g)"
minSupportedBranch="$(grep " knownVulnerabilities = lib.lists.optionals (lib.strings.versionOlder version " "$xenPath"/generic/default.nix | sed s/' knownVulnerabilities = lib.lists.optionals (lib.strings.versionOlder version "'//g | sed s/'") \['//g)"
supportedBranches=($(for version in "${branchList[@]}"; do if [ "$(printf '%s\n' "$minSupportedBranch" "$version" | sort -V | head -n1)" = "$minSupportedBranch" ]; then echo "$version"; fi; done))
supportedVersions=($(for version in "${supportedBranches[@]}"; do echo "$versionList" | tr ' ' '\n' | grep "$version" | tail --lines=1; done))
@ -139,7 +139,7 @@ for version in "${supportedVersions[@]}"; do
}@genericDefinition:
let
upstreamPatches = import ../patches.nix {
upstreamPatches = import ../generic/patches.nix {
inherit lib;
inherit fetchpatch;
};
@ -149,7 +149,7 @@ let
];
in
callPackage (import ../generic.nix {
callPackage (import ../generic/default.nix {
branch = "$branch";
version = "$version";
latest = $latest;