为什么 apt 源选择 linux-signed-hwe 而不是真实内核?

为什么 apt 源选择 linux-signed-hwe 而不是真实内核?

我在跑步

apt-get source linux-image-4.15.0-60-generic

并得到

Picking 'linux-signed-hwe' as source package instead of 'linux-image-4.15.0-60-generic'

我没有得到真正的源代码。为什么会发生这种情况?我该如何获取真正的源代码?

pilot6@Pilot6:~$ apt-cache showsrc linux-signed-hwe
Package: linux-signed-hwe
Format: 3.0 (native)
Binary: linux-image-4.15.0-60-generic, linux-image-4.15.0-60-lowlatency, kernel-signed-image-4.15.0-60-generic-di, linux-image-4.15.0-60-generic-dbgsym, linux-image-4.15.0-60-lowlatency-dbgsym
Architecture: amd64 ppc64el
Version: 4.15.0-60.67~16.04.1
Priority: optional
Section: utils
Maintainer: Canonical Kernel Team <[email protected]>
Standards-Version: 3.9.4
Build-Depends: debhelper (>= 9), lsb-release, python3, python3-apt, sbsigntool [amd64], linux-headers-4.15.0-60-generic (>= 4.15.0-60.67~16.04.1)
Directory: pool/main/l/linux-signed-hwe
Package-List:
 kernel-signed-image-4.15.0-60-generic-di udeb debian-installer extra arch=amd64,ppc64el
 linux-image-4.15.0-60-generic deb kernel optional arch=amd64,ppc64el
 linux-image-4.15.0-60-generic-dbgsym deb devel optional arch=amd64,ppc64el
 linux-image-4.15.0-60-lowlatency deb kernel optional arch=amd64
 linux-image-4.15.0-60-lowlatency-dbgsym deb devel optional arch=amd64
Files:
 d17babc710762248deb90096e5ac6ce8 1829 linux-signed-hwe_4.15.0-60.67~16.04.1.dsc
 21c183f3c7033bc442f3153cb5b15161 10728 linux-signed-hwe_4.15.0-60.67~16.04.1.tar.xz
Checksums-Sha1:
 84f7c9f9de4635d50dd9f18e4bcfd269169b6eaf 1829 linux-signed-hwe_4.15.0-60.67~16.04.1.dsc
 1bde8d27dedba104b8d9c193e39b3fb642d62004 10728 linux-signed-hwe_4.15.0-60.67~16.04.1.tar.xz
Checksums-Sha256:
 61bb3466b3d4f9fbab4894997ee539a0ccfe3ff0990478b1825a17a59851eabb 1829 linux-signed-hwe_4.15.0-60.67~16.04.1.dsc
 5ea5107afd5ae63430a5211c666362293d32ae75a5840cfb0e5549e5ce0326ad 10728 linux-signed-hwe_4.15.0-60.67~16.04.1.tar.xz

pilot6@Pilot6:~$ apt-cache showsrc linux-image-4.15.0-60-generic
Package: linux-signed-hwe
Format: 3.0 (native)
Binary: linux-image-4.15.0-60-generic, linux-image-4.15.0-60-lowlatency, kernel-signed-image-4.15.0-60-generic-di, linux-image-4.15.0-60-generic-dbgsym, linux-image-4.15.0-60-lowlatency-dbgsym
Architecture: amd64 ppc64el
Version: 4.15.0-60.67~16.04.1
Priority: optional
Section: utils
Maintainer: Canonical Kernel Team <[email protected]>
Standards-Version: 3.9.4
Build-Depends: debhelper (>= 9), lsb-release, python3, python3-apt, sbsigntool [amd64], linux-headers-4.15.0-60-generic (>= 4.15.0-60.67~16.04.1)
Directory: pool/main/l/linux-signed-hwe
Package-List:
 kernel-signed-image-4.15.0-60-generic-di udeb debian-installer extra arch=amd64,ppc64el
 linux-image-4.15.0-60-generic deb kernel optional arch=amd64,ppc64el
 linux-image-4.15.0-60-generic-dbgsym deb devel optional arch=amd64,ppc64el
 linux-image-4.15.0-60-lowlatency deb kernel optional arch=amd64
 linux-image-4.15.0-60-lowlatency-dbgsym deb devel optional arch=amd64
Files:
 d17babc710762248deb90096e5ac6ce8 1829 linux-signed-hwe_4.15.0-60.67~16.04.1.dsc
 21c183f3c7033bc442f3153cb5b15161 10728 linux-signed-hwe_4.15.0-60.67~16.04.1.tar.xz
Checksums-Sha1:
 84f7c9f9de4635d50dd9f18e4bcfd269169b6eaf 1829 linux-signed-hwe_4.15.0-60.67~16.04.1.dsc
 1bde8d27dedba104b8d9c193e39b3fb642d62004 10728 linux-signed-hwe_4.15.0-60.67~16.04.1.tar.xz
Checksums-Sha256:
 61bb3466b3d4f9fbab4894997ee539a0ccfe3ff0990478b1825a17a59851eabb 1829 linux-signed-hwe_4.15.0-60.67~16.04.1.dsc
 5ea5107afd5ae63430a5211c666362293d32ae75a5840cfb0e5549e5ce0326ad 10728 linux-signed-hwe_4.15.0-60.67~16.04.1.tar.xz

pilot6@Pilot6:~$ grep deb /etc/apt/sources.list
deb http://ru.archive.ubuntu.com/ubuntu/ xenial main restricted
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial main restricted
deb http://ru.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb http://ru.archive.ubuntu.com/ubuntu/ xenial universe
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial universe
deb http://ru.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb http://ru.archive.ubuntu.com/ubuntu/ xenial multiverse
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://ru.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb http://ru.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://ru.archive.ubuntu.com/ubuntu/ xenial-security main restricted
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial-security main restricted
deb http://ru.archive.ubuntu.com/ubuntu/ xenial-security universe
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial-security universe
deb http://ru.archive.ubuntu.com/ubuntu/ xenial-security multiverse
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial-security multiverse
deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

答案1

我找到了解决方案。之前

apt-get source linux-image-$(uname -r)

下载了当前内核的源代码。但由于内核已由 Canonical 签名,因此它已停止,如问题中所述。

现在我们通过以下方式下载内核源代码

apt-get source linux-image-unsigned-$(uname -r)

来源

笔记:为了能够通过 下载软件包源apt,您需要在“软件和更新”应用程序中启用源。默认情况下,此功能是禁用的。

相关内容