software-properties: backport v111 for improved deb822 sources

This commit is contained in:
Luis Guzmán 2025-09-26 14:37:13 -06:00
parent ba94845cbc
commit 63f1a0f061
7 changed files with 23 additions and 11 deletions

View file

@ -0,0 +1,432 @@
diff --git a/data/gtkbuilder/main.ui b/data/gtkbuilder/main.ui
index 01aa294e..9734153f 100644
--- a/data/gtkbuilder/main.ui
+++ b/data/gtkbuilder/main.ui
@@ -1225,427 +1225,6 @@
<property name="position">5</property>
</packing>
</child>
- <child type="tab">
- <object class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Developer Options</property>
- </object>
- <packing>
- <property name="position">5</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkStack" id="stack_ua_main">
- <property name="visible">False</property>
- <child>
- <object class="GtkBox" id="box_ua_options">
- <property name="visible">True</property>
- <property name="border_width">12</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Subscription&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">1</property>
- <property name="xalign">0</property>
- </object>
- </child>
- <child>
- <object class="GtkFrame">
- <property name="visible">True</property>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="spacing">36</property>
- <property name="margin">18</property>
- <child>
- <object class="GtkImage" id="image_ubuntu_pro_logo">
- <property name="visible">True</property>
- </object>
- </child>
- <child>
- <object class="GtkStack" id="stack_ua_attach">
- <property name="visible">True</property>
- <child>
- <object class="GtkBox" id="box_ua_unattached">
- <property name="visible">True</property>
- <property name="spacing">24</property>
- <child>
- <object class="GtkButton" id="button_ua_attach">
- <property name="visible">True</property>
- <property name="valign">center</property>
- <property name="label" translatable="yes">_Enable Trisquel Pro</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;This machine is not covered by an Trisquel Pro subscription.&lt;/b&gt;
-Receive security updates for over 25,000 Trisquel packages, free for up to 5 machines. &lt;a href="https://ubuntu.com/pro"&gt;Learn more&lt;/a&gt;.</property>
- <property name="use_markup">True</property>
- <property name="wrap">True</property>
- <property name="max-width-chars">90</property>
- <property name="xalign">0</property>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkBox" id="box_ua_attached">
- <property name="visible">True</property>
- <property name="spacing">24</property>
- <child>
- <object class="GtkButton" id="button_ua_detach">
- <property name="visible">True</property>
- <property name="valign">center</property>
- <property name="label" translatable="yes">_Disable Trisquel Pro</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkImage">
- <property name="visible">True</property>
- <property name="icon-name">emblem-default</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="use_markup">True</property>
- <property name="label" translatable="yes">&lt;span foreground="green"&gt;Trisquel Pro support is enabled&lt;/span&gt;</property>
- <property name="xalign">0</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">&lt;b&gt;Security&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">1</property>
- <property name="xalign">0</property>
- </object>
- </child>
- <child>
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">12</property>
- <child>
- <object class="GtkSwitch" id="switch_ua_esm_infra">
- <property name="visible">True</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_ua_esm_infra">
- <property name="visible">True</property>
- <property name="use_markup">True</property>
- <property name="valign">center</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_ua_esm_infra_error">
- <property name="visible">False</property>
- <property name="valign">center</property>
- <property name="xalign">0</property>
- <attributes>
- <attribute name="foreground" value="red"/>
- <attribute name="scale" value="0.9"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkSwitch" id="switch_ua_esm_apps">
- <property name="visible">True</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_ua_esm_apps">
- <property name="visible">True</property>
- <property name="use_markup">True</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_ua_esm_apps_error">
- <property name="visible">False</property>
- <property name="xalign">0</property>
- <attributes>
- <attribute name="foreground" value="red"/>
- <attribute name="scale" value="0.9"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkSwitch" id="switch_ua_livepatch">
- <property name="visible">True</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_ua_livepatch">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Kernel Livepatch&lt;/b&gt; helps keep your system secure by applying security updates that don't require a restart.</property>
- <property name="use_markup">True</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_ua_livepatch_error">
- <property name="visible">False</property>
- <property name="xalign">0</property>
- <attributes>
- <attribute name="foreground" value="red"/>
- <attribute name="scale" value="0.9"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">5</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_livepatch_topbar">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Show Livepatch status in the top bar</property>
- <property name="sensitive">False</property>
- <property name="halign">start</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">6</property>
- </packing>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkFrame">
- <property name="visible">True</property>
- <child>
- <object class="GtkExpander" id="expander_compliance_and_hardening">
- <property name="visible">True</property>
- <property name="margin">18</property>
- <child type="label">
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="label_compliance_and_hardening">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Compliance &amp;amp; Hardening&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="xalign">0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="label_compliance_and_hardening_subtitle">
- <property name="visible">True</property>
- <property name="label" translatable="yes">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.</property>
- <property name="wrap">True</property>
- <property name="xalign">0</property>
- <property name="max-width-chars">90</property>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">12</property>
- <property name="margin_top">12</property>
- <child>
- <object class="GtkButton" id="button_ua_fips">
- <property name="visible">True</property>
- <property name="width_request">160</property>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Enable _FIPS</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_ua_fips_status">
- <property name="visible">True</property>
- <property name="label">&lt;b&gt;FIPS 140-2&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_ua_fips_description">
- <property name="visible">True</property>
- <property name="label" translatable="yes">A US and Canada government cryptographic module certification of compliance with the FIPS 140-2 data protection standard. &lt;a href="https://ubuntu.com/security/certifications/docs/fips"&gt;FIPS documentation&lt;/a&gt;</property>
- <property name="use_markup">True</property>
- <property name="wrap">True</property>
- <property name="xalign">0</property>
- <property name="max-width-chars">75</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button_ua_usg">
- <property name="visible">True</property>
- <property name="width_request">160</property>
- <child>
- <object class="GtkLabel" id="label_ua_usg_button">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Enable _USG</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_ua_usg_status">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Trisquel Security Guide (USG)&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_ua_usg_description">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Automates hardening and auditing with CIS benchmark and DISA-STIG profiles while allowing for environment-specific customizations. &lt;a href="https://ubuntu.com/security/certifications/docs/usg"&gt;USG documentation&lt;/a&gt;</property>
- <property name="use_markup">True</property>
- <property name="wrap">True</property>
- <property name="xalign">0</property>
- <property name="max-width-chars">75</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- </object>
- </child>
- <accessibility>
- <relation type="labelled-by" target="label_compliance_and_hardening_subtitle"/>
- <relation type="labelled-by" target="label_compliance_and_hardening"/>
- </accessibility>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">6</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box_ua_fips_setup">
- <property name="visible">True</property>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">18</property>
- <property name="expand">True</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
- <child>
- <object class="GtkSpinner">
- <property name="visible">True</property>
- <property name="active">True</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Setting up FIPS</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>

