New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linux: kernel: Add linux-ck for 4.14, 4.19 and 5.0 #59105
Conversation
pkgs/top-level/all-packages.nix
Outdated
# linux-ck kernels. | ||
linuxPackages_4_14_ck = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_14_ck); | ||
linuxPackages_4_19_ck = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_19_ck); | ||
linuxPackages_5_0_ck = recurseIntoAttrs (linuxPackagesFor pkgs.linux_5_0_ck); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really want these aliases ?
what is "ck" ? I have several ideas on the top of my head but none are realistic candidates xD |
I honestly don't know. That's what the patches are called. I assume that's the first and lastname of the author. |
Here's some explanation of what it is, though without etymology: https://wiki.archlinux.org/index.php/Linux-ck |
|
||
ck_5_0 = rec { | ||
name = "patch-5.0-ck1.xz"; | ||
patch = fetchpatch { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error: Normalized patch '/build/76863d16a08e1b3c726b6c965f1bb7c672bd7317776810121062b13f9ea26780' is empty (while the fetched file was not)!
Did you maybe fetch a HTML representation of a patch instead of a raw patch?
Fetched file was:
...<BINARY>
Can't apply because it's still an archive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the time and resources to test-build this now... so wait for it, I'm tryin' it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So yes, the problem is indeed that I fetch .xz and not .patch ... I am working on a solution right now.
I honestly don't know how to do better and unfortunately it does not even work. |
thing I did to unpack the patch: diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 1dacfe87486..ed557c12fd9 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -1,4 +1,4 @@
-{ fetchpatch, fetchurl }:
+{ stdenv, fetchpatch, fetchurl }:
rec {
bridge_stp_helper =
@@ -89,13 +89,22 @@ rec {
{ fn = "0016-Add-ck1-version.patch"; h = "1k1dd3bxm3vf6afzbgw64ddmsng0w4w9l0yg6kb3fz82l22cwpc8"; }
];
- ck_4_19 = rec {
- name = "patch-4.19-ck1";
- patch = fetchurl {
- inherit name;
- url = http://ck.kolivas.org/patches/4.0/4.19/4.19-ck1/patch-4.19-ck1.xz;
- sha256 = "77863d16a08e1b3c726b6c965f1bb7c672bd7317776810121062b73f9ea26780";
+ ck_4_19 = let
+ unpackedPatch = stdenv.mkDerivation rec {
+ name = "4.19-ck1";
+
+ src = fetchurl {
+ url = http://ck.kolivas.org/patches/4.0/4.19/4.19-ck1/patch-4.19-ck1.xz;
+ sha256 = "77863d16a08e1b3c726b6c965f1bb7c672bd7317776810121062b73f9ea26780";
+ };
+
+ unpackPhase = "true";
+ installPhase = ''
+ unxz -c $src > $out
+ '';
};
+ in rec {
+ patch = unpackedPatch;
};
ck_5_0 = rec {
Maybe do something in Or perhaps we can just get a compare patch from github |
Hm, github would be a nice idea, although I guess it is harder to find the actual patchset from github (for all the kernels) instead of just going to the website. I'll checkout your patch now! |
''; | ||
}; | ||
in rec { | ||
patch = unpackedPatch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately (@worldofpeace) does the patchset not apply on the kernel sources.
I'm not sure why, though. Maybe the kernel is too new (as in patchlevel-version)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[...]
Hunk #1 succeeded at 155 (offset 24 lines).
patching file sound/usb/line6/pcm.c
patching file tools/objtool/Makefile
Hunk #1 FAILED at 31.
1 out of 1 hunk FAILED -- saving rejects to file tools/objtool/Makefile.rej
builder for '/nix/store/qb8k5whqxapcb3yknyqssfrfqpljif9p-linux-config-4.19.34.drv' failed with exit code 1
cannot build derivation '/nix/store/lsdl2wy98a73d1s7rvl4qknnjp2s2ha6-linux-4.19.34.drv': 1 dependencies couldn't be built
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I don't think the author keep these patches in sync for very long.
So we might only be able to do patches for the latest, or fetch from places that have corrected the patch so it can apply.
@worldofpeace you're btw welcome to send me patches directly (as in "cherry-pick this commit") or tell me to pull from a branch of yours - no need to paste diffs here (which makes the whole conversation unnecessarily long). |
Here we go with another approach. Tell me if this looks good for you and I'll rebase and remove the unnecessary commits. |
Hm, I do not understand the borg error message... |
@matthiasbeyer This sounds like it might work. Though the rev's are a branch, so it's probably not stable. Maybe pin them to a revision, or apply the patches to the kernel sources that the fork is at. |
Maybe once we clean it up it'll magic resolve itself 😄 |
42314b6
to
f4746da
Compare
Lets see... |
nope. |
f4746da
to
61dfb6d
Compare
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
5788a9f
to
6c8b2d2
Compare
Any ideas here? |
The kernel built for me last time I checked. Though
Still stands and eval is failing (you should probably do Also, since this is an older version of the kernels because the patches aren't kept in sync for long that can have security implications... |
Motivation for this change
Having linux-ck kernels in nixpkgs.
Stolen from https://github.com/kisonecat/nixos-linux-ck/blob/master/kernel.nix
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Evaluation will fail because of
pkgs/os-specific/linux/tbs/default.nix
being broken.