From 0530bb30def3888c9191e76250324266d8dba298 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 15 Oct 2025 16:12:40 -0600 Subject: [PATCH 01/17] config: add simple multi-line support changelog. --- helpers/config | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/helpers/config b/helpers/config index 2178600..198b38a 100755 --- a/helpers/config +++ b/helpers/config @@ -80,12 +80,33 @@ pkgversion(){ replace(){ find ${@:3} -type f -not -iregex '.*changelog.*' -not -iregex '.*copyright.*' -execdir /bin/sed --follow-symlinks -i s^"$1"^"$2"^g {} \; } +changelog_multiline() { + local msg="$1" + local version="${2:-$FULLVERSION}" + local dist="${3:-$REPO}" + + if ! grep -q "$version" debian/changelog 2>/dev/null; then + dch -v "$version" -D "$dist" "" + fi + + local count=0 + + while IFS= read -r line || [ -n "$line" ]; do + dch -a "$line" + count=$((count + 1)) + done <<< "$msg" + + if [ "$count" -gt 0 ]; then + dch -r "" + fi +} changelog(){ head -n 1 debian/changelog | grep -q $UPSTREAM-security && REPO=$CODENAME-security || REPO=$CODENAME [ "$SECURITY" = true ] && REPO=${CODENAME}-security [ "$BACKPORT" = true ] || [ "$BACKPORTS" = true ] && REPO=${CODENAME}-backports #Name convention issue "+" breaking packages build like console-setup, using "-" instead. -echo | dch -D $REPO -v $FULLVERSION "$1" +local msg="$1" +changelog_multiline "$msg" "$FULLVERSION" "$REPO" # Make sure the changelog file is identical between archs /bin/sed "/-- Trisquel/s/.*/ -- Trisquel GNU\/Linux developers $DATE/" -i debian/changelog From a7f01aa09be7bfa512339004c96db99bb6c68059 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Mon, 25 Aug 2025 23:59:05 -0600 Subject: [PATCH 02/17] config: add notice to remove_patch function. --- helpers/config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helpers/config b/helpers/config index 198b38a..ebc0e3e 100755 --- a/helpers/config +++ b/helpers/config @@ -232,7 +232,7 @@ package(){ # Make sure the series file is formated correctly after removals if [ -f debian/patches/series ]; then - grep -q [a-z] debian/patches/series || echo -n > debian/patches/series + grep -q [a-z] debian/patches/series || : > debian/patches/series fi if [ 1$QUILT != 1skip ]; then @@ -303,6 +303,7 @@ fi } remove_patch(){ + echo "> Removing patch $1 in progress..." rm "$(find */patches -name "$1")" sed -i "/$1/d" debian/patches/series } From ca516c71dc0917ed28e9489657a1c3f4d7d3de77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Guzm=C3=A1n?= Date: Sat, 11 Oct 2025 02:50:20 -0600 Subject: [PATCH 03/17] mate-user-admin: pull adduser regex from adduser.conf file --- ...-add-cracklib-runtime-as-dependency.patch} | 0 ...r-NAME_REGEX-for-username-validation.patch | 76 +++++++++++++++++++ helpers/make-mate-user-admin | 10 ++- 3 files changed, 82 insertions(+), 4 deletions(-) rename helpers/DATA/mate-user-admin/{add-cracklib-runtime-as-dependency.patch => patch_changes/000-add-cracklib-runtime-as-dependency.patch} (100%) create mode 100644 helpers/DATA/mate-user-admin/patch_changes/001-Use-adduser-NAME_REGEX-for-username-validation.patch diff --git a/helpers/DATA/mate-user-admin/add-cracklib-runtime-as-dependency.patch b/helpers/DATA/mate-user-admin/patch_changes/000-add-cracklib-runtime-as-dependency.patch similarity index 100% rename from helpers/DATA/mate-user-admin/add-cracklib-runtime-as-dependency.patch rename to helpers/DATA/mate-user-admin/patch_changes/000-add-cracklib-runtime-as-dependency.patch diff --git a/helpers/DATA/mate-user-admin/patch_changes/001-Use-adduser-NAME_REGEX-for-username-validation.patch b/helpers/DATA/mate-user-admin/patch_changes/001-Use-adduser-NAME_REGEX-for-username-validation.patch new file mode 100644 index 0000000..e19611f --- /dev/null +++ b/helpers/DATA/mate-user-admin/patch_changes/001-Use-adduser-NAME_REGEX-for-username-validation.patch @@ -0,0 +1,76 @@ +diff --git a/src/user-admin.c b/src/user-admin.c +index c51a2022..a4fb6941 100644 +--- a/src/user-admin.c ++++ b/src/user-admin.c +@@ -23,8 +23,10 @@ + #include + #include + #include ++#include + #include + #include ++#include + #include + #include + #include +@@ -285,6 +287,51 @@ static gboolean UserNameValidCheck (const gchar *UserName, gchar **Message) + valid = TRUE; + if (!in_use && !empty && !home_use) + { ++ /* Follow adduser(8) policy: ++ * Read NAME_REGEX from /etc/adduser.conf, compile an anchored regex, ++ * and require the username to fully match it. If unavailable or ++ * invalid, fall back to current Debian/Ubuntu default: ^[a-z][-a-z0-9_]*$ ++ * (lowercase first char; then lowercase, digits, '-' and '_'). ++ */ ++ { ++ gchar *contents = NULL, *rx_s = NULL; ++ gsize len = 0; ++ const gchar *fallback = "^[a-z][-a-z0-9_]*$"; ++ if (g_file_get_contents("/etc/adduser.conf", &contents, &len, NULL)) { ++ gchar **lines = g_strsplit(contents, "\n", -1); ++ for (gchar **p = lines; p && *p; ++p) { ++ gchar *line = g_strstrip(*p); ++ if (!line || !*line || line[0] == '#') ++ continue; ++ if (g_str_has_prefix(line, "NAME_REGEX")) { ++ /* Accept forms like: NAME_REGEX="...pattern..." */ ++ gchar *q1 = strchr(line, '"'); ++ if (q1) { ++ gchar *q2 = strrchr(q1 + 1, '"'); ++ if (q2 && q2 > q1 + 1) ++ rx_s = g_strndup(q1 + 1, (gsize)(q2 - (q1 + 1))); ++ } ++ break; ++ } ++ } ++ g_strfreev(lines); ++ g_free(contents); ++ } ++ ++ GError *rx_err = NULL; ++ GRegex *rx = g_regex_new(rx_s ? rx_s : fallback, G_REGEX_ANCHORED, 0, &rx_err); ++ g_free(rx_s); ++ if (rx) { ++ if (!g_regex_match(rx, UserName, 0, NULL)) { ++ valid = FALSE; ++ } ++ g_regex_unref(rx); ++ } else { ++ /* If regex cannot compile, be conservative */ ++ if (rx_err) g_error_free(rx_err); ++ valid = FALSE; ++ } ++ } + for (c = UserName; *c; c++) + { + if (! ((*c >= 'a' && *c <= 'z') || +@@ -313,7 +360,7 @@ static gboolean UserNameValidCheck (const gchar *UserName, gchar **Message) + } + else + { +- *Message = g_strdup (_("The username should only consist of upper and lower case \nletters from a-z,digits and the following characters: . - _")); ++ *Message = g_strdup (_("The username first character must be lower case, use only \nlowercase letters (a–z), digits and the following characters: -_")); + } + } + diff --git a/helpers/make-mate-user-admin b/helpers/make-mate-user-admin index b6785ce..b86424f 100644 --- a/helpers/make-mate-user-admin +++ b/helpers/make-mate-user-admin @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2024 Luis Guzmán +# Copyright (C) 2025 Luis Guzmán # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -VERSION=2 +VERSION=3 EXTERNAL='deb-src http://archive.ubuntu.com/ubuntu noble universe' . ./config @@ -26,9 +26,11 @@ EXTERNAL='deb-src http://archive.ubuntu.com/ubuntu noble universe' export FULLVERSION="$(sed 's|build3||' <<< $FULLVERSION)" # Add cracklib-runtime dependency to debian/control -patch --no-backup-if-mismatch -p1 < $DATA/add-cracklib-runtime-as-dependency.patch +apply_patch_changes + +changelog "Added cracklib-runtime dependency. +Added custom implementation to use adduser regex for user creation" -changelog "Imported into Trisquel Aramo | Added cracklib-runtime dependency." head -n1 debian/changelog | grep -q build && echo "error: update upstream version" && exit package From 4311064c975deb64c3936b7772e7c36a25ce9898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Guzm=C3=A1n?= Date: Fri, 17 Oct 2025 01:27:12 -0600 Subject: [PATCH 04/17] mate-control-center: add custom patch to allow edit clock w/o ntp provider. --- ...ble-manual-time-when-no-ntp-provider.patch | 103 ++++++++++++++++++ helpers/make-mate-control-center | 26 +++++ 2 files changed, 129 insertions(+) create mode 100644 helpers/DATA/mate-control-center/patch_changes/001-enable-manual-time-when-no-ntp-provider.patch create mode 100644 helpers/make-mate-control-center diff --git a/helpers/DATA/mate-control-center/patch_changes/001-enable-manual-time-when-no-ntp-provider.patch b/helpers/DATA/mate-control-center/patch_changes/001-enable-manual-time-when-no-ntp-provider.patch new file mode 100644 index 0000000..f7372d2 --- /dev/null +++ b/helpers/DATA/mate-control-center/patch_changes/001-enable-manual-time-when-no-ntp-provider.patch @@ -0,0 +1,103 @@ +diff --git a/capplets/time-admin/src/main.c b/capplets/time-admin/src/main.c +index a15254e6..ac9adb43 100644 +--- a/capplets/time-admin/src/main.c ++++ b/capplets/time-admin/src/main.c +@@ -156,8 +156,14 @@ static void InitMainWindow(TimeAdmin *ta) + + /* NTP sync switch */ + ta->NtpState = GetNtpState(ta); ++ /* If there is no NTP provider, then disable ntp switch and manually set NtpState = FALSE */ ++ if (!GetCanNtp(ta)) { ++ gtk_widget_set_sensitive (ta->NtpSyncSwitch, FALSE); ++ ta->NtpState = FALSE; ++ } + gtk_switch_set_state (GTK_SWITCH(ta->NtpSyncSwitch), ta->NtpState); +- ++ /* Refresh the tooltip state consistently */ ++ ChangeSpinBttonState (ta); + /* Time zone */ + SetupTimezoneDialog(ta); + const char *TimeZone = GetTimeZone(ta); +diff --git a/capplets/time-admin/src/time-tool.c b/capplets/time-admin/src/time-tool.c +index 664f6284..ac41545a 100644 +--- a/capplets/time-admin/src/time-tool.c ++++ b/capplets/time-admin/src/time-tool.c +@@ -138,6 +138,45 @@ EXIT: + + } + ++/* Returns TRUE if timedated reports a network time provider (CanNTP == TRUE). */ ++gboolean GetCanNtp(TimeAdmin *ta) ++{ ++ GDBusProxy *proxy = NULL; ++ GError *error = NULL; ++ GVariant *ret; ++ GVariant *canntp; ++ ++ proxy = g_dbus_proxy_new_sync (ta->Connection, ++ G_DBUS_PROXY_FLAGS_NONE, ++ NULL, ++ "org.freedesktop.timedate1", ++ "/org/freedesktop/timedate1", ++ "org.freedesktop.DBus.Properties", ++ NULL, ++ &error); ++ if (proxy == NULL) ++ goto EXIT; ++ ++ ret = g_dbus_proxy_call_sync (proxy, ++ "Get", ++ g_variant_new ("(ss)", ++ "org.freedesktop.timedate1", ++ "CanNTP"), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ NULL, ++ &error); ++ if (ret == NULL) ++ goto EXIT; ++ ++ g_variant_get (ret, "(v)", &canntp); ++ return g_variant_get_boolean (canntp); ++ ++EXIT: ++ ErrorMessage (_("GetNtpState"), error ? error->message : _("Unknown error")); ++ if (error) g_error_free (error); ++ return FALSE; ++} + const gchar *GetTimeZone(TimeAdmin *ta) + { + GDBusProxy *proxy = NULL; +@@ -200,10 +238,16 @@ void SetTimeZone(GDBusProxy *proxy,const char *zone) + } + } + +-static void ++void + ChangeSpinBttonState (TimeAdmin *ta) + { ++ /* Enable/disable manual edit widgets based on NTP state */ + gtk_widget_set_sensitive (ta->SaveButton, !ta->NtpState); ++ gtk_widget_set_sensitive (ta->HourSpin, !ta->NtpState); ++ gtk_widget_set_sensitive (ta->MinuteSpin, !ta->NtpState); ++ gtk_widget_set_sensitive (ta->SecondSpin, !ta->NtpState); ++ gtk_widget_set_sensitive (ta->Calendar, !ta->NtpState); ++ + SetTooltip (ta->SaveButton, !ta->NtpState); + SetTooltip (ta->HourSpin, !ta->NtpState); + SetTooltip (ta->MinuteSpin, !ta->NtpState); +diff --git a/capplets/time-admin/src/time-tool.h b/capplets/time-admin/src/time-tool.h +index 9c17703e..dfb0e601 100644 +--- a/capplets/time-admin/src/time-tool.h ++++ b/capplets/time-admin/src/time-tool.h +@@ -42,6 +42,10 @@ void SaveModifyTime (GtkButton *button, + + gboolean GetNtpState (TimeAdmin *ta); + ++gboolean GetCanNtp (TimeAdmin *ta); ++ ++void ChangeSpinBttonState (TimeAdmin *ta); ++ + const gchar *GetTimeZone (TimeAdmin *ta); + + void SetTimeZone (GDBusProxy *proxy, diff --git a/helpers/make-mate-control-center b/helpers/make-mate-control-center new file mode 100644 index 0000000..466817a --- /dev/null +++ b/helpers/make-mate-control-center @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Copyright (C) 2025 Luis Guzmán +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +VERSION=1 +. ./config + +apply_patch_changes + +changelog "Add custom patch to fix TPH#162, non-editable mate clock w/o ntp server." +package From 9cf0c9f7bcf206f98b555a78932ad91c7c802904 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Sun, 26 Oct 2025 20:05:47 -0600 Subject: [PATCH 05/17] gnome-boxes: fix issue for empty distro list --- .../001_add_trisquel_gnome-boxes_logo.patch | 0 ...ended-downloads_parsing_handle_empty.patch | 30 +++++++++++++++++++ helpers/make-gnome-boxes | 9 +++--- 3 files changed, 34 insertions(+), 5 deletions(-) rename helpers/DATA/gnome-boxes/{ => patch_changes}/001_add_trisquel_gnome-boxes_logo.patch (100%) create mode 100644 helpers/DATA/gnome-boxes/patch_changes/002_allow_recommended-downloads_parsing_handle_empty.patch diff --git a/helpers/DATA/gnome-boxes/001_add_trisquel_gnome-boxes_logo.patch b/helpers/DATA/gnome-boxes/patch_changes/001_add_trisquel_gnome-boxes_logo.patch similarity index 100% rename from helpers/DATA/gnome-boxes/001_add_trisquel_gnome-boxes_logo.patch rename to helpers/DATA/gnome-boxes/patch_changes/001_add_trisquel_gnome-boxes_logo.patch diff --git a/helpers/DATA/gnome-boxes/patch_changes/002_allow_recommended-downloads_parsing_handle_empty.patch b/helpers/DATA/gnome-boxes/patch_changes/002_allow_recommended-downloads_parsing_handle_empty.patch new file mode 100644 index 0000000..1b57e3b --- /dev/null +++ b/helpers/DATA/gnome-boxes/patch_changes/002_allow_recommended-downloads_parsing_handle_empty.patch @@ -0,0 +1,30 @@ +From 333dfad568ba77456ff3b00e6c2750d6a2cf0d73 Mon Sep 17 00:00:00 2001 +From: Felipe Borges +Date: Wed, 10 Aug 2022 09:54:41 +0200 +Subject: [PATCH] util-app: Make recommended-downloads parsing handle empty + media lists + +--- + src/util-app.vala | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/util-app.vala b/src/util-app.vala +index c0a42a94d..c5f47ae22 100644 +--- a/src/util-app.vala ++++ b/src/util-app.vala +@@ -250,7 +250,11 @@ private async GLib.List? parse_recommended_downloads_file (string + continue; + } + +- var media = os.get_media_list ().get_nth (0) as Osinfo.Media; ++ var media_list = os.get_media_list (); ++ if (media_list == null || media_list.get_length () == 0) ++ continue; ++ ++ var media = media_list.get_nth (0) as Osinfo.Media; + if (media.url != null || os_id.has_prefix ("http://redhat.com")) + list.append (media); + +-- +GitLab + diff --git a/helpers/make-gnome-boxes b/helpers/make-gnome-boxes index 967651f..5e869c2 100644 --- a/helpers/make-gnome-boxes +++ b/helpers/make-gnome-boxes @@ -19,13 +19,10 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -VERSION=5 +VERSION=6 . ./config -# Add trisquel logo patch. -patch_p1 $DATA/001_add_trisquel_gnome-boxes_logo.patch - remove_patch Update-recommended-downloads.patch #Required dependencies not in upstream. @@ -44,7 +41,6 @@ cat << recommended-os > data/recommended-downloads.xml --> http://trisquel.info/trisquel/11 - http://trisquel.info/trisquel/10 http://guix.gnu.org/guix/1.3 http://hyperbola.info/hyperbola/03 http://pureos.net/pureos/8 @@ -54,6 +50,9 @@ recommended-os # Remove gnome recommendation. grep -rl ".*.iso.*" data/osinfo/|xargs -r sed -i "/.iso/d" +# Apply patch_changes +apply_patch_changes + changelog "Replace recommended downloads." package From e849604dae5d8b1bce9bdc51de3def1bcf89190c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Guzm=C3=A1n?= Date: Sun, 2 Nov 2025 17:58:21 -0600 Subject: [PATCH 06/17] firefox: initial release for 144.0.x --- .../patch_changes/005-apply_custom_urls.patch | 78 ++++++++++++------- helpers/make-firefox | 20 +++-- 2 files changed, 65 insertions(+), 33 deletions(-) diff --git a/helpers/DATA/firefox/patch_changes/005-apply_custom_urls.patch b/helpers/DATA/firefox/patch_changes/005-apply_custom_urls.patch index 4f57574..059f74c 100644 --- a/helpers/DATA/firefox/patch_changes/005-apply_custom_urls.patch +++ b/helpers/DATA/firefox/patch_changes/005-apply_custom_urls.patch @@ -19,35 +19,59 @@ with is="" and support-page="..." Cheers! -diff --git a/browser/components/preferences/privacy.inc.xhtml b/browser/components/preferences/privacy.inc.xhtml_ -index 77ea8f5d..62c3ce8e 100644 +diff --git a/browser/components/preferences/privacy.inc.xhtml b/browser/components/preferences/privacy.inc.xhtml +index a9e8501a..02328371 100644 --- a/browser/components/preferences/privacy.inc.xhtml +++ b/browser/components/preferences/privacy.inc.xhtml -@@ -372,10 +372,7 @@ - support-page="global-privacy-control" /> - - - - -@@ -388,11 +385,10 @@ - - - +@@ -21,13 +21,13 @@ + + + +- - -+ ++ ++ - - +