Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Custom Kernel Packaging

User discussion about Debian Development, Debian Project News and Announcements. Not for support questions.
Post Reply
Message
Author
tvynr
Posts: 24
Joined: 2006-08-22 16:22

Custom Kernel Packaging

#1 Post by tvynr »

Hello, there! I have a couple beginner's questions about kernel packaging. I'm building a custom Debian kernel based on the bcache fork by Kent Overstreet (http://bcache.evilpiepirate.org/). I've read through the relevant-seeming part of the Debian Kernel Handbook (http://kernel-handbook.alioth.debian.or ... tasks.html) and I think I have a build process in place.

This isn't quite as simple as dropping a new patch file in because I want to be able to produce a package for the latest Debian Linux kernel with the latest bcache changes patched in. So I've written a script that (1) gets the latest kernel source via apt-get source linux, (2) generates a bcache patch using the bcache git repo, (3) drops the patch into the Debian kernel sources using quilt, and (4) builds the kernel. bcache changes the kernel ABI and I don't want to have to linearize a versioning scheme for that, so I'm using an ABI number based on the bcache git repo timestamps (prefixed, of course, with "bcache").

So my first question is: is there a better, more sane way to do this? I don't view this as a single fork from the official Debian kernels as much as I do a patch to each of them. It just seems that there should be a simpler way to have Debian build a patched kernel for me. (I know that Section 4.2.2 of the Kernel Handbook describes a way to test patches, but I was looking for something a bit more distributable than that.)

My second question revolves around distribution. I might want to throw these packages into a Debian repository of my very own to save other people the effort. Should I be marking my kernel packages as experimental in the changelog? I doubt I'm supposed to use "UNDISTRIBUTED", but I can't seem to find anywhere that talks about which distributions should be used by third-party repository maintainers.

Thanks much for reading. I'm sort of diving into this head-first. I don't expect that my packages will ever be mainline (or as polished or nice as the mainline packages are), but I wanted to throw together a solution for using bcache until it is merged into the mainline Linux kernel (if it ever is). And now that I've gone to this much effort, I sort of feel like amortizing that cost. :)

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: Custom Kernel Packaging

#2 Post by llivv »

I'm still struggling to understand how debian kernel works.
I'm not sure I understand all of what you are describing above either.
But I have read a lot of requests and wishlist bugs asking for a project patch or patch set to
be included in the debian kernel that have not made it into mainline upstream yet.
I don't know how obvious it is to others why the kernel team usually do not include
"project patch[es] / patch sets that have not made it into mainline yet" into the debian kernel.
For a project like yours I'd recommend the kernel wiki

http://wiki.debian.org/DebianKernel

kernelnewbies
http://kernelnewbies.org/
and - if you can deal with the volume of mail generated on the mailing list.
http://lists.debian.org/debian-kernel/
In my experience the kernel team is usually extremely generous
with answering questions on that Gargantua list.

It sure is different than coding html, isn't it? :wink:
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

tvynr
Posts: 24
Joined: 2006-08-22 16:22

Re: Custom Kernel Packaging

#3 Post by tvynr »

Sounds good; I'll go ahead and relay my question to the mailing list. :) It seems like there's pretty good documentation on how to create one patched kernel, but they don't seem to have any information on maintaining a patch series parallel to kernel development on the wiki pages or in the handbook.

Thanks for the response. :)

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: Custom Kernel Packaging

#4 Post by llivv »

parallel patch sets are usually handled by the kernel team themselves, for obvious reasons.
At least it's obvious to me after subscribing to the list for a year now.
They are understaffed for the workload.
Same with the X team.
I've read several requests for patch sets to be included in the debian kernel
and unless there is a strong stable upstream contact, the chances are very small it will get into the debian kernel.
Mainline is the best way to get anything included.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

tvynr
Posts: 24
Joined: 2006-08-22 16:22

Re: Custom Kernel Packaging

#5 Post by tvynr »

Agreed entirely. I certainly wouldn't want to put any pressure on the Debian team and, as far as I can tell, bcache is a while from being mainline. The primary bcache developer has looked into mainline inclusion and I believe that he's working on this task. My objective is to create a small Debian repository where this experimental work can be used for the time being. In an ideal world, my repository would be obviated by the inclusion of bcache into mainline; that said, it would be useful up until that happened.

It has occurred to me that what I'm doing is a little outside of the Debian packaging norm. I'm essentially proposing to maintain a parallel fork of a Debian package, which is something that the packaging system and tools aren't really designed to do. As a result, my current process (downloading the source package, patching it, tweaking the version number, and building that) is likely to be the right choice (although the right move might to be to treat bcache as a single patch featureset rather than a simple patch, since that might fix the package naming and versioning issues).

In any case, I wouldn't want to tax the already overworked and diligent Debian kernel team with this problem; I mostly just want to see if they have a framework already in place that does what I'm talking about. I'm guessing the answer is "no" now that I've realized how unusual this must be. :)

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: Custom Kernel Packaging

#6 Post by llivv »

Your efforts are far beyond mine in respect to becoming an official contributing member of the debian community.
I believe ( althought I have not started this process myself) that you would be best advised to use the
debian mentors mailing list, etc.
And best of luck with your project. It seems to me to be an adventurous one from what I've read so far

http://mentors.debian.net/

http://www.v7w.com/debian/debian-mentors_FAQ.html
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

sebastian
Posts: 1
Joined: 2013-02-22 13:15

Re: Custom Kernel Packaging

#7 Post by sebastian »

HI tvynr,

how is your project advancing? I would be very interested to try your kernel.
Please let me know if I could assist.

Cheers,
Sebastian

Post Reply