Bug 2016630

Summary: Removing old kernel-core leaves modules.builtin.alias.bin under /lib/modules
Product: [Fedora] Fedora Reporter: H.J. Lu <hongjiu.lu>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 35CC: acaringi, adscvr, airlied, alciregi, aros, belegdol, bskeggs, fedoraproject, filbranden, flepied, hdegoede, jarodwilson, jeremy, jforbes, jglisse, jonathan, josef, kernel-maint, lgoncalv, linville, lnykryn, loganjerry, masami256, mchehab, msekleta, noloader, ptalbert, ryncsn, samuel-rhbugs, ssahani, s, steved, systemd-maint, yuwatana, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemd-250.3-1.fc36 systemd-249.11-2.fc35 systemd-249.12-3.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-23 19:27:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
A patch to kernel.spec none

Description H.J. Lu 2021-10-22 12:34:04 UTC
I got

[hjl@gnu-ivb-1 /]$ ls /lib/modules/5.14.10-300.fc35.x86_64/
modules.builtin.alias.bin
[hjl@gnu-ivb-1 /]$ 

after "dnf update".

Comment 1 H.J. Lu 2021-11-18 14:35:45 UTC
Created attachment 1842596 [details]
A patch to kernel.spec

This patch works for me.

Comment 2 Julian Sikorski 2021-11-27 08:03:20 UTC
There are definitely things being left after dnf update;
$ rpm -q kernel-core 
kernel-core-5.15.3-200.s0ix03.fc35.x86_64
kernel-core-5.15.4-200.s0ix01.fc35.x86_64
kernel-core-5.15.5-200.s0ix01.fc35.x86_64
$ du -h --max-depth 1 /lib/modules
32K	/lib/modules/5.14.2-300.fc34.x86_64
32K	/lib/modules/5.14.2-200.s0ix01.fc34.x86_64
32K	/lib/modules/5.14.3-300.s0ix01.fc34.x86_64
32K	/lib/modules/5.14.5-300.s0ix01.fc34.x86_64
32K	/lib/modules/5.14.6-300.s0ix01.fc34.x86_64
32K	/lib/modules/5.14.6-300.s0ix02.fc34.x86_64
32K	/lib/modules/5.14.6-300.s0ix03.fc34.x86_64
32K	/lib/modules/5.14.7-200.s0ix01.fc34.x86_64
32K	/lib/modules/5.14.9-200.s0ix01.fc34.x86_64
32K	/lib/modules/5.14.10-200.s0ix01.fc34.x86_64
32K	/lib/modules/5.14.12-200.s0ix01.fc34.x86_64
32K	/lib/modules/5.14.13-200.s0ix01.fc34.x86_64
32K	/lib/modules/5.14.14-200.s0ix01.fc34.x86_64
32K	/lib/modules/5.14.15-200.s0ix01.fc34.x86_64
32K	/lib/modules/5.14.15-200.s0ix02.fc34.x86_64
32K	/lib/modules/5.14.16-201.s0ix01.fc34.x86_64
32K	/lib/modules/5.14.17-201.s0ix01.fc34.x86_64
32K	/lib/modules/5.15.1-200.s0ix01.fc34.x86_64
32K	/lib/modules/5.14.16-301.fc35.x86_64
32K	/lib/modules/5.15.1-300.s0ix01.fc35.x86_64
32K	/lib/modules/5.15.2-300.s0ix01.fc35.x86_64
32K	/lib/modules/5.15.2-200.s0ix02.fc35.x86_64
32K	/lib/modules/5.16.0-0.rc1.20211115git8ab774587903.14.fc36.x86_64
32K	/lib/modules/5.16.0-0.rc1.20211118git8ab774587903.200.s0ix01.fc35.x86_64
32K	/lib/modules/5.15.3-200.s0ix01.fc35.x86_64
32K	/lib/modules/5.15.3-200.s0ix02.fc35.x86_64
897M	/lib/modules/5.15.3-200.s0ix03.fc35.x86_64
898M	/lib/modules/5.15.4-200.s0ix01.fc35.x86_64
86M	/lib/modules/5.15.5-200.s0ix01.fc35.x86_64
1,9G	/lib/modules

Comment 3 Justin M. Forbes 2022-01-14 17:45:15 UTC
The patch to kernel.spec is incorrect. These files are generated by depmod and not packaged by the kernel. The correct place for a fix is in systemd: /usr/lib/kernel/install.d/50-depmod.install

Reassigning to systemd so this can get a proper fix.

Comment 4 Justin M. Forbes 2022-01-14 17:46:10 UTC
*** Bug 2020916 has been marked as a duplicate of this bug. ***

Comment 5 Jeffrey Walton 2022-01-14 18:06:43 UTC
*** Bug 2023100 has been marked as a duplicate of this bug. ***

Comment 6 Artem S. Tashkinov 2022-01-14 18:09:25 UTC
Also, also!

cd /usr/share/doc/kernel-keys

