Skip to content

Commit

Permalink
Merge pull request #330435 from K900/kernels-20240727
Browse files Browse the repository at this point in the history
Kernel updates for 2024-07-27
  • Loading branch information
K900 authored Jul 27, 2024
2 parents 6d4350b + 1e5a635 commit daa0978
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
32 changes: 16 additions & 16 deletions pkgs/os-specific/linux/kernel/kernels-org.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,39 @@
"hash": "sha256:0i29ga9lzqd4zcsbr4bbb122i8nyfhcalihnq3bgsg04dwb36s19"
},
"6.1": {
"version": "6.1.101",
"hash": "sha256:0k5kjb2n78dcfpqqj8n76fxqbmifs2gqd2z1g9had7s2d2m9yigi"
"version": "6.1.102",
"hash": "sha256:1v4p4i8pfg4i6v90dr7m65npkxjnqv3fxcj8zs3pbb8y84xzk98v"
},
"5.15": {
"version": "5.15.163",
"hash": "sha256:00mkipkhz0i5xld7kyaxcj8cj8faw4gmjl5fribg832nn7ccfpq2"
"version": "5.15.164",
"hash": "sha256:11linb9jzarr8wz0vim3g9gkhi5ldqm82bkpl5xs9f34xpx9hq7c"
},
"5.10": {
"version": "5.10.222",
"hash": "sha256:1jshn64g165rdshyjvq38ni6pkbskp50048pbz407fss7f00cbbv"
"version": "5.10.223",
"hash": "sha256:189b3yl4lsjzh6qpza0phj8hgsvnyh38cgrd70rnqw3rddmdh2fa"
},
"5.4": {
"version": "5.4.280",
"hash": "sha256:0hix0dywf2ybvzxkijjsjmkrj7sx61hwq6mg1wqsq317p1zccxm9"
"version": "5.4.281",
"hash": "sha256:1ckja83km101h2dwlp86xrnnlzdzvjly48iywhy53xric3kw7824"
},
"4.19": {
"version": "4.19.318",
"hash": "sha256:14vl0288apl76rvxa9yxfggrc4600bjsn4gw097m4gy5ldiaapqd"
"version": "4.19.319",
"hash": "sha256:0c7bhb31hpbbw1is1ykppk9lm0x025yyd4hrmlg1s6yg75rxqkal"
},
"6.6": {
"version": "6.6.42",
"hash": "sha256:10z6fjvpiv3l11rpsd6fgi7dr6a3d38c6zlp8ihffx6pjz1ch0c8"
"version": "6.6.43",
"hash": "sha256:0pha226h5011kl5r2iiddxi0rib3xraslmcdjjnil2kq38d3pn0a"
},
"6.8": {
"version": "6.8.12",
"hash": "sha256:0fb0m0fv4521g63gq04d7lm6hy8169s1rykiav5bkd99s9b1kcqr"
},
"6.9": {
"version": "6.9.11",
"hash": "sha256:1q8kyn9cxc1ykf3cvifmfqk2p2p4x53l7h704hh92gichgh89pyy"
"version": "6.9.12",
"hash": "sha256:08ngskni7d9wi93vlwcmbdg7sb2jl1drhhzn62k9nsrg1r7crrss"
},
"6.10": {
"version": "6.10.1",
"hash": "sha256:0szpkhrwfqwj068vz032daf3zycv5c93gjxiisjziifi3kyrs43h"
"version": "6.10.2",
"hash": "sha256:0w4vsb0c8bp34j90l89qms50nx6r6mmyf23jbvyar9fbv46m5n3k"
}
}
6 changes: 3 additions & 3 deletions pkgs/os-specific/linux/kernel/linux-rt-5.15.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
, ... } @ args:

let
version = "5.15.160-rt77"; # updated by ./update-rt.sh
version = "5.15.163-rt78"; # updated by ./update-rt.sh
branch = lib.versions.majorMinor version;
kversion = builtins.elemAt (lib.splitString "-" version) 0;
in buildLinux (args // {
Expand All @@ -19,14 +19,14 @@ in buildLinux (args // {

src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${kversion}.tar.xz";
sha256 = "018v19a7rhzc4szybzzn86jlnk42x7jm6xkadfd2d3xq6f7727pl";
sha256 = "00mkipkhz0i5xld7kyaxcj8cj8faw4gmjl5fribg832nn7ccfpq2";
};

kernelPatches = let rt-patch = {
name = "rt";
patch = fetchurl {
url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
sha256 = "0id4m1k1xq84bxgnchm8r2iwfqw6nacv5n1ksgyzj6q6v66ik3wk";
sha256 = "030aycnrcnjhylkqj0wrfi992v2l26v17rgvxl16514zpdjmiv1x";
};
}; in [ rt-patch ] ++ kernelPatches;

Expand Down
20 changes: 10 additions & 10 deletions pkgs/os-specific/linux/kernel/update-mainline.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p "python3.withPackages (ps: [ ps.beautifulsoup4 ps.lxml ps.packaging ])"
from itertools import groupby
import json
import os
import pathlib
Expand All @@ -11,7 +12,7 @@

from bs4 import BeautifulSoup, NavigableString, Tag
from packaging.version import parse as parse_version, Version
from typing import List


HERE = pathlib.Path(__file__).parent
ROOT = HERE.parent.parent.parent.parent
Expand Down Expand Up @@ -41,7 +42,7 @@ def parse_release(release: Tag) -> KernelRelease | None:
except KeyError:
return None

version = columns[1].get_text().rstrip(" [EOL]")
version = parse_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):
Expand All @@ -59,13 +60,12 @@ def parse_release(release: Tag) -> KernelRelease | None:
)


def get_branch(version: str):
def get_branch(version: Version):
# This is a testing kernel.
if "rc" in version:
if version.is_prerelease:
return "testing"
else:
major, minor, *_ = version.split(".")
return f"{major}.{minor}"
return f"{version.major}.{version.minor}"


def get_hash(kernel: KernelRelease):
Expand Down Expand Up @@ -113,11 +113,11 @@ def main():

oldest_branch = get_oldest_branch()

for kernel in parsed_releases:
branch = get_branch(kernel.version)
for (branch, kernels) in groupby(parsed_releases, lambda kernel: get_branch(kernel.version)):
kernel = max(kernels, key=lambda kernel: kernel.version)
nixpkgs_branch = branch.replace(".", "_")

old_version = all_kernels.get(branch, {}).get("version")
old_version = parse_version(all_kernels.get(branch, {}).get("version"))
if old_version == kernel.version:
print(f"linux_{nixpkgs_branch}: {kernel.version} is latest, skipping...")
continue
Expand All @@ -144,7 +144,7 @@ def main():
print(message, file=sys.stderr)

all_kernels[branch] = {
"version": kernel.version,
"version": str(kernel.version),
"hash": get_hash(kernel),
}

Expand Down

0 comments on commit daa0978

Please sign in to comment.