Bug 5793

Summary: F33: Uninstallation of Virtual Box does not have proper auto-remove functionality; leaves behind a tainted kernel in its wake.
Product: Fedora Reporter: Andrew Thurman <ajtbecool>
Component: VirtualBoxAssignee: Sérgio Basto <sergio>
Status: REOPENED ---    
Severity: enhancement CC: leigh123linux, xsaipc0d
Priority: P1    
Version: unspecified   
Hardware: x86_64   
OS: GNU/Linux   
namespace:

Description Andrew Thurman 2020-10-14 22:42:38 CEST
Steps to reproduce:
1. Install VB (cli or gui/GNOME software)
2. Application + Out of tree kernel modules (VirtualBox-kmodsrc VirtualBox-server akmod-VirtualBox kmod-VirtualBox-5.8.14-300) install like normal.
3. Uninstall application (cli or gui)

Expected result: VB is removed, including all orphaned deps and out of tree/tainted modules.

Actual Result: VB leaves behind tainted modules ~~possibly~~ probably unbeknownst to the end user, until at least a kernel panic/oops.

Temporary fix: ` sudo dnf remove VirtualBox-kmodsrc VirtualBox-server akmod-VirtualBox`

You may also need to include `kmod-VirtualBox-YOURKERNELVERSION-300`

Note: `dnf autoremove` does not work
Comment 1 Sérgio Basto 2020-10-14 23:52:04 CEST
dnf remove  VirtualBox-server  removes all kmods 


Removing:
 VirtualBox-server                               x86_64         
Removing dependent packages:
 VirtualBox                                      x86_64 
 VirtualBox-webservice                           x86_64 
 akmod-VirtualBox                                x86_64  
 kmod-VirtualBox-5.8.12-100.fc31.x86_64          x86_64  
 kmod-VirtualBox-5.8.13-100.fc31.x86_64          x86_64
 kmod-VirtualBox-5.9.0-36.fc34.x86_64            x86_64
Comment 2 Andrew Thurman 2020-10-15 14:12:55 CEST
Then I feel like `VirtualBox` shouldn't be the AppStream package, but rather `VirtualBox-server`. If you don't have proper dependency management in GUIs, you shouldn't include the AppStream metadata. I'm not a package mainatiner so maybe I'm talking BS, but it just feels like what's best for the end user experience.
Comment 3 Sérgio Basto 2020-10-15 15:28:17 CEST
VirtualBox is the Qt part (graphics), which of course needs the server package , but server package doesn't need the graphics package .
Comment 4 Nicolas Chauvet 2020-12-01 13:57:35 CET
I think VirtualBox-kmodsrc will stay behind, maybe there is a need to enforce a dependency so it get removed if uneeded also...

I would suggest to use something like: with fedora or rhel>7
%package kmodsrc
...
Requires: VirtualBox-server = %{evr} or VitualBox-guest = %{evr}

(to be tested)
Comment 5 Sérgio Basto 2021-11-28 13:52:51 CET
it is not fixed