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

Re: Proper way to apply and test a small kernel patch?



On Thu, 2019-08-22 at 14:20 -0700, John W wrote:
> Hello,
> 
> I want to apply a small patch, then test the new kernel. If it fails,
> I want to be able to return to my previous stable one.
> 
> Towards that end, I am following this guide:
> https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s4.2.2
> 
> That generally worked; the `test-patches` script incorporated my
> patch, compiled the kernel, and produced .deb files in the directory
> above.
> 
> However, when I try to install the .deb it fails (apologies for poor
> line-wrapping, gmail is weak in this regard):
[...]
>     dpkg: error processing archive
> linux-image-4.19.0-5-amd64-unsigned_4.19.37-5+deb10u2a~test_amd64.deb
> (--install):
>      conflicting packages - not installing linux-image-4.19.0-5-amd64-unsigned
>     Errors were encountered while processing:
>      linux-image-4.19.0-5-amd64-unsigned_4.19.37-5+deb10u2a~test_amd64.deb
> 
> 
> So, it seems that this "a~test" kernel is seen as conflicting with my
> current installed kernel.

Yes, unsigned and signed kernel packages with the same ABI version will
install the same files and therefore conflict with each other.  We
should have updated those instructions to cover this.

> How do I overcome this?
> I assume this is an everyday task, but I'm not familiar enough to know
> what to  tweak.
> 
> Maybe I can make it use a fake version number (like "99.99") somewhere?

Yes, you could change the "abiname" in debian/config/defines, which
goes after "4.19.0-" in the package names.

Alternately you can remove the signed package (linux-image-4.19.0-5-
amd64) before installing the newly built, unsigned package.  I don't
advise doing that unless you have another known working kernel version
installed.

Ben.

-- 
Ben Hutchings
Teamwork is essential - it allows you to blame someone else.


Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: