Suggestion
Firstly, thanks for all this! I was completely fine with the livepatch tip, but this has gotten totally out of hand. Also, I don't think that "sudo pro config set apt_news=false" works.
Now that I have to do all this junk, I find myself inclined to want said live patch tip gone as well. This is easily accomplished by editing /usr/lib/python3/dist-packages/UpdateManager/Dialogs.py and cobbling this function to return False.
def _is_livepatch_supported(self):
return False # Cut it out, #@ it!
di = distro_info.UbuntuDistroInfo()
codename = get_dist()
return di.is_lts(codename)
Credit: MikeR
Changed my mind, apt_news=false may help after all.
Suggestion #2: 24.04 patch is trivial, comment out line 24, the function 278-315, and 486.
I think our line numbers are differing a bit (I'm also on 24.04). 24 is a blank line, 278-315 spans the middle of several functions for me, and the file ends at 475. Maybe my file is out of date
Should be:
27 from gi.repository import GObject 28 #import uaclient.api.u.pro.packages.updates.v1 as ua
287 # def _get_ua_security_status(self): 288 # self.ua_security_packages = [] 289 # self.ua_updates = [] 290 # t = threading.Thread(target=self._fetch_ua_updates, daemon=True) (yada - till end of function)
486 # self._get_ua_security_status()
I may have lied...
Traceback (most recent call last): File "/usr/bin/software-properties-gtk", line 37, infrom softwareproperties.gtk.SoftwarePropertiesGtk import SoftwarePropertiesGtk File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 58, in from .UbuntuProPage import UbuntuProPage File "/usr/lib/python3/dist-packages/softwareproperties/gtk/UbuntuProPage.py", line 27, in from .DialogUaAttach import DialogUaAttach File "/usr/lib/python3/dist-packages/softwareproperties/gtk/DialogUaAttach.py", line 25, in from uaclient.api.u.pro.attach.magic.initiate.v1 import initiate
/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py comment out 58 #from .UbuntuProPage import UbuntuProPage and at the end 1668 # def init_ubuntu_pro(self): 1669 # self.ubuntu_pro_page = UbuntuProPage(self)
Will THAT do it? Hope so. Stay tuned.
Latest updates to make software updater work:
In /usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py Comment this line out:
28 #import uaclient.api.u.pro.packages.updates.v1 as ua
set this to return:
287 def _get_ua_security_status(self): 288 return
In /usr/lib/python3/dist-packages/UpdateManager/Dialogs.py add return False
153 def _is_livepatch_supported(self): 154 return False
Thank you, do you (or anyone else) know which releases are affected?
I'm using 24.04, but I imagine it should be quite similar for other versions
Last I checked, this is still valid as well:
/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py comment out 58 #from .UbuntuProPage import UbuntuProPage and at the end 1668 # def init_ubuntu_pro(self): 1669 # self.ubuntu_pro_page = UbuntuProPage(self)