2019-05-08 09:32:59 |
Balint Reczey |
bug |
|
|
added bug |
2019-05-08 09:33:12 |
Balint Reczey |
description |
Apt ships VersionedKernelPackages regex patterns in /etc/apt/apt.conf.d/01autoremove from which /etc/kernel/postinst.d/apt-auto-removal generates kernel package name patterns by appending the running kernel version including the flavor like linux-.*-4.15.0-1010-kvm but those generated patterns don't cover versioned kernel package names including the version without the flavor, such as linux-kvm-tools-4.15.0-1012.
Unattended-upgrades generates the patterns in a similar way and also don't cover linux-kvm-tools-4.15.0-1012 and similar packages. |
Apt ships VersionedKernelPackages regex patterns in /etc/apt/apt.conf.d/01autoremove from which /etc/kernel/postinst.d/apt-auto-removal generates kernel package name patterns by appending the running kernel version including the flavor like linux-.*-4.15.0-1010-kvm but those generated patterns don't cover versioned kernel package names including the version without the flavor, such as linux-kvm-tools-4.15.0-1012.
Unattended-upgrades generates the patterns in a similar way and also don't cover linux-kvm-tools-4.15.0-1012 and similar packages. |
|
2019-05-09 12:37:48 |
Francis Ginther |
tags |
|
id-5cd32966e09b5e33d7d193fc |
|
2019-07-12 02:04:36 |
Launchpad Janitor |
unattended-upgrades (Ubuntu): status |
New |
Fix Released |
|
2019-10-18 10:53:02 |
Balint Reczey |
description |
Apt ships VersionedKernelPackages regex patterns in /etc/apt/apt.conf.d/01autoremove from which /etc/kernel/postinst.d/apt-auto-removal generates kernel package name patterns by appending the running kernel version including the flavor like linux-.*-4.15.0-1010-kvm but those generated patterns don't cover versioned kernel package names including the version without the flavor, such as linux-kvm-tools-4.15.0-1012.
Unattended-upgrades generates the patterns in a similar way and also don't cover linux-kvm-tools-4.15.0-1012 and similar packages. |
[Impact]
* Most of the unused kernel packages are automatically removed by u-u, but kernel packages not including the flavor in the name are not removed taking up significant space after some time:
$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-gcp-headers-4.15.0-1018 linux-gcp-headers-4.15.0-1019 linux-gcp-headers-4.15.0-1021 linux-gcp-headers-4.15.0-1024 linux-gcp-headers-4.15.0-1025 linux-gcp-headers-4.15.0-1026 linux-gcp-headers-4.15.0-1027
linux-gcp-headers-4.15.0-1028 linux-gcp-headers-4.15.0-1029 linux-gcp-headers-4.15.0-1030 linux-gcp-headers-4.15.0-1032 linux-gcp-headers-4.15.0-1033 linux-gcp-headers-4.15.0-1034 linux-gcp-headers-4.15.0-1036
linux-gcp-headers-4.15.0-1037 linux-gcp-headers-4.15.0-1042 nplan
0 upgraded, 0 newly installed, 17 to remove and 16 not upgraded.
After this operation, 1234 MB disk space will be freed.
Do you want to continue? [Y/n]
[Test Case]
* A new test case is added to autopkgtest (test/autopkgtest_kernel_patterns.py) to verify that all kernel-related packages are covered having the same version of the running kernel.
* Install linux-gcp-headers-4.15.0-1042 and make it autoremovable
* Run unattended-upgrades
* Observe linux-gcp-headers-4.15.0-1042 being autoremoved with fixed u-u versions.
[Regression Potential]
* With the file name patterns changing u-u may select packages with names matching the patterns but not being versioned kernel packages. In case those packages are autoremovable they are removed by u-u.
To avoid this problem the fix for LP: #1848706 ensures that only linux-related packages are autoremoved in the kernel autoremoval phase.
[Original Bug Text]
Apt ships VersionedKernelPackages regex patterns in /etc/apt/apt.conf.d/01autoremove from which /etc/kernel/postinst.d/apt-auto-removal generates kernel package name patterns by appending the running kernel version including the flavor like linux-.*-4.15.0-1010-kvm but those generated patterns don't cover versioned kernel package names including the version without the flavor, such as linux-kvm-tools-4.15.0-1012.
Unattended-upgrades generates the patterns in a similar way and also don't cover linux-kvm-tools-4.15.0-1012 and similar packages. |
|