Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

linux: Fix update script

The script was wrecking `modDirVersion`, putting them back and
ensuring it will not break again.

(cherry picked from commit 922c07d2d2a857a5cf1685a2178dd3fd122f8b46)

authored by

Török Edwin and committed by
Joachim F
534d8ff7 5d1c54ff

+4 -4
+1
pkgs/os-specific/linux/kernel/linux-4.14.nix
··· 6 version = "4.14.112"; 7 8 # modDirVersion needs to be x.y.z, will automatically add .0 if needed 9 10 # branchVersion needs to be x.y 11 extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));
··· 6 version = "4.14.112"; 7 8 # modDirVersion needs to be x.y.z, will automatically add .0 if needed 9 + modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg; 10 11 # branchVersion needs to be x.y 12 extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));
+1
pkgs/os-specific/linux/kernel/linux-4.19.nix
··· 6 version = "4.19.35"; 7 8 # modDirVersion needs to be x.y.z, will automatically add .0 if needed 9 10 # branchVersion needs to be x.y 11 extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));
··· 6 version = "4.19.35"; 7 8 # modDirVersion needs to be x.y.z, will automatically add .0 if needed 9 + modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg; 10 11 # branchVersion needs to be x.y 12 extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));
+1
pkgs/os-specific/linux/kernel/linux-5.0.nix
··· 6 version = "5.0.8"; 7 8 # modDirVersion needs to be x.y.z, will automatically add .0 if needed 9 10 # branchVersion needs to be x.y 11 extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));
··· 6 version = "5.0.8"; 7 8 # modDirVersion needs to be x.y.z, will automatically add .0 if needed 9 + modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg; 10 11 # branchVersion needs to be x.y 12 extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));
+1 -4
pkgs/os-specific/linux/kernel/update.sh
··· 48 sed -i "s/sha256 = \".*\"/sha256 = \"$HASH\"/g" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE 49 50 # Rewrite the expression 51 - sed -i -e '/version = /d' -e '/modDirVersion = /d' $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE 52 - if grep -q '^[0-9]\+.[0-9]\+$' <<< "$V"; then 53 - sed -i "\#buildLinux (args // rec {#a \ modDirVersion = \"${V}.0\";" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE 54 - fi 55 sed -i "\#buildLinux (args // rec {#a \ version = \"$V\";" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE 56 57 # Commit the changes
··· 48 sed -i "s/sha256 = \".*\"/sha256 = \"$HASH\"/g" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE 49 50 # Rewrite the expression 51 + sed -i -e '/version = /d' $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE 52 sed -i "\#buildLinux (args // rec {#a \ version = \"$V\";" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE 53 54 # Commit the changes