Merge pull request #330862 from K900/linux-6.11-rc1

Linux 6.11-rc1 (and misc fixes)
This commit is contained in:
K900 2024-07-30 17:08:29 +03:00 committed by GitHub
commit b6d7ec162c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 32 additions and 24 deletions

View File

@ -1,7 +1,7 @@
{
"testing": {
"version": "6.10-rc7",
"hash": "sha256:0i29ga9lzqd4zcsbr4bbb122i8nyfhcalihnq3bgsg04dwb36s19"
"version": "6.11-rc1",
"hash": "sha256:0c9an2xlils8lk9yx883jb3li6ylj4k1jpbqp5k0z71xifa5fxb1"
},
"6.1": {
"version": "6.1.102",

View File

@ -6,7 +6,7 @@
, ... } @ args:
let
version = "6.1.99-rt36"; # updated by ./update-rt.sh
version = "6.1.102-rt37"; # updated by ./update-rt.sh
branch = lib.versions.majorMinor version;
kversion = builtins.elemAt (lib.splitString "-" version) 0;
in buildLinux (args // {
@ -19,14 +19,14 @@ in buildLinux (args // {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v6.x/linux-${kversion}.tar.xz";
sha256 = "1lsdwdx7i7xw1rzq88k3bz8sar77gb4rnmjx11pbmvmiwaffx1n0";
sha256 = "1v4p4i8pfg4i6v90dr7m65npkxjnqv3fxcj8zs3pbb8y84xzk98v";
};
kernelPatches = let rt-patch = {
name = "rt";
patch = fetchurl {
url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
sha256 = "17a468lar9kf0q6n3vmknrbasrwp6pmq2gg39n1sp1bmmpr43qsf";
sha256 = "07cpbq8jrwqmv15qm2szrgqwgy33kxwglxll93cqqnklr4in1lmy";
};
}; in [ rt-patch ] ++ kernelPatches;

View File

@ -6,7 +6,7 @@
, ... } @ args:
let
version = "6.6.41-rt37"; # updated by ./update-rt.sh
version = "6.6.43-rt38"; # updated by ./update-rt.sh
branch = lib.versions.majorMinor version;
kversion = builtins.elemAt (lib.splitString "-" version) 0;
in buildLinux (args // {
@ -19,14 +19,14 @@ in buildLinux (args // {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v6.x/linux-${kversion}.tar.xz";
sha256 = "1vrjw0yhzmmnbrxyzjrfyz1s8bixciv1ly9pkgcqbasqh5brrjcy";
sha256 = "0pha226h5011kl5r2iiddxi0rib3xraslmcdjjnil2kq38d3pn0a";
};
kernelPatches = let rt-patch = {
name = "rt";
patch = fetchurl {
url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
sha256 = "0b2l0bdyb49x7by8wamqfr3yhy722pz55k5a9bvq8pvmqn9s8a3b";
sha256 = "0flxji623fy11l7z2syj5nlpkjfrc2nkqfpqvbgwzqpzms028mzj";
};
}; in [ rt-patch ] ++ kernelPatches;

View File

@ -1,5 +1,6 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p "python3.withPackages (ps: [ ps.beautifulsoup4 ps.lxml ps.packaging ])"
from functools import cached_property
from itertools import groupby
import json
import os
@ -29,20 +30,33 @@ class KernelNature(Enum):
class KernelRelease:
nature: KernelNature
version: str
branch: str
date: str
link: str
eol: bool = False
@cached_property
def parsed_version(self) -> Version:
return parse_version(self.version)
@cached_property
def branch(self) -> str:
version = self.parsed_version
# This is a testing kernel.
if version.is_prerelease:
return "testing"
else:
return f"{version.major}.{version.minor}"
def parse_release(release: Tag) -> KernelRelease | None:
columns: list[Tag] = list(release.find_all("td"))
try:
nature = KernelNature[columns[0].get_text().rstrip(":").upper()]
except KeyError:
# skip linux-next
return None
version = parse_version(columns[1].get_text().rstrip(" [EOL]"))
version = columns[1].get_text().rstrip(" [EOL]")
date = columns[2].get_text()
link = columns[3].find("a")
if link is not None and isinstance(link, Tag):
@ -52,7 +66,6 @@ def parse_release(release: Tag) -> KernelRelease | None:
return KernelRelease(
nature=nature,
branch=get_branch(version),
version=version,
date=date,
link=link,
@ -60,14 +73,6 @@ def parse_release(release: Tag) -> KernelRelease | None:
)
def get_branch(version: Version):
# This is a testing kernel.
if version.is_prerelease:
return "testing"
else:
return f"{version.major}.{version.minor}"
def get_hash(kernel: KernelRelease):
if kernel.branch == "testing":
args = ["--unpack"]
@ -108,16 +113,19 @@ def main():
sys.exit(1)
releases = release_table.find_all("tr")
parsed_releases = filter(None, [parse_release(release) for release in releases])
parsed_releases = [
parsed for release in releases
if (parsed := parse_release(release)) is not None
]
all_kernels = json.load(VERSIONS_FILE.open())
oldest_branch = get_oldest_branch()
for (branch, kernels) in groupby(parsed_releases, lambda kernel: get_branch(kernel.version)):
kernel = max(kernels, key=lambda kernel: kernel.version)
for (branch, kernels) in groupby(parsed_releases, lambda kernel: kernel.branch):
kernel = max(kernels, key=lambda kernel: kernel.parsed_version)
nixpkgs_branch = branch.replace(".", "_")
old_version = parse_version(all_kernels.get(branch, {}).get("version"))
old_version = all_kernels.get(branch, {}).get("version")
if old_version == kernel.version:
print(f"linux_{nixpkgs_branch}: {kernel.version} is latest, skipping...")
continue
@ -144,7 +152,7 @@ def main():
print(message, file=sys.stderr)
all_kernels[branch] = {
"version": str(kernel.version),
"version": kernel.version,
"hash": get_hash(kernel),
}