Thorsten Glaser <t.glaser@tarent.de> (2021-06-08):
> > As long as you use 'linux-image-amd64' you will get the latest supported
> > kernel version. But you will need this both times, once for the stable
> > release and once for the buster-backport release, if you want both
> > kernel versions get installed.
>
> That’s going to be tricky though. Renaming… would be opening a can of
> worms for various reasons. In general, for any given package, you have
> to decide whether you use a backport or not.
>
> You could do an upgrade/downgrade dance though:
>
> $ sudo apt-get update
> $ sudo apt-get install linux-image-amd64/buster
> $ sudo apt-get -t buster-backports install linux-image-amd64
> $ sudo apt-get --purge dist-upgrade
>
> This will, in order, update the package lists, downgrade the kernel
> metapackage pulling in the latest stable kernel by ABI, upgrade the
> kernel metapackage pulling in the latest backports kernel by ABI,
> then upgrade all remaining packages (including upgrades to the kernel
> packages that didn’t change the ABI).
>
> Untested, I can’t think of a system running a backports kernel atm.
I think I'd be wary of such an upgrade/downgrade dance, and prefer
keeping linux-image-amd64 from stable installed at all times, and
handling backports specifically. The following seems to do the trick
on buster, to be confirmed in bullseye once we have a linux backport
there:
kibi@hamburg:~$ apt-cache show linux-image-amd64/buster-backports | sed 's/\(linux-\(image\|signed\)-amd64\).*/\1-backports-via-equivs/' > control && equivs-build control
dh_testdir
dh_testroot
dh_prep
dh_testdir
dh_testroot
dh_install
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package 'linux-image-amd64-backports-via-equivs' in '../linux-image-amd64-backports-via-equivs_5.10.24-1~bpo10+1_amd64.deb'.
The package has been created.
Attention, the package has been created in the current directory,
not in ".." as indicated by the message above!
kibi@hamburg:~$ sudo apt install ./linux-image-amd64-backports-via-equivs_5.10.24-1~bpo10+1_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'linux-image-amd64-backports-via-equivs' instead of './linux-image-amd64-backports-via-equivs_5.10.24-1~bpo10+1_amd64.deb'
The following additional packages will be installed:
linux-image-5.10.0-0.bpo.5-amd64
Suggested packages:
linux-doc-5.10 debian-kernel-handbook
The following NEW packages will be installed:
linux-image-5.10.0-0.bpo.5-amd64 linux-image-amd64-backports-via-equivs
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 53.3 MB/53.3 MB of archives.
After this operation, 297 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Proposing that because all we want is the packages listed in Depends,
AFAICT the package (which is a metapackage, not a virtual package as
mentioned earlier in the thread) only ships a presubj for reportbug and
a symlink under /usr/share/doc (plus some maintainer scripts related to
that).
Finally, the explicit name helps keep track of the hack, and get rid of
it if/when it's no longer required.
Cheers,
--
Cyril Brulebois (kibi@debian.org) <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant
Attachment:
signature.asc
Description: PGP signature