From ef82011918e35ff88340f7e2e075414f37231530 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 19 Aug 2023 13:44:09 +0200 Subject: [PATCH 1/2] linux-rt_6_1: 6.1.33-rt11 -> 6.1.46-rt13 --- pkgs/os-specific/linux/kernel/linux-rt-6.1.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix b/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix index 6d77e5f87fe2..cfb84c25f275 100644 --- a/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix +++ b/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix @@ -6,7 +6,7 @@ , ... } @ args: let - version = "6.1.33-rt11"; # updated by ./update-rt.sh + version = "6.1.46-rt13"; # updated by ./update-rt.sh branch = lib.versions.majorMinor version; kversion = builtins.elemAt (lib.splitString "-" version) 0; in buildLinux (args // { @@ -18,14 +18,14 @@ in buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${kversion}.tar.xz"; - sha256 = "1kfj7mi3n2lfaw4spz5cbvcl1md038figabyg80fha3kxal6nzdq"; + sha256 = "15m228bllks2p8gpsmvplx08yxzp7bij9fnmnafqszylrk7ppxpm"; }; kernelPatches = let rt-patch = { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "0swzp6brk01r7pb73yada18vf6fhdqq4c78abq3abj6y8ay0awhh"; + sha256 = "00pj02mvamxvlkwrca1j3baaa18rg6dra7al1xsvgw3ypckwyafz"; }; }; in [ rt-patch ] ++ kernelPatches; From ccf0c5bd42d8aeb5bd12577f748857759904e8f8 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 19 Aug 2023 13:45:22 +0200 Subject: [PATCH 2/2] linux: make main update script slightly more robust On #249636 I had to manually run the updaters for hardened & libre kernels. The cause was that `update-rt.sh` suddenly broke. Because I didn't want to inhibit other kernel updates because of a rather niche variant, I decided to move forward temporarily and take care of it later. One issue was that the script failed silently, i.e. I only saw that the script terminated early from my prompt. This is fixed now by making each niche kernel updater print its exit code code if it failed. Also, errors are allowed, i.e. a broken `update-rt.sh` doesn't block `hardened/update.py` etc.. The issue itself is rather simple. When I updated the kernels in #249636, the sha256sums.asc for rt kernels[1] looked like this: 199bbb0cdb97ead22732473b95c8b2e8da62dfd71bde2339163119fb537a2b7c patch-6.1.38-rt13-rc1.patch.gz a1af54f6987e96de06cad0a3226c5b5a992b60df084a904b6b94ea247fb46027 patch-6.1.38-rt13-rc1.patch.xz 7bb68561787e46e3c433d9b514373ce368d587ac459b91df41934e70280d008f patches-6.1.38-rt13-rc1.tar.gz ee65336dd6ae0be398796e7b75291918811a23e10121dc09bd84b244b12402fa patches-6.1.38-rt13-rc1.tar.xz However, the script itself skips any RC versions of the realtime patches, so no releases were usable and the script failed. It's probably possible to use the overview over all releases instead[2], however that'd complicate the script notably. Anyways, since RT kernels don't bump to each patch-level release, I don't think it hurts too much if such an update is slightly more delayed. However if we want to fix this, I'd prefer this to be fixed by folks who care more about rt kernels than I do. [1] https://kernel.org/pub/linux/kernel/projects/rt/6.1/sha256sums.asc [2] https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/6.1/older/sha256sums.asc --- pkgs/os-specific/linux/kernel/update.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/update.sh b/pkgs/os-specific/linux/kernel/update.sh index 560edced36ea..4171b7492b7b 100755 --- a/pkgs/os-specific/linux/kernel/update.sh +++ b/pkgs/os-specific/linux/kernel/update.sh @@ -58,11 +58,15 @@ ls $NIXPKGS/pkgs/os-specific/linux/kernel | while read FILE; do echo "Updated $OLDVER -> $V" done -# Update linux-rt -COMMIT=1 $NIXPKGS/pkgs/os-specific/linux/kernel/update-rt.sh +# Allowing errors again: one broken update script shouldn't inhibit the +# update of other kernel variants. +set +e -# Update linux-libre -COMMIT=1 $NIXPKGS/pkgs/os-specific/linux/kernel/update-libre.sh +echo Update linux-rt +COMMIT=1 $NIXPKGS/pkgs/os-specific/linux/kernel/update-rt.sh || echo "update-rt failed with exit code $?" -# Update linux-hardened -COMMIT=1 $NIXPKGS/pkgs/os-specific/linux/kernel/hardened/update.py +echo Update linux-libre +COMMIT=1 $NIXPKGS/pkgs/os-specific/linux/kernel/update-libre.sh || echo "update-libre failed with exit code $?" + +echo Update linux-hardened +COMMIT=1 $NIXPKGS/pkgs/os-specific/linux/kernel/hardened/update.py || echo "update-hardened failed with exit code $?"