ls -la
total 112
drwxr-xr-x.  20 root root  4096 Nov  7 10:50 .
drwxr-xr-x. 853 root root 32768 Nov  5 00:01 ..
drwxr-xr-x.   2 root root  4096 Mar 12  2021 5.10.13-200.fc33.x86_64
drwxr-xr-x.   2 root root  4096 Feb 28  2021 5.10.17-200.fc33.x86_64
drwxr-xr-x.   2 root root  4096 Mar 24  2021 5.10.19-200.fc33.x86_64
drwxr-xr-x.   2 root root  4096 May 31 15:41 5.10.23-200.fc33.x86_64
drwxr-xr-x.   2 root root  4096 Jan 23  2021 5.10.7-200.fc33.x86_64
drwxr-xr-x.   2 root root  4096 Feb  7  2021 5.10.9-201.fc33.x86_64
drwxr-xr-x.   2 root root  4096 Nov  4 23:35 5.14.15-300.fc35.x86_64
drwxr-xr-x.   2 root root  4096 Jan 11  2020 5.4.10-200.fc31.x86_64
drwxr-xr-x.   2 root root  4096 Feb 24  2020 5.4.12-200.fc31.x86_64
drwxr-xr-x.   2 root root  4096 Jan 23  2020 5.4.8-200.fc31.x86_64
drwxr-xr-x.   2 root root  4096 Jan 12  2020 5.5.0-0.rc5.git2.1.fc32.x86_64
drwxr-xr-x.   2 root root  4096 Aug  4  2020 5.6.16-300.fc32.x86_64
drwxr-xr-x.   2 root root  4096 Jun 15  2020 5.6.8-300.fc32.x86_64
drwxr-xr-x.   2 root root  4096 Sep  1  2020 5.7.6-201.fc32.x86_64
drwxr-xr-x.   2 root root  4096 Nov 30  2020 5.8.13-200.fc32.x86_64
drwxr-xr-x.   2 root root  4096 Oct 10  2020 5.8.4-200.fc32.x86_64
drwxr-xr-x.   2 root root  4096 Feb  6  2021 5.9.13-200.fc33.x86_64
drwxr-xr-x.   2 root root  4096 Dec 16  2020 5.9.8-100.fc32.x86_64

Comment 7 Justin M. Forbes 2022-01-14 18:22:22 UTC
(In reply to Artem S. Tashkinov from comment #6)
> Also, also!
> 
> cd /usr/share/doc/kernel-keys
> 
> ls -la
> total 112
> drwxr-xr-x.  20 root root  4096 Nov  7 10:50 .
> drwxr-xr-x. 853 root root 32768 Nov  5 00:01 ..
> drwxr-xr-x.   2 root root  4096 Mar 12  2021 5.10.13-200.fc33.x86_64
> drwxr-xr-x.   2 root root  4096 Feb 28  2021 5.10.17-200.fc33.x86_64
> drwxr-xr-x.   2 root root  4096 Mar 24  2021 5.10.19-200.fc33.x86_64
> drwxr-xr-x.   2 root root  4096 May 31 15:41 5.10.23-200.fc33.x86_64
> drwxr-xr-x.   2 root root  4096 Jan 23  2021 5.10.7-200.fc33.x86_64
> drwxr-xr-x.   2 root root  4096 Feb  7  2021 5.10.9-201.fc33.x86_64
> drwxr-xr-x.   2 root root  4096 Nov  4 23:35 5.14.15-300.fc35.x86_64
> drwxr-xr-x.   2 root root  4096 Jan 11  2020 5.4.10-200.fc31.x86_64
> drwxr-xr-x.   2 root root  4096 Feb 24  2020 5.4.12-200.fc31.x86_64
> drwxr-xr-x.   2 root root  4096 Jan 23  2020 5.4.8-200.fc31.x86_64
> drwxr-xr-x.   2 root root  4096 Jan 12  2020 5.5.0-0.rc5.git2.1.fc32.x86_64
> drwxr-xr-x.   2 root root  4096 Aug  4  2020 5.6.16-300.fc32.x86_64
> drwxr-xr-x.   2 root root  4096 Jun 15  2020 5.6.8-300.fc32.x86_64
> drwxr-xr-x.   2 root root  4096 Sep  1  2020 5.7.6-201.fc32.x86_64
> drwxr-xr-x.   2 root root  4096 Nov 30  2020 5.8.13-200.fc32.x86_64
> drwxr-xr-x.   2 root root  4096 Oct 10  2020 5.8.4-200.fc32.x86_64
> drwxr-xr-x.   2 root root  4096 Feb  6  2021 5.9.13-200.fc33.x86_64
> drwxr-xr-x.   2 root root  4096 Dec 16  2020 5.9.8-100.fc32.x86_64

Ignore this comment, it is not a part of systemd and was fixed in the kernel package in 2020, which is why there is no directory between 5.10 and 5.14.

Comment 8 Yu Watanabe 2022-01-14 18:41:24 UTC
Fix is waiting in https://github.com/systemd/systemd/pull/22127

Comment 9 Fedora Update System 2022-04-12 09:05:58 UTC
FEDORA-2022-1bf06aa328 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-1bf06aa328

Comment 10 Fedora Update System 2022-04-13 15:18:44 UTC
FEDORA-2022-1bf06aa328 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-1bf06aa328`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-1bf06aa328

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2022-04-14 16:40:21 UTC
FEDORA-2022-1bf06aa328 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-1bf06aa328`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-1bf06aa328

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2022-04-23 19:27:35 UTC
FEDORA-2022-1bf06aa328 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Jeffrey Walton 2022-04-25 12:45:02 UTC
I believe this problem was fixed based on my scripts. With both kernel-5.16.20-200.fc35.x86_64 and kernel-5.17.4-200.fc35.x86_64 kernels installed, the old kernel-5.16.20-200.fc35.x86_64 was cleanly removed. There were no artifacts remaining in /lib/modules.

Thanks for fixing the cleanup.

Comment 14 Fedora Update System 2022-04-28 20:41:42 UTC
FEDORA-2022-01079468a3 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-01079468a3

Comment 15 Fedora Update System 2022-04-29 08:09:06 UTC
FEDORA-2022-01079468a3 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-01079468a3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-01079468a3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2022-04-30 18:21:13 UTC
FEDORA-2022-01079468a3 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-01079468a3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-01079468a3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2022-05-22 01:23:01 UTC
FEDORA-2022-01079468a3 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.