View file

@ -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 @@
<property name="tab_fill">False</property>
</packing>
</child>
- <child>
- <object class="GtkBox" id="dev_options">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">12</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkFrame" id="frame_children1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkBox" id="dev_box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label_updates1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Use proposed updates if youre willing to report bugs on any problems that occur.</property>
- <property name="use_markup">True</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">110</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">5</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">Trisquel Pro</property>
- </object>
- <packing>
- <property name="position">6</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">True</property>
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

View file

@ -0,0 +1,22 @@
diff --git a/softwareproperties/ppa.py b/softwareproperties/ppa.py
index a979a3c9..c4e7cadc 100644
--- a/softwareproperties/ppa.py
+++ b/softwareproperties/ppa.py
@@ -32,6 +32,8 @@
from urllib.parse import urlparse
+from softwareproperties.trisquel_info import trisquel_upstream_rel
+
PPA_URI_FORMAT = 'https://ppa.launchpadcontent.net/{team}/{ppa}/ubuntu/'
PRIVATE_PPA_URI_FORMAT = 'https://private-ppa.launchpadcontent.net/{team}/{ppa}/ubuntu/'
@@ -98,7 +98,7 @@ class PPAShortcutHandler(ShortcutHandler):
entry = Deb822SourceEntry(None, '')
entry.types = [self.binary_type]
entry.uris = [uri]
- entry.suites = [self.dist]
+ entry.suites = [trisquel_upstream_rel]
entry.comps = comps
self._set_source_entry(str(entry))

View file

@ -0,0 +1,25 @@
diff --git a/data/gtkbuilder/main.ui b/data/gtkbuilder/main.ui
index c09f7d2..eda56c9 100644
--- a/data/gtkbuilder/main.ui
+++ b/data/gtkbuilder/main.ui
@@ -546,7 +546,7 @@
<object class="GtkLabel" id="label_updates_1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">For other packages, this system has:</property>
+ <property name="label" translatable="yes">This system has:</property>
<property name="xalign">1</property>
</object>
<packing>
diff --git a/po/software-properties.pot b/po/software-properties.pot
index a9c524a..db8462a 100644
--- a/po/software-properties.pot
+++ b/po/software-properties.pot
@@ -1146,3 +1146,7 @@ msgstr ""
#: ../data/gtkbuilder/dialog-ua-attach.ui.h:5
msgid "Attach"
msgstr ""
+
+# data/gtkbuilder/main.ui:549
+msgid "This system has:"
+msgstr ""

View file

@ -0,0 +1,14 @@
diff --git a/softwareproperties/gtk/SoftwarePropertiesGtk.py b/softwareproperties/gtk/SoftwarePropertiesGtk.py
index d76513f7..0a08c820 100644
--- a/softwareproperties/gtk/SoftwarePropertiesGtk.py
+++ b/softwareproperties/gtk/SoftwarePropertiesGtk.py
@@ -454,9 +454,6 @@ class SoftwarePropertiesGtk(SoftwareProperties, SimpleGtkbuilderApp):
else:
eol_expiry_text = _("Active until %s") % eol_date.strftime("%x")
self.label_eol.set_label(eol_expiry_text)
- self.label_esm_subscribe.set_markup(
- "<a href=\"%s\">%s</a>" % (esm_url, _("Extend…"))
- )
self.label_esm_subscribe.set_visible(
esm_available and not esm_enabled
)

View file

@ -0,0 +1,12 @@
diff --git a/debian/control b/debian/control
index 2dc835cb..d7ec094e 100644
--- a/debian/control
+++ b/debian/control
@@ -102,6 +102,7 @@ Depends: debconf-kde-helper,
python3-pyqt6,
python3-sip,
python3-software-properties (= ${binary:Version}),
+ pyqt6-dev-tools,
software-properties-common,
${misc:Depends},
${python3:Depends}