[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Guide to correct (or best) way to build and provide patches for the debian kernel



If anybody out there can help this confused newbie it would be appreciated. 

I have been building a buster-backports 5.2.9 kernel with some backported upstream kernel patches for the audio driver. I raised a bug to get the patches with the fix included and I've just received some guidance that providing a single patch combining all the backported commits I've used isn't the best way to do things. I was pointed at https://salsa.debian.org/kernel-team/linux/merge_requests/11 as an example to follow (which was great).

So...I started again - thinking this shouldn't be a big deal. I have my 7 original upstream commits and it shouldn't be too hard to just leave them as they are instead of combining them....but following the example I needed the "debian" directory with the patches/changelog/series/configs files  to do this all...(I have previously just been using unpacking /usr/src/linux-source-5.2.tar.xz and then applying my patches and doing 'make deb-pkg')

Did some searching and I came across a guide that suggested doing "apt source linux" so tried that (I used 'apt source linux-source-5.2') and lo-and-behold the debian directory appeared with my kernel source. I thought this was great *but* the build just doesn't work and the errors are to me somewhat cryptic and to be honest I figured I was going off down a rathole pointlessly (as an aside the error is 'unrepresentable changes to source').

I've been looking for an authoritative guide on how I should be building a debian kernel and providing patches in such a way that the over-worked debian kernel maintainers can easily go "yep, that's all good, add it" and I just can't find that detail. I'm sure it must exist as there's a load of documentation out there. I thought the kernel handbook (https://kernel-team.pages.debian.net/kernel-handbook) would be the gospel but it doesn't cover how to provide nice clean patches that the maintainers would like (which to me seems important)

Any pointers or insight would be deeply appreciated. FWIW I have two bugs (#940726, #940825) that are the root of all this and whilst my priority is to get the patches I submitted with those included anything I can learn along the way to make the process faster and more helpful to maintainers/community would be great. 

Thanks
Mark

PS - I do realise using buster-backports rather than main is a bit non-standard. Unfortunately I need to be there as I have a customer I'm supporting who needs to use 5.2.9 (or newer) and a short timeframe. 


Reply to: