flat screen monitor turned-on

My own kernel repo

Debian is awesome. Really. I love Debian – but sometimes the well-aged kernel is a tad too old for me. Currently it’s about fstrim and as I’m already doing my own Gentoo-Kernel for Debian, I had to do it properly and build an upstream ‘vanilla’ kernel too. What I dislike about my current setup is having to install the deb-files manually.

To put an end to this manual installation I had to do a meta-package – a debian package that is just dependencies. To do so, I used a program called ‘equivs’, which is installed by the following command:

apt install equivs

As the package is there, it’s time to generate the initial config for our package

equivs-control my-kernel-package

This command gives us a template file that’s to be edited to fit our needs. Pay attention to the line saying “Depends:” as that’s where we add our Debian packages. As of writing this, the current config looks like that:

### Commented entries have reasonable defaults.
### Uncomment to edit them.
# Source: <source package name; defaults to package name>
Section: misc
Priority: optional
# Homepage: <enter URL here; no default>
Standards-Version: 5.9.10

Package: vanilla-kernel
Version: 5.9.10
Maintainer: Viktoria Rei Bauer <debian@example.com>
# Pre-Depends: <comma-separated list of packages>
Depends: linux-image-5.9.10,linux-headers-5.9.10,linux-libc-dev
# Recommends: <comma-separated list of packages>
# Suggests: <comma-separated list of packages>
# Provides: <comma-separated list of packages>
# Replaces: <comma-separated list of packages>
Architecture: amd64
# Multi-Arch: <one of: foreign|same|allowed>
# Copyright: <copyright file; defaults to GPL2>
# Changelog: <changelog file; defaults to a generic changelog>
# Readme: <README.Debian file; defaults to a generic one>
# Extra-Files: <comma-separated list of additional files for the doc directory>
# Links: <pair of space-separated paths; First is path symlink points at, second is filename of link>
# Files: <pair of space-separated paths; First is file to include, second is destination>
# <more pairs, if there's more than one file to include. Notice the starting space>
Description: <short description; defaults to some wise words>
Meta-Package for vanilla kernel built based on debian .config

Now it’s time to build the actual package by calling

equivs-build my-kernel-package

The result is a slick deb-file that can be imported in your repository. I use Sonatype Nexus.

Clients just need to add the repository to their sources.list and add the PGP key and we are ready to roll.


Leave a Reply

Your email address will not be published. Required fields are marked *