From 6ba03a350a3b476d43218b72959c3902a575ba20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Guzm=C3=A1n?= Date: Fri, 27 Jan 2023 20:38:00 +0000 Subject: [PATCH] software-update: update removal of subscriptions and proposed tab. --- .../aramo_rm_livepatch.patch | 398 ---------------- .../disable-livepatch.patch | 87 ---- .../remove_livepatch_from_gtk_uiv1_1.patch | 260 ----------- .../remove_proposed_updates.patch | 126 ++++++ .../remove_ubuntu_suscription_tab.patch | 427 ++++++++++++++++++ helpers/make-software-properties | 18 +- 6 files changed, 560 insertions(+), 756 deletions(-) delete mode 100644 helpers/DATA/software-properties/aramo_rm_livepatch.patch delete mode 100644 helpers/DATA/software-properties/disable-livepatch.patch delete mode 100644 helpers/DATA/software-properties/remove_livepatch_from_gtk_uiv1_1.patch create mode 100644 helpers/DATA/software-properties/remove_proposed_updates.patch create mode 100644 helpers/DATA/software-properties/remove_ubuntu_suscription_tab.patch diff --git a/helpers/DATA/software-properties/aramo_rm_livepatch.patch b/helpers/DATA/software-properties/aramo_rm_livepatch.patch deleted file mode 100644 index f8afa78..0000000 --- a/helpers/DATA/software-properties/aramo_rm_livepatch.patch +++ /dev/null @@ -1,398 +0,0 @@ ---- data/gtkbuilder/main.ui 2022-07-08 00:34:50.006995542 +0000 -+++ data/gtkbuilder/main.ui.fix 2022-07-08 00:41:41.280173798 +0000 -@@ -1221,395 +1221,6 @@ - False - - -- -- -- True -- 12 -- vertical -- 12 -- -- -- False -- <b>Settings</b> -- True -- True -- 1 -- 0 -- -- -- -- -- True -- -- -- True -- 12 -- -- -- True -- Attach this machine -- -- -- -- -- False -- This machine is not covered by an Trisquel Pro subscription. Receive security updates for over 30,000 Trisquel packages, on up to 3 machines free for personal use: <a href="https://ubuntu.com/advantage">More information</a>. -- True -- True -- 90 -- 0 -- -- -- -- -- True -- This machine is not covered by an Trisquel Advantage subscription. -- True -- True -- 90 -- 0 -- -- -- -- -- -- -- True -- 12 -- -- -- True -- Detach this machine -- -- -- -- -- False -- Trisquel Pro subscription attached. -- 0 -- -- -- -- -- True -- Trisquel Advantage subscription attached. -- 0 -- -- -- -- -- -- -- -- -- False -- False -- <b>Services</b> -- True -- True -- 1 -- 0 -- -- -- -- -- True -- 12 -- False -- -- -- False -- start -- -- -- -- -- False -- vertical -- 6 -- -- -- True -- <b>Extended Security Maintenance</b> provides security updates for over 30,000 Trisquel packages. -- True -- -- -- -- -- False -- Could not enable Extended Security Maintenance. Please try again. -- 0 -- -- -- -- -- -- -- -- -- -- -- -- -- True -- 12 -- False -- -- -- True -- start -- -- -- -- -- True -- vertical -- 6 -- -- -- True -- <b>Livepatch</b> helps keep your system secure by applying security updates that don't require a restart. -- True -- 0 -- -- -- -- -- True -- Show Livepatch status in the top bar -- False -- start -- True -- -- -- -- -- False -- Could not enable Livepatch. Please try again. -- 0 -- -- -- -- -- -- -- -- -- -- -- -- -- False -- <b>Compliance &amp; Hardening</b> -- True -- 0 -- -- -- -- -- False -- Please read the documentation and only enable these settings if you specifically require these certifications. -- True -- 0 -- -- -- -- -- False -- -- -- True -- vertical -- 12 -- 18 -- -- -- True -- 12 -- False -- -- -- True -- start -- -- -- -- -- True -- vertical -- 6 -- -- -- True -- <b>FIPS 140-2 Level 1.</b> <a href="https://ubuntu.com/security/certifications#fips">FIPS documentation.</a> -- True -- 0 -- -- -- -- -- False -- Could not enable FIPS 140-2 Level 1. Please try again. -- 0 -- -- -- -- -- -- -- -- -- -- -- -- -- True -- 12 -- False -- -- -- True -- start -- -- -- -- -- True -- vertical -- 6 -- -- -- True -- <b>FIPS Updates.</b> <a href="https://ubuntu.com/security/certifications#fips-updates">FIPS Updates documentation.</a> -- True -- 0 -- -- -- -- -- False -- Could not enable FIPS Updates. Please try again. -- 0 -- -- -- -- -- -- -- -- -- -- -- -- -- True -- 12 -- False -- -- -- True -- start -- -- -- -- -- True -- vertical -- 6 -- -- -- True -- <b>CC-EAL2.</b> <a href="https://ubuntu.com/security/certifications#common-criteria">CC-EAL2 documentation.</a> -- True -- 0 -- -- -- -- -- False -- Could not enable CC-EAL2. Please try again. -- 0 -- -- -- -- -- -- -- -- -- -- -- -- -- True -- 12 -- False -- -- -- True -- start -- -- -- -- -- True -- vertical -- 6 -- -- -- True -- <b>CIS Tools.</b> <a href="https://ubuntu.com/security/certifications#cis-tools">CIS Tools documentation.</a> -- True -- 0 -- -- -- -- -- False -- Could not enable CIS Tools. Please try again. -- 0 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 6 -- -- -- -- -- True -- -- -- True -- False -- Livepatch -- -- -- -- -- False -- False -- Trisquel Pro -- -- -- -- -- 6 -- False -- -- - - - True diff --git a/helpers/DATA/software-properties/disable-livepatch.patch b/helpers/DATA/software-properties/disable-livepatch.patch deleted file mode 100644 index 9612792..0000000 --- a/helpers/DATA/software-properties/disable-livepatch.patch +++ /dev/null @@ -1,87 +0,0 @@ ---- a/softwareproperties/LivepatchService.py 2020-01-06 15:10:21.950486591 -0500 -+++ b/softwareproperties/LivepatchService.py 2020-01-06 15:07:49.294703393 -0500 -@@ -29,8 +29,6 @@ - import dateutil.parser - import requests_unixsocket - -- gi.require_version('Snapd', '1') -- from gi.repository import Snapd - except(ImportError, ValueError): - pass - -@@ -41,9 +39,6 @@ - retry - ) - --from softwareproperties.LivepatchSnap import LivepatchSnap -- -- - def datetime_parser(json_dict): - for (key, value) in json_dict.items(): - try: -@@ -89,7 +84,6 @@ - - self._timeout_id = 0 - -- self._snap = LivepatchSnap() - self._session = requests_unixsocket.Session() - - # Init Properties -@@ -129,8 +123,6 @@ - # string rapresents the error message that needs to be shown if the - # callable returns false. - rules = [ -- (lambda: self._snap.get_status() != Snapd.SnapStatus.UNKNOWN, -- _('Canonical Livepatch snap is not available.')), - (has_gnome_online_accounts, - _('Gnome Online Accounts is required to enable Livepatch.')), - (is_current_distro_lts, -@@ -177,16 +169,7 @@ - Returns: - (False, '') if successful, (True, error_message) otherwise. - """ -- if self._enabled == enabled: -- return False, '' -- -- if not enabled: -- return self._disable_service() -- elif self._snap.get_status() == Snapd.SnapStatus.ACTIVE: -- return self._enable_service(token) -- else: -- success, msg = self._snap.enable_or_install() -- return self._enable_service(token) if success else (True, msg) -+ return self._disable_service() - - def get_status(self): - """Synchronously retrieve the status of Canonical Livepatch. -@@ -194,13 +177,7 @@ - Returns: - str: The status. A valid string for success, None otherwise. - """ -- try: -- params = {'verbosity': 3, 'format': 'json'} -- r = self._session.get(self.STATUS_ENDPOINT, params=params) -- return r.json(object_hook=datetime_parser) -- except Exception as e: -- logging.debug('Failed to get Livepatch status: {}'.format(str(e))) -- return None -+ return None - - # Private methods - def _enable_service(self, token): ---- a/softwareproperties/gtk/SoftwarePropertiesGtk.py 2020-01-06 15:10:21.970486562 -0500 -+++ b/softwareproperties/gtk/SoftwarePropertiesGtk.py 2020-01-06 15:08:00.466687527 -0500 -@@ -1038,12 +1037,7 @@ - self.datadir) - d.run() - -- self.quit_when_livepatch_responds = False -- if self.livepatch_page.waiting_livepatch_response: -- self.quit_when_livepatch_responds = True -- self.hide() -- else: -- self.quit() -+ self.quit() - - def on_button_add_cdrom_clicked(self, widget): - """ when a cdrom is requested for adding """ diff --git a/helpers/DATA/software-properties/remove_livepatch_from_gtk_uiv1_1.patch b/helpers/DATA/software-properties/remove_livepatch_from_gtk_uiv1_1.patch deleted file mode 100644 index f570474..0000000 --- a/helpers/DATA/software-properties/remove_livepatch_from_gtk_uiv1_1.patch +++ /dev/null @@ -1,260 +0,0 @@ -diff -Nru software-properties-0.99.9.8/data/gtkbuilder/main.ui software-properties-0.99.9.8_new/data/gtkbuilder/main.ui ---- software-properties-0.99.9.8/data/gtkbuilder/main.ui 2021-10-26 07:27:56.000000000 -0500 -+++ software-properties-0.99.9.8_new/data/gtkbuilder/main.ui 2021-11-15 21:32:20.534728294 -0600 -@@ -1241,256 +1241,6 @@ - False - - -- -- -- True -- False -- 12 -- vertical -- 12 -- -- -- True -- True -- -- -- -- True -- vertical -- -- -- True -- <b>Preview: Ubuntu Pro for Desktop</b>. Automatic security updates to over 30,000 open source software packages. -- True -- 0 -- -- -- -- -- True -- <a href="http://ubuntu.com/advantage">Join the beta programme</a>. -- True -- 0 -- -- -- -- -- -- -- -- -- True -- False -- Canonical Livepatch helps keep your system secure by applying security updates that don't require a restart. <a href="https://www.ubuntu.com/livepatch">Learn More</a> -- True -- True -- 1 -- 0 -- -- -- False -- True -- -- -- -- -- True -- False -- 6 -- -- -- True -- False -- True -- -- -- False -- True -- 0 -- -- -- -- -- False -- -- -- False -- True -- 1 -- -- -- -- -- True -- False -- -- -- False -- True -- 2 -- -- -- -- -- True -- True -- -- -- False -- True -- end -- 3 -- -- -- -- -- False -- True -- -- -- -- -- False -- crossfade -- True -- -- -- True -- True -- in -- -- -- True -- True -- 6 -- False -- word -- 6 -- 6 -- False -- textbuffer_livepatch -- False -- -- -- -- -- page_livepatch_message -- -- -- -- -- True -- False -- vertical -- 12 -- -- -- True -- False -- 0 -- -- -- False -- True -- 0 -- -- -- -- -- True -- False -- 0 -- -- -- False -- True -- 1 -- -- -- -- -- True -- True -- in -- -- -- True -- True -- model_livepatch_fixes -- False -- False -- False -- -- -- -- -- -- column -- -- -- 100 -- word -- 100 -- -- -- 0 -- -- -- -- -- -- -- -- -- True -- True -- 2 -- -- -- -- -- page_livepatch_status -- 1 -- -- -- -- -- True -- True -- -- -- -- -- Show Livepatch status in the top bar -- True -- False -- True -- False -- start -- True -- -- -- False -- True -- end -- -- -- -- -- 6 -- -- -- -- -- True -- False -- Livepatch -- -- -- 6 -- False -- -- - - - True diff --git a/helpers/DATA/software-properties/remove_proposed_updates.patch b/helpers/DATA/software-properties/remove_proposed_updates.patch new file mode 100644 index 0000000..d1cb311 --- /dev/null +++ b/helpers/DATA/software-properties/remove_proposed_updates.patch @@ -0,0 +1,126 @@ +diff -Nru software-properties-0.99.22.5+11.0trisquel11/data/gtkbuilder/main.ui software-properties-0.99.22.5+11.0trisquel11_fix/data/gtkbuilder/main.ui +--- software-properties-0.99.22.5+11.0trisquel11/data/gtkbuilder/main.ui 2023-01-27 09:12:26.635563930 -0600 ++++ software-properties-0.99.22.5+11.0trisquel11_fix/data/gtkbuilder/main.ui 2023-01-27 09:21:43.497166997 -0600 +@@ -1157,70 +1157,6 @@ + False + + +- +- +- True +- False +- 12 +- vertical +- 6 +- +- +- True +- False +- 0 +- none +- +- +- True +- False +- 6 +- 12 +- +- +- True +- False +- vertical +- +- +- +- +- +- +- +- +- +- True +- False +- Use proposed updates if you’re willing to report bugs on any problems that occur. +- True +- True +- 110 +- +- +- +- +- False +- True +- 0 +- +- +- +- +- 5 +- +- +- +- +- True +- False +- Trisquel Pro +- +- +- 6 +- False +- +- + + + True +diff -Nru software-properties-0.99.22.5+11.0trisquel11/softwareproperties/gtk/SoftwarePropertiesGtk.py software-properties-0.99.22.5+11.0trisquel11_fix/softwareproperties/gtk/SoftwarePropertiesGtk.py +--- software-properties-0.99.22.5+11.0trisquel11/softwareproperties/gtk/SoftwarePropertiesGtk.py 2023-01-27 09:54:48.314903324 -0600 ++++ software-properties-0.99.22.5+11.0trisquel11_fix/softwareproperties/gtk/SoftwarePropertiesGtk.py 2023-01-27 10:15:52.589232983 -0600 +@@ -410,24 +410,6 @@ + self.vbox_dist_comps.add(checkbox) + checkbox.show() + +- # Setup the checkbuttons for the child repos +- for checkbutton in self.dev_box.get_children(): +- self.dev_box.remove(checkbutton) +- for template in self.distro.source_template.children: +- # Do not show source entries in there +- if template.type == "deb-src": +- continue +- if "proposed" in template.name: +- checkbox = Gtk.CheckButton(label="%s (%s)" % (template.description, +- template.name)) +- checkbox.template = template +- self.handlers[checkbox] = \ +- checkbox.connect("toggled", +- self.on_checkbutton_child_toggled, +- template) +- self.dev_box.add(checkbox) +- checkbox.show() +- + status = get_ua_status() + if not is_current_distro_lts(): + esm_available = False +@@ -510,12 +492,6 @@ + """Fill the distro user interface with life""" + self.block_handlers() + +- # Enable or disable the child source checkbuttons +- for checkbox in self.dev_box.get_children(): +- (active, inconsistent) = self.get_comp_child_state(checkbox.template) +- checkbox.set_active(active) +- checkbox.set_inconsistent(inconsistent) +- + # Enable or disable the component checkbuttons + for checkbox in self.vbox_dist_comps.get_children(): + # check if the comp is enabled +@@ -562,10 +538,8 @@ + # and source code + if len(self.distro.enabled_comps) < 1: + self.combobox_updates_subscription.set_sensitive(False) +- self.dev_box.set_sensitive(False) + self.checkbutton_source_code.set_sensitive(False) + else: +- self.dev_box.set_sensitive(True) + self.checkbutton_source_code.set_sensitive(True) + + # Check for source code sources diff --git a/helpers/DATA/software-properties/remove_ubuntu_suscription_tab.patch b/helpers/DATA/software-properties/remove_ubuntu_suscription_tab.patch new file mode 100644 index 0000000..6038afb --- /dev/null +++ b/helpers/DATA/software-properties/remove_ubuntu_suscription_tab.patch @@ -0,0 +1,427 @@ +diff -Nru software-properties-0.99.22.5+11.0trisquel12/data/gtkbuilder/main.ui software-properties-0.99.22.5+11.0trisquel12_fix/data/gtkbuilder/main.ui +--- software-properties-0.99.22.5+11.0trisquel12/data/gtkbuilder/main.ui 2023-01-26 15:15:06.253819392 -0600 ++++ software-properties-0.99.22.5+11.0trisquel12_fix/data/gtkbuilder/main.ui 2023-01-26 15:17:19.325782731 -0600 +@@ -1211,423 +1211,6 @@ + + + +- +- True +- False +- Developer Options +- +- +- 5 +- False +- +- +- +- +- True +- +- +- True +- 12 +- vertical +- 12 +- +- +- True +- <b>Subscription</b> +- True +- True +- 1 +- 0 +- +- +- +- +- True +- +- +- True +- 36 +- 18 +- +- +- +- +- +- True +- +- +- True +- 24 +- +- +- True +- center +- _Enable Trisquel Pro +- True +- +- +- +- +- True +- <b>This machine is not covered by an Trisquel Pro subscription.</b> +-Receive security updates for over 25,000 Trisquel packages, free for up to 5 machines. <a href="https://ubuntu.com/pro">Learn more</a>. +- True +- True +- 90 +- 0 +- +- +- +- +- +- +- True +- 24 +- +- +- True +- center +- _Disable Trisquel Pro +- True +- +- +- +- +- True +- 6 +- +- +- True +- emblem-default +- +- +- +- +- True +- True +- <span foreground="green">Trisquel Pro support is enabled</span> +- 0 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- True +- False +- <b>Security</b> +- True +- True +- 1 +- 0 +- +- +- +- +- True +- 12 +- 12 +- +- +- True +- start +- center +- +- +- 0 +- 0 +- +- +- +- +- True +- True +- center +- 0 +- +- +- 1 +- 0 +- +- +- +- +- False +- center +- 0 +- +- +- +- +- +- +- 1 +- 1 +- +- +- +- +- True +- start +- center +- +- +- 0 +- 2 +- +- +- +- +- True +- True +- 0 +- +- +- 1 +- 2 +- +- +- +- +- False +- 0 +- +- +- +- +- +- +- 1 +- 3 +- +- +- +- +- True +- start +- center +- +- +- 0 +- 4 +- +- +- +- +- True +- <b>Kernel Livepatch</b> helps keep your system secure by applying security updates that don't require a restart. +- True +- 0 +- +- +- 1 +- 4 +- +- +- +- +- False +- 0 +- +- +- +- +- +- +- 1 +- 5 +- +- +- +- +- True +- Show Livepatch status in the top bar +- False +- start +- True +- +- +- 1 +- 6 +- +- +- +- +- +- +- True +- +- +- True +- 18 +- +- +- True +- vertical +- 12 +- +- +- True +- <b>Compliance &amp; Hardening</b> +- True +- 0 +- +- +- +- +- True +- Only recommended to assist with FedRAMP, HIPAA, and other compliance and hardening requirements. Includes FIPS 140-2 certified modules, DISA-STIG, CIS and Common Criteria. +- True +- 0 +- 90 +- +- +- +- +- +- +- True +- vertical +- 12 +- 12 +- 12 +- +- +- True +- 160 +- +- +- True +- Enable _FIPS +- True +- +- +- +- +- 0 +- 0 +- +- +- +- +- True +- <b>FIPS 140-2</b> +- True +- 0 +- +- +- 1 +- 0 +- +- +- +- +- True +- A US and Canada government cryptographic module certification of compliance with the FIPS 140-2 data protection standard. <a href="https://ubuntu.com/security/certifications/docs/fips">FIPS documentation</a> +- True +- True +- 0 +- 75 +- +- +- 1 +- 1 +- +- +- +- +- True +- 160 +- +- +- True +- Enable _USG +- True +- +- +- +- +- 0 +- 2 +- +- +- +- +- True +- <b>Trisquel Security Guide (USG)</b> +- True +- 0 +- +- +- 1 +- 2 +- +- +- +- +- True +- Automates hardening and auditing with CIS benchmark and DISA-STIG profiles while allowing for environment-specific customizations. <a href="https://ubuntu.com/security/certifications/docs/usg">USG documentation</a> +- True +- True +- 0 +- 75 +- +- +- 1 +- 3 +- +- +- +- +- +- +- +- +- +- +- 6 +- +- +- +- +- True +- +- +- True +- vertical +- 18 +- True +- center +- center +- +- +- True +- True +- +- +- +- +- True +- Setting up FIPS +- +- +- +- +- +- +- +- +- + + True + False diff --git a/helpers/make-software-properties b/helpers/make-software-properties index f218bb2..04e498b 100644 --- a/helpers/make-software-properties +++ b/helpers/make-software-properties @@ -20,13 +20,13 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -VERSION=11 +VERSION=12 . ./config - #Temporary removal of livepatch LP:1965993 - #patch -p1 < $DATA/remove_livepatch_from_gtk_uiv1_1.patch - #patch -p1 < $DATA/disable-livepatch.patch +#Remove logo +rm data/ubuntu-pro-logo*.svg +sed -i '/ubuntu-pro-logo/d' debian/software-properties-gtk.install rm softwareproperties/gtk/UbuntuProPage.py patch --no-backup-if-mismatch -p0 < $DATA/remove_snap_label.patch @@ -37,8 +37,6 @@ sed -i '/import softwareproperties.SoftwareProperties/a from softwareproperties. sed -i 's|eol_date = distro.eol|eol_date = trisquel_eol|' softwareproperties/gtk/SoftwarePropertiesGtk.py sed -i 's|eol_text = .*|eol_text = trisquel_rel_desc|' softwareproperties/gtk/SoftwarePropertiesGtk.py #Allow to start and remove drivers tab for qt flavor - #Temporary removal of livepatch LP:1965993 - #sed -i '/info_bar_ubuntu_pro/d' softwareproperties/gtk/SoftwarePropertiesGtk.py sed -i '/UbuntuDrivers/d' softwareproperties/qt/SoftwarePropertiesQt.py sed -i '/tab_switched(self)/i \ \ \ \ self.userinterface.tabWidget.removeTab(4)' softwareproperties/qt/SoftwarePropertiesQt.py sed -i '/tab_switched(self)/,/self.button_revert.setVisible(True)/{//!d}' softwareproperties/qt/SoftwarePropertiesQt.py @@ -62,10 +60,7 @@ replace "Trisquel-Gettext" "Ubuntu-Gettext" . sed '/test_suite/d' -i setup.py rm -rf tests -sed '/gir1.2-snapd-1/d' -i debian/control - #Temporary removal of livepatch LP:1965993 - #sed '/self.init_livepatch/d' -i softwareproperties/gtk/SoftwarePropertiesGtk.py - #sed 's/status = self.get_status()/status = Snapd.SnapStatus.UNKNOWN/' -i softwareproperties/LivepatchSnap.py +sed -i '/ubuntu-advantage-tools/d' debian/control rm data/software-properties-drivers.desktop.in sed -i '/software-properties-drivers/d' po/POTFILES.in @@ -81,7 +76,8 @@ sed -i '/TrisquelProPage/d' softwareproperties/gtk/SoftwarePropertiesGtk.py sed -i '/init_ubuntu_pro/d' softwareproperties/gtk/SoftwarePropertiesGtk.py #Livepatch - aramo -patch --no-backup-if-mismatch -p0 < $DATA/aramo_rm_livepatch.patch +patch --no-backup-if-mismatch -p1 < $DATA/remove_ubuntu_suscription_tab.patch +patch --no-backup-if-mismatch -p1 < $DATA/remove_proposed_updates.patch #Patch codename for PPAs patch --no-backup-if-mismatch -p1 < $DATA/fix_PPA_upstream_codename.